summaryrefslogtreecommitdiff
path: root/instr-daemon.c
diff options
context:
space:
mode:
authorroot <root@avtech.domain.avtechpulse.com>2000-01-01 01:16:29 +0900
committerroot <root@avtech.domain.avtechpulse.com>2000-01-01 01:16:29 +0900
commitcfbba40d2f08a1c4748fafb9a89327b40468ee7b (patch)
treeb6fc52e0bafc0b255d10a1b0e50ca913d6bcd880 /instr-daemon.c
parentd4d363b9b80506c12988fedc1ce2305135f9d213 (diff)
add function to find root mount point
Diffstat (limited to 'instr-daemon.c')
-rw-r--r--instr-daemon.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/instr-daemon.c b/instr-daemon.c
index f155fab..4c72997 100644
--- a/instr-daemon.c
+++ b/instr-daemon.c
@@ -16,6 +16,7 @@
#include <glib.h>
#include <unistd.h>
#include <fcntl.h>
+#include <fstab.h>
#define STDIN_BUF_SIZE 1024
@@ -197,6 +198,22 @@ static gpointer vxithreadfunc (gpointer data)
}
+static void get_root_mount ()
+{
+ struct fstab *sys_fstab;
+
+ sys_fstab = getfsfile ("/");
+
+ if (sys_fstab == NULL) {
+ return;
+ }
+
+ strcpy (globals.HWDetect.remount_point, sys_fstab->fs_spec);
+
+ printf ("root mount = %s\n", globals.HWDetect.remount_point);
+
+ return;
+}
int main(int argc, char **argv)
{
@@ -207,6 +224,7 @@ int main(int argc, char **argv)
g_type_init ();
g_thread_init (NULL);
+ get_root_mount();
bus_init();
LCD_initialize();