diff options
-rw-r--r-- | debian/changelog | 6 | ||||
-rw-r--r-- | procfs/main.c | 42 |
2 files changed, 32 insertions, 16 deletions
diff --git a/debian/changelog b/debian/changelog index dadaa49c..a6c356dc 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,6 @@ -hurd (20130620-1.1) UNRELEASED; urgency=low +hurd (20130707-1) UNRELEASED; urgency=low + + * New upstream snapshot (Closes: Bug#714733). * patches/{mount-{f,n,remount,test-opts,ignore-mounted-all,t-auto}, sutils-{types,multiple-none}}.patch: New @@ -8,7 +10,7 @@ hurd (20130620-1.1) UNRELEASED; urgency=low * patches/procfs-{update,default,get-options}.patch: New patches from Justus Winter to make procfs behave as sysvinit desires. - -- Samuel Thibault <sthibault@debian.org> Wed, 19 Jun 2013 23:32:07 +0000 + -- Samuel Thibault <sthibault@debian.org> Sun, 07 Jul 2013 22:08:24 +0000 hurd (20130620-1) unstable; urgency=low diff --git a/procfs/main.c b/procfs/main.c index 3a976ccc..1b19c013 100644 --- a/procfs/main.c +++ b/procfs/main.c @@ -42,36 +42,45 @@ argp_parser (int key, char *arg, struct argp_state *state) { struct passwd *pw; char *endp; + long int v; switch (key) { case 'h': - opt_clk_tck = strtol (arg, &endp, 0); - if (*endp || ! *arg || opt_clk_tck <= 0) - error (1, 0, "--clk-tck: HZ should be a positive integer"); + v = strtol (arg, &endp, 0); + if (*endp || ! *arg || v <= 0) + argp_error (state, "--clk-tck: HZ should be a positive integer"); + else + opt_clk_tck = v; break; case 's': - opt_stat_mode = strtol (arg, &endp, 8); - if (*endp || ! *arg || opt_stat_mode & ~07777) - error (1, 0, "--stat-mode: MODE should be an octal mode"); + v = strtol (arg, &endp, 8); + if (*endp || ! *arg || (mode_t) v & ~07777) + argp_error (state, "--stat-mode: MODE should be an octal mode"); + else + opt_stat_mode = v; break; case 'S': if (arg) { - opt_fake_self = strtol (arg, &endp, 0); + v = strtol (arg, &endp, 0); if (*endp || ! *arg) - error (1, 0, "--fake-self: PID must be an integer"); + argp_error (state, "--fake-self: PID must be an integer"); + else + opt_fake_self = v; } else opt_fake_self = 1; break; case 'k': - opt_kernel_pid = strtol (arg, &endp, 0); + v = strtol (arg, &endp, 0); if (*endp || ! *arg || (signed) opt_kernel_pid < 0) - error (1, 0, "--kernel-process: PID must be a positive integer"); + argp_error (state, "--kernel-process: PID must be a positive integer"); + else + opt_kernel_pid = v; break; case 'c': @@ -88,10 +97,12 @@ argp_parser (int key, char *arg, struct argp_state *state) break; } - opt_anon_owner = strtol (arg, &endp, 0); - if (*endp || ! *arg || (signed) opt_anon_owner < 0) - error(1, 0, "--anonymous-owner: USER should be the a user name " - "or a numeric UID."); + v = strtol (arg, &endp, 0); + if (*endp || ! *arg || v < 0) + argp_error (state, "--anonymous-owner: USER should be " + "a user name or a numeric UID."); + else + opt_anon_owner = v; break; } @@ -135,6 +146,9 @@ struct argp argp = { }, }; +/* Used by netfs_set_options to handle runtime option parsing. */ +struct argp *netfs_runtime_argp = &argp; + error_t root_make_node (struct ps_context *pc, struct node **np) { |