]> git.ipfire.org Git - thirdparty/systemd.git/commit - src/libsystemd/sd-bus/bus-error.c
basic,bus-error: return negative error from errno_from_name
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 12 Jan 2016 22:19:51 +0000 (17:19 -0500)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Mon, 18 Jan 2016 20:08:25 +0000 (15:08 -0500)
commitd469dd44c4f49bafe839c6e0bceb6ce4bfe7b3fe
treeac173312566e007d69bc5a01d99a8998a423daed
parent9c4615fb09f559642742d3698ecb5a430c698230
basic,bus-error: return negative error from errno_from_name

errno_from_name used an unusual return convention where 0 meant
"not found". This tripped up config_parse_syscall_errno(),
which would treat that as success. Return -EINVAL instead,
and adjust bus_error_name_to_errno() for the new convention.

Also remove a goto which was used as a simple if and clean
up surroudning code a bit.
src/basic/errno-list.c
src/libsystemd/sd-bus/bus-error.c