summaryrefslogtreecommitdiff
path: root/src/udev.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/udev.c')
-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;