source: MondoRescue/branches/2.2.10/mondo/src/common/libmondo-fork.c@ 2357

Last change on this file since 2357 was 2357, checked in by Bruno Cornec, 15 years ago
  • Some more fgets => mr_getline transformations
  • XWIN define is gone
  • Property svn:keywords set to Id
File size: 18.5 KB
Line 
1/* libmondo-fork.c
2 $Id: libmondo-fork.c 2357 2009-08-29 01:22:10Z bruno $
3
4- subroutines for handling forking/pthreads/etc.
5*/
6
7
8#include "my-stuff.h"
9#include "mr_mem.h"
10#include "mondostructures.h"
11#include "libmondo-fork.h"
12#include "libmondo-string-EXT.h"
13#include "libmondo-gui-EXT.h"
14#include "libmondo-files-EXT.h"
15#include "libmondo-tools-EXT.h"
16#include "lib-common-externs.h"
17
18/*@unused@*/
19//static char cvsid[] = "$Id: libmondo-fork.c 2357 2009-08-29 01:22:10Z bruno $";
20
21extern t_bkptype g_backup_media_type;
22extern bool g_text_mode;
23extern char *MONDO_LOGFILE;
24
25/* Reference to global bkpinfo */
26extern struct s_bkpinfo *bkpinfo;
27pid_t g_buffer_pid = 0;
28
29
30/**
31 * Call a program and retrieve its last line of output.
32 * @param call The program to run.
33 * @return The last line of its output.
34 * @note The returned value points to static storage that will be overwritten with each call.
35 */
36char *call_program_and_get_last_line_of_output(char *call)
37{
38 /*@ buffers ***************************************************** */
39 static char result[512];
40 char *tmp = NULL;
41
42 /*@ pointers **************************************************** */
43 FILE *fin;
44
45 /*@ initialize data ********************************************* */
46 result[0] = '\0';
47
48 /*@******************************************************************** */
49
50 assert_string_is_neither_NULL_nor_zerolength(call);
51 if ((fin = popen(call, "r"))) {
52 for (mr_getline(tmp, fin); !feof(fin); mr_getline(tmp, fin)) {
53 if (strlen(tmp) > 1) {
54 strncpy(result, 511, tmp);
55 }
56 mr_free(tmp);
57 }
58 mr_free(tmp);
59 paranoid_pclose(fin);
60 } else {
61 log_OS_error("Unable to popen call");
62 }
63 strip_spaces(result);
64 return (result);
65}
66
67
68
69
70
71
72#define MONDO_POPMSG "Your PC will not retract the CD tray automatically. Please call mondoarchive with the -m (manual CD tray) flag."
73
74/**
75 * Call mkisofs to create an ISO image.
76 * @param bkpinfo The backup information structure. Fields used:
77 * - @c bkpinfo->manual_cd_tray
78 * - @c bkpinfo->backup_media_type
79 * - @c bkpinfo->please_dont_eject_when_restoring
80 * @param basic_call The call to mkisofs. May contain tokens that will be resolved to actual data. The tokens are:
81 * - @c _ISO_ will become the ISO file (@p isofile)
82 * - @c _CD#_ becomes the CD number (@p cd_no)
83 * - @c _ERR_ becomes the logfile (@p g_logfile)
84 * @param isofile Replaces @c _ISO_ in @p basic_call. Should probably be the ISO image to create (-o parameter to mkisofs).
85 * @param cd_no Replaces @c _CD#_ in @p basic_call. Should probably be the CD number.
86 * @param what_i_am_doing The action taking place (e.g. "Making ISO #1"). Used as the title of the progress dialog.
87 * @return Exit code of @c mkisofs (0 is success, anything else indicates failure).
88 */
89int
90eval_call_to_make_ISO(char *basic_call, char *isofile, int cd_no, char *what_i_am_doing) {
91
92 /*@ int's *** */
93 int retval = 0;
94
95
96 /*@ buffers *** */
97 char *midway_call = NULL;
98 char *ultimate_call = NULL;
99 char *tmp = NULL;
100 char *incoming, *old_stderr;
101
102 char *cd_number_str = NULL;
103 char *command = NULL;
104 char *p;
105 char *tmp1 = NULL;
106 char *tmp2 = NULL;
107
108/*@*********** End Variables ***************************************/
109
110 log_msg(3, "Starting");
111 assert(bkpinfo != NULL);
112 assert_string_is_neither_NULL_nor_zerolength(isofile);
113 malloc_string(incoming);
114 malloc_string(old_stderr);
115
116 incoming[0] = '\0';
117 old_stderr[0] = '\0';
118
119 if (bkpinfo->nfs_user) {
120 mr_asprintf(tmp1, "su - %s -c \"%s\"", bkpinfo->nfs_user, basic_call);
121 } else {
122 mr_asprintf(tmp1, "%s", basic_call);
123 }
124
125 mr_asprintf(cd_number_str, "%d", cd_no);
126 log_msg(4, "basic call = '%s'", tmp1);
127 midway_call = resolve_naff_tokens(tmp1, isofile, "_ISO_");
128 mr_free(tmp1);
129
130 log_msg(4, "midway_call = '%s'", midway_call);
131 tmp = resolve_naff_tokens(midway_call, cd_number_str, "_CD#_");
132 mr_free(cd_number_str);
133 mr_free(midway_call);
134
135 log_msg(4, "tmp = '%s'", tmp);
136 ultimate_call = resolve_naff_tokens(tmp, MONDO_LOGFILE, "_ERR_");
137 mr_free(tmp);
138
139 log_msg(4, "ultimate call = '%s'", ultimate_call);
140 mr_asprintf(command, "%s >> %s", ultimate_call, MONDO_LOGFILE);
141 mr_free(ultimate_call);
142
143 log_to_screen
144 ("Please be patient. Do not be alarmed by on-screen inactivity.");
145 log_msg(4, "Calling open_evalcall_form() with what_i_am_doing='%s'",
146 what_i_am_doing);
147 if (bkpinfo->manual_cd_tray) {
148 mr_asprintf(tmp2, "%s", command);
149 p = strstr(tmp2, "2>>");
150 if (p) {
151 *p++ = ' ';
152 *p++ = ' ';
153 *p++ = ' ';
154 while (*p == ' ') {
155 p++;
156 }
157 for (; (*p != ' ') && (*p != '\0'); p++) {
158 *p = ' ';
159 }
160 }
161 mr_free(command);
162 command = tmp2;
163 if (!g_text_mode) {
164 newtSuspend();
165 }
166 log_msg(1, "command = '%s'", command);
167 retval += system(command);
168 if (!g_text_mode) {
169 newtResume();
170 }
171 if (retval) {
172 popup_and_OK("mkisofs and/or cdrecord returned an error. CD was not created");
173 }
174 }
175 /* if text mode then do the above & RETURN; if not text mode, do this... */
176 else {
177 log_msg(3, "command = '%s'", command);
178 retval = run_external_binary_with_percentage_indicator_NEW(what_i_am_doing, command);
179 }
180 mr_free(command);
181 paranoid_free(incoming);
182 paranoid_free(old_stderr);
183 return (retval);
184}
185
186
187/**
188 * Call copy of data to create an USB image.
189 * @param bkpinfo The backup information structure. Fields used:
190 * - @c bkpinfo->backup_media_type
191 * @return Exit code of @c copy (0 is success, anything else indicates failure).
192 */
193int
194eval_call_to_make_USB(char *command, char *what_i_am_doing) {
195
196 /*@ int's *** */
197 int retval = 0;
198
199
200/*@*********** End Variables ***************************************/
201
202 log_msg(3, "Starting");
203 assert(bkpinfo != NULL);
204
205 log_to_screen
206 ("Please be patient. Do not be alarmed by on-screen inactivity.");
207 log_msg(4, "Calling open_evalcall_form() with what_i_am_doing='%s'",
208 what_i_am_doing);
209
210 if (!g_text_mode) {
211 newtSuspend();
212 }
213 log_msg(1, "command = '%s'", command);
214 if (!g_text_mode) {
215 retval = run_external_binary_with_percentage_indicator_NEW(what_i_am_doing, command);
216 } else {
217 retval += system(command);
218 }
219 if (!g_text_mode) {
220 newtResume();
221 }
222
223 return (retval);
224}
225
226
227
228
229/**
230 * Run a program and log its output (stdout and stderr) to the logfile.
231 * @param program The program to run. Passed to the shell, so you can use pipes etc.
232 * @param debug_level If @p g_loglevel is higher than this, do not log the output.
233 * @return The exit code of @p program (depends on the command, but 0 almost always indicates success).
234 */
235int run_program_and_log_output(char *program, int debug_level)
236{
237 /*@ buffer ****************************************************** */
238 char *callstr = NULL;
239 char incoming[MAX_STR_LEN * 2];
240 char *tmp1 = NULL;
241
242 /*@ int ********************************************************* */
243 int res;
244 bool log_if_failure = FALSE;
245 bool log_if_success = FALSE;
246
247 /*@ pointers *************************************************** */
248 FILE *fin;
249 char *p;
250
251 /*@ end vars *************************************************** */
252
253 assert(program != NULL);
254 if (!program[0]) {
255 log_msg(2, "Warning - asked to run zerolength program");
256 return (1);
257 }
258
259 if (debug_level <= g_loglevel) {
260 log_if_success = TRUE;
261 log_if_failure = TRUE;
262 }
263 mr_asprintf(callstr, "%s > %s/mondo-run-prog-thing.tmp 2> %s/mondo-run-prog-thing.err", program, bkpinfo->tmpdir, bkpinfo->tmpdir);
264 while ((p = strchr(callstr, '\r'))) {
265 *p = ' ';
266 }
267 while ((p = strchr(callstr, '\n'))) {
268 *p = ' ';
269 } /* single '=' is intentional */
270
271
272 res = system(callstr);
273 if (((res == 0) && log_if_success) || ((res != 0) && log_if_failure)) {
274 log_msg(0, "running: %s", callstr);
275 log_msg(0, "--------------------------------start of output-----------------------------");
276 }
277 mr_free(callstr);
278
279 mr_asprintf(callstr, "cat %s/mondo-run-prog-thing.err >> %s/mondo-run-prog-thing.tmp 2> /dev/null", bkpinfo->tmpdir, bkpinfo->tmpdir);
280 if (log_if_failure && system(callstr)) {
281 log_OS_error("Command failed");
282 }
283 mr_free(callstr);
284
285 mr_asprintf(tmp1, "%s/mondo-run-prog-thing.err", bkpinfo->tmpdir);
286 unlink(tmp1);
287 mr_free(tmp1);
288
289 mr_asprintf(tmp1, "%s/mondo-run-prog-thing.tmp", bkpinfo->tmpdir);
290 fin = fopen(tmp1, "r");
291 if (fin) {
292 for (fgets(incoming, MAX_STR_LEN, fin); !feof(fin); fgets(incoming, MAX_STR_LEN, fin)) {
293 p = incoming;
294 while (p && *p) {
295 if ((p = strchr(p, '%'))) {
296 memmove(p, p + 1, strlen(p) + 1);
297 p += 2;
298 }
299 }
300 strip_spaces(incoming);
301 if ((res == 0 && log_if_success) || (res != 0 && log_if_failure)) {
302 log_msg(0, incoming);
303 }
304 }
305 paranoid_fclose(fin);
306 }
307 unlink(tmp1);
308 mr_free(tmp1);
309
310 if ((res == 0 && log_if_success) || (res != 0 && log_if_failure)) {
311 log_msg(0,
312 "--------------------------------end of output------------------------------");
313 if (res) {
314 log_msg(0, "...ran with res=%d", res);
315 } else {
316 log_msg(0, "...ran just fine. :-)");
317 }
318 }
319 return (res);
320}
321
322
323
324/**
325 * Run a program and log its output to the screen.
326 * @param basic_call The program to run.
327 * @param what_i_am_doing The title of the evalcall form.
328 * @return The return value of the command (varies, but 0 almost always means success).
329 * @see run_program_and_log_output
330 * @see log_to_screen
331 */
332int run_program_and_log_to_screen(char *basic_call, char *what_i_am_doing)
333{
334 /*@ int ******************************************************** */
335 int retval = 0;
336 int res = 0;
337 int i;
338
339 /*@ pointers **************************************************** */
340 FILE *fin;
341
342 /*@ buffers **************************************************** */
343 char *command = NULL;
344 char *lockfile = NULL;
345
346 /*@ end vars *************************************************** */
347
348 assert_string_is_neither_NULL_nor_zerolength(basic_call);
349
350 mr_asprintf(lockfile, "%s/mojo-jojo.bla.bla", bkpinfo->tmpdir);
351
352 mr_asprintf(command, "echo hi > %s ; %s >> %s 2>> %s; res=$?; sleep 1; rm -f %s; exit $res", lockfile, basic_call, MONDO_LOGFILE, MONDO_LOGFILE, lockfile);
353 open_evalcall_form(what_i_am_doing);
354 log_msg(2, "Executing %s", basic_call);
355
356 if (!(fin = popen(command, "r"))) {
357 log_OS_error("Unable to popen-in command");
358 log_to_screen("Failed utterly to call '%s'", command);
359 mr_free(command);
360 mr_free(lockfile);
361 return (1);
362 }
363 mr_free(command);
364
365 if (!does_file_exist(lockfile)) {
366 log_to_screen("Waiting for external binary to start");
367 for (i = 0; i < 60 && !does_file_exist(lockfile); sleep(1), i++) {
368 log_msg(3, "Waiting for lockfile %s to exist", lockfile);
369 }
370 }
371
372 for (; does_file_exist(lockfile); sleep(1)) {
373 log_file_end_to_screen(MONDO_LOGFILE, "");
374 update_evalcall_form(1);
375 }
376
377 /* Evaluate the status returned by pclose to get the exit code of the called program. */
378 errno = 0;
379 res = pclose(fin);
380 /* Log actual pclose errors. */
381 if (errno) log_msg(5, "pclose err: %d", errno);
382 /* Check if we have a valid status. If we do, extract the called program's exit code. */
383 /* If we don't, highlight this fact by returning -1. */
384 if (WIFEXITED(res)) {
385 retval = WEXITSTATUS(res);
386 } else {
387 retval = -1;
388 }
389 close_evalcall_form();
390 unlink(lockfile);
391 mr_free(lockfile);
392
393 return (retval);
394}
395
396
397
398
399/**
400 * Apparently unused. @bug This has a purpose, but what?
401 */
402#define PIMP_START_SZ "STARTSTARTSTART9ff3kff9a82gv34r7fghbkaBBC2T231hc81h42vws8"
403#define PIMP_END_SZ "ENDENDEND0xBBC10xBBC2T231hc81h42vws89ff3kff9a82gv34r7fghbka"
404
405
406
407
408int copy_from_src_to_dest(FILE * f_orig, FILE * f_archived, char direction)
409{
410// if dir=='w' then copy from orig to archived
411// if dir=='r' then copy from archived to orig
412 char *tmp = NULL;
413 char *tmp1 = NULL;
414 char *buf = NULL;
415 char *filestr = NULL;
416 long int bytes_to_be_read, bytes_read_in, bytes_written_out =
417 0, bufcap, subsliceno = 0;
418 int retval = 0;
419 FILE *fin;
420 FILE *fout;
421 FILE *ftmp;
422 int tmpcap = 512;
423
424 log_msg(5, "Opening.");
425
426 bufcap = 256L * 1024L;
427 if (!(buf = malloc(bufcap))) {
428 fatal_error("Failed to malloc() buf");
429 }
430
431 if (direction == 'w') {
432 fin = f_orig;
433 fout = f_archived;
434 mr_asprintf(tmp, "%-64s", PIMP_START_SZ);
435 if (fwrite(tmp, 1, 64, fout) != 64) {
436 mr_free(tmp);
437 fatal_error("Can't write the introductory block");
438 }
439 mr_free(tmp);
440
441 while (1) {
442 bytes_to_be_read = bytes_read_in = fread(buf, 1, bufcap, fin);
443 if (bytes_read_in == 0) {
444 break;
445 }
446 mr_asprintf(tmp, "%-64ld", bytes_read_in);
447 if (fwrite(tmp, 1, 64, fout) != 64) {
448 mr_free(tmp);
449 fatal_error("Cannot write introductory block");
450 }
451 mr_free(tmp);
452
453 log_msg(7,
454 "subslice #%ld --- I have read %ld of %ld bytes in from f_orig",
455 subsliceno, bytes_read_in, bytes_to_be_read);
456 bytes_written_out += fwrite(buf, 1, bytes_read_in, fout);
457 mr_asprintf(tmp, "%-64ld", subsliceno);
458 if (fwrite(tmp, 1, 64, fout) != 64) {
459 mr_free(tmp);
460 fatal_error("Cannot write post-thingy block");
461 }
462 mr_free(tmp);
463 log_msg(7, "Subslice #%d written OK", subsliceno);
464 subsliceno++;
465 }
466 mr_asprintf(tmp, "%-64ld", 0L);
467 if (fwrite(tmp, 1, 64L, fout) != 64L) {
468 mr_free(tmp);
469 fatal_error("Cannot write final introductory block");
470 }
471 mr_free(tmp);
472
473 mr_asprintf(tmp, "%-64s", PIMP_END_SZ);
474 if (fwrite(tmp, 1, 64, fout) != 64) {
475 mr_free(tmp);
476 fatal_error("Can't write the final block");
477 }
478 mr_free(tmp);
479 } else {
480 fin = f_archived;
481 fout = f_orig;
482 if (!(tmp1 = malloc(tmpcap))) {
483 fatal_error("Failed to malloc() tmp");
484 }
485 if (fread(tmp1, 1, 64L, fin) != 64L) {
486 mr_free(tmp1);
487 fatal_error("Cannot read the introductory block");
488 }
489 log_msg(5, "tmp1 is %s", tmp1);
490 if (!strstr(tmp1, PIMP_START_SZ)) {
491 mr_free(tmp1);
492 fatal_error("Can't find intro blk");
493 }
494 if (fread(tmp1, 1, 64L, fin) != 64L) {
495 mr_free(tmp1);
496 fatal_error("Cannot read introductory blk");
497 }
498 bytes_to_be_read = atol(tmp1);
499 while (bytes_to_be_read > 0) {
500 log_msg(7, "subslice#%ld, bytes=%ld", subsliceno, bytes_to_be_read);
501 bytes_read_in = fread(buf, 1, bytes_to_be_read, fin);
502 if (bytes_read_in != bytes_to_be_read) {
503 mr_free(tmp1);
504 fatal_error("Danger, WIll Robinson. Failed to read whole subvol from archives.");
505 }
506 bytes_written_out += fwrite(buf, 1, bytes_read_in, fout);
507 if (fread(tmp1, 1, 64, fin) != 64) {
508 mr_free(tmp1);
509 fatal_error("Cannot read post-thingy block");
510 }
511 if (atol(tmp1) != subsliceno) {
512 log_msg(1, "Wanted subslice %ld but got %ld ('%s')", subsliceno, atol(tmp1), tmp1);
513 }
514 log_msg(7, "Subslice #%ld read OK", subsliceno);
515 subsliceno++;
516 if (fread(tmp1, 1, 64, fin) != 64) {
517 mr_free(tmp1);
518 fatal_error("Cannot read introductory block");
519 }
520 bytes_to_be_read = atol(tmp1);
521 }
522 log_msg(1, "tmpA is %s", tmp1);
523 if (!strstr(tmp1, PIMP_END_SZ)) {
524 if (fread(tmp1, 1, 64, fin) != 64) {
525 mr_free(tmp1);
526 fatal_error("Can't read the final block");
527 }
528 log_msg(5, "tmpB is %s", tmp1);
529 if (!strstr(tmp1, PIMP_END_SZ)) {
530 mr_asprintf(filestr, "%s/out.leftover", bkpinfo->tmpdir);
531 ftmp = fopen(filestr, "w");
532 mr_free(filestr);
533
534 bytes_read_in = fread(tmp1, 1, 64, fin);
535 log_msg(1, "bytes_read_in = %ld", bytes_read_in);
536
537 fwrite(tmp1, 1, bytes_read_in, ftmp);
538 fread(tmp1, 1, tmpcap, fin);
539 log_msg(0, "tmp1 = '%s'", tmp1);
540 fwrite(tmp1, 1, tmpcap, ftmp);
541 fclose(ftmp);
542 mr_free(tmp1);
543 fatal_error("Missing terminating block");
544 }
545 }
546 mr_free(tmp1);
547 }
548
549 paranoid_free(buf);
550 log_msg(3, "Successfully copied %ld bytes", bytes_written_out);
551 return (retval);
552}
553
554
555
556
557/**
558 * Feed @p input_device through ntfsclone to @p output_fname.
559 * @param input_device The device to image.
560 * @param output_fname The file to write.
561 * @return 0 for success, nonzero for failure.
562 */
563int feed_into_ntfsprog(char *input_device, char *output_fname)
564{
565// BACKUP
566 int res = -1;
567 char *command = NULL;
568
569 if (!does_file_exist(input_device)) {
570 fatal_error("input device does not exist");
571 }
572 command = find_home_of_exe("ntfsclone");
573 if (!command) {
574 mr_free(command);
575 fatal_error("ntfsclone not found");
576 }
577 mr_free(command);
578
579 mr_asprintf(command, "ntfsclone --force --save-image --overwrite %s %s", output_fname, input_device);
580 res = run_program_and_log_output(command, 5);
581 mr_free(command);
582
583 unlink(output_fname);
584 return (res);
585}
586
587
588void *run_prog_in_bkgd_then_exit(void *info)
589{
590 char *sz_command;
591 static int res = 4444;
592
593 res = 999;
594 sz_command = (char *) info;
595 log_msg(4, "sz_command = '%s'", sz_command);
596 res = system(sz_command);
597 if (res > 256 && res != 4444) {
598 res = res / 256;
599 }
600 log_msg(4, "child res = %d", res);
601 sz_command[0] = '\0';
602 pthread_exit((void *) (&res));
603}
604
605
606
607
608int run_external_binary_with_percentage_indicator_NEW(char *tt, char *cmd) {
609
610 /*@ int *************************************************************** */
611 int res = 0;
612 int percentage = 0;
613 int maxpc = 100;
614 int pcno = 0;
615 int last_pcno = 0;
616 int counter = 0;
617
618 /*@ buffers *********************************************************** */
619 char *command = NULL;
620 char *title = NULL;
621 /*@ pointers ********************************************************** */
622 static int chldres = 0;
623 int *pchild_result;
624 pthread_t childthread;
625
626 pchild_result = &chldres;
627 assert_string_is_neither_NULL_nor_zerolength(cmd);
628 assert_string_is_neither_NULL_nor_zerolength(tt);
629 *pchild_result = 999;
630
631 mr_asprintf(command, "%s 2>> %s", cmd, MONDO_LOGFILE);
632 log_msg(3, "command = '%s'", command);
633 if ((res = pthread_create(&childthread, NULL, run_prog_in_bkgd_then_exit, (void *) command))) {
634 fatal_error("Unable to create an archival thread");
635 }
636
637 log_msg(8, "Parent running");
638 mr_asprintf(title, "%s", tt);
639 open_evalcall_form(title);
640 mr_free(title);
641
642 for (sleep(1); command[0] != '\0'; sleep(1)) {
643 pcno = grab_percentage_from_last_line_of_file(MONDO_LOGFILE);
644 if (pcno < 0 || pcno > 100) {
645 log_msg(8, "Weird pc# %d", pcno);
646 continue;
647 }
648 percentage = pcno * 100 / maxpc;
649 if (pcno <= 5 && last_pcno >= 40) {
650 close_evalcall_form();
651 mr_asprintf(title, "Verifying...");
652 open_evalcall_form(title);
653 mr_free(title);
654 }
655 if (counter++ >= 5) {
656 counter = 0;
657 log_file_end_to_screen(MONDO_LOGFILE, "");
658 }
659 last_pcno = pcno;
660 update_evalcall_form(percentage);
661 }
662 mr_free(command);
663
664 log_file_end_to_screen(MONDO_LOGFILE, "");
665 close_evalcall_form();
666 pthread_join(childthread, (void *) (&pchild_result));
667 if (pchild_result) {
668 res = *pchild_result;
669 } else {
670 res = 666;
671 }
672 log_msg(3, "Parent res = %d", res);
673 return (res);
674}
675
676
677/**
678 * Feed @p input_fifo through ntfsclone (restore) to @p output_device.
679 * @param input_fifo The ntfsclone file to read.
680 * @param output_device Where to put the output.
681 * @return The return value of ntfsclone (0 for success).
682 */
683int feed_outfrom_ntfsprog(char *output_device, char *input_fifo)
684{
685// RESTORE
686 int res = -1;
687 char *command = NULL;
688
689 command = find_home_of_exe("ntfsclone");
690 if (!command) {
691 mr_free(command);
692 fatal_error("ntfsclone not found");
693 }
694 mr_free(command);
695
696 mr_asprintf(command, "ntfsclone --force --restore-image --overwrite %s %s", output_device, input_fifo);
697 res = run_program_and_log_output(command, 5);
698 mr_free(command);
699 return (res);
700}
Note: See TracBrowser for help on using the repository browser.