diff options
author | ache <ache@FreeBSD.org> | 1996-02-03 15:21:30 +0000 |
---|---|---|
committer | ache <ache@FreeBSD.org> | 1996-02-03 15:21:30 +0000 |
commit | 7bf1219d001a2edf662fd02c832784b4c5062dfc (patch) | |
tree | a70f9ca9225562280cefa1684705508a89946f1b /usr.sbin/cdcontrol | |
parent | b2a974e602bbc4b313113558899341ff83ac37f2 (diff) | |
download | FreeBSD-src-7bf1219d001a2edf662fd02c832784b4c5062dfc.zip FreeBSD-src-7bf1219d001a2edf662fd02c832784b4c5062dfc.tar.gz |
Print out media catalog number, if exists
Diffstat (limited to 'usr.sbin/cdcontrol')
-rw-r--r-- | usr.sbin/cdcontrol/cdcontrol.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/usr.sbin/cdcontrol/cdcontrol.c b/usr.sbin/cdcontrol/cdcontrol.c index 6998d99..6d9a462 100644 --- a/usr.sbin/cdcontrol/cdcontrol.c +++ b/usr.sbin/cdcontrol/cdcontrol.c @@ -3,7 +3,7 @@ * Based on the non-X based CD player by Jean-Marc Zucconi and * Andrey A. Chernov. * - * $Id$ + * $Id: cdcontrol.c,v 1.9 1996/02/03 15:07:32 ache Exp $ */ #include <stdio.h> #include <stdlib.h> @@ -418,8 +418,12 @@ int pstatus (char *arg) ss.data_format = CD_MEDIA_CATALOG; rc = ioctl (fd, CDIOCREADSUBCHANNEL, (char *) &ss); if (rc >= 0) { - printf("Media catalog is %sactive\n", + printf("Media catalog is %sactive", ss.data->what.media_catalog.mc_valid ? "": "in"); + if (ss.data->what.media_catalog.mc_number[0]) + printf(", number \"%.15s\"", + ss.data->what.media_catalog.mc_number); + putchar('\n'); } else printf("No media catalog info available\n"); |