summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2002-03-10 08:17:20 +0000
committerJim Meyering <jim@meyering.net>2002-03-10 08:17:20 +0000
commitc4f4cfbf11f47cfd84f0e953ecf8d7771d3ebe33 (patch)
tree95c6e273ef87a5a2fb32e664654728253edcdba1 /src
parent8cef936d37da87024fa9b700e03e00a408ebe209 (diff)
downloadcoreutils-c4f4cfbf11f47cfd84f0e953ecf8d7771d3ebe33.tar.xz
* src/copy.c (copy_reg): Use a more concise diagnostic for
reporting replaced files. This avoids a bug in the code, which mishandled ino_t wider than long. * src/remove.c (remove_dir): Likewise, twice.
Diffstat (limited to 'src')
-rw-r--r--src/remove.c23
1 files changed, 4 insertions, 19 deletions
diff --git a/src/remove.c b/src/remove.c
index 9ad80a8b4..c9f246ad4 100644
--- a/src/remove.c
+++ b/src/remove.c
@@ -714,15 +714,8 @@ remove_dir (struct File_spec *fs, int need_save_cwd,
if (!SAME_INODE (sb, *fs))
{
error (EXIT_FAILURE, 0,
- _("ERROR: the directory %s initially had device/inode\n\
-numbers %lu/%lu, but now (after a chdir into it), the numbers for `.'\n\
-are %lu/%lu. That means that while rm was running, the directory\n\
-was replaced with either another directory or a link to another directory."),
- quote (full_filename (dir_name)),
- (unsigned long)(fs->st_dev),
- (unsigned long)(fs->st_ino),
- (unsigned long)(sb.st_dev),
- (unsigned long)(sb.st_ino));
+ _("directory %s was replaced before being removed"),
+ quote (full_filename (dir_name)));
}
tmp_cwd_dev_ino.st_dev = sb.st_dev;
@@ -767,16 +760,8 @@ was replaced with either another directory or a link to another directory."),
if (!SAME_INODE (sb, *cwd_dev_ino))
{
error (EXIT_FAILURE, 0,
- _("ERROR: the directory %s initially had device/inode\n\
-numbers %lu/%lu, but now (after changing into at least one subdirectory\n\
-and changing back via `..'), the numbers for `.' are %lu/%lu.\n\
-That means that while rm was running, a partially-removed subdirectory\n\
-was moved to a different position in the file system hierarchy."),
- quote (full_filename (".")),
- (unsigned long)(cwd_dev_ino->st_dev),
- (unsigned long)(cwd_dev_ino->st_ino),
- (unsigned long)(sb.st_dev),
- (unsigned long)(sb.st_ino));
+ _("subdirectory of %s was moved while being removed"),
+ quote (full_filename (".")));
}
}