diff options
author | greg@kroah.com <greg@kroah.com> | 2003-10-15 23:50:13 -0700 |
---|---|---|
committer | Greg KH <gregkh@suse.de> | 2005-04-26 21:01:40 -0700 |
commit | 6739707df53097ac378f8ff2f0aa694257e31da1 (patch) | |
tree | 841262fe4d59cc4200e8c8cb3dc7d100ea3cec8a /udevdb.c | |
parent | c27e69116d3ef0ea069a3c5146009ced08a0238b (diff) |
[PATCH] put config files and database in /etc/udev by default
Can be overridden on the makefile line.
Diffstat (limited to 'udevdb.c')
-rw-r--r-- | udevdb.c | 14 |
1 files changed, 11 insertions, 3 deletions
@@ -9,6 +9,9 @@ #include <errno.h> #include <signal.h> +#include "udev_version.h" +#include "udev.h" +#include "namedev.h" #include "udevdb.h" #include "tdb/tdb.h" @@ -63,9 +66,14 @@ static void udevdb_close(void) */ static int udevdb_open(int method) { - 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; + } return 0; } |