diff options
author | Jim Meyering <jim@meyering.net> | 2002-03-30 07:11:13 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2002-03-30 07:11:13 +0000 |
commit | aa3694f1ffca529ad1892b1b0945f7995ffa86e0 (patch) | |
tree | 121392cee50dc879810cc499a4726217493b4142 /src | |
parent | 9211474a6ee37178563544d882d81bc9c74fbba3 (diff) | |
download | coreutils-aa3694f1ffca529ad1892b1b0945f7995ffa86e0.tar.xz |
(forget_created): New function.
Diffstat (limited to 'src')
-rw-r--r-- | src/cp-hash.c | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/src/cp-hash.c b/src/cp-hash.c index 1276a92c8..aa4fa7fd0 100644 --- a/src/cp-hash.c +++ b/src/cp-hash.c @@ -1,5 +1,5 @@ /* cp-hash.c -- file copying (hash search routines) - Copyright (C) 89, 90, 91, 1995-2001 Free Software Foundation. + Copyright (C) 89, 90, 91, 1995-2002 Free Software Foundation. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -84,6 +84,23 @@ src_to_dest_free (void *x) free (x); } +/* Remove the entry matching INO/DEV from the table + that maps source ino/dev to destination file name. */ +void +forget_created (ino_t ino, dev_t dev) +{ + struct Src_to_dest probe; + struct Src_to_dest *ent; + + probe.st_ino = ino; + probe.st_dev = dev; + probe.name = NULL; + + ent = hash_delete (src_to_dest, &probe); + if (ent) + src_to_dest_free (ent); +} + /* Add PATH to the list of files that we have created. Return 1 if we can't stat PATH, otherwise 0. */ |