chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
7e371e8
)
[PATCH] add get_devnode() helper to udev_lib for udev_dbus program
author
greg@kroah.com
<greg@kroah.com>
Thu, 25 Mar 2004 05:11:36 +0000
(21:11 -0800)
committer
Greg KH
<gregkh@suse.de>
Wed, 27 Apr 2005 04:35:11 +0000
(21:35 -0700)
udev_lib.c
patch
|
blob
|
history
udev_lib.h
patch
|
blob
|
history
diff --git
a/udev_lib.c
b/udev_lib.c
index 50598a4a318592d315fc942d6fead6b89ced4b41..f095513c976ef65bece0c4447afd0f85a5a852e2 100644
(file)
--- a/
udev_lib.c
+++ b/
udev_lib.c
@@
-53,6
+53,17
@@
char *get_devpath(void)
return devpath;
}
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;
char *get_seqnum(void)
{
char *seqnum;
diff --git
a/udev_lib.h
b/udev_lib.h
index 565d87e9a5a98c23accf974b554d9e7ee9867970..5db6b5261afa1e6bdc0b6bd1696da26293139239 100644
(file)
--- a/
udev_lib.h
+++ b/
udev_lib.h
@@
-68,6
+68,7
@@
do { \
extern char *get_action(void);
extern char *get_devpath(void);
extern char *get_action(void);
extern char *get_devpath(void);
+extern char *get_devnode(void);
extern char *get_seqnum(void);
extern char *get_subsystem(char *subsystem);
extern int file_map(const char *filename, char **buf, size_t *bufsize);
extern char *get_seqnum(void);
extern char *get_subsystem(char *subsystem);
extern int file_map(const char *filename, char **buf, size_t *bufsize);