home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / os / linux / 20085 < prev    next >
Encoding:
Text File  |  1992-12-12  |  3.4 KB  |  100 lines

  1. Newsgroups: comp.os.linux
  2. Path: sparky!uunet!usc!zaphod.mps.ohio-state.edu!saimiri.primate.wisc.edu!ames!news.hawaii.edu!lee
  3. From: lee@Hawaii.Edu (Greg Lee)
  4. Subject: overstuffed 3.5" floppy
  5. Message-ID: <1992Dec12.200235.1248@news.Hawaii.Edu>
  6. Sender: root@news.Hawaii.Edu (News Service)
  7. Nntp-Posting-Host: uhunix.uhcc.hawaii.edu
  8. Organization: University of Hawaii
  9. X-Newsreader: TIN [version 1.1 PL6]
  10. Date: Sat, 12 Dec 1992 20:02:35 GMT
  11. Lines: 87
  12.  
  13.  
  14. With a few minor changes to /usr/src/linux/kernel/blk_drv/floppy.c
  15. one can format and use hd 3.5" floppy disks with 1722 blocks, instead
  16. of 1440 blocks.  At least, I've had no problems with it.  After
  17. the patch below and remaking the system, e.g., for a 3.5" drive A,
  18.  
  19.     % ln -s /dev/fd0H360 /dev/fh
  20.     % fdformat /dev/fh
  21.     % mkfs -c /dev/fh 1722
  22.  
  23. (The patch makes unavailable the floppy device for a 360k disk in a
  24. 720k drive. The patch is against the 0.98.5 or 0.98.6 version of
  25. floppy.c)
  26. --
  27. Greg Lee <lee@uhunix.uhcc.hawaii.edu>
  28.  
  29. *** floppy.c.orig    Sun Nov 29 12:41:34 1992
  30. --- floppy.c    Sat Dec 12 09:20:02 1992
  31. ***************
  32. *** 138,144 ****
  33.       {    0, 0,0, 0,0,0x00,0x00,0x00,0x00,NULL },    /* no testing */
  34.       {  720, 9,2,40,0,0x2A,0x02,0xDF,0x50,NULL },    /* 360kB PC diskettes */
  35.       { 2400,15,2,80,0,0x1B,0x00,0xDF,0x54,NULL },    /* 1.2 MB AT-diskettes */
  36. !     {  720, 9,2,40,1,0x2A,0x02,0xDF,0x50,NULL },    /* 360kB in 720kB drive */
  37.       { 1440, 9,2,80,0,0x2A,0x02,0xDF,0x50,NULL },    /* 3.5" 720kB diskette */
  38.       {  720, 9,2,40,1,0x23,0x01,0xDF,0x50,NULL },    /* 360kB in 1.2MB drive */
  39.       { 1440, 9,2,80,0,0x23,0x01,0xDF,0x50,NULL },    /* 720kB in 1.2MB drive */
  40. --- 138,145 ----
  41.       {    0, 0,0, 0,0,0x00,0x00,0x00,0x00,NULL },    /* no testing */
  42.       {  720, 9,2,40,0,0x2A,0x02,0xDF,0x50,NULL },    /* 360kB PC diskettes */
  43.       { 2400,15,2,80,0,0x1B,0x00,0xDF,0x54,NULL },    /* 1.2 MB AT-diskettes */
  44. ! /*    {  720, 9,2,40,1,0x2A,0x02,0xDF,0x50,NULL },*/    /* 360kB in 720kB drive */
  45. !     { 3444,21,2,82,0,0x0C,0x00,0xCF,0x0C,NULL },    /* 1.722MB diskette */
  46.       { 1440, 9,2,80,0,0x2A,0x02,0xDF,0x50,NULL },    /* 3.5" 720kB diskette */
  47.       {  720, 9,2,40,1,0x23,0x01,0xDF,0x50,NULL },    /* 360kB in 1.2MB drive */
  48.       { 1440, 9,2,80,0,0x23,0x01,0xDF,0x50,NULL },    /* 720kB in 1.2MB drive */
  49. ***************
  50. *** 177,183 ****
  51.       MAX_DISK_SIZE, MAX_DISK_SIZE, MAX_DISK_SIZE, MAX_DISK_SIZE,
  52.        360, 360 ,360, 360,
  53.       1200,1200,1200,1200,
  54. !      360, 360, 360, 360,
  55.        720, 720, 720, 720,
  56.        360, 360, 360, 360,
  57.        720, 720, 720, 720,
  58. --- 178,185 ----
  59.       MAX_DISK_SIZE, MAX_DISK_SIZE, MAX_DISK_SIZE, MAX_DISK_SIZE,
  60.        360, 360 ,360, 360,
  61.       1200,1200,1200,1200,
  62. ! /*     360, 360, 360, 360,*/
  63. !     1722,1722,1722,1722,
  64.        720, 720, 720, 720,
  65.        360, 360, 360, 360,
  66.        720, 720, 720, 720,
  67. ***************
  68. *** 895,900 ****
  69. --- 897,906 ----
  70.           transfer();
  71.   }
  72.   
  73. + static int il21[] ={
  74. +     1,12,2,13,3,14,4,15,5,16,6,17,7,18,8,19,9,20,10,21,11
  75. + };
  76.   static void setup_format_params(void)
  77.   {
  78.       unsigned char *here = (unsigned char *) tmp_floppy_area;
  79. ***************
  80. *** 912,918 ****
  81.       for (count = 0; count < floppy->sect; count++) {
  82.       *here++ = track;
  83.       *here++ = head;
  84. !     *here++ = 1 + (( count + total_shift ) % floppy->sect);
  85.       *here++ = 2; /* 512 bytes */
  86.       }
  87.   }
  88. --- 918,927 ----
  89.       for (count = 0; count < floppy->sect; count++) {
  90.       *here++ = track;
  91.       *here++ = head;
  92. !     if (floppy->sect == 21)
  93. !         *here++ = il21[(( count + total_shift ) % floppy->sect)];
  94. !     else
  95. !         *here++ = 1 + (( count + total_shift ) % floppy->sect);
  96.       *here++ = 2; /* 512 bytes */
  97.       }
  98.   }
  99.