blob: fb9f4943931133ed9d5b445196f992f08f431298 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
|
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright (c) 2017 Peter Tribble.
*/
/*
* Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _PKGADM_MSGS_H
#define _PKGADM_MSGS_H
#include <libintl.h>
#ifdef __cplusplus
extern "C" {
#endif
#ifdef lint
#define gettext(x) x
#endif
/* generic messages */
#define MSG_BAD_SUB gettext(\
"\"%s\" is not a valid subcommand")
#define MSG_MISSING_OPERAND gettext(\
"-%c requires an operand")
#define MSG_USAGE gettext(\
"usage:\n" \
"\n" \
"pkgadm dbstatus [-R rootpath]\n" \
"\n" \
"\t- Returns 'text' - the text install database in use since Solaris 2.0\n" \
"\t is the current install database in use.\n" \
"\n" \
"pkgadm sync [-R rootpath] [-q]\n" \
"\n" \
"\t- Writes the contents file and rolls the contents log file.\n" \
"\t- Optionally forces the contents file server to quit [-q].\n" \
"\n" \
"pkgadm -V\n" \
"\t- Displays packaging tools version\n" \
"\n" \
"pkgadm -?\n" \
"\t- Shows this help message\n")
#define MSG_WARNING gettext(\
"WARNING")
#define MSG_ERROR gettext(\
"ERROR")
#define MSG_T_OPTION_ARGS gettext(\
"-t option takes 2 or 3 arguments, not %d!\n")
#define MSG_T_RESULT_TWO gettext(\
"result <%d>: <%s> ~= <%s>\n")
#define MSG_T_RESULT_THREE gettext(\
"required <%d> actual <%d> <%30s> ~- <%30s>\n")
#define MSG_ERROR gettext(\
"ERROR")
/* warnings */
#define CREATE_PKGDIR_WARN gettext(\
"Creating directory <%s>\n")
#define MSG_VALID_STALE gettext(\
"Removing stale lock on <%s> pid <%ld> zid <%ld>")
/* errors */
#define MSG_INTERNAL gettext(\
"Intenal Error <%s>")
#define MSG_OPEN gettext(\
"Cannot open <%s> for reading")
#define MSG_OPEN_WRITE gettext(\
"Cannot open <%s> for writing")
#define ERR_LOG_FAIL gettext(\
"Failed to log message using format <%s>")
#define MSG_ZONES_MISSING_REQUEST gettext(\
"Must specify operation to perform\n")
#define MSG_LOCK_ALTROOT_CANTCREATE gettext(\
"lock: cannot create alternative root directory <%s>: %s\n")
#define MSG_LOCK_ALTROOT_NONEXIST gettext(\
"lock: argument to -R <%s> is not a directory: %s\n")
#define MSG_LOCK_ROOTDIR_INVALID gettext(\
"lock: lock file base directory <%s> not valid: %s\n")
#define MSG_LOCK_WFLAG_BADINT gettext(\
"The integer value <%s> given to the -W option includes an " \
"invalid character: \"%c\"\n")
#define MSG_LOCK_pFLAG_BADINT gettext(\
"The integer value <%s> given to the -p option includes an " \
"invalid character: \"%c\"\n")
#define MSG_LOCK_zFLAG_BADINT gettext(\
"The integer value <%s> given to the -z option includes an " \
"invalid character: \"%c\"\n")
#define MSG_LOCK_nFLAG_BADINT gettext(\
"The integer value <%s> given to the -n option includes an " \
"invalid character: \"%c\"\n")
#define MSG_LOCK_ar_TOGETHER gettext(\
"lock: The -a and -r options cannot be used together: "\
"specify only one.\n")
#define MSG_LOCK_kARG_TOOLONG gettext(\
"Argument to -k is <%d> characters: may not exceed <%d> characters\n")
#define MSG_LOCK_oARG_TOOLONG gettext(\
"Argument to -o is <%d> characters: may not exceed <%d> characters\n")
#define MSG_LOCK_RARG_NOT_ABSOLUTE gettext(\
"Argument to -R must be absolute path: %s")
#define MSG_LOCK_WFLAG_ERROR gettext(\
"Argument to -W has problem with wait interval <%s>: %s")
#define MSG_LOCK_pFLAG_ERROR gettext(\
"Argument to -p has problem with process i.d. value <%s>: %s")
#define MSG_LOCK_zFLAG_ERROR gettext(\
"Argument to -p has problem with zone i.d. value <%s>: %s")
#define MSG_LOCK_nFLAG_ERROR gettext(\
"Argument to -n has problem with maximum number of retries " \
"value <%s>: %s")
#define MSG_LOCK_es_TOGETHER gettext(\
"lock: The -e and -s options cannot be used together: "\
"specify only one.\n")
#define MSG_LOCK_ak_TOGETHER gettext(\
"lock: The -k option cannot be used with the -a option.\n")
#define MSG_LOCK_e_without_a gettext(\
"lock: The -e option can only be used with the -a option.\n")
#define MSG_LOCK_s_without_a gettext(\
"lock: The -s option can only be used with the -a option.\n")
#define MSG_LOCK_ACQUIRE_KEYMISMATCH gettext(\
"cannot acquire %s lock on <%s>: object locked and specified key " \
"does not match")
#define MSG_LOCK_ACQUIRE_ERROR gettext(\
"cannot determine if object <%s> key <%s> is locked: %s")
#define MSG_LOCK_ACQUIRE_TIMEDOUT gettext(\
"cannot acquire %s lock on <%s> key <%s>: object locked, no key " \
"was specified, and the wait timed out")
#define MSG_LOCK_ACQUIRE_WAITING gettext(\
"object <%s> is locked: waiting for object to become available")
#define MSG_LOCK_ACQUIRE_REOPEN_FAILED gettext(\
"cannot reopen lock file after waiting for lock on object " \
"<%s> to be released")
#define MSG_LOCK_RELEASE_NOTLOCKED gettext(\
"cannot release lock on <%s> key <%s>: object not locked and " \
"a key was specified")
#define MSG_LOCK_RELEASE_LOCKED gettext(\
"cannot release lock on <%s> key <%s>: object locked but no " \
"key was specified")
#define MSG_LOCK_RELEASE_NOTFOUND gettext(\
"cannot release lock on <%s> key <%s>: object is not locked")
#define MSG_LOCK_RELEASE_KEYMISMATCH gettext(\
"cannot release lock on <%s>: object locked and specified key " \
"does not match")
#define MSG_LOCK_RELEASE_ERROR gettext(\
"cannot determine if object <%s> key <%s> is locked")
#define MSG_LOCK_EXEC_ACCESS gettext(\
"cannot execute command <%s>: %s")
#define MSG_LOCK_EXEC_NOINPUT gettext(\
"cannot open input file <%s>: %s")
#define MSG_LOCK_EXEC_NOPIPE gettext(\
"cannot create pipe: %s")
#define MSG_LOCK_FINDLOCK_LSEEK_FAILURE gettext(\
"cannot find lock <%s> key <%s>: lseek failure: %s")
#define MSG_LOCK_ADDLOCK_PWRITE_FAILURE gettext(\
"cannot create %s lock for object <%s>: pwrite failure: %s")
#define MSG_LOCK_ADDLOCK_LSEEK_FAILURE gettext(\
"cannot create %s lock for object <%s>: lseek failure: %s")
#define MSG_LOCK_INCLOCK_PWRITE_FAILURE gettext(\
"cannot increment %s lock for object <%s>: pwrite failure: %s")
#define MSG_LOCK_DECLOCK_PWRITE_FAILURE gettext(\
"cannot decrement %s lock for object <%s>: pwrite failure: %s")
#define MSG_LOCK_DECLOCK_PREAD_FAILURE gettext(\
"cannot decrement %s lock for object <%s>: pread failure: %s")
#define MSG_LOCK_DECLOCK_LSEEK_FAILURE gettext(\
"cannot decrement %s lock for object <%s>: lseek failure: %s")
#define MSG_LOCK_DECLOCK_FTRUNCATE_FAILURE gettext(\
"cannot decrement %s lock for object <%s>: ftruncate failure: %s")
/*
* i18n:
* next two messages grouped together
*/
#define MSG_LOCK_ACQUIRE_BUSY_QUASI gettext(\
"cannot acquire %s lock on <%s> key <%s>: object matches wildcard " \
"<%s> lock%s")
#define MSG_LOCK_ACQUIRE_BUSY_FIRST gettext(\
"cannot acquire %s lock on <%s> key <%s>: object <%s> is locked <%s>%s")
/*
* i18n: note this message may be appended to the previous message
* by supplying it to the final "%s" at the end of the line above;
* that is either:
* cannot acquire %s lock on <%s> key <%s>: object is locked <%s>
* or:
* cannot acquire %s lock on <%s> [...] is locked <%s> and no key specified
*/
#define MSG_LOCK_ACQUIRE_BUSY_ADDITIONAL gettext(\
" and no key specified")
/*
* i18n: note these two "messages" are inserted into other
* messages, such as:
* cannot acquire %s lock on <%s>
* will be either:
* cannot acquire shared lock on <%s>
* or
* cannot acquire exclusive lock on <%s>
*/
#define MSG_LOCK_EXC gettext(\
"exclusive")
#define MSG_LOCK_SHR gettext(\
"shared")
/*
* i18n: note these messages are "debugging" messages and will normally
* not be seen unless debugging has been enabled for problem root causing
* so they are not meant to be perfectly "human readable"
*/
#define MSG_VALID_NOPID gettext(\
"validate lock <%s>: VALID (no pid)")
#define MSG_VALID_BADZID gettext(\
"validate lock <%s>: VALID (lock zid <%ld> this zid <%ld>)")
#define MSG_VALID_ZIDOK gettext(\
"validate lock <%s>: zone i.d.s match (lock zid <%ld> this zid <%ld>)")
#define MSG_VALID_OK gettext(\
"validate lock <%s> pid <%ld> path <%s>: VALID")
#define MSG_VALID_NOTOK gettext(\
"validate lock <%s> pid <%ld> path <%s>: NOT VALID")
#define MSG_LCKMCH_ENTRY gettext(\
"lockMatch: *** BEGIN *** compare objects <%s> <%s>")
#define MSG_LCKMCH_FSTNODE gettext(\
"lockMatch: first lock node (%d) <%s>")
#define MSG_LCKMCH_SCNDNODE gettext(\
"lockMatch: second lock node (%d) <%s>")
#define MSG_LCKMCH_NODES gettext(\
"lockMatch: first lock node <%s> prefix <%s> (%d) second lock " \
" node <%s> prefix <%s> (%d)")
#define MSG_LCKMCH_DIRMCH gettext(\
"lockMatch: no prefix direct comparison: match: <%s> <%s>")
#define MSG_LCKMCH_DIRNOMCH gettext(\
"lockMatch: no prefix direct comparison: NO MATCH: <%s> <%s>")
#define MSG_LCKMCH_PFXMCH gettext(\
"lockMatch: prefix comparison: match: <%s> <%s>")
#define MSG_LCKMCH_PFXNOMCH gettext(\
"lockMatch: prefix comparison: NO MATCH: <%s> <%s>")
#define MSG_LCKMCH_FSTLCK gettext(\
"lockMatch: first lock index (%d) last scanned node <%s> prefix " \
"<%s> (%d)")
#define MSG_LCKMCH_SCNDLCK gettext(\
"lockMatch: second lock index (%d) last scanned node <%s> prefix " \
"<%s> (%d)")
#define MSG_LCKMCH_ABSNOMCH gettext(\
"lockMatch: absolute locks: NO MATCH: <%s> <%s>")
#define MSG_LCKMCH_OBJMCH gettext(\
"lockMatch: object locks: match: <%s> <%s>")
#define MSG_LCKMCH_OVLPNOMCH gettext(\
"lockMatch: nonmatching overlapping objects: <%s> <%s> before " \
"(%d) <%s>")
#define MSG_LCKMCH_SAME gettext(\
"lockMatch: locks begin with same node - compare: <%s> <%s> at <%s>")
#define MSG_LCKMCH_SCNDSUB gettext(\
"lockMatch: second lock <%s> subset of <%s> at (%d) <%s>")
#define MSG_LCKMCH_FRSTSUB gettext(\
"lockMatch: first lock <%s> subset of <%s> at (%d) <%s>")
#define MSG_LCKMCH_DONTKNOW gettext(\
"lockMatch: unable to determine how to compare locks: <%s> <%s>: " \
"using direct comparision")
#define MSG_LCKMCH_READY gettext(\
"lockMatch: comparing nodes locks <%s> <%s>")
#define MSG_LCKMCH_NODEFAIL gettext(\
"lockMatch: node (%d) comparison: NO MATCH: <%s> != <%s>")
#define MSG_LCKMCH_NODEOK gettext(\
"lockMatch: node (%d) comparision: match: <%s> == <%s>")
#define MSG_LCKMCH_MATCHOK gettext(\
"lockMatch: locks match: <%s> == <%s>")
#define MSG_LOCK_EXEC_RESULTS gettext(\
"command <%s> executed: pid <%d> errno <0x%04x> status <0x%04x> " \
"final status <0x%04x> output <%s>")
#define MSG_LOCK_GENUID_INTERNAL gettext(\
"generated new unique key using date: %s")
#define MSG_LOCK_DECLOCK_DECING gettext(\
"decrement <%s> lock count record <%d> count <%d>")
#define MSG_LOCK_DECLOCK_DONE gettext(\
"decrement lock record <%d> count <%d> object <%s> key <%s>")
#define MSG_LOCK_DECLOCK_REMOVE gettext(\
"decrement lock remove record lastPos %ld last record %d " \
"current record %d")
#define MSG_LOCK_DECLOCK_LASTONE gettext(\
"decrement lock removing <%s> lock last record <%d> " \
"truncating to <%ld>")
#define MSG_LOCK_DECLOCK_REMOVING gettext(\
"decrement lock removing record <%d> last record <%d> " \
"truncating to <%ld>")
#define MSG_LOCK_INCLOCK_ENTRY gettext(\
"increment <%s> lock count record <%d> count <%d>")
#define MSG_LOCK_INCLOCK_DONE gettext(\
"increment lock record <%d> count <%d> object <%s> key <%s>")
#define MSG_LOCK_ADDLOCK_ADDING gettext(\
"adding %s lock pos <%d> object <%s> key <%s> pid <%ld> zid <%ld>")
#define MSG_LOCK_FINDLOCK_ENTRY gettext(\
"find lock object <%s> key <%s>")
#define MSG_LOCK_FINDLOCK_READRECORD gettext(\
"find lock read record <%d>: count <%d> object <%s> key <%s> pid " \
"<%ld> zid <%ld>")
#define MSG_LOCK_FINDLOCK_FOUND gettext(\
"find lock record found")
#define MSG_LOCK_FINDLOCK_NOTFOUND gettext(\
"find lock record not found")
#define MSG_LOCK_OPENFILE_ENTRY gettext(\
"open lock file root <%s> file <%s>")
#define MSG_LOCK_OPENFILE_SLEEPING gettext(\
"open lock file busy <%s>: sleeping <%d>")
#define MSG_LOCK_OPENFILE_FAILURE gettext(\
"open lock file could not be opened: %s")
#define MSG_LOCK_OPENFILE_SLEEP2 gettext(\
"open lock file cannot obtain record lock <%s>: sleeping <%d>")
#define MSG_LOCK_OPENFILE_FAIL2 gettext(\
"open lock file could not obtain record lock: <%s>")
#define MSG_LOCK_OPENFILE_SUCCESS gettext(\
"open lock file: opened and locked fd <%d>")
#define MSG_LOCK_STATUS_READRECORD gettext(\
"status read record <%d>: count <%d> object <%s> key <%s> pid <%ld> " \
"zid <%ld>")
#define MSG_LOCK_STATUS_ENTRY gettext(\
"status key=<%s> object=<%s>")
#define MSG_LOCK_RELEASE_FOUND gettext(\
"object <%s> key <%s> is locked: decrementing lock count")
#define MSG_LOCK_RELEASE_ENTRY gettext(\
"release lock key=<%s> object=<%s> quiet=<%d>")
#define MSG_LOCK_RELEASE_FINDRESULT gettext(\
"release lock result <%d> record <%d>")
#define MSG_LOCK_ACQUIRE_FOUND_INC gettext(\
"object <%s> key <%s> is locked: incrementing <%s> lock count")
#define MSG_LOCK_ACQUIRE_ENTRY gettext(\
"acquire lock key=<%s> object=<%s> quiet=<%d> exclusive=<%d>")
#define MSG_LOCK_ACQUIRE_FINDRESULT gettext(\
"acquire %s lock result <%d> record <%d>")
#define MSG_LOCK_ACQUIRE_LOCKED_SHARED gettext(\
"object <%s> key <%s> is locked but shared: incrementing lock count")
#define MSG_LOCK_ACQUIRE_NOTLOCKED gettext(\
"cannot acquire %s lock on <%s> key <%s>: object not locked " \
"and non-matching key specified")
#define MSG_LOCK_ACQUIRE_NOTFOUND gettext(\
"acquiring %s lock on object <%s>")
#ifdef __cplusplus
}
#endif
#endif /* _PKGADM_MSGS_H */
|