(jm_FILE_SYSTEM_USAGE): Add `[]' between use of
[coreutils.git] / src / chown-core.h
blob1da12a79c46e647e8c4574eb252200d466245e6f
1 /* chown-core.h -- types and prototypes shared by chown and chgrp.
2 Copyright (C) 2000 Free Software Foundation.
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2, or (at your option)
7 any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software Foundation,
16 Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
18 #ifndef CHOWN_CORE_H
19 # define CHOWN_CORE_H
21 enum Change_status
23 CH_NOT_APPLIED = 1,
24 CH_SUCCEEDED,
25 CH_FAILED,
26 CH_NO_CHANGE_REQUESTED
29 enum Verbosity
31 /* Print a message for each file that is processed. */
32 V_high,
34 /* Print a message for each file whose attributes we change. */
35 V_changes_only,
37 /* Do not be verbose. This is the default. */
38 V_off
41 enum Dereference_symlink
43 DEREF_UNDEFINED = 1,
44 DEREF_NEVER, /* -P */
45 DEREF_COMMAND_LINE_ARGUMENTS, /* -H */
46 DEREF_ALWAYS /* -L */
49 struct Chown_option
51 /* Level of verbosity. */
52 enum Verbosity verbosity;
54 /* If nonzero, change the ownership of directories recursively. */
55 int recurse;
57 /* This is useful only on systems with support for changing the
58 ownership of symbolic links. */
59 enum Dereference_symlink dereference;
61 /* If nonzero, force silence (no error messages). */
62 int force_silent;
64 /* The name of the user to which ownership of the files is being given. */
65 char *user_name;
67 /* The name of the group to which ownership of the files is being given. */
68 char *group_name;
71 void
72 chopt_init (struct Chown_option *);
74 void
75 chopt_free (struct Chown_option *);
77 char *
78 gid_to_name (gid_t);
80 char *
81 uid_to_name (uid_t);
83 int
84 change_file_owner PARAMS ((int, const char *,
85 uid_t, gid_t,
86 uid_t, gid_t,
87 struct Chown_option const *));
89 #endif /* CHOWN_CORE_H */