summaryrefslogtreecommitdiff
path: root/src/mfs_subr.c
diff options
context:
space:
mode:
authorKjetil Ørbekk <orbekk@pvv.ntnu.no>2008-08-15 20:03:56 +0200
committerKjetil Ørbekk <orbekk@pvv.ntnu.no>2008-08-15 20:06:18 +0200
commit82be959253b213abdbd180c683c82ad4de64d58e (patch)
treef1aa7002d061b94565f03458b5998a53f5c220c4 /src/mfs_subr.c
parent5e6d5d75e5d2903988b792dd803859b31c23b935 (diff)
- Implemented mfs_reload_config
Diffstat (limited to 'src/mfs_subr.c')
-rw-r--r--src/mfs_subr.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/mfs_subr.c b/src/mfs_subr.c
index 4ee807b..468e253 100644
--- a/src/mfs_subr.c
+++ b/src/mfs_subr.c
@@ -122,6 +122,20 @@ mfs_insert_path(char *path)
int
mfs_reload_config()
{
+ int res;
+ char *mfsrc = mfs_get_home_path(".mfsrc");
+ FILE *f = fopen(mfsrc, "r");
+ char line[4096];
+
+ /* XXX: Just adding the paths for now. queue.h for the rest*/
+ fgets(line, 4096, f);
+
+ if (line[0] != '#') {
+ res = mfs_insert_path(line);
+ DEBUG("inserted path %s, returned(%d)\n", line, res);
+ }
+
+ free (mfsrc);
return (0);
}