Skip to content

Conversation

@vkoskiv
Copy link
Contributor

@vkoskiv vkoskiv commented Aug 28, 2024

Somewhat related to #1977, there was some discussion of moving this functionality to the kernel, but here is the userspace implementation I have currently.

It now unmounts all mounted volumes, instead of only the root volume when you invoke shutdown or reboot

Instead of only unmounting the root volume, we now iterate all mounted
volumes in reverse order, and try unmounting them.
@ghaerr
Copy link
Owner

ghaerr commented Aug 28, 2024

This looks pretty good, thank you. Nice feature that should already have been in place!

I think I'm willing to accept this as-is, although I'm mulling over the idea of moving some of this into the kernel or perhaps better into a single, combined .c file using argv[0] to differentiate between shutdown, poweroff and reboot. The reasoning is that you may notice that for each of the current binaries, they're exactly at 1024 bytes, with reboot unfortunately just larger. In ELKS, a disk block is 1K, so this ends up using 2 more disk blocks per floppy. Our distribution disks are so tight (even with executable compression) we have to worry about that kind of stuff around here lol.

Nonetheless, this is a very nice step in the right direction :)

Thank you!

@ghaerr ghaerr merged commit c17853e into ghaerr:master Aug 28, 2024
@vkoskiv vkoskiv deleted the umount-all branch August 29, 2024 18:12
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