summaryrefslogtreecommitdiff
path: root/src/cp.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1995-05-13 12:48:33 +0000
committerJim Meyering <jim@meyering.net>1995-05-13 12:48:33 +0000
commit99ce9e9832afce3278226874af6a2a961d52fbbe (patch)
treef46ec12c1a198bfd1e0e978611df93e928fa3c2e /src/cp.c
parent466ecc5db8326937b43a3c86d4554060d79d3c2c (diff)
downloadcoreutils-99ce9e9832afce3278226874af6a2a961d52fbbe.tar.xz
Use stat (lstat), not safe_stat (safe_lstat).
Diffstat (limited to 'src/cp.c')
-rw-r--r--src/cp.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/cp.c b/src/cp.c
index 0092391d3..9ccce8bb5 100644
--- a/src/cp.c
+++ b/src/cp.c
@@ -27,8 +27,6 @@
#include "cp.h"
#include "backupfile.h"
#include "version.h"
-#include "safe-stat.h"
-#include "safe-lstat.h"
#ifndef _POSIX_VERSION
uid_t geteuid ();
@@ -287,9 +285,9 @@ main (argc, argv)
of `stat' to call. */
if (flag_dereference)
- xstat = safe_stat;
+ xstat = stat;
else
- xstat = safe_lstat;
+ xstat = lstat;
/* Allocate space for remembering copied and created files. */
@@ -320,7 +318,7 @@ do_copy (argc, argv)
dest = argv[argc - 1];
- if (safe_lstat (dest, &sb))
+ if (lstat (dest, &sb))
{
if (errno != ENOENT)
{
@@ -337,7 +335,7 @@ do_copy (argc, argv)
/* If `dest' is not a symlink to a nonexistent file, use
the results of stat instead of lstat, so we can copy files
into symlinks to directories. */
- if (safe_stat (dest, &sbx) == 0)
+ if (stat (dest, &sbx) == 0)
sb = sbx;
}
@@ -429,7 +427,7 @@ do_copy (argc, argv)
`cp source dest/' to `cp source dest/basename(source)'. */
if (dest[strlen (dest) - 1] == '/'
- && safe_lstat (source, &source_stats) == 0
+ && lstat (source, &source_stats) == 0
&& !S_ISDIR (source_stats.st_mode))
{
char *source_base;