aboutsummaryrefslogtreecommitdiff
path: root/lib/libufs
diff options
context:
space:
mode:
authorJuli Mallett <jmallett@FreeBSD.org>2003-01-19 05:46:23 +0000
committerJuli Mallett <jmallett@FreeBSD.org>2003-01-19 05:46:23 +0000
commitcc3dd52898c0ec5f192ce466461fc186db1764e2 (patch)
tree9b1a1f6153020c07f6b7e6583f80d2dfeb36d488 /lib/libufs
parentaac0e9388ea5f8de34c2399bc1b58ed1798057b7 (diff)
downloadsrc-cc3dd52898c0ec5f192ce466461fc186db1764e2.tar.gz
src-cc3dd52898c0ec5f192ce466461fc186db1764e2.zip
Store not only the current cylinder group in the series (i.e. next that needs
to be read in) but also the last cylinder group in the series (i.e. what is stored in the structure).
Notes
Notes: svn path=/head/; revision=109518
Diffstat (limited to 'lib/libufs')
-rw-r--r--lib/libufs/cgroup.c1
-rw-r--r--lib/libufs/libufs.h1
-rw-r--r--lib/libufs/type.c1
3 files changed, 3 insertions, 0 deletions
diff --git a/lib/libufs/cgroup.c b/lib/libufs/cgroup.c
index 2948e618aeb6..a1d624df0049 100644
--- a/lib/libufs/cgroup.c
+++ b/lib/libufs/cgroup.c
@@ -68,5 +68,6 @@ cgread1(struct uufsd *disk, int c)
ERROR(disk, "unable to read cylinder group");
return -1;
}
+ disk->d_lcg = c;
return 1;
}
diff --git a/lib/libufs/libufs.h b/lib/libufs/libufs.h
index 996a4426bafa..7f7f3361b233 100644
--- a/lib/libufs/libufs.h
+++ b/lib/libufs/libufs.h
@@ -85,6 +85,7 @@ struct uufsd {
/* cylinder group storage */
} d_cgunion;
int d_ccg; /* current cylinder group */
+ int d_lcg; /* last cylinder group (in d_cg) */
const char *d_error; /* human readable disk error */
int d_mine; /* internal flags */
#define d_fs d_sbunion.d_fs
diff --git a/lib/libufs/type.c b/lib/libufs/type.c
index ef07730f4fde..4b8066ce2e3a 100644
--- a/lib/libufs/type.c
+++ b/lib/libufs/type.c
@@ -146,6 +146,7 @@ again: if (stat(name, &st) < 0) {
disk->d_inoblock = NULL;
disk->d_inomin = 0;
disk->d_inomax = 0;
+ disk->d_lcg = 0;
disk->d_mine = 0;
disk->d_ufs = 0;
disk->d_error = NULL;