Re: [PATCH 1/6] procfs: fix the error handling in argp_parser

2013-06-27 Thread Emilio Pozuelo Monfort
Hi, On 27/06/13 14:31, Justus Winter wrote: > Do not exit using error (1, ..) but gracefully handle the error using > argp_error. > > * procfs/main.c (argp_parser): Proper error handling. > --- > procfs/main.c | 12 ++-- > 1 file changed, 6 insertions(+), 6 deletions(-) > > diff --git

[PATCH] tmpfs: fix parsing of fsys_set_options requests

2013-06-27 Thread Justus Winter
Formerly setting the options using fsys_set_options did not work because runtime_argp.options was set to 0. This fixes "remounting" of tmpfs translators. * tmpfs/tmpfs.c (runtime_argp): Use options as option list. --- tmpfs/tmpfs.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --

[PATCH 6/6] procfs: provide a more meaningful response to fsys_get_options

2013-06-27 Thread Justus Winter
Implement our own netfs_append_args function that provides the appropriate command line flags if the current values differ from the default values. * procfs/main.c (netfs_append_args): New function. --- procfs/main.c | 42 ++ 1 file changed, 42 insertions

[PATCH 5/6] procfs: define macros for the default argument values

2013-06-27 Thread Justus Winter
Define a macro for the default value of each command line parameter. This allows one to generate a minimal response to fsys_get_options requests. * procfs/main.c: New macro definitions for default values. --- procfs/main.c | 17 - 1 file changed, 12 insertions(+), 5 deletions(-)

[PATCH 4/6] procfs: handle the --update parameter

2013-06-27 Thread Justus Winter
Split the argument handling into a common part and one for fsys_update_options. Handle the --update parameter; for procfs this is a no-op. * procfs/main.c (common_options): New variable. (runtime_argp_parser): Handle --update. (startup_argp): New variable. (netfs_runtime_argp_): New variable. ---

[PATCH 3/6] procfs: enable fsys_set_options

2013-06-27 Thread Justus Winter
Make procfs translators handle fsys_set_options requests by pointing netfs_runtime_argp to our argp struct. * procfs/main.c (netfs_runtime_argp): New variable. --- procfs/main.c |3 +++ 1 file changed, 3 insertions(+) diff --git a/procfs/main.c b/procfs/main.c index f472f04..6251c83 100644 -

[PATCH 2/6] procfs: keep old config values if the parsing fails

2013-06-27 Thread Justus Winter
Previously if strtol failed the previous configuration value would get overwritten. Prevent this by storing the result in a temporary variable and update the configuration if the argument was parsed correctly and passed the sanity checks. * procfs/main.c (argp_parser): Keep old configuration in ca

[PATCH 1/6] procfs: fix the error handling in argp_parser

2013-06-27 Thread Justus Winter
Do not exit using error (1, ..) but gracefully handle the error using argp_error. * procfs/main.c (argp_parser): Proper error handling. --- procfs/main.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/procfs/main.c b/procfs/main.c index 3a976cc..e7f8574 100644

some work on procfs

2013-06-27 Thread Justus Winter
Hi, currently procfs doesn't allow one to alter the options at runtime using fsys_set_options. This is necessary to make mount -oremount work. I also noticed that fsys_get_options would only return the translators name, but not its options, so I've implemented this as well. FWIW this is meant to