summaryrefslogtreecommitdiff
path: root/udev_lib.c
diff options
context:
space:
mode:
authorgreg@kroah.com <greg@kroah.com>2004-03-24 21:11:36 -0800
committerGreg KH <gregkh@suse.de>2005-04-26 21:35:11 -0700
commit89fe4e00fe0ac4b5125a3a66ffe3d42366feb5da (patch)
treeb0c9928a02bc584c24dc8a00d581891eba63e9cf /udev_lib.c
parent7e371e86a420cb82948b72ca3dd93915cb8dd764 (diff)
[PATCH] add get_devnode() helper to udev_lib for udev_dbus program
Diffstat (limited to 'udev_lib.c')
-rw-r--r--udev_lib.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/udev_lib.c b/udev_lib.c
index 50598a4a31..f095513c97 100644
--- a/udev_lib.c
+++ b/udev_lib.c
@@ -53,6 +53,17 @@ char *get_devpath(void)
return devpath;
}
+char *get_devnode(void)
+{
+ char *devnode;
+
+ devnode = getenv("DEVNODE");
+ if (devnode != NULL && strlen(devnode) > NAME_SIZE)
+ devnode[NAME_SIZE-1] = '\0';
+
+ return devnode;
+}
+
char *get_seqnum(void)
{
char *seqnum;