179110Sjoerg/* 279110Sjoerg * Copyright (c) 2001 Joerg Wunsch 379110Sjoerg * 479110Sjoerg * All rights reserved. 579110Sjoerg * 679110Sjoerg * Redistribution and use in source and binary forms, with or without 779110Sjoerg * modification, are permitted provided that the following conditions 879110Sjoerg * are met: 979110Sjoerg * 1. Redistributions of source code must retain the above copyright 1079110Sjoerg * notice, this list of conditions and the following disclaimer. 1179110Sjoerg * 2. Redistributions in binary form must reproduce the above copyright 1279110Sjoerg * notice, this list of conditions and the following disclaimer in the 1379110Sjoerg * documentation and/or other materials provided with the distribution. 1479110Sjoerg * 1579110Sjoerg * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY EXPRESS OR 1679110Sjoerg * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 1779110Sjoerg * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 1879110Sjoerg * IN NO EVENT SHALL THE DEVELOPERS BE LIABLE FOR ANY DIRECT, INDIRECT, 1979110Sjoerg * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 2079110Sjoerg * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 2179110Sjoerg * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 2279110Sjoerg * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 2379110Sjoerg * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 2479110Sjoerg * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 2579110Sjoerg * 2679110Sjoerg * $FreeBSD$ 2779110Sjoerg */ 2879110Sjoerg 2987992Sjoerg#include <dev/ic/nec765.h> 3087992Sjoerg 3179110Sjoerg#include <sys/fdcio.h> 3279110Sjoerg 3387992Sjoerg#include <err.h> 3479110Sjoerg#include <stdio.h> 3587992Sjoerg#include <stdlib.h> 3679110Sjoerg#include <string.h> 3787992Sjoerg#include <sysexits.h> 3879110Sjoerg 3979110Sjoerg#include "fdutil.h" 4079110Sjoerg 4187992Sjoerg/* 4287992Sjoerg * Decode the FDC status pointed to by `fdcsp', and print a textual 4387992Sjoerg * translation to stderr. If `terse' is false, the numerical FDC 4487992Sjoerg * register status is printed, too. 4587992Sjoerg */ 4679110Sjoergvoid 4779110Sjoergprintstatus(struct fdc_status *fdcsp, int terse) 4879110Sjoerg{ 4979110Sjoerg char msgbuf[100]; 5079110Sjoerg 5179110Sjoerg if (!terse) 5279110Sjoerg fprintf(stderr, 5379110Sjoerg "\nFDC status ST0=%#x ST1=%#x ST2=%#x C=%u H=%u R=%u N=%u:\n", 5479110Sjoerg fdcsp->status[0] & 0xff, 5579110Sjoerg fdcsp->status[1] & 0xff, 5679110Sjoerg fdcsp->status[2] & 0xff, 5779110Sjoerg fdcsp->status[3] & 0xff, 5879110Sjoerg fdcsp->status[4] & 0xff, 5979110Sjoerg fdcsp->status[5] & 0xff, 6079110Sjoerg fdcsp->status[6] & 0xff); 6179110Sjoerg 62134081Sphk if ((fdcsp->status[0] & NE7_ST0_IC_RC) == 0) { 63134081Sphk sprintf(msgbuf, "timeout"); 64134081Sphk } else if ((fdcsp->status[0] & NE7_ST0_IC_RC) != NE7_ST0_IC_AT) { 6579110Sjoerg sprintf(msgbuf, "unexcpted interrupt code %#x", 6679110Sjoerg fdcsp->status[0] & NE7_ST0_IC_RC); 6779110Sjoerg } else { 6879110Sjoerg strcpy(msgbuf, "unexpected error code in ST1/ST2"); 6979110Sjoerg 7079110Sjoerg if (fdcsp->status[1] & NE7_ST1_EN) 7179110Sjoerg strcpy(msgbuf, "end of cylinder (wrong format)"); 7279110Sjoerg else if (fdcsp->status[1] & NE7_ST1_DE) { 7379110Sjoerg if (fdcsp->status[2] & NE7_ST2_DD) 7479110Sjoerg strcpy(msgbuf, "CRC error in data field"); 7579110Sjoerg else 7679110Sjoerg strcpy(msgbuf, "CRC error in ID field"); 7779110Sjoerg } else if (fdcsp->status[1] & NE7_ST1_MA) { 7879110Sjoerg if (fdcsp->status[2] & NE7_ST2_MD) 7979110Sjoerg strcpy(msgbuf, "no address mark in data field"); 8079110Sjoerg else 8179110Sjoerg strcpy(msgbuf, "no address mark in ID field"); 8279110Sjoerg } else if (fdcsp->status[2] & NE7_ST2_WC) 8379110Sjoerg strcpy(msgbuf, "wrong cylinder (format mismatch)"); 8479110Sjoerg else if (fdcsp->status[1] & NE7_ST1_ND) 8579110Sjoerg strcpy(msgbuf, "no data (sector not found)"); 8679110Sjoerg } 8779110Sjoerg fputs(msgbuf, stderr); 8879110Sjoerg} 8979110Sjoerg 90134081Sphkstatic struct fd_type fd_types_auto[1] = 91134081Sphk { { 0,0,0,0,0,0,0,0,0,0,0,FL_AUTO } }; 92126230Sphk 93127522Snyan 94134081Sphkstatic struct fd_type fd_types_288m[] = { 95274024Snyan#ifndef PC98 96127522Snyan#if 0 97134081Sphk { FDF_3_2880 }, 98127522Snyan#endif 99134081Sphk { FDF_3_1722 }, 100134081Sphk { FDF_3_1476 }, 101134081Sphk { FDF_3_1440 }, 102134081Sphk { FDF_3_1200 }, 103134081Sphk { FDF_3_820 }, 104134081Sphk { FDF_3_800 }, 105134081Sphk { FDF_3_720 }, 106274024Snyan#endif /* !PC98 */ 107139905Sdelphij { 0,0,0,0,0,0,0,0,0,0,0,0 } 108127522Snyan}; 109127522Snyan 110127522Snyanstatic struct fd_type fd_types_144m[] = { 111137459Snyan#ifdef PC98 112134081Sphk { FDF_3_1440 }, 113134081Sphk { FDF_3_1200 }, 114134081Sphk { FDF_3_720 }, 115137459Snyan { FDF_3_360 }, 116137459Snyan { FDF_3_640 }, 117137459Snyan { FDF_3_1230 }, 118139905Sdelphij { 0,0,0,0,0,0,0,0,0,0,0,0 } 119137459Snyan#else 120137459Snyan { FDF_3_1722 }, 121137459Snyan { FDF_3_1476 }, 122137459Snyan { FDF_3_1440 }, 123137459Snyan { FDF_3_1200 }, 124137459Snyan { FDF_3_820 }, 125137459Snyan { FDF_3_800 }, 126137459Snyan { FDF_3_720 }, 127139905Sdelphij { 0,0,0,0,0,0,0,0,0,0,0,0 } 128137459Snyan#endif 129127522Snyan}; 130127522Snyan 131134081Sphkstatic struct fd_type fd_types_12m[] = { 132137459Snyan#ifdef PC98 133134081Sphk { FDF_5_1200 }, 134137459Snyan { FDF_5_720 }, 135137459Snyan { FDF_5_360 }, 136137459Snyan { FDF_5_640 }, 137134081Sphk { FDF_5_1230 }, 138139905Sdelphij { 0,0,0,0,0,0,0,0,0,0,0,0 } 139137459Snyan#else 140137459Snyan { FDF_5_1200 }, 141137459Snyan { FDF_5_1230 }, 142134081Sphk { FDF_5_1480 }, 143134081Sphk { FDF_5_1440 }, 144134081Sphk { FDF_5_820 }, 145134081Sphk { FDF_5_800 }, 146134081Sphk { FDF_5_720 }, 147134081Sphk { FDF_5_360 | FL_2STEP }, 148134081Sphk { FDF_5_640 }, 149139905Sdelphij { 0,0,0,0,0,0,0,0,0,0,0,0 } 150137459Snyan#endif 15187992Sjoerg}; 15287992Sjoerg 15387992Sjoergstatic struct fd_type fd_types_720k[] = 15487992Sjoerg{ 155274024Snyan#ifndef PC98 156134081Sphk { FDF_3_720 }, 157274024Snyan#endif 158139905Sdelphij { 0,0,0,0,0,0,0,0,0,0,0,0 } 15987992Sjoerg}; 16087992Sjoerg 16187992Sjoergstatic struct fd_type fd_types_360k[] = 16287992Sjoerg{ 163274024Snyan#ifndef PC98 164134081Sphk { FDF_5_360 }, 165274024Snyan#endif 166139905Sdelphij { 0,0,0,0,0,0,0,0,0,0,0,0 } 16787992Sjoerg}; 16887992Sjoerg 169127522Snyan 17087992Sjoerg/* 17187992Sjoerg * Parse a format string, and fill in the parameter pointed to by `out'. 17287992Sjoerg * 17387992Sjoerg * sectrac,secsize,datalen,gap,ncyls,speed,heads,f_gap,f_inter,offs2,flags[...] 17487992Sjoerg * 17587992Sjoerg * sectrac = sectors per track 17687992Sjoerg * secsize = sector size in bytes 17787992Sjoerg * datalen = length of sector if secsize == 128 17887992Sjoerg * gap = gap length when reading 17987992Sjoerg * ncyls = number of cylinders 18087992Sjoerg * speed = transfer speed 250/300/500/1000 KB/s 18187992Sjoerg * heads = number of heads 18287992Sjoerg * f_gap = gap length when formatting 18387992Sjoerg * f_inter = sector interleave when formatting 18487992Sjoerg * offs2 = offset of sectors on side 2 18587992Sjoerg * flags = +/-mfm | +/-2step | +/-perpend 18687992Sjoerg * mfm - use MFM recording 18787992Sjoerg * 2step - use 2 steps between cylinders 18887992Sjoerg * perpend - user perpendicular (vertical) recording 18987992Sjoerg * 19087992Sjoerg * Any omitted value will be passed on from parameter `in'. 19187992Sjoerg */ 19287992Sjoergvoid 19387992Sjoergparse_fmt(const char *s, enum fd_drivetype type, 19487992Sjoerg struct fd_type in, struct fd_type *out) 19587992Sjoerg{ 19687992Sjoerg int i, j; 19787992Sjoerg const char *cp; 19887992Sjoerg char *s1; 19987992Sjoerg 20087992Sjoerg *out = in; 20187992Sjoerg 20287992Sjoerg for (i = 0;; i++) { 20387992Sjoerg if (s == 0) 20487992Sjoerg break; 20587992Sjoerg 20687992Sjoerg if ((cp = strchr(s, ',')) == 0) { 20787992Sjoerg s1 = strdup(s); 20887992Sjoerg if (s1 == NULL) 20987992Sjoerg abort(); 21087992Sjoerg s = 0; 21187992Sjoerg } else { 21287992Sjoerg s1 = malloc(cp - s + 1); 21387992Sjoerg if (s1 == NULL) 21487992Sjoerg abort(); 21587992Sjoerg memcpy(s1, s, cp - s); 21687992Sjoerg s1[cp - s] = 0; 21787992Sjoerg 21887992Sjoerg s = cp + 1; 21987992Sjoerg } 22087992Sjoerg if (strlen(s1) == 0) { 22187992Sjoerg free(s1); 22287992Sjoerg continue; 22387992Sjoerg } 22487992Sjoerg 22587992Sjoerg switch (i) { 22687992Sjoerg case 0: /* sectrac */ 22787992Sjoerg if (getnum(s1, &out->sectrac)) 22887992Sjoerg errx(EX_USAGE, 22987992Sjoerg "bad numeric value for sectrac: %s", s1); 23087992Sjoerg break; 23187992Sjoerg 23287992Sjoerg case 1: /* secsize */ 23387992Sjoerg if (getnum(s1, &j)) 23487992Sjoerg errx(EX_USAGE, 23587992Sjoerg "bad numeric value for secsize: %s", s1); 23687992Sjoerg if (j == 128) out->secsize = 0; 23787992Sjoerg else if (j == 256) out->secsize = 1; 23887992Sjoerg else if (j == 512) out->secsize = 2; 23987992Sjoerg else if (j == 1024) out->secsize = 3; 24087992Sjoerg else 24187992Sjoerg errx(EX_USAGE, "bad sector size %d", j); 24287992Sjoerg break; 24387992Sjoerg 24487992Sjoerg case 2: /* datalen */ 24587992Sjoerg if (getnum(s1, &j)) 24687992Sjoerg errx(EX_USAGE, 24787992Sjoerg "bad numeric value for datalen: %s", s1); 24887992Sjoerg if (j >= 256) 24987992Sjoerg errx(EX_USAGE, "bad datalen %d", j); 25087992Sjoerg out->datalen = j; 25187992Sjoerg break; 25287992Sjoerg 25387992Sjoerg case 3: /* gap */ 25487992Sjoerg if (getnum(s1, &out->gap)) 25587992Sjoerg errx(EX_USAGE, 25687992Sjoerg "bad numeric value for gap: %s", s1); 25787992Sjoerg break; 25887992Sjoerg 25987992Sjoerg case 4: /* ncyls */ 26087992Sjoerg if (getnum(s1, &j)) 26187992Sjoerg errx(EX_USAGE, 26287992Sjoerg "bad numeric value for ncyls: %s", s1); 26387992Sjoerg if (j > 85) 26487992Sjoerg errx(EX_USAGE, "bad # of cylinders %d", j); 26587992Sjoerg out->tracks = j; 26687992Sjoerg break; 26787992Sjoerg 26887992Sjoerg case 5: /* speed */ 26987992Sjoerg if (getnum(s1, &j)) 27087992Sjoerg errx(EX_USAGE, 27187992Sjoerg "bad numeric value for speed: %s", s1); 27287992Sjoerg switch (type) { 27387992Sjoerg default: 27487992Sjoerg abort(); /* paranoia */ 27587992Sjoerg 27687992Sjoerg case FDT_360K: 27787992Sjoerg case FDT_720K: 27887992Sjoerg if (j == 250) 27987992Sjoerg out->trans = FDC_250KBPS; 280127522Snyan else 28187992Sjoerg errx(EX_USAGE, "bad speed %d", j); 28287992Sjoerg break; 28387992Sjoerg 28487992Sjoerg case FDT_12M: 28587992Sjoerg if (j == 300) 28687992Sjoerg out->trans = FDC_300KBPS; 287134081Sphk else if (j == 250) 288134081Sphk out->trans = FDC_250KBPS; 28987992Sjoerg else if (j == 500) 29087992Sjoerg out->trans = FDC_500KBPS; 29187992Sjoerg else 292127522Snyan errx(EX_USAGE, "bad speed %d", j); 29387992Sjoerg break; 29487992Sjoerg 29587992Sjoerg case FDT_288M: 29687992Sjoerg if (j == 1000) 29787992Sjoerg out->trans = FDC_1MBPS; 29887992Sjoerg /* FALLTHROUGH */ 29987992Sjoerg case FDT_144M: 30087992Sjoerg if (j == 250) 30187992Sjoerg out->trans = FDC_250KBPS; 30287992Sjoerg else if (j == 500) 30387992Sjoerg out->trans = FDC_500KBPS; 30487992Sjoerg else 305127522Snyan errx(EX_USAGE, "bad speed %d", j); 30687992Sjoerg break; 30787992Sjoerg } 30887992Sjoerg break; 30987992Sjoerg 31087992Sjoerg case 6: /* heads */ 31187992Sjoerg if (getnum(s1, &j)) 31287992Sjoerg errx(EX_USAGE, 31387992Sjoerg "bad numeric value for heads: %s", s1); 31487992Sjoerg if (j == 1 || j == 2) 31587992Sjoerg out->heads = j; 31687992Sjoerg else 31787992Sjoerg errx(EX_USAGE, "bad # of heads %d", j); 31887992Sjoerg break; 31987992Sjoerg 32087992Sjoerg case 7: /* f_gap */ 32187992Sjoerg if (getnum(s1, &out->f_gap)) 32287992Sjoerg errx(EX_USAGE, 32387992Sjoerg "bad numeric value for f_gap: %s", s1); 32487992Sjoerg break; 32587992Sjoerg 32687992Sjoerg case 8: /* f_inter */ 32787992Sjoerg if (getnum(s1, &out->f_inter)) 32887992Sjoerg errx(EX_USAGE, 32987992Sjoerg "bad numeric value for f_inter: %s", s1); 33087992Sjoerg break; 33187992Sjoerg 33287992Sjoerg case 9: /* offs2 */ 33387992Sjoerg if (getnum(s1, &out->offset_side2)) 33487992Sjoerg errx(EX_USAGE, 33587992Sjoerg "bad numeric value for offs2: %s", s1); 33687992Sjoerg break; 33787992Sjoerg 33887992Sjoerg default: 33987992Sjoerg if (strcmp(s1, "+mfm") == 0) 34087992Sjoerg out->flags |= FL_MFM; 34187992Sjoerg else if (strcmp(s1, "-mfm") == 0) 34287992Sjoerg out->flags &= ~FL_MFM; 343134081Sphk else if (strcmp(s1, "+auto") == 0) 344134081Sphk out->flags |= FL_AUTO; 345134081Sphk else if (strcmp(s1, "-auto") == 0) 346134081Sphk out->flags &= ~FL_AUTO; 34787992Sjoerg else if (strcmp(s1, "+2step") == 0) 34887992Sjoerg out->flags |= FL_2STEP; 34987992Sjoerg else if (strcmp(s1, "-2step") == 0) 35087992Sjoerg out->flags &= ~FL_2STEP; 35187992Sjoerg else if (strcmp(s1, "+perpnd") == 0) 35287992Sjoerg out->flags |= FL_PERPND; 35387992Sjoerg else if (strcmp(s1, "-perpnd") == 0) 35487992Sjoerg out->flags &= ~FL_PERPND; 35587992Sjoerg else 35687992Sjoerg errx(EX_USAGE, "bad flag: %s", s1); 35787992Sjoerg break; 35887992Sjoerg } 35987992Sjoerg free(s1); 36087992Sjoerg } 36187992Sjoerg 362126230Sphk out->size = out->tracks * out->heads * out->sectrac; 36387992Sjoerg} 36487992Sjoerg 36587992Sjoerg/* 36687992Sjoerg * Print a textual translation of the drive (density) type described 36787992Sjoerg * by `in' to stdout. The string uses the same form that is parseable 36887992Sjoerg * by parse_fmt(). 36987992Sjoerg */ 37087992Sjoergvoid 37187992Sjoergprint_fmt(struct fd_type in) 37287992Sjoerg{ 37387992Sjoerg int secsize, speed; 37487992Sjoerg 37587992Sjoerg secsize = 128 << in.secsize; 37687992Sjoerg switch (in.trans) { 37787992Sjoerg case FDC_250KBPS: speed = 250; break; 37887992Sjoerg case FDC_300KBPS: speed = 300; break; 37987992Sjoerg case FDC_500KBPS: speed = 500; break; 38087992Sjoerg case FDC_1MBPS: speed = 1000; break; 38187992Sjoerg default: speed = 1; break; 38287992Sjoerg } 38387992Sjoerg 38487992Sjoerg printf("%d,%d,%#x,%#x,%d,%d,%d,%#x,%d,%d", 38587992Sjoerg in.sectrac, secsize, in.datalen, in.gap, in.tracks, 38687992Sjoerg speed, in.heads, in.f_gap, in.f_inter, in.offset_side2); 38787992Sjoerg if (in.flags & FL_MFM) 38887992Sjoerg printf(",+mfm"); 38987992Sjoerg if (in.flags & FL_2STEP) 39087992Sjoerg printf(",+2step"); 39187992Sjoerg if (in.flags & FL_PERPND) 39287992Sjoerg printf(",+perpnd"); 393134081Sphk if (in.flags & FL_AUTO) 394134081Sphk printf(",+auto"); 39587992Sjoerg putc('\n', stdout); 39687992Sjoerg} 39787992Sjoerg 39887992Sjoerg/* 39987992Sjoerg * Based on `size' (in kilobytes), walk through the table of known 40087992Sjoerg * densities for drive type `type' and see if we can find one. If 40187992Sjoerg * found, return it (as a pointer to static storage), otherwise return 40287992Sjoerg * NULL. 40387992Sjoerg */ 40487992Sjoergstruct fd_type * 40587992Sjoergget_fmt(int size, enum fd_drivetype type) 40687992Sjoerg{ 40787992Sjoerg int i, n; 40887992Sjoerg struct fd_type *fdtp; 40987992Sjoerg 41087992Sjoerg switch (type) { 41187992Sjoerg default: 41287992Sjoerg return (0); 41387992Sjoerg 41487992Sjoerg case FDT_360K: 41587992Sjoerg fdtp = fd_types_360k; 41687992Sjoerg n = sizeof fd_types_360k / sizeof(struct fd_type); 41787992Sjoerg break; 41887992Sjoerg 41987992Sjoerg case FDT_720K: 42087992Sjoerg fdtp = fd_types_720k; 42187992Sjoerg n = sizeof fd_types_720k / sizeof(struct fd_type); 42287992Sjoerg break; 42387992Sjoerg 42487992Sjoerg case FDT_12M: 42587992Sjoerg fdtp = fd_types_12m; 42687992Sjoerg n = sizeof fd_types_12m / sizeof(struct fd_type); 42787992Sjoerg break; 42887992Sjoerg 42987992Sjoerg case FDT_144M: 43087992Sjoerg fdtp = fd_types_144m; 43187992Sjoerg n = sizeof fd_types_144m / sizeof(struct fd_type); 43287992Sjoerg break; 43387992Sjoerg 43487992Sjoerg case FDT_288M: 43587992Sjoerg fdtp = fd_types_288m; 43687992Sjoerg n = sizeof fd_types_288m / sizeof(struct fd_type); 43787992Sjoerg break; 43887992Sjoerg } 43987992Sjoerg 440126230Sphk if (size == -1) 441126230Sphk return fd_types_auto; 442126230Sphk 443134081Sphk for (i = 0; i < n; i++, fdtp++) { 444134081Sphk fdtp->size = fdtp->sectrac * fdtp->heads * fdtp->tracks; 445127522Snyan if (((128 << fdtp->secsize) * fdtp->size / 1024) == size) 446127522Snyan return (fdtp); 447134081Sphk } 44887992Sjoerg return (0); 44987992Sjoerg} 45087992Sjoerg 45187992Sjoerg/* 45287992Sjoerg * Parse a number from `s'. If the string cannot be converted into a 45387992Sjoerg * number completely, return -1, otherwise 0. The result is returned 45487992Sjoerg * in `*res'. 45587992Sjoerg */ 45687992Sjoergint 45787992Sjoerggetnum(const char *s, int *res) 45887992Sjoerg{ 45987992Sjoerg unsigned long ul; 46087992Sjoerg char *cp; 46187992Sjoerg 46287992Sjoerg ul = strtoul(s, &cp, 0); 46387992Sjoerg if (*cp != '\0') 46487992Sjoerg return (-1); 46587992Sjoerg 46687992Sjoerg *res = (int)ul; 46787992Sjoerg return (0); 46887992Sjoerg} 46987992Sjoerg 47087992Sjoerg/* 47187992Sjoerg * Return a short name and a verbose description for the drive 47287992Sjoerg * described by `t'. 47387992Sjoerg */ 47487992Sjoergvoid 47587992Sjoerggetname(enum fd_drivetype t, const char **name, const char **descr) 47687992Sjoerg{ 47787992Sjoerg 47887992Sjoerg switch (t) { 47987992Sjoerg default: 48087992Sjoerg *name = "unknown"; 48187992Sjoerg *descr = "unknown drive type"; 48287992Sjoerg break; 48387992Sjoerg 48487992Sjoerg case FDT_360K: 48587992Sjoerg *name = "360K"; 48687992Sjoerg *descr = "5.25\" double-density"; 48787992Sjoerg break; 48887992Sjoerg 48987992Sjoerg case FDT_12M: 49087992Sjoerg *name = "1.2M"; 49187992Sjoerg *descr = "5.25\" high-density"; 49287992Sjoerg break; 49387992Sjoerg 49487992Sjoerg case FDT_720K: 49587992Sjoerg *name = "720K"; 49687992Sjoerg *descr = "3.5\" double-density"; 49787992Sjoerg break; 49887992Sjoerg 49987992Sjoerg case FDT_144M: 50087992Sjoerg *name = "1.44M"; 50187992Sjoerg *descr = "3.5\" high-density"; 50287992Sjoerg break; 50387992Sjoerg 50487992Sjoerg case FDT_288M: 50587992Sjoerg *name = "2.88M"; 50687992Sjoerg *descr = "3.5\" extra-density"; 50787992Sjoerg break; 50887992Sjoerg } 50987992Sjoerg} 510