Changeset 3141 in MondoRescue for branches/3.0/mondo/src/common
- Timestamp:
- Jun 13, 2013, 6:05:57 PM (11 years ago)
- Location:
- branches/3.0/mondo/src/common
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.0/mondo/src/common/libmondo-cli.c
r3138 r3141 20 20 extern int g_loglevel; 21 21 extern bool g_text_mode; 22 extern bool g_fail_immediately; 22 23 extern char g_startdir[MAX_STR_LEN]; ///< ????? @bug ????? 23 24 extern char *MONDO_OPTIONS; … … 909 910 ("Please install LZOP. You can't use '-L' until you do.\n"); 910 911 } 912 } 913 914 if (flag_set['F']) { 915 log_msg(3, "-F means we will fail immediately at the first interaction request"); 916 g_fail_immediately = TRUE; 911 917 } 912 918 -
branches/3.0/mondo/src/common/libmondo-filelist.c
r3139 r3141 214 214 char *incoming = NULL; 215 215 char *tmp = NULL; 216 char *p = NULL;217 216 218 217 /*@ pointers *********************************** */ … … 920 919 for (tmp1 = fgets(fname, MAX_STR_LEN, pin); !feof(pin); 921 920 tmp1 = fgets(fname, MAX_STR_LEN, pin)) { 922 if ((fname[strlen(fname) - 1] == 13 923 || fname[strlen(fname) - 1] == 10) && strlen(fname) > 0) { 921 if (((fname[strlen(fname) - 1] == 13) || (fname[strlen(fname) - 1] == 10)) && (strlen(fname) > 0)) { 924 922 fname[strlen(fname) - 1] = '\0'; 925 923 } -
branches/3.0/mondo/src/common/newt-specific.c
r3114 r3141 55 55 */ 56 56 bool g_exiting = FALSE; 57 58 // Decide whether we should continue to ask questions or exit (cron use case) 59 extern bool g_fail_immediately; 57 60 58 61 /** … … 125 128 char *p; 126 129 127 assert_string_is_neither_NULL_nor_zerolength(prompt); 128 130 assert_string_is_neither_NULL_nor_zerolength(prompt); 131 132 if (g_fail_immediately) { 133 // We consider the user aborted by using the -F option 134 log_msg(3, "Exiting at first interaction request due to -F"); 135 finish(1); 136 } 129 137 if (g_text_mode) { 130 138 … … 179 187 int i; 180 188 189 assert_string_is_neither_NULL_nor_zerolength(prompt); 190 if (g_fail_immediately) { 191 // We consider the user aborted by using the -F option 192 log_msg(3, "Exiting at first interaction request due to -F"); 193 finish(1); 194 } 181 195 tmp = malloc(MAX_NEWT_COMMENT_LEN); 182 assert_string_is_neither_NULL_nor_zerolength(prompt);183 196 if (g_text_mode) { 184 197 paranoid_system("sync");
Note:
See TracChangeset
for help on using the changeset viewer.