Changeset View
Changeset View
Standalone View
Standalone View
sbin/growfs/growfs.c
Show First 20 Lines • Show All 1,455 Lines • ▼ Show 20 Lines | if ((ret = sbget(fsi, &fs, STDSB)) != 0) { | ||||
switch (ret) { | switch (ret) { | ||||
case ENOENT: | case ENOENT: | ||||
errx(1, "superblock not recognized"); | errx(1, "superblock not recognized"); | ||||
default: | default: | ||||
errc(1, ret, "unable to read superblock"); | errc(1, ret, "unable to read superblock"); | ||||
} | } | ||||
} | } | ||||
/* | /* | ||||
* Check for unclean filesystem. | * Check for filesystem that was unclean at mount time. | ||||
emaste: "Check for filesystem that was unclean at mount time." perhaps? | |||||
*/ | */ | ||||
if (fs->fs_clean == 0 || | if ((fs->fs_flags & (FS_UNCLEAN | FS_NEEDSFSCK)) != 0) | ||||
(fs->fs_flags & (FS_UNCLEAN | FS_NEEDSFSCK)) != 0) | |||||
errx(1, "%s is not clean - run fsck.\n", *argv); | errx(1, "%s is not clean - run fsck.\n", *argv); | ||||
memcpy(&osblock, fs, fs->fs_sbsize); | memcpy(&osblock, fs, fs->fs_sbsize); | ||||
free(fs); | free(fs); | ||||
memcpy((void *)&fsun1, (void *)&fsun2, osblock.fs_sbsize); | memcpy((void *)&fsun1, (void *)&fsun2, osblock.fs_sbsize); | ||||
DBG_OPEN("/tmp/growfs.debug"); /* already here we need a superblock */ | DBG_OPEN("/tmp/growfs.debug"); /* already here we need a superblock */ | ||||
DBG_DUMP_FS(&sblock, "old sblock"); | DBG_DUMP_FS(&sblock, "old sblock"); | ||||
▲ Show 20 Lines • Show All 289 Lines • Show Last 20 Lines |
"Check for filesystem that was unclean at mount time." perhaps?