From 38d1555d7c32c52506a456635453c536bf0ec724 Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Thu, 1 Nov 2018 16:12:46 +0900 Subject: 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. --- src/libsystemd/sd-device/device-util.h | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'src/libsystemd') diff --git a/src/libsystemd/sd-device/device-util.h b/src/libsystemd/sd-device/device-util.h index e25350edc5..94f6174bff 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__) -- cgit v1.2.3