- 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;
- }
- }
-
- r = get_relative_boot_id(j, &boot_id, relative);