blob: a29f866cd94326fb8623aa7106bbb1b083d77248 (
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
|
/*
* 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 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _ERRMSG_H
#define _ERRMSG_H
#pragma ident "%Z%%M% %I% %E% SMI"
#ifdef __cplusplus
extern "C" {
#endif
/* text for gettext error messages for adddrv.c and remdrv.c */
#define USAGE "Usage:\n"\
" add_drv [ -m '<permission> ','<...>' ]\n"\
" [ -n ]\n"\
" [ -f ]\n"\
" [ -v ]\n"\
" [ -i '<identify_name <...>' ] \n"\
" [ -b <basedir> ]\n"\
" [ -c <class_name> ]\n"\
" [ -p <dev_policy> ]\n"\
" <driver_module>\n"\
"Example:\n"\
" add_drv -m '* 0666 bin bin' -i 'acme,sd new,sd' sd \n"\
" Add 'sd' drive with identify names: acme,sd and new,sd.\n"\
" Every minor node will have the permission 0666,\n"\
" and be owned by bin with group bin.\n"
#define BOOT_CLIENT "Reboot client to install driver.\n"
#define DRIVER_INSTALLED "Driver (%s) installed.\n"
#define ERR_INSTALL_FAIL "Error: Could not install driver (%s).\n"
#define ERR_DRVNAME_TOO_LONG "Error: driver name must not exceed (%d)" \
" characters; driver name too long (%s)\n"
#define ERR_ALIAS_IN_NAM_MAJ \
"Alias (\"%s\") already in use as driver name.\n"
#define ERR_ALIAS_IN_USE \
"(\"%s\") already in use as a driver or alias.\n"
#define ERR_CANT_ACCESS_FILE "Cannot access file (%s).\n"
#define ERR_BAD_PATH "Bad syntax for pathname : (%s)\n"
#define ERR_FORK_FAIL "Fork failed; cannot exec : %s\n"
#define ERR_PROG_IN_USE "add_drv/rem_drv currently busy; try later\n"
#define ERR_NOT_ROOT "You must be root to run this program.\n"
#define ERR_BAD_LINE "Bad line in file %s : %s\n"
#define ERR_CANNOT_OPEN "Cannot open (%s): %s.\n"
#define ERR_MIS_TOK "Option (%s) : missing token: (%s)\n"
#define ERR_BAD_TOK "Option (%s) : bad token: (%s)\n"
#define ERR_TOO_MANY_ARGS "Option (%s) : too many arguments: (%s)\n"
#define ERR_BAD_MODE "Bad mode: (%s)\n"
#define ERR_CANT_OPEN "Cannot open (%s)\n"
#define ERR_NO_UPDATE "Cannot update (%s)\n"
#define ERR_CANT_RM "Cannot remove temporary file (%s); remove by hand.\n"
#define ERR_BAD_LINK "(%s) exists as (%s); Please rename by hand.\n"
#define ERR_NO_MEM "Not enough memory\n"
#define ERR_DEL_ENTRY "Cannot delete entry for driver (%s) from file (%s).\n"
#define ERR_NO_ENTRY "No entry found for driver (%s) in file (%s).\n"
#define ERR_INT_UPDATE "Internal error updating (%s).\n"
#define ERR_NOMOD "Cannot find module (%s).\n"
#define ERR_MAX_MAJOR "Cannot get major device information.\n"
#define ERR_NO_FREE_MAJOR "No available major numbers.\n"
#define ERR_NOT_UNIQUE "Driver (%s) is already installed.\n"
#define ERR_NOT_INSTALLED "Driver (%s) not installed.\n"
#define ERR_UPDATE "Cannot update (%s).\n"
#define ERR_MAX_EXCEEDS "Major number (%d) exceeds maximum (%d).\n"
#define ERR_NO_CLEAN "Cannot update; check file %s and rem_drv %s by hand.\n"
#define ERR_CONFIG \
"Warning: Driver (%s) successfully added to system but failed to attach\n"
#define ERR_DEVTREE \
"Warning: Unable to check for driver configuration conflicts.\n"
#define ERR_MODPATH "System error: Could not get module path.\n"
#define ERR_BAD_MAJNUM \
"Warning: Major number (%d) inconsistent with /etc/name_to_major file.\n"
#define ERR_MAJ_TOOBIG "Warning: Entry '%s %llu' in %s has a major number " \
"larger\nthan the maximum allowed value %u.\n"
#define ERR_CREAT_LOCK "Failed to create lock file(%s): %s\n"
#define ERR_LOCK "Failed to lock the lock file(%s): %s\n"
#define ERR_UNLOCK "Failed to unlock the lock file(%s): %s\n"
#define ERR_LOCATION \
"Warning: %s-bit version of driver found at %s.\n"
#define ERR_ISA_MISMATCH "No %s-bit version of (%s) found; %s-bit " \
"version of this driver exists.\n"
#define ERR_NOT_LOADABLE \
"%s-bit driver (%s) not loadable on %s-bit kernel.\n"
#define ERR_ELF_VERSION "ELF library out of date : %s. \n"
#define ERR_ELF_KIND "The file (%s) is not in ELF format.\n"
#define ERR_KERNEL_ISA "Could not identify kernel's ISA. \n"
#define ERR_CONFIG_NOLOAD \
"System configuration files modified but %s driver not loaded or attached.\n"
#define ERR_SOL_LOCATION \
"Place (%s) driver in correct location and run devfsadm -i %s.\n"
#define ERR_ARCH_NOT_SUPPORTED "Architecture %s not supported by add_drv.\n"
#define ERR_SYSINFO_ARCH "Failed to identify system architecture.\n"
#define ERR_PATH_SPEC "Error: driver may not be specified by path (%s)\n"
#define ERR_CREATE_RECONFIG "Error: Could not create /reconfigure.\n"
/* update_drv messages */
#define UPD_DRV_USAGE \
"Usage:\tupdate_drv [ -f | -v ] <driver_module>\n" \
"\tupdate_drv [ -b basedir ] [ -f | -v ] -a\n" \
"\t\t[-m 'permission'] [-i 'identify_name']\n" \
"\t\t[-P privilege] [-p 'policy'] <driver_module>\n" \
"\tupdate_drv [ -b basedir ] [ -f | -v ] -d\n" \
"\t\t[-m 'permission'] [-i 'identify_name']\n" \
"\t\t[-P privilege] [-p 'policy'] <driver_module>\n\n"\
"NOTE: at least one of m/i/P/p must be specified with -a and -d.\n"
#define FORCE_UPDATE "Forcing update of %s.conf.\n"
#define ERR_DRVCONF "Failed to update %s.conf for driver.\n"
#define DRVCONF_UPDATED "%s.conf updated in the kernel.\n"
#define NOUPDATE "%s.conf not updated in the kernel\n"
/* remdrv messages */
#define REM_USAGE1 "Usage:\n\t rem_drv [ -b <basedir> ] driver_name\n"
#define ERR_NO_MAJ "Cannot get major number for : %s\n"
#define ERR_UNLINK "Warning: Cannot remove %s from devfs namespace.\n"
#define ERR_PIPE "System error : Cannot create pipe\n"
#define ERR_EXEC "System error : Exec failed\n"
#define ERR_DEVFSCLEAN \
"Warning: Cannot remove entries from devfs namespace for driver : %s.\n"
#define ERR_DEVFSALCLEAN \
"Warning: Cannot remove alias entries from devfs namespace for driver : %s .\n"
#define ERR_MODID "Cannot get modid for : (%s)\n"
#define ERR_MODUN \
"Cannot unload module: %s\nWill be unloaded upon reboot.\n"
#define ERR_MODREMMAJ "Cannot remove major number binding for %d\n"
#define ERR_NOENTRY "Cannot find (%s) in file : %s\n"
/* drvsubr messages */
#define ERR_NOFILE "Warning: (%s) file missing.\n"
#define ERR_NO_SPACE \
"Can't have space within double quote: %s. \
Use octal escape sequence \"\\040\".\n"
#define ERR_PRIVIMPL "Cannot get privilege information.\n"
#define ERR_BAD_MINOR "Minor device specification cannot include ``:''.\n"
#define ERR_BAD_TOKEN "Bad policy token: ``%s''.\n"
#define ERR_BAD_PRIVS "Error in privilege set specification: %.*s[HERE->]%s\n"
#define ERR_INVALID_PLCY "Invalid policy specification\n"
#define ERR_ONLY_ONE "Only one policy entry allowed per invocation\n"
#define ERR_NO_EQUALS "Missing equal sign in token ``%s''\n"
#define ERR_BAD_PRIV "Cannot allocate privilege ``%s'': %s\n"
#define ERR_UPDATE_PERM \
"kernel update of permissions for driver %s failed (%d)\n"
#define ERR_REMDRV_CLEANUP \
"post-rem_drv devfs cleanup for driver %s failed (%d)\n"
#define ERR_PATH_ORIENTED_ALIAS \
"no device at specified path-oriented alias \"%s\"\n"
#ifdef __cplusplus
}
#endif
#endif /* _ERRMSG_H */
|