cdcontrol.c (13989) | cdcontrol.c (16736) |
---|---|
1/* 2 * Compact Disc Control Utility by Serge V. Vakulenko <vak@cronyx.ru>. 3 * Based on the non-X based CD player by Jean-Marc Zucconi and 4 * Andrey A. Chernov. 5 * 6 * Fixed and further modified on 5-Sep-1995 by Jukka Ukkonen <jau@funet.fi>. 7 * 8 * 11-Sep-1995: Jukka A. Ukkonen <jau@funet.fi> 9 * A couple of further fixes to my own earlier "fixes". 10 * 11 * 18-Sep-1995: Jukka A. Ukkonen <jau@funet.fi> 12 * Added an ability to specify addresses relative to the 13 * beginning of a track. This is in fact a variation of 14 * doing the simple play_msf() call. 15 * 16 * 11-Oct-1995: Serge V.Vakulenko <vak@cronyx.ru> 17 * New eject algorithm. 18 * Some code style reformatting. 19 * | 1/* 2 * Compact Disc Control Utility by Serge V. Vakulenko <vak@cronyx.ru>. 3 * Based on the non-X based CD player by Jean-Marc Zucconi and 4 * Andrey A. Chernov. 5 * 6 * Fixed and further modified on 5-Sep-1995 by Jukka Ukkonen <jau@funet.fi>. 7 * 8 * 11-Sep-1995: Jukka A. Ukkonen <jau@funet.fi> 9 * A couple of further fixes to my own earlier "fixes". 10 * 11 * 18-Sep-1995: Jukka A. Ukkonen <jau@funet.fi> 12 * Added an ability to specify addresses relative to the 13 * beginning of a track. This is in fact a variation of 14 * doing the simple play_msf() call. 15 * 16 * 11-Oct-1995: Serge V.Vakulenko <vak@cronyx.ru> 17 * New eject algorithm. 18 * Some code style reformatting. 19 * |
20 * $Id: cdcontrol.c,v 1.11 1996/02/09 00:22:17 ache Exp $ | 20 * $Id: cdcontrol.c,v 1.12 1996/02/09 01:16:23 ache Exp $ |
21 */ 22 23#include <ctype.h> 24#include <stdio.h> 25#include <stdlib.h> 26#include <string.h> 27#include <unistd.h> 28#include <errno.h> --- 669 unchanged lines hidden (view full) --- 698 ss.data = &data; 699 ss.data_len = sizeof (data); 700 ss.address_format = msf ? CD_MSF_FORMAT : CD_LBA_FORMAT; 701 ss.data_format = CD_MEDIA_CATALOG; 702 rc = ioctl (fd, CDIOCREADSUBCHANNEL, (char *) &ss); 703 if (rc >= 0) { 704 printf("Media catalog is %sactive", 705 ss.data->what.media_catalog.mc_valid ? "": "in"); | 21 */ 22 23#include <ctype.h> 24#include <stdio.h> 25#include <stdlib.h> 26#include <string.h> 27#include <unistd.h> 28#include <errno.h> --- 669 unchanged lines hidden (view full) --- 698 ss.data = &data; 699 ss.data_len = sizeof (data); 700 ss.address_format = msf ? CD_MSF_FORMAT : CD_LBA_FORMAT; 701 ss.data_format = CD_MEDIA_CATALOG; 702 rc = ioctl (fd, CDIOCREADSUBCHANNEL, (char *) &ss); 703 if (rc >= 0) { 704 printf("Media catalog is %sactive", 705 ss.data->what.media_catalog.mc_valid ? "": "in"); |
706 if (ss.data->what.media_catalog.mc_number[0]) | 706 if (ss.data->what.media_catalog.mc_valid && 707 ss.data->what.media_catalog.mc_number[0]) |
707 printf(", number \"%.15s\"", 708 ss.data->what.media_catalog.mc_number); 709 putchar('\n'); 710 } else 711 printf("No media catalog info available\n"); 712 713 rc = ioctl (fd, CDIOCGETVOL, &v); 714 if (rc >= 0) --- 302 unchanged lines hidden --- | 708 printf(", number \"%.15s\"", 709 ss.data->what.media_catalog.mc_number); 710 putchar('\n'); 711 } else 712 printf("No media catalog info available\n"); 713 714 rc = ioctl (fd, CDIOCGETVOL, &v); 715 if (rc >= 0) --- 302 unchanged lines hidden --- |