summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2009-07-21 11:38:35 +0200
committerMarcel Holtmann <marcel@holtmann.org>2009-07-21 11:38:35 +0200
commitb4bbbe6e9c7e5e0b6c2f57676fe05417a3e471db (patch)
treec7e9d696434f04863eb796beca7bfad4fb0c81b2
parent952e96d67074370fca4f520911d6e364a77de7f2 (diff)
downloadconnman-b4bbbe6e9c7e5e0b6c2f57676fe05417a3e471db.tar.gz
connman-b4bbbe6e9c7e5e0b6c2f57676fe05417a3e471db.tar.bz2
connman-b4bbbe6e9c7e5e0b6c2f57676fe05417a3e471db.zip
Use a proper udev function for getting network device
-rw-r--r--src/udev.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/udev.c b/src/udev.c
index 4decd7d5..cf0f3bb1 100644
--- a/src/udev.c
+++ b/src/udev.c
@@ -286,11 +286,9 @@ char *__connman_udev_get_devtype(const char *ifname)
{
struct udev_device *device;
const char *devtype;
- char syspath[128];
- snprintf(syspath, sizeof(syspath) - 1, "/sys/class/net/%s", ifname);
-
- device = udev_device_new_from_syspath(udev_ctx, syspath);
+ device = udev_device_new_from_subsystem_sysname(udev_ctx,
+ "net", ifname);
if (device == NULL)
return NULL;