chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
keymap: add some more Asus laptop keys
[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 57674bf2785b51c5f96a39eaa8939f514e5d2161..5719021e93bca5f0e6fe40e929b22880e3a743fc 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 {
@@
-395,7
+396,7
@@
static int builtin_net_id(struct udev_device *dev, int argc, char *argv[], bool
unsigned int i;
const char *devtype;
const char *prefix = "en";
unsigned int i;
const char *devtype;
const char *prefix = "en";
- struct netnames names;
+ struct netnames names
= {}
;
int err;
/* handle only ARPHRD_ETHER devices */
int err;
/* handle only ARPHRD_ETHER devices */
@@
-424,7
+425,6
@@
static int builtin_net_id(struct udev_device *dev, int argc, char *argv[], bool
prefix = "ww";
}
prefix = "ww";
}
- zero(names);
err = names_mac(dev, &names);
if (err >= 0 && names.mac_valid) {
char str[IFNAMSIZ];
err = names_mac(dev, &names);
if (err >= 0 && names.mac_valid) {
char str[IFNAMSIZ];