From owner-cvs-bin Thu Dec 11 07:22:19 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id HAA19503 for cvs-bin-outgoing; Thu, 11 Dec 1997 07:22:19 -0800 (PST) (envelope-from owner-cvs-bin) Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.2.228.19]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id HAA19468; Thu, 11 Dec 1997 07:21:40 -0800 (PST) (envelope-from bde@zeta.org.au) Received: (from bde@localhost) by godzilla.zeta.org.au (8.8.7/8.6.9) id CAA13945; Fri, 12 Dec 1997 02:18:12 +1100 Date: Fri, 12 Dec 1997 02:18:12 +1100 From: Bruce Evans Message-Id: <199712111518.CAA13945@godzilla.zeta.org.au> To: bde@zeta.org.au, eivind@yes.no Subject: Re: cvs commit: src/bin/mv mv.c Cc: cvs-all@FreeBSD.ORG, cvs-bin@FreeBSD.ORG, cvs-committers@FreeBSD.ORG, eivind@FreeBSD.ORG Sender: owner-cvs-bin@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk >> This seems to break POSIX conformance. According to a POSIX.2 draft, >> mv(1) shall attempt to move the entire subtree if rename(2) returns >> EXDEV, and according to POSIX.1-1990, rename(2) shall return EXDEV for >> cross-device moves (unless certain other error conditions not related >> to cross-device moves occur). > >Does this mean I should revert it? I'm not sure. It could be implemented better (leave the !EXDEV code alone and don't call statfs() for mv'ing regular files ...). >good change. However, if we are compliant in most other cases, I'll let >that pass for the chance of getting that nice little stamp ;-) >> Moving entire subtrees is probably wrong in all cases. Subtrees may be >> huge, and they may contain mount points even if the root is not a mount >> point. > >... or does this mean that the patch should be extended to make mv even more >restrictive? I wonder if the versions of Linux with POSIX (.1 only?) stamps changed mv to move whole trees across file systems. Gnu mv still doesn't do it in fileutils-3.16. Doing it is more of a problem in FreeBSD since we have lots of user-mountable file systems. Bruce