projects
/
systemd
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6b9e861
)
ethtool: make ethtool_get_driver() return -ENODATA if ioctl succeeds but driver name...
author
Yu Watanabe
<watanabe.yu+github@gmail.com>
Mon, 9 Nov 2020 16:14:38 +0000
(
01:14
+0900)
committer
Zbigniew Jędrzejewski-Szmek
<zbyszek@in.waw.pl>
Tue, 8 Dec 2020 17:08:31 +0000
(18:08 +0100)
Inspired by #17532.
(cherry picked from commit
861de64e6858bc92b154ad70d1cee41ae5b75835
)
src/shared/ethtool-util.c
patch
|
blob
|
history
diff --git
a/src/shared/ethtool-util.c
b/src/shared/ethtool-util.c
index 14e91e3e4d00e0e8ea9a803e856b80cd1e7c16f1..abf76f5f249fb55d7cfdaf553aff0665a2a0ee96 100644
(file)
--- a/
src/shared/ethtool-util.c
+++ b/
src/shared/ethtool-util.c
@@
-170,6
+170,9
@@
int ethtool_get_driver(int *ethtool_fd, const char *ifname, char **ret) {
if (r < 0)
return -errno;
+ if (isempty(ecmd.driver))
+ return -ENODATA;
+
d = strdup(ecmd.driver);
if (!d)
return -ENOMEM;