]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/findlib/fstype.c
- Implement restore of a single directory.
[bacula/bacula] / bacula / src / findlib / fstype.c
index deb02b7b182abcfc351f0546220a574cf4ca4da4..416e7bc382f45d32ed05f055b5b8fab0a38ada0c 100644 (file)
@@ -223,12 +223,35 @@ bool fstype(const char *fname, char *fs, int fslen)
    return false;
 }
 
+#elif defined (__digital__) && defined (__unix__)  /* Tru64 */
+/* Tru64 */
+#include <sys/stat.h>
+#include <sys/mount.h>
+
+bool fstype(const char *fname, char *fs, int fslen)
+{
+   struct statfs st;
+   if (statfs((char *)fname, &st) == 0) {
+      switch (st.f_type) {
+      /* Known good values */
+      case 0xa:         bstrncpy(fs, "advfs", fslen); return true;        /* Tru64 AdvFS */
+      case 0xe:         bstrncpy(fs, "nfs", fslen); return true;          /* Tru64 NFS   */
+      default:
+         Dmsg2(10, "Unknown file system type \"0x%x\" for \"%s\".\n", st.f_type,
+               fname);
+         return false;
+      }
+   }
+   Dmsg1(50, "statfs() failed for \"%s\"\n", fname);
+   return false;
+}
+/* Tru64 */
+
 #else   /* No recognised OS */
 
 bool fstype(const char *fname, char *fs, int fslen)
 {
    Dmsg0(10, "!!! fstype() not implemented for this OS. !!!\n");
-
 #ifdef TEST_PROGRAM
    Dmsg1(10, "Please define one of the following when compiling:\n\n%s\n",
         SUPPORTEDOSES);