xref: /titanic_44/usr/src/cmd/devfsadm/message.h (revision 03831d35f7499c87d51205817c93e9a8d42c4bae)
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 2004 Sun Microsystems, Inc.  All rights reserved.
24  * Use is subject to license terms.
25  */
26 
27 #ifndef	_MESSAGE_H
28 #define	_MESSAGE_H
29 
30 #pragma ident	"%Z%%M%	%I%	%E% SMI"
31 
32 #ifdef	__cplusplus
33 extern "C" {
34 #endif
35 
36 #define	CANNOT_BE_USED \
37 	gettext("Pattern '%s' cannot be used with device '%s:%s'\n")
38 
39 #define	MUST_BE_ROOT gettext("you must be root to run this program\n")
40 
41 #define	CANT_FIND_USER gettext("name service cannot find user: %s\n")
42 
43 #define	CANT_FIND_GROUP gettext("name service cannot find group %s\n")
44 
45 #define	NO_LINKTAB gettext("no devlink.tab rules loaded from file '%s'\n")
46 
47 #define	NO_MODULES gettext("no modules loaded from MODPATH '%s'\n")
48 
49 #define	ABORTING gettext("aborting\n")
50 
51 #define	MODIFY_PATH gettext("use devfsadm -l to modify\n")
52 
53 #define	CONFIGURING gettext("Configuring devices.\n")
54 
55 #define	CHROOT_FAILED gettext("chdir to root failed: %s\n")
56 
57 #define	DAEMON_RUNNING gettext("daemon pid %d is already running\n")
58 
59 #define	ALIAS_TOO_LONG \
60 gettext("alias name is too long; must be %d characters or less: %s\n")
61 
62 #define	MAJOR_AND_B_FLAG \
63 gettext("must specify major number and driver name when using the -b flag\n")
64 
65 #define	MODCTL_ADDMAJBIND \
66 gettext("modctl failed to add major number binding.\n")
67 
68 #define	DRIVER_FAILURE gettext("driver failed to attach: %s\n")
69 
70 #define	IS_EVENTD_RUNNING gettext("check to make sure syseventd is running\n")
71 
72 #define	UNKNOWN_EVENT gettext("parse_event: unknown event type: %s\n")
73 
74 #define	DI_INIT_FAILED gettext("di_init failed for %s: %s\n")
75 
76 #define	CLONE_NOT_FOUND gettext("di_init failed to find clone entry for %s\n")
77 
78 #define	DLOPEN_FAILED gettext("dlopen failed: %s: %s\n")
79 
80 #define	REGCOMP_FAILED gettext("regcomp failed for %s: error code: %d\n")
81 
82 #define	IGNORING_ENTRY \
83 gettext("ignoring devfsadm_create entry #%d in module %s\n")
84 
85 #define	CANT_CREATE_THREAD gettext("can not create thread %s: %s\n")
86 
87 #define	CANT_CREATE_DOOR gettext("can not create event door %s: %s\n")
88 
89 #define	CANT_CREATE_ZONE_DOOR \
90     gettext("can not create zone registration door %s: %s\n")
91 
92 #define	FAILED_FOR_MODULE gettext("%s failed for module %s\n")
93 
94 #define	REMOVING_LINK gettext("removing link %s -> %s invalid contents\n")
95 
96 #define	CREATING_LINK gettext("symlink %s -> %s\n")
97 
98 #define	SYMLINK_FAILED gettext("symlink failed for %s -> %s: %s\n")
99 
100 #define	MAX_ATTEMPTS \
101 gettext("cannot create link: %s -> %s.  max attempts exceeded\n")
102 
103 #define	PERM_MSG gettext("chown/chmod %s %ul/%ul/%o\n")
104 
105 #define	NO_DEVFS_NODE gettext("no devfs node or mismatched dev_t for %s\n")
106 
107 #define	CHMOD_FAILED gettext("chmod failed for %s: %s\n")
108 
109 #define	CHOWN_FAILED gettext("chown failed for %s: %s\n")
110 
111 #define	RM_INVALID_MINOR_NODE gettext("removing node %s.  invalid st_rdev\n")
112 
113 #define	OPENDIR_FAILED gettext("opendir failed for %s: %s\n")
114 
115 #define	READLINK_FAILED gettext("%s: readlink failed for %s: %s\n")
116 
117 #define	CANT_LOAD_SYSCALL gettext("cannot load system call for inst_sync\n")
118 
119 #define	SUPER_TO_SYNC \
120 gettext("you must be superuser to sync /etc/path_to_inst\n")
121 
122 #define	INSTSYNC_FAILED gettext("inst_sync failed for %s: %s\n")
123 
124 #define	RENAME_FAILED gettext("rename failed for %s: %s\n")
125 
126 #define	CANT_UPDATE gettext("cannot update: %s\n")
127 
128 #define	FCLOSE_FAILED gettext("fclose failed: %s: %s\n")
129 
130 #define	FAILED_TO_UPDATE gettext("WARNING: failed to update %s\n")
131 
132 #define	OPEN_FAILED gettext("open failed for %s: %s\n")
133 
134 #define	LSEEK_FAILED gettext("lseek failed for %s: %s\n")
135 
136 #define	LOCK_FAILED gettext("fcntl(F_SETLKW) failed for %s: %s\n")
137 
138 #define	WRITE_FAILED gettext("write failed for %s: %s\n")
139 
140 #define	UNLOCK_FAILED gettext("fcntl(F_UNLCK) failed for %s: %s\n")
141 
142 #define	CLOSE_FAILED gettext("close failed for %s: %s\n")
143 
144 #define	LSTAT_FAILED gettext("lstat failed for %s: %s\n")
145 
146 #define	STAT_FAILED gettext("stat failed for %s: %s\n")
147 
148 #define	GID_FAILED gettext("cannot determine gid for %d: %s\n")
149 
150 #define	MKNOD_FAILED gettext("mknod failed for %s: %s\n")
151 
152 #define	MODGETNAME_FAILED gettext("MODGETNAME failed for major number %lu\n")
153 
154 #define	FIND_MAJOR_FAILED gettext("could not find major number for driver %s\n")
155 
156 #define	FOPEN_FAILED gettext("fopen failed for %s: %s\n")
157 
158 #define	IGNORING_LINE_IN gettext("line %d:  malformed in %s\n")
159 
160 #define	MISSING_TAB \
161 gettext("line %d: configuration file %s has a missing tab -- ignoring\n")
162 
163 #define	MISSING_DEVNAME \
164 gettext("line %d: configuration file %s has a missing dev name field -- \
165 ignoring\n")
166 
167 #define	TOO_MANY_FIELDS \
168 gettext("line %d:  configuration file %s has too many fields -- ignoring\n")
169 
170 #define	LINE_TOO_LONG \
171 gettext("Line %d too long in configuration file %s -- should be less \
172 than %d characters\n")
173 
174 #define	UNRECOGNIZED_KEY \
175 gettext("unrecognized keyword '%s' -- ignoring line %d of file %s\n")
176 
177 #define	BADKEYWORD gettext("bad keyword '%s' on line %d of file %s\n")
178 
179 #define	MISSING_EQUAL \
180 	gettext("missing '=' in devfs_spec field line %d from file %s\n")
181 
182 #define	CONFIG_INCORRECT \
183 gettext("line %d: configuration file %s incorrect: %s -- ignoring\n")
184 
185 #define	NO_NODE gettext("no node name found for %s\n")
186 
187 #define	NO_MINOR gettext("no minor name for %s\n")
188 
189 #define	DRV_BUT_NO_ALIAS gettext("line %d: driver name with no alias in %s\n")
190 
191 #define	MALLOC_FAILED gettext("malloc failed for %d bytes\n")
192 
193 #define	REALLOC_FAILED gettext("realloc failed for %d bytes\n")
194 
195 #define	CALLOC_FAILED gettext("calloc failed for %d bytes\n")
196 
197 #define	STRDUP_FAILED gettext("strdup failed for %s\n")
198 
199 #define	CLOSEDIR_FAILED gettext("closedir failed %s\n")
200 
201 #define	MKDIR_FAILED gettext("mkdir failed for %s 0x%x: %s\n")
202 
203 #define	UNLINK_FAILED gettext("unlink failed for %s: %s\n")
204 
205 #define	DI_DEVFS_PATH_FAILED gettext("di_devfs_path failed: %s\n")
206 
207 #define	COMPAT_LINK_USAGE gettext("Usage:\n\t\t[ -C ]\n\t\t[ \
208 -r root_directory ]\n\t\t[ -n ]\n\t\t[ -v ]\n")
209 
210 #define	DEVLINKS_USAGE gettext("Usage:\n\t\t[ -d ]\n\t\t[ -n ]\n\t\t[ -r \
211 root_directory ]\n\t\t[ -t table-file ]\n\t\t[ -v ]\n")
212 
213 #define	DRVCONFIG_USAGE gettext("Usage:\n\t\t[ -a alias_name ]\n\t\t[ -b ]\
214 \n\t\t[ -c class_name ]\n\t\t[ -d ]\n\t\t[ -i driver_name ]\n\t\t[ -m \
215 major_number ]\n\t\t[ -n ]\n\t\t[ -r rootdir ]\n\t\t[ -v ]\n")
216 
217 #define	DEVFSADM_USAGE gettext("Usage:\n\t\t[ -c device_class ]\n\t\t[ -C ]\
218 \n\t\t[ -i driver_name ]\n\t\t[ -l module_path ]\n\t\t[ -n ]\
219 \n\t\t[ -r rootdir ]\n\t\t[ -s ]\n\t\t[ -t devlink_table_file ]\n\t\t[ -v ]\n")
220 
221 #define	DEVFSADM_UNLINK gettext("removing file: %s\n")
222 
223 #define	INVOKED_WITH gettext("invoked with %s\n")
224 
225 #define	MISSING_SYMBOLS gettext("missing symbols in %s\n")
226 
227 #define	RCM_ALLOC_HANDLE_ERROR gettext("Unable to allocate rcm handle\n")
228 
229 #define	RCM_NOTIFY_FAILED \
230 	gettext("RCM notification failed: " \
231 	"path = %s, driver = %s, instance = %d: %s\n")
232 
233 #define	RCM_NVLIST_BUILD_ERROR \
234 	gettext("failed to build nvlist for notifying RCM: " \
235 	"path = %s, driver = %s, instance = %d: %s\n")
236 
237 #define	INVALID_DEVLINK_SPEC gettext("Invalid devlink spec: '%s'\n")
238 
239 #define	DRV_LOAD_REQD gettext("-n option cannot be used with -i. Ignoring\n")
240 
241 #define	DPLCY_ONE_DFLT gettext("%s: Only one default entry allowed\n")
242 
243 #define	DPLCY_FIRST gettext("%s: First entry must be default entry\n")
244 
245 #define	INVALID_MINOR gettext("%s: invalid minor node specification\n")
246 
247 #define	MINOR_TOO_LONG gettext("%s:%s: minor node specification too long\n")
248 
249 #define	UNEXPECTED_EOF gettext("%s: unexpected end of file\n")
250 
251 #define	BAD_ENTRY gettext("\tin the following entry at line %d\n%s\n")
252 
253 #define	NO_MEMORY gettext("Out of memory\n")
254 
255 
256 #define	EVENT_ATTR_LOOKUP_FAILED \
257     gettext("failed to lookup event attributes: %s\n")
258 
259 #define	PROP_ADD_FAILED \
260     gettext("failed to add the property %s to event attributes\n")
261 
262 #define	DEV_NAME_LOOKUP_FAILED \
263     gettext("failed to lookup dev name for %s\n")
264 
265 #define	BUILD_EVENT_ATTR_FAILED \
266     gettext("failed to build event attributes: %s\n")
267 
268 #define	LOG_EVENT_FAILED gettext("failed to log event: %s\n")
269 
270 #define	INVALID_ZONE gettext("invalid zone: '%s'\n")
271 
272 #define	ZONE_ROOTPATH_FAILED \
273     gettext("could not determine root path for zone %s: %s\n")
274 
275 #define	ZONE_LIST_FAILED \
276     gettext("could not determine system zone configuration: %s\n")
277 
278 #define	ZONE_DOOR_MKFAIL \
279     gettext("failed to create door server for zone %s: %s\n")
280 
281 #define	ZONE_REG_FAILED \
282     gettext("failed registration operation for zone %s: %s\n")
283 
284 #define	ZONE_REP_FAILED \
285     gettext("repository or name service failure for zone %s: %s\n")
286 
287 #define	ZONE_LIB_MISSING \
288     gettext("unable to load libzonecfg, make sure zone packages " \
289 	"are installed\n")
290 
291 #define	ZONE_PATHCHECK \
292     gettext("cannot manage root path '%s': path is part of zone '%s'\n")
293 
294 #define	NVLIST_ERROR gettext("nvlist interface failed: %s\n")
295 
296 #ifdef	__cplusplus
297 }
298 #endif
299 
300 #endif /* _MESSAGE_H */
301