Merge remote-tracking branch 'origin/master'
[unleashed/lotheac.git] / usr / src / cmd / format / menu_developer.c
blob5ed1b23ff176dbd3e5fb1694c3e731314c9e363b
1 /*
2 * CDDL HEADER START
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
7 * with the License.
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]
20 * CDDL HEADER END
24 * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
25 * Use is subject to license terms.
28 #pragma ident "%Z%%M% %I% %E% SMI"
31 * This file contains functions that implement the fdisk menu commands.
33 #include "global.h"
34 #include <sys/time.h>
35 #include <sys/resource.h>
36 #include <sys/wait.h>
37 #include <signal.h>
38 #include <string.h>
39 #include <sys/fcntl.h>
40 #include <sys/stat.h>
42 #include <sys/dklabel.h>
44 #include "main.h"
45 #include "analyze.h"
46 #include "menu.h"
47 #include "menu_developer.h"
48 #include "param.h"
49 #include "misc.h"
50 #include "label.h"
51 #include "startup.h"
52 #include "partition.h"
53 #include "prompts.h"
54 #include "checkdev.h"
55 #include "io.h"
56 #include "ctlr_scsi.h"
57 #include "auto_sense.h"
58 #include "hardware_structs.h"
60 extern struct menu_item menu_developer[];
63 int
64 c_developer()
67 cur_menu++;
68 last_menu = cur_menu;
71 * Run the menu.
73 run_menu(menu_developer, "DEVELOPER", "developer", 0);
74 cur_menu--;
75 return (0);
78 int
79 dv_disk()
81 struct disk_info *diskp;
83 diskp = disk_list;
84 while (diskp != NULL) {
86 (void) printf("\ndisk_name %s ", diskp->disk_name);
87 (void) printf("disk_path %s\n", diskp->disk_path);
88 (void) printf("ctlr_cname = %s ",
89 diskp->disk_ctlr->ctlr_cname);
90 (void) printf("cltr_dname = %s ",
91 diskp->disk_ctlr->ctlr_dname);
92 (void) printf("ctype_name = %s\n",
93 diskp->disk_ctlr->ctlr_ctype->ctype_name);
94 (void) printf("ctype_ctype = %d\n",
95 diskp->disk_ctlr->ctlr_ctype->ctype_ctype);
96 (void) printf("devfsname = %s\n", diskp->devfs_name);
97 diskp = diskp->disk_next;
99 return (0);
103 dv_cont()
105 struct ctlr_info *contp;
107 contp = ctlr_list;
108 while (contp != NULL) {
110 (void) printf("\nctype_name = %s ",
111 contp->ctlr_ctype->ctype_name);
112 (void) printf("cname = %s dname = %s ",
113 contp->ctlr_cname, contp->ctlr_dname);
114 (void) printf("ctype_ctype = %d\n",
115 contp->ctlr_ctype->ctype_ctype);
116 contp = contp->ctlr_next;
118 return (0);
122 dv_cont_chain()
124 struct mctlr_list *ctlrp;
126 ctlrp = controlp;
128 if (ctlrp == NULL)
129 (void) printf("ctlrp is NULL!!\n");
131 while (ctlrp != NULL) {
132 (void) printf("ctlrp->ctlr_type->ctype_name = %s\n",
133 ctlrp->ctlr_type->ctype_name);
134 ctlrp = ctlrp->next;
136 return (0);
140 dv_params()
142 (void) printf("ncyl = %d\n", ncyl);
143 (void) printf("acyl = %d\n", acyl);
144 (void) printf("pcyl = %d\n", pcyl);
145 (void) printf("nhead = %d\n", nhead);
146 (void) printf("nsect = %d\n", nsect);
148 return (0);