- udevdb = tdb_open(UDEVDB, 0, method, O_RDWR | O_CREAT, 0644);
- if (udevdb == NULL)
- return -1;
+ udevdb = tdb_open(UDEV_CONFIG_DIR UDEV_DB, 0, method, O_RDWR | O_CREAT, 0644);
+ if (udevdb == NULL) {
+ if (method == UDEVDB_INTERNAL)
+ dbg("Unable to initialize in-memory database");
+ else
+ dbg("Unable to initialize database at %s", UDEV_CONFIG_DIR UDEV_DB);
+ return -EINVAL;
+ }