10Sstevel@tonic-gate /*
20Sstevel@tonic-gate * CDDL HEADER START
30Sstevel@tonic-gate *
40Sstevel@tonic-gate * The contents of this file are subject to the terms of the
5*9889SLarry.Liu@Sun.COM * Common Development and Distribution License (the "License").
6*9889SLarry.Liu@Sun.COM * You may not use this file except in compliance with the License.
70Sstevel@tonic-gate *
80Sstevel@tonic-gate * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
90Sstevel@tonic-gate * or http://www.opensolaris.org/os/licensing.
100Sstevel@tonic-gate * See the License for the specific language governing permissions
110Sstevel@tonic-gate * and limitations under the License.
120Sstevel@tonic-gate *
130Sstevel@tonic-gate * When distributing Covered Code, include this CDDL HEADER in each
140Sstevel@tonic-gate * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
150Sstevel@tonic-gate * If applicable, add the following below this CDDL HEADER, with the
160Sstevel@tonic-gate * fields enclosed by brackets "[]" replaced with your own identifying
170Sstevel@tonic-gate * information: Portions Copyright [yyyy] [name of copyright owner]
180Sstevel@tonic-gate *
190Sstevel@tonic-gate * CDDL HEADER END
200Sstevel@tonic-gate */
210Sstevel@tonic-gate /*
22*9889SLarry.Liu@Sun.COM * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
230Sstevel@tonic-gate * Use is subject to license terms.
240Sstevel@tonic-gate */
250Sstevel@tonic-gate
260Sstevel@tonic-gate /*
270Sstevel@tonic-gate * This file contains functions to prompt the user for various
280Sstevel@tonic-gate * disk characteristics. By isolating these into functions,
290Sstevel@tonic-gate * we can guarantee that prompts, defaults, etc are identical.
300Sstevel@tonic-gate */
310Sstevel@tonic-gate #include "global.h"
320Sstevel@tonic-gate #include "prompts.h"
330Sstevel@tonic-gate #include "io.h"
340Sstevel@tonic-gate #include "param.h"
350Sstevel@tonic-gate #include "startup.h"
360Sstevel@tonic-gate
370Sstevel@tonic-gate #ifdef sparc
380Sstevel@tonic-gate #include <sys/hdio.h>
390Sstevel@tonic-gate #endif
400Sstevel@tonic-gate
410Sstevel@tonic-gate
420Sstevel@tonic-gate /*
430Sstevel@tonic-gate * Prompt for max number of LBA
440Sstevel@tonic-gate */
450Sstevel@tonic-gate uint64_t
get_mlba()460Sstevel@tonic-gate get_mlba()
470Sstevel@tonic-gate {
480Sstevel@tonic-gate u_ioparam_t ioparam;
490Sstevel@tonic-gate
500Sstevel@tonic-gate ioparam.io_bounds.lower = (1024 * 16) + 68;
510Sstevel@tonic-gate ioparam.io_bounds.upper = UINT_MAX64;
520Sstevel@tonic-gate
530Sstevel@tonic-gate return (input(FIO_INT64, "Enter maximum number of LBAs",
540Sstevel@tonic-gate ':', &ioparam, (int *)NULL, DATA_INPUT));
550Sstevel@tonic-gate }
560Sstevel@tonic-gate
570Sstevel@tonic-gate /*
580Sstevel@tonic-gate * Prompt for number of cylinders
590Sstevel@tonic-gate */
600Sstevel@tonic-gate int
get_ncyl()610Sstevel@tonic-gate get_ncyl()
620Sstevel@tonic-gate {
630Sstevel@tonic-gate u_ioparam_t ioparam;
640Sstevel@tonic-gate
650Sstevel@tonic-gate ioparam.io_bounds.lower = 1;
660Sstevel@tonic-gate ioparam.io_bounds.upper = MAX_CYLS;
670Sstevel@tonic-gate return (input(FIO_INT, "Enter number of data cylinders",
680Sstevel@tonic-gate ':', &ioparam, (int *)NULL, DATA_INPUT));
690Sstevel@tonic-gate }
700Sstevel@tonic-gate
710Sstevel@tonic-gate /*
720Sstevel@tonic-gate * Prompt for number of alternate cylinders
730Sstevel@tonic-gate */
740Sstevel@tonic-gate int
get_acyl(n_cyls)750Sstevel@tonic-gate get_acyl(n_cyls)
760Sstevel@tonic-gate int n_cyls;
770Sstevel@tonic-gate {
780Sstevel@tonic-gate u_ioparam_t ioparam;
790Sstevel@tonic-gate int deflt;
800Sstevel@tonic-gate
810Sstevel@tonic-gate ioparam.io_bounds.lower = 2;
820Sstevel@tonic-gate ioparam.io_bounds.upper = MAX_CYLS - n_cyls;
830Sstevel@tonic-gate deflt = 2;
840Sstevel@tonic-gate return (input(FIO_INT, "Enter number of alternate cylinders", ':',
850Sstevel@tonic-gate &ioparam, &deflt, DATA_INPUT));
860Sstevel@tonic-gate }
870Sstevel@tonic-gate
880Sstevel@tonic-gate /*
890Sstevel@tonic-gate * Prompt for number of physical cylinders
900Sstevel@tonic-gate */
910Sstevel@tonic-gate int
get_pcyl(n_cyls,a_cyls)920Sstevel@tonic-gate get_pcyl(n_cyls, a_cyls)
930Sstevel@tonic-gate int n_cyls;
940Sstevel@tonic-gate int a_cyls;
950Sstevel@tonic-gate {
960Sstevel@tonic-gate u_ioparam_t ioparam;
970Sstevel@tonic-gate int deflt;
980Sstevel@tonic-gate
990Sstevel@tonic-gate ioparam.io_bounds.lower = n_cyls + a_cyls;
1000Sstevel@tonic-gate ioparam.io_bounds.upper = MAX_CYLS;
1010Sstevel@tonic-gate deflt = n_cyls + a_cyls;
1020Sstevel@tonic-gate return (input(FIO_INT, "Enter number of physical cylinders", ':',
1030Sstevel@tonic-gate &ioparam, &deflt, DATA_INPUT));
1040Sstevel@tonic-gate }
1050Sstevel@tonic-gate
1060Sstevel@tonic-gate /*
1070Sstevel@tonic-gate * Prompt for number of heads
1080Sstevel@tonic-gate */
1090Sstevel@tonic-gate int
get_nhead()1100Sstevel@tonic-gate get_nhead()
1110Sstevel@tonic-gate {
1120Sstevel@tonic-gate u_ioparam_t ioparam;
1130Sstevel@tonic-gate
1140Sstevel@tonic-gate ioparam.io_bounds.lower = 1;
1150Sstevel@tonic-gate ioparam.io_bounds.upper = MAX_HEADS;
1160Sstevel@tonic-gate return (input(FIO_INT, "Enter number of heads", ':',
1170Sstevel@tonic-gate &ioparam, (int *)NULL, DATA_INPUT));
1180Sstevel@tonic-gate }
1190Sstevel@tonic-gate
1200Sstevel@tonic-gate /*
1210Sstevel@tonic-gate * Prompt for number of physical heads
1220Sstevel@tonic-gate */
1230Sstevel@tonic-gate int
get_phead(n_heads,options)1240Sstevel@tonic-gate get_phead(n_heads, options)
1250Sstevel@tonic-gate int n_heads;
1260Sstevel@tonic-gate ulong_t *options;
1270Sstevel@tonic-gate {
1280Sstevel@tonic-gate u_ioparam_t ioparam;
1290Sstevel@tonic-gate int deflt;
1300Sstevel@tonic-gate
1310Sstevel@tonic-gate if (SCSI) {
1320Sstevel@tonic-gate ioparam.io_bounds.lower = n_heads;
1330Sstevel@tonic-gate ioparam.io_bounds.upper = INFINITY;
1340Sstevel@tonic-gate if (input(FIO_OPINT, "Enter physical number of heads",
1350Sstevel@tonic-gate ':', &ioparam, &deflt, DATA_INPUT)) {
1360Sstevel@tonic-gate *options |= SUP_PHEAD;
1370Sstevel@tonic-gate return (deflt);
1380Sstevel@tonic-gate }
1390Sstevel@tonic-gate }
1400Sstevel@tonic-gate return (0);
1410Sstevel@tonic-gate }
1420Sstevel@tonic-gate
1430Sstevel@tonic-gate
1440Sstevel@tonic-gate /*
1450Sstevel@tonic-gate * Prompt for number of sectors per track
1460Sstevel@tonic-gate */
1470Sstevel@tonic-gate int
get_nsect()1480Sstevel@tonic-gate get_nsect()
1490Sstevel@tonic-gate {
1500Sstevel@tonic-gate u_ioparam_t ioparam;
1510Sstevel@tonic-gate
1520Sstevel@tonic-gate ioparam.io_bounds.lower = 1;
1530Sstevel@tonic-gate ioparam.io_bounds.upper = MAX_SECTS;
1540Sstevel@tonic-gate return (input(FIO_INT,
1550Sstevel@tonic-gate "Enter number of data sectors/track", ':',
1560Sstevel@tonic-gate &ioparam, (int *)NULL, DATA_INPUT));
1570Sstevel@tonic-gate }
1580Sstevel@tonic-gate
1590Sstevel@tonic-gate /*
1600Sstevel@tonic-gate * Prompt for number of physical sectors per track
1610Sstevel@tonic-gate */
1620Sstevel@tonic-gate int
get_psect(options)1630Sstevel@tonic-gate get_psect(options)
1640Sstevel@tonic-gate ulong_t *options;
1650Sstevel@tonic-gate {
1660Sstevel@tonic-gate u_ioparam_t ioparam;
1670Sstevel@tonic-gate int deflt;
1680Sstevel@tonic-gate
1690Sstevel@tonic-gate if (SCSI) {
1700Sstevel@tonic-gate ioparam.io_bounds.lower = 0;
1710Sstevel@tonic-gate ioparam.io_bounds.upper = INFINITY;
1720Sstevel@tonic-gate if (input(FIO_OPINT, "Enter number of physical sectors/track",
1730Sstevel@tonic-gate ':', &ioparam, &deflt, DATA_INPUT)) {
1740Sstevel@tonic-gate *options |= SUP_PSECT;
1750Sstevel@tonic-gate return (deflt);
1760Sstevel@tonic-gate }
1770Sstevel@tonic-gate }
1780Sstevel@tonic-gate return (0);
1790Sstevel@tonic-gate }
1800Sstevel@tonic-gate
1810Sstevel@tonic-gate /*
1820Sstevel@tonic-gate * Prompt for bytes per track
1830Sstevel@tonic-gate */
1840Sstevel@tonic-gate int
get_bpt(n_sects,options)1850Sstevel@tonic-gate get_bpt(n_sects, options)
1860Sstevel@tonic-gate int n_sects;
1870Sstevel@tonic-gate ulong_t *options;
1880Sstevel@tonic-gate {
1890Sstevel@tonic-gate u_ioparam_t ioparam;
1900Sstevel@tonic-gate int deflt;
1910Sstevel@tonic-gate
1920Sstevel@tonic-gate if (SMD) {
1930Sstevel@tonic-gate *options |= SUP_BPT;
1940Sstevel@tonic-gate ioparam.io_bounds.lower = 1;
1950Sstevel@tonic-gate ioparam.io_bounds.upper = INFINITY;
196*9889SLarry.Liu@Sun.COM deflt = n_sects * cur_blksz;
1970Sstevel@tonic-gate return (input(FIO_INT, "Enter number of bytes/track",
1980Sstevel@tonic-gate ':', &ioparam, &deflt, DATA_INPUT));
1990Sstevel@tonic-gate }
2000Sstevel@tonic-gate
2010Sstevel@tonic-gate return (0);
2020Sstevel@tonic-gate }
2030Sstevel@tonic-gate
2040Sstevel@tonic-gate /*
2050Sstevel@tonic-gate * Prompt for rpm
2060Sstevel@tonic-gate */
2070Sstevel@tonic-gate int
get_rpm()2080Sstevel@tonic-gate get_rpm()
2090Sstevel@tonic-gate {
2100Sstevel@tonic-gate u_ioparam_t ioparam;
2110Sstevel@tonic-gate int deflt;
2120Sstevel@tonic-gate
2130Sstevel@tonic-gate ioparam.io_bounds.lower = MIN_RPM;
2140Sstevel@tonic-gate ioparam.io_bounds.upper = MAX_RPM;
2150Sstevel@tonic-gate deflt = AVG_RPM;
2160Sstevel@tonic-gate return (input(FIO_INT, "Enter rpm of drive", ':',
2170Sstevel@tonic-gate &ioparam, &deflt, DATA_INPUT));
2180Sstevel@tonic-gate }
2190Sstevel@tonic-gate
2200Sstevel@tonic-gate /*
2210Sstevel@tonic-gate * Prompt for formatting time
2220Sstevel@tonic-gate */
2230Sstevel@tonic-gate int
get_fmt_time(options)2240Sstevel@tonic-gate get_fmt_time(options)
2250Sstevel@tonic-gate ulong_t *options;
2260Sstevel@tonic-gate {
2270Sstevel@tonic-gate u_ioparam_t ioparam;
2280Sstevel@tonic-gate int deflt;
2290Sstevel@tonic-gate
2300Sstevel@tonic-gate ioparam.io_bounds.lower = 0;
2310Sstevel@tonic-gate ioparam.io_bounds.upper = INFINITY;
2320Sstevel@tonic-gate if (input(FIO_OPINT, "Enter format time", ':',
2330Sstevel@tonic-gate &ioparam, &deflt, DATA_INPUT)) {
2340Sstevel@tonic-gate *options |= SUP_FMTTIME;
2350Sstevel@tonic-gate return (deflt);
2360Sstevel@tonic-gate }
2370Sstevel@tonic-gate return (0);
2380Sstevel@tonic-gate }
2390Sstevel@tonic-gate
2400Sstevel@tonic-gate /*
2410Sstevel@tonic-gate * Prompt for cylinder skew
2420Sstevel@tonic-gate */
2430Sstevel@tonic-gate int
get_cyl_skew(options)2440Sstevel@tonic-gate get_cyl_skew(options)
2450Sstevel@tonic-gate ulong_t *options;
2460Sstevel@tonic-gate {
2470Sstevel@tonic-gate u_ioparam_t ioparam;
2480Sstevel@tonic-gate int deflt;
2490Sstevel@tonic-gate
2500Sstevel@tonic-gate ioparam.io_bounds.lower = 0;
2510Sstevel@tonic-gate ioparam.io_bounds.upper = INFINITY;
2520Sstevel@tonic-gate if (input(FIO_OPINT, "Enter cylinder skew", ':',
2530Sstevel@tonic-gate &ioparam, &deflt, DATA_INPUT)) {
2540Sstevel@tonic-gate *options |= SUP_CYLSKEW;
2550Sstevel@tonic-gate return (deflt);
2560Sstevel@tonic-gate }
2570Sstevel@tonic-gate return (0);
2580Sstevel@tonic-gate }
2590Sstevel@tonic-gate
2600Sstevel@tonic-gate /*
2610Sstevel@tonic-gate * Prompt for track skew
2620Sstevel@tonic-gate */
2630Sstevel@tonic-gate int
get_trk_skew(options)2640Sstevel@tonic-gate get_trk_skew(options)
2650Sstevel@tonic-gate ulong_t *options;
2660Sstevel@tonic-gate {
2670Sstevel@tonic-gate u_ioparam_t ioparam;
2680Sstevel@tonic-gate int deflt;
2690Sstevel@tonic-gate
2700Sstevel@tonic-gate ioparam.io_bounds.lower = 0;
2710Sstevel@tonic-gate ioparam.io_bounds.upper = INFINITY;
2720Sstevel@tonic-gate if (input(FIO_OPINT, "Enter track skew", ':',
2730Sstevel@tonic-gate &ioparam, &deflt, DATA_INPUT)) {
2740Sstevel@tonic-gate *options |= SUP_TRKSKEW;
2750Sstevel@tonic-gate return (deflt);
2760Sstevel@tonic-gate }
2770Sstevel@tonic-gate return (0);
2780Sstevel@tonic-gate }
2790Sstevel@tonic-gate
2800Sstevel@tonic-gate /*
2810Sstevel@tonic-gate * Prompt for tracks per zone
2820Sstevel@tonic-gate */
2830Sstevel@tonic-gate int
get_trks_zone(options)2840Sstevel@tonic-gate get_trks_zone(options)
2850Sstevel@tonic-gate ulong_t *options;
2860Sstevel@tonic-gate {
2870Sstevel@tonic-gate u_ioparam_t ioparam;
2880Sstevel@tonic-gate int deflt;
2890Sstevel@tonic-gate
2900Sstevel@tonic-gate ioparam.io_bounds.lower = 0;
2910Sstevel@tonic-gate ioparam.io_bounds.upper = INFINITY;
2920Sstevel@tonic-gate if (input(FIO_OPINT, "Enter tracks per zone", ':',
2930Sstevel@tonic-gate &ioparam, &deflt, DATA_INPUT)) {
2940Sstevel@tonic-gate *options |= SUP_TRKS_ZONE;
2950Sstevel@tonic-gate return (deflt);
2960Sstevel@tonic-gate }
2970Sstevel@tonic-gate return (0);
2980Sstevel@tonic-gate }
2990Sstevel@tonic-gate
3000Sstevel@tonic-gate /*
3010Sstevel@tonic-gate * Prompt for alternate tracks
3020Sstevel@tonic-gate */
3030Sstevel@tonic-gate int
get_atrks(options)3040Sstevel@tonic-gate get_atrks(options)
3050Sstevel@tonic-gate ulong_t *options;
3060Sstevel@tonic-gate {
3070Sstevel@tonic-gate u_ioparam_t ioparam;
3080Sstevel@tonic-gate int deflt;
3090Sstevel@tonic-gate
3100Sstevel@tonic-gate ioparam.io_bounds.lower = 0;
3110Sstevel@tonic-gate ioparam.io_bounds.upper = INFINITY;
3120Sstevel@tonic-gate if (input(FIO_OPINT, "Enter alternate tracks", ':',
3130Sstevel@tonic-gate &ioparam, &deflt, DATA_INPUT)) {
3140Sstevel@tonic-gate *options |= SUP_ATRKS;
3150Sstevel@tonic-gate return (deflt);
3160Sstevel@tonic-gate }
3170Sstevel@tonic-gate return (0);
3180Sstevel@tonic-gate }
3190Sstevel@tonic-gate
3200Sstevel@tonic-gate /*
3210Sstevel@tonic-gate * Prompt for alternate sectors
3220Sstevel@tonic-gate */
3230Sstevel@tonic-gate int
get_asect(options)3240Sstevel@tonic-gate get_asect(options)
3250Sstevel@tonic-gate ulong_t *options;
3260Sstevel@tonic-gate {
3270Sstevel@tonic-gate u_ioparam_t ioparam;
3280Sstevel@tonic-gate int deflt;
3290Sstevel@tonic-gate
3300Sstevel@tonic-gate ioparam.io_bounds.lower = 0;
3310Sstevel@tonic-gate ioparam.io_bounds.upper = INFINITY;
3320Sstevel@tonic-gate if (input(FIO_OPINT, "Enter alternate sectors", ':',
3330Sstevel@tonic-gate &ioparam, &deflt, DATA_INPUT)) {
3340Sstevel@tonic-gate *options |= SUP_ASECT;
3350Sstevel@tonic-gate return (deflt);
3360Sstevel@tonic-gate }
3370Sstevel@tonic-gate return (0);
3380Sstevel@tonic-gate }
3390Sstevel@tonic-gate
3400Sstevel@tonic-gate /*
3410Sstevel@tonic-gate * Prompt for cache setting
3420Sstevel@tonic-gate */
3430Sstevel@tonic-gate int
get_cache(options)3440Sstevel@tonic-gate get_cache(options)
3450Sstevel@tonic-gate ulong_t *options;
3460Sstevel@tonic-gate {
3470Sstevel@tonic-gate u_ioparam_t ioparam;
3480Sstevel@tonic-gate int deflt;
3490Sstevel@tonic-gate
3500Sstevel@tonic-gate ioparam.io_bounds.lower = 0;
3510Sstevel@tonic-gate ioparam.io_bounds.upper = 0xff;
3520Sstevel@tonic-gate if (input(FIO_OPINT, "Enter cache control", ':',
3530Sstevel@tonic-gate &ioparam, &deflt, DATA_INPUT)) {
3540Sstevel@tonic-gate *options |= SUP_CACHE;
3550Sstevel@tonic-gate return (deflt);
3560Sstevel@tonic-gate }
3570Sstevel@tonic-gate return (0);
3580Sstevel@tonic-gate }
3590Sstevel@tonic-gate
3600Sstevel@tonic-gate /*
3610Sstevel@tonic-gate * Prompt for prefetch threshold
3620Sstevel@tonic-gate */
3630Sstevel@tonic-gate int
get_threshold(options)3640Sstevel@tonic-gate get_threshold(options)
3650Sstevel@tonic-gate ulong_t *options;
3660Sstevel@tonic-gate {
3670Sstevel@tonic-gate u_ioparam_t ioparam;
3680Sstevel@tonic-gate int deflt;
3690Sstevel@tonic-gate
3700Sstevel@tonic-gate ioparam.io_bounds.lower = 0;
3710Sstevel@tonic-gate ioparam.io_bounds.upper = INFINITY;
3720Sstevel@tonic-gate if (input(FIO_OPINT, "Enter prefetch threshold",
3730Sstevel@tonic-gate ':', &ioparam, &deflt, DATA_INPUT)) {
3740Sstevel@tonic-gate *options |= SUP_PREFETCH;
3750Sstevel@tonic-gate return (deflt);
3760Sstevel@tonic-gate }
3770Sstevel@tonic-gate return (0);
3780Sstevel@tonic-gate }
3790Sstevel@tonic-gate
3800Sstevel@tonic-gate /*
3810Sstevel@tonic-gate * Prompt for minimum prefetch
3820Sstevel@tonic-gate */
3830Sstevel@tonic-gate int
get_min_prefetch(options)3840Sstevel@tonic-gate get_min_prefetch(options)
3850Sstevel@tonic-gate ulong_t *options;
3860Sstevel@tonic-gate {
3870Sstevel@tonic-gate u_ioparam_t ioparam;
3880Sstevel@tonic-gate int deflt;
3890Sstevel@tonic-gate
3900Sstevel@tonic-gate ioparam.io_bounds.lower = 0;
3910Sstevel@tonic-gate ioparam.io_bounds.upper = INFINITY;
3920Sstevel@tonic-gate if (input(FIO_OPINT, "Enter minimum prefetch",
3930Sstevel@tonic-gate ':', &ioparam, &deflt, DATA_INPUT)) {
3940Sstevel@tonic-gate *options |= SUP_CACHE_MIN;
3950Sstevel@tonic-gate return (deflt);
3960Sstevel@tonic-gate }
3970Sstevel@tonic-gate return (0);
3980Sstevel@tonic-gate }
3990Sstevel@tonic-gate
4000Sstevel@tonic-gate /*
4010Sstevel@tonic-gate * Prompt for maximum prefetch
4020Sstevel@tonic-gate */
4030Sstevel@tonic-gate int
get_max_prefetch(min_prefetch,options)4040Sstevel@tonic-gate get_max_prefetch(min_prefetch, options)
4050Sstevel@tonic-gate int min_prefetch;
4060Sstevel@tonic-gate ulong_t *options;
4070Sstevel@tonic-gate {
4080Sstevel@tonic-gate u_ioparam_t ioparam;
4090Sstevel@tonic-gate int deflt;
4100Sstevel@tonic-gate
4110Sstevel@tonic-gate ioparam.io_bounds.lower = min_prefetch;
4120Sstevel@tonic-gate ioparam.io_bounds.upper = INFINITY;
4130Sstevel@tonic-gate if (input(FIO_OPINT, "Enter maximum prefetch",
4140Sstevel@tonic-gate ':', &ioparam, &deflt, DATA_INPUT)) {
4150Sstevel@tonic-gate *options |= SUP_CACHE_MAX;
4160Sstevel@tonic-gate return (deflt);
4170Sstevel@tonic-gate }
4180Sstevel@tonic-gate return (0);
4190Sstevel@tonic-gate }
4200Sstevel@tonic-gate
4210Sstevel@tonic-gate /*
4220Sstevel@tonic-gate * Prompt for bytes per sector
4230Sstevel@tonic-gate */
4240Sstevel@tonic-gate int
get_bps()4250Sstevel@tonic-gate get_bps()
4260Sstevel@tonic-gate {
4270Sstevel@tonic-gate u_ioparam_t ioparam;
4280Sstevel@tonic-gate int deflt;
4290Sstevel@tonic-gate
4300Sstevel@tonic-gate if (cur_ctype->ctype_flags & CF_SMD_DEFS) {
4310Sstevel@tonic-gate ioparam.io_bounds.lower = MIN_BPS;
4320Sstevel@tonic-gate ioparam.io_bounds.upper = MAX_BPS;
4330Sstevel@tonic-gate deflt = AVG_BPS;
4340Sstevel@tonic-gate return (input(FIO_INT, "Enter bytes per sector",
435*9889SLarry.Liu@Sun.COM ':', &ioparam, &deflt, DATA_INPUT));
4360Sstevel@tonic-gate }
4370Sstevel@tonic-gate
4380Sstevel@tonic-gate return (0);
4390Sstevel@tonic-gate }
4400Sstevel@tonic-gate
4410Sstevel@tonic-gate /*
4420Sstevel@tonic-gate * Prompt for ascii label
4430Sstevel@tonic-gate */
4440Sstevel@tonic-gate char *
get_asciilabel()4450Sstevel@tonic-gate get_asciilabel()
4460Sstevel@tonic-gate {
447362Sbg159949 return ((char *)(uintptr_t)input(FIO_OSTR,
4480Sstevel@tonic-gate "Enter disk type name (remember quotes)", ':',
4490Sstevel@tonic-gate (u_ioparam_t *)NULL, (int *)NULL, DATA_INPUT));
4500Sstevel@tonic-gate }
451