Changeset 900 in MondoRescue for trunk/mondo/src/mondoarchive/main.c
- Timestamp:
- Oct 24, 2006, 8:49:18 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/mondo/src/mondoarchive/main.c
r815 r900 21 21 #include "../common/libmondo.h" 22 22 #include "mondo-cli-EXT.h" 23 24 #include "mr_mem.h" 23 25 24 26 // for CVS … … 185 187 186 188 /* make sure PATH environmental variable allows access to mkfs, fdisk, etc. */ 187 asprintf(&tmp, "/sbin:/usr/sbin:%s:/usr/local/sbin", getenv("PATH"));189 mr_asprintf(&tmp, "/sbin:/usr/sbin:%s:/usr/local/sbin", getenv("PATH")); 188 190 setenv("PATH", tmp, 1); 189 paranoid_free(tmp);191 mr_free(tmp); 190 192 191 193 /* Add the ARCH environment variable for ia64 purposes */ … … 236 238 turn_wildcard_chars_into_literal_chars(tmp, argv[2]); 237 239 printf("in=%s; out=%s\n", argv[2], tmp); 238 paranoid_free(tmp);240 mr_free(tmp); 239 241 finish(1); 240 242 } … … 268 270 printf(_("CD-RW is at %s\n"), tmp); 269 271 } 270 paranoid_free(tmp);272 mr_free(tmp); 271 273 272 274 if ((tmp = find_cdrom_device(FALSE)) == NULL) { … … 275 277 printf(_("CD-ROM is at %s\n"), tmp); 276 278 } 277 paranoid_free(tmp);279 mr_free(tmp); 278 280 finish(0); 279 281 } … … 288 290 printf(_("DVD is at %s\n"), tmp); 289 291 } 290 paranoid_free(tmp);292 mr_free(tmp); 291 293 finish(0); 292 294 } … … 345 347 retval += res; 346 348 if (res) { 347 asprintf(&say_at_end,349 mr_asprintf(&say_at_end, 348 350 _("Data archived. Please check the logs, just as a precaution. ")); 349 351 } else { 350 asprintf(&say_at_end, _("Data archived OK. "));352 mr_asprintf(&say_at_end, _("Data archived OK. ")); 351 353 } 352 354 } … … 356 358 res = verify_data(bkpinfo); 357 359 if (res < 0) { 358 asprintf(&say_at_end, _("%d difference%c found."), -res,360 mr_asprintf(&say_at_end, _("%d difference%c found."), -res, 359 361 (-res != 1) ? 's' : ' '); 360 362 res = 0; … … 399 401 } 400 402 log_to_screen(say_at_end); 401 paranoid_free(say_at_end);402 403 asprintf(&tmp, "umount %s/tmpfs", bkpinfo->tmpdir);403 mr_free(say_at_end); 404 405 mr_asprintf(&tmp, "umount %s/tmpfs", bkpinfo->tmpdir); 404 406 run_program_and_log_output(tmp, TRUE); 405 paranoid_free(tmp);406 407 asprintf(&g_erase_tmpdir_and_scratchdir, "rm -Rf %s %s", bkpinfo->tmpdir,407 mr_free(tmp); 408 409 mr_asprintf(&g_erase_tmpdir_and_scratchdir, "rm -Rf %s %s", bkpinfo->tmpdir, 408 410 bkpinfo->scratchdir); 409 411 run_program_and_log_output(g_erase_tmpdir_and_scratchdir, TRUE); … … 424 426 system(g_erase_tmpdir_and_scratchdir); 425 427 free_libmondo_global_strings(); 426 paranoid_free(bkpinfo);428 mr_free((void *)bkpinfo); 427 429 428 430 unlink("/tmp/filelist.full");
Note:
See TracChangeset
for help on using the changeset viewer.