namespaces: Use EINVAL instead of 22

Signed-off-by: Radostin Stoyanov <rstoyanov1@gmail.com>
Acked-by: Cyrill Gorcunov <gorcunov@gmail.com>
Signed-off-by: Andrei Vagin <avagin@gmail.com>
This commit is contained in:
Radostin Stoyanov 2018-12-28 08:10:07 +00:00 committed by Andrei Vagin
parent b8fdcd71f8
commit 64c6e29591

View file

@ -46,7 +46,7 @@ static unsigned int join_ns_flags;
int check_namespace_opts(void)
{
errno = 22;
errno = EINVAL;
if (join_ns_flags & opts.empty_ns) {
pr_err("Conflicting flags: --join-ns and --empty-ns\n");
return -1;
@ -71,7 +71,7 @@ static int check_int_str(char *str)
return 0;
}
errno = 22;
errno = EINVAL;
val = strtol(str, &endptr, 10);
if ((errno == ERANGE) || (endptr == str)
|| (*endptr != '\0')