Skip to content
Snippets Groups Projects
Commit 09fc0808 authored by Yoann Blein's avatar Yoann Blein Committed by David Bigagli
Browse files

Fix sh5util -u #950.

parent 38a8a87d
No related branches found
No related tags found
No related merge requests found
...@@ -299,7 +299,7 @@ static int _set_options(const int argc, char **argv) ...@@ -299,7 +299,7 @@ static int _set_options(const int argc, char **argv)
_init_opts(); _init_opts();
while ((cc = getopt_long(argc, argv, "d:Ehi:Ij:l:N:o:p:s:S:uUvV", while ((cc = getopt_long(argc, argv, "d:Ehi:Ij:l:N:o:p:s:S:u:UvV",
long_options, &option_index)) != EOF) { long_options, &option_index)) != EOF) {
switch (cc) { switch (cc) {
case 'd': case 'd':
...@@ -351,11 +351,11 @@ static int _set_options(const int argc, char **argv) ...@@ -351,11 +351,11 @@ static int _set_options(const int argc, char **argv)
params.keepfiles = 1; params.keepfiles = 1;
break; break;
case 'u': case 'u':
u = atoi(optarg);
if (uid_from_string(optarg, &u) < 0) { if (uid_from_string(optarg, &u) < 0) {
error("No such user --uid=\"%s\"", optarg); error("No such user --uid=\"%s\"", optarg);
return -1; return -1;
} }
params.user = uid_to_string(u);
break; break;
case 'U': case 'U':
_help_msg(); _help_msg();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment