bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: cp -p


From: Ekanayake, Sumith
Subject: RE: cp -p
Date: Thu, 22 Mar 2007 08:04:19 -0400

Phil,

even the "d" does not exist, I get the same error. Is their any way we
can try to recompile "cp source" for this version of Linux?

Thanks in advance.

Sumith 


--
Sumith Ekanayake
Global Information Technology
address@hidden
(908)740-3952

-----Original Message-----
From: Philip Rowlands [mailto:address@hidden 
Sent: Saturday, March 17, 2007 6:04 AM
To: Ekanayake, Sumith
Cc: address@hidden
Subject: RE: cp -p

On Fri, 16 Mar 2007, Ekanayake, Sumith wrote:

> Let give you the trace and the vers...
>
> address@hidden ~]$ strace cp -p c d
> execve("/bin/cp", ["cp", "-p", "c", "d"], [/* 52 vars */]) = 0
[ snip unnecessary output ]

> lstat64("d", {st_mode=S_IFREG|0644, st_size=0, ...}) = 0

This isn't quite clear from the example given initially, as here file
"d" already exists. However...

> stat64("d", {st_mode=S_IFREG|0644, st_size=0, ...}) = 0 stat64("c", 
> {st_mode=S_IFREG|0644, st_size=0, ...}) = 0 stat64("d", 
> {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
> open("c", O_RDONLY|O_LARGEFILE)         = 3
> fstat64(3, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0 open("d", 
> O_WRONLY|O_TRUNC|O_LARGEFILE) = 4

"d" is now empty (truncated).

> fstat64(4, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0 fstat64(3, 
> {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
> read(3, "", 32768)                      = 0
> close(4)                                = 0
> close(3)                                = 0

Nothing to read from "c", so the files are closed.

> utime("d", [2007/03/16-13:59:47, 2007/03/16-13:59:47]) = 0 
> getxattr("c", "system.posix_acl_access", 0xbfff96e0, 132) = -1 ENODATA

> (No data available) stat64("c", {st_mode=S_IFREG|0644, st_size=0, 
> ...}) = 0 setxattr("d", "system.posix_acl_access", 0x9928d80, 28, ) = 
> -1 EINVAL (Invalid argument)

This is where "invalid argument" is coming from. What happens if file
"d" doesn't exist in the first place?


Cheers,
Phil
*********************************************************************
This message and any attachments are solely for the
intended recipient. If you are not the intended recipient,
disclosure, copying, use or distribution of the information 
included in this message is prohibited -- Please 
immediately and permanently delete.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]