xref: /titanic_51/usr/src/cmd/devfsadm/message.h (revision bbaa8b60dd95d714741fc474adad3cf710ef4efd)
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 (the "License").
6  * You may not use this file except in compliance with the License.
7  *
8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9  * or http://www.opensolaris.org/os/licensing.
10  * See the License for the specific language governing permissions
11  * and limitations under the License.
12  *
13  * When distributing Covered Code, include this CDDL HEADER in each
14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15  * If applicable, add the following below this CDDL HEADER, with the
16  * fields enclosed by brackets "[]" replaced with your own identifying
17  * information: Portions Copyright [yyyy] [name of copyright owner]
18  *
19  * CDDL HEADER END
20  */
21 /*
22  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
23  * Use is subject to license terms.
24  */
25 
26 #ifndef	_MESSAGE_H
27 #define	_MESSAGE_H
28 
29 #ifdef	__cplusplus
30 extern "C" {
31 #endif
32 
33 #define	CANNOT_BE_USED \
34 	gettext("Pattern '%s' cannot be used with device '%s:%s'\n")
35 
36 #define	MUST_BE_ROOT gettext("you must be root to run this program\n")
37 
38 #define	CANT_FIND_USER gettext("name service cannot find user: %s\n")
39 
40 #define	CANT_FIND_GROUP gettext("name service cannot find group %s\n")
41 
42 #define	NO_LINKTAB gettext("no devlink.tab rules loaded from file '%s'\n")
43 
44 #define	NO_MODULES gettext("no modules loaded from MODPATH '%s'\n")
45 
46 #define	ABORTING gettext("aborting\n")
47 
48 #define	MODIFY_PATH gettext("use devfsadm -l to modify\n")
49 
50 #define	CONFIGURING gettext("Configuring devices.\n")
51 
52 #define	CHROOT_FAILED gettext("chdir to root failed: %s\n")
53 
54 #define	DAEMON_RUNNING gettext("daemon pid %d is already running\n")
55 
56 #define	ALIAS_TOO_LONG \
57 gettext("alias name is too long; must be %d characters or less: %s\n")
58 
59 #define	MAJOR_AND_B_FLAG \
60 gettext("must specify major number and driver name when using the -b flag\n")
61 
62 #define	MODCTL_ADDMAJBIND \
63 gettext("modctl failed to add major number binding.\n")
64 
65 #define	MODCTL_REMMAJBIND \
66 gettext("modctl failed to remove 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	FAILED_FOR_MODULE gettext("%s failed for module %s\n")
90 
91 #define	REMOVING_LINK gettext("removing link %s -> %s invalid contents\n")
92 
93 #define	CREATING_LINK gettext("symlink %s -> %s\n")
94 
95 #define	SYMLINK_FAILED gettext("symlink failed for %s -> %s: %s\n")
96 
97 #define	MAX_ATTEMPTS \
98 gettext("cannot create link: %s -> %s.  max attempts exceeded\n")
99 
100 #define	PERM_MSG gettext("chown/chmod %s %ul/%ul/%o\n")
101 
102 #define	NO_DEVFS_NODE gettext("no devfs node or mismatched dev_t for %s\n")
103 
104 #define	CHMOD_FAILED gettext("chmod failed for %s: %s\n")
105 
106 #define	CHOWN_FAILED gettext("chown failed for %s: %s\n")
107 
108 #define	RM_INVALID_MINOR_NODE gettext("removing node %s.  invalid st_rdev\n")
109 
110 #define	OPENDIR_FAILED gettext("opendir failed for %s: %s\n")
111 
112 #define	READLINK_FAILED gettext("%s: readlink failed for %s: %s\n")
113 
114 #define	CANT_LOAD_SYSCALL gettext("cannot load system call for inst_sync\n")
115 
116 #define	SUPER_TO_SYNC \
117 gettext("you must be superuser to sync /etc/path_to_inst\n")
118 
119 #define	INSTSYNC_FAILED gettext("inst_sync failed for %s: %s\n")
120 
121 #define	RENAME_FAILED gettext("rename failed for %s: %s\n")
122 
123 #define	CANT_UPDATE gettext("cannot update: %s\n")
124 
125 #define	FCLOSE_FAILED gettext("fclose failed: %s: %s\n")
126 
127 #define	FAILED_TO_UPDATE gettext("WARNING: failed to update %s\n")
128 
129 #define	OPEN_FAILED gettext("open failed for %s: %s\n")
130 
131 #define	LSEEK_FAILED gettext("lseek failed for %s: %s\n")
132 
133 #define	LOCK_FAILED gettext("fcntl(F_SETLKW) failed for %s: %s\n")
134 
135 #define	WRITE_FAILED gettext("write failed for %s: %s\n")
136 
137 #define	UNLOCK_FAILED gettext("fcntl(F_UNLCK) failed for %s: %s\n")
138 
139 #define	CLOSE_FAILED gettext("close failed for %s: %s\n")
140 
141 #define	LSTAT_FAILED gettext("lstat failed for %s: %s\n")
142 
143 #define	STAT_FAILED gettext("stat failed for %s: %s\n")
144 
145 #define	GID_FAILED gettext("cannot determine gid for %d: %s\n")
146 
147 #define	MKNOD_FAILED gettext("mknod failed for %s: %s\n")
148 
149 #define	MODGETNAME_FAILED gettext("MODGETNAME failed for major number %lu\n")
150 
151 #define	FIND_MAJOR_FAILED gettext("could not find major number for driver %s\n")
152 
153 #define	FOPEN_FAILED gettext("fopen failed for %s: %s\n")
154 
155 #define	IGNORING_LINE_IN gettext("line %d:  malformed in %s\n")
156 
157 #define	MISSING_TAB \
158 gettext("line %d: configuration file %s has a missing tab -- ignoring\n")
159 
160 #define	MISSING_DEVNAME \
161 gettext("line %d: configuration file %s has a missing dev name field -- \
162 ignoring\n")
163 
164 #define	TOO_MANY_FIELDS \
165 gettext("line %d:  configuration file %s has too many fields -- ignoring\n")
166 
167 #define	LINE_TOO_LONG \
168 gettext("Line %d too long in configuration file %s -- should be less \
169 than %d characters\n")
170 
171 #define	UNRECOGNIZED_KEY \
172 gettext("unrecognized keyword '%s' -- ignoring line %d of file %s\n")
173 
174 #define	BADKEYWORD gettext("bad keyword '%s' on line %d of file %s\n")
175 
176 #define	MISSING_EQUAL \
177 	gettext("missing '=' in devfs_spec field line %d from file %s\n")
178 
179 #define	CONFIG_INCORRECT \
180 gettext("line %d: configuration file %s incorrect: %s -- ignoring\n")
181 
182 #define	NO_NODE gettext("no node name found for %s\n")
183 
184 #define	NO_MINOR gettext("no minor name for %s\n")
185 
186 #define	DRV_BUT_NO_ALIAS gettext("line %d: driver name with no alias in %s\n")
187 
188 #define	MALLOC_FAILED gettext("malloc failed for %d bytes\n")
189 
190 #define	REALLOC_FAILED gettext("realloc failed for %d bytes\n")
191 
192 #define	CALLOC_FAILED gettext("calloc failed for %d bytes\n")
193 
194 #define	STRDUP_FAILED gettext("strdup failed for %s\n")
195 
196 #define	CLOSEDIR_FAILED gettext("closedir failed %s\n")
197 
198 #define	MKDIR_FAILED gettext("mkdir failed for %s 0x%x: %s\n")
199 
200 #define	UNLINK_FAILED gettext("unlink failed for %s: %s\n")
201 
202 #define	DI_DEVFS_PATH_FAILED gettext("di_devfs_path failed: %s\n")
203 
204 #define	COMPAT_LINK_USAGE gettext("Usage:\n\t\t[ -C ]\n\t\t[ \
205 -r root_directory ]\n\t\t[ -n ]\n\t\t[ -v ]\n")
206 
207 #define	DEVLINKS_USAGE gettext("Usage:\n\t\t[ -d ]\n\t\t[ -n ]\n\t\t[ -r \
208 root_directory ]\n\t\t[ -t table-file ]\n\t\t[ -v ]\n")
209 
210 #define	DRVCONFIG_USAGE gettext("Usage:\n\t\t[ -a alias_name ]\n\t\t[ -b ]\
211 \n\t\t[ -c class_name ]\n\t\t[ -d ]\n\t\t[ -i driver_name ]\n\t\t[ -m \
212 major_number ]\n\t\t[ -n ]\n\t\t[ -r rootdir ]\n\t\t[ -v ]\n")
213 
214 #define	DEVFSADM_USAGE gettext("Usage:\n\t\t[ -c device_class ]\n\t\t[ -C ]\
215 \n\t\t[ -i driver_name ]\n\t\t[ -l module_path ]\n\t\t[ -n ]\
216 \n\t\t[ -r rootdir ]\n\t\t[ -s ]\n\t\t[ -t devlink_table_file ]\n\t\t[ -v ]\n")
217 
218 #define	DEVFSADM_UNLINK gettext("removing file: %s\n")
219 
220 #define	INVOKED_WITH gettext("invoked with %s\n")
221 
222 #define	INVALID_DEVLINK_SPEC gettext("Invalid devlink spec: '%s'\n")
223 
224 #define	DRV_LOAD_REQD gettext("-n option cannot be used with -i. Ignoring\n")
225 
226 #define	DPLCY_ONE_DFLT gettext("%s: Only one default entry allowed\n")
227 
228 #define	DPLCY_FIRST gettext("%s: First entry must be default entry\n")
229 
230 #define	INVALID_MINOR gettext("%s: invalid minor node specification\n")
231 
232 #define	MINOR_TOO_LONG gettext("%s:%s: minor node specification too long\n")
233 
234 #define	UNEXPECTED_EOF gettext("%s: unexpected end of file\n")
235 
236 #define	BAD_ENTRY gettext("\tin the following entry at line %d\n%s\n")
237 
238 #define	NO_MEMORY gettext("Out of memory\n")
239 
240 
241 #define	EVENT_ATTR_LOOKUP_FAILED \
242     gettext("failed to lookup event attributes: %s\n")
243 
244 #define	PROP_ADD_FAILED \
245     gettext("failed to add the property %s to event attributes\n")
246 
247 #define	DEV_NAME_LOOKUP_FAILED \
248     gettext("failed to lookup dev name for %s\n")
249 
250 #define	BUILD_EVENT_ATTR_FAILED \
251     gettext("failed to build event attributes: %s\n")
252 
253 #define	LOG_EVENT_FAILED gettext("failed to log event: %s\n")
254 
255 #define	ZONE_PATHCHECK \
256     gettext("cannot manage root path '%s': path is part of zone '%s'\n")
257 
258 #define	MUST_BE_GLOBAL_ZONE \
259     gettext("can only be run from the global zone\n")
260 
261 #define	DEVNAME_CONTACT_FAILED \
262     gettext("cannot talk to devname fs %s: %s\n")
263 
264 #define	NVLIST_ERROR gettext("nvlist interface failed: %s\n")
265 
266 #define	NOT_DIR gettext("file is not a directory: %s\n")
267 
268 #define	NO_DEVLINK_CACHE gettext("devlink cache does not exist\n")
269 
270 #ifdef	__cplusplus
271 }
272 #endif
273 
274 #endif /* _MESSAGE_H */
275