- if (!arg_boot_descriptor)
- return add_match_this_boot(j);
-
- if (strlen(arg_boot_descriptor) >= 32) {
- char tmp = arg_boot_descriptor[32];
- arg_boot_descriptor[32] = '\0';
- r = sd_id128_from_string(arg_boot_descriptor, &boot_id);
- arg_boot_descriptor[32] = tmp;
-
- if (r < 0) {
- log_error("Failed to parse boot ID '%.32s': %s",
- arg_boot_descriptor, strerror(-r));
- return r;
- }
-
- offset = arg_boot_descriptor + 32;
-
- if (*offset && *offset != '-' && *offset != '+') {
- log_error("Relative boot ID offset must start with a '+' or a '-', found '%s' ", offset);
- return -EINVAL;
- }
- } else
- offset = arg_boot_descriptor;
-
- if (*offset) {
- r = safe_atoi(offset, &relative);
- if (r < 0) {
- log_error("Failed to parse relative boot ID number '%s'", offset);
- return -EINVAL;
- }
- }
+ if (arg_boot_offset == 0 && sd_id128_equal(arg_boot_id, SD_ID128_NULL))
+ return add_match_this_boot(j, arg_machine);