SOURCES: showconsole-no-TIOCGDEV.patch (NEW), showconsole-quiet.pa...

glen glen at pld-linux.org
Tue Feb 14 02:26:25 CET 2006


Author: glen                         Date: Tue Feb 14 01:26:25 2006 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- gentoo patches

---- Files affected:
SOURCES:
   showconsole-no-TIOCGDEV.patch (NONE -> 1.1)  (NEW), showconsole-quiet.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: SOURCES/showconsole-no-TIOCGDEV.patch
diff -u /dev/null SOURCES/showconsole-no-TIOCGDEV.patch:1.1
--- /dev/null	Tue Feb 14 02:26:25 2006
+++ SOURCES/showconsole-no-TIOCGDEV.patch	Tue Feb 14 02:26:20 2006
@@ -0,0 +1,27 @@
+--- showconsole-1.07/libconsole.c.orig	2004-12-03 21:57:24.507411240 -0500
++++ showconsole-1.07/libconsole.c	2004-12-03 21:59:26.820816776 -0500
+@@ -1021,13 +1021,8 @@
+     char * name = NULL;
+     DIR * dev;
+ 
+-#ifdef TIOCGDEV
++#define TIOCGDEV       _IOR('T',0x32, unsigned int)
+     if (ioctl (0, TIOCGDEV, &tty) < 0) {
+-	if (errno == EINVAL && !getenv("NOTIOCGDEV"))
+-	    warn("Warning: the ioctl TIOCGDEV is not known by the kernel\n");
+-#else
+-#       error The ioctl TIOCGDEV is not defined (SuSE TIOCGDEV patch is missed)
+-#endif
+ 	if (!(name = ttyname(0)) || !strcmp(name, "/dev/console"))
+ 	    tty = fallback(pid, ppid);
+ 	else {
+@@ -1036,9 +1031,7 @@
+ 	    name = lnk;
+ 	    goto out;
+ 	}
+-#ifdef TIOCGDEV
+     }
+-#endif
+ 
+     if (!(dev = opendir("/dev")))
+ 	error("can not opendir(/dev): %s\n", STRERR);

================================================================
Index: SOURCES/showconsole-quiet.patch
diff -u /dev/null SOURCES/showconsole-quiet.patch:1.1
--- /dev/null	Tue Feb 14 02:26:25 2006
+++ SOURCES/showconsole-quiet.patch	Tue Feb 14 02:26:20 2006
@@ -0,0 +1,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);
================================================================


More information about the pld-cvs-commit mailing list