summaryrefslogtreecommitdiff
path: root/procfs/main.c
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2015-09-08 22:15:38 +0200
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2015-09-08 22:15:38 +0200
commit2ec3b41b65f1b7ccbe219544fd922db8fe4a0b2f (patch)
tree6ee74537720f23a7eff34781e8257705b6877833 /procfs/main.c
parentf62819106ede2d407c31d1bd71a4e87c6fe60484 (diff)
Make procfs accept none or proc as "device"
This allows "mount none /proc -t proc" to work. * procfs/main.c (argp_parser): On ARGP_KEY_ARG, accept and ignore "none" and "proc".
Diffstat (limited to 'procfs/main.c')
-rw-r--r--procfs/main.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/procfs/main.c b/procfs/main.c
index f773c09c..509f4883 100644
--- a/procfs/main.c
+++ b/procfs/main.c
@@ -130,6 +130,12 @@ argp_parser (int key, char *arg, struct argp_state *state)
/* Ignored for compatibility with Linux' procfs. */
break;
+ case ARGP_KEY_ARG:
+ if (!strcmp (arg, "none") || !strcmp (arg,"proc"))
+ /* Ignored for compatibility with Linux' procfs. */
+ break;
+ return ARGP_ERR_UNKNOWN;
+
default:
return ARGP_ERR_UNKNOWN;
}