Changeset 3185 in MondoRescue for branches/3.0/mondo/src/common/libmondo-fifo.c
- Timestamp:
- Sep 20, 2013, 2:29:57 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.0/mondo/src/common/libmondo-fifo.c
r2519 r3185 88 88 for (bufsize = wise_upper_limit, res = -1; 89 89 res != 0 && bufsize >= wise_lower_limit; bufsize--) { 90 mr_asprintf( &tmp,90 mr_asprintf(tmp, 91 91 "dd if=/dev/zero bs=1024 count=16k 2> /dev/null | buffer -o /dev/null -s %ld -m %d%c", 92 92 internal_tape_block_size, bufsize, 'm'); … … 96 96 if (!res) { 97 97 bufsize++; 98 mr_asprintf( &tmp, "Negotiated max buffer of %d MB ", bufsize);98 mr_asprintf(tmp, "Negotiated max buffer of %d MB ", bufsize); 99 99 log_to_screen(tmp); 100 100 mr_free(tmp); … … 120 120 } 121 121 log_msg(2, "Calling buffer --- command = '%s'", g_sz_call_to_buffer); 122 mr_asprintf( &sz_dir, "%c", direction);122 mr_asprintf(sz_dir, "%c", direction); 123 123 fres = popen(g_sz_call_to_buffer, sz_dir); 124 124 mr_free(sz_dir); … … 132 132 } 133 133 sleep(2); 134 mr_asprintf( &tmp, "ps %s | grep \"%s\"", ps_options, g_sz_call_to_buffer);134 mr_asprintf(tmp, "ps %s | grep \"%s\"", ps_options, g_sz_call_to_buffer); 135 135 if (run_program_and_log_output(tmp, 2)) { 136 136 log_msg(2, "Warning - I think I failed to open tape, actually."); … … 138 138 mr_free(tmp); 139 139 g_tape_buffer_size_MB = bufsize; 140 mr_asprintf( &command, "ps %s | grep buffer | grep -v grep", ps_options);140 mr_asprintf(command, "ps %s | grep buffer | grep -v grep", ps_options); 141 141 if (run_program_and_log_output(command, 1)) { 142 142 fres = NULL; … … 167 167 } 168 168 paranoid_system("sync"); 169 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);169 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); 170 170 log_msg(2, "kill_buffer() --- command = %s", command); 171 mr_asprintf( &tmp, "%s", call_program_and_get_last_line_of_output(command));171 mr_asprintf(tmp, "%s", call_program_and_get_last_line_of_output(command)); 172 172 mr_free(command); 173 173 174 mr_asprintf( &command, "kill %s", tmp);174 mr_asprintf(command, "kill %s", tmp); 175 175 log_msg(2, "kill_buffer() --- command = %s", command); 176 176 if (strlen(tmp) > 0) {
Note:
See TracChangeset
for help on using the changeset viewer.