diff --git a/src/id128/id128.c b/src/id128/id128.c index a4452f1cc5..5326ef1f51 100644 --- a/src/id128/id128.c +++ b/src/id128/id128.c @@ -52,6 +52,10 @@ static int verb_new(int argc, char *argv[], uintptr_t _data, void *userdata) { sd_id128_t id; int r; + if (!sd_id128_is_null(arg_app)) + return log_error_errno(SYNTHETIC_ERRNO(EINVAL), + "Verb \"new\" cannot be combined with --app-specific=."); + r = sd_id128_randomize(&id); if (r < 0) return log_error_errno(r, "Failed to generate ID: %m"); diff --git a/test/units/TEST-74-AUX-UTILS.id128.sh b/test/units/TEST-74-AUX-UTILS.id128.sh index 5da2323461..518642442d 100755 --- a/test/units/TEST-74-AUX-UTILS.id128.sh +++ b/test/units/TEST-74-AUX-UTILS.id128.sh @@ -36,7 +36,6 @@ systemd-id128 show root --value --json=short | jq -e '.id | type == "string"' systemd-id128 --json=short new | jq -e '.id | type == "string"' systemd-id128 new -p systemd-id128 new -u -systemd-id128 new -a 4f68bce3e8cd4db196e7fbcaf984b709 systemd-id128 machine-id assert_eq "$(systemd-id128 --json=short machine-id | jq --raw-output .id)" "$(