Package: freebsd-utils / 10.1~svn273304-1

024_devfs.diff Patch series | download
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
35
36
37
38
39
40
41
42
43
44
--- a/src/sbin/devfs/extern.h
+++ b/src/sbin/devfs/extern.h
@@ -50,7 +50,7 @@
 uint16_t eatonum(const char *);
 size_t efgetln(FILE *, char **);
 void tokenize(const char *, int *, char ***);
-void usage(void) __dead2;
+void usage(void);
 
 extern int mpfd;		/* Mount-point file descriptor. */
 
--- a/src/sbin/devfs/Makefile
+++ b/src/sbin/devfs/Makefile
@@ -3,5 +3,6 @@
 PROG=	devfs
 SRCS=	devfs.c rule.c
 MAN=	devfs.8
+LDADD+= -lbsd
 
 .include <bsd.prog.mk>
--- a/src/sbin/devfs/rule.c
+++ b/src/sbin/devfs/rule.c
@@ -85,8 +85,8 @@
 	int ch;
 
 	setprogname("devfs rule");
-	optreset = optind = 1;
-	while ((ch = getopt(ac, av, "s:")) != -1)
+	optind = 1;
+	while ((ch = getopt(ac, av, "+s:")) != -1)
 		switch (ch) {
 		case 's':
 			in_rsnum = eatonum(optarg);
--- a/src/sbin/devfs/devfs.c
+++ b/src/sbin/devfs/devfs.c
@@ -62,7 +62,7 @@
 	int ch;
 
 	mountpt = NULL;
-	while ((ch = getopt(ac, av, "m:")) != -1)
+	while ((ch = getopt(ac, av, "+m:")) != -1)
 		switch (ch) {
 		case 'm':
 			mountpt = optarg;