cp: add support for -s, -l. Fix free(nonmalloc) bug.

Add doc on POSIX's rules on -i and -f (insane!).
ln: make "ln dangling_symlink new_link" work.
This commit is contained in:
Denis Vlasenko
2006-10-21 23:40:20 +00:00
parent 8d73c35916
commit f24e1f40e0
6 changed files with 190 additions and 161 deletions

View File

@ -20,8 +20,6 @@
*
*/
#include <errno.h>
#include <sys/stat.h>
#include "libbb.h"
#include "coreutils.h"
@ -29,7 +27,7 @@ int cp_mv_stat2(const char *fn, struct stat *fn_stat, stat_func sf)
{
if (sf(fn, fn_stat) < 0) {
if (errno != ENOENT) {
bb_perror_msg("unable to stat `%s'", fn);
bb_perror_msg("unable to stat '%s'", fn);
return -1;
}
return 0;