aboutsummaryrefslogtreecommitdiff
path: root/src/extern.h
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2010-02-12 23:07:25 +0200
committerSergey Poznyakoff <gray@gnu.org.ua>2010-02-12 23:07:25 +0200
commit5864f3267f4c1c002a5f405477c113a093f3b5bd (patch)
tree4cd7bd51f188825116ff0316e22fd779e9c722f9 /src/extern.h
parent7c5fda3fbada772e53e0c347621921a8111738c0 (diff)
downloadcpio-5864f3267f4c1c002a5f405477c113a093f3b5bd.tar.gz
cpio-5864f3267f4c1c002a5f405477c113a093f3b5bd.tar.bz2
Use same code when creating directories in copy-in and copy-pass modes.
* src/copyin.c (copyin_mkdir): Remove. (copyin_directory): Remove. (copyin_file): Use cpio_create_dir instead of copyin_directory. * src/copypass.c (process_copy_pass): Use cpio_create_dir to create directories. * src/extern.h (delay_cpio_set_stat): New proto. * src/util.c (delay_cpio_set_stat): New function. (delay_set_stat): Rewrite as a wrapper to the above. (cpio_create_dir): New function. * tests/setstat01.at: Fix testcase. * tests/setstat02.at: Likewise. * tests/setstat03.at: New testcase. * tests/setstat04.at: New testcase. * tests/setstat05.at: New testcase. * tests/Makefile.am: Add new testcases. * tests/testsuite.at: Likewise.
Diffstat (limited to 'src/extern.h')
-rw-r--r--src/extern.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/extern.h b/src/extern.h
index a2a08b7..4f94d40 100644
--- a/src/extern.h
+++ b/src/extern.h
@@ -199,6 +199,7 @@ void stat_to_cpio (struct cpio_file_stat *hdr, struct stat *st);
void cpio_to_stat (struct stat *st, struct cpio_file_stat *hdr);
void cpio_safer_name_suffix (char *name, bool link_target,
bool absolute_names, bool strip_leading_dots);
+int cpio_create_dir (struct cpio_file_stat *file_hdr, int existing_dir);
/* FIXME: These two defines should be defined in paxutils */
#define LG_8 3
@@ -208,7 +209,9 @@ uintmax_t from_ascii (char const *where, size_t digs, unsigned logbase);
#define FROM_OCTAL(f) from_ascii (f, sizeof f, LG_8)
#define FROM_HEX(f) from_ascii (f, sizeof f, LG_16)
-
+
+void delay_cpio_set_stat (struct cpio_file_stat *file_stat,
+ mode_t invert_permissions);
void delay_set_stat (char const *file_name, struct stat *st,
mode_t invert_permissions);
int repair_delayed_set_stat (struct cpio_file_stat *file_hdr);

Return to:

Send suggestions and report system problems to the System administrator.