Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!apple!vsi1!altos86!dtynan From: dtynan@altos86.Altos.COM (Dermot Tynan) Newsgroups: comp.os.minix Subject: Re: Replacement for rename()? Summary: What mount point?? Message-ID: <12347@altos86.Altos.COM> Date: 27 Jul 89 04:03:43 GMT References: <20510@louie.udel.EDU> Organization: Altos Computer Systems, San Jose, CA Lines: 27 In article <20510@louie.udel.EDU>, HELMER%SDNET.BITNET@vm1.nodak.edu (Guy Helmer) writes: Thos Sumner writes: [Aside: Hi Thos, did you get the stuff I mailed you???] > Under minix, link("/tmp/oldfile", "/tmp/newfile") doesn't work for > me. When I tried it, this path traversed a mount point on my system, but > I (apparently incorrectly) hoped that it would still work. > I don't have V7 docs nor do I have real un*x to try this out, > so I don't really know what is supposed to work. I don't understand this. You're not crossing any mount points with this one. If Minix doesn't allow you to do the link, then Minix is broken. What error-code is returned by 'link'??? Have you looked in the source? (You *do* have a Minix source licence, don't you :-) Your chdir() version should work also, although it is an ugly hack, and should only be used as a temporary measure. The reason 'link' won't allow you to cross a mount point, is because the true ID for a file, is not just its inode, but the dev/inode pair. As such, an inode on one device has no meaning on another device. In your case above, both files are on the same filesystem, and Minix has no excuse not to link them together. - Der -- dtynan@altos86.Altos.COM (408) 946-6700 x4237 Dermot Tynan, Altos Computer Systems, San Jose, CA 95134 "Far and few, far and few, are the lands where the Jumblies live..."