libcdio  2.1.0
About: GNU libcdio is a library for CD-ROM and CD image access.
  Fossies Dox: libcdio-2.1.0.tar.bz2  ("inofficial" and yet experimental doxygen-generated source code documentation)  

cd-info.c
Go to the documentation of this file.
1 /*
2  Copyright (C) 2003-2005, 2007-2008, 2011-2012, 2014, 2017
3  Rocky Bernstein <rocky@gnu.org>
4  Copyright (C) 1996, 1997, 1998 Gerd Knorr <kraxel@bytesex.org>
5  and Heiko Ei▀feldt <heiko@hexco.de>
6 
7  This program is free software: you can redistribute it and/or modify
8  it under the terms of the GNU General Public License as published by
9  the Free Software Foundation, either version 3 of the License, or
10  (at your option) any later version.
11 
12  This program is distributed in the hope that it will be useful,
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  GNU General Public License for more details.
16 
17  You should have received a copy of the GNU General Public License
18  along with this program. If not, see <http://www.gnu.org/licenses/>.
19 */
20 /*
21  CD Info - prints various information about a CD, and detects the type of
22  the CD.
23 */
24 
25 #include "util.h"
26 #include "getopt.h"
27 
28 #ifdef HAVE_STDARG_H
29 #include <stdarg.h>
30 #endif
31 #ifdef HAVE_STRINGS_H
32 #include <strings.h>
33 #endif
34 #ifdef HAVE_CDDB
35 #include <cddb/cddb.h>
36 #include "cddb.h"
37 #endif
38 
39 #ifdef HAVE_VCDINFO
40 #include <libvcd/logging.h>
41 #include <libvcd/files.h>
42 #include <libvcd/info.h>
43 #endif
44 
45 #include <cdio/bytesex.h>
46 #include <cdio/ds.h>
47 #include <cdio/util.h>
48 #include <cdio/cd_types.h>
49 #include <cdio/cdtext.h>
50 #include <cdio/iso9660.h>
51 #include <cdio/mmc.h>
52 #include <cdio/audio.h>
53 
54 #include "cdio_assert.h"
55 
56 #ifdef HAVE_FCNTL_H
57 #include <fcntl.h>
58 #endif
59 #ifdef __linux__
60 # include <linux/version.h>
61 # include <linux/cdrom.h>
62 # if LINUX_VERSION_CODE < KERNEL_VERSION(2,1,50)
63 # include <linux/ucdrom.h>
64 # endif
65 #endif
66 
67 #ifdef HAVE_ERRNO_H
68 #include <errno.h>
69 #endif
70 
71 #ifdef HAVE_ALLOCA_H
72 #include <alloca.h>
73 #endif
74 
75 #define STRONG "__________________________________\n"
76 #define NORMAL ""
77 
78 #define CDIO_IOCTL_FINISHED 0
79 #if CDIO_IOCTL_FINISHED
80 static struct cdrom_multisession ms;
81 static struct cdrom_subchnl sub;
82 #endif
83 
84 /* Used by `main' to communicate with `parse_opt'. And global options
85  */
86 static struct opts_s
87 {
88  int no_tracks;
89  int no_ioctl;
91  char *access_mode; /* Access method driver should use for control */
92  int no_cddb; /* If set the below are meaningless. */
93  int no_vcd;
94  int show_dvd;
95  int no_device;
97  uint32_t debug_level;
99  int silent;
102  int no_xa;
107 } opts;
108 
109 /* Configuration option codes */
110 enum {
112 
120 
126 
128 
129  /* These are the remaining configuration options */
131 
132 };
133 
134 /* Parse source options. */
135 static void
136 parse_source(int opt)
137 {
138  /* NOTE: The libpopt version made use of an extra temporary
139  variable (psz_my_source) for all sources _except_ devices.
140  This distinction seemed to serve no purpose.
141  */
142 
144  report(stderr, "%s: another source type option given before.\n",
145  program_name);
146  report(stderr, "%s: give only one source type option.\n",
147  program_name);
148  return;
149  }
150 
151  /* For all input sources which are not a DEVICE, we need to make
152  a copy of the string; for a DEVICE the fill-out routine makes
153  the copy.
154  */
155  if (OP_SOURCE_DEVICE != opt)
156  if (optarg != NULL) source_name = strdup(optarg);
157 
158  switch (opt) {
159  case OP_SOURCE_BIN:
161  break;
162  case OP_SOURCE_CUE:
164  break;
165  case OP_SOURCE_CDRDAO:
167  break;
168  case OP_SOURCE_NRG:
170  break;
171  case OP_SOURCE_AUTO:
173  break;
174 
175  case OP_SOURCE_DEVICE:
178  break;
179  }
180 }
181 
182 /* Parse all options. */
183 static bool
184 parse_options (int argc, char *argv[])
185 {
186  int opt; /* used for argument parsing */
187  int rc = EXIT_FAILURE;
188 
189  static const char helpText[] =
190  "Usage: %s [OPTION...]\n"
191  " -a, --access-mode=STRING Set CD access method\n"
192  " -d, --debug=INT Set debugging to LEVEL\n"
193  " -T, --no-tracks Don't show track information\n"
194  " -A, --no-analyze Don't show filesystem analysis\n"
195 #ifdef HAVE_CDDB
196  " --no-cddb Don't look up audio CDDB information\n"
197  " or print it\n"
198  " -P, --cddb-port=INT CDDB port number to use (default 8880)\n"
199  " -H, --cddb-http Lookup CDDB via HTTP proxy (default no\n"
200  " proxy)\n"
201  " --cddb-server=STRING CDDB server to contact for information\n"
202  " (default: freedb.freedb.org)\n"
203  " --cddb-cache=STRING Location of CDDB cache directory\n"
204  " (default ~/.cddbclient)\n"
205  " --cddb-email=STRING Email address to give CDDB server\n"
206  " (default me@home)\n"
207  " --no-cddb-cache Disable caching of CDDB entries\n"
208  " locally (default caches)\n"
209  " --cddb-timeout=INT CDDB timeout value in seconds\n"
210  " (default 10 seconds)\n"
211 #else
212  " --no-cddb Does nothing since this program is not\n"
213  " -P, --cddb-port=INT CDDB-enabled\n"
214  " -H, --cddb-http\n"
215  " --cddb-server=STRING\n"
216  " --cddb-cache=STRING\n"
217  " --cddb-email=STRING\n"
218  " --no-cddb-cache\n"
219  " --cddb-timeout=INT\n"
220 #endif
221  " --no-device-info Don't show device info, just CD info\n"
222  " --no-disc-mode Don't show disc-mode info\n"
223  " --dvd Attempt to give DVD information if a DVD is\n"
224  " found.\n"
225 #ifdef HAVE_VCDINFO
226  " -v, --no-vcd Don't look up Video CD information\n"
227 #else
228  " -v, --no-vcd Don't look up Video CD information - for\n"
229  " this build, this is always set\n"
230 #endif
231  " -I, --no-ioctl Don't show ioctl() information\n"
232  " -b, --bin-file[=FILE] set \"bin\" CD-ROM disk image file as source\n"
233  " -c, --cue-file[=FILE] set \"cue\" CD-ROM disk image file as source\n"
234  " -N, --nrg-file[=FILE] set Nero CD-ROM disk image file as source\n"
235  " -t, --toc-file[=FILE] set cdrdao CD-ROM disk image file as source\n"
236  " -i, --input[=FILE] set source and determine if \"bin\" image or\n"
237  " device\n"
238  " --iso9660 print directory contents of any ISO-9660\n"
239  " filesystems\n"
240  " -C, --cdrom-device[=DEVICE] set CD-ROM device as source\n"
241  " -l, --list-drives Give a list of CD-drives\n"
242  " --no-header Don't display header and copyright (for\n"
243  " regression testing)\n"
244 #ifdef HAVE_JOLIET
245  " --no-joliet Don't use Joliet extensions\n"
246 #endif
247  " --no-rock-ridge Don't use Rock-Ridge-extension information\n"
248  " --no-xa Don't use XA-extension information\n"
249  " -q, --quiet Don't produce warning output\n"
250  " -V, --version display version and copyright information\n"
251  " and exit\n"
252  "\n"
253  "Help options:\n"
254  " -?, --help Show this help message\n"
255  " --usage Display brief usage message\n";
256 
257  static const char usageText[] =
258  "Usage: %s [-a|--access-mode STRING] [-d|--debug INT] [-T|--no-tracks]\n"
259  " [-A|--no-analyze] [--no-cddb] [-P|--cddb-port INT] [-H|--cddb-http]\n"
260  " [--cddb-server=STRING] [--cddb-cache=STRING] [--cddb-email=STRING]\n"
261  " [--no-cddb-cache] [--cddb-timeout=INT] [--no-device-info]\n"
262  " [--no-disc-mode] [--dvd] [-v|--no-vcd] [-I|--no-ioctl]\n"
263  " [-b|--bin-file FILE] [-c|--cue-file FILE] [-N|--nrg-file FILE]\n"
264  " [-t|--toc-file FILE] [-i|--input FILE] [--iso9660]\n"
265  " [-C|--cdrom-device DEVICE] [-l|--list-drives] [--no-header]\n"
266  " [--no-joliet] [--no-rock-ridge] [--no-xa] [-q|--quiet] [-V|--version]\n"
267  " [-?|--help] [--usage]\n";
268 
269  static const char optionsString[] = "a:d:TAP:HvIb::c::N::t::i::C::lqV?";
270  static const struct option optionsTable[] = {
271  {"access-mode", required_argument, NULL, 'a'},
272  {"debug", required_argument, NULL, 'd' },
273  {"no-tracks", no_argument, NULL, 'T' },
274  {"no-analyze", no_argument, NULL, 'A' },
275  {"no-cddb", no_argument, &opts.no_cddb, 1 },
276  {"cddb-port", required_argument, NULL, 'P' },
277  {"cddb-http", no_argument, NULL, 'H' },
278  {"cddb-server", required_argument, NULL, OP_CDDB_SERVER },
279  {"cddb-cache", required_argument, NULL, OP_CDDB_CACHE },
280  {"cddb-email", required_argument, NULL, OP_CDDB_EMAIL },
281  {"no-cddb-cache", no_argument, NULL, OP_CDDB_NOCACHE },
282  {"cddb-timeout", required_argument, NULL, OP_CDDB_TIMEOUT },
283  {"no-device-info", no_argument, &opts.no_device, 1 },
284  {"no-disc-mode", no_argument, &opts.no_disc_mode, 1 },
285  {"dvd", no_argument, &opts.show_dvd, 1 },
286  {"no-vcd", no_argument, NULL, 'v' },
287  {"no-ioctl", no_argument, NULL, 'I' },
288  {"bin-file", optional_argument, NULL, 'b' },
289  {"cue-file", optional_argument, NULL, 'c' },
290  {"nrg-file", optional_argument, NULL, 'N' },
291  {"toc-file", optional_argument, NULL, 't' },
292  {"input", optional_argument, NULL, 'i' },
293  {"iso9660", no_argument, &opts.print_iso9660, 1 },
294  {"cdrom-device", optional_argument, NULL, 'C' },
295  {"list-drives", no_argument, NULL, 'l' },
296  {"no-header", no_argument, &opts.no_header, 1 },
297 #ifdef HAVE_JOLIET
298  {"no-joliet", no_argument, &opts.no_joliet, 1 },
299 #endif /*HAVE_JOLIET*/
300  {"no-rock-ridge", no_argument, &opts.no_rock_ridge, 1 },
301  {"no-xa", no_argument, &opts.no_xa, 1 },
302  {"quiet", no_argument, NULL, 'q' },
303  {"version", no_argument, NULL, 'V' },
304 
305  {"help", no_argument, NULL, '?' },
306  {"usage", no_argument, NULL, OP_USAGE },
307  { NULL, 0, NULL, 0 }
308  };
309 
310  program_name = strrchr(argv[0],'/');
311  program_name = program_name ? strdup(program_name+1) : strdup(argv[0]);
312 
313  while ((opt = getopt_long(argc, argv, optionsString, optionsTable, NULL)) >= 0) {
314  switch (opt) {
315  case 'a': opts.access_mode = strdup(optarg); break;
316  case 'd': opts.debug_level = atoi(optarg); break;
317  case 'T': opts.no_tracks = 1; break;
318  case 'A': opts.no_analysis = 1; break;
319 #ifdef HAVE_CDDB
320  case 'P': cddb_opts.port = atoi(optarg); break;
321  case 'H': cddb_opts.http = 1; break;
322  case OP_CDDB_SERVER: cddb_opts.server = strdup(optarg); break;
323  case OP_CDDB_CACHE: cddb_opts.cachedir = strdup(optarg); break;
324  case OP_CDDB_EMAIL: cddb_opts.email = strdup(optarg); break;
325  case OP_CDDB_NOCACHE: cddb_opts.disable_cache = 1; break;
326  case OP_CDDB_TIMEOUT: cddb_opts.timeout = atoi(optarg); break;
327 #endif
328  case 'v': opts.no_vcd = 1; break;
329  case 'I': opts.no_ioctl = 1; break;
330  case 'b': parse_source(OP_SOURCE_BIN); break;
331  case 'c': parse_source(OP_SOURCE_CUE); break;
332  case 'N': parse_source(OP_SOURCE_NRG); break;
333  case 't': parse_source(OP_SOURCE_CDRDAO); break;
334  case 'i': parse_source(OP_SOURCE_AUTO); break;
335  case 'C': parse_source(OP_SOURCE_DEVICE); break;
336  case 'l': opts.list_drives = 1; break;
337  case 'q': opts.silent = 1; break;
338  case 'V': opts.version_only = 1; break;
339 
340  case '?':
341  fprintf(stdout, helpText, program_name);
342  rc = EXIT_INFO;
343  goto error_exit;
344 
345  case OP_USAGE:
346  fprintf(stderr, usageText, program_name);
347  rc = EXIT_INFO;
348  goto error_exit;
349 
350  case OP_HANDLED:
351  break;
352  }
353  }
354 
355  if (optind < argc) {
356  const char *remaining_arg = argv[optind++];
357 
358  if (source_name != NULL) {
359  report(stderr, "%s: Source '%s' given as an argument of an option and as "
360  "unnamed option '%s'\n",
361  program_name, source_name, remaining_arg);
362  goto error_exit;
363  }
364 
366  source_name = fillout_device_name(remaining_arg);
367  else
368  source_name = strdup(remaining_arg);
369 
370  if (optind < argc) {
371  report(stderr, "%s: Source specified in previously %s and %s\n",
372  program_name, source_name, remaining_arg);
373  free(source_name);
374  goto error_exit;
375  }
376  }
377 
378  return true;
379  error_exit:
380  free(program_name);
381  exit(rc);
382 }
383 
384 /* CDIO logging routines */
385 
386 #ifdef HAVE_CDDB
387 static cddb_log_handler_t gl_default_cddb_log_handler = NULL;
388 #endif
389 #ifdef HAVE_VCDINFO
390 static vcd_log_handler_t gl_default_vcd_log_handler = NULL;
391 #endif
392 
393 static void
394 _log_handler (cdio_log_level_t level, const char message[])
395 {
396  if (level == CDIO_LOG_DEBUG && opts.debug_level < 2)
397  return;
398 
399  if (level == CDIO_LOG_INFO && opts.debug_level < 1)
400  return;
401 
402  if (level == CDIO_LOG_WARN && opts.silent)
403  return;
404 
405  gl_default_cdio_log_handler (level, message);
406 }
407 
408 #ifdef HAVE_CDDB
409 static void
410 _cddb_log_handler (cddb_log_level_t level, const char message[])
411 {
412  /* CDDB errors should not be considered fatal. */
413  if (level == (cddb_log_level_t) CDDB_LOG_ERROR)
414  level = (cddb_log_level_t) CDIO_LOG_WARN;
415 
416  /* Might consider doing some sort of CDDB to cdio to log level conversion,
417  but right now it's a no op. */
418 
419  _log_handler((cdio_log_level_t) level, message);
420 }
421 #endif
422 
423 static void
424 print_cdtext_track_info(cdtext_t *p_cdtext, track_t i_track, const char *psz_msg) {
425 
426  if (NULL != p_cdtext) {
428 
429  printf("%s\n", psz_msg);
430 
431  for (i=0; i < MAX_CDTEXT_FIELDS; i++) {
432  if (cdtext_get_const(p_cdtext, i, i_track)) {
433  printf("\t%s: %s\n", cdtext_field2str(i), cdtext_get_const(p_cdtext, i, i_track));
434  }
435  }
436  }
437 }
438 
439 static void
440 print_cdtext_info(CdIo_t *p_cdio, track_t i_tracks, track_t i_first_track) {
441  track_t i_last_track = i_first_track+i_tracks;
442  cdtext_t *p_cdtext = cdio_get_cdtext(p_cdio);
443  cdtext_lang_t *languages;
445 
446  int i, j;
447 
448  if(NULL == p_cdtext) {
449  printf("No CD-TEXT on Disc.\n");
450  return;
451  }
452 
453  languages = cdtext_list_languages_v2(p_cdtext);
454  /* The API promises that non-NULL p_cdtext yields non-NULL languages */
455  for(i=0; i<8; i++)
456  if ( CDTEXT_LANGUAGE_BLOCK_UNUSED != languages[i]
457  && cdtext_set_language_index(p_cdtext, i))
458  {
459  printf("\nLanguage %d '%s':\n", i, cdtext_lang2str(languages[i]));
460 
461  print_cdtext_track_info(p_cdtext, 0, "CD-TEXT for Disc:");
462  genre = cdtext_get_genre(p_cdtext);
463  if ( CDTEXT_GENRE_UNUSED != genre)
464  printf("\tGENRE_CODE: %d (%s)\n", genre, cdtext_genre2str(genre));
465 
466  for ( j = i_first_track ; j < i_last_track; j++ ) {
467  char msg[50];
468  sprintf(msg, "CD-TEXT for Track %2d:", j);
469  print_cdtext_track_info(p_cdtext, j, msg);
470  }
471  }
472 }
473 
474 #ifdef HAVE_CDDB
475 
476 static void
477 cddb_errmsg(const char *msg)
478 {
479  report(stderr, "%s: %s\n", program_name, msg);
480 }
481 
482 
483 static void
484 print_cddb_info(CdIo_t *p_cdio, track_t i_tracks, track_t i_first_track)
485 {
486  int i, i_cddb_matches = 0;
487 
488  cddb_conn_t *p_conn = NULL;
489  cddb_disc_t *p_cddb_disc = NULL;
490 
491  if ( init_cddb(p_cdio, &p_conn, &p_cddb_disc, cddb_errmsg, i_first_track,
492  i_tracks, &i_cddb_matches) ) {
493 
494  if (-1 == i_cddb_matches)
495  printf("%s: %s\n", program_name, cddb_error_str(cddb_errno(p_conn)));
496  else {
497  printf("%s: Found %d matches in CDDB\n", program_name, i_cddb_matches);
498  for (i=1; i<=i_cddb_matches; i++) {
499  cddb_disc_print(p_cddb_disc);
500  cddb_query_next(p_conn, p_cddb_disc);
501  if (i != i_cddb_matches) cddb_read(p_conn, p_cddb_disc);
502  }
503  }
504 
505  cddb_disc_destroy(p_cddb_disc);
506  cddb_destroy(p_conn);
507  libcddb_shutdown();
508  }
509 }
510 #endif
511 
512 #ifdef HAVE_VCDINFO
513 static void
514 print_vcd_info(driver_id_t driver) {
515  vcdinfo_open_return_t open_rc;
516  vcdinfo_obj_t *p_vcd = NULL;
517  open_rc = vcdinfo_open(&p_vcd, &source_name, driver, NULL);
518  switch (open_rc) {
519  case VCDINFO_OPEN_VCD:
520  if (vcdinfo_get_format_version (p_vcd) == VCD_TYPE_INVALID) {
521  report(stderr, "VCD format detection failed");
522  vcdinfo_close(p_vcd);
523  return;
524  }
525  report (stdout, "Format : %s\n",
526  vcdinfo_get_format_version_str(p_vcd));
527  report (stdout, "Album : `%.16s'\n", vcdinfo_get_album_id(p_vcd));
528  report (stdout, "Volume count : %d\n", vcdinfo_get_volume_count(p_vcd));
529  report (stdout, "volume number: %d\n", vcdinfo_get_volume_num(p_vcd));
530 
531  break;
532  case VCDINFO_OPEN_ERROR:
533  report( stderr, "Error in Video CD opening of %s\n", source_name );
534  break;
535  case VCDINFO_OPEN_OTHER:
536  report( stderr, "Even though we thought this was a Video CD, "
537  " further inspection says it is not.\n" );
538  break;
539  }
540  if (p_vcd) vcdinfo_close(p_vcd);
541 
542 }
543 #endif
544 
545 static void
546 print_iso9660_recurse (CdIo_t *p_cdio, const char pathname[],
547  cdio_fs_anal_t fs)
548 {
549  CdioISO9660FileList_t *p_entlist;
551  CdioListNode_t *entnode;
552  uint8_t i_joliet_level;
553  char *translated_name = (char *) alloca(4096);
554  size_t translated_name_size = 4096;
555 
556  i_joliet_level = (opts.no_joliet)
557  ? 0
558  : cdio_get_joliet_level(p_cdio);
559 
560  p_entlist = iso9660_fs_readdir(p_cdio, pathname);
561 
562  printf ("%s:\n", pathname);
563 
564  if (NULL == p_entlist) {
565  report( stderr, "Error getting above directory information\n" );
566  iso9660_dirlist_free(p_dirlist);
567  return;
568  }
569 
570  /* Iterate over files in this directory */
571 
572  _CDIO_LIST_FOREACH (entnode, p_entlist)
573  {
574  iso9660_stat_t *p_statbuf = _cdio_list_node_data (entnode);
575  char *psz_iso_name = p_statbuf->filename;
576  char _fullname[4096] = { 0, };
577  if (strlen(psz_iso_name) >= translated_name_size) {
578  translated_name_size = strlen(psz_iso_name)+1;
579  if (!translated_name) {
580  report( stderr, "Error allocating memory\n" );
581  iso9660_dirlist_free(p_dirlist);
582  return;
583  }
584  }
585 
586  if (yep != p_statbuf->rr.b3_rock || 1 == opts.no_rock_ridge) {
587  iso9660_name_translate_ext(psz_iso_name, translated_name,
588  i_joliet_level);
589  }
590 
591 
592  snprintf (_fullname, sizeof (_fullname), "%s%s", pathname,
593  psz_iso_name);
594 
595  strncat (_fullname, "/", sizeof(_fullname) - strlen(_fullname) - 1);
596 
597  if (p_statbuf->type == _STAT_DIR
598  && strcmp (psz_iso_name, ".")
599  && strcmp (psz_iso_name, ".."))
600  _cdio_list_append (p_dirlist, strdup (_fullname));
601 
602  print_fs_attrs(p_statbuf, 0 == opts.no_rock_ridge, fs & CDIO_FS_ANAL_XA,
603  psz_iso_name, translated_name);
604  if (p_statbuf->rr.i_symlink) {
605  free(p_statbuf->rr.psz_symlink);
606  p_statbuf->rr.i_symlink = 0;
607  }
608  }
609 
610  iso9660_filelist_free(p_entlist);
611 
612  printf ("\n");
613 
614  /* Now recurse over the directories. */
615 
616  _CDIO_LIST_FOREACH (entnode, p_dirlist)
617  {
618  char *_fullname = _cdio_list_node_data (entnode);
619 
620  print_iso9660_recurse (p_cdio, _fullname, fs);
621  }
622 
623  iso9660_dirlist_free(p_dirlist);
624 }
625 
626 static void
628  track_format_t track_format)
629 {
630  iso_extension_mask_t iso_extension_mask = ISO_EXTENSION_ALL;
631 
632  if (opts.no_joliet) {
633  iso_extension_mask &= ~ISO_EXTENSION_JOLIET;
634  }
635 
636  if ( !iso9660_fs_read_superblock(p_cdio, iso_extension_mask) )
637  return;
638 
639  printf ("ISO9660 filesystem\n");
640  print_iso9660_recurse (p_cdio, "/", fs);
641 }
642 
643 #define print_vd_info(title, fn) \
644  psz_str = fn(&pvd); \
645  if (psz_str) { \
646  report(stdout, title ": %s\n", psz_str); \
647  free(psz_str); \
648  psz_str = NULL; \
649  }
650 
651 static void
653  cdio_fs_anal_t fs, int first_data, unsigned int num_audio,
654  track_t i_tracks, track_t i_first_track,
655  track_format_t track_format, CdIo_t *p_cdio)
656 {
657  int need_lf;
658 
659  switch(CDIO_FSTYPE(fs)) {
660  case CDIO_FS_AUDIO:
661  if (num_audio > 0) {
662 #ifdef HAVE_CDDB
663  if (!opts.no_cddb) {
664  printf("Audio CD, CDDB disc ID is %08x\n",
665  cddb_discid(p_cdio, i_tracks));
666  print_cddb_info(p_cdio, i_tracks, i_first_track);
667  }
668 #endif
669  print_cdtext_info(p_cdio, i_tracks, i_first_track);
670  }
671  break;
672  case CDIO_FS_ISO_9660:
673  printf("CD-ROM with ISO 9660 filesystem");
674  if (fs & CDIO_FS_ANAL_JOLIET) {
675  printf(" and joliet extension level %d", cdio_iso_analysis.joliet_level);
676  }
677  if (fs & CDIO_FS_ANAL_ROCKRIDGE)
678  printf(" and rockridge extensions");
679  printf("\n");
680  break;
682  printf("CD-ROM with CD-RTOS and ISO 9660 filesystem\n");
683  break;
684  case CDIO_FS_HIGH_SIERRA:
685  printf("CD-ROM with High Sierra filesystem\n");
686  break;
687  case CDIO_FS_INTERACTIVE:
688  printf("CD-Interactive%s\n", num_audio > 0 ? "/Ready" : "");
689  break;
690  case CDIO_FS_HFS:
691  printf("CD-ROM with Macintosh HFS\n");
692  break;
693  case CDIO_FS_ISO_HFS:
694  printf("CD-ROM with both Macintosh HFS and ISO 9660 filesystem\n");
695  break;
696  case CDIO_FS_UFS:
697  printf("CD-ROM with Unix UFS\n");
698  break;
699  case CDIO_FS_EXT2:
700  printf("CD-ROM with GNU/Linux EXT2 (native) filesystem\n");
701  break;
702  case CDIO_FS_3DO:
703  printf("CD-ROM with Panasonic 3DO filesystem\n");
704  break;
705  case CDIO_FS_UDFX:
706  printf("CD-ROM with UDFX filesystem\n");
707  break;
708  case CDIO_FS_UNKNOWN:
709  printf("CD-ROM with unknown filesystem\n");
710  break;
711  case CDIO_FS_XISO:
712  printf("CD-ROM with Microsoft X-BOX XISO filesystem\n");
713  break;
714  }
715  switch(CDIO_FSTYPE(fs)) {
716  case CDIO_FS_ISO_9660:
718  case CDIO_FS_ISO_HFS:
719  case CDIO_FS_ISO_UDF:
720  printf("ISO 9660: %i blocks, label `%.32s'\n",
721  cdio_iso_analysis.isofs_size, cdio_iso_analysis.iso_label);
722 
723  {
724  iso9660_pvd_t pvd;
725 
726  if ( iso9660_fs_read_pvd(p_cdio, &pvd) ) {
727  char *psz_str;
733  print_vd_info("Volume Set ", iso9660_get_volumeset_id);
734  }
735  }
736 
737  if (opts.print_iso9660)
738  print_iso9660_fs(p_cdio, fs, track_format);
739 
740  break;
741  }
742 
743  switch(CDIO_FSTYPE(fs)) {
744  case CDIO_FS_UDF:
745  case CDIO_FS_ISO_UDF:
746  report(stdout, "UDF: version %x.%2.2x\n",
747  cdio_iso_analysis.UDFVerMajor, cdio_iso_analysis.UDFVerMinor);
748  break;
749  default: ;
750  }
751 
752  need_lf = 0;
753  if (first_data == 1 && num_audio > 0)
754  need_lf += printf("mixed mode CD ");
755  if (fs & CDIO_FS_ANAL_XA)
756  need_lf += printf("XA sectors ");
757  if (fs & CDIO_FS_ANAL_MULTISESSION)
758  need_lf += printf("Multisession, offset = %i ", ms_offset);
759  if (fs & CDIO_FS_ANAL_HIDDEN_TRACK)
760  need_lf += printf("Hidden Track ");
761  if (fs & CDIO_FS_ANAL_PHOTO_CD)
762  need_lf += printf("%sPhoto CD ",
763  num_audio > 0 ? " Portfolio " : "");
764  if (fs & CDIO_FS_ANAL_CDTV)
765  need_lf += printf("Commodore CDTV ");
766  if (first_data > 1)
767  need_lf += printf("CD-Plus/Extra ");
768  if (fs & CDIO_FS_ANAL_BOOTABLE)
769  need_lf += printf("bootable CD ");
770  if (fs & CDIO_FS_ANAL_VIDEOCD && num_audio == 0) {
771  need_lf += printf("Video CD ");
772  }
773  if (fs & CDIO_FS_ANAL_SVCD)
774  need_lf += printf("Super Video CD (SVCD) or Chaoji Video CD (CVD)");
775  if (fs & CDIO_FS_ANAL_CVD)
776  need_lf += printf("Chaoji Video CD (CVD)");
777  if (need_lf) printf("\n");
778 #ifdef HAVE_VCDINFO
780  if (!opts.no_vcd) {
781  printf("\n");
782  print_vcd_info(cdio_get_driver_id(p_cdio));
783  }
784 #endif
785 
786 }
787 
788 /* Initialize global variables. */
789 static void
790 init(void)
791 {
793 #ifdef HAVE_CDDB
794  gl_default_cddb_log_handler =
795  cddb_log_set_handler ((cddb_log_handler_t) _cddb_log_handler);
796 #endif
797 
798 #ifdef HAVE_VCDINFO
799  gl_default_vcd_log_handler =
800  vcd_log_set_handler ((vcd_log_handler_t) _log_handler);
801 #endif
802 
803  /* Default option values. */
804  opts.silent = false;
805  opts.list_drives = false;
806  opts.no_header = false;
807  opts.no_joliet = 0;
808  opts.no_rock_ridge = 0;
809  opts.no_xa = 0;
810  opts.no_device = 0;
811  opts.no_disc_mode = 0;
812  opts.debug_level = 0;
813  opts.no_tracks = 0;
814  opts.print_iso9660 = 0;
815 #ifdef HAVE_CDDB
816  opts.no_cddb = 0;
817  cddb_opts.port = 8880;
818  cddb_opts.http = 0;
821  cddb_opts.timeout = -1;
822  cddb_opts.disable_cache = false;
823 #endif
824 #ifdef HAVE_VCDINFO
825  opts.no_vcd = 0;
826 #else
827  opts.no_vcd = 1;
828 #endif
829  opts.no_ioctl = 0;
830  opts.no_analysis = 0;
833 }
834 
835 /* ------------------------------------------------------------------------ */
836 
837 int
838 main(int argc, char *argv[])
839 {
840 
841  CdIo_t *p_cdio=NULL;
843  int i;
844  lsn_t start_track_lsn; /* lsn of first track */
845  lsn_t data_start = 0; /* start of data area */
846  int ms_offset = 0;
847  track_t i_tracks = 0;
848  track_t i_first_track = 0;
849  unsigned int num_audio = 0; /* # of audio tracks */
850  unsigned int num_data = 0; /* # of data tracks */
851  int first_data = -1; /* # of first data track */
852  int first_audio = -1; /* # of first audio track */
853  bool b_playing_audio = false; /* currently playing a
854  CD-DA */
855  cdio_iso_analysis_t cdio_iso_analysis;
856  char *media_catalog_number;
857  char *isrc;
859  cdio_drive_read_cap_t i_read_cap = 0;
860  cdio_drive_write_cap_t i_write_cap;
861  cdio_drive_misc_cap_t i_misc_cap;
862 
863  memset(&cdio_iso_analysis, 0, sizeof(cdio_iso_analysis));
864  init();
865 
866  /* Parse our arguments; every option seen by `parse_opt' will
867  be reflected in `arguments'. */
868  parse_options(argc, argv);
869 
871 
872  if (opts.debug_level == 3) {
874 #ifdef HAVE_VCDINFO
875  vcd_loglevel_default = VCD_LOG_INFO;
876 #endif
877  } else if (opts.debug_level >= 4) {
879 #ifdef HAVE_VCDINFO
880  vcd_loglevel_default = VCD_LOG_DEBUG;
881 #endif
882  }
883 
885 
886  if (p_cdio==NULL) {
887  if (source_name) {
888  err_exit("%s: Error in opening device driver for input %s.\n",
890  } else {
891  err_exit("%s: Error in opening device driver for unspecified input.\n",
892  program_name);
893  }
894 
895  }
896 
897  if (source_name==NULL) {
898  source_name=strdup(cdio_get_arg(p_cdio, "source"));
899  if (NULL == source_name) {
900  err_exit("%s: No input device given/found\n", program_name);
901  }
902  }
903 
904  if (0 == opts.silent) {
905  printf("CD location : %s\n", source_name);
906  printf("CD driver name: %s\n", cdio_get_driver_name(p_cdio));
907  printf(" access mode: %s\n\n", cdio_get_arg(p_cdio, "access-mode"));
908  }
909 
910  cdio_get_drive_cap(p_cdio, &i_read_cap, &i_write_cap, &i_misc_cap);
911  if (0 == opts.no_device) {
912  cdio_hwinfo_t hwinfo;
913  if (cdio_get_hwinfo(p_cdio, &hwinfo)) {
914  printf("%-28s: %s\n%-28s: %s\n%-28s: %s\n",
915  "Vendor" , hwinfo.psz_vendor,
916  "Model" , hwinfo.psz_model,
917  "Revision", hwinfo.psz_revision);
918  }
919  print_drive_capabilities(i_read_cap, i_write_cap, i_misc_cap);
920  }
921 
922  if (opts.list_drives) {
924  char ** device_list = cdio_get_devices_ret(&driver_id);
925  char ** d = device_list;
926 
927  printf("list of devices found:\n");
928  if (NULL != d) {
929  for ( ; *d != NULL ; d++ ) {
930  CdIo_t *p_cdio_d = cdio_open(*d, driver_id);
931  cdio_hwinfo_t hwinfo;
932  printf("Drive %s\n", *d);
933  if (mmc_get_hwinfo(p_cdio_d, &hwinfo)) {
934  printf("%-8s: %s\n%-8s: %s\n%-8s: %s\n",
935  "Vendor" , hwinfo.psz_vendor,
936  "Model" , hwinfo.psz_model,
937  "Revision", hwinfo.psz_revision);
938  }
939  if (p_cdio_d) cdio_destroy(p_cdio_d);
940  }
941  }
942  cdio_free_device_list(device_list);
943  }
944 
945  report(stdout, STRONG "\n");
946 
947 
948  discmode = cdio_get_discmode(p_cdio);
949  if ( 0 == opts.no_disc_mode ) {
950  printf("Disc mode is listed as: %s\n",
951  discmode2str[discmode]);
952  }
953 
954  if (cdio_is_discmode_dvd(discmode) && !opts.show_dvd) {
955  printf("No further information currently given for DVDs.\n");
956  printf("Use --dvd to override.\n");
957  myexit(p_cdio, EXIT_SUCCESS);
958  }
959 
960  i_first_track = cdio_get_first_track_num(p_cdio);
961 
962  if (CDIO_INVALID_TRACK == i_first_track) {
963  err_exit("Can't get first track number. I give up%s.\n", "");
964  }
965 
966  i_tracks = cdio_get_num_tracks(p_cdio);
967 
968  if (CDIO_INVALID_TRACK == i_tracks) {
969  err_exit("Can't get number of tracks. I give up.%s\n", "");
970  }
971 
972  if (!opts.no_tracks) {
973  printf("CD-ROM Track List (%i - %i)\n" NORMAL,
974  i_first_track, i_first_track + i_tracks - 1);
975 
976  printf(" #: MSF LSN Type Green? Copy?");
977  if ( CDIO_DISC_MODE_CD_DA == discmode
978  || CDIO_DISC_MODE_CD_MIXED == discmode )
979  printf(" Channels Premphasis?");
980  printf("\n");
981  }
982 
983  start_track_lsn = cdio_get_track_lsn(p_cdio, i_first_track);
984 
985  /* Read and possibly print track information. */
986  for (i = i_first_track; i <= CDIO_CDROM_LEADOUT_TRACK; i++) {
987  msf_t msf;
988  char *psz_msf;
989  track_format_t track_format;
990 
991  if (!cdio_get_track_msf(p_cdio, i, &msf)) {
992  err_exit("cdio_track_msf for track %i failed, I give up.\n", i);
993  }
994 
995  track_format = cdio_get_track_format(p_cdio, i);
996  psz_msf = cdio_msf_to_str(&msf);
997  if (i == CDIO_CDROM_LEADOUT_TRACK) {
998  if (!opts.no_tracks) {
999  lsn_t lsn= cdio_msf_to_lsn(&msf);
1000  long unsigned int i_bytes_raw = lsn * CDIO_CD_FRAMESIZE_RAW;
1001  long unsigned int i_bytes_formatted = lsn - start_track_lsn;
1002 
1003  printf( "%3d: %8s %06lu leadout ", (int) i, psz_msf,
1004  (long unsigned int) lsn );
1005 
1006  switch (discmode) {
1009  case CDIO_DISC_MODE_DVD_R:
1010  case CDIO_DISC_MODE_DVD_RW:
1011  case CDIO_DISC_MODE_DVD_PR:
1015  i_bytes_formatted *= CDIO_CD_FRAMESIZE;
1016  break;
1017  case CDIO_DISC_MODE_CD_DA:
1018  i_bytes_formatted *= CDIO_CD_FRAMESIZE_RAW;
1019  break;
1020  case CDIO_DISC_MODE_CD_XA:
1022  i_bytes_formatted *= CDIO_CD_FRAMESIZE_RAW0;
1023  break;
1024  default:
1025  i_bytes_formatted *= CDIO_CD_FRAMESIZE_RAW;
1026  }
1027 
1028  if (i_bytes_raw < 1024)
1029  printf( "(%lu bytes", i_bytes_raw );
1030  if (i_bytes_raw < 1024 * 1024)
1031  printf( "(%lu KB", i_bytes_raw / 1024 );
1032  else
1033  printf( "(%lu MB", i_bytes_raw / (1024 * 1024) );
1034 
1035  printf(" raw, ");
1036  if (i_bytes_formatted < 1024)
1037  printf( "%lu bytes", i_bytes_formatted );
1038  if (i_bytes_formatted < 1024 * 1024)
1039  printf( "%lu KB", i_bytes_formatted / 1024 );
1040  else
1041  printf( "%lu MB", i_bytes_formatted / (1024 * 1024) );
1042 
1043  printf(" formatted)\n");
1044 
1045  }
1046  free(psz_msf);
1047  break;
1048  } else if (!opts.no_tracks) {
1049  const char *psz;
1050  printf( "%3d: %8s %06lu %-6s %-5s ", (int) i, psz_msf,
1051  (long unsigned int) cdio_msf_to_lsn(&msf),
1052  track_format2str[track_format],
1053  cdio_get_track_green(p_cdio, i)? "true " : "false");
1054 
1055  switch (cdio_get_track_copy_permit(p_cdio, i)) {
1056  case CDIO_TRACK_FLAG_FALSE:
1057  psz="no";
1058  break;
1059  case CDIO_TRACK_FLAG_TRUE:
1060  psz="yes";
1061  break;
1063  psz="?";
1064  break;
1065  case CDIO_TRACK_FLAG_ERROR:
1066  default:
1067  psz="error";
1068  break;
1069  }
1070  printf("%-5s", psz);
1071 
1072  if (TRACK_FORMAT_AUDIO == track_format) {
1073  const int i_channels = cdio_get_track_channels(p_cdio, i);
1074  switch (cdio_get_track_preemphasis(p_cdio, i)) {
1075  case CDIO_TRACK_FLAG_FALSE:
1076  psz="no";
1077  break;
1078  case CDIO_TRACK_FLAG_TRUE:
1079  psz="yes";
1080  break;
1082  psz="?";
1083  break;
1084  case CDIO_TRACK_FLAG_ERROR:
1085  default:
1086  psz="error";
1087  break;
1088  }
1089  if (i_channels == -2)
1090  printf(" %-8s", "unknown");
1091  else if (i_channels == -1)
1092  printf(" %-8s", "error");
1093  else
1094  printf(" %-8d", i_channels);
1095  printf( " %s", psz);
1096  }
1097 
1098  printf( "\n" );
1099 
1100  }
1101  free(psz_msf);
1102 
1103  if (TRACK_FORMAT_AUDIO == track_format) {
1104  num_audio++;
1105  if (-1 == first_audio) first_audio = i;
1106  } else {
1107  num_data++;
1108  if (-1 == first_data) first_data = i;
1109  }
1110  /* skip to leadout */
1111  if (i == i_first_track + i_tracks - 1) {
1113  }
1114  }
1115 
1116  if (cdio_is_discmode_cdrom(discmode)) {
1117  /* get and print MCN */
1118 
1119  report(stdout, "Media Catalog Number (MCN): "); fflush(stdout);
1120 
1121  media_catalog_number = cdio_get_mcn(p_cdio);
1122 
1123  if (NULL == media_catalog_number) {
1124  if (i_read_cap & CDIO_DRIVE_CAP_READ_MCN)
1125  report(stdout, "not available\n");
1126  else
1127  report(stdout, "not supported by drive/driver\n");
1128  } else {
1129  report(stdout, "%s\n", media_catalog_number);
1130  cdio_free(media_catalog_number);
1131  }
1132 
1133  /* get and print track ISRCs */
1134 
1135  if (i_read_cap & CDIO_DRIVE_CAP_READ_ISRC) {
1136  for (i = first_audio; i < first_audio + num_audio; i++) {
1137  isrc = cdio_get_track_isrc(p_cdio, i);
1138 
1139  if (NULL != isrc) {
1140  report(stdout, "TRACK %2d ISRC: %s\n", i, isrc); fflush(stdout);
1141  cdio_free(isrc);
1142  }
1143  }
1144  }
1145 
1146  /* List number of sessions */
1147  {
1148  lsn_t i_last_session;
1149  report(stdout, "Last CD Session LSN: "); fflush(stdout);
1150  if (DRIVER_OP_SUCCESS == cdio_get_last_session(p_cdio, &i_last_session))
1151  {
1152  report(stdout, "%d\n", i_last_session);
1153  } else {
1154  if (i_misc_cap & CDIO_DRIVE_CAP_MISC_MULTI_SESSION)
1155  report(stdout, "failed\n");
1156  else
1157  report(stdout, "not supported by drive/driver\n");
1158  }
1159  }
1160 
1161  /* get audio status from subchannel */
1162  if ( CDIO_DISC_MODE_CD_DA == discmode ||
1163  CDIO_DISC_MODE_CD_MIXED == discmode ) {
1164  cdio_subchannel_t subchannel;
1166 
1167  memset(&subchannel, 0, sizeof(subchannel));
1168  report( stdout, "audio status: "); fflush(stdout);
1169 
1170  rc = cdio_audio_read_subchannel(p_cdio, &subchannel);
1171 
1172  if (DRIVER_OP_SUCCESS == rc) {
1173  bool b_volume = false;
1174  bool b_position = false;
1175 
1176  report ( stdout, "%s\n",
1177  mmc_audio_state2str(subchannel.audio_status) );
1178 
1179  switch (subchannel.audio_status) {
1181  b_playing_audio = true;
1182  /* Fall through to next case. */
1184  b_position = true;
1185  /* Fall through to next case. */
1187  b_volume = true;
1188  break;
1189  default:
1190  ;
1191  }
1192 
1193  if (b_position)
1194  report( stdout, " at: %02d:%02d abs / %02d:%02d track %d\n",
1195  subchannel.abs_addr.m,
1196  subchannel.abs_addr.s,
1197  subchannel.rel_addr.m,
1198  subchannel.rel_addr.s,
1199  subchannel.track );
1200 
1201  if (b_volume) {
1202  cdio_audio_volume_t volume;
1203 
1204  if (DRIVER_OP_SUCCESS == cdio_audio_get_volume (p_cdio, &volume)) {
1205  uint8_t j=0;
1206  for (j=0; j<4; j++) {
1207  uint8_t i_level = volume.level[j];
1208  report( stdout,
1209  "volume level port %d: %3d (0..255) %3d (0..100)\n",
1210  j, i_level, (i_level*100+128) / 256 );
1211  }
1212 
1213  } else
1214  report( stdout, " can't get volume levels\n" );
1215  }
1216  } else if (DRIVER_OP_UNSUPPORTED == rc) {
1217  report( stdout, "not implemented\n" );
1218  } else {
1219  report( stdout, "FAILED\n" );
1220  }
1221  }
1222  }
1223 
1224  if (!opts.no_analysis) {
1225  if (b_playing_audio) {
1226  /* Running a CD Analysis would mess up audio playback.*/
1227  report(stdout,
1228  "CD Analysis Report omitted because audio is currently "
1229  "playing.\n");
1230  myexit(p_cdio, EXIT_SUCCESS);
1231  }
1232 
1233  report(stdout, STRONG "CD Analysis Report\n" NORMAL);
1234 
1235  /* try to find out what sort of CD we have */
1236  if (num_audio > 0) {
1237  /* may be a "real" audio CD or hidden track CD */
1238 
1239  msf_t msf;
1240  cdio_get_track_msf(p_cdio, i_first_track, &msf);
1241 
1242  /* CD-I/Ready says start_track_lsn <= 30*75 then CDDA */
1243  if (start_track_lsn > 100 /* 100 is just a guess */) {
1244  fs = cdio_guess_cd_type(p_cdio, 0, 1, &cdio_iso_analysis);
1245  if ((CDIO_FSTYPE(fs)) != CDIO_FS_UNKNOWN)
1247  else {
1248  fs &= ~CDIO_FS_MASK; /* del filesystem info */
1249  report( stdout, "Oops: %lu unused sectors at start, "
1250  "but hidden track check failed.\n",
1251  (long unsigned int) start_track_lsn);
1252  }
1253  }
1254  print_analysis(ms_offset, cdio_iso_analysis, fs, first_data, num_audio,
1255  i_tracks, i_first_track,
1256  cdio_get_track_format(p_cdio, 1), p_cdio);
1257  }
1258  if (num_data > 0) {
1259  /* we have data track(s) */
1260  int j;
1261 
1262  for (j = 2, i = first_data; i <= i_tracks; i++) {
1263  msf_t msf;
1264  track_format_t track_format = cdio_get_track_format(p_cdio, i);
1265 
1266  cdio_get_track_msf(p_cdio, i, &msf);
1267 
1268  switch ( track_format ) {
1269  case TRACK_FORMAT_AUDIO:
1270  case TRACK_FORMAT_ERROR:
1271  break;
1272  case TRACK_FORMAT_CDI:
1273  case TRACK_FORMAT_XA:
1274  case TRACK_FORMAT_DATA:
1275  case TRACK_FORMAT_PSX:
1276  ;
1277  }
1278 
1279  start_track_lsn = (i == 1) ? 0 : cdio_msf_to_lsn(&msf);
1280 
1281  /* save the start of the data area */
1282  if (i == first_data)
1283  data_start = start_track_lsn;
1284 
1285  /* skip tracks which belong to the current walked session */
1286  if (start_track_lsn < data_start + cdio_iso_analysis.isofs_size)
1287  continue;
1288 
1289  fs = cdio_guess_cd_type(p_cdio, start_track_lsn, i,
1290  &cdio_iso_analysis);
1291 
1292  if (i > 1) {
1293  /* track is beyond last session -> new session found */
1294  ms_offset = start_track_lsn;
1295  report( stdout, "session #%d starts at track %2i, LSN: %lu,"
1296  " ISO 9660 blocks: %6i\n",
1297  j++, i, (unsigned long int) start_track_lsn,
1298  cdio_iso_analysis.isofs_size);
1299  report( stdout, "ISO 9660: %i blocks, label `%.32s'\n",
1300  cdio_iso_analysis.isofs_size, cdio_iso_analysis.iso_label);
1302  } else {
1303  print_analysis(ms_offset, cdio_iso_analysis, fs, first_data,
1304  num_audio, i_tracks, i_first_track,
1305  track_format, p_cdio);
1306  }
1307 
1308  if ( !(CDIO_FSTYPE(fs) == CDIO_FS_ISO_9660 ||
1309  CDIO_FSTYPE(fs) == CDIO_FS_ISO_HFS ||
1310  /* CDIO_FSTYPE(fs) == CDIO_FS_ISO_9660_INTERACTIVE)
1311  && (fs & XA))) */
1313  /* no method for non-ISO9660 multisessions */
1314  break;
1315  }
1316  }
1317  }
1318 
1319  myexit(p_cdio, EXIT_SUCCESS);
1320  /* Not reached:*/
1321  return(EXIT_SUCCESS);
1322 }
CDIO_FS_ANAL_CVD
Definition: cd_types.h:106
iso9660_filelist_free
void iso9660_filelist_free(CdioISO9660FileList_t *p_filelist)
Definition: iso9660_fs.c:1700
iso9660_get_system_id
char * iso9660_get_system_id(const iso9660_pvd_t *p_pvd)
Definition: iso9660.c:1247
cdio_free_device_list
void cdio_free_device_list(char *device_list[])
Definition: device.c:477
CDIO_DISC_MODE_DVD_RW
Definition: disc.h:45
cddb_opts_s::port
int port
Definition: cddb.h:24
myexit
void myexit(CdIo_t *cdio, int rc)
Definition: util.c:43
iso_rock_statbuf_s::b3_rock
bool_3way_t b3_rock
Definition: rock.h:283
OP_SOURCE_CDRDAO
Definition: cd-info.c:117
CDIO_FS_ISO_UDF
Definition: cd_types.h:75
CDIO_FS_ISO_9660
Definition: cd_types.h:41
CDIO_FS_ISO_9660_INTERACTIVE
Definition: cd_types.h:57
cddb_opts_s::cachedir
char * cachedir
Definition: cddb.h:28
cdio_audio_volume_s::level
uint8_t level[4]
Definition: audio.h:49
CDIO_TRACK_FLAG_TRUE
Definition: track.h:44
genre
static char genre[40]
Definition: cdda-player.c:151
init
static void init(void)
Definition: cd-info.c:790
discmode2str
const char * discmode2str[]
Definition: disc.c:34
iso9660_dirlist_free
void iso9660_dirlist_free(CdioISO9660DirList_t *p_filelist)
Definition: iso9660_fs.c:1708
driver_id
static driver_id_t driver_id
Definition: cdda-player.c:94
cdtext_get_const
const char * cdtext_get_const(const cdtext_t *p_cdtext, cdtext_field_t field, track_t track)
Definition: cdtext.c:289
cddb_opts_s::email
char * email
Definition: cddb.h:22
opts_s::no_header
int no_header
Definition: cd-info.c:100
rc
int rc
Definition: cdinfo-linux.c:193
TRACK_FORMAT_XA
Definition: track.h:34
iso9660_get_volume_id
char * iso9660_get_volume_id(const iso9660_pvd_t *p_pvd)
Definition: iso9660.c:1257
OP_SOURCE_AUTO
Definition: cd-info.c:114
opts
static struct opts_s opts
cddb_opts_s::server
char * server
Definition: cddb.h:23
cdio_subchannel_s::abs_addr
msf_t abs_addr
Definition: audio.h:42
OP_USAGE
Definition: cd-info.c:127
cdio_get_num_tracks
track_t cdio_get_num_tracks(const CdIo_t *p_cdio)
Definition: track.c:156
opts_s::no_vcd
int no_vcd
Definition: cd-info.c:93
iso9660_get_application_id
char * iso9660_get_application_id(iso9660_pvd_t *p_pvd)
Definition: iso9660.c:1136
iso9660_get_preparer_id
char * iso9660_get_preparer_id(const iso9660_pvd_t *p_pvd)
Definition: iso9660.c:1225
CDIO_DISC_MODE_CD_MIXED
Definition: disc.h:41
sub
struct cdrom_subchnl sub
Definition: cdinfo-linux.c:210
iso9660_fs_read_superblock
bool iso9660_fs_read_superblock(CdIo_t *p_cdio, iso_extension_mask_t iso_extension_mask)
Definition: iso9660_fs.c:647
CDIO_MMC_READ_SUB_ST_PLAY
Definition: mmc.h:279
print_version
static void print_version(void)
Definition: cdinfo-linux.c:296
getopt.h
_CdioListNode
Definition: ds.c:44
CDIO_TRACK_FLAG_FALSE
Definition: track.h:43
lsn_t
int32_t lsn_t
Definition: types.h:266
driver_return_code_t
driver_return_code_t
Definition: device.h:205
cdio_get_track_channels
int cdio_get_track_channels(const CdIo_t *p_cdio, track_t i_track)
Definition: track.c:90
CDIO_FS_ISO_HFS
Definition: cd_types.h:56
iso_rock_statbuf_s::i_symlink
int i_symlink
Definition: rock.h:292
INPUT_UNKNOWN
Definition: util.h:108
OP_CDDB_EMAIL
Definition: cd-info.c:123
cdio_get_mcn
char * cdio_get_mcn(const CdIo_t *p_cdio)
Definition: disc.c:129
CDIO_FS_ANAL_PHOTO_CD
Definition: cd_types.h:95
cdio_iso_analysis_t
The type used to return analysis information from cdio_guess_cd_type.
Definition: cd_types.h:133
OP_CDDB_NOCACHE
Definition: cd-info.c:124
cdio_hwinfo::psz_model
char psz_model[CDIO_MMC_HW_MODEL_LEN+1]
Definition: device.h:125
EXIT_INFO
#define EXIT_INFO
Definition: util.h:84
iso9660_stat_s
Unix stat-like version of iso9660_dir.
Definition: iso9660.h:530
cdio_open
CdIo_t * cdio_open(const char *psz_source, driver_id_t driver_id)
Definition: device.c:930
EXIT_SUCCESS
#define EXIT_SUCCESS
Definition: cdinfo-linux.c:74
CDIO_FS_ANAL_SVCD
Definition: cd_types.h:105
opts_s::version_only
int version_only
Definition: cd-info.c:98
cdtext_list_languages_v2
cdtext_lang_t * cdtext_list_languages_v2(cdtext_t *p_cdtext)
Definition: cdtext.c:411
cdtext_genre_t
cdtext_genre_t
Enumeration of possible genre codes.
Definition: cdtext.h:62
cddb.h
cdio_hwinfo::psz_revision
char psz_revision[CDIO_MMC_HW_REVISION_LEN+1]
Definition: device.h:126
cdio_subchannel_s::audio_status
uint8_t audio_status
Definition: audio.h:37
DRIVER_DEVICE
Definition: device.h:169
iso9660_get_publisher_id
char * iso9660_get_publisher_id(const iso9660_pvd_t *p_pvd)
Definition: iso9660.c:1236
CDIO_CD_FRAMESIZE_RAW
Definition: sector.h:118
MAX_CDTEXT_FIELDS
#define MAX_CDTEXT_FIELDS
Definition: cdtext.h:38
track_t
uint8_t track_t
Definition: types.h:276
print_fs_attrs
void print_fs_attrs(iso9660_stat_t *p_statbuf, bool b_rock, bool b_xa, const char *psz_name_untranslated, const char *psz_name_translated)
CDIO_FS_3DO
Definition: cd_types.h:66
cdio_msf_to_lsn
lsn_t cdio_msf_to_lsn(const msf_t *p_msf)
Definition: sector.c:157
CDIO_DRIVE_CAP_READ_MCN
Definition: device.h:82
open_input
CdIo_t * open_input(const char *psz_source, source_image_t source_image, const char *psz_access_mode)
INPUT_CDRDAO
Definition: util.h:107
OP_SOURCE_UNDEF
Definition: cd-info.c:113
num_data
int num_data
Definition: cdinfo-linux.c:212
OP_SOURCE_CUE
Definition: cd-info.c:116
DRIVER_OP_UNSUPPORTED
Definition: device.h:212
OP_CDDB_CACHE
Definition: cd-info.c:122
cddb_opts_s::timeout
int timeout
Definition: cddb.h:26
TRACK_FORMAT_PSX
Definition: track.h:36
CDIO_DISC_MODE_DVD_RAM
Definition: disc.h:43
first_audio
int first_audio
Definition: cdinfo-linux.c:213
print_cdtext_track_info
static void print_cdtext_track_info(cdtext_t *p_cdtext, track_t i_track, const char *psz_msg)
Definition: cd-info.c:424
cdio_is_discmode_cdrom
bool cdio_is_discmode_cdrom(discmode_t discmode)
Definition: disc.c:139
iso9660_get_volumeset_id
char * iso9660_get_volumeset_id(const iso9660_pvd_t *p_pvd)
Definition: iso9660.c:1268
INPUT_NRG
Definition: util.h:106
CDIO_DISC_MODE_DVD_R
Definition: disc.h:44
_CdIo
Definition: cdio_private.h:472
EXIT_FAILURE
#define EXIT_FAILURE
Definition: cdinfo-linux.c:70
print_cdtext_info
static void print_cdtext_info(CdIo_t *p_cdio, track_t i_tracks, track_t i_first_track)
Definition: cd-info.c:440
opts_s
Definition: cd-info.c:86
iso9660_stat_s::filename
char filename[0]
Definition: iso9660.h:542
CDIO_LOG_INFO
Definition: logging.h:38
iso9660_fs_readdir
CdioList_t * iso9660_fs_readdir(CdIo_t *p_cdio, const char psz_path[])
Definition: iso9660_fs.c:1354
CDTEXT_LANGUAGE_BLOCK_UNUSED
Definition: cdtext.h:209
cdio_destroy
void cdio_destroy(CdIo_t *p_cdio)
Definition: device.c:361
CDIO_FS_UNKNOWN
#define CDIO_FS_UNKNOWN
Definition: cd_types.h:119
cdio_log_level_t
cdio_log_level_t
Definition: logging.h:36
i_last_track
static track_t i_last_track
Definition: cdda-player.c:99
INPUT_BIN
Definition: util.h:104
cddb_opts_s::disable_cache
bool disable_cache
Definition: cddb.h:27
CDIO_FS_ANAL_XA
Definition: cd_types.h:93
i
int i
Definition: cdinfo-linux.c:194
cdio_get_arg
const char * cdio_get_arg(const CdIo_t *p_cdio, const char key[])
CdioISO9660FileList_t
PRAGMA_END_PACKED typedef CdioList_t CdioISO9660FileList_t
A data type for a list of ISO9660 statbuf file pointers returned from the various Cdio iso9660 readdi...
Definition: iso9660.h:513
CDIO_FS_ANAL_CDTV
Definition: cd_types.h:98
CDIO_FS_ANAL_ROCKRIDGE
Definition: cd_types.h:101
STRONG
#define STRONG
Definition: cd-info.c:75
cdio_get_drive_cap
void cdio_get_drive_cap(const CdIo_t *p_cdio, cdio_drive_read_cap_t *p_read_cap, cdio_drive_write_cap_t *p_write_cap, cdio_drive_misc_cap_t *p_misc_cap)
Definition: device.c:701
discmode_t
discmode_t
Definition: disc.h:37
cdio_get_track_preemphasis
track_flag_t cdio_get_track_preemphasis(const CdIo_t *p_cdio, track_t i_track)
cdio_get_track_isrc
char * cdio_get_track_isrc(const CdIo_t *p_cdio, track_t i_track)
Definition: track.c:301
CDIO_FS_UDF
Definition: cd_types.h:74
print_drive_capabilities
void print_drive_capabilities(cdio_drive_read_cap_t p_read_cap, cdio_drive_write_cap_t p_write_cap, cdio_drive_misc_cap_t p_misc_cap)
ISO_EXTENSION_JOLIET
#define ISO_EXTENSION_JOLIET
Definition: iso9660.h:565
iso9660_name_translate_ext
int iso9660_name_translate_ext(const char *psz_oldname, char *psz_newname, uint8_t i_joliet_level)
Definition: iso9660.c:449
INPUT_AUTO
Definition: util.h:102
opts_s::no_joliet
int no_joliet
Definition: cd-info.c:101
print_iso9660_fs
static void print_iso9660_fs(CdIo_t *p_cdio, cdio_fs_anal_t fs, track_format_t track_format)
Definition: cd-info.c:627
cdio_get_track_lsn
lsn_t cdio_get_track_lsn(const CdIo_t *p_cdio, track_t i_track)
Definition: track.c:267
cdio_get_last_session
driver_return_code_t cdio_get_last_session(CdIo_t *p_cdio, lsn_t *i_last_session)
Definition: device.c:801
CDIO_FS_UDFX
Definition: cd_types.h:73
INPUT_DEVICE
Definition: util.h:103
cdtext_genre2str
const char * cdtext_genre2str(cdtext_genre_t i)
Definition: cdtext.c:215
cdio_hwinfo::psz_vendor
char psz_vendor[CDIO_MMC_HW_VENDOR_LEN+1]
Definition: device.h:124
cdtext_get_genre
cdtext_genre_t cdtext_get_genre(const cdtext_t *p_cdtext)
Definition: cdtext.c:305
cdio_get_cdtext
cdtext_t * cdio_get_cdtext(CdIo_t *p_cdio)
CDIO_DISC_MODE_DVD_OTHER
Definition: disc.h:53
CDIO_DRIVE_CAP_MISC_MULTI_SESSION
Definition: device.h:59
NULL
#define NULL
Definition: types.h:184
CDIO_FS_MASK
Definition: cd_types.h:90
cdio_iso_analysis_t::UDFVerMajor
uint8_t UDFVerMajor
Definition: cd_types.h:141
parse_source
static void parse_source(int opt)
Definition: cd-info.c:136
CDIO_DISC_MODE_CD_DA
Definition: disc.h:38
num_audio
int num_audio
Definition: cdinfo-linux.c:214
track_format2str
const char * track_format2str[6]
Definition: track.c:34
cdio_iso_analysis_t::isofs_size
unsigned int isofs_size
Definition: cd_types.h:139
OP_SOURCE_NRG
Definition: cd-info.c:118
cdio_loglevel_default
cdio_log_level_t cdio_loglevel_default
Definition: logging.c:40
getopt_long
int getopt_long(int ___argc, char *const *___argv, const char *__shortopts, const struct option *__longopts, int *__longind)
Definition: getopt1.c:62
cdio_guess_cd_type
cdio_fs_anal_t cdio_guess_cd_type(const CdIo_t *cdio, int start_session, track_t track_num, cdio_iso_analysis_t *iso_analysis)
Definition: cd_types.c:223
opts_s::access_mode
char * access_mode
Definition: cd-info.c:91
iso9660_fs_read_pvd
bool iso9660_fs_read_pvd(const CdIo_t *p_cdio, iso9660_pvd_t *p_pvd)
Definition: iso9660_fs.c:617
CDIO_FS_ANAL_BOOTABLE
Definition: cd_types.h:99
util.h
Miscellaneous utility functions.
j
int j
Definition: cdinfo-linux.c:194
CDIO_FS_ANAL_JOLIET
Definition: cd_types.h:103
cdtext_field2str
const char * cdtext_field2str(cdtext_field_t i)
Definition: cdtext.c:203
mmc_get_hwinfo
bool mmc_get_hwinfo(const CdIo_t *p_cdio, cdio_hwinfo_t *p_hw_info)
Definition: mmc.c:927
opts_s::silent
int silent
Definition: cd-info.c:99
opts_s::debug_level
uint32_t debug_level
Definition: cd-info.c:97
_CdioList
Definition: ds.c:36
track_format_t
track_format_t
Definition: track.h:31
cdio_get_driver_id
driver_id_t cdio_get_driver_id(const CdIo_t *p_cdio)
Definition: device.c:771
TRACK_FORMAT_DATA
Definition: track.h:35
cdio_is_discmode_dvd
bool cdio_is_discmode_dvd(discmode_t discmode)
Definition: disc.c:154
opts_s::print_iso9660
int print_iso9660
Definition: cd-info.c:104
CDIO_DISC_MODE_CD_DATA
Definition: disc.h:39
cdtext.h
The top-level header for CD-Text information. Applications include this for CD-Text access.
cdtext_set_language_index
bool cdtext_set_language_index(cdtext_t *p_cdtext, int idx)
Definition: cdtext.c:435
OP_CDDB_TIMEOUT
Definition: cd-info.c:125
report
void report(FILE *stream, const char *psz_format,...)
yep
Definition: types.h:238
optional_argument
#define optional_argument
Definition: getopt.h:131
parse_options
static bool parse_options(int argc, char *argv[])
Definition: cd-info.c:184
opts_s::no_rock_ridge
int no_rock_ridge
Definition: cd-info.c:103
print_iso9660_recurse
static void print_iso9660_recurse(CdIo_t *p_cdio, const char pathname[], cdio_fs_anal_t fs)
Definition: cd-info.c:546
CDIO_FS_ANAL_HIDDEN_TRACK
Definition: cd_types.h:96
cdio_audio_get_volume
driver_return_code_t cdio_audio_get_volume(CdIo_t *p_cdio, cdio_audio_volume_t *p_volume)
Definition: audio.c:45
_cdio_list_append
void _cdio_list_append(CdioList_t *p_list, void *p_data)
Definition: ds.c:102
CDIO_DISC_MODE_NO_INFO
Definition: disc.h:54
OP_SOURCE_DEVICE
Definition: cd-info.c:119
err_exit
#define err_exit(fmt, args...)
Definition: cdinfo-linux.c:97
iso9660_dirlist_new
CdioISO9660DirList_t * iso9660_dirlist_new(void)
Definition: iso9660_fs.c:1511
cdio_free
void cdio_free(void *p_memory)
Definition: memory.c:37
source_image_t
source_image_t
Definition: util.h:100
ms
struct cdrom_multisession ms
Definition: cdinfo-linux.c:209
cdio_get_track_format
track_format_t cdio_get_track_format(const CdIo_t *p_cdio, track_t i_track)
Definition: track.c:127
msf_s
MSF (minute/second/frame) structure.
Definition: types.h:219
TRACK_FORMAT_CDI
Definition: track.h:33
cdtext_lang2str
const char * cdtext_lang2str(cdtext_lang_t i)
Definition: cdtext.c:227
iso9660_stat_s::rr
iso_rock_statbuf_t rr
Definition: iso9660.h:532
program_name
char * program_name
Definition: cdinfo-linux.c:218
cdio_subchannel_s::track
uint8_t track
Definition: audio.h:40
OP_SOURCE_BIN
Definition: cd-info.c:115
mmc.h
Common definitions for MMC (Multimedia Commands). Applications include this for direct MMC access.
msf_s::s
uint8_t s
Definition: types.h:220
CDIO_FS_AUDIO
Definition: cd_types.h:38
CDIO_FS_HIGH_SIERRA
Definition: cd_types.h:40
cdio_get_track_green
bool cdio_get_track_green(const CdIo_t *p_cdio, track_t i_track)
Definition: track.c:220
cdio_hwinfo
Structure to return CD vendor, model, and revision-level strings obtained via the INQUIRY command
Definition: device.h:122
_log_handler
static void _log_handler(cdio_log_level_t level, const char message[])
Definition: cd-info.c:394
ISO_EXTENSION_ALL
#define ISO_EXTENSION_ALL
Definition: iso9660.h:563
opts_s::no_disc_mode
int no_disc_mode
Definition: cd-info.c:96
option
Definition: getopt.h:117
opts_s::show_dvd
int show_dvd
Definition: cd-info.c:94
cdio_msf_to_str
char * cdio_msf_to_str(const msf_t *p_msf)
Definition: sector.c:166
CDIO_TRACK_FLAG_ERROR
Definition: track.h:45
CDIO_TRACK_FLAG_UNKNOWN
Definition: track.h:46
iso9660.h
The top-level interface header for libiso9660: the ISO-9660 filesystem library; applications include ...
mmc_audio_state2str
const char * mmc_audio_state2str(uint8_t i_audio_state)
Definition: mmc_util.c:86
cdio_get_first_track_num
track_t cdio_get_first_track_num(const CdIo_t *p_cdio)
Definition: track.c:47
CDIO_FSTYPE
#define CDIO_FSTYPE(fs)
Definition: cd_types.h:82
NORMAL
#define NORMAL
Definition: cd-info.c:76
cdio_get_hwinfo
bool cdio_get_hwinfo(const CdIo_t *p_cdio, cdio_hwinfo_t *p_hw_info)
Definition: device.c:783
CDIO_MMC_READ_SUB_ST_PAUSED
Definition: mmc.h:281
CDIO_DISC_MODE_CD_XA
Definition: disc.h:40
CDIO_INVALID_TRACK
Definition: track.h:79
INPUT_CUE
Definition: util.h:105
CDIO_FS_HFS
Definition: cd_types.h:43
optind
int optind
Definition: getopt.c:122
CDIO_MMC_READ_SUB_ST_NO_STATUS
Definition: mmc.h:286
print_analysis
static void print_analysis(int ms_offset, cdio_iso_analysis_t cdio_iso_analysis, cdio_fs_anal_t fs, int first_data, unsigned int num_audio, track_t i_tracks, track_t i_first_track, track_format_t track_format, CdIo_t *p_cdio)
Definition: cd-info.c:652
cddb_opts_s::http
int http
Definition: cddb.h:25
OP_VERSION
Definition: cd-info.c:130
iso_extension_mask_t
uint8_t iso_extension_mask_t
Definition: iso9660.h:547
opts_s::list_drives
int list_drives
Definition: cd-info.c:105
CDIO_FS_XISO
Definition: cd_types.h:72
cdio_get_driver_name
const char * cdio_get_driver_name(const CdIo_t *p_cdio)
Definition: device.c:748
_cdio_list_node_data
void * _cdio_list_node_data(CdioListNode_t *p_node)
Definition: ds.c:237
cddb_opts
cddb_opts_t cddb_opts
Definition: cddb.c:27
cdio_audio_read_subchannel
driver_return_code_t cdio_audio_read_subchannel(CdIo_t *p_cdio, cdio_subchannel_t *p_subchannel)
Definition: audio.c:115
CDIO_LOG_DEBUG
Definition: logging.h:37
opts_s::no_device
int no_device
Definition: cd-info.c:95
CDIO_FS_UFS
Definition: cd_types.h:46
CDIO_VERSION
#define CDIO_VERSION
Definition: version.h:10
ms_offset
int ms_offset
Definition: cdinfo-linux.c:197
CDIO_FS_INTERACTIVE
Definition: cd_types.h:42
cdio_iso_analysis_t::joliet_level
unsigned int joliet_level
Definition: cd_types.h:135
cdio_get_track_msf
bool cdio_get_track_msf(const CdIo_t *p_cdio, track_t i_track, msf_t *msf)
Definition: track.c:376
opts_s::no_analysis
int no_analysis
Definition: cd-info.c:90
cdio_subchannel_s::rel_addr
msf_t rel_addr
Definition: audio.h:43
CDIO_FS_EXT2
Definition: cd_types.h:54
cdtext_lang_t
cdtext_lang_t
Enumeration of possible CD-TEXT languages.
Definition: cdtext.h:101
CDIO_CD_FRAMESIZE_RAW0
Definition: sector.h:122
CDIO_FS_ANAL_MULTISESSION
Definition: cd_types.h:94
opts_s::no_ioctl
int no_ioctl
Definition: cd-info.c:89
cdio_log_set_handler
cdio_log_handler_t cdio_log_set_handler(cdio_log_handler_t new_handler)
Definition: logging.c:87
CDIO_CDROM_LEADOUT_TRACK
Definition: track.h:78
cdio_get_devices_ret
char ** cdio_get_devices_ret(driver_id_t *p_driver_id)
Definition: device.c:567
gl_default_cdio_log_handler
cdio_log_handler_t gl_default_cdio_log_handler
Definition: util.c:38
iso9660_pvd_s
ISO-9660 Primary Volume Descriptor.
Definition: iso9660.h:291
cdio_drive_write_cap_t
uint32_t cdio_drive_write_cap_t
Definition: device.h:37
first_data
int first_data
Definition: cdinfo-linux.c:211
cdio_iso_analysis_t::iso_label
char iso_label[33]
Definition: cd_types.h:137
iso_rock_statbuf_s::psz_symlink
char * psz_symlink
Definition: rock.h:294
data_start
int data_start
Definition: cdinfo-linux.c:198
DRIVER_OP_SUCCESS
Definition: device.h:206
cddb_discid
uint32_t cddb_discid(CdIo_t *p_cdio, track_t i_tracks)
Definition: cddb.c:52
CDIO_CD_FRAMESIZE
Definition: sector.h:116
iso9660_stat_s::type
enum iso9660_stat_s::@12 type
fillout_device_name
char * fillout_device_name(const char *device_name)
msf_s::m
uint8_t m
Definition: types.h:220
optarg
char * optarg
Definition: getopt.c:107
CDIO_DISC_MODE_DVD_PRW
Definition: disc.h:50
TRACK_FORMAT_AUDIO
Definition: track.h:32
audio.h
The top-level header for CD audio-related libcdio calls. These control playing of the CD-ROM through ...
CDIO_FS_ANAL_VIDEOCD
Definition: cd_types.h:100
opts_s::no_xa
int no_xa
Definition: cd-info.c:102
no_argument
#define no_argument
Definition: getopt.h:129
CDTEXT_GENRE_UNUSED
Definition: cdtext.h:63
OP_CDDB_SERVER
Definition: cd-info.c:121
CDIO_DRIVE_CAP_READ_ISRC
Definition: device.h:83
source_name
char * source_name
Definition: util.c:39
cdio_get_track_copy_permit
track_flag_t cdio_get_track_copy_permit(const CdIo_t *p_cdio, track_t i_track)
Definition: track.c:114
cdtext_s
Definition: cdtext_private.h:127
main
int main(int argc, char *argv[])
Definition: cd-info.c:838
cdio_fs_anal_t
int cdio_fs_anal_t
Definition: types.h:322
required_argument
#define required_argument
Definition: getopt.h:130
cdio_drive_read_cap_t
uint32_t cdio_drive_read_cap_t
Definition: device.h:36
_CDIO_LIST_FOREACH
#define _CDIO_LIST_FOREACH(node, list)
Definition: ds.h:61
print_vd_info
#define print_vd_info(title, fn)
Definition: cd-info.c:643
ds.h
The top-level header for list-related data structures.
driver_id_t
driver_id_t
Definition: device.h:151
cdtext_field_t
cdtext_field_t
Enumeration of CD-TEXT text fields.
Definition: cdtext.h:44
cd_types.h
Header for routines which automatically determine the Compact Disc format and possibly filesystem on ...
cdio_drive_misc_cap_t
uint32_t cdio_drive_misc_cap_t
Definition: device.h:38
CDIO_DISC_MODE_DVD_ROM
Definition: disc.h:42
TRACK_FORMAT_ERROR
Definition: track.h:39
CDIO_LOG_WARN
Definition: logging.h:40
opts_s::no_tracks
int no_tracks
Definition: cd-info.c:88
cdio_get_discmode
discmode_t cdio_get_discmode(CdIo_t *p_cdio)
Definition: disc.c:112
cdio_get_joliet_level
uint8_t cdio_get_joliet_level(const CdIo_t *p_cdio)
Definition: track.c:141
cdio_assert.h
CDIO_DISC_MODE_DVD_PR
Definition: disc.h:49
bytesex.h
Generic Byte-swapping routines.
cdio_subchannel_s
Definition: audio.h:34
cdio_audio_volume_s
Definition: audio.h:47
cdio_iso_analysis_t::UDFVerMinor
uint8_t UDFVerMinor
Definition: cd_types.h:140
opts_s::source_image
source_image_t source_image
Definition: cd-info.c:106
opts_s::no_cddb
int no_cddb
Definition: cd-info.c:92
OP_HANDLED
Definition: cd-info.c:111