]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
statvfs in client, as per newer fuse api
authorsageweil <sageweil@29311d96-e01e-0410-9327-a35deaab8ce9>
Mon, 5 Feb 2007 00:33:41 +0000 (00:33 +0000)
committersageweil <sageweil@29311d96-e01e-0410-9327-a35deaab8ce9>
Mon, 5 Feb 2007 00:33:41 +0000 (00:33 +0000)
git-svn-id: https://ceph.svn.sf.net/svnroot/ceph@1076 29311d96-e01e-0410-9327-a35deaab8ce9

trunk/ceph/client/Client.cc
trunk/ceph/client/Client.h
trunk/ceph/client/fuse.cc

index f0a3e81427c4f2f8e5d23d76368aec47219ba02a..e71f3ed7d055058f6e4dd18e1980066055254fb5 100644 (file)
@@ -21,9 +21,7 @@
 #include <sys/stat.h>
 #include <fcntl.h>
 
-#ifdef DARWIN
 #include <sys/statvfs.h>
-#endif // DARWIN
 
 
 #include <iostream>
@@ -2529,7 +2527,6 @@ int Client::chdir(const char *path)
   return 0;
 }
 
-#ifdef DARWIN
 int Client::statfs(const char *path, struct statvfs *stbuf)
 {
   bzero (stbuf, sizeof (struct statvfs));
@@ -2546,13 +2543,6 @@ int Client::statfs(const char *path, struct statvfs *stbuf)
 
   return 0;
 }
-#else
-int Client::statfs(const char *path, struct statfs *stbuf) 
-{
-  assert(0);  // implement me
-  return 0;
-}
-#endif
 
 
 int Client::lazyio_propogate(int fd, off_t offset, size_t count)
index f1d90232acc18cd9f4063731b3f1d6a7293655e7..d7dd07a17adfd8d19084e55a206542ee0b09013e 100644 (file)
@@ -523,11 +523,7 @@ protected:
   int unmount();
 
   // these shoud (more or less) mirror the actual system calls.
-#ifdef DARWIN
   int statfs(const char *path, struct statvfs *stbuf);
-#else
-  int statfs(const char *path, struct statfs *stbuf);
-#endif
 
   // crap
   int chdir(const char *s);
index 94d15f9f79179305c9cc79bd6552326b107f4951..64497820f381e791bea04a96f190e8a4f692214c 100644 (file)
 #include <fcntl.h>
 #include <dirent.h>
 #include <errno.h>
-#ifdef DARWIN
 #include <sys/statvfs.h>
-#else
-#include <sys/statfs.h>
-#endif // DARWIN
 
 
 // ceph stuff
@@ -190,17 +186,10 @@ static int ceph_flush(const char *path, struct fuse_file_info *fi)
 */
 
 
-#ifdef DARWIN
 static int ceph_statfs(const char *path, struct statvfs *stbuf)
 {
   return client->statfs(path, stbuf);
 }
-#else
-static int ceph_statfs(const char *path, struct statfs *stbuf)
-{
-  return client->statfs(path, stbuf);
-}
-#endif