17c478bd9Sstevel@tonic-gate /* 27c478bd9Sstevel@tonic-gate * CDDL HEADER START 37c478bd9Sstevel@tonic-gate * 47c478bd9Sstevel@tonic-gate * The contents of this file are subject to the terms of the 5*1ca93273Seota * Common Development and Distribution License (the "License"). 6*1ca93273Seota * You may not use this file except in compliance with the License. 77c478bd9Sstevel@tonic-gate * 87c478bd9Sstevel@tonic-gate * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 97c478bd9Sstevel@tonic-gate * or http://www.opensolaris.org/os/licensing. 107c478bd9Sstevel@tonic-gate * See the License for the specific language governing permissions 117c478bd9Sstevel@tonic-gate * and limitations under the License. 127c478bd9Sstevel@tonic-gate * 137c478bd9Sstevel@tonic-gate * When distributing Covered Code, include this CDDL HEADER in each 147c478bd9Sstevel@tonic-gate * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 157c478bd9Sstevel@tonic-gate * If applicable, add the following below this CDDL HEADER, with the 167c478bd9Sstevel@tonic-gate * fields enclosed by brackets "[]" replaced with your own identifying 177c478bd9Sstevel@tonic-gate * information: Portions Copyright [yyyy] [name of copyright owner] 187c478bd9Sstevel@tonic-gate * 197c478bd9Sstevel@tonic-gate * CDDL HEADER END 207c478bd9Sstevel@tonic-gate */ 217c478bd9Sstevel@tonic-gate /* 22*1ca93273Seota * Copyright 2006 Sun Microsystems, Inc. All rights reserved. 237c478bd9Sstevel@tonic-gate * Use is subject to license terms. 247c478bd9Sstevel@tonic-gate */ 257c478bd9Sstevel@tonic-gate 267c478bd9Sstevel@tonic-gate #ifndef _ERRMSG_H 277c478bd9Sstevel@tonic-gate #define _ERRMSG_H 287c478bd9Sstevel@tonic-gate 297c478bd9Sstevel@tonic-gate #pragma ident "%Z%%M% %I% %E% SMI" 307c478bd9Sstevel@tonic-gate 317c478bd9Sstevel@tonic-gate #ifdef __cplusplus 327c478bd9Sstevel@tonic-gate extern "C" { 337c478bd9Sstevel@tonic-gate #endif 347c478bd9Sstevel@tonic-gate 357c478bd9Sstevel@tonic-gate /* text for gettext error messages for adddrv.c and remdrv.c */ 367c478bd9Sstevel@tonic-gate 377c478bd9Sstevel@tonic-gate #define USAGE "Usage:\n"\ 387c478bd9Sstevel@tonic-gate " add_drv [ -m '<permission> ','<...>' ]\n"\ 397c478bd9Sstevel@tonic-gate " [ -n ]\n"\ 407c478bd9Sstevel@tonic-gate " [ -f ]\n"\ 417c478bd9Sstevel@tonic-gate " [ -v ]\n"\ 427c478bd9Sstevel@tonic-gate " [ -i '<identify_name <...>' ] \n"\ 437c478bd9Sstevel@tonic-gate " [ -b <basedir> ]\n"\ 447c478bd9Sstevel@tonic-gate " [ -c <class_name> ]\n"\ 457c478bd9Sstevel@tonic-gate " [ -p <dev_policy> ]\n"\ 467c478bd9Sstevel@tonic-gate " <driver_module>\n"\ 477c478bd9Sstevel@tonic-gate "Example:\n"\ 487c478bd9Sstevel@tonic-gate " add_drv -m '* 0666 bin bin' -i 'acme,sd new,sd' sd \n"\ 497c478bd9Sstevel@tonic-gate " Add 'sd' drive with identify names: acme,sd and new,sd.\n"\ 507c478bd9Sstevel@tonic-gate " Every minor node will have the permission 0666,\n"\ 517c478bd9Sstevel@tonic-gate " and be owned by bin with group bin.\n" 527c478bd9Sstevel@tonic-gate 537c478bd9Sstevel@tonic-gate #define BOOT_CLIENT "Reboot client to install driver.\n" 547c478bd9Sstevel@tonic-gate #define DRIVER_INSTALLED "Driver (%s) installed.\n" 557c478bd9Sstevel@tonic-gate 567c478bd9Sstevel@tonic-gate #define ERR_INSTALL_FAIL "Error: Could not install driver (%s).\n" 577c478bd9Sstevel@tonic-gate #define ERR_DRVNAME_TOO_LONG "Error: driver name must not exceed (%d)" \ 587c478bd9Sstevel@tonic-gate " characters; driver name too long (%s)\n" 597c478bd9Sstevel@tonic-gate #define ERR_ALIAS_IN_NAM_MAJ "Alias (%s) already in use as driver name.\n" 607c478bd9Sstevel@tonic-gate #define ERR_ALIAS_IN_USE "(%s) already in use as a driver or alias.\n" 617c478bd9Sstevel@tonic-gate #define ERR_CANT_ACCESS_FILE "Cannot access file (%s).\n" 627c478bd9Sstevel@tonic-gate #define ERR_REM_LOCK "Cannot remove lockfile (%s). Remove by hand.\n" 637c478bd9Sstevel@tonic-gate #define ERR_BAD_PATH "Bad syntax for pathname : (%s)\n" 647c478bd9Sstevel@tonic-gate #define ERR_FORK_FAIL "Fork failed; cannot exec : %s\n" 657c478bd9Sstevel@tonic-gate #define ERR_PROG_IN_USE "add_drv/rem_drv currently busy; try later\n" 667c478bd9Sstevel@tonic-gate #define ERR_NOT_ROOT "You must be root to run this program.\n" 677c478bd9Sstevel@tonic-gate #define ERR_BAD_LINE "Bad line in file %s : %s\n" 687c478bd9Sstevel@tonic-gate #define ERR_CANNOT_OPEN "Cannot open (%s): %s.\n" 697c478bd9Sstevel@tonic-gate #define ERR_MIS_TOK "Option (%s) : missing token: (%s)\n" 70*1ca93273Seota #define ERR_BAD_TOK "Option (%s) : bad token: (%s)\n" 717c478bd9Sstevel@tonic-gate #define ERR_TOO_MANY_ARGS "Option (%s) : too many arguments: (%s)\n" 727c478bd9Sstevel@tonic-gate #define ERR_BAD_MODE "Bad mode: (%s)\n" 737c478bd9Sstevel@tonic-gate #define ERR_CANT_OPEN "Cannot open (%s)\n" 747c478bd9Sstevel@tonic-gate #define ERR_NO_UPDATE "Cannot update (%s)\n" 757c478bd9Sstevel@tonic-gate #define ERR_CANT_RM "Cannot remove temporary file (%s); remove by hand.\n" 767c478bd9Sstevel@tonic-gate #define ERR_BAD_LINK "(%s) exists as (%s); Please rename by hand.\n" 777c478bd9Sstevel@tonic-gate #define ERR_NO_MEM "Not enough memory\n" 787c478bd9Sstevel@tonic-gate #define ERR_DEL_ENTRY "Cannot delete entry for driver (%s) from file (%s).\n" 797c478bd9Sstevel@tonic-gate #define ERR_NO_ENTRY "No entry found for driver (%s) in file (%s).\n" 807c478bd9Sstevel@tonic-gate #define ERR_INT_UPDATE "Internal error updating (%s).\n" 817c478bd9Sstevel@tonic-gate #define ERR_NOMOD "Cannot find module (%s).\n" 827c478bd9Sstevel@tonic-gate #define ERR_MAX_MAJOR "Cannot get major device information.\n" 837c478bd9Sstevel@tonic-gate #define ERR_NO_FREE_MAJOR "No available major numbers.\n" 847c478bd9Sstevel@tonic-gate #define ERR_NOT_UNIQUE "Driver (%s) is already installed.\n" 857c478bd9Sstevel@tonic-gate #define ERR_NOT_INSTALLED "Driver (%s) not installed.\n" 867c478bd9Sstevel@tonic-gate #define ERR_UPDATE "Cannot update (%s).\n" 877c478bd9Sstevel@tonic-gate #define ERR_MAX_EXCEEDS "Major number (%d) exceeds maximum (%d).\n" 887c478bd9Sstevel@tonic-gate #define ERR_NO_CLEAN "Cannot update; check file %s and rem_drv %s by hand.\n" 897c478bd9Sstevel@tonic-gate #define ERR_CONFIG \ 907c478bd9Sstevel@tonic-gate "Warning: Driver (%s) successfully added to system but failed to attach\n" 917c478bd9Sstevel@tonic-gate #define ERR_DEVTREE \ 927c478bd9Sstevel@tonic-gate "Warning: Unable to check for driver configuration conflicts.\n" 937c478bd9Sstevel@tonic-gate #define ERR_MODPATH "System error: Could not get module path.\n" 947c478bd9Sstevel@tonic-gate #define ERR_BAD_MAJNUM \ 957c478bd9Sstevel@tonic-gate "Warning: Major number (%d) inconsistent with /etc/name_to_major file.\n" 967c478bd9Sstevel@tonic-gate #define ERR_MAJ_TOOBIG "Warning: Entry '%s %llu' in %s has a major number " \ 977c478bd9Sstevel@tonic-gate "larger\nthan the maximum allowed value %u.\n" 987c478bd9Sstevel@tonic-gate #define ERR_LOCKFILE "Failed to create lock file.\n" 997c478bd9Sstevel@tonic-gate 1007c478bd9Sstevel@tonic-gate #define ERR_LOCATION \ 1017c478bd9Sstevel@tonic-gate "Warning: %s-bit version of driver found at %s.\n" 1027c478bd9Sstevel@tonic-gate #define ERR_ISA_MISMATCH "No %s-bit version of (%s) found; %s-bit " \ 1037c478bd9Sstevel@tonic-gate "version of this driver exists.\n" 1047c478bd9Sstevel@tonic-gate #define ERR_NOT_LOADABLE \ 1057c478bd9Sstevel@tonic-gate "%s-bit driver (%s) not loadable on %s-bit kernel.\n" 1067c478bd9Sstevel@tonic-gate #define ERR_ELF_VERSION "ELF library out of date : %s. \n" 1077c478bd9Sstevel@tonic-gate #define ERR_ELF_KIND "The file (%s) is not in ELF format.\n" 1087c478bd9Sstevel@tonic-gate #define ERR_KERNEL_ISA "Could not identify kernel's ISA. \n" 1097c478bd9Sstevel@tonic-gate #define ERR_CONFIG_NOLOAD \ 1107c478bd9Sstevel@tonic-gate "System configuration files modified but %s driver not loaded or attached.\n" 1117c478bd9Sstevel@tonic-gate #define ERR_SOL_LOCATION \ 1127c478bd9Sstevel@tonic-gate "Place (%s) driver in correct location and run devfsadm -i %s.\n" 1137c478bd9Sstevel@tonic-gate #define ERR_ARCH_NOT_SUPPORTED "Architecture %s not supported by add_drv.\n" 1147c478bd9Sstevel@tonic-gate #define ERR_SYSINFO_ARCH "Failed to identify system architecture.\n" 1157c478bd9Sstevel@tonic-gate #define ERR_PATH_SPEC "Error: driver may not be specified by path (%s)\n" 1167c478bd9Sstevel@tonic-gate #define ERR_CREATE_RECONFIG "Error: Could not create /reconfigure.\n" 1177c478bd9Sstevel@tonic-gate 1187c478bd9Sstevel@tonic-gate /* update_drv messages */ 1197c478bd9Sstevel@tonic-gate #define UPD_DRV_USAGE \ 1207c478bd9Sstevel@tonic-gate "Usage:\tupdate_drv [ -f | -v ] <driver_module>\n" \ 1217c478bd9Sstevel@tonic-gate "\tupdate_drv [ -b basedir ] [ -f | -v ] -a\n" \ 1227c478bd9Sstevel@tonic-gate "\t\t[-m 'permission'] [-i 'identify_name']\n" \ 1237c478bd9Sstevel@tonic-gate "\t\t[-P privilege] [-p 'policy'] <driver_module>\n" \ 1247c478bd9Sstevel@tonic-gate "\tupdate_drv [ -b basedir ] [ -f | -v ] -d\n" \ 1257c478bd9Sstevel@tonic-gate "\t\t[-m 'permission'] [-i 'identify_name']\n" \ 1267c478bd9Sstevel@tonic-gate "\t\t[-P privilege] [-p 'policy'] <driver_module>\n\n"\ 1277c478bd9Sstevel@tonic-gate "NOTE: at least one of m/i/P/p must be specified with -a and -d.\n" 1287c478bd9Sstevel@tonic-gate 1297c478bd9Sstevel@tonic-gate #define FORCE_UPDATE "Forcing update of %s.conf.\n" 1307c478bd9Sstevel@tonic-gate #define ERR_DRVCONF "Failed to update %s.conf for driver.\n" 1317c478bd9Sstevel@tonic-gate #define DRVCONF_UPDATED "%s.conf updated in the kernel.\n" 1327c478bd9Sstevel@tonic-gate #define NOUPDATE "%s.conf not updated in the kernel\n" 1337c478bd9Sstevel@tonic-gate 1347c478bd9Sstevel@tonic-gate /* remdrv messages */ 1357c478bd9Sstevel@tonic-gate 1367c478bd9Sstevel@tonic-gate #define REM_USAGE1 "Usage:\n\t rem_drv [ -b <basedir> ] driver_name\n" 1377c478bd9Sstevel@tonic-gate #define ERR_NO_MAJ "Cannot get major number for : %s\n" 1387c478bd9Sstevel@tonic-gate #define ERR_UNLINK "Warning: Cannot remove %s from devfs namespace.\n" 1397c478bd9Sstevel@tonic-gate #define ERR_PIPE "System error : Cannot create pipe\n" 1407c478bd9Sstevel@tonic-gate #define ERR_EXEC "System error : Exec failed\n" 1417c478bd9Sstevel@tonic-gate #define ERR_DEVFSCLEAN \ 1427c478bd9Sstevel@tonic-gate "Warning: Cannot remove entries from devfs namespace for driver : %s.\n" 1437c478bd9Sstevel@tonic-gate #define ERR_DEVFSALCLEAN \ 1447c478bd9Sstevel@tonic-gate "Warning: Cannot remove alias entries from devfs namespace for driver : %s .\n" 1457c478bd9Sstevel@tonic-gate #define ERR_MODID "Cannot get modid for : (%s)\n" 1467c478bd9Sstevel@tonic-gate #define ERR_MODUN \ 1477c478bd9Sstevel@tonic-gate "Cannot unload module: %s\nWill be unloaded upon reboot.\n" 1487c478bd9Sstevel@tonic-gate #define ERR_MODREMMAJ "Cannot remove major number binding for %d\n" 1497c478bd9Sstevel@tonic-gate #define ERR_NOENTRY "Cannot find (%s) in file : %s\n" 1507c478bd9Sstevel@tonic-gate 1517c478bd9Sstevel@tonic-gate /* drvsubr messages */ 1527c478bd9Sstevel@tonic-gate #define ERR_NOFILE "Warning: (%s) file missing.\n" 1537c478bd9Sstevel@tonic-gate #define ERR_NO_SPACE \ 1547c478bd9Sstevel@tonic-gate "Can't have space within double quote: %s. \ 1557c478bd9Sstevel@tonic-gate Use octal escape sequence \"\\040\".\n" 1567c478bd9Sstevel@tonic-gate 1577c478bd9Sstevel@tonic-gate #define ERR_PRIVIMPL "Cannot get privilege information.\n" 1587c478bd9Sstevel@tonic-gate #define ERR_BAD_MINOR "Minor device specification cannot include ``:''.\n" 1597c478bd9Sstevel@tonic-gate #define ERR_BAD_TOKEN "Bad policy token: ``%s''.\n" 1607c478bd9Sstevel@tonic-gate #define ERR_BAD_PRIVS "Error in privilege set specification: %.*s[HERE->]%s\n" 1617c478bd9Sstevel@tonic-gate #define ERR_INVALID_PLCY "Invalid policy specification\n" 1627c478bd9Sstevel@tonic-gate #define ERR_ONLY_ONE "Only one policy entry allowed per invocation\n" 1637c478bd9Sstevel@tonic-gate #define ERR_NO_EQUALS "Missing equal sign in token ``%s''\n" 1647c478bd9Sstevel@tonic-gate #define ERR_BAD_PRIV "Cannot allocate privilege ``%s'': %s\n" 1657c478bd9Sstevel@tonic-gate 1667c478bd9Sstevel@tonic-gate #define ERR_UPDATE_PERM \ 1677c478bd9Sstevel@tonic-gate "kernel update of permissions for driver %s failed (%d)\n" 1687c478bd9Sstevel@tonic-gate 1697c478bd9Sstevel@tonic-gate #define ERR_REMDRV_CLEANUP \ 1707c478bd9Sstevel@tonic-gate "post-rem_drv devfs cleanup for driver %s failed (%d)\n" 1717c478bd9Sstevel@tonic-gate 1727c478bd9Sstevel@tonic-gate #ifdef __cplusplus 1737c478bd9Sstevel@tonic-gate } 1747c478bd9Sstevel@tonic-gate #endif 1757c478bd9Sstevel@tonic-gate 1767c478bd9Sstevel@tonic-gate #endif /* _ERRMSG_H */ 177