summaryrefslogtreecommitdiffstats
path: root/sbin/dumpfs
diff options
context:
space:
mode:
authorjmallett <jmallett@FreeBSD.org>2003-01-19 01:31:49 +0000
committerjmallett <jmallett@FreeBSD.org>2003-01-19 01:31:49 +0000
commit7a4607b5ca601c2df68d7e4186f3eb03cad1bf93 (patch)
treeeeb3902dfdedca13d64b30e34332587a089b00c3 /sbin/dumpfs
parent445adec218a00bb504836130a49e8ae3e1aa2af1 (diff)
downloadFreeBSD-src-7a4607b5ca601c2df68d7e4186f3eb03cad1bf93.zip
FreeBSD-src-7a4607b5ca601c2df68d7e4186f3eb03cad1bf93.tar.gz
Use libufs to read one cylinder group from the disk at a time.
Diffstat (limited to 'sbin/dumpfs')
-rw-r--r--sbin/dumpfs/dumpfs.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/sbin/dumpfs/dumpfs.c b/sbin/dumpfs/dumpfs.c
index 697a363..b10a317 100644
--- a/sbin/dumpfs/dumpfs.c
+++ b/sbin/dumpfs/dumpfs.c
@@ -74,12 +74,7 @@ static const char rcsid[] =
#include <unistd.h>
#define afs disk.d_fs
-
-union {
- struct cg cg;
- char pad[MAXBSIZE];
-} cgun;
-#define acg cgun.cg
+#define acg disk.d_cg
struct uufsd disk;
@@ -255,7 +250,7 @@ dumpcg(int c)
printf("\ncg %d:\n", c);
cur = fsbtodb(&afs, cgtod(&afs, c)) * disk.d_bsize;
- if (bread(&disk, fsbtodb(&afs, cgtod(&afs, c)), &acg, afs.fs_bsize) == -1)
+ if (cgread1(&disk, c) != 1)
return (1);
switch (disk.d_ufs) {
case 2:
OpenPOWER on IntegriCloud