summaryrefslogtreecommitdiff
blob: d03996056a5e7f4296e9f6c988bc33b2567a220a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
--- blogd.c
+++ blogd.c
@@ -183,6 +183,7 @@
 {
     int fd, flags;
     int ptm, pts, cntrtty = 1;
+    int quiet = 0;
     pid_t pid, ppid = getppid();
     char ptsname[NAME_MAX+1];
     struct termios t;
@@ -193,7 +194,14 @@
     myname = basename(*argv);
 
     if (argc > 2)
-	error("Too many args; usage: %s [/dev/tty<X>]\n", myname);
+	error("Too many args; usage: %s [-q] [/dev/tty<X>]\n", myname);
+
+    if (argc > 1 && strcmp(argv[1], "-q") == 0) {
+	quiet = 1;
+	--argc;
+	if (argc > 2)
+	    argv[1] = argv[2];
+    }
 
     if (argc == 2)
 	tty = argv[1];
@@ -282,6 +289,7 @@
 	close(pts);
 	close(ptm);
 	close(fd);
+	if (!quiet)
 	fprintf(stdout, "\rBoot logging started on %s(%s) at %.24s\n", tty, name, stt);
 	fflush(stdout);
 	exit(0);