Parse both old flags location and new one. Print out new flags including
acls, multilabel, and location updated.
This commit is contained in:
parent
3ff1f264e9
commit
bbef019c84
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=109767
@ -130,6 +130,7 @@ dumpfs(const char *name)
|
|||||||
{
|
{
|
||||||
time_t fstime;
|
time_t fstime;
|
||||||
int64_t fssize;
|
int64_t fssize;
|
||||||
|
int32_t fsflags;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
switch (disk.d_ufs) {
|
switch (disk.d_ufs) {
|
||||||
@ -211,21 +212,30 @@ dumpfs(const char *name)
|
|||||||
printf("cgrotor\t%d\tfmod\t%d\tronly\t%d\tclean\t%d\n",
|
printf("cgrotor\t%d\tfmod\t%d\tronly\t%d\tclean\t%d\n",
|
||||||
afs.fs_cgrotor, afs.fs_fmod, afs.fs_ronly, afs.fs_clean);
|
afs.fs_cgrotor, afs.fs_fmod, afs.fs_ronly, afs.fs_clean);
|
||||||
printf("flags\t");
|
printf("flags\t");
|
||||||
if (afs.fs_flags == 0)
|
if (afs.fs_old_flags & FS_FLAGS_UPDATED)
|
||||||
|
fsflags = afs.fs_flags;
|
||||||
|
else
|
||||||
|
fsflags = afs.fs_old_flags;
|
||||||
|
if (fsflags == 0)
|
||||||
printf("none");
|
printf("none");
|
||||||
if (afs.fs_flags & FS_UNCLEAN)
|
if (fsflags & FS_UNCLEAN)
|
||||||
printf("unclean ");
|
printf("unclean ");
|
||||||
if (afs.fs_flags & FS_DOSOFTDEP)
|
if (fsflags & FS_DOSOFTDEP)
|
||||||
printf("soft-updates ");
|
printf("soft-updates ");
|
||||||
if (afs.fs_flags & FS_NEEDSFSCK)
|
if (fsflags & FS_NEEDSFSCK)
|
||||||
printf("needs fsck run ");
|
printf("needs fsck run ");
|
||||||
if (afs.fs_flags & FS_INDEXDIRS)
|
if (fsflags & FS_INDEXDIRS)
|
||||||
printf("indexed directories ");
|
printf("indexed directories ");
|
||||||
if ((afs.fs_flags &
|
if (fsflags & FS_ACLS)
|
||||||
~(FS_UNCLEAN | FS_DOSOFTDEP | FS_NEEDSFSCK | FS_INDEXDIRS)) != 0)
|
printf("acls ");
|
||||||
printf("unknown flags (%#x)", afs.fs_flags &
|
if (fsflags & FS_MULTILABEL)
|
||||||
~(FS_UNCLEAN | FS_DOSOFTDEP |
|
printf("multilabel ");
|
||||||
FS_NEEDSFSCK | FS_INDEXDIRS));
|
if (fsflags & FS_FLAGS_UPDATED)
|
||||||
|
printf("fs_flags expanded ");
|
||||||
|
fsflags &= ~(FS_UNCLEAN | FS_DOSOFTDEP | FS_NEEDSFSCK | FS_INDEXDIRS |
|
||||||
|
FS_ACLS | FS_MULTILABEL | FS_FLAGS_UPDATED);
|
||||||
|
if (fsflags != 0)
|
||||||
|
printf("unknown flags (%#x)", fsflags);
|
||||||
putchar('\n');
|
putchar('\n');
|
||||||
printf("\ncs[].cs_(nbfree,ndir,nifree,nffree):\n\t");
|
printf("\ncs[].cs_(nbfree,ndir,nifree,nffree):\n\t");
|
||||||
afs.fs_csp = calloc(1, afs.fs_cssize);
|
afs.fs_csp = calloc(1, afs.fs_cssize);
|
||||||
|
Loading…
Reference in New Issue
Block a user