xref: /illumos-gate/usr/src/cmd/filesync/messages.h (revision 2a8bcb4efb45d99ac41c94a75c396b362c414f7f)
1 /*
2  * CDDL HEADER START
3  *
4  * The contents of this file are subject to the terms of the
5  * Common Development and Distribution License, Version 1.0 only
6  * (the "License").  You may not use this file except in compliance
7  * with the License.
8  *
9  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10  * or http://www.opensolaris.org/os/licensing.
11  * See the License for the specific language governing permissions
12  * and limitations under the License.
13  *
14  * When distributing Covered Code, include this CDDL HEADER in each
15  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16  * If applicable, add the following below this CDDL HEADER, with the
17  * fields enclosed by brackets "[]" replaced with your own identifying
18  * information: Portions Copyright [yyyy] [name of copyright owner]
19  *
20  * CDDL HEADER END
21  */
22 /*
23  * Copyright (c) 1996 Sun Microsystems, Inc.  All Rights Reserved
24  *
25  * module:
26  *	messages.h
27  *
28  * purpose:
29  *	contins defines for all localizable messages
30  *
31  * notes:
32  *	unless otherwise specified, all %s arguments can be assumed
33  * 	to be file names.  Non-obvious arguments are explained in
34  *	comments.
35  */
36 
37 #ifndef	_MESSAGES_H
38 #define	_MESSAGES_H
39 
40 #ifdef	__cplusplus
41 extern "C" {
42 #endif
43 
44 #include <libintl.h>
45 
46 /*
47  * summary output messages
48  */
49 #define	SUM_hd		"RECONCILE %s and %s (%d files)\n"
50 #define	SUM_dst		"\t-> %4d copies, %4d deletes, %4d ownership\n"
51 #define	SUM_src		"\t<- %4d copies, %4d deletes, %4d ownership\n"
52 #define	SUM_unresolved	"\tUNRESOLVED CONFLICTS: %d\n"
53 
54 /*
55  * verbose mode analysis commentary
56  */
57 #define	V_nomore	"# file %s no longer exists\n"
58 #define	V_deleted	"# file %s deleted from %s\n"	/* src/dst */
59 #define	V_created	"# file %s created on %s\n"	/* src/dst */
60 #define	V_delconf	"# file %s has been deleted and changed\n"
61 #define	V_trunconf	"# file %s has been truncated and changed\n"
62 #define	V_unchanged	"# file %s has two identical versions\n"
63 #define	V_different	"# file %s has two different versions\n"
64 #define	V_modes		"# file %s has changed modes/ownership\n"
65 #define	V_changed	"# file %s has been modified\n"
66 #define	V_renamed	"# file %s has been renamed to %s\n"
67 #define	V_prunes	"# %d stale entries pruned from baseline\n"
68 #define	V_nostat	"# WARNING: unable to stat file %s\n"
69 #define	V_change	"# WARNING: file %s on %s, was <%ld,%ld>#%ld, now <%ld,%ld>#%ld\n"
70 #define	V_suppressed	"# file %s not reconciled due to halt-on-error\n"
71 
72 /*
73  * usage messages
74  */
75 #define	ERR_usage	"Usage:"
76 #define	USE_a		"always check for Access Control Lists"
77 #define	USE_e		"everything must agree (modes, owner, group)"
78 #define	USE_h		"halt immediately after a file propagation error"
79 #define	USE_m		"modification times should be preserved"
80 #define	USE_n		"no touch (do not change any files)"
81 #define	USE_q		"quiet    (do not list reconciliation commands)"
82 #define	USE_v		"verbose  (commentary on each changed file)"
83 #define	USE_y		"yes      (do not prompt for confirmations)"
84 #define	USE_s		"source directory for new rules"
85 #define	USE_d		"destination directory for new rules"
86 #define	USE_r		"restrict reconciliation to specified directories"
87 #define	USE_f		"force conflicts to resolve in favor of src/dst/old/new"
88 #define	USE_o		"one-way: only propagate changes from src/dst"
89 
90 /*
91  * These are the basic usage scenario line, and in most cases should not
92  * be translated.
93  */
94 #define	USE_simple	"[-mnqv] -s dir -d dir file ..."
95 #define	USE_all		"[-aehmnqvy] [-r dir] [-f src/dst/old/new] [-o src/dst]"
96 
97 /*
98  * error messages
99  */
100 #define	ERR_open	"ERROR: cannot open %s file %s\n"
101 #define	ERR_creat	"ERROR: unable to create %s file %s\n"
102 #define	ERR_write	"ERROR: write error in %s file %s\n"
103 #define	ERR_fclose	"ERROR: error in flushing and closing %s file %s\n"
104 #define	ERR_chdir	"ERROR: unable to chdir to %s\n"
105 #define	ERR_rename	"ERROR: unable to rename %s file %s to %s\n"
106 #define	ERR_lock	"ERROR: unable to lock %s file %s\n"
107 			/*
108 			 * first %s argument is "rules" or "baseline"
109 			 */
110 #define	ERR_badinput	"ERROR: invalid input at line %d, %s in %s\n"
111 			/*
112 			 * first %s argument is a the name of the offending
113 			 * field (e.g. "mode" or "major dev").  The last
114 			 * %s argument is the name of the file being
115 			 * processed.
116 			 */
117 #define	ERR_badver	"ERROR: bad version (%d.%d) found in %s file %s\n"
118 			/*
119 			 * second %s is "rules" or "baseline"
120 			 * last %s is file name
121 			 */
122 
123 
124 #define	ERR_nocwd	"ERROR: unable to get working directory for %s\n"
125 #define	ERR_longname	"ERROR: excessively long name %s\n"
126 #define	ERR_undef	"ERROR: undefined variable %s\n"
127 #define	ERR_deep	"ERROR: directory tree is too deep at directory %s\n"
128 
129 #define	ERR_badopt	"ERROR: unrecognized option -%c %s\n"
130 			/*
131 			 * the %c argument is the offending flag
132 			 * (e.g. -f or -o) and the %s is the argument
133 			 * that followed it.
134 			 */
135 
136 #define	ERR_nofsync	"ERROR: unable to find rule and baseline files\n"
137 #define	ERR_badbase	"ERROR: invalid BASE directory %s\n"
138 #define	ERR_nosrc	"ERROR: no source directory specified\n"
139 #define	ERR_nodst	"ERROR: no destination directory specified\n"
140 #define	ERR_nonames	"ERROR: no file/directory names specified and no rules file found\n"
141 #define	ERR_tomany	"ERROR: only %d -r arguments allowed\n"
142 #define	ERR_rdwri	"ERROR: cannot read/write file %s\n"
143 #define	ERR_dirwac	"ERROR: cannot create files in directory %s\n"
144 #define	ERR_nomem	"ERROR: unable to allocate memory for %s\n"
145 			/*
146 			 * the %s argument is the name of a data structure
147 			 * that could not be allocated.  It is only useful
148 			 * for telling the support person over the phone.
149 			 */
150 
151 #define	ERR_badrun	"ERROR: bad exit code from %s\n"
152 			/*
153 			 * argument is a command from the rules file
154 			 */
155 
156 #define	ERR_cannot	"ERROR: %s %s\n"
157 			/*
158 			 * The first %s argument will be a PROB_ string.
159 			 * The second %s argument is the file we were
160 			 * trying to do it to.
161 			 */
162 
163 #define	ERR_abort_h	"ERROR: aborting because of propagation failure\n"
164 
165 #define	WARN_ignore	"WARNING: ignoring LIST rule for %s (illegal '.', '..', or '/')\n"
166 #define	WARN_noacls	"WARNING: ACLs are not supported for file %s\n"
167 #define	WARN_deletes	"WARNING: this operation might delete %d files\n"
168 #define	WARN_rmdirs	"WARNING: operation might delete %d non-empty directories\n"
169 #define	WARN_ichange	"WARNING: %d listed directories have changed Inode #s\n"
170 #define	WARN_proceed	"Press Enter to confirm, or interrupt to abort\n"
171 #define	WARN_super	"NOTE: there are ownership and protection conflicts that can only be\n      resolved by the super user\n"
172 
173 /*
174  * descriptions of problems in unreconcilable files
175  */
176 #define	PROB_del_change	"deleted and changed"
177 #define	PROB_different	"two different versions"
178 #define	PROB_ownership	"different owners"
179 #define	PROB_protection	"different protections"
180 #define	PROB_prohibited	"blocked by -o switch"
181 #define	PROB_aborted	"aborted by -h switch"
182 
183 #define	PROB_chown	"unable to chown"
184 #define	PROB_chgrp	"unable to chgrp"
185 #define	PROB_chmod	"unable to chmod"
186 #define	PROB_chacl	"unable to setfacl"
187 #define	PROB_link	"unable to link"
188 #define	PROB_unlink	"unable to unlink"
189 #define	PROB_rmdir	"unable to rmdir"
190 #define	PROB_copy	"unable to copy"
191 #define	PROB_mknod	"unable to mknod"
192 #define	PROB_mkdir	"unable to mkdir"
193 #define	PROB_readlink	"unable to read symlink"
194 #define	PROB_symlink	"unable to create symlink"
195 #define	PROB_restat	"unable to stat/restat"
196 #define	PROB_deal	"unable to deal with"
197 #define	PROB_copyin	"unable to open changed file"
198 #define	PROB_copyout	"unable to create new file"
199 #define	PROB_botch	"unable to safely setfacl"
200 #define	PROB_rename	"unable to rename"
201 #define	PROB_rename2	"unable to rename/create"
202 #define	PROB_read	"read error"
203 #define	PROB_write	"write error"
204 #define	PROB_space	"insufficient space to copy"
205 
206 
207 /*
208  * text snippets
209  */
210 #define	TXT_src		"source"			/* for WARN_change   */
211 #define	TXT_dst		"destination"			/* for WARN_change   */
212 #define	TXT_srcdst	"missing source/destination"	/* for ERR_bad_input */
213 #define	TXT_noargs	"missing arguments"		/* for ERR_bad_input */
214 #define	TXT_badver	"invalid version number"	/* for ERR_bad_input */
215 #define	TXT_nobase	"LIST without a BASE"		/* for ERR_bad_input */
216 #define	TXT_rules	"rules"				/* for ERR_bad_ver   */
217 #define	TXT_base	"baseline"			/* for ERR_bad_ver   */
218 
219 #ifdef	__cplusplus
220 }
221 #endif
222 
223 #endif	/* _MESSAGES_H */
224