X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=udev_utils.c;h=e6580d2c0acdca0404e17b2cddb1eee19ec0ad6d;hb=5ef42682053f57fc031d420f0a2ae3e204421b8d;hp=ca46258def32d2059430c9f75f04586886f7f312;hpb=c1ab046124ebef3c82950b91ccfd1678d9f7fe5b;p=elogind.git diff --git a/udev_utils.c b/udev_utils.c index ca46258de..e6580d2c0 100644 --- a/udev_utils.c +++ b/udev_utils.c @@ -47,15 +47,15 @@ void udev_init_device(struct udevice *udev, const char* devpath, const char *sub strfieldcpy(udev->subsystem, subsystem); if (strcmp(udev->subsystem, "block") == 0) - udev->type = 'b'; + udev->type = BLOCK; else if (strcmp(udev->subsystem, "net") == 0) - udev->type = 'n'; + udev->type = NET; else if (strncmp(udev->devpath, "/block/", 7) == 0) - udev->type = 'b'; + udev->type = BLOCK; else if (strncmp(udev->devpath, "/class/net/", 11) == 0) - udev->type = 'n'; + udev->type = NET; else if (strncmp(udev->devpath, "/class/", 7) == 0) - udev->type = 'c'; + udev->type = CLASS; udev->mode = 0660; strcpy(udev->owner, "root"); @@ -113,7 +113,7 @@ int create_path(const char *path) } /* Reset permissions on the device node, before unlinking it to make sure, - * that permisions of possible hard links will be removed to. + * that permisions of possible hard links will be removed too. */ int unlink_secure(const char *filename) {