Changeset 3208 in MondoRescue
- Timestamp:
- Dec 10, 2013, 8:50:00 AM (11 years ago)
- Location:
- branches/3.2/mondo/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.2/mondo/src/common/libmondo-archive.c
r3207 r3208 780 780 log_msg(1, "%ld: Unable to write one-liner bootloader.name", __LINE__); 781 781 } 782 r_free(bootldr_str);782 mr_free(bootldr_str); 783 783 mr_free(tmp); 784 784 -
branches/3.2/mondo/src/common/newt-specific.c
r3207 r3208 417 417 mr_free(bkpinfo->netfs_user); 418 418 mr_free(bkpinfo->netfs_proto); 419 mr_free(bkpinfo->netfs_remote dir);419 mr_free(bkpinfo->netfs_remote_dir); 420 420 mr_free(bkpinfo->exclude_devs); 421 421 mr_free(bkpinfo->exclude_paths); -
branches/3.2/mondo/src/lib/mr_mem.c
r3205 r3208 74 74 size_t n = 0; 75 75 76 /* We reached end of file, allocating empty string */77 if (feof(fd)) {78 mr_asprintf_int(lineptr, line, file, "");79 return;80 }81 76 ret = getline(lineptr,&n,fd); 82 if ( ret == -1) {77 if ((ret == -1) && (! feof(fd))) { 83 78 mr_msg_int(1,line,file,"Unable to alloc memory in mr_getline\nExiting..."); 84 79 mr_exit(-1,"Unable to alloc memory in mr_getline"); 80 } 81 /* We reached end of file, allocating empty string */ 82 if (ret == -1) { 83 mr_asprintf_int(lineptr, line, file, ""); 85 84 } 86 85 } -
branches/3.2/mondo/src/mondoarchive/mondoarchive.c
r3194 r3208 165 165 FILE *fin = NULL; 166 166 167 /* Make sure I'm root; abort if not */167 /* Make sure I'm root; abort if not */ 168 168 if (getuid() != 0) { 169 169 fprintf(stderr, "Please run as root.\r\n"); 170 exit(127);171 } 172 173 /* If -V, -v or --version then echo version no. and quit */170 finish(127); 171 } 172 173 /* If -V, -v or --version then echo version no. and quit */ 174 174 if (argc == 2 && (!strcmp(argv[argc - 1], "-v") || !strcmp(argv[argc - 1], "-V") || !strcmp(argv[argc - 1], "--version"))) { 175 175 printf("mondoarchive v%s\nSee man page for help\n", PACKAGE_VERSION); 176 exit(0); 177 } 178 179 /* Initialize variables */ 180 181 printf("Initializing...\n"); 182 if (!(bkpinfo = (struct s_bkpinfo *)malloc(sizeof(struct s_bkpinfo)))) { 183 fatal_error("Cannot malloc bkpinfo"); 184 } 185 reset_bkpinfo(); 186 187 /* Memory allocation is done in those functions */ 188 malloc_libmondo_global_strings(); 176 finish(0); 177 } 189 178 190 179 /* initialize log file with time stamp */ 191 180 unlink(MONDO_LOGFILE); 192 181 log_msg(0, "Time started: %s", mr_date()); 182 183 /* Initialize variables */ 184 if (!(bkpinfo = (struct s_bkpinfo *)malloc(sizeof(struct s_bkpinfo)))) { 185 fprintf(stderr, "Cannot malloc bkpinfo\n"); 186 finish(-1); 187 } 188 log_msg(9, "reset_bkpinfo"); 189 reset_bkpinfo(); 190 191 /* Memory allocation is done in those functions */ 192 malloc_libmondo_global_strings(); 193 193 194 194 /* make sure PATH environmental variable allows access to mkfs, fdisk, etc. */ … … 351 351 } 352 352 353 /* Finish configuring global structures */353 /* Finish configuring global structures */ 354 354 if (post_param_configuration()) { 355 355 fatal_error("Post-param initialization phase failed. Perhaps bad parameters were supplied to mondoarchive? Please review the documentation, error messages and logs. Exiting...");
Note:
See TracChangeset
for help on using the changeset viewer.