cave: use full path to database and relocate into games
authorAlan Cox <alan@linux.intel.com>
Sun, 1 Jul 2018 18:47:43 +0000 (19:47 +0100)
committerAlan Cox <alan@linux.intel.com>
Sun, 1 Jul 2018 18:47:43 +0000 (19:47 +0100)
Applications/cave/advent.h
Applications/cave/database.c
Applications/cave/fuzix-cave.pkg

index 828786c..c0cf7ea 100644 (file)
@@ -15,6 +15,8 @@
 #include <unistd.h>
 #include <fcntl.h>
 
+#define ADVDB_PATH                 "/usr/games/lib/advent.db"
+
 #define NUL                        '\0'
 
 #define MAXDIM(a)                  (sizeof(a) / sizeof(a[0]))
index e095830..8b97b24 100644 (file)
@@ -26,7 +26,7 @@ static void dbstring(uint16_t * off)
 
 void db_init(void)
 {
-       db_fd = open("advent.db", O_RDONLY);
+       db_fd = open(ADVDB_PATH, O_RDONLY);
        if (db_fd == -1) {
                perror("advent.db");
                exit(1);
index ee3dcd5..a494138 100644 (file)
@@ -1,5 +1,5 @@
 package  adventure
 if-file  advent
 
-f 0755 /usr/bin/advent        advent
-f 0644 /usr/bin/advent.db     advent.db
+f 0755 /usr/games/advent        advent
+f 0644 /usr/games/advent.db     advent.db