> Hi !
>
> I think, I have found out, why the dpkg-skripts
> behave different on XFS and ext2fs.
> 'rmdir' returns different results on non-empty directories:
>
> ext2fs: rmdir: `foo': Directory not empty
> XFS: rmdir foo -> rmdir: `foo': File exists
>
> I have testet this with the beta-kernel-patch.
> Don't know, if its the same with the latest snapshot.
>
> I hope, this helps.
>
> Ralf
This will be the same between the two trees, here is some code to try out
and see if it fixes it:
===========================================================================
Index: linux/fs/xfs/xfs_vnodeops.c
===========================================================================
--- /usr/tmp/TmpDir.9993-0/linux/fs/xfs/xfs_vnodeops.c_1.475 Tue Oct 3
13:55:03 2000
+++ linux/fs/xfs/xfs_vnodeops.c Tue Oct 3 13:49:24 2000
@@ -4179,11 +4179,11 @@
}
ASSERT(cdp->i_d.di_nlink >= 2);
if (cdp->i_d.di_nlink != 2) {
- error = XFS_ERROR(EEXIST);
+ error = XFS_ERROR(ENOTEMPTY);
goto error_return;
}
if (!XFS_DIR_ISEMPTY(mp, cdp)) {
- error = XFS_ERROR(EEXIST);
+ error = XFS_ERROR(ENOTEMPTY);
goto error_return;
}
This does appear to be a difference between the system call error codes in
irix and linux.
Irix rmdir(2):
EEXIST The directory contains entries other than those for
``.'' and ``..''.
Linux rmdir(2):
ENOENT A directory component in pathname does not exist or
is a dangling symbolic link.
ENOTEMPTY
pathname contains entries other than . and .. .
Thanks for the diagnosis, let me know if this fixes it.
Steve
|