4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License, Version 1.0 only
6 * (the "License"). You may not use this file except in compliance
9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 * or http://www.opensolaris.org/os/licensing.
11 * See the License for the specific language governing permissions
12 * and limitations under the License.
14 * When distributing Covered Code, include this CDDL HEADER in each
15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 * If applicable, add the following below this CDDL HEADER, with the
17 * fields enclosed by brackets "[]" replaced with your own identifying
18 * information: Portions Copyright [yyyy] [name of copyright owner]
23 * Copyright 2002 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
27 #pragma ident "%Z%%M% %I% %E% SMI"
30 * status.c: support for scadm version option (to display the service processor
37 #include <time.h> /* required by librsc.h */
44 ADM_Process_status(int verbose
)
47 struct timespec Timeout
;
48 dp_rsc_status_r_t
*rscStatus
;
53 Message
.type
= DP_RSC_STATUS
;
59 Timeout
.tv_sec
= ADM_TIMEOUT
;
60 ADM_Recv(&Message
, &Timeout
,
61 DP_RSC_STATUS_R
, sizeof (dp_rsc_status_r_t
));
63 /* Print the status */
64 rscStatus
= (dp_rsc_status_r_t
*)Message
.data
;
66 (void) printf("%s v%d.%d\n",
67 gettext("SC Version"),
68 rscStatus
->release_rev_major
, rscStatus
->release_rev_minor
);
69 (void) printf("%s v%d.%d.%d\n",
70 gettext("SC Bootmon Version: "),
71 rscStatus
->bootmon_rev_major
, rscStatus
->bootmon_rev_minor
,
72 rscStatus
->bootmon_rev_micro
);
74 (void) printf("%s %08lX\r\n\n", gettext("SC Bootmon checksum:"),
78 (void) printf("%s v%d.%d.%d\n",
79 gettext("SC Firmware Version: "),
80 rscStatus
->main_rev_major
, rscStatus
->main_rev_minor
,
81 rscStatus
->main_rev_micro
);
83 (void) printf("%s %02d\r\n", gettext("SC Build Release:"),
84 rscStatus
->rsc_build
);
91 (void) printf("%s %08lX\r\n\n",
92 gettext("SC firmware checksum:"), rscStatus
->fw_cksum
);
93 (void) printf("%s %s\r\n\n",
94 gettext("SC firmware built:"), rscStatus
->creationDate
);
95 (void) printf("%s %ld%s\r\n\r\n",
96 gettext("SC System Memory Size:"), rscStatus
->sys_mem
,
98 (void) printf("%s %lx\r\n\r\n",
99 gettext("SC NVRAM Version ="), rscStatus
->nvram_version
);
102 * Not currently implemented in firmware
103 * (void) printf("%s = %d\n",
104 * gettext("Users currently logged in"), rscStatus->nusers);
108 /* 4388953 Display SC board type */
109 (void) printf("%s %d\r\n\r\n",
110 gettext("SC hardware type:"), rscStatus
->hardware_rev
);