1
0
mirror of https://github.com/systemd/systemd.git synced 2025-03-01 08:58:29 +03:00

[PATCH] add get_devnode() helper to udev_lib for udev_dbus program

This commit is contained in:
greg@kroah.com 2004-03-24 21:11:36 -08:00 committed by Greg KH
parent 7e371e86a4
commit 89fe4e00fe
2 changed files with 12 additions and 0 deletions

View File

@ -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;

View File

@ -68,6 +68,7 @@ do { \
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);