we should check invalite parameter, and then print a warning Signed-off-by: Libo Chen <clbchenlibo.c...@huawei.com> --- src/tools/cgconfig.c | 10 +++++++++- 1 files changed, 9 insertions(+), 1 deletions(-)
diff --git a/src/tools/cgconfig.c b/src/tools/cgconfig.c index 6aeea0f..aee84bc 100644 --- a/src/tools/cgconfig.c +++ b/src/tools/cgconfig.c @@ -133,10 +133,18 @@ int main(int argc, char *argv[]) break; default: usage(argv[0]); - break; + error = -1; + goto err; } } + if (argv[optind]) { + fprintf(stderr, "%s: " + "wrong arguments (%s)\n", + argv[0], argv[optind]); + error = -1; + goto err; + } /* set default permissions */ default_group = cgroup_new_cgroup("default"); if (!default_group) { -- 1.7.1 ------------------------------------------------------------------------------ Get your SQL database under version control now! Version control is standard for application code, but databases havent caught up. So what steps can you take to put your SQL databases under version control? Why should you start doing it? Read more to find out. http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk _______________________________________________ Libcg-devel mailing list Libcg-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libcg-devel