summaryrefslogtreecommitdiff
path: root/udev_lib.c
diff options
context:
space:
mode:
Diffstat (limited to 'udev_lib.c')
-rw-r--r--udev_lib.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/udev_lib.c b/udev_lib.c
index 4991ec3acb..bd3eeba661 100644
--- a/udev_lib.c
+++ b/udev_lib.c
@@ -29,7 +29,6 @@
#include <sys/stat.h>
#include <sys/mman.h>
-#include "libsysfs/sysfs/libsysfs.h"
#include "udev.h"
#include "logging.h"
#include "udev_lib.h"
@@ -113,6 +112,14 @@ char get_device_type(const char *path, const char *subsystem)
return '\0';
}
+void udev_set_values(struct udevice *udev, const char* devpath, const char *subsystem)
+{
+ memset(udev, 0x00, sizeof(struct udevice));
+ strfieldcpy(udev->devpath, devpath);
+ strfieldcpy(udev->subsystem, subsystem);
+ udev->type = get_device_type(devpath, subsystem);
+}
+
int file_map(const char *filename, char **buf, size_t *bufsize)
{
struct stat stats;