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