'dumpfs' incorrectly displays ufsid

Code:
# ll /dev/ufsid | grep 5f7a09e
crw-r-----  1 root  operator  -   0, 154 May  9 14:33:03 2011 4dc7deff[B][color="Red"]0[/color][/B]5f7a09e

# glabel status | grep 5f7a09e
 ufsid/4dc7deff[B][color="Red"]0[/color][/B]5f7a09e     N/A  md0f

Code:
# dumpfs md0f | grep superblock
superblock location     65536   id      [ 4dc7deff 5f7a09e ]
It should be:
Code:
[ 4dc7deff [B][color="Red"]0[/color][/B]5f7a09e ]
Looking at other ufsid's, I can say that this happens, ONLY when first char is 0 (zero) in second part of 8 chars, in which case dumpfs, ommits it.
 
Should be easily fixed:
Code:
        case 2:
		fssize = afs.fs_size;
		fstime = afs.fs_time;
		printf("magic\t%x (UFS2)\ttime\t%s",
		    afs.fs_magic, ctime(&fstime));
		[b]printf("superblock location\t%jd\tid\t[ %x %x ]\n",
		    (intmax_t)afs.fs_sblockloc, afs.fs_id[0], afs.fs_id[1]);[/b]
		printf("ncg\t%d\tsize\t%jd\tblocks\t%jd\n",
		    afs.fs_ncg, (intmax_t)fssize, (intmax_t)afs.fs_dsize);
		break;
	case 1:
		fssize = afs.fs_old_size;
		fstime = afs.fs_old_time;
		printf("magic\t%x (UFS1)\ttime\t%s",
		    afs.fs_magic, ctime(&fstime));
		[b]printf("id\t[ %08x %08x ]\n", afs.fs_id[0], afs.fs_id[1]);[/b]
		printf("ncg\t%d\tsize\t%jd\tblocks\t%jd\n",
		    afs.fs_ncg, (intmax_t)fssize, (intmax_t)afs.fs_dsize);
		break;

Note the differences in the printf format string. In order to print the leading zeroes correctly the first bolded line should be:
Code:
		printf("superblock location\t%jd\tid\t[ %08x %08x ]\n",
		    (intmax_t)afs.fs_sblockloc, afs.fs_id[0], afs.fs_id[1]);
 
I haven't done so. It's not really an error, it's just a different way of presenting the same information.
 
Back
Top