예제 #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);
            }
        }
예제 #2
0
파일: diropres.cs 프로젝트: petebarber/NFS
 public static void PackSuccess(rpcPacker packer, fhandle fh, fattr attr)
 {
     packer.setUint32((uint)NFSStatus.NFS_OK);
     fh.Pack(packer);
     attr.Pack(packer);
 }
예제 #3
0
파일: diropres.cs 프로젝트: zaubererty/NFS
 static public void PackSuccess(rpcPacker packer, fhandle fh, fattr attr)
 {
     packer.setUint32((uint)NFSStatus.NFS_OK);
     fh.Pack(packer);
     attr.Pack(packer);
 }