Fix the BEADM LIST -D and -Da after introduction of the new BEADM LIST -a format.

This commit is contained in:
Slawomir Wojciech Wojtczak (vermaden) 2012-09-14 22:53:40 +02:00
parent 9c558f62e6
commit 371557fb11
1 changed files with 8 additions and 5 deletions

11
beadm
View File

@ -242,9 +242,10 @@ case ${1} in
USEDREFRESERV = __normalize($5) USEDREFRESERV = __normalize($5)
REFER[FSNAME] = __normalize($6) REFER[FSNAME] = __normalize($6)
CREATIONS[FSNAME] = $7 CREATIONS[FSNAME] = $7
ORIGIN = $8 # ORTEMP = $8
sub(BENAME_BEGINS_WITH "/", "", ORIGIN) # sub(BENAME_BEGINS_WITH "/", "", ORTEMP)
ORIGINS[FSNAME] = " " ORIGIN # ORIGINS[FSNAME] = " " ORTEMP
ORIGINS[FSNAME] = $8
if(FSNAME ~ /@/) if(FSNAME ~ /@/)
SPACES[FSNAME] = USED SPACES[FSNAME] = USED
else { else {
@ -301,12 +302,14 @@ case ${1} in
MOUNTPOINT = "-" MOUNTPOINT = "-"
printf " %-" FSNAME_LENGTH "s %-6s %-" MOUNTPOINT_LENGTH "s %6s %s\n", FSNAME, ACTIVE, MOUNTPOINT, __show_units(SPACES[FSNAME]), __convert_date(CREATIONS[FSNAME]) printf " %-" FSNAME_LENGTH "s %-6s %-" MOUNTPOINT_LENGTH "s %6s %s\n", FSNAME, ACTIVE, MOUNTPOINT, __show_units(SPACES[FSNAME]), __convert_date(CREATIONS[FSNAME])
ORIGIN = ORIGINS[FSNAME] ORIGIN = ORIGINS[FSNAME]
ORIGIN_DISPLAY = ORIGIN
sub(BENAME_BEGINS_WITH "/", "", ORIGIN_DISPLAY)
if(ORIGIN != "-") { if(ORIGIN != "-") {
if(OPTION_D == 1) if(OPTION_D == 1)
SPACE = REFER[ORIGIN] SPACE = REFER[ORIGIN]
else else
SPACE = SPACES[ORIGIN] SPACE = SPACES[ORIGIN]
printf " %-" FSNAME_LENGTH "s %-6s %-" MOUNTPOINT_LENGTH "s %6s %s\n", ORIGIN, "-", "-", __show_units(SPACE), __convert_date(CREATIONS[ORIGIN]) printf " %-" FSNAME_LENGTH "s %-6s %-" MOUNTPOINT_LENGTH "s %6s %s\n", " " ORIGIN_DISPLAY, "-", "-", __show_units(SPACE), __convert_date(CREATIONS[ORIGIN])
} }
} }
} }