]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
cp: remove unused code
authorJim Meyering <meyering@redhat.com>
Wed, 19 Nov 2008 09:24:52 +0000 (10:24 +0100)
committerJim Meyering <meyering@redhat.com>
Thu, 20 Nov 2008 09:21:52 +0000 (10:21 +0100)
* 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.

src/cp-hash.c
src/cp-hash.h

index 3626468e5aef314e1c0faa0c9f9f714d10506e5a..f23ecc135b5a9e7ae17943dcae6f4fdce05f44e8 100644 (file)
 
 #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.  */
 
index d142925a4245e7e8101eebf08ad89a6afd00793b..c2c5085ab6b7a761bd30c68e8a987c111d728d5b 100644 (file)
@@ -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);