diff options
author | Jim Meyering <jim@meyering.net> | 2001-11-22 10:52:40 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2001-11-22 10:52:40 +0000 |
commit | 6b5ddbc2c92858d37f4d8c18e7b5da6c32ecde06 (patch) | |
tree | af9eb7a6b32fe202eb4ea23b1f987812827e9bcf /src | |
parent | 6f1ebf7e68cda267c83466ed826178b2987a88d9 (diff) | |
download | coreutils-6b5ddbc2c92858d37f4d8c18e7b5da6c32ecde06.tar.xz |
Include hash.h.
(struct cp_options) [dest_info]: New member.
Diffstat (limited to 'src')
-rw-r--r-- | src/copy.h | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/copy.h b/src/copy.h index 6b949d048..0c88f7e7e 100644 --- a/src/copy.h +++ b/src/copy.h @@ -1,6 +1,8 @@ #ifndef COPY_H # define COPY_H +# include "hash.h" + /* Control creation of sparse files (files with holes). */ enum Sparse_type { @@ -153,6 +155,17 @@ struct cp_options /* If nonzero, stdin is a tty. */ int stdin_tty; + + /* This is a set of destination name/inode/dev triples. Each such triple + represents a file we have created corresponding to a source file name + that was specified on the command line. Use it to avoid clobbering + source files in commands like this: + rm -rf a b c; mkdir a b c; touch a/f b/f; mv a/f b/f c + For now, it protects only regular files when copying (i.e. not renaming). + When renaming, it protects all non-directories. + Use dest_info_init to initialize it, or set it to NULL to disable + this feature. */ + struct hash_table *dest_info; }; int stat (); @@ -184,6 +197,6 @@ copy PARAMS ((const char *src_path, const char *dst_path, int *copy_into_self, int *rename_succeeded)); void -dest_info_init PARAMS ((void)); +dest_info_init PARAMS ((struct cp_options *)); #endif |