udevadm: Propagate return code from verb result
authorJoakim Nohlgård <joakim@nohlgard.se>
Fri, 29 Dec 2023 14:06:50 +0000 (15:06 +0100)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 29 Dec 2023 20:26:59 +0000 (05:26 +0900)
commitba340e2a75a0a16031fcb7efa05cfd250e859f17
tree910b021a5a625a69670d679764dcee49c16bce1c
parent6b9cac874c33f4fa27aa4b4b5b980f60c28ee043
udevadm: Propagate return code from verb result

udevadm lock did not propagate the return code from the child process
because all positive values were treated as success.

v2:
Now 'udevadm test-builtin' ignores all positive return values from the
builtin commands. Otherwise, as the hwdb builtin returns an positive value
when a matching entry found, 'udevadm test-builtin hwdb' will fail.

v3:
Initialize partition table before calling 'sfdisk --delete'.

Co-authored-by: Yu Watanabe <watanabe.yu+github@gmail.com>
src/udev/udevadm-test-builtin.c
src/udev/udevadm.c
test/units/testsuite-64.sh