Mailing List Archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [tlug] [Kind of OT] CompactFlash cards



And Thus Spake Godwin Stewart <gstewart@example.com> (on Tue, 30 Sep 2003
15:19:25 +0200):

> Thanks. The problem would appear to be here:
> 
> >         32 hidden sectors

It definitely was.

I patched the source of mkdosfs so I could specify a number of hidden
sectors on the volume with the new "-h" command line option.

Here's a diff against the source available from

http://distro.ibiblio.org/pub/Linux/distributions/sorcerer/sources/dosfstools/2.9/


diff -r dosfstools-2.9/mkdosfs/mkdosfs.c dosfstools-2.9.new/mkdosfs/mkdosfs.c
9a10,11
>    UPDATED 30-SEP-2003 G. STEWART : New option : -h n (n hidden sectors)
>
330c332
<
---
> static int hidden_sectors = 0;
888c890
<     bs.hidden = CT_LE_L(0);
---
>     bs.hidden = CT_LE_L(hidden_sectors);
1375c1377
<        [-F fat-size] [-r root-dir-entries] [-R reserved-sectors]\n\
---
>        [-h hidden-sectors] [-F fat-size] [-r root-dir-entries] [-R reserved-sectors]\n\
1435c1437
<   while ((c = getopt (argc, argv, "AcCf:F:Ii:l:m:n:r:R:s:S:v")) != EOF)
---
>   while ((c = getopt (argc, argv, "AcCf:F:Ii:l:m:n:r:R:s:S:h:v")) != EOF)
1584a1587,1595
>       case 'h':        /* h : number of hidden sectors */
>         hidden_sectors = (int) strtol (optarg, &tmp, 0);
>         if ( *tmp || hidden_sectors < 0 || hidden_sectors > 511 )
>           {
>             printf("Bad number of hidden sectors : %s\n", optarg);
>             usage ();
>           }
>         break;
>
diff -r dosfstools-2.9/version.h dosfstools-2.9.new/version.h
4,5c4,5
< #define       VERSION                 "2.9"
< #define VERSION_DATE  "15 May 2003"
---
> #define       VERSION                 "2.9.1"
> #define VERSION_DATE  "30 Sep 2003"


-- 
G. Stewart   --   gstewart@example.com -- gstewart@example.com
Registered Linux user #284683 (Slackware 9.0)
---------------------------------------------------------------
Doctors can be frustrating. You wait six weeks for an
appointment and he says, "I wish you'd come to me sooner."

Attachment: pgp00000.pgp
Description: PGP signature


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links