notify: warn if notify msg specified along with --booted

This commit is contained in:
Mike Yuan 2024-01-30 02:12:15 +08:00
parent 953134a585
commit ed5f10973b
No known key found for this signature in database
GPG key ID: 417471C0A40F58B3

View file

@ -310,6 +310,9 @@ static int parse_argv(int argc, char *argv[]) {
return -EINVAL; return -EINVAL;
} }
if (have_env && arg_booted)
log_warning("Notify message specified along with --booted, ignoring.");
if (n_arg_env > 0) { if (n_arg_env > 0) {
arg_env = strv_copy_n(argv + optind, n_arg_env); arg_env = strv_copy_n(argv + optind, n_arg_env);
if (!arg_env) if (!arg_env)