diff options
author | ache <ache@FreeBSD.org> | 1996-06-25 21:01:27 +0000 |
---|---|---|
committer | ache <ache@FreeBSD.org> | 1996-06-25 21:01:27 +0000 |
commit | 40797deb0ee0085d5485507596c54d6d823a8246 (patch) | |
tree | 46a083dd4e28a1bcf8cb37b31424caf34fdd3053 /usr.sbin/cdcontrol | |
parent | 37e3386c7667ab5ac7554e9071828e55595068c4 (diff) | |
download | FreeBSD-src-40797deb0ee0085d5485507596c54d6d823a8246.zip FreeBSD-src-40797deb0ee0085d5485507596c54d6d823a8246.tar.gz |
Don't print number (garbadge) if media catalog is inactive
Diffstat (limited to 'usr.sbin/cdcontrol')
-rw-r--r-- | usr.sbin/cdcontrol/cdcontrol.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.sbin/cdcontrol/cdcontrol.c b/usr.sbin/cdcontrol/cdcontrol.c index 2c33ec3..e60445c 100644 --- a/usr.sbin/cdcontrol/cdcontrol.c +++ b/usr.sbin/cdcontrol/cdcontrol.c @@ -17,7 +17,7 @@ * New eject algorithm. * Some code style reformatting. * - * $Id: cdcontrol.c,v 1.11 1996/02/09 00:22:17 ache Exp $ + * $Id: cdcontrol.c,v 1.12 1996/02/09 01:16:23 ache Exp $ */ #include <ctype.h> @@ -703,7 +703,8 @@ int pstatus (char *arg) if (rc >= 0) { printf("Media catalog is %sactive", ss.data->what.media_catalog.mc_valid ? "": "in"); - if (ss.data->what.media_catalog.mc_number[0]) + if (ss.data->what.media_catalog.mc_valid && + ss.data->what.media_catalog.mc_number[0]) printf(", number \"%.15s\"", ss.data->what.media_catalog.mc_number); putchar('\n'); |