removed the fscompat* files
[util-vserver.git] / util-vserver / lib / fscompat_getiattr.c
index 4d6ae59..b7a1ead 100644 (file)
 #endif
 
 #include "vserver.h"
-#include "vserver-internal.h"
 #include <fcntl.h>
 
+#if defined(VC_ENABLE_API_FSCOMPAT) && defined(VC_ENABLE_API_V13)
+#  define VC_MULTIVERSION_SYSCALL      1
+#endif
+#include "vserver-internal.h"
+
 #ifdef VC_ENABLE_API_FSCOMPAT
-#  include "fscompat_getiattr-v11.hc"
+#  include "fscompat_getiattr-fscompat.hc"
+#endif
+
+#ifdef VC_ENABLE_API_V13
+#  include "fscompat_getiattr-v13.hc"
 #endif
 
 int
 vc_get_iattr_compat(char const *filename,
                    dev_t dev, ino_t ino,
-                   xid_t    * /*@null@*/ xid,
-                   uint32_t * /*@null@*/ flags,
-                   uint32_t * mask)
+                   xid_t * xid, uint32_t * flags, uint32_t * mask,
+                   mode_t const UNUSED *mode)
 {
-#ifdef VC_ENABLE_API_FSCOMPAT
-  int          ver = utilvserver_checkCompatVersion();
-  if (ver==-1) return -1;
-#endif
-
   if ( (mask==0) ||
        ((*mask&VC_IATTR_XID)  && xid==0) ||
        ((*mask&~VC_IATTR_XID) && flags==0) ) {
@@ -47,16 +49,7 @@ vc_get_iattr_compat(char const *filename,
     return -1;
   }
   if ( flags ) *flags &= ~*mask;
-  
-#ifdef VC_ENABLE_API_FSCOMPAT
-  if ((ver&0xffff)<=4)
-    return vc_get_iattr_compat_v11(filename, dev, ino, xid, flags, mask);
-#endif
-
-#ifdef VC_ENABLE_API_V13
-  return vc_get_iattr(dev, ino, xid, flags, mask);
-#endif
 
-  errno = ENOSYS;
-  return -1;
+  CALL_VC(CALL_VC_V13     (vc_get_iattr_compat, filename, dev, ino, xid, flags, mask),
+         CALL_VC_FSCOMPAT(vc_get_iattr_compat, filename, dev, ino, xid, flags, mask, mode));
 }