From cc3dd52898c0ec5f192ce466461fc186db1764e2 Mon Sep 17 00:00:00 2001 From: Juli Mallett 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 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; -- cgit v1.2.3