File: ro-dev.diff

package info (click to toggle)
fgetty 0.6-4
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 144 kB
  • ctags: 45
  • sloc: ansic: 579; makefile: 84
file content (22 lines) | stat: -rw-r--r-- 727 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
Index: fgetty.c
===================================================================
RCS file: /cvs/fgetty/fgetty.c,v
retrieving revision 1.9
diff -u -r1.9 fgetty.c
--- fgetty.c	4 Oct 2005 11:45:26 -0000	1.9
+++ fgetty.c	13 Nov 2006 20:35:21 -0000
@@ -81,8 +81,12 @@
 void open_tty() {
   struct sigaction sa;
   int fd;
-  if (chown(tty,0,0) || chmod(tty,0600))
-    error("fgetty: could not chown/chmod tty device\n",1);
+  if (chown(tty,0,0) || chmod(tty,0600)) {
+    if (errno==EROFS)
+      whine("fgetty: warning: could not chown/chmod tty device: readonly filesystem");
+    else
+      error("fgetty: could not chown/chmod tty device\n",1);
+  }
   sa.sa_handler=SIG_IGN;
   sa.sa_flags=0;
   sigemptyset(&sa.sa_mask);