summaryrefslogtreecommitdiff
path: root/src/copy.h
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2005-05-31 06:15:18 +0000
committerPaul Eggert <eggert@cs.ucla.edu>2005-05-31 06:15:18 +0000
commitd8ce6bf1434748af09cdf17620d7585eae23fd6f (patch)
treefc6bea8bc961c86a097841b9a7bbc2040807d49d /src/copy.h
parente6a9bbce565defebd361d54979737f0e1ab00f7b (diff)
downloadcoreutils-d8ce6bf1434748af09cdf17620d7585eae23fd6f.tar.xz
Add copyright notice.
(struct cp_options): Remove myeuid member. Add chown_privileges member. (chown_privileges, chown_failure_ok): New function decls.
Diffstat (limited to 'src/copy.h')
-rw-r--r--src/copy.h40
1 files changed, 30 insertions, 10 deletions
diff --git a/src/copy.h b/src/copy.h
index 1308962fb..90a47f73e 100644
--- a/src/copy.h
+++ b/src/copy.h
@@ -1,3 +1,22 @@
+/* core functions for copying files and directories
+ Copyright (C) 89, 90, 91, 1995-2005 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
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+
+/* Extracted from cp.c and librarified by Jim Meyering. */
+
#ifndef COPY_H
# define COPY_H
@@ -94,8 +113,9 @@ struct cp_options
If that fails, then resort to copying. */
bool move_mode;
- /* This process's effective user ID. */
- uid_t myeuid;
+ /* Whether this process has appropriate privileges to chown a file
+ whose owner is not the effective user ID. */
+ bool chown_privileges;
/* If true, when copying recursively, skip any subdirectories that are
on different file systems from the one we started on. */
@@ -195,14 +215,14 @@ int rpl_rename (const char *, const char *);
# define rename rpl_rename
# endif
-bool
-copy (const char *src_path, const char *dst_path,
- bool nonexistent_dst, const struct cp_options *options,
- bool *copy_into_self, bool *rename_succeeded);
+bool copy (const char *src_path, const char *dst_path,
+ bool nonexistent_dst, const struct cp_options *options,
+ bool *copy_into_self, bool *rename_succeeded);
+
+void dest_info_init (struct cp_options *);
+void src_info_init (struct cp_options *);
-void
-dest_info_init (struct cp_options *);
-void
-src_info_init (struct cp_options *);
+bool chown_privileges (void);
+bool chown_failure_ok (struct cp_options const *);
#endif