temp = getenv("UDEV_TEST");
if (temp != NULL) {
/* hm testing is happening, use the specified values, if they are present */
- temp = getenv("UDEV_SYSFS_PATH");
+ temp = getenv("SYSFS_PATH");
if (temp)
strncpy(sysfs_path, temp, sizeof(sysfs_path));
temp = getenv("UDEV_CONFIG_DIR");
if (temp)
udev_permission = temp;
}
- dbg("sysfs_path = %s", sysfs_path);
+ dbg("sysfs_path='%s'", sysfs_path);
- strncpy(udev_db_filename, udev_config_dir, sizeof(udev_db_filename));
+ strncpy(udev_db_filename, udev_root, sizeof(udev_db_filename));
strncat(udev_db_filename, udev_db, sizeof(udev_db_filename));
strncpy(udev_config_filename, udev_config_dir, sizeof(udev_config_filename));
dbg ("no devpath?");
goto exit;
}
- dbg("looking at %s", devpath);
+ dbg("looking at '%s'", devpath);
/* we only care about class devices and block stuff */
if (!strstr(devpath, "class") &&
!strstr(devpath, "block")) {
- dbg("not block or class");
+ dbg("not a block or class device");
goto exit;
}
get_dirs();
retval = udevdb_init(UDEVDB_DEFAULT);
if (retval != 0) {
- dbg("Unable to initialize database.");
+ dbg("unable to initialize database");
goto exit;
}
retval = udev_remove_device(devpath, subsystem);
else {
- dbg("Unknown action: %s", action);
+ dbg("unknown action '%s'", action);
retval = -EINVAL;
}
udevdb_exit();
exit:
return retval;
}
-