Skip to content

Commit

Permalink
btape: Fix status command output
Browse files Browse the repository at this point in the history
This ugly output:

btape: btape.c:2161-0 Device status:btape: btape.c:2163-0  TAPEbtape:
btape.c:2167-0  BOTbtape: btape.c:2177-0  ONLINEbtape: btape.c:2181-0
IMMREPORTbtape: btape.c:2185-0 . ERR=

now looks like this:

Device status: TAPE BOT ONLINE IMMREPORT. ERR=
  • Loading branch information
pstorz authored and Marco van Wieringen committed Dec 24, 2015
1 parent c2f8b0c commit d64dbdd
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions src/stored/btape.c
Expand Up @@ -2158,31 +2158,31 @@ static void statcmd()

status = dev->status_dev();

Pmsg0(0, _("Device status:"));
printf( _("Device status:"));
if (bit_is_set(BMT_TAPE, status))
Pmsg0(0, " TAPE");
printf( " TAPE");
if (bit_is_set(BMT_EOF, status))
Pmsg0(0, " EOF");
printf( " EOF");
if (bit_is_set(BMT_BOT, status))
Pmsg0(0, " BOT");
printf( " BOT");
if (bit_is_set(BMT_EOT, status))
Pmsg0(0, " EOT");
printf( " EOT");
if (bit_is_set(BMT_SM, status))
Pmsg0(0, " SETMARK");
printf( " SETMARK");
if (bit_is_set(BMT_EOD, status))
Pmsg0(0, " EOD");
printf( " EOD");
if (bit_is_set(BMT_WR_PROT, status))
Pmsg0(0, " WRPROT");
printf( " WRPROT");
if (bit_is_set(BMT_ONLINE, status))
Pmsg0(0, " ONLINE");
printf( " ONLINE");
if (bit_is_set(BMT_DR_OPEN, status))
Pmsg0(0, " DOOROPEN");
printf( " DOOROPEN");
if (bit_is_set(BMT_IM_REP_EN, status))
Pmsg0(0, " IMMREPORT");
printf( " IMMREPORT");

free(status);

Pmsg1(0, _(". ERR=%s\n"), dev->bstrerror());
printf(_(". ERR=%s\n"), dev->bstrerror());

#ifdef xxxx
debug_level = 30;
Expand Down

0 comments on commit d64dbdd

Please sign in to comment.