private void Mount(rpcCracker cracker, rpcPacker reply) { uint length = cracker.get_uint32(); string dirPath = ""; for (uint i = 0; i < length; ++i) { dirPath += cracker.get_char(); } Console.WriteLine("Mount {0}:{1}", length, dirPath); if (Directory.Exists(dirPath) == false) { reply.setUint32(2); // Errno for no such file or directory reply.setUint32(0); // Where fh would go } else { fhandle fh = FileTable.Add(new FileEntry(dirPath)); reply.setUint32(0); // Success fh.Pack(reply); } }
private void UMount(rpcCracker cracker, rpcPacker reply) { uint length = cracker.get_uint32(); string dirPath = ""; for (uint i = 0; i < length; ++i) { dirPath += cracker.get_char(); } Console.WriteLine("UMount {0}:{1}", length, dirPath); #if FOO uint fh = fileHandles.Find ( if (fileHandles.Remove(dirPath) == false) { Console.WriteLine("{0} not mounted", dirPath); } #endif }