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"
38 usage(const char *command
)
40 (void) fprintf(stderr
,
41 gettext("Usage: %s [ -d ] | [ -clx ] [ container ]\n"),
46 main(int argc
, char *argv
[])
48 char *command
= argv
[0], *searchpath
= NULL
;
50 int containers_only
= 0, dtd
= 0, list_only
= 0, nodtd
= 0, option
,
54 (void) setlocale(LC_ALL
, "");
55 (void) textdomain(TEXT_DOMAIN
);
57 opterr
= 0; /* "getopt" should not print to "stderr" */
58 while ((option
= getopt(argc
, argv
, "cdlx")) != EOF
) {
85 if (nodtd
|| (argc
> 0)) {
87 (void) fprintf(stderr
,
88 gettext("Specify \"-d\" alone\n"));
92 return (output_dtd());
100 if (!searchpath
[0]) {
102 (void) fprintf(stderr
,
103 gettext("\"container\" should not be empty\n"));
114 * Select the data source and print all the data
116 if ((status
= fru_open_data_source("picl")) != FRU_SUCCESS
) {
117 (void) fprintf(stderr
,
118 gettext("Error opening FRU ID data source: %s\n"),
119 fru_strerror(status
));
123 return (prtfru(searchpath
, containers_only
, list_only
, xml
));