From: <els...@us...> - 2004-07-24 10:25:37
|
Update of /cvsroot/crystal/CS/apps/tools/vsh In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3248/apps/tools/vsh Modified Files: vsh.cpp Log Message: Moved some code from vsh to vfs plugin to allow other apps to load mount files at run time. New API func: bool LoadMountsFromFile(iConfigFile*) Index: vsh.cpp =================================================================== RCS file: /cvsroot/crystal/CS/apps/tools/vsh/vsh.cpp,v retrieving revision 1.29 retrieving revision 1.30 diff -u -d -r1.29 -r1.30 --- vsh.cpp 2 Jul 2004 14:50:16 -0000 1.29 +++ vsh.cpp 24 Jul 2004 10:25:27 -0000 1.30 @@ -429,14 +429,10 @@ return; } - csRef<iConfigIterator> iter = config->Enumerate ("VFS.Mount."); - while (iter->Next ()) - { - const char *rpath = iter->GetKey (true); - const char *vpath = iter->GetStr (); - if (!VFS->Mount (rpath, vpath)) - fprintf (stderr, "conf: mount: cannot mount \"%s\" to \"%s\"\n", rpath, vpath); - } + if (!VFS->LoadMountsFromFile (config)) + fprintf (stderr, "conf: mount: cannot mount all directories found in " + "config file.\n"); + } static void cmd_sync (char *) |