summaryrefslogtreecommitdiff
path: root/src/libsystemd/sd-device/device-util.h
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2018-11-01 16:12:46 +0900
committerYu Watanabe <watanabe.yu+github@gmail.com>2018-11-06 15:45:22 +0900
commit38d1555d7c32c52506a456635453c536bf0ec724 (patch)
treef176bf176837d95ea345e8b80d59c65499c4f2f1 /src/libsystemd/sd-device/device-util.h
parent8912a99cea2c05b66ba78809eef199d04c6b862e (diff)
downloadsystemd-38d1555d7c32c52506a456635453c536bf0ec724.tar.gz
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.
Diffstat (limited to 'src/libsystemd/sd-device/device-util.h')
-rw-r--r--src/libsystemd/sd-device/device-util.h8
1 files changed, 3 insertions, 5 deletions
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__)