diff options
Diffstat (limited to 'netfs/daemonMisc.cpp')
-rw-r--r-- | netfs/daemonMisc.cpp | 32 |
1 files changed, 5 insertions, 27 deletions
diff --git a/netfs/daemonMisc.cpp b/netfs/daemonMisc.cpp index 5a30e31..9327fad 100644 --- a/netfs/daemonMisc.cpp +++ b/netfs/daemonMisc.cpp @@ -7,6 +7,11 @@ extern std::map<Ice::Int, int> files; +MiscServer::MiscServer(DaemonGlobalStatePtr dgs) : + DaemonModule(dgs) +{ +} + Ice::Int MiscServer::access(const std::string & path, Ice::Int mode, const Ice::Current &) { @@ -37,33 +42,6 @@ MiscServer::getattr(const std::string & path, const Ice::Current &) return a; } -NetFSComms::Attr -MiscServer::fgetattr(Ice::Int id, const Ice::Current &) -{ - if (files.find(id) == files.end()) { - throw NetFSComms::SystemError(EBADF); - } - struct stat s; - if (::fstat(files[id], &s) != 0) { - throw NetFSComms::SystemError(errno); - } - NetFSComms::Attr a; - a.dev = s.st_dev; - a.inode = s.st_ino; - a.mode = s.st_mode; - a.links = s.st_nlink; - a.uid = s.st_uid; - a.gid = s.st_gid; - a.rdev = s.st_rdev; - a.size = s.st_size; - a.blockSize = s.st_blksize; - a.blocks = s.st_blocks; - a.atime = s.st_atime; - a.mtime = s.st_mtime; - a.ctime = s.st_ctime; - return a; -} - void MiscServer::symlink(const std::string & path1, const std::string & path2, const Ice::Current &) { |