summaryrefslogtreecommitdiffstats
path: root/lib/libufs
diff options
context:
space:
mode:
authorjmallett <jmallett@FreeBSD.org>2003-01-19 05:46:23 +0000
committerjmallett <jmallett@FreeBSD.org>2003-01-19 05:46:23 +0000
commitade073ea2330e5a5fa72da88dfb7c31b74f9ee17 (patch)
tree9b1a1f6153020c07f6b7e6583f80d2dfeb36d488 /lib/libufs
parent61187c9172c2d324052fc1f9135c136f69a43248 (diff)
downloadFreeBSD-src-ade073ea2330e5a5fa72da88dfb7c31b74f9ee17.zip
FreeBSD-src-ade073ea2330e5a5fa72da88dfb7c31b74f9ee17.tar.gz
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).
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 2948e61..a1d624d 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 996a442..7f7f336 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 ef07730..4b8066c 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;
OpenPOWER on IntegriCloud