Path: utzoo!attcan!uunet!husc6!mailrus!tut.cis.ohio-state.edu!cheops.cis.ohio-state.edu!cml From: cml@cheops.cis.ohio-state.edu (Christopher Lott) Newsgroups: comp.sys.pyramid Subject: statfs problem with NFS filesystems Message-ID: <30121@tut.cis.ohio-state.edu> Date: 28 Dec 88 17:59:26 GMT Sender: news@tut.cis.ohio-state.edu Reply-To: cml@tut.cis.ohio-state.edu.UUCP (Christopher Lott) Organization: The Ohio State University Dept of Computer & Information Science Lines: 40 Hi, I am trying to solve this problem: given a path name, determine the host machine and host filesystem for that path. The machine name is needed because the host filesystem may be NFS. I used (successfully!) the statfs() system call to get the filesystem id pair, and it worked great on our sun systems. But alas, all the world is not a vax, although this may not be the problem :-). The statfs() call on the pyramid returns a good id pair for LOCAL filesystems, but always returns the same pair of numbers for NFS fs's. I quote: STATFS(2-ucb) Pyramid OSx Operating System STATFS(2-ucb) NAME statfs, fstatfs - get file system statistics ....much deleted... struct statfs { ...more deleted... fsid_t f_fsid; /* file system id */ ^^^^^^^^^^^^^^ <-- WHAT I NEED! }; These come back as (2820, 0) every time. Yuck. Has anyone else dealt with this? Can anyone suggest a better way to determine the host filesystem? I would rather NOT do string matching using /etc/mtab because that just isn't deterministic enough. Thanks in advance for any and all help. chris... -=- cml@tut.cis.ohio-state.edu Computer Science Department, OSU 614-292-6546 or: ...!{att,pyramid,killer}!osu-cis!cml