Added verbose flag

This commit is contained in:
ceriel 1991-06-26 17:28:15 +00:00
parent ea9332362d
commit 8583ee73f3

View file

@ -80,6 +80,8 @@ static int nphase_args;
static char *opt_dir;
static char *prog_name;
static int v_flag;
static void
cleanup()
{
@ -251,6 +253,15 @@ run_phase(phase)
fatal("Could not fork");
}
else if (pid == 0) {
if (v_flag) {
register int i = 0;
while (phargs[i]) {
fprint(STDERR, "%s ", phargs[i]);
i++;
}
fprint(STDERR, "\n");
}
(void) execv(phargs[0], phargs);
fatal("Could not exec %s", phargs[0]);
sys_stop(S_EXIT);
@ -296,6 +307,9 @@ main(argc, argv)
/* no continue; IL also needs this */
}
break;
case 'v':
v_flag = 1;
break;
case 'O':
if (argv[0][2] == '2' || argv[0][2] == '\0') continue;
if (argv[0][2] == '3') {