diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2019-01-13 09:55:33 +0100 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2019-01-13 10:04:10 +0100 |
commit | 8d6c4b310d8550871f37858ff0bb26425c7bc1df (patch) | |
tree | 439baf60cb1262287a11af2799de0fd4a947e28a /src/udev/udev-builtin-hwdb.c | |
parent | udev: use SYNTHETIC_ERRNO() macro in log_device_*_errno() (diff) | |
download | systemd-8d6c4b310d8550871f37858ff0bb26425c7bc1df.tar.xz systemd-8d6c4b310d8550871f37858ff0bb26425c7bc1df.zip |
udev: use ENODATA when 'No entry found from hwdb'
Before:
IMPORT builtin 'hwdb' fails: No such file or directory
After:
IMPORT builtin 'hwdb' fails: No data available
Previous log is confusing and may be understood as hwdb file not exist.
Diffstat (limited to 'src/udev/udev-builtin-hwdb.c')
-rw-r--r-- | src/udev/udev-builtin-hwdb.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/udev/udev-builtin-hwdb.c b/src/udev/udev-builtin-hwdb.c index b0609f86b1..225e0265a4 100644 --- a/src/udev/udev-builtin-hwdb.c +++ b/src/udev/udev-builtin-hwdb.c @@ -165,7 +165,7 @@ static int builtin_hwdb(sd_device *dev, int argc, char *argv[], bool test) { if (r < 0) return log_device_debug_errno(dev, r, "Failed to lookup hwdb: %m"); if (r == 0) - return log_device_debug_errno(dev, SYNTHETIC_ERRNO(ENOENT), "No entry found from hwdb."); + return log_device_debug_errno(dev, SYNTHETIC_ERRNO(ENODATA), "No entry found from hwdb."); return r; } @@ -180,7 +180,7 @@ static int builtin_hwdb(sd_device *dev, int argc, char *argv[], bool test) { if (r < 0) return log_device_debug_errno(dev, r, "Failed to lookup hwdb: %m"); if (r == 0) - return log_device_debug_errno(dev, SYNTHETIC_ERRNO(ENOENT), "No entry found from hwdb."); + return log_device_debug_errno(dev, SYNTHETIC_ERRNO(ENODATA), "No entry found from hwdb."); return r; } |