Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions bootctrl_impl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
8 changes: 5 additions & 3 deletions qbootctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down