diff --git a/libburn/trunk/test/telltoc.c b/libburn/trunk/test/telltoc.c index b927b2b4..b4a4c33e 100644 --- a/libburn/trunk/test/telltoc.c +++ b/libburn/trunk/test/telltoc.c @@ -292,7 +292,7 @@ int telltoc_media(struct burn_drive *drive) min_speed = ((double ) ret) / speed_conv; ret= burn_drive_get_write_speed(drive); max_speed = ((double ) ret) / speed_conv; - printf("Media speed : max=%.1f , min=%.1f\n", + printf("Media speed : max=%.1f , min=%.1f\n", max_speed, min_speed); } printf("Speed unit 1x: %s\n", speed_unit); @@ -301,6 +301,35 @@ int telltoc_media(struct burn_drive *drive) } +int telltoc_speedlist(struct burn_drive *drive) +{ + int ret, has_modern_entries = 0; + struct burn_speed_descriptor *speed_list, *sd; + + ret = burn_drive_get_speedlist(drive, &speed_list); + if (ret <= 0) { + fprintf(stderr, "SORRY: Cannot obtain speed list info\n"); + return 2; + } + for (sd = speed_list; sd != NULL; sd = sd->next) + if (sd->source == 2) + has_modern_entries = 1; + for (sd = speed_list; sd != NULL; sd = sd->next) { + if (has_modern_entries && sd->source < 2) + continue; + if (sd->write_speed <= 0) + continue; + printf("Speed descr. : %d kB/s", sd->write_speed); + if (sd->end_lba >= 0) + printf(", %.f MiB", ((double) sd->end_lba) / 512.0); + if (sd->profile_name[0]) + printf(", %s", sd->profile_name); + printf("\n"); + } + return 1; +} + + int telltoc_toc(struct burn_drive *drive) { int num_sessions = 0 , num_tracks = 0 , lba = 0; @@ -445,6 +474,7 @@ static int do_media = 0; static int do_toc = 0; static int do_msinfo = 0; static int print_help = 0; +static int do_speedlist = 0; /** Converts command line arguments into above setup parameters. @@ -481,6 +511,9 @@ int telltoc_setup(int argc, char **argv) } else if (!strcmp(argv[i], "--msinfo")) { do_msinfo = 1; + } else if (!strcmp(argv[i], "--speedlist")) { + do_speedlist = 1; + } else if (!strcmp(argv[i], "--toc")) { do_toc = 1; @@ -497,7 +530,7 @@ int telltoc_setup(int argc, char **argv) if (print_help) { printf("Usage: %s\n", argv[0]); printf(" [--drive
|