Changeset 2323 in MondoRescue for branches/2.2.10/mondo/src/common/libmondo-fifo.c
- Timestamp:
- Aug 18, 2009, 3:05:43 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2.10/mondo/src/common/libmondo-fifo.c
r2296 r2323 88 88 for (bufsize = wise_upper_limit, res = -1; 89 89 res != 0 && bufsize >= wise_lower_limit; bufsize--) { 90 mr_asprintf( &tmp, "dd if=/dev/zero bs=1024 count=16k 2> /dev/null | buffer -o /dev/null -s %ld -m %d%c", internal_tape_block_size, bufsize, 'm');90 mr_asprintf(tmp, "dd if=/dev/zero bs=1024 count=16k 2> /dev/null | buffer -o /dev/null -s %ld -m %d%c", internal_tape_block_size, bufsize, 'm'); 91 91 res = run_program_and_log_output(tmp, 2); 92 92 mr_free(tmp); … … 94 94 if (!res) { 95 95 bufsize++; 96 mr_asprintf( &tmp, "Negotiated max buffer of %d MB ", bufsize);96 mr_asprintf(tmp, "Negotiated max buffer of %d MB ", bufsize); 97 97 log_to_screen(tmp); 98 98 mr_free(tmp); … … 118 118 } 119 119 log_msg(2, "Calling buffer --- command = '%s'", g_sz_call_to_buffer); 120 mr_asprintf( &sz_dir, "%c", direction);120 mr_asprintf(sz_dir, "%c", direction); 121 121 fres = popen(g_sz_call_to_buffer, sz_dir); 122 122 mr_free(sz_dir); … … 130 130 } 131 131 sleep(2); 132 mr_asprintf( &tmp, "ps %s | grep \"%s\"", ps_options, g_sz_call_to_buffer);132 mr_asprintf(tmp, "ps %s | grep \"%s\"", ps_options, g_sz_call_to_buffer); 133 133 if (run_program_and_log_output(tmp, 2)) { 134 134 log_msg(2, "Warning - I think I failed to open tape, actually."); … … 136 136 mr_free(tmp); 137 137 g_tape_buffer_size_MB = bufsize; 138 mr_asprintf( &command, "ps %s | grep buffer | grep -v grep", ps_options);138 mr_asprintf(command, "ps %s | grep buffer | grep -v grep", ps_options); 139 139 if (run_program_and_log_output(command, 1)) { 140 140 fres = NULL; … … 165 165 } 166 166 paranoid_system("sync"); 167 mr_asprintf( &command, "ps %s | grep -F \"%s\" | grep -Fv grep | awk '{print $2;}' | grep -v PID | head -1", ps_options, g_sz_call_to_buffer);167 mr_asprintf(command, "ps %s | grep -F \"%s\" | grep -Fv grep | awk '{print $2;}' | grep -v PID | head -1", ps_options, g_sz_call_to_buffer); 168 168 log_msg(2, "kill_buffer() --- command = %s", command); 169 mr_asprintf( &tmp, "%s", call_program_and_get_last_line_of_output(command));169 mr_asprintf(tmp, "%s", call_program_and_get_last_line_of_output(command)); 170 170 mr_free(command); 171 171 172 mr_asprintf( &command, "kill %s", tmp);172 mr_asprintf(command, "kill %s", tmp); 173 173 log_msg(2, "kill_buffer() --- command = %s", command); 174 174 if (strlen(tmp) > 0) {
Note:
See TracChangeset
for help on using the changeset viewer.