From: Zbigniew Jędrzejewski-Szmek Date: Wed, 1 Feb 2017 23:36:09 +0000 (-0500) Subject: Consistently use ERFKILL for masked units X-Git-Tag: v233.3~82 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=0a1154544763e1e1ceec84b21ee87a101fbfb19a;p=elogind.git Consistently use ERFKILL for masked units 76ec966f0e33685f833 changed the code from ESHUTDOWN to ERFKILL, but missed one spot in bus-common-errors.c. Fix that. The code in transaction.c was checking for ERFKILL, but I'm not sure if this mismatch had any effect, i.e. if there were any code paths in which the wrong code actually made difference. Also add comments when ESHUTDOWN is used in the journal code, so it's easy to distinguish those cases when grepping. Standarize on the same capitalization. (There's also a bunch of uses in sd-bus.c, but that's clearly different.) --- diff --git a/src/libelogind/sd-bus/bus-common-errors.c b/src/libelogind/sd-bus/bus-common-errors.c index ca0271006..ea0531e21 100644 --- a/src/libelogind/sd-bus/bus-common-errors.c +++ b/src/libelogind/sd-bus/bus-common-errors.c @@ -39,7 +39,7 @@ BUS_ERROR_MAP_ELF_REGISTER const sd_bus_error_map bus_common_errors[] = { SD_BUS_ERROR_MAP(BUS_ERROR_TRANSACTION_JOBS_CONFLICTING, EDEADLK), SD_BUS_ERROR_MAP(BUS_ERROR_TRANSACTION_ORDER_IS_CYCLIC, EDEADLK), SD_BUS_ERROR_MAP(BUS_ERROR_TRANSACTION_IS_DESTRUCTIVE, EDEADLK), - SD_BUS_ERROR_MAP(BUS_ERROR_UNIT_MASKED, ESHUTDOWN), + SD_BUS_ERROR_MAP(BUS_ERROR_UNIT_MASKED, ERFKILL), SD_BUS_ERROR_MAP(BUS_ERROR_UNIT_GENERATED, EADDRNOTAVAIL), SD_BUS_ERROR_MAP(BUS_ERROR_UNIT_LINKED, ELOOP), SD_BUS_ERROR_MAP(BUS_ERROR_JOB_TYPE_NOT_APPLICABLE, EBADR),