Xref: utzoo comp.bugs.sys5:453 comp.unix.wizards:8925 Path: utzoo!utgpu!water!watmath!clyde!att!uniq!rjnoe From: rjnoe@uniq.UUCP (Roger J. Noe) Newsgroups: comp.bugs.sys5,comp.unix.wizards Subject: File System Type (statfs, sysfs) Keywords: System V Release 3.1.1 Version 3 for AT&T 3B2 Message-ID: <479@uniq.UUCP> Date: 28 May 88 22:56:59 GMT Sender: news@uniq.UUCP Organization: Uniq Digital Technologies, Batavia, IL Lines: 49 The following pertains to UNIX System V Release 3.1.1 Version 3 for the AT&T 3B2 computer. Perhaps I have misunderstood the purpose of the statfs(2) system call, but when I use it on remote file systems (RFS), I always get the same file system type as local (non-RFS) file systems. The following program illustrates my point: #include #include #include #include extern void perror(); main(argc, argv) int argc; char *argv[]; { char fs_name[FSTYPSZ+1]; struct statfs fs; for (++argv, --argc; argc > 0; ++argv, --argc) { if (statfs(*argv, &fs, sizeof fs, 0) < 0) { perror("statfs"); continue; } if (sysfs(GETFSTYP, fs.f_fstyp, fs_name) < 0) { perror("sysfs"); continue; } printf("%s: fstype=%d (%s)\n", *argv, fs.f_fstyp, fs_name); } return 0; } No matter what real, mounted files I give this program as arguments, the answer is always the same, i.e. S51K. There appears to be no way to get statfs(2) to return a f_fstyp corresponding to dufstyp (in the kernel) so that it maps (through the kernel fsinfo[] table) to DUFST. I realize that on the remote system (the server of the mounted resource), the file system IS local, and the type is S51K, but shouldn't my machine change the f_fstyp to dufstyp before the system call returns, if it is in fact a remote file system? Is there no PORTABLE way for a program to tell if a file (system) is remote or not? -- Roger Noe ihnp4!att!uniq!rjnoe Fox Valley Software ihnp4!nwuxf!rjnoe Uniq Digital Technologies +1 312 510 2105 Batavia, Illinois 60510 41:50:56 N. 88:18:35 W.