diff options
Diffstat (limited to 'udev_lib.c')
-rw-r--r-- | udev_lib.c | 11 |
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; |