id128: when taking user input for a 128bit ID, validate syntax

Also, always accept both our simple hexdump syntax and UUID syntax.
This commit is contained in:
Lennart Poettering
2013-04-30 08:36:01 -03:00
parent 6886b0449d
commit aa96c6cb44
10 changed files with 167 additions and 64 deletions
+5
View File
@@ -222,6 +222,11 @@ static int parse_argv(int argc, char *argv[]) {
break;
case ARG_UUID:
if (!id128_is_valid(optarg)) {
log_error("Invalid UUID: %s", optarg);
return -EINVAL;
}
arg_uuid = optarg;
break;