From 3d150dfb28efbaf0b25f154fb8955c47d606c3d5 Mon Sep 17 00:00:00 2001 From: "kay.sievers@vrfy.org" Date: Sun, 7 Dec 2003 09:12:07 -0800 Subject: [PATCH] experimental (very simple) SYMLINK creation > > here is a experimental symlink creation patch - for discussion, > > in which direction we should go. > > It is possible now to define SYMLINK= after the NAME= in udev.rules. > > The link is relative to the node, but the path is not optimized now > > if the node and the link are in the same nested directory. > > Only one link is supported, cause i need to sleep now :) > > > > 06-simple-symlink-creation.diff > > simple symlink creation > > reorganized udev-remove to have access to the symlink field > > subdir creation/removal are functions now > > udev-test.pl tests for link creation/removal Here is a new version with relative link target path optimization an better tests in udev-test.pl: LABEL, BUS="scsi", vendor="IBM-ESXS", NAME="1/2/a/b/node", SYMLINK="1/2/c/d/symlink" Dec 7 06:48:34 pim udev[13789]: create_node: symlink 'udev-root/1/2/c/d/symlink' to node '1/2/a/b/node' requested Dec 7 06:48:34 pim udev[13789]: create_path: created 'udev-root/1/2/c' Dec 7 06:48:34 pim udev[13789]: create_path: created 'udev-root/1/2/c/d' Dec 7 06:48:34 pim udev[13789]: create_node: symlink(../../a/b/node, udev-root/1/2/c/d/symlink) --- udev.h | 1 + 1 file changed, 1 insertion(+) (limited to 'udev.h') diff --git a/udev.h b/udev.h index 01db449481..05f6b3c225 100644 --- a/udev.h +++ b/udev.h @@ -64,6 +64,7 @@ struct udevice { int major; int minor; mode_t mode; + char symlink[NAME_SIZE]; /* fields that help us in building strings */ unsigned char bus_id[SYSFS_NAME_LEN]; -- cgit v1.2.3-54-g00ecf