diff options
author | Kay Sievers <kay.sievers@suse.de> | 2006-08-19 16:06:25 +0200 |
---|---|---|
committer | Kay Sievers <kay.sievers@suse.de> | 2006-08-19 16:06:25 +0200 |
commit | 95776dc6ec174f47fa4dd4d8abf5d457223e5dd4 (patch) | |
tree | ff9f2e24f8333d460509c7fb987ce2ecb37605e1 /udev_node.c | |
parent | eef7c9a385575375a3e3310900022b37777aeb6c (diff) |
consistent key naming to match only the event device or include all parent devices
This scheme is more consistent and makes it obvious if a match happens
against the event device only, or the full chain of parent devices.
The old key names are now:
BUS -> SUBSYSTEMS
ID -> KERNELS
SYSFS -> ATTRS
DRIVER -> DRIVERS
Match keys for the event device:
KERNEL
SUBSYSTEM
ATTR
DRIVER (in a future release, for now the same as DRIVERS)
Match keys for all devices along the parent device chain:
KERNELS
SUBSYSTEMS
ATTRS
DRIVERS
ID, BUS, SYSFS are no longer mentioned in the man page but still work.
DRIVER must be converted to DRIVERS to match the new scheme. For now,
an error is logged, if DRIVER is used. In a future release, the DRIVER
key behaviour will change.
Diffstat (limited to 'udev_node.c')
-rw-r--r-- | udev_node.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/udev_node.c b/udev_node.c index 12a738e4e2..4ba1c26c5e 100644 --- a/udev_node.c +++ b/udev_node.c @@ -51,7 +51,7 @@ int udev_node_mknod(struct udevice *udev, const char *file, dev_t devt, mode_t m /* preserve node with already correct numbers, to prevent changing the inode number */ if ((stats.st_mode & S_IFMT) == (mode & S_IFMT) && (stats.st_rdev == devt)) { info("preserve file '%s', because it has correct dev_t", file); - selinux_setfilecon(file, udev->dev->kernel_name, stats.st_mode); + selinux_setfilecon(file, udev->dev->kernel, stats.st_mode); goto perms; } @@ -61,7 +61,7 @@ int udev_node_mknod(struct udevice *udev, const char *file, dev_t devt, mode_t m dbg("already present file '%s' unlinked", file); create: - selinux_setfscreatecon(file, udev->dev->kernel_name, mode); + selinux_setfscreatecon(file, udev->dev->kernel, mode); retval = mknod(file, mode, devt); selinux_resetfscreatecon(); if (retval != 0) { |