1*0Sstevel@tonic-gate /* 2*0Sstevel@tonic-gate * CDDL HEADER START 3*0Sstevel@tonic-gate * 4*0Sstevel@tonic-gate * The contents of this file are subject to the terms of the 5*0Sstevel@tonic-gate * Common Development and Distribution License, Version 1.0 only 6*0Sstevel@tonic-gate * (the "License"). You may not use this file except in compliance 7*0Sstevel@tonic-gate * with the License. 8*0Sstevel@tonic-gate * 9*0Sstevel@tonic-gate * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 10*0Sstevel@tonic-gate * or http://www.opensolaris.org/os/licensing. 11*0Sstevel@tonic-gate * See the License for the specific language governing permissions 12*0Sstevel@tonic-gate * and limitations under the License. 13*0Sstevel@tonic-gate * 14*0Sstevel@tonic-gate * When distributing Covered Code, include this CDDL HEADER in each 15*0Sstevel@tonic-gate * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 16*0Sstevel@tonic-gate * If applicable, add the following below this CDDL HEADER, with the 17*0Sstevel@tonic-gate * fields enclosed by brackets "[]" replaced with your own identifying 18*0Sstevel@tonic-gate * information: Portions Copyright [yyyy] [name of copyright owner] 19*0Sstevel@tonic-gate * 20*0Sstevel@tonic-gate * CDDL HEADER END 21*0Sstevel@tonic-gate */ 22*0Sstevel@tonic-gate /* 23*0Sstevel@tonic-gate * Copyright 1991, 2001-2002 Sun Microsystems, Inc. All rights reserved. 24*0Sstevel@tonic-gate * Use is subject to license terms. 25*0Sstevel@tonic-gate */ 26*0Sstevel@tonic-gate 27*0Sstevel@tonic-gate #pragma ident "%Z%%M% %I% %E% SMI" 28*0Sstevel@tonic-gate 29*0Sstevel@tonic-gate /* 30*0Sstevel@tonic-gate * This file contains functions to prompt the user for various 31*0Sstevel@tonic-gate * disk characteristics. By isolating these into functions, 32*0Sstevel@tonic-gate * we can guarantee that prompts, defaults, etc are identical. 33*0Sstevel@tonic-gate */ 34*0Sstevel@tonic-gate #include "global.h" 35*0Sstevel@tonic-gate #include "prompts.h" 36*0Sstevel@tonic-gate #include "io.h" 37*0Sstevel@tonic-gate #include "param.h" 38*0Sstevel@tonic-gate #include "startup.h" 39*0Sstevel@tonic-gate 40*0Sstevel@tonic-gate #ifdef sparc 41*0Sstevel@tonic-gate #include <sys/hdio.h> 42*0Sstevel@tonic-gate #endif 43*0Sstevel@tonic-gate 44*0Sstevel@tonic-gate 45*0Sstevel@tonic-gate /* 46*0Sstevel@tonic-gate * Prompt for max number of LBA 47*0Sstevel@tonic-gate */ 48*0Sstevel@tonic-gate uint64_t 49*0Sstevel@tonic-gate get_mlba() 50*0Sstevel@tonic-gate { 51*0Sstevel@tonic-gate u_ioparam_t ioparam; 52*0Sstevel@tonic-gate 53*0Sstevel@tonic-gate ioparam.io_bounds.lower = (1024 * 16) + 68; 54*0Sstevel@tonic-gate ioparam.io_bounds.upper = UINT_MAX64; 55*0Sstevel@tonic-gate 56*0Sstevel@tonic-gate return (input(FIO_INT64, "Enter maximum number of LBAs", 57*0Sstevel@tonic-gate ':', &ioparam, (int *)NULL, DATA_INPUT)); 58*0Sstevel@tonic-gate } 59*0Sstevel@tonic-gate 60*0Sstevel@tonic-gate /* 61*0Sstevel@tonic-gate * Prompt for number of cylinders 62*0Sstevel@tonic-gate */ 63*0Sstevel@tonic-gate int 64*0Sstevel@tonic-gate get_ncyl() 65*0Sstevel@tonic-gate { 66*0Sstevel@tonic-gate u_ioparam_t ioparam; 67*0Sstevel@tonic-gate 68*0Sstevel@tonic-gate ioparam.io_bounds.lower = 1; 69*0Sstevel@tonic-gate ioparam.io_bounds.upper = MAX_CYLS; 70*0Sstevel@tonic-gate return (input(FIO_INT, "Enter number of data cylinders", 71*0Sstevel@tonic-gate ':', &ioparam, (int *)NULL, DATA_INPUT)); 72*0Sstevel@tonic-gate } 73*0Sstevel@tonic-gate 74*0Sstevel@tonic-gate /* 75*0Sstevel@tonic-gate * Prompt for number of alternate cylinders 76*0Sstevel@tonic-gate */ 77*0Sstevel@tonic-gate int 78*0Sstevel@tonic-gate get_acyl(n_cyls) 79*0Sstevel@tonic-gate int n_cyls; 80*0Sstevel@tonic-gate { 81*0Sstevel@tonic-gate u_ioparam_t ioparam; 82*0Sstevel@tonic-gate int deflt; 83*0Sstevel@tonic-gate 84*0Sstevel@tonic-gate ioparam.io_bounds.lower = 2; 85*0Sstevel@tonic-gate ioparam.io_bounds.upper = MAX_CYLS - n_cyls; 86*0Sstevel@tonic-gate deflt = 2; 87*0Sstevel@tonic-gate return (input(FIO_INT, "Enter number of alternate cylinders", ':', 88*0Sstevel@tonic-gate &ioparam, &deflt, DATA_INPUT)); 89*0Sstevel@tonic-gate } 90*0Sstevel@tonic-gate 91*0Sstevel@tonic-gate /* 92*0Sstevel@tonic-gate * Prompt for number of physical cylinders 93*0Sstevel@tonic-gate */ 94*0Sstevel@tonic-gate int 95*0Sstevel@tonic-gate get_pcyl(n_cyls, a_cyls) 96*0Sstevel@tonic-gate int n_cyls; 97*0Sstevel@tonic-gate int a_cyls; 98*0Sstevel@tonic-gate { 99*0Sstevel@tonic-gate u_ioparam_t ioparam; 100*0Sstevel@tonic-gate int deflt; 101*0Sstevel@tonic-gate 102*0Sstevel@tonic-gate ioparam.io_bounds.lower = n_cyls + a_cyls; 103*0Sstevel@tonic-gate ioparam.io_bounds.upper = MAX_CYLS; 104*0Sstevel@tonic-gate deflt = n_cyls + a_cyls; 105*0Sstevel@tonic-gate return (input(FIO_INT, "Enter number of physical cylinders", ':', 106*0Sstevel@tonic-gate &ioparam, &deflt, DATA_INPUT)); 107*0Sstevel@tonic-gate } 108*0Sstevel@tonic-gate 109*0Sstevel@tonic-gate /* 110*0Sstevel@tonic-gate * Prompt for number of heads 111*0Sstevel@tonic-gate */ 112*0Sstevel@tonic-gate int 113*0Sstevel@tonic-gate get_nhead() 114*0Sstevel@tonic-gate { 115*0Sstevel@tonic-gate u_ioparam_t ioparam; 116*0Sstevel@tonic-gate 117*0Sstevel@tonic-gate ioparam.io_bounds.lower = 1; 118*0Sstevel@tonic-gate ioparam.io_bounds.upper = MAX_HEADS; 119*0Sstevel@tonic-gate return (input(FIO_INT, "Enter number of heads", ':', 120*0Sstevel@tonic-gate &ioparam, (int *)NULL, DATA_INPUT)); 121*0Sstevel@tonic-gate } 122*0Sstevel@tonic-gate 123*0Sstevel@tonic-gate /* 124*0Sstevel@tonic-gate * Prompt for number of physical heads 125*0Sstevel@tonic-gate */ 126*0Sstevel@tonic-gate int 127*0Sstevel@tonic-gate get_phead(n_heads, options) 128*0Sstevel@tonic-gate int n_heads; 129*0Sstevel@tonic-gate ulong_t *options; 130*0Sstevel@tonic-gate { 131*0Sstevel@tonic-gate u_ioparam_t ioparam; 132*0Sstevel@tonic-gate int deflt; 133*0Sstevel@tonic-gate 134*0Sstevel@tonic-gate if (SCSI) { 135*0Sstevel@tonic-gate ioparam.io_bounds.lower = n_heads; 136*0Sstevel@tonic-gate ioparam.io_bounds.upper = INFINITY; 137*0Sstevel@tonic-gate if (input(FIO_OPINT, "Enter physical number of heads", 138*0Sstevel@tonic-gate ':', &ioparam, &deflt, DATA_INPUT)) { 139*0Sstevel@tonic-gate *options |= SUP_PHEAD; 140*0Sstevel@tonic-gate return (deflt); 141*0Sstevel@tonic-gate } 142*0Sstevel@tonic-gate } 143*0Sstevel@tonic-gate return (0); 144*0Sstevel@tonic-gate } 145*0Sstevel@tonic-gate 146*0Sstevel@tonic-gate 147*0Sstevel@tonic-gate /* 148*0Sstevel@tonic-gate * Prompt for number of sectors per track 149*0Sstevel@tonic-gate */ 150*0Sstevel@tonic-gate int 151*0Sstevel@tonic-gate get_nsect() 152*0Sstevel@tonic-gate { 153*0Sstevel@tonic-gate u_ioparam_t ioparam; 154*0Sstevel@tonic-gate 155*0Sstevel@tonic-gate ioparam.io_bounds.lower = 1; 156*0Sstevel@tonic-gate ioparam.io_bounds.upper = MAX_SECTS; 157*0Sstevel@tonic-gate return (input(FIO_INT, 158*0Sstevel@tonic-gate "Enter number of data sectors/track", ':', 159*0Sstevel@tonic-gate &ioparam, (int *)NULL, DATA_INPUT)); 160*0Sstevel@tonic-gate } 161*0Sstevel@tonic-gate 162*0Sstevel@tonic-gate /* 163*0Sstevel@tonic-gate * Prompt for number of physical sectors per track 164*0Sstevel@tonic-gate */ 165*0Sstevel@tonic-gate int 166*0Sstevel@tonic-gate get_psect(options) 167*0Sstevel@tonic-gate ulong_t *options; 168*0Sstevel@tonic-gate { 169*0Sstevel@tonic-gate u_ioparam_t ioparam; 170*0Sstevel@tonic-gate int deflt; 171*0Sstevel@tonic-gate 172*0Sstevel@tonic-gate if (SCSI) { 173*0Sstevel@tonic-gate ioparam.io_bounds.lower = 0; 174*0Sstevel@tonic-gate ioparam.io_bounds.upper = INFINITY; 175*0Sstevel@tonic-gate if (input(FIO_OPINT, "Enter number of physical sectors/track", 176*0Sstevel@tonic-gate ':', &ioparam, &deflt, DATA_INPUT)) { 177*0Sstevel@tonic-gate *options |= SUP_PSECT; 178*0Sstevel@tonic-gate return (deflt); 179*0Sstevel@tonic-gate } 180*0Sstevel@tonic-gate } 181*0Sstevel@tonic-gate return (0); 182*0Sstevel@tonic-gate } 183*0Sstevel@tonic-gate 184*0Sstevel@tonic-gate /* 185*0Sstevel@tonic-gate * Prompt for bytes per track 186*0Sstevel@tonic-gate */ 187*0Sstevel@tonic-gate int 188*0Sstevel@tonic-gate get_bpt(n_sects, options) 189*0Sstevel@tonic-gate int n_sects; 190*0Sstevel@tonic-gate ulong_t *options; 191*0Sstevel@tonic-gate { 192*0Sstevel@tonic-gate u_ioparam_t ioparam; 193*0Sstevel@tonic-gate int deflt; 194*0Sstevel@tonic-gate 195*0Sstevel@tonic-gate if (SMD) { 196*0Sstevel@tonic-gate *options |= SUP_BPT; 197*0Sstevel@tonic-gate ioparam.io_bounds.lower = 1; 198*0Sstevel@tonic-gate ioparam.io_bounds.upper = INFINITY; 199*0Sstevel@tonic-gate deflt = n_sects * SECSIZE; 200*0Sstevel@tonic-gate return (input(FIO_INT, "Enter number of bytes/track", 201*0Sstevel@tonic-gate ':', &ioparam, &deflt, DATA_INPUT)); 202*0Sstevel@tonic-gate } 203*0Sstevel@tonic-gate 204*0Sstevel@tonic-gate return (0); 205*0Sstevel@tonic-gate } 206*0Sstevel@tonic-gate 207*0Sstevel@tonic-gate /* 208*0Sstevel@tonic-gate * Prompt for rpm 209*0Sstevel@tonic-gate */ 210*0Sstevel@tonic-gate int 211*0Sstevel@tonic-gate get_rpm() 212*0Sstevel@tonic-gate { 213*0Sstevel@tonic-gate u_ioparam_t ioparam; 214*0Sstevel@tonic-gate int deflt; 215*0Sstevel@tonic-gate 216*0Sstevel@tonic-gate ioparam.io_bounds.lower = MIN_RPM; 217*0Sstevel@tonic-gate ioparam.io_bounds.upper = MAX_RPM; 218*0Sstevel@tonic-gate deflt = AVG_RPM; 219*0Sstevel@tonic-gate return (input(FIO_INT, "Enter rpm of drive", ':', 220*0Sstevel@tonic-gate &ioparam, &deflt, DATA_INPUT)); 221*0Sstevel@tonic-gate } 222*0Sstevel@tonic-gate 223*0Sstevel@tonic-gate /* 224*0Sstevel@tonic-gate * Prompt for formatting time 225*0Sstevel@tonic-gate */ 226*0Sstevel@tonic-gate int 227*0Sstevel@tonic-gate get_fmt_time(options) 228*0Sstevel@tonic-gate ulong_t *options; 229*0Sstevel@tonic-gate { 230*0Sstevel@tonic-gate u_ioparam_t ioparam; 231*0Sstevel@tonic-gate int deflt; 232*0Sstevel@tonic-gate 233*0Sstevel@tonic-gate ioparam.io_bounds.lower = 0; 234*0Sstevel@tonic-gate ioparam.io_bounds.upper = INFINITY; 235*0Sstevel@tonic-gate if (input(FIO_OPINT, "Enter format time", ':', 236*0Sstevel@tonic-gate &ioparam, &deflt, DATA_INPUT)) { 237*0Sstevel@tonic-gate *options |= SUP_FMTTIME; 238*0Sstevel@tonic-gate return (deflt); 239*0Sstevel@tonic-gate } 240*0Sstevel@tonic-gate return (0); 241*0Sstevel@tonic-gate } 242*0Sstevel@tonic-gate 243*0Sstevel@tonic-gate /* 244*0Sstevel@tonic-gate * Prompt for cylinder skew 245*0Sstevel@tonic-gate */ 246*0Sstevel@tonic-gate int 247*0Sstevel@tonic-gate get_cyl_skew(options) 248*0Sstevel@tonic-gate ulong_t *options; 249*0Sstevel@tonic-gate { 250*0Sstevel@tonic-gate u_ioparam_t ioparam; 251*0Sstevel@tonic-gate int deflt; 252*0Sstevel@tonic-gate 253*0Sstevel@tonic-gate ioparam.io_bounds.lower = 0; 254*0Sstevel@tonic-gate ioparam.io_bounds.upper = INFINITY; 255*0Sstevel@tonic-gate if (input(FIO_OPINT, "Enter cylinder skew", ':', 256*0Sstevel@tonic-gate &ioparam, &deflt, DATA_INPUT)) { 257*0Sstevel@tonic-gate *options |= SUP_CYLSKEW; 258*0Sstevel@tonic-gate return (deflt); 259*0Sstevel@tonic-gate } 260*0Sstevel@tonic-gate return (0); 261*0Sstevel@tonic-gate } 262*0Sstevel@tonic-gate 263*0Sstevel@tonic-gate /* 264*0Sstevel@tonic-gate * Prompt for track skew 265*0Sstevel@tonic-gate */ 266*0Sstevel@tonic-gate int 267*0Sstevel@tonic-gate get_trk_skew(options) 268*0Sstevel@tonic-gate ulong_t *options; 269*0Sstevel@tonic-gate { 270*0Sstevel@tonic-gate u_ioparam_t ioparam; 271*0Sstevel@tonic-gate int deflt; 272*0Sstevel@tonic-gate 273*0Sstevel@tonic-gate ioparam.io_bounds.lower = 0; 274*0Sstevel@tonic-gate ioparam.io_bounds.upper = INFINITY; 275*0Sstevel@tonic-gate if (input(FIO_OPINT, "Enter track skew", ':', 276*0Sstevel@tonic-gate &ioparam, &deflt, DATA_INPUT)) { 277*0Sstevel@tonic-gate *options |= SUP_TRKSKEW; 278*0Sstevel@tonic-gate return (deflt); 279*0Sstevel@tonic-gate } 280*0Sstevel@tonic-gate return (0); 281*0Sstevel@tonic-gate } 282*0Sstevel@tonic-gate 283*0Sstevel@tonic-gate /* 284*0Sstevel@tonic-gate * Prompt for tracks per zone 285*0Sstevel@tonic-gate */ 286*0Sstevel@tonic-gate int 287*0Sstevel@tonic-gate get_trks_zone(options) 288*0Sstevel@tonic-gate ulong_t *options; 289*0Sstevel@tonic-gate { 290*0Sstevel@tonic-gate u_ioparam_t ioparam; 291*0Sstevel@tonic-gate int deflt; 292*0Sstevel@tonic-gate 293*0Sstevel@tonic-gate ioparam.io_bounds.lower = 0; 294*0Sstevel@tonic-gate ioparam.io_bounds.upper = INFINITY; 295*0Sstevel@tonic-gate if (input(FIO_OPINT, "Enter tracks per zone", ':', 296*0Sstevel@tonic-gate &ioparam, &deflt, DATA_INPUT)) { 297*0Sstevel@tonic-gate *options |= SUP_TRKS_ZONE; 298*0Sstevel@tonic-gate return (deflt); 299*0Sstevel@tonic-gate } 300*0Sstevel@tonic-gate return (0); 301*0Sstevel@tonic-gate } 302*0Sstevel@tonic-gate 303*0Sstevel@tonic-gate /* 304*0Sstevel@tonic-gate * Prompt for alternate tracks 305*0Sstevel@tonic-gate */ 306*0Sstevel@tonic-gate int 307*0Sstevel@tonic-gate get_atrks(options) 308*0Sstevel@tonic-gate ulong_t *options; 309*0Sstevel@tonic-gate { 310*0Sstevel@tonic-gate u_ioparam_t ioparam; 311*0Sstevel@tonic-gate int deflt; 312*0Sstevel@tonic-gate 313*0Sstevel@tonic-gate ioparam.io_bounds.lower = 0; 314*0Sstevel@tonic-gate ioparam.io_bounds.upper = INFINITY; 315*0Sstevel@tonic-gate if (input(FIO_OPINT, "Enter alternate tracks", ':', 316*0Sstevel@tonic-gate &ioparam, &deflt, DATA_INPUT)) { 317*0Sstevel@tonic-gate *options |= SUP_ATRKS; 318*0Sstevel@tonic-gate return (deflt); 319*0Sstevel@tonic-gate } 320*0Sstevel@tonic-gate return (0); 321*0Sstevel@tonic-gate } 322*0Sstevel@tonic-gate 323*0Sstevel@tonic-gate /* 324*0Sstevel@tonic-gate * Prompt for alternate sectors 325*0Sstevel@tonic-gate */ 326*0Sstevel@tonic-gate int 327*0Sstevel@tonic-gate get_asect(options) 328*0Sstevel@tonic-gate ulong_t *options; 329*0Sstevel@tonic-gate { 330*0Sstevel@tonic-gate u_ioparam_t ioparam; 331*0Sstevel@tonic-gate int deflt; 332*0Sstevel@tonic-gate 333*0Sstevel@tonic-gate ioparam.io_bounds.lower = 0; 334*0Sstevel@tonic-gate ioparam.io_bounds.upper = INFINITY; 335*0Sstevel@tonic-gate if (input(FIO_OPINT, "Enter alternate sectors", ':', 336*0Sstevel@tonic-gate &ioparam, &deflt, DATA_INPUT)) { 337*0Sstevel@tonic-gate *options |= SUP_ASECT; 338*0Sstevel@tonic-gate return (deflt); 339*0Sstevel@tonic-gate } 340*0Sstevel@tonic-gate return (0); 341*0Sstevel@tonic-gate } 342*0Sstevel@tonic-gate 343*0Sstevel@tonic-gate /* 344*0Sstevel@tonic-gate * Prompt for cache setting 345*0Sstevel@tonic-gate */ 346*0Sstevel@tonic-gate int 347*0Sstevel@tonic-gate get_cache(options) 348*0Sstevel@tonic-gate ulong_t *options; 349*0Sstevel@tonic-gate { 350*0Sstevel@tonic-gate u_ioparam_t ioparam; 351*0Sstevel@tonic-gate int deflt; 352*0Sstevel@tonic-gate 353*0Sstevel@tonic-gate ioparam.io_bounds.lower = 0; 354*0Sstevel@tonic-gate ioparam.io_bounds.upper = 0xff; 355*0Sstevel@tonic-gate if (input(FIO_OPINT, "Enter cache control", ':', 356*0Sstevel@tonic-gate &ioparam, &deflt, DATA_INPUT)) { 357*0Sstevel@tonic-gate *options |= SUP_CACHE; 358*0Sstevel@tonic-gate return (deflt); 359*0Sstevel@tonic-gate } 360*0Sstevel@tonic-gate return (0); 361*0Sstevel@tonic-gate } 362*0Sstevel@tonic-gate 363*0Sstevel@tonic-gate /* 364*0Sstevel@tonic-gate * Prompt for prefetch threshold 365*0Sstevel@tonic-gate */ 366*0Sstevel@tonic-gate int 367*0Sstevel@tonic-gate get_threshold(options) 368*0Sstevel@tonic-gate ulong_t *options; 369*0Sstevel@tonic-gate { 370*0Sstevel@tonic-gate u_ioparam_t ioparam; 371*0Sstevel@tonic-gate int deflt; 372*0Sstevel@tonic-gate 373*0Sstevel@tonic-gate ioparam.io_bounds.lower = 0; 374*0Sstevel@tonic-gate ioparam.io_bounds.upper = INFINITY; 375*0Sstevel@tonic-gate if (input(FIO_OPINT, "Enter prefetch threshold", 376*0Sstevel@tonic-gate ':', &ioparam, &deflt, DATA_INPUT)) { 377*0Sstevel@tonic-gate *options |= SUP_PREFETCH; 378*0Sstevel@tonic-gate return (deflt); 379*0Sstevel@tonic-gate } 380*0Sstevel@tonic-gate return (0); 381*0Sstevel@tonic-gate } 382*0Sstevel@tonic-gate 383*0Sstevel@tonic-gate /* 384*0Sstevel@tonic-gate * Prompt for minimum prefetch 385*0Sstevel@tonic-gate */ 386*0Sstevel@tonic-gate int 387*0Sstevel@tonic-gate get_min_prefetch(options) 388*0Sstevel@tonic-gate ulong_t *options; 389*0Sstevel@tonic-gate { 390*0Sstevel@tonic-gate u_ioparam_t ioparam; 391*0Sstevel@tonic-gate int deflt; 392*0Sstevel@tonic-gate 393*0Sstevel@tonic-gate ioparam.io_bounds.lower = 0; 394*0Sstevel@tonic-gate ioparam.io_bounds.upper = INFINITY; 395*0Sstevel@tonic-gate if (input(FIO_OPINT, "Enter minimum prefetch", 396*0Sstevel@tonic-gate ':', &ioparam, &deflt, DATA_INPUT)) { 397*0Sstevel@tonic-gate *options |= SUP_CACHE_MIN; 398*0Sstevel@tonic-gate return (deflt); 399*0Sstevel@tonic-gate } 400*0Sstevel@tonic-gate return (0); 401*0Sstevel@tonic-gate } 402*0Sstevel@tonic-gate 403*0Sstevel@tonic-gate /* 404*0Sstevel@tonic-gate * Prompt for maximum prefetch 405*0Sstevel@tonic-gate */ 406*0Sstevel@tonic-gate int 407*0Sstevel@tonic-gate get_max_prefetch(min_prefetch, options) 408*0Sstevel@tonic-gate int min_prefetch; 409*0Sstevel@tonic-gate ulong_t *options; 410*0Sstevel@tonic-gate { 411*0Sstevel@tonic-gate u_ioparam_t ioparam; 412*0Sstevel@tonic-gate int deflt; 413*0Sstevel@tonic-gate 414*0Sstevel@tonic-gate ioparam.io_bounds.lower = min_prefetch; 415*0Sstevel@tonic-gate ioparam.io_bounds.upper = INFINITY; 416*0Sstevel@tonic-gate if (input(FIO_OPINT, "Enter maximum prefetch", 417*0Sstevel@tonic-gate ':', &ioparam, &deflt, DATA_INPUT)) { 418*0Sstevel@tonic-gate *options |= SUP_CACHE_MAX; 419*0Sstevel@tonic-gate return (deflt); 420*0Sstevel@tonic-gate } 421*0Sstevel@tonic-gate return (0); 422*0Sstevel@tonic-gate } 423*0Sstevel@tonic-gate 424*0Sstevel@tonic-gate /* 425*0Sstevel@tonic-gate * Prompt for bytes per sector 426*0Sstevel@tonic-gate */ 427*0Sstevel@tonic-gate int 428*0Sstevel@tonic-gate get_bps() 429*0Sstevel@tonic-gate { 430*0Sstevel@tonic-gate u_ioparam_t ioparam; 431*0Sstevel@tonic-gate int deflt; 432*0Sstevel@tonic-gate 433*0Sstevel@tonic-gate if (cur_ctype->ctype_flags & CF_SMD_DEFS) { 434*0Sstevel@tonic-gate ioparam.io_bounds.lower = MIN_BPS; 435*0Sstevel@tonic-gate ioparam.io_bounds.upper = MAX_BPS; 436*0Sstevel@tonic-gate deflt = AVG_BPS; 437*0Sstevel@tonic-gate return (input(FIO_INT, "Enter bytes per sector", 438*0Sstevel@tonic-gate ':', &ioparam, &deflt, DATA_INPUT)); 439*0Sstevel@tonic-gate } 440*0Sstevel@tonic-gate 441*0Sstevel@tonic-gate return (0); 442*0Sstevel@tonic-gate } 443*0Sstevel@tonic-gate 444*0Sstevel@tonic-gate /* 445*0Sstevel@tonic-gate * Prompt for ascii label 446*0Sstevel@tonic-gate */ 447*0Sstevel@tonic-gate char * 448*0Sstevel@tonic-gate get_asciilabel() 449*0Sstevel@tonic-gate { 450*0Sstevel@tonic-gate return ((char *)input(FIO_OSTR, 451*0Sstevel@tonic-gate "Enter disk type name (remember quotes)", ':', 452*0Sstevel@tonic-gate (u_ioparam_t *)NULL, (int *)NULL, DATA_INPUT)); 453*0Sstevel@tonic-gate } 454