From ade073ea2330e5a5fa72da88dfb7c31b74f9ee17 Mon Sep 17 00:00:00 2001 From: jmallett Date: Sun, 19 Jan 2003 05:46:23 +0000 Subject: 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). --- lib/libufs/cgroup.c | 1 + lib/libufs/libufs.h | 1 + lib/libufs/type.c | 1 + 3 files changed, 3 insertions(+) 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; -- cgit v1.1