Changeset 3843 in MondoRescue for branches/3.3/mondo/src
- Timestamp:
- Mar 6, 2024, 2:07:54 AM (6 months ago)
- Location:
- branches/3.3/mondo/src
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.3/mondo/src/common/libmondo-cli.c
r3838 r3843 354 354 } 355 355 if (!flag_set['d']) { 356 if (!find_dvd_device(flag_val['d'] , FALSE)) {356 if (!find_dvd_device(flag_val['d'])) { 357 357 flag_set['d'] = TRUE; 358 358 log_to_screen("I guess DVD drive is at %s", flag_val['d']); -
branches/3.3/mondo/src/common/libmondo-devices-EXT.h
r3191 r3843 10 10 char *mountpoint); 11 11 extern int find_cdrom_device(char *output, bool try_to_mount); 12 extern int find_dvd_device(char *output , bool try_to_mount);12 extern int find_dvd_device(char *output); 13 13 extern long get_phys_size_of_drive(char *drive); 14 14 extern bool is_this_a_valid_disk_format(char *format); -
branches/3.3/mondo/src/common/libmondo-devices.c
r3838 r3843 479 479 strcpy(dev, g_dvd_drive_is_here); 480 480 if (!dev[0]) { 481 find_dvd_device(dev , FALSE);481 find_dvd_device(dev); 482 482 } 483 483 } else { 484 484 strcpy(dev, g_cdrom_drive_is_here); 485 485 if (!dev[0]) { 486 find_cdrom_device(dev , FALSE);486 find_cdrom_device(dev); 487 487 } 488 488 } … … 870 870 871 871 872 int find_dvd_device(char *output , bool try_to_mount)872 int find_dvd_device(char *output) 873 873 { 874 874 char *tmp = NULL; 875 char *tmp1 = NULL; 875 876 int retval = 0, devno = -1; 876 877 … … 881 882 } 882 883 883 tmp = call_program_and_get_last_line_of_output("dvdrecord -scanbus 2> /dev/null | grep -E '\)\ \'' | grep -n '' | grep -E '[D|C][V|D]' | cut -d':' -f1"); 884 log_msg(5, "tmp = '%s'", tmp); 885 if (!tmp[0]) { 886 mr_free(tmp); 887 tmp = call_program_and_get_last_line_of_output("cdrecord -scanbus 2> /dev/null | grep -E '\)\ \'' | grep -n '' | grep -E '[D|C][V|D]' | cut -d':' -f1"); 888 } 889 if (tmp[0]) { 890 devno = atoi(tmp) - 1; 891 } 884 mr_asprintf(tmp1, "cdrecord -inq dev=%s 2> /dev/null | grep -E 'Device seems to be' | cut -d':' -f2", output); 885 tmp = call_program_and_get_last_line_of_output(tmp1); 886 mr_free(tmp1); 887 log_msg(5, "cdrecord tmp = '%s'", tmp); 892 888 mr_free(tmp); 893 889 894 if (devno >= 0) { 895 retval = 0; 896 sprintf(output, "/dev/scd%d", devno); 890 if (tmp != NULL) { 897 891 strcpy(g_dvd_drive_is_here, output); 898 892 log_msg(2, "I think DVD is at %s", output); … … 901 895 retval = 1; 902 896 } 903 904 return (retval); 897 return(retval); 905 898 } 906 899 … … 2259 2252 mr_asprintf(comment, "What speed is your %s (re)writer?", mds); 2260 2253 if (bkpinfo->backup_media_type == dvd) { 2261 find_dvd_device(bkpinfo->media_device , FALSE);2254 find_dvd_device(bkpinfo->media_device); 2262 2255 strcpy(tmp1, "1"); 2263 2256 mr_asprintf(sz_size, "%d", DEFAULT_DVD_DISK_SIZE); // 4.7 salesman's GB = 4.482 real GB = 4482 MB -
branches/3.3/mondo/src/common/libmondo-devices.h
r3194 r3843 9 9 int find_and_mount_actual_cd(char *mountpoint); 10 10 int find_cdrom_device(char *output, bool try_to_mount); 11 int find_dvd_device(char *output , bool try_to_mount);11 int find_dvd_device(char *output); 12 12 long get_phys_size_of_drive(char *drive); 13 13 bool is_this_a_valid_disk_format(char *format); -
branches/3.3/mondo/src/mondoarchive/mondoarchive.c
r3827 r3843 301 301 setup_newt_stuff(); 302 302 malloc_string(tmp); 303 if (find_dvd_device(tmp , atoi(argv[2]))) {303 if (find_dvd_device(tmp)) { 304 304 printf("Failed to find DVD drive\n"); 305 305 } else {
Note:
See TracChangeset
for help on using the changeset viewer.