diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2019-01-13 17:55:33 +0900 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2019-01-13 18:04:10 +0900 |
commit | 8d6c4b310d8550871f37858ff0bb26425c7bc1df (patch) | |
tree | 439baf60cb1262287a11af2799de0fd4a947e28a | |
parent | a1193286085ba0b6962df4e4a5fed0a3dc553772 (diff) | |
download | systemd-8d6c4b310d8550871f37858ff0bb26425c7bc1df.tar.gz systemd-8d6c4b310d8550871f37858ff0bb26425c7bc1df.tar.bz2 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.
-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; } |