chiark / gitweb /
[PATCH] correct enum device_type
[elogind.git] / udev_utils.c
index d572581f656b1f4822dc89fc81289a984a298c33..b650096593308f7e0e7e6c67ff64c5895940cc55 100644 (file)
@@ -53,13 +53,13 @@ int udev_init_device(struct udevice *udev, const char* devpath, const char *subs
                no_trailing_slash(udev->devpath);
 
                if (strncmp(udev->devpath, "/block/", 7) == 0)
-                       udev->type = BLOCK;
+                       udev->type = DEV_BLOCK;
                else if (strncmp(udev->devpath, "/class/net/", 11) == 0)
-                       udev->type = NET;
+                       udev->type = DEV_NET;
                else if (strncmp(udev->devpath, "/class/", 7) == 0)
-                       udev->type = CLASS;
+                       udev->type = DEV_CLASS;
                else if (strncmp(udev->devpath, "/devices/", 9) == 0)
-                       udev->type = PHYSDEV;
+                       udev->type = DEV_DEVICE;
 
                /* get kernel name */
                pos = strrchr(udev->devpath, '/');
@@ -85,8 +85,8 @@ int udev_init_device(struct udevice *udev, const char* devpath, const char *subs
        }
 
        udev->mode = 0660;
-       strcpy(udev->owner, "0");
-       strcpy(udev->group, "0");
+       strcpy(udev->owner, "root");
+       strcpy(udev->group, "root");
 
        return 0;
 }