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