+ 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 */
+
+#elif defined (HAVE_WIN32)
+/* Windows */
+
+bool fstype(const char *fname, char *fs, int fslen)
+{
+ DWORD componentlength;
+ DWORD fsflags;
+ CHAR rootpath[4];
+ UINT oldmode;
+ BOOL result;
+
+ /* Copy Drive Letter, colon, and backslash to rootpath */
+ bstrncpy(rootpath, fname, sizeof(rootpath));