Changeset 1140 in MondoRescue
- Timestamp:
- Feb 12, 2007, 2:05:43 AM (18 years ago)
- Location:
- branches/stable/mondo/src
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/stable/mondo/src/common/libmondo-files.c
r1137 r1140 1093 1093 ("NFS mount doesn't have a colon in it, e.g. 192.168.1.4:/home/nfs"); 1094 1094 } 1095 *(p++) = '\0'; 1095 *p = '\0'; 1096 p++; 1096 1097 strcpy(nfs_server_ipaddr, tmp); 1097 1098 mr_free(tmp); -
branches/stable/mondo/src/common/libmondo-fork.c
r1139 r1140 235 235 fin = fopen("/tmp/mondo-run-prog-thing.tmp", "r"); 236 236 if (fin) { 237 for (mr_getline(&incoming, &n, fin); !feof(fin); 238 mr_getline(&incoming, &n, fin)) { 237 for (mr_getline(&incoming, &n, fin); !feof(fin); mr_getline(&incoming, &n, fin)) { 239 238 /* patch by Heiko Schlittermann */ 240 239 p = incoming; -
branches/stable/mondo/src/common/libmondo-string.c
r1116 r1140 771 771 p = tmp; 772 772 while (*p != '\0') { 773 in_out[i] = *(p++); 773 in_out[i] = *p; 774 p++; 774 775 in_out[i + 1] = '\0'; 775 776 if (in_out[i] < 32 && i > 0) { … … 797 798 in_out[i] = '\0'; 798 799 mr_free(tmp); 799 /* for(i=strlen(in_out); i>0 && in_out[i-1]<=32; i--) {in_out[i-1]='\0';} */800 800 } 801 801 -
branches/stable/mondo/src/common/libmondo-tools.c
r1123 r1140 893 893 /*@ buffers ************ */ 894 894 char tmp[MAX_STR_LEN]; 895 // char command[MAX_STR_LEN];896 895 897 896 /*@ int's *************** */ … … 900 899 901 900 902 mvaddstr_and_log_it(g_currentY, 0, 903 "Checking sanity of your Linux distribution"); 901 mvaddstr_and_log_it(g_currentY, 0, "Checking sanity of your Linux distribution"); 904 902 #ifndef __FreeBSD__ 905 903 if (system("which mkfs.vfat &> /dev/null") -
branches/stable/mondo/src/mondoarchive/main.c
r1132 r1140 216 216 } 217 217 218 /* BERLIOS: Hardcoded to be improved */ 219 unlink(MONDO_CACHE"/mindi.conf"); 220 unlink(MONDO_CACHE"/mondorestore.cfg"); 221 218 222 /* Configure the bkpinfo structure, global file paths, etc. */ 219 223 g_main_pid = getpid(); … … 227 231 welcome_to_mondoarchive(); 228 232 distro_specific_kludges_at_start_of_mondoarchive(); 229 sprintf(g_erase_tmpdir_and_scratchdir, "rm -Rf %s %s", bkpinfo->tmpdir,230 bkpinfo->scratchdir);231 233 g_kernel_version = get_kernel_version(); 232 234 … … 327 329 ("Pre-param initialization phase failed. Please review the error messages above, make the specified changes, then try again. Exiting..."); 328 330 } 329 330 /* Process command line, if there is one. If not, ask user for info. */ 331 sprintf(g_erase_tmpdir_and_scratchdir, "rm -Rf %s %s", bkpinfo->tmpdir, 332 bkpinfo->scratchdir); 333 334 /* Process command line, if there is one. If not, ask user for info. */ 331 335 if (argc == 1) { 332 336 g_text_mode = FALSE; -
branches/stable/mondo/src/test/test-mem.c
r1139 r1140 16 16 int main(void) 17 17 { 18 char *str = NULL;18 char *str = NULL; 19 19 FILE *fd = NULL; 20 20 size_t n = 0; … … 37 37 mr_getline(&str,&n,fd); 38 38 printf("2nd Result: %s",str); 39 mr_getline(&str,&n,fd); 40 strcpy(str,"another line\n"); 41 printf("3rd Result: %s",str); 39 42 mr_free(str); 40 43 -
branches/stable/mondo/src/test/test-string.c
r1064 r1140 20 20 char *string = NULL; 21 21 22 mr_asprintf(&string, " %s", "md0 : active raid10 hda1[0] hda12[3] hda6[2] hda5[1]\n");22 mr_asprintf(&string, "md0 : active raid10 hda1[0] hda12[3] hda6[2] hda5[1]\n"); 23 23 fprintf(stdout, "string=|%s|\n", string); 24 token = mr_strtok(string, delims, &lastpos); 25 while (lastpos > 0) { 24 while ((token = mr_strtok(string, delims, &lastpos))) { 26 25 fprintf(stdout, "token=|%s|, lastpos=%d\n", token, lastpos); 27 26 mr_free(token); 28 token = mr_strtok(string, delims, &lastpos);29 27 } 30 28 mr_free(string);
Note:
See TracChangeset
for help on using the changeset viewer.