]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
Add copyright notice.
authorPaul Eggert <eggert@cs.ucla.edu>
Tue, 31 May 2005 06:15:18 +0000 (06:15 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Tue, 31 May 2005 06:15:18 +0000 (06:15 +0000)
(struct cp_options): Remove myeuid member.  Add chown_privileges
member.
(chown_privileges, chown_failure_ok): New function decls.

src/copy.h

index 1308962fb1b3b6eb3485bd948b01322964c3f199..90a47f73e521648b00e7b56bf203213e709bdaa6 100644 (file)
@@ -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