NetBSD Problem Report #542

From gnats  Mon Oct 31 07:36:29 1994
Received: from pain.lcs.mit.edu (pain.lcs.mit.edu [128.52.46.239]) by sun-lamp.cs.berkeley.edu (8.6.9/8.6.9) with ESMTP id HAA07313 for <gnats-bugs@sun-lamp.cs.berkeley.edu>; Mon, 31 Oct 1994 07:36:29 -0800
Message-Id: <9410311431.AA25710@hdssun1.hds.com>
Date: Mon, 31 Oct 94 09:31:02 EST
From: mikeh@hds.com
Reply-To: mikeh@hds.com
To: gnats-bugs@NetBSD.ORG
Subject: Bug in renaming directories with MSDOSFS
X-Send-Pr-Version: 3.2

>Number:         542
>Category:       kern
>Synopsis:       Renaming directories fails under MSDOSFS
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    gnats-admin
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Oct 31 07:50:03 +0000 1994
>Closed-Date:    Thu Feb 08 05:02:51 +0000 1996
>Last-Modified:  Thu Feb 08 05:04:15 +0000 1996
>Originator:     Mike Hartman
>Release:        current
>Organization:
Human Designed Systems, Inc.
>Environment:

System: SunOS hdssun1 4.1.3 1 sun4m
Architecture: sun4

>Description:
	Renaming a directory when the source and destination parent directories
	are the same fails with MSDOSFS.  In msdosfs_rename(), readep() is
	called to get the directory entry to be renamed.  readep() calls
	deget() which translates directory entries to their canonical form.
	Therefore, readep() returns the '.' entry of the directory being
	renamed, instead of the directory's directory entry in its parent
	directory.	

>How-To-Repeat:
	mkdir subdir
	mv subdir subdir1
	ls -sCF
	1 subdir/

>Fix:
*** src/src/sys/msdosfs/msdosfs_vnops.c	Mon Oct 31 09:14:57 1994
--- src/src/sys/msdosfs/msdosfs_vnops.c	Mon Oct 31 09:16:44 1994
***************
*** 1054,1061 ****
  		/* tddep and fddep point to the same denode here */
  		VOP_LOCK(ap->a_fvp);	/* ap->a_fdvp is already locked */
  		if (error = readep(fddep->de_pmp,
! 				   fdep->de_dirclust,
! 				   fdep->de_diroffset,
  				   &bp, &ep)) {
  			VOP_UNLOCK(ap->a_fvp);
  			goto bad;
--- 1054,1061 ----
  		/* tddep and fddep point to the same denode here */
  		VOP_LOCK(ap->a_fvp);	/* ap->a_fdvp is already locked */
  		if (error = readep(fddep->de_pmp,
! 				   fddep->de_fndclust,
! 				   fddep->de_fndoffset,
  				   &bp, &ep)) {
  			VOP_UNLOCK(ap->a_fvp);
  			goto bad;
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: mycroft 
State-Changed-When: Thu Feb 8 00:02:51 EST 1996 
State-Changed-Why:  
This has been fixed for a long time. 
>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.