Changeset 1259 in MondoRescue
- Timestamp:
- Mar 21, 2007, 11:14:14 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/stable/mondo/src/common/libmondo-filelist.c
r1241 r1259 1288 1288 struct stat statbuf; 1289 1289 char new[MAX_STR_LEN]; 1290 char *tmp = NULL;1291 1290 char *sth_B = NULL; 1292 1291 static int percentage = 0; … … 1309 1308 time_t this_time; 1310 1309 1311 malloc_string(tmp);1312 1310 malloc_string(sth_B); 1313 1311 malloc_string(ith_B); … … 1346 1344 system(strtmp); 1347 1345 mr_free(strtmp); 1348 sprintf(tmp, "wc -l %s | awk '{print $1;}'", g_skeleton_filelist);1346 mr_asprintf(&strtmp, "wc -l %s | awk '{print $1;}'", g_skeleton_filelist); 1349 1347 g_skeleton_entries = 1350 1 + atol(call_program_and_get_last_line_of_output(tmp)); 1348 1 + atol(call_program_and_get_last_line_of_output(strtmp)); 1349 mr_free(strtmp); 1351 1350 sprintf(name_of_evalcall_form, "Making catalog of %s", dir); 1352 1351 open_evalcall_form(name_of_evalcall_form); … … 1375 1374 #ifndef _XWIN 1376 1375 if (!g_text_mode) { 1377 sprintf(tmp, "Reading %-68s", dir); 1378 newtDrawRootText(0, g_noof_rows - 3, tmp); 1376 mr_asprintf(&strtmp, "Reading %-68s", dir); 1377 newtDrawRootText(0, g_noof_rows - 3, strtmp); 1378 mr_free(strtmp); 1379 1379 } 1380 1380 #endif … … 1395 1395 sprintf(new_with_spaces, " %s ", dir); 1396 1396 if ((dip = opendir(dir)) == NULL) { 1397 log_OS_error("opendir"); 1397 mr_asprintf(&strtmp, "opendir %s", dir); 1398 log_OS_error(strtmp); 1399 mr_free(strtmp); 1398 1400 } else if (strstr(skip_these, new_with_spaces)) { 1399 1401 fprintf(fout, "%s\n", dir); // if excluded dir then print dir ONLY … … 1426 1428 counter = 0; 1427 1429 uberctr++; 1428 sprintf(tmp, " %c ",1430 mr_asprintf(&strtmp, " %c ", 1429 1431 special_dot_char(uberctr)); 1430 1432 #ifndef _XWIN 1431 1433 if (!g_text_mode) { 1432 1434 newtDrawRootText(77, g_noof_rows - 3, 1433 tmp); 1435 strtmp); 1436 mr_free(strtmp); 1434 1437 newtRefresh(); 1435 1438 } … … 1455 1458 mr_msg(5, "g_skeleton_entries = %ld", g_skeleton_entries); 1456 1459 } 1457 mr_free(tmp);1458 1460 mr_free(sth_B); 1459 1461 mr_free(ith_B);
Note:
See TracChangeset
for help on using the changeset viewer.