diff options
author | Rob Clark <robdclark@gmail.com> | 2013-03-03 12:55:08 -0500 |
---|---|---|
committer | Anthony G. Basile <blueness@gentoo.org> | 2013-03-14 18:25:26 -0400 |
commit | 261132097e647d259c851b32c3c5798fa13cc67a (patch) | |
tree | 2983d000a6b91e6c6f0877fadc14b47df5e0adee /src/udev/udev-builtin-net_id.c | |
parent | 2ba4b1107835087a0f994f83ca4b0ee22e1227da (diff) |
udev: fix segfault with android rndis
The android gadget driver for network tethering over rndis somehow has a
parent device with a null subsystem. Probably this is bug in android driver,
but it is easy enough to make systemd/udev behave gracefully and not
segfault. And this will help for making linux distros with systemd
(like fedora) work on android devices.
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
Diffstat (limited to 'src/udev/udev-builtin-net_id.c')
-rw-r--r-- | src/udev/udev-builtin-net_id.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/udev/udev-builtin-net_id.c b/src/udev/udev-builtin-net_id.c index ca1f12fb28..36eec5aec0 100644 --- a/src/udev/udev-builtin-net_id.c +++ b/src/udev/udev-builtin-net_id.c @@ -253,7 +253,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 (streq("pci", udev_device_get_subsystem(parent))) { + if (streq_ptr("pci", udev_device_get_subsystem(parent))) { names->type = NET_PCI; names->pcidev = parent; } else { |