From owner-freebsd-bugs Fri Apr 7 12:30: 6 2000 Delivered-To: freebsd-bugs@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (Postfix) with ESMTP id 93CC737C066 for ; Fri, 7 Apr 2000 12:30:03 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id MAA85995; Fri, 7 Apr 2000 12:30:03 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Date: Fri, 7 Apr 2000 12:30:03 -0700 (PDT) Message-Id: <200004071930.MAA85995@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org Cc: From: David Malone Subject: Re: bin/17847: mv symbolic link cross partition fails Reply-To: David Malone Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org The following reply was made to PR bin/17847; it has been noted by GNATS. From: David Malone To: j_guojun@lbl.gov Cc: FreeBSD-gnats-submit@freebsd.org Subject: Re: bin/17847: mv symbolic link cross partition fails Date: Fri, 07 Apr 2000 20:28:07 +0100 > If every one agree this incorrect, I can trace down the code to > find a patch. This sounds like a bug, as it doesn't do the same thing as mving a symlink on a local partition would. If the file the symlink points to is a regular file you'll end up getting a copy of that instead of the symlink. Digital Unix and Linux also do the same "correct" thing as solaris. It looks like mv has a stat, which should be an lstat. The included patch seems to fix it. BTW - for some strange reason your PR seems to be marked as confidential on the web site. David. --- mv.c Fri Apr 7 20:19:19 2000 +++ mv.c.orig Fri Apr 7 20:19:45 2000 @@ -221,7 +221,7 @@ * it's a regular file, do the copy internally; otherwise, use * cp and rm. */ - if (lstat(from, &sb)) { + if (stat(from, &sb)) { warn("%s", from); return (1); } To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message