chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
journal: use _cleanup_
[elogind.git]
/
src
/
udev
/
udev-builtin-net_id.c
diff --git
a/src/udev/udev-builtin-net_id.c
b/src/udev/udev-builtin-net_id.c
index c55c34d614037c53136350118bf1ef282b73326b..fdbec5ae916872b7ba380355493f850cf41091b4 100644
(file)
--- a/
src/udev/udev-builtin-net_id.c
+++ b/
src/udev/udev-builtin-net_id.c
@@
-91,6
+91,7
@@
#include <linux/pci_regs.h>
#include "udev.h"
#include <linux/pci_regs.h>
#include "udev.h"
+#include "fileio.h"
enum netname_type{
NET_UNDEF,
enum netname_type{
NET_UNDEF,
@@
-255,7
+256,7
@@
static int names_pci(struct udev_device *dev, struct netnames *names) {
if (!parent)
return -ENOENT;
/* check if our direct parent is a PCI device with no other bus in-between */
if (!parent)
return -ENOENT;
/* check if our direct parent is a PCI device with no other bus in-between */
- if (streq("pci", udev_device_get_subsystem(parent))) {
+ if (streq
_ptr
("pci", udev_device_get_subsystem(parent))) {
names->type = NET_PCI;
names->pcidev = parent;
} else {
names->type = NET_PCI;
names->pcidev = parent;
} else {
@@
-413,7
+414,7
@@
static int builtin_net_id(struct udev_device *dev, int argc, char *argv[], bool
p = udev_device_get_sysattr_value(dev, "iflink");
if (!p)
return EXIT_FAILURE;
p = udev_device_get_sysattr_value(dev, "iflink");
if (!p)
return EXIT_FAILURE;
- if (
strcmp(s, p) != 0
)
+ if (
!streq(s, p)
)
return 0;
devtype = udev_device_get_devtype(dev);
return 0;
devtype = udev_device_get_devtype(dev);