Esempio n. 1
0
        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);
            }
        }
Esempio n. 2
0
 public static void PackSuccess(rpcPacker packer, fhandle fh, fattr attr)
 {
     packer.setUint32((uint)NFSStatus.NFS_OK);
     fh.Pack(packer);
     attr.Pack(packer);
 }
Esempio n. 3
0
 static public void PackSuccess(rpcPacker packer, fhandle fh, fattr attr)
 {
     packer.setUint32((uint)NFSStatus.NFS_OK);
     fh.Pack(packer);
     attr.Pack(packer);
 }