#include "udevdb.h"
#include "libsysfs/libsysfs.h"
-static char sysfs_path[SYSFS_PATH_MAX];
-
/*
* Right now the major/minor of a device is stored in a file called
* "dev" in sysfs.
char filename[255];
int retval = 0;
- strncpy(filename, UDEV_ROOT, sizeof(filename));
+ strncpy(filename, udev_root, sizeof(filename));
strncat(filename, dev->name, sizeof(filename));
switch (dev->type) {
/* sleep for a second or two to give the kernel a chance to
* create the dev file */
sleep(1);
+ ++loop;
}
retval = -ENODEV;
exit:
else
dev.type = 'c';
- retval = sysfs_get_mnt_path(sysfs_path, SYSFS_PATH_MAX);
- dbg("sysfs_path = %s", sysfs_path);
- if (retval) {
- dbg("sysfs_get_mnt_path failed");
- goto exit;
- }
-
retval = sleep_for_dev(path);
if (retval)
goto exit;