[cmds] Unmount all volumes in shutdown & reboot#1978
Conversation
Instead of only unmounting the root volume, we now iterate all mounted volumes in reverse order, and try unmounting them.
|
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! |
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
shutdownorreboot