aboutsummaryrefslogtreecommitdiffstats
path: root/pseudo_db.c
diff options
context:
space:
mode:
authorMark Hatle <mark.hatle@windriver.com>2010-08-03 21:04:37 -0500
committerseebs <seebs@seebs-eee.(none)>2010-08-04 17:13:39 -0500
commit551bf567c171c9f6f475f02de80e35df9563dce7 (patch)
tree42fb4fa11dd734c8880ea6f5d1093f282c65d48a /pseudo_db.c
parent8bf7df7ee9360d5d1256498bd5e97d3c6bc387f6 (diff)
downloadpseudo-551bf567c171c9f6f475f02de80e35df9563dce7.tar.gz
pseudo-551bf567c171c9f6f475f02de80e35df9563dce7.tar.bz2
pseudo-551bf567c171c9f6f475f02de80e35df9563dce7.zip
Add new environment values to allow easy override of default locations
Add PSEUDO_BINDIR, PSEUDO_LIBDIR, and PSEUDO_LOCALSTATEDIR to allow for more easy customization of PSEUDO components at run-time. If these are not set they will be automatically generated based on the existing PSEUDO_PREFIX path. PSEUDO_BINDIR = PSEUDO_PREFIX /bin PSEUDO_LIBDIR = PSEUDO_PREFIX /lib PSEUDO_LOCALSTATEDIR = PSEUDO_PREFIX /var/pseudo Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Diffstat (limited to 'pseudo_db.c')
-rw-r--r--pseudo_db.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/pseudo_db.c b/pseudo_db.c
index c024287..8e3b9b4 100644
--- a/pseudo_db.c
+++ b/pseudo_db.c
@@ -471,11 +471,11 @@ get_db(sqlite3 **db) {
if (*db)
return 0;
if (db == &file_db) {
- dbfile = pseudo_prefix_path(PSEUDO_DATA "files.db");
+ dbfile = pseudo_localstatedir_path("files.db");
rc = sqlite3_open(dbfile, db);
free(dbfile);
} else {
- dbfile = pseudo_prefix_path(PSEUDO_DATA "logs.db");
+ dbfile = pseudo_localstatedir_path("logs.db");
rc = sqlite3_open(dbfile, db);
free(dbfile);
}