diff options
author | kay.sievers@vrfy.org <kay.sievers@vrfy.org> | 2005-04-02 17:45:35 +0200 |
---|---|---|
committer | Greg KH <gregkh@suse.de> | 2005-04-26 23:55:00 -0700 |
commit | 821d0ec803a72841f173739f5b713fe847edab75 (patch) | |
tree | 4866ffc8b8c367cd6e62fd0616fffde01757e3e7 /udev_utils.c | |
parent | e03a196a0d0680868ea230ab8f8d100ee90d0fa4 (diff) |
[PATCH] add RUN key to be able to run rule based notification
SUBSYSTEM=="block", RUN="/sbin/program"
will execute the program only for block device events.
ACTION="remove", SUBSYSTEM=="block", RUN"/sbin/program"
will execute the program, if a block device is removed.
Diffstat (limited to 'udev_utils.c')
-rw-r--r-- | udev_utils.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/udev_utils.c b/udev_utils.c index 4695ef0d72..5cdfb1421d 100644 --- a/udev_utils.c +++ b/udev_utils.c @@ -45,10 +45,14 @@ int udev_init_device(struct udevice *udev, const char* devpath, const char *subs memset(udev, 0x00, sizeof(struct udevice)); INIT_LIST_HEAD(&udev->symlink_list); + INIT_LIST_HEAD(&udev->run_list); if (subsystem) strlcpy(udev->subsystem, subsystem, sizeof(udev->subsystem)); + if (action) + strlcpy(udev->action, action, sizeof(udev->action)); + if (devpath) { strlcpy(udev->devpath, devpath, sizeof(udev->devpath)); remove_trailing_char(udev->devpath, '/'); |