1 /* 2 * License: BSD-style license 3 * Copyright: Radek Podgorny <radek@podgorny.cz>, 4 * Bernd Schubert <bernd-schubert@gmx.de> 5 */ 6 7 #ifndef COW_UTILS_H 8 #define COW_UTILS_H 9 10 #define VM_AND_BUFFER_CACHE_SYNCHRONIZED 11 #define MAXBSIZE 4096 12 13 struct cow { 14 mode_t umask; 15 uid_t uid; 16 17 // source file 18 char *from_path; 19 struct stat *stat; 20 21 // destination file 22 char *to_path; 23 }; 24 25 int setfile(const char *path, struct stat *fs); 26 int copy_special(struct cow *cow); 27 int copy_fifo(struct cow *cow); 28 int copy_link(struct cow *cow); 29 int copy_file(struct cow *cow); 30 31 #endif 32