lkml.org 
[lkml]   [2011]   [Nov]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [RFC 1/3] procfs: parse mount options
From
On Tue, Nov 15, 2011 at 7:21 PM, Vasiliy Kulikov <segoon@openwall.com> wrote:
> +
> +static int proc_parse_options(char *options, struct pid_namespace *pid)
> +{
> +       char *p;
> +       substring_t args[MAX_OPT_ARGS];
> +       int option;


'option' is unused?

> +
> +       pr_debug("proc: options = %s\n", options);
> +
> +       if (!options)
> +               return 1;
> +
> +       while ((p = strsep(&options, ",")) != NULL) {
> +               int token;
> +               if (!*p)
> +                       continue;
> +
> +               args[0].to = args[0].from = 0;
> +               token = match_token(p, tokens, args);
> +               switch (token) {
> +               default:


This switch block reads odd...

> +                       pr_err("proc: unrecognized mount option \"%s\" "
> +                              "or missing value", p);

"\n" is needed.

> +                       return 0;
> +               }
> +       }
> +
> +       return 1;
> +}


Regards.
\
 
 \ /
  Last update: 2011-11-15 12:51    [W:0.067 / U:0.156 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site