Package: freebsd-utils / 10.1~svn273304-1

cli_compat.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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60

Upstream wants the "-o remount" glue in kernel, see:

http://lists.freebsd.org/pipermail/freebsd-fs/2013-July/017794.html

Also see kfreebsd-10/debian/patches/mount_remount.diff

--- a/src/sbin/mount/mount.c
+++ b/src/sbin/mount/mount.c
@@ -254,7 +254,7 @@
 	options = NULL;
 	vfslist = NULL;
 	vfstype = "ufs";
-	while ((ch = getopt(argc, argv, "adF:fLlno:prt:uvw")) != -1)
+	while ((ch = getopt(argc, argv, "adF:fLlno:prt:uvwO:")) != -1)
 		switch (ch) {
 		case 'a':
 			all = 1;
@@ -278,6 +278,9 @@
 		case 'n':
 			/* For compatibility with the Linux version of mount. */
 			break;
+		case 'O':
+			/* For compatibility with the Linux version of mount. */
+			break;
 		case 'o':
 			if (*optarg) {
 				options = catopt(options, optarg);
@@ -775,6 +778,11 @@
 			} else if (strncmp(p, groupquotaeq,
 			    sizeof(groupquotaeq) - 1) == 0) {
 				continue;
+			} else if (strcmp(p, "remount") == 0) {
+				/* Compatibility glue. */
+				append_arg(a, strdup("-o"));
+				append_arg(a, strdup("update"));
+				continue;
 			} else if (*p == '-') {
 				append_arg(a, p);
 				p = strchr(p, '=');
--- a/src/sbin/sysctl/sysctl.c
+++ b/src/sbin/sysctl/sysctl.c
@@ -93,7 +93,7 @@
 	setbuf(stdout,0);
 	setbuf(stderr,0);
 
-	while ((ch = getopt(argc, argv, "Aabdef:hiNnoqTwWxX")) != -1) {
+	while ((ch = getopt(argc, argv, "Aabdef:hiNnoqTwWxXp:")) != -1) {
 		switch (ch) {
 		case 'A':
 			/* compatibility */
@@ -111,6 +111,8 @@
 		case 'e':
 			eflag = 1;
 			break;
+		case 'p':
+			/* For compatibility with the Linux version of sysctl. */
 		case 'f':
 			conffile = optarg;
 			break;