Systemd/src/udev
Lennart Poettering 1d84ad9445 util-lib: various improvements to kernel command line parsing
This improves kernel command line parsing in a number of ways:

a) An kernel option "foo_bar=xyz" is now considered equivalent to
   "foo-bar-xyz", i.e. when comparing kernel command line option names "-" and
   "_" are now considered equivalent (this only applies to the option names
   though, not the option values!). Most of our kernel options used "-" as word
   separator in kernel command line options so far, but some used "_". With
   this change, which was a source of confusion for users (well, at least of
   one user: myself, I just couldn't remember that it's systemd.debug-shell,
   not systemd.debug_shell). Considering both as equivalent is inspired how
   modern kernel module loading normalizes all kernel module names to use
   underscores now too.

b) All options previously using a dash for separating words in kernel command
   line options now use an underscore instead, in all documentation and in
   code. Since a) has been implemented this should not create any compatibility
   problems, but normalizes our documentation and our code.

c) All kernel command line options which take booleans (or are boolean-like)
   have been reworked so that "foobar" (without argument) is now equivalent to
   "foobar=1" (but not "foobar=0"), thus normalizing the handling of our
   boolean arguments. Specifically this means systemd.debug-shell and
   systemd_debug_shell=1 are now entirely equivalent.

d) All kernel command line options which take an argument, and where no
   argument is specified will now result in a log message. e.g. passing just
   "systemd.unit" will no result in a complain that it needs an argument. This
   is implemented in the proc_cmdline_missing_value() function.

e) There's now a call proc_cmdline_get_bool() similar to proc_cmdline_get_key()
   that parses booleans (following the logic explained in c).

f) The proc_cmdline_parse() call's boolean argument has been replaced by a new
   flags argument that takes a common set of bits with proc_cmdline_get_key().

g) All kernel command line APIs now begin with the same "proc_cmdline_" prefix.

h) There are now tests for much of this. Yay!
2016-12-21 19:09:08 +01:00
..
ata_id tree-wide: group include of libudev.h with sd-* 2015-11-17 07:06:08 +01:00
cdrom_id tree-wide: group include of libudev.h with sd-* 2015-11-17 07:06:08 +01:00
collect Revert some uses of xsprintf 2016-11-02 22:36:29 -04:00
mtd_probe tree-wide: minor formatting inconsistency cleanups 2016-02-23 14:20:34 -08:00
net util-lib: various improvements to kernel command line parsing 2016-12-21 19:09:08 +01:00
scsi_id tree-wide: place #pragma once at the same place everywhere 2016-02-20 22:42:29 +01:00
v4l_id tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
.gitignore keymap: Drop keyboard-keys-to-name.h 2015-10-14 07:15:58 +02:00
.vimrc
Makefile
udev-builtin-blkid.c udev-builtin-blkid: fix GPT_FLAG_NO_AUTO check for ESP (#3450) 2016-06-09 10:51:20 +02:00
udev-builtin-btrfs.c tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
udev-builtin-hwdb.c tree-wide: drop NULL sentinel from strjoin 2016-10-23 11:43:27 -04:00
udev-builtin-input_id.c Fix tablet detection, by replicating decision tree of non-multi-touch axes (#3724) 2016-07-14 22:42:10 +02:00
udev-builtin-keyboard.c tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
udev-builtin-kmod.c tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
udev-builtin-net_id.c tree-wide: replace all readdir cycles with FOREACH_DIRENT{,_ALL} (#4853) 2016-12-09 10:04:30 +01:00
udev-builtin-net_setup_link.c tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
udev-builtin-path_id.c tree-wide: replace all readdir cycles with FOREACH_DIRENT{,_ALL} (#4853) 2016-12-09 10:04:30 +01:00
udev-builtin-uaccess.c tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
udev-builtin-usb_id.c tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
udev-builtin.c tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
udev-ctrl.c Rename formats-util.h to format-util.h 2016-11-07 10:15:08 -05:00
udev-event.c Rename formats-util.h to format-util.h 2016-11-07 10:15:08 -05:00
udev-node.c tree-wide: replace all readdir cycles with FOREACH_DIRENT{,_ALL} (#4853) 2016-12-09 10:04:30 +01:00
udev-rules.c tree-wide: replace all readdir cycles with FOREACH_DIRENT{,_ALL} (#4853) 2016-12-09 10:04:30 +01:00
udev-watch.c tree-wide: replace all readdir cycles with FOREACH_DIRENT{,_ALL} (#4853) 2016-12-09 10:04:30 +01:00
udev.conf
udev.h include sys/sysmacros.h in more places 2016-03-14 23:29:10 -04:00
udev.pc.in
udevadm-control.c udevadm: use parse_sec instead of atoi for timeout option (#4331) 2016-10-11 09:08:04 +02:00
udevadm-hwdb.c tree-wide: drop NULL sentinel from strjoin 2016-10-23 11:43:27 -04:00
udevadm-info.c tree-wide: replace all readdir cycles with FOREACH_DIRENT{,_ALL} (#4853) 2016-12-09 10:04:30 +01:00
udevadm-monitor.c udev: remove duplicate flag 2016-12-06 00:09:43 +01:00
udevadm-settle.c tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
udevadm-test-builtin.c tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
udevadm-test.c tree-wide: minor formatting inconsistency cleanups 2016-02-23 14:20:34 -08:00
udevadm-trigger.c tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
udevadm-util.c tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
udevadm-util.h tree-wide: place #pragma once at the same place everywhere 2016-02-20 22:42:29 +01:00
udevadm.c selinux: always try to load the full selinux db 2016-03-01 20:39:30 -05:00
udevd.c util-lib: various improvements to kernel command line parsing 2016-12-21 19:09:08 +01:00