summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2008-11-19 10:24:52 +0100
committerJim Meyering <meyering@redhat.com>2008-11-20 10:21:52 +0100
commited017d44b205bdf74368c2ee5e414553944608c0 (patch)
tree07abe302fbb13eb17ff5c45f684970c6352a10bc /src
parent8b09875b59e112b01db6e3909003b52447a62a7c (diff)
downloadcoreutils-ed017d44b205bdf74368c2ee5e414553944608c0.tar.xz
cp: remove unused code
* src/cp-hash.c (remember_created): Remove unused function. Remove thus-obviated headers: <stdio.h>, "quote.h", "error.h". * src/cp-hash.h (remember_created): Remove declaration.
Diffstat (limited to 'src')
-rw-r--r--src/cp-hash.c21
-rw-r--r--src/cp-hash.h1
2 files changed, 0 insertions, 22 deletions
diff --git a/src/cp-hash.c b/src/cp-hash.c
index 3626468e5..f23ecc135 100644
--- a/src/cp-hash.c
+++ b/src/cp-hash.c
@@ -19,14 +19,11 @@
#include <config.h>
-#include <stdio.h>
#include <sys/types.h>
#include "system.h"
#include "same.h"
-#include "quote.h"
#include "hash.h"
-#include "error.h"
#include "cp-hash.h"
/* Use ST_DEV and ST_INO as the key, FILENAME as the value.
@@ -97,24 +94,6 @@ forget_created (ino_t ino, dev_t dev)
src_to_dest_free (ent);
}
-/* Add FILE to the list of files that we have created.
- Return true if successful. */
-
-extern bool
-remember_created (char const *file)
-{
- struct stat sb;
-
- if (stat (file, &sb) < 0)
- {
- error (0, errno, "%s", quote (file));
- return false;
- }
-
- remember_copied (file, sb.st_ino, sb.st_dev);
- return true;
-}
-
/* If INO/DEV correspond to an already-copied source file, return the
name of the corresponding destination file. Otherwise, return NULL. */
diff --git a/src/cp-hash.h b/src/cp-hash.h
index d142925a4..c2c5085ab 100644
--- a/src/cp-hash.h
+++ b/src/cp-hash.h
@@ -2,5 +2,4 @@ void hash_init (void);
void forget_all (void);
void forget_created (ino_t ino, dev_t dev);
char *remember_copied (const char *node, ino_t ino, dev_t dev);
-bool remember_created (char const *file);
char *src_to_dest_lookup (ino_t ino, dev_t dev);