fputs (*av, fp);
}
if (ferror (fp))
- error_msg_and_die("write error");
+ bb_error_msg_and_die("write error");
}
/* Return the number of kilobytes corresponding to a number of pages PAGES.
}
if (ferror (fp))
- error_msg_and_die("write error");
+ bb_error_msg_and_die("write error");
}
putc ('\n', fp);
if (ferror (fp))
- error_msg_and_die("write error");
+ bb_error_msg_and_die("write error");
}
/* Run command CMD and return statistics on it.
gettimeofday (&resp->start, (struct timezone *) 0);
pid = fork (); /* Run CMD as child process. */
if (pid < 0)
- error_msg_and_die("cannot fork");
+ bb_error_msg_and_die("cannot fork");
else if (pid == 0)
{ /* If child. */
/* Don't cast execvp arguments; that causes errors on some systems,
versus merely warnings if the cast is left off. */
execvp (cmd[0], cmd);
- error_msg("cannot run %s", cmd[0]);
+ bb_error_msg("cannot run %s", cmd[0]);
_exit (errno == ENOENT ? 127 : 126);
}
quit_signal = signal (SIGQUIT, SIG_IGN);
if (resuse_end (pid, resp) == 0)
- error_msg("error waiting for child process");
+ bb_error_msg("error waiting for child process");
/* Re-enable signals. */
signal (SIGINT, interrupt_signal);
output_format = posix_format;
break;
default:
- show_usage();
+ bb_show_usage();
}
argc--;
argv++;
}
if (argv == NULL || *argv == NULL)
- show_usage();
+ bb_show_usage();
run_command (argv, &res);
summarize (stdout, output_format, argv, &res);