[BusyBox] cp says files are the same even though they are not
Aizer Danny-BDA023
Danny.Aizer at motorola.com
Tue Apr 12 09:06:27 UTC 2005
Well, after looking around some more I found the following in the BB
archives:
http://www.busybox.net/lists/busybox/2002-June/006349.html
http://www.busybox.net/lists/busybox/2002-June/006350.html
So I guess it's time to get a newer version of BB...
Anyway, even if OT here - I couldn't find any "real" documentation
about the st_rdev field - are you sure it should be unique per
block device? What about non-block devices? BTW the kernel is a
2.4.18_mvl30 (2.4.18 modified by MontaVista) - but I didn't find
any mention of such a (kernel) problem.
Thanks,
/Danny
-----Original Message-----
From: Rob Landley [mailto:rob at landley.net]
Sent: Tuesday, April 12, 2005 12:00 AM
To: busybox at mail.codepoet.org
Cc: Aizer Danny-BDA023
Subject: Re: [BusyBox] cp says files are the same even though they are
not
On Monday 11 April 2005 07:09 am, Aizer Danny-BDA023 wrote:
> After checking the busy-box-0.60.3 libbb/copy_file.c (called by cp.c), I've
> seen that the following code triggers this message:
>
> if (dest_exists && source_stat.st_rdev == dest_stat.st_rdev &&
> source_stat.st_ino == dest_stat.st_ino) {
> error_msg("`%s' and `%s' are the same file", source, dest);
> return -1;
> }
Sounds like a kernel problem. They should have different st_rdev values if
they're on different block devices.
Rob
More information about the busybox
mailing list