lsblk has a far nicer interface and is capable of doing its work
without the need for extra privileges to read superblocks (assuming
udev is behaving properly).
Add a -t option which accepts an arbitrary tag to lookup for source
device identification. If the lookup fails, fallback on the kernel
naming. With this change, -L and -U become synonyms for -t LABEL and
-t UUID, respectively.
We're kind enough to provide DM names for non-swap devices, but simply
use the /dev/dm-X nodes for swap, since that's what /proc/swaps provides
us with. Resolve the DM name out of sysfs and use this instead.
Fixes FS#32609.
bash getopts stops parsing options at the first non-option argument.
Rather than import some overblown option parser such as the one used in
makepkg or mkinitcpio, just correct the usage.
FS#31862.
Remove the -r option, forcing the user to explicitly pass a root
directory. This removes some confusion wherein we set defaults, but
wouldn't allow all the defaults to be accepted.
This also adds some mild documentation to the help output for genfstab
and pacstrap.
The %b formatter is too generic for us to use, as a sequence such as
'\b' is invalid for hex escaping, but valid for %b. Port over the logic
from util-linux's mangle mini-lib and use this instead. This supports
both 3 digits hex as well as 3 digit octal escapes, and will ignore the
more generic ascii based single character escapes. Output is always in
octal format to comply with fstab(5).
* the Makefile uses m4 to build the common lib into the scripts
* it includes install, uninstall and clean targets
* the dist target creates a source tar from a tag
Signed-off-by: Pierre Schmitz <pierre@archlinux.de>