8322 nl: misleading-indentation
[unleashed/tickless.git] / usr / src / cmd / devfsadm / message.h
blobd2feecbe472c13529744c9e557f4ec9e620fd00e
1 /*
2 * CDDL HEADER START
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.
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.
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]
19 * CDDL HEADER END
22 * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
23 * Use is subject to license terms.
26 #ifndef _MESSAGE_H
27 #define _MESSAGE_H
29 #ifdef __cplusplus
30 extern "C" {
31 #endif
33 #define CANNOT_BE_USED \
34 gettext("Pattern '%s' cannot be used with device '%s:%s'\n")
36 #define MUST_BE_ROOT gettext("you must be root to run this program\n")
38 #define CANT_FIND_USER gettext("name service cannot find user: %s\n")
40 #define CANT_FIND_GROUP gettext("name service cannot find group %s\n")
42 #define NO_LINKTAB gettext("no devlink.tab rules loaded from file '%s'\n")
44 #define NO_MODULES gettext("no modules loaded from MODPATH '%s'\n")
46 #define ABORTING gettext("aborting\n")
48 #define MODIFY_PATH gettext("use devfsadm -l to modify\n")
50 #define CONFIGURING gettext("Configuring devices.\n")
52 #define CHROOT_FAILED gettext("chdir to root failed: %s\n")
54 #define DAEMON_RUNNING gettext("daemon pid %d is already running\n")
56 #define ALIAS_TOO_LONG \
57 gettext("alias name is too long; must be %d characters or less: %s\n")
59 #define MAJOR_AND_B_FLAG \
60 gettext("must specify major number and driver name when using the -b flag\n")
62 #define MODCTL_ADDMAJBIND \
63 gettext("modctl failed to add major number binding.\n")
65 #define MODCTL_REMMAJBIND \
66 gettext("modctl failed to remove major number binding.\n")
68 #define DRIVER_FAILURE gettext("driver failed to attach: %s\n")
70 #define IS_EVENTD_RUNNING gettext("check to make sure syseventd is running\n")
72 #define UNKNOWN_EVENT gettext("parse_event: unknown event type: %s\n")
74 #define DI_INIT_FAILED gettext("di_init failed for %s: %s\n")
76 #define CLONE_NOT_FOUND gettext("di_init failed to find clone entry for %s\n")
78 #define DLOPEN_FAILED gettext("dlopen failed: %s: %s\n")
80 #define REGCOMP_FAILED gettext("regcomp failed for %s: error code: %d\n")
82 #define IGNORING_ENTRY \
83 gettext("ignoring devfsadm_create entry #%d in module %s\n")
85 #define CANT_CREATE_THREAD gettext("can not create thread %s: %s\n")
87 #define CANT_CREATE_DOOR gettext("can not create event door %s: %s\n")
89 #define FAILED_FOR_MODULE gettext("%s failed for module %s\n")
91 #define REMOVING_LINK gettext("removing link %s -> %s invalid contents\n")
93 #define CREATING_LINK gettext("symlink %s -> %s\n")
95 #define SYMLINK_FAILED gettext("symlink failed for %s -> %s: %s\n")
97 #define MAX_ATTEMPTS \
98 gettext("cannot create link: %s -> %s. max attempts exceeded\n")
100 #define PERM_MSG gettext("chown/chmod %s %ul/%ul/%o\n")
102 #define NO_DEVFS_NODE gettext("no devfs node or mismatched dev_t for %s\n")
104 #define CHMOD_FAILED gettext("chmod failed for %s: %s\n")
106 #define CHOWN_FAILED gettext("chown failed for %s: %s\n")
108 #define RM_INVALID_MINOR_NODE gettext("removing node %s. invalid st_rdev\n")
110 #define OPENDIR_FAILED gettext("opendir failed for %s: %s\n")
112 #define READLINK_FAILED gettext("%s: readlink failed for %s: %s\n")
114 #define CANT_LOAD_SYSCALL gettext("cannot load system call for inst_sync\n")
116 #define SUPER_TO_SYNC \
117 gettext("you must be superuser to sync /etc/path_to_inst\n")
119 #define INSTSYNC_FAILED gettext("inst_sync failed for %s: %s\n")
121 #define RENAME_FAILED gettext("rename failed for %s: %s\n")
123 #define CANT_UPDATE gettext("cannot update: %s\n")
125 #define FCLOSE_FAILED gettext("fclose failed: %s: %s\n")
127 #define FAILED_TO_UPDATE gettext("WARNING: failed to update %s\n")
129 #define OPEN_FAILED gettext("open failed for %s: %s\n")
131 #define LSEEK_FAILED gettext("lseek failed for %s: %s\n")
133 #define LOCK_FAILED gettext("fcntl(F_SETLKW) failed for %s: %s\n")
135 #define WRITE_FAILED gettext("write failed for %s: %s\n")
137 #define UNLOCK_FAILED gettext("fcntl(F_UNLCK) failed for %s: %s\n")
139 #define CLOSE_FAILED gettext("close failed for %s: %s\n")
141 #define LSTAT_FAILED gettext("lstat failed for %s: %s\n")
143 #define STAT_FAILED gettext("stat failed for %s: %s\n")
145 #define GID_FAILED gettext("cannot determine gid for %d: %s\n")
147 #define MKNOD_FAILED gettext("mknod failed for %s: %s\n")
149 #define MODGETNAME_FAILED gettext("MODGETNAME failed for major number %lu\n")
151 #define FIND_MAJOR_FAILED gettext("could not find major number for driver %s\n")
153 #define FOPEN_FAILED gettext("fopen failed for %s: %s\n")
155 #define IGNORING_LINE_IN gettext("line %d: malformed in %s\n")
157 #define MISSING_TAB \
158 gettext("line %d: configuration file %s has a missing tab -- ignoring\n")
160 #define MISSING_DEVNAME \
161 gettext("line %d: configuration file %s has a missing dev name field -- \
162 ignoring\n")
164 #define TOO_MANY_FIELDS \
165 gettext("line %d: configuration file %s has too many fields -- ignoring\n")
167 #define LINE_TOO_LONG \
168 gettext("Line %d too long in configuration file %s -- should be less \
169 than %d characters\n")
171 #define UNRECOGNIZED_KEY \
172 gettext("unrecognized keyword '%s' -- ignoring line %d of file %s\n")
174 #define BADKEYWORD gettext("bad keyword '%s' on line %d of file %s\n")
176 #define MISSING_EQUAL \
177 gettext("missing '=' in devfs_spec field line %d from file %s\n")
179 #define CONFIG_INCORRECT \
180 gettext("line %d: configuration file %s incorrect: %s -- ignoring\n")
182 #define NO_NODE gettext("no node name found for %s\n")
184 #define NO_MINOR gettext("no minor name for %s\n")
186 #define DRV_BUT_NO_ALIAS gettext("line %d: driver name with no alias in %s\n")
188 #define MALLOC_FAILED gettext("malloc failed for %d bytes\n")
190 #define REALLOC_FAILED gettext("realloc failed for %d bytes\n")
192 #define CALLOC_FAILED gettext("calloc failed for %d bytes\n")
194 #define STRDUP_FAILED gettext("strdup failed for %s\n")
196 #define CLOSEDIR_FAILED gettext("closedir failed %s\n")
198 #define MKDIR_FAILED gettext("mkdir failed for %s 0x%x: %s\n")
200 #define UNLINK_FAILED gettext("unlink failed for %s: %s\n")
202 #define DI_DEVFS_PATH_FAILED gettext("di_devfs_path failed: %s\n")
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")
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")
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")
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")
218 #define DEVFSADM_UNLINK gettext("removing file: %s\n")
220 #define INVOKED_WITH gettext("invoked with %s\n")
222 #define INVALID_DEVLINK_SPEC gettext("Invalid devlink spec: '%s'\n")
224 #define DRV_LOAD_REQD gettext("-n option cannot be used with -i. Ignoring\n")
226 #define DPLCY_ONE_DFLT gettext("%s: Only one default entry allowed\n")
228 #define DPLCY_FIRST gettext("%s: First entry must be default entry\n")
230 #define INVALID_MINOR gettext("%s: invalid minor node specification\n")
232 #define MINOR_TOO_LONG gettext("%s:%s: minor node specification too long\n")
234 #define UNEXPECTED_EOF gettext("%s: unexpected end of file\n")
236 #define BAD_ENTRY gettext("\tin the following entry at line %d\n%s\n")
238 #define NO_MEMORY gettext("Out of memory\n")
241 #define EVENT_ATTR_LOOKUP_FAILED \
242 gettext("failed to lookup event attributes: %s\n")
244 #define PROP_ADD_FAILED \
245 gettext("failed to add the property %s to event attributes\n")
247 #define DEV_NAME_LOOKUP_FAILED \
248 gettext("failed to lookup dev name for %s\n")
250 #define BUILD_EVENT_ATTR_FAILED \
251 gettext("failed to build event attributes: %s\n")
253 #define LOG_EVENT_FAILED gettext("failed to log event: %s\n")
255 #define ZONE_PATHCHECK \
256 gettext("cannot manage root path '%s': path is part of zone '%s'\n")
258 #define MUST_BE_GLOBAL_ZONE \
259 gettext("can only be run from the global zone\n")
261 #define DEVNAME_CONTACT_FAILED \
262 gettext("cannot talk to devname fs %s: %s\n")
264 #define NVLIST_ERROR gettext("nvlist interface failed: %s\n")
266 #define NOT_DIR gettext("file is not a directory: %s\n")
268 #define NO_DEVLINK_CACHE gettext("devlink cache does not exist\n")
270 #ifdef __cplusplus
272 #endif
274 #endif /* _MESSAGE_H */