diff --git a/bootctrl_impl.c b/bootctrl_impl.c index 516547f..97d9034 100644 --- a/bootctrl_impl.c +++ b/bootctrl_impl.c @@ -410,8 +410,10 @@ int mark_boot_successful(unsigned slot) int ret = 0; if (successful < 0 || unbootable < 0) { - fprintf(stderr, "SLOT %s: Failed to read attributes\n", slot_suffix_arr[slot]); - ret = -1; + fprintf(stderr, + "SLOT %s: Failed to read attributes - the device is probably not A/B partitioned\n", + slot_suffix_arr[slot]); + ret = -ENODEV; goto out; } diff --git a/qbootctl.c b/qbootctl.c index 463ff25..4999084 100644 --- a/qbootctl.c +++ b/qbootctl.c @@ -194,10 +194,12 @@ int main(int argc, char **argv) return 0; case 'm': rc = impl->markBootSuccessful(slot); - if (rc < 0) + if (rc == -ENODEV) + printf("Did not mark any boot as successful, not necessary\n"); + else if (rc < 0) return 1; - printf("SLOT %s: Marked boot successful\n", - impl->getSuffix(slot)); + else + printf("SLOT %s: Marked boot successful\n", impl->getSuffix(slot)); return 0; case 'u': rc = impl->setSlotAsUnbootable(slot);