1*7c478bd9Sstevel@tonic-gate /* 2*7c478bd9Sstevel@tonic-gate * CDDL HEADER START 3*7c478bd9Sstevel@tonic-gate * 4*7c478bd9Sstevel@tonic-gate * The contents of this file are subject to the terms of the 5*7c478bd9Sstevel@tonic-gate * Common Development and Distribution License, Version 1.0 only 6*7c478bd9Sstevel@tonic-gate * (the "License"). You may not use this file except in compliance 7*7c478bd9Sstevel@tonic-gate * with the License. 8*7c478bd9Sstevel@tonic-gate * 9*7c478bd9Sstevel@tonic-gate * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 10*7c478bd9Sstevel@tonic-gate * or http://www.opensolaris.org/os/licensing. 11*7c478bd9Sstevel@tonic-gate * See the License for the specific language governing permissions 12*7c478bd9Sstevel@tonic-gate * and limitations under the License. 13*7c478bd9Sstevel@tonic-gate * 14*7c478bd9Sstevel@tonic-gate * When distributing Covered Code, include this CDDL HEADER in each 15*7c478bd9Sstevel@tonic-gate * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 16*7c478bd9Sstevel@tonic-gate * If applicable, add the following below this CDDL HEADER, with the 17*7c478bd9Sstevel@tonic-gate * fields enclosed by brackets "[]" replaced with your own identifying 18*7c478bd9Sstevel@tonic-gate * information: Portions Copyright [yyyy] [name of copyright owner] 19*7c478bd9Sstevel@tonic-gate * 20*7c478bd9Sstevel@tonic-gate * CDDL HEADER END 21*7c478bd9Sstevel@tonic-gate */ 22*7c478bd9Sstevel@tonic-gate /* 23*7c478bd9Sstevel@tonic-gate * Copyright 2004 Sun Microsystems, Inc. All rights reserved. 24*7c478bd9Sstevel@tonic-gate * Use is subject to license terms. 25*7c478bd9Sstevel@tonic-gate */ 26*7c478bd9Sstevel@tonic-gate 27*7c478bd9Sstevel@tonic-gate #ifndef _ERRMSG_H 28*7c478bd9Sstevel@tonic-gate #define _ERRMSG_H 29*7c478bd9Sstevel@tonic-gate 30*7c478bd9Sstevel@tonic-gate #pragma ident "%Z%%M% %I% %E% SMI" 31*7c478bd9Sstevel@tonic-gate 32*7c478bd9Sstevel@tonic-gate #ifdef __cplusplus 33*7c478bd9Sstevel@tonic-gate extern "C" { 34*7c478bd9Sstevel@tonic-gate #endif 35*7c478bd9Sstevel@tonic-gate 36*7c478bd9Sstevel@tonic-gate /* text for gettext error messages for adddrv.c and remdrv.c */ 37*7c478bd9Sstevel@tonic-gate 38*7c478bd9Sstevel@tonic-gate #define USAGE "Usage:\n"\ 39*7c478bd9Sstevel@tonic-gate " add_drv [ -m '<permission> ','<...>' ]\n"\ 40*7c478bd9Sstevel@tonic-gate " [ -n ]\n"\ 41*7c478bd9Sstevel@tonic-gate " [ -f ]\n"\ 42*7c478bd9Sstevel@tonic-gate " [ -v ]\n"\ 43*7c478bd9Sstevel@tonic-gate " [ -i '<identify_name <...>' ] \n"\ 44*7c478bd9Sstevel@tonic-gate " [ -b <basedir> ]\n"\ 45*7c478bd9Sstevel@tonic-gate " [ -c <class_name> ]\n"\ 46*7c478bd9Sstevel@tonic-gate " [ -p <dev_policy> ]\n"\ 47*7c478bd9Sstevel@tonic-gate " <driver_module>\n"\ 48*7c478bd9Sstevel@tonic-gate "Example:\n"\ 49*7c478bd9Sstevel@tonic-gate " add_drv -m '* 0666 bin bin' -i 'acme,sd new,sd' sd \n"\ 50*7c478bd9Sstevel@tonic-gate " Add 'sd' drive with identify names: acme,sd and new,sd.\n"\ 51*7c478bd9Sstevel@tonic-gate " Every minor node will have the permission 0666,\n"\ 52*7c478bd9Sstevel@tonic-gate " and be owned by bin with group bin.\n" 53*7c478bd9Sstevel@tonic-gate 54*7c478bd9Sstevel@tonic-gate #define BOOT_CLIENT "Reboot client to install driver.\n" 55*7c478bd9Sstevel@tonic-gate #define DRIVER_INSTALLED "Driver (%s) installed.\n" 56*7c478bd9Sstevel@tonic-gate 57*7c478bd9Sstevel@tonic-gate #define ERR_INSTALL_FAIL "Error: Could not install driver (%s).\n" 58*7c478bd9Sstevel@tonic-gate #define ERR_DRVNAME_TOO_LONG "Error: driver name must not exceed (%d)" \ 59*7c478bd9Sstevel@tonic-gate " characters; driver name too long (%s)\n" 60*7c478bd9Sstevel@tonic-gate #define ERR_ALIAS_IN_NAM_MAJ "Alias (%s) already in use as driver name.\n" 61*7c478bd9Sstevel@tonic-gate #define ERR_ALIAS_IN_USE "(%s) already in use as a driver or alias.\n" 62*7c478bd9Sstevel@tonic-gate #define ERR_CANT_ACCESS_FILE "Cannot access file (%s).\n" 63*7c478bd9Sstevel@tonic-gate #define ERR_REM_LOCK "Cannot remove lockfile (%s). Remove by hand.\n" 64*7c478bd9Sstevel@tonic-gate #define ERR_BAD_PATH "Bad syntax for pathname : (%s)\n" 65*7c478bd9Sstevel@tonic-gate #define ERR_FORK_FAIL "Fork failed; cannot exec : %s\n" 66*7c478bd9Sstevel@tonic-gate #define ERR_PROG_IN_USE "add_drv/rem_drv currently busy; try later\n" 67*7c478bd9Sstevel@tonic-gate #define ERR_NOT_ROOT "You must be root to run this program.\n" 68*7c478bd9Sstevel@tonic-gate #define ERR_BAD_LINE "Bad line in file %s : %s\n" 69*7c478bd9Sstevel@tonic-gate #define ERR_CANNOT_OPEN "Cannot open (%s): %s.\n" 70*7c478bd9Sstevel@tonic-gate #define ERR_MIS_TOK "Option (%s) : missing token: (%s)\n" 71*7c478bd9Sstevel@tonic-gate #define ERR_TOO_MANY_ARGS "Option (%s) : too many arguments: (%s)\n" 72*7c478bd9Sstevel@tonic-gate #define ERR_BAD_MODE "Bad mode: (%s)\n" 73*7c478bd9Sstevel@tonic-gate #define ERR_CANT_OPEN "Cannot open (%s)\n" 74*7c478bd9Sstevel@tonic-gate #define ERR_NO_UPDATE "Cannot update (%s)\n" 75*7c478bd9Sstevel@tonic-gate #define ERR_CANT_RM "Cannot remove temporary file (%s); remove by hand.\n" 76*7c478bd9Sstevel@tonic-gate #define ERR_BAD_LINK "(%s) exists as (%s); Please rename by hand.\n" 77*7c478bd9Sstevel@tonic-gate #define ERR_NO_MEM "Not enough memory\n" 78*7c478bd9Sstevel@tonic-gate #define ERR_DEL_ENTRY "Cannot delete entry for driver (%s) from file (%s).\n" 79*7c478bd9Sstevel@tonic-gate #define ERR_NO_ENTRY "No entry found for driver (%s) in file (%s).\n" 80*7c478bd9Sstevel@tonic-gate #define ERR_INT_UPDATE "Internal error updating (%s).\n" 81*7c478bd9Sstevel@tonic-gate #define ERR_NOMOD "Cannot find module (%s).\n" 82*7c478bd9Sstevel@tonic-gate #define ERR_MAX_MAJOR "Cannot get major device information.\n" 83*7c478bd9Sstevel@tonic-gate #define ERR_NO_FREE_MAJOR "No available major numbers.\n" 84*7c478bd9Sstevel@tonic-gate #define ERR_NOT_UNIQUE "Driver (%s) is already installed.\n" 85*7c478bd9Sstevel@tonic-gate #define ERR_NOT_INSTALLED "Driver (%s) not installed.\n" 86*7c478bd9Sstevel@tonic-gate #define ERR_UPDATE "Cannot update (%s).\n" 87*7c478bd9Sstevel@tonic-gate #define ERR_MAX_EXCEEDS "Major number (%d) exceeds maximum (%d).\n" 88*7c478bd9Sstevel@tonic-gate #define ERR_NO_CLEAN "Cannot update; check file %s and rem_drv %s by hand.\n" 89*7c478bd9Sstevel@tonic-gate #define ERR_CONFIG \ 90*7c478bd9Sstevel@tonic-gate "Warning: Driver (%s) successfully added to system but failed to attach\n" 91*7c478bd9Sstevel@tonic-gate #define ERR_DEVTREE \ 92*7c478bd9Sstevel@tonic-gate "Warning: Unable to check for driver configuration conflicts.\n" 93*7c478bd9Sstevel@tonic-gate #define ERR_MODPATH "System error: Could not get module path.\n" 94*7c478bd9Sstevel@tonic-gate #define ERR_BAD_MAJNUM \ 95*7c478bd9Sstevel@tonic-gate "Warning: Major number (%d) inconsistent with /etc/name_to_major file.\n" 96*7c478bd9Sstevel@tonic-gate #define ERR_MAJ_TOOBIG "Warning: Entry '%s %llu' in %s has a major number " \ 97*7c478bd9Sstevel@tonic-gate "larger\nthan the maximum allowed value %u.\n" 98*7c478bd9Sstevel@tonic-gate #define ERR_LOCKFILE "Failed to create lock file.\n" 99*7c478bd9Sstevel@tonic-gate 100*7c478bd9Sstevel@tonic-gate #define ERR_LOCATION \ 101*7c478bd9Sstevel@tonic-gate "Warning: %s-bit version of driver found at %s.\n" 102*7c478bd9Sstevel@tonic-gate #define ERR_ISA_MISMATCH "No %s-bit version of (%s) found; %s-bit " \ 103*7c478bd9Sstevel@tonic-gate "version of this driver exists.\n" 104*7c478bd9Sstevel@tonic-gate #define ERR_NOT_LOADABLE \ 105*7c478bd9Sstevel@tonic-gate "%s-bit driver (%s) not loadable on %s-bit kernel.\n" 106*7c478bd9Sstevel@tonic-gate #define ERR_ELF_VERSION "ELF library out of date : %s. \n" 107*7c478bd9Sstevel@tonic-gate #define ERR_ELF_KIND "The file (%s) is not in ELF format.\n" 108*7c478bd9Sstevel@tonic-gate #define ERR_KERNEL_ISA "Could not identify kernel's ISA. \n" 109*7c478bd9Sstevel@tonic-gate #define ERR_CONFIG_NOLOAD \ 110*7c478bd9Sstevel@tonic-gate "System configuration files modified but %s driver not loaded or attached.\n" 111*7c478bd9Sstevel@tonic-gate #define ERR_SOL_LOCATION \ 112*7c478bd9Sstevel@tonic-gate "Place (%s) driver in correct location and run devfsadm -i %s.\n" 113*7c478bd9Sstevel@tonic-gate #define ERR_ARCH_NOT_SUPPORTED "Architecture %s not supported by add_drv.\n" 114*7c478bd9Sstevel@tonic-gate #define ERR_SYSINFO_ARCH "Failed to identify system architecture.\n" 115*7c478bd9Sstevel@tonic-gate #define ERR_PATH_SPEC "Error: driver may not be specified by path (%s)\n" 116*7c478bd9Sstevel@tonic-gate #define ERR_CREATE_RECONFIG "Error: Could not create /reconfigure.\n" 117*7c478bd9Sstevel@tonic-gate 118*7c478bd9Sstevel@tonic-gate /* update_drv messages */ 119*7c478bd9Sstevel@tonic-gate #define UPD_DRV_USAGE \ 120*7c478bd9Sstevel@tonic-gate "Usage:\tupdate_drv [ -f | -v ] <driver_module>\n" \ 121*7c478bd9Sstevel@tonic-gate "\tupdate_drv [ -b basedir ] [ -f | -v ] -a\n" \ 122*7c478bd9Sstevel@tonic-gate "\t\t[-m 'permission'] [-i 'identify_name']\n" \ 123*7c478bd9Sstevel@tonic-gate "\t\t[-P privilege] [-p 'policy'] <driver_module>\n" \ 124*7c478bd9Sstevel@tonic-gate "\tupdate_drv [ -b basedir ] [ -f | -v ] -d\n" \ 125*7c478bd9Sstevel@tonic-gate "\t\t[-m 'permission'] [-i 'identify_name']\n" \ 126*7c478bd9Sstevel@tonic-gate "\t\t[-P privilege] [-p 'policy'] <driver_module>\n\n"\ 127*7c478bd9Sstevel@tonic-gate "NOTE: at least one of m/i/P/p must be specified with -a and -d.\n" 128*7c478bd9Sstevel@tonic-gate 129*7c478bd9Sstevel@tonic-gate #define FORCE_UPDATE "Forcing update of %s.conf.\n" 130*7c478bd9Sstevel@tonic-gate #define ERR_DRVCONF "Failed to update %s.conf for driver.\n" 131*7c478bd9Sstevel@tonic-gate #define DRVCONF_UPDATED "%s.conf updated in the kernel.\n" 132*7c478bd9Sstevel@tonic-gate #define NOUPDATE "%s.conf not updated in the kernel\n" 133*7c478bd9Sstevel@tonic-gate 134*7c478bd9Sstevel@tonic-gate /* remdrv messages */ 135*7c478bd9Sstevel@tonic-gate 136*7c478bd9Sstevel@tonic-gate #define REM_USAGE1 "Usage:\n\t rem_drv [ -b <basedir> ] driver_name\n" 137*7c478bd9Sstevel@tonic-gate #define ERR_NO_MAJ "Cannot get major number for : %s\n" 138*7c478bd9Sstevel@tonic-gate #define ERR_UNLINK "Warning: Cannot remove %s from devfs namespace.\n" 139*7c478bd9Sstevel@tonic-gate #define ERR_PIPE "System error : Cannot create pipe\n" 140*7c478bd9Sstevel@tonic-gate #define ERR_EXEC "System error : Exec failed\n" 141*7c478bd9Sstevel@tonic-gate #define ERR_DEVFSCLEAN \ 142*7c478bd9Sstevel@tonic-gate "Warning: Cannot remove entries from devfs namespace for driver : %s.\n" 143*7c478bd9Sstevel@tonic-gate #define ERR_DEVFSALCLEAN \ 144*7c478bd9Sstevel@tonic-gate "Warning: Cannot remove alias entries from devfs namespace for driver : %s .\n" 145*7c478bd9Sstevel@tonic-gate #define ERR_MODID "Cannot get modid for : (%s)\n" 146*7c478bd9Sstevel@tonic-gate #define ERR_MODUN \ 147*7c478bd9Sstevel@tonic-gate "Cannot unload module: %s\nWill be unloaded upon reboot.\n" 148*7c478bd9Sstevel@tonic-gate #define ERR_MODREMMAJ "Cannot remove major number binding for %d\n" 149*7c478bd9Sstevel@tonic-gate #define ERR_NOENTRY "Cannot find (%s) in file : %s\n" 150*7c478bd9Sstevel@tonic-gate 151*7c478bd9Sstevel@tonic-gate /* drvsubr messages */ 152*7c478bd9Sstevel@tonic-gate #define ERR_NOFILE "Warning: (%s) file missing.\n" 153*7c478bd9Sstevel@tonic-gate #define ERR_NO_SPACE \ 154*7c478bd9Sstevel@tonic-gate "Can't have space within double quote: %s. \ 155*7c478bd9Sstevel@tonic-gate Use octal escape sequence \"\\040\".\n" 156*7c478bd9Sstevel@tonic-gate 157*7c478bd9Sstevel@tonic-gate #define ERR_PRIVIMPL "Cannot get privilege information.\n" 158*7c478bd9Sstevel@tonic-gate #define ERR_BAD_MINOR "Minor device specification cannot include ``:''.\n" 159*7c478bd9Sstevel@tonic-gate #define ERR_BAD_TOKEN "Bad policy token: ``%s''.\n" 160*7c478bd9Sstevel@tonic-gate #define ERR_BAD_PRIVS "Error in privilege set specification: %.*s[HERE->]%s\n" 161*7c478bd9Sstevel@tonic-gate #define ERR_INVALID_PLCY "Invalid policy specification\n" 162*7c478bd9Sstevel@tonic-gate #define ERR_ONLY_ONE "Only one policy entry allowed per invocation\n" 163*7c478bd9Sstevel@tonic-gate #define ERR_NO_EQUALS "Missing equal sign in token ``%s''\n" 164*7c478bd9Sstevel@tonic-gate #define ERR_BAD_PRIV "Cannot allocate privilege ``%s'': %s\n" 165*7c478bd9Sstevel@tonic-gate 166*7c478bd9Sstevel@tonic-gate #define ERR_UPDATE_PERM \ 167*7c478bd9Sstevel@tonic-gate "kernel update of permissions for driver %s failed (%d)\n" 168*7c478bd9Sstevel@tonic-gate 169*7c478bd9Sstevel@tonic-gate #define ERR_REMDRV_CLEANUP \ 170*7c478bd9Sstevel@tonic-gate "post-rem_drv devfs cleanup for driver %s failed (%d)\n" 171*7c478bd9Sstevel@tonic-gate 172*7c478bd9Sstevel@tonic-gate #ifdef __cplusplus 173*7c478bd9Sstevel@tonic-gate } 174*7c478bd9Sstevel@tonic-gate #endif 175*7c478bd9Sstevel@tonic-gate 176*7c478bd9Sstevel@tonic-gate #endif /* _ERRMSG_H */ 177