Changeset 3613 in MondoRescue for branches/3.2/mondo/src/common/libmondo-archive.c
- Timestamp:
- Nov 18, 2016, 5:31:42 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.2/mondo/src/common/libmondo-archive.c
r3610 r3613 15 15 #include "mr_str.h" 16 16 #include "mr_sys.h" 17 #include "mr_file.h" 17 18 #include "mondostructures.h" 18 19 #include "libmondo-string-EXT.h" … … 1450 1451 char *result_sz = NULL; 1451 1452 char *message_to_screen = NULL; 1452 char *old_pwd ;1453 char *old_pwd = NULL; 1453 1454 char *mds = NULL; 1454 1455 1455 malloc_string(old_pwd);1456 1456 assert(bkpinfo != NULL); 1457 1457 1458 1458 log_msg(2, "make_usb_fs --- scratchdir=%s", bkpinfo->scratchdir); 1459 tmp1 = getcwd(old_pwd, MAX_STR_LEN - 1);1459 old_pwd = mr_getcwd(); 1460 1460 mr_asprintf(tmp, "chmod 700 %s", bkpinfo->scratchdir); 1461 1461 run_program_and_log_output(tmp, FALSE); … … 1533 1533 // FIXME 1534 1534 } 1535 mr_free(old_pwd); 1535 1536 if (retval) { 1536 1537 log_msg(1, "WARNING - make_usb_fs returned an error"); 1537 1538 } 1538 paranoid_free(old_pwd); 1539 return (retval); 1539 return(retval); 1540 1540 } 1541 1541 … … 1558 1558 * @return The number of errors encountered (0 for success) 1559 1559 */ 1560 int make_iso_fs(char *destfile) 1561 { 1560 int make_iso_fs(char *destfile) { 1562 1561 /*@ int ********************************************** */ 1563 1562 int retval = 0; … … 1566 1565 /*@ buffers ****************************************** */ 1567 1566 char *tmp = NULL; 1568 char *tmp2 = NULL; 1569 char *old_pwd; 1567 char *old_pwd = NULL; 1570 1568 char *result_sz = NULL; 1571 1569 char *message_to_screen = NULL; 1572 1570 char *sz_blank_disk = NULL; 1573 char *fnam = NULL;1574 1571 char *isofs_cmd = NULL; 1575 1572 char *full_isofs_cmd = NULL; … … 1578 1575 bool cd_is_mountable; 1579 1576 1580 malloc_string(old_pwd);1581 malloc_string(fnam);1582 1577 assert(bkpinfo != NULL); 1583 1578 assert_string_is_neither_NULL_nor_zerolength(destfile); … … 1588 1583 1589 1584 log_msg(2, "make_iso_fs --- scratchdir=%s --- destfile=%s", bkpinfo->scratchdir, destfile); 1590 tmp2 = getcwd(old_pwd, MAX_STR_LEN - 1); 1591 if (! tmp2) { 1592 //FIXME 1593 } 1585 old_pwd = mr_getcwd(); 1594 1586 mr_asprintf(tmp, "chmod 700 %s", bkpinfo->scratchdir); 1595 1587 run_program_and_log_output(tmp, FALSE); … … 1825 1817 // FIXME 1826 1818 } 1819 mr_free(old_pwd); 1827 1820 if (retval) { 1828 1821 log_msg(1, "WARNING - make_iso_fs returned an error"); 1829 1822 } 1830 paranoid_free(old_pwd);1831 paranoid_free(fnam);1832 paranoid_free(tmp);1833 1823 return (retval); 1834 1824 }
Note:
See TracChangeset
for help on using the changeset viewer.