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 /* 23 * Copyright 2008 Sun Microsystems, Inc. All rights reserved. 24 * Use is subject to license terms. 25 */ 26 27 #ifndef _MESSAGES_H 28 #define _MESSAGES_H 29 30 /* 31 * Messages 32 */ 33 34 #ifdef __cplusplus 35 extern "C" { 36 #endif 37 38 #include <libintl.h> 39 40 /* Messages used in fpsd_main.c */ 41 42 #define DAEMON_ALREADY_RUNNING \ 43 gettext("Can not start daemon when another instance"\ 44 " is already running.\n") 45 46 #define DAEMON_INIT_FAIL \ 47 gettext("Could not intialize state structures for the daemon.\n") 48 49 #define DAEMON_PIPE_FAIL \ 50 gettext("Failed to create pipe for daemonizing : %s\n") 51 52 #define DAEMON_FORK_FAIL \ 53 gettext("Failed to fork daemon into background : %s\n") 54 55 #define DAEMON_DOOR_FAIL \ 56 gettext("Library call door_create failed : %s\n") 57 58 #define DAEMON_DOOR_FILE_FAIL \ 59 gettext("Could not create door file : %s\n") 60 61 #define DAEMON_DOOR_FATTACH_FAIL \ 62 gettext("Could not fattach to door file : %s\n") 63 64 #define CORE_DIR_CREATION_FAILED \ 65 gettext("%s directory could not be created for "\ 66 "storing core files : %s\n") 67 68 #define LIBRARY_CALL_FAIL \ 69 gettext("Library call %s failed : %s\n") 70 71 #define SYSTEM_CALL_FAIL \ 72 gettext("System call %s failed : %s\n") 73 74 #define INVALID_CPUID \ 75 gettext("Invalid cpuid: %s\n") 76 77 #define CPU_NOT_SUPPORTED \ 78 gettext("%s CPU brand of CPU ID %d is not supported by FP Scrubber.\n") 79 80 #define CPU_BRAND_PROBE_FAIL \ 81 gettext("Could not read Brand for CPU ID %d.\n") 82 83 #define FREQ_PROBE_FAIL \ 84 gettext("Could not probe frequency for CPU ID %d.\n") 85 86 #define FPSD_ZERO_INTVL \ 87 gettext("Some error occured in calculating interval;"\ 88 " interval calculated = %d\n") 89 90 #define FPSD_NO_CPUS_TO_TEST \ 91 gettext("FP Scrubber is not supported on "\ 92 " the processors that are online\n") 93 94 #define SMF_INVOKED \ 95 gettext("Program started through SMF; state = %s\n") 96 97 #define CL_INVOKED \ 98 gettext("Program started through command line; state = %s\n") 99 100 #define INSUFFICIENT_PRIVS \ 101 gettext("Insufficient priviliges to run %s. Exiting...\n") 102 103 #define UNSUPPORTED_SYSTEM \ 104 gettext("System configuration probe failed. Exiting ...\n") 105 106 #define THR_CREATION_FAIL \ 107 gettext("Initialization Failure: " \ 108 " Could not create test scheduling thread.\n") 109 110 #define ESTAR_INFO \ 111 gettext("Actual testing is done only when the system " \ 112 " is not in idle state.\n") 113 114 #define PROP_UNDEFINED \ 115 gettext("Reading of property %s failed for the "\ 116 "service instance; reason : %s\n") 117 118 #define USAGE_MSG gettext("\nUsage: %s [-dl[0..3]] \n") 119 120 #define DOOR_SETUP_FAIL \ 121 gettext("Could not setup lock mechanism."\ 122 " This might happen if another instance of fpsd is running.\n") 123 124 #define PRINT_INTVL gettext("Calculated time interval = %d .\n") 125 126 #define SIGNAL_INFO gettext("Process received SIG%s (%d) signal.\n") 127 128 #define FORK_FAIL_MSG gettext("Could not start CPU test program: %s\n" \ 129 "System call fork() failed. Reason: %s\n") 130 131 #define TST_EXEC_FAIL gettext("Could not execute CPU test program: %s"\ 132 "\n Reason: %s\n") 133 134 #define SWAP_WARN gettext("Low swap space: Test: %s was not invoked.") 135 136 #define START_TEST_MSG gettext("Start Test :%s -f %s -p %s -d %s\n") 137 138 #define END_TST_MSG \ 139 gettext("End Test (PID=%d) Time: %dH.%dM.%dS.%dMsecs %s\n") 140 141 #define DI_INIT_FAIL \ 142 gettext("Could not get device info tree information: " \ 143 " di_init() failed.\n") 144 145 #define DI_PROM_INIT_FAIL \ 146 gettext("Could not get PROM tree information: " \ 147 " di_prom_init() failed.\n") 148 149 #define INTERNAL_FAILURE_WARN \ 150 gettext("Would recover from internal software failure:\n"\ 151 " ioctl /dev/pm PM_GET_STATE_CHANGE : %s\n") 152 153 #define INTERNAL_FAILURE_WARN1 \ 154 gettext("Would recover from internal software failure:\n"\ 155 " ioctl /dev/pm PM_GET_CURRENT_POWER : %s\n") 156 157 #define INTERNAL_FAILURE_WARN2 \ 158 gettext("Would recover from internal software failure:\n"\ 159 " ioctl /dev/pm PM_GET_STATE_CHANGE_WAIT : %s\n") 160 161 #define FPU_INVALID_ARG_MSG \ 162 gettext("Invalid arguments passed to fp-test\n") 163 164 #define FPU_SIG_RCVD \ 165 gettext("FP test on %d received signal.\n") 166 167 #define FPU_SIG_ILL_MSG \ 168 gettext("FP test on FPU %d received SIGILL.\n") 169 170 #define FPU_SYSCALL_FAIL_MSG \ 171 gettext("Syscall failed for FP test on FPU %d\n") 172 173 #define FPU_EREPORT_INCOM_MSG \ 174 gettext("FP test on FPU %d could not complete ereport generation.\n") 175 176 #define FPU_FPE_MSG \ 177 gettext("FP test encountered floating point exception on FPU %d.\n") 178 179 #define FPU_SYSCALL_TRYAGAIN_MSG \ 180 gettext("Syscall failed probably due to temporary "\ 181 "unavailability of resources; Trying again!\n") 182 183 #define INVAL_PROP_VALUE \ 184 gettext("Invalid property value defined: %s;\n"\ 185 "\tIgnoring field exclude_cpus.\n") 186 187 #define FPU_EREPORT_FAIL_MSG \ 188 gettext("FP test on FPU %d could not file ereport.\n") 189 190 #define FPU_TIMED_OUT_MSG \ 191 gettext("Test could not be scheduled on FPU %d; Daemon timed out\n") 192 193 #define FPSD_MIS_CALCULATIONS \ 194 gettext("There was some errorin calculating total iterations "\ 195 "in one pass: %d\n") 196 197 #define REPROBE_MSG \ 198 gettext("Num onln cpus changed; Reprobing...\n") 199 200 #define IDENTIFY_FPU_MSG \ 201 gettext("In the beginning, fpuid_index = %d, " \ 202 "d_iteration = %d, tot_iter = %d, Total cpus = %d\n") 203 204 #define IDENTIFY_FPU_RTN_MSG \ 205 gettext("Before returning, fpuid = %d, iter = %d, freq= %d, " \ 206 "prev_iter = %d, total_iter = %d\n") 207 208 #define RECORD_FAILURE_MSG \ 209 gettext("Recording failure for fpu %d at %d\n") 210 211 #define EXIT_STAT_MSG \ 212 gettext("FP test exit status = %d\n") 213 214 #define INTVL_CHANGED_MSG \ 215 gettext("Interval changed in scheduler: %d\n") 216 217 #define RESCHEDULE_MSG \ 218 gettext("Rescheduling test for %d\n") 219 220 #define TOT_ITERS \ 221 gettext("Total iterations = %d, number of cpus to test = %d\n") 222 223 #define NUM_ONLN_CPUS \ 224 gettext("Numberofonlncpus=%d:\n") 225 226 #define CPU_INFO \ 227 gettext("Cpuid = %d, cpu brand = %s, frequency = %d\n") 228 229 #define NUM_CPUS_2_TST \ 230 gettext("Cpuids_size after probe = %d\n") 231 232 #define NUM_IGN_CPUS \ 233 gettext("Number of cpus to be excluded from testing = %d\n") 234 235 #define IGN_CPUS \ 236 gettext("Ignoring cpu %d\n") 237 238 #define CREATE_FAIL \ 239 gettext("Unable to create SCF instance/property group/property: %s\n") 240 241 #define HANDLE_DECODE_FAIL \ 242 gettext("Unable to decode FMRI : %s") 243 244 #define SNAPSHOT_CREAT_FAIL \ 245 gettext("Unable to create SCF snapshot: %s\n") 246 247 #define INST_SNAPSHOT_GET_FAIL \ 248 gettext("Unable to set snapshot in instance: %s\n") 249 250 #define INSTANCE_PG_GET_FAIL \ 251 gettext("Instance properties could not be obtained: %s\n") 252 253 #define INTVL_VAL \ 254 gettext("From SMF repository, interval = %lld\n") 255 256 #define EXCL_CPUS \ 257 gettext("From SMF repository, cpus to be excluded = %s\n") 258 259 #define SMF_INVKD \ 260 gettext("SMF invoked; fpsd fmri = %s\n") 261 262 #define CLI_INVKD \ 263 gettext("CLI invocation\n") 264 265 #define FPTST_BIN_PTH \ 266 gettext("Searching for fptest binary location = %s\n") 267 268 #define FPSD_STATE \ 269 gettext("Service disabled successfully. \n") 270 271 #define DISABLE_SVC_FAILED \ 272 gettext("Disabling service failed; Current state = %s\n") 273 274 #define REPRBE_REQ \ 275 gettext("Reprobe request recd.\n") 276 277 #define DOOR_HNDLR_MSG \ 278 gettext("Server received door call: Version %d; type: %x; len:%d \n") 279 280 #define UNBIND_FAIL_MSG \ 281 gettext("Unable to unbind after fptest timeout: %s\n") 282 283 #define TST_SIGNALED_MSG \ 284 gettext("Fptest on cpu %d, matrix size = %d died due to signal %s\n") 285 286 #define MIN_INTERVAL_MSG \ 287 gettext("Calculated interval = %d which is less than min interval.\n"\ 288 "Setting interval to %d\n") 289 290 #define ALL_CPUS_EXCLDED \ 291 gettext("All cpus are excluded from testing through "\ 292 "config/exclude_cpus properties for the service. \n") 293 294 #define GET_TIME_FAILED \ 295 gettext("gettimeofday failed: %s\n") 296 297 #define LOCAL_TIME_FAILED \ 298 gettext("localtime_r failed: %s\n") 299 300 #define STRFTIME_FAILED \ 301 gettext("strftime failed: buffer[%d] too small\n") 302 303 #define PRINT_BUFFER \ 304 gettext("%s") 305 306 #define ZERO_CPUS_2_TST \ 307 gettext("Assertion failed: While trying to calculate total"\ 308 " iterations, no cpus to test.\n") 309 310 #define INVALID_FPU_ID \ 311 gettext("Assertion failed: An FPU could not be identified "\ 312 "to schedule test.\n") 313 314 #define REPROBE_FAILURE \ 315 gettext("Reprobe failed. Exiting...\n") 316 317 #define INFINITE_LOOP_MSG \ 318 gettext("Assertion failed: No testable CPU could be identified "\ 319 " after traversing the list of CPUs.\n") 320 321 #ifdef __cplusplus 322 } 323 #endif 324 325 #endif /* _MESSAGES_H */ 326