Skip to content

Conversation

Gelbpunkt
Copy link

It is common and makes sense to ship qbootctl -m as some kind of init service that runs at boot. However, not all devices are A/B partitioned and qbootctl -m will currently return an exit code of 1 on these devices, making the init service marked as failed. We should handle this case more gracefully and exit with exit code 0 if there was nothing to do.

It is common and makes sense to ship qbootctl -m as some kind of init
service that runs at boot. However, not all devices are A/B partitioned
and qbootctl -m will currently return an exit code of 1 on these
devices, making the init service marked as failed. We should handle this
case more gracefully and exit with exit code 0 if there was nothing to
do.

Signed-off-by: Jens Reidel <[email protected]>
@kcxt
Copy link
Member

kcxt commented Apr 12, 2025

heya, thanks for this. I'm not sure how we get here on a non-A/B device since getCurrentSlot() should return an error (https://github.com/linux-msm/qbootctl/blob/main/qbootctl.c#L147)

I think we should fix whatever is wrong there. I'd also then suggest we add a --ignore-a-only flag to make qbootctl exit with 0 on A-only devices, since it might be used in an application where we /know/ the hardware is A/B and qbootctl thinking otherwise is something we'd want to know about (like some embedded device for example).

@Gelbpunkt
Copy link
Author

heya, thanks for this. I'm not sure how we get here on a non-A/B device since getCurrentSlot() should return an error (https://github.com/linux-msm/qbootctl/blob/main/qbootctl.c#L147)

We get here because goofy me wrote this patch for an older version of qbootctl :)

I'd also then suggest we add a --ignore-a-only flag to make qbootctl exit with 0 on A-only devices

I'll update the PR to do do in the next days, sorry for taking so long to get back to this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants