Added verbose flag
authorceriel <none@none>
Wed, 26 Jun 1991 17:28:15 +0000 (17:28 +0000)
committerceriel <none@none>
Wed, 26 Jun 1991 17:28:15 +0000 (17:28 +0000)
util/ego/em_ego/em_ego.c

index cfdb4dd..aeaab07 100644 (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') {