Changeset 2357 in MondoRescue for branches/2.2.10/mondo/src/mondorestore/mondo-rstr-newt.c
- Timestamp:
- Aug 29, 2009, 3:22:10 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2.10/mondo/src/mondorestore/mondo-rstr-newt.c
r2356 r2357 533 533 534 534 system("grep Pers /proc/mdstat > /tmp/raid-personalities.txt 2> /dev/null"); 535 mr_asprintf(personalities, "%s", last_line_of_file("/tmp/raid-personalities.txt"));535 personalities = last_line_of_file("/tmp/raid-personalities.txt"); 536 536 mr_asprintf(prompt, "Please enter the RAID level you want. %s", personalities); 537 537 mr_free(personalities); … … 2291 2291 if (does_file_exist("/tmp/NFS-SERVER-PATH")) { 2292 2292 mr_free(idev); 2293 mr_asprintf(idev, "%s", last_line_of_file("/tmp/NFS-SERVER-MOUNT"));2293 idev = last_line_of_file("/tmp/NFS-SERVER-MOUNT"); 2294 2294 mr_asprintf(isodir_format, "nfs"); 2295 2295 mr_free(isodir_path); 2296 mr_asprintf(isodir_path, "%s", last_line_of_file("/tmp/NFS-SERVER-PATH"));2296 isodir_path = last_line_of_file("/tmp/NFS-SERVER-PATH"); 2297 2297 } 2298 2298 … … 2861 2861 /** char *************************************************************/ 2862 2862 char output = '\0'; 2863 char tmp[MAX_STR_LEN];2863 char *tmp = NULL; 2864 2864 2865 2865 /** newt *************************************************************/ … … 2873 2873 2874 2874 if (g_text_mode) { 2875 for (output = 'z'; !strchr("AICE", output); output = tmp[0]) { 2876 printf 2877 ("Which mode - (A)utomatic, (I)nteractive, \n(C)ompare only, or (E)xit to shell?\n--> "); 2878 fgets(tmp, MAX_STR_LEN - 1, stdin); 2875 while (!strchr("AICE", output)) { 2876 printf("Which mode - (A)utomatic, (I)nteractive, \n(C)ompare only, or (E)xit to shell?\n--> "); 2877 mr_getline(tmp, stdin); 2878 output = tmp[0]; 2879 free(tmp); 2879 2880 } 2880 2881 return (output); 2881 2882 } 2882 2883 2883 newtPushHelpLine 2884 (" Do you want to 'nuke' your system, restore interactively, or just compare?"); 2884 newtPushHelpLine(" Do you want to 'nuke' your system, restore interactively, or just compare?"); 2885 2885 newtOpenWindow(24, 3, 32, 17, "How should I restore?"); 2886 2886 b1 = newtButton(7, 1, "Automatically");
Note:
See TracChangeset
for help on using the changeset viewer.