DragonFly BSD
DragonFly submit List (threaded) for 2004-12
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

[patch] /bin/cp POSIX conformance


From: Jason Smethers <jason@xxxxxxxxxxxx>
Date: Mon, 20 Dec 2004 12:09:17 -0600

For the cp utility, IEEE Std 1003.1-2004 states the following under section 2d:

2. If source_file is of type directory, the following steps shall be taken:

. ..

d. If dest_file exists and it is not of type directory, cp shall write a diagnostic message to standard error, do nothing more with source_file or any files below source_file in the file hierarchy, and go on to any remaining files.



Currently, the cp utility exits with the diagnostic message. The patch below turns this into a warning, and also changes another warning to use the standard errno EISDIR.


- Jason


<http://www.smethers.net/~jason/patches/cp.c.diff1>



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