From: Yu Watanabe Date: Thu, 1 Nov 2018 07:12:46 +0000 (+0900) Subject: sd-device: drop subsystem from log_device_*() X-Git-Tag: v240~403^2~7 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=38d1555d7c32c52506a456635453c536bf0ec724;p=thirdparty%2Fsystemd.git sd-device: drop subsystem from log_device_*() The sd_device object always has syspath and sysname, but subsytem may not. Also, it may take some costs to get subsystem. So, let's drop subsystem from logs. --- diff --git a/src/libsystemd/sd-device/device-util.h b/src/libsystemd/sd-device/device-util.h index e25350edc59..94f6174bff9 100644 --- a/src/libsystemd/sd-device/device-util.h +++ b/src/libsystemd/sd-device/device-util.h @@ -33,17 +33,15 @@ #define log_device_full(device, level, error, ...) \ ({ \ - const char *_sysname = NULL, *_subsystem = NULL; \ + const char *_sysname = NULL; \ sd_device *_d = (device); \ int _level = (level), _error = (error); \ \ - if (_d && _unlikely_(log_get_max_level() >= _level)) { \ + if (_d && _unlikely_(log_get_max_level() >= _level)) \ (void) sd_device_get_sysname(_d, &_sysname); \ - (void) sd_device_get_subsystem(_d, &_subsystem); \ - } \ log_object_internal(_level, _error, __FILE__, __LINE__, __func__, \ _sysname ? "DEVICE=" : NULL, _sysname, \ - _subsystem ? "SUBSYSTEM=" : NULL, _subsystem, ##__VA_ARGS__); \ + NULL, NULL, ##__VA_ARGS__); \ }) #define log_device_debug(device, ...) log_device_full(device, LOG_DEBUG, 0, ##__VA_ARGS__)