Changeset 3614 in MondoRescue for branches/3.2/mondo/src/common
- Timestamp:
- Nov 18, 2016, 5:31:43 PM (8 years ago)
- Location:
- branches/3.2/mondo/src/common
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.2/mondo/src/common/libmondo-devices.c
r3610 r3614 24 24 #include "libmondo-stream-EXT.h" 25 25 26 extern void mr_strip_spaces(char *);27 28 #include <sys/types.h>29 26 #ifdef __FreeBSD__ 30 27 #define DKTYPENAMES … … 1040 1037 } else { 1041 1038 mr_getline(p, pin); 1042 mr_asprintf(good_formats, " %s",p);1039 good_formats = mr_strip_spaces(p); 1043 1040 mr_free(p); 1044 1041 (void)pclose(pin); 1045 mr_strip_spaces(good_formats);1046 1042 mr_strcat(good_formats, " swap lvm raid ntfs-3g ntfs 7 "); // " ntfs 7 " -- um, cheating much? :) 1047 1043 if (strstr(good_formats, format_sz)) { … … 2461 2457 } 2462 2458 mr_free(bkpinfo->netfs_mount); 2463 mr_asprintf(bkpinfo->netfs_mount, "%s", p); 2459 // check whether already mounted - we better remove 2460 // surrounding spaces and trailing '/' for this 2461 bkpinfo->netfs_mount = mr_strip_spaces(p); 2464 2462 if (!bkpinfo->restore_data) { 2465 2463 if ((compression_type = which_compression_type()) == NULL) { … … 2473 2471 } 2474 2472 } 2475 // check whether already mounted - we better remove2476 // surrounding spaces and trailing '/' for this2477 mr_strip_spaces(bkpinfo->netfs_mount);2478 2473 if (bkpinfo->netfs_mount[strlen(bkpinfo->netfs_mount) - 1] == '/') 2479 2474 bkpinfo->netfs_mount[strlen(bkpinfo->netfs_mount) - 1] = '\0'; … … 2607 2602 } 2608 2603 mr_free(bkpinfo->netfs_remote_dir); 2609 mr_asprintf(bkpinfo->netfs_remote_dir, "%s", tmp1);2610 2611 2604 // check whether writable - we better remove surrounding spaces for this 2612 mr_strip_spaces(bkpinfo->netfs_remote_dir);2605 bkpinfo->netfs_remote_dir = mr_strip_spaces(tmp1); 2613 2606 2614 2607 if (!popup_and_get_string("Prefix.", "Please enter the prefix that will be prepended to your ISO filename. Example: machine1 to obtain machine1-[1-9]*.iso files", bkpinfo->prefix, MAX_STR_LEN / 4)) { -
branches/3.2/mondo/src/common/libmondo-fork-EXT.h
r1999 r3614 1 1 /* libmondo-fork-EXT.h */ 2 2 3 extern char *call_program_and_get_last_line_of_output(c har *call);3 extern char *call_program_and_get_last_line_of_output(const char *call); 4 4 extern int run_program_and_log_to_screen(char *basic_call, 5 5 char *what_i_am_doing); -
branches/3.2/mondo/src/common/libmondo-raid.c
r3610 r3614 426 426 char *incoming = NULL; 427 427 char *p = NULL; 428 char *res = NULL; 428 429 429 430 assert(fin != NULL); … … 433 434 } 434 435 435 for (mr_getline(incoming, fin); !feof(fin); mr_getline(incoming, fin)) { 436 log_msg(10,"Found in raidtab line: %s",incoming); 437 mr_strip_spaces(incoming); 436 for (mr_getline(res, fin); !feof(fin); mr_getline(res, fin)) { 437 log_msg(10,"Found in raidtab line: %s",res); 438 incoming = mr_strip_spaces(res); 439 mr_free(res); 438 440 p = strchr(incoming, ' '); 439 441 if (strlen(incoming) < 3 || incoming[0] == '#' || !p) { -
branches/3.2/mondo/src/common/libmondo-string.c
r3611 r3614 92 92 } 93 93 /* skip initial spaces */ 94 mr_asprintf(scratch, "%s", in); 95 mr_strip_spaces(scratch); 94 scratch = mr_strip_spaces(in); 96 95 len = (int)strlen(scratch); 97 96 mid = width / 2; -
branches/3.2/mondo/src/common/newt-specific.c
r3508 r3614 1234 1234 static char *possible_responses[] = { "none", "cdr", "cdrw", "dvd", "tape", "cdstream", "udev", "netfs", "iso", NULL }; 1235 1235 char *outstr = NULL; 1236 char *instr = NULL; 1236 1237 t_bkptype backup_type; 1237 1238 int i; … … 1256 1257 } 1257 1258 printf(")\n--> "); 1258 mr_getline(outstr, stdin); 1259 mr_strip_spaces(outstr); 1259 mr_getline(instr, stdin); 1260 outstr = mr_strip_spaces(instr); 1261 mr_free(instr); 1260 1262 for (i = 0; possible_responses[i]; i++) { 1261 1263 if (!strcmp(possible_responses[i], outstr)) {
Note:
See TracChangeset
for help on using the changeset viewer.