Re: Extended Partitions (bug in my previous diff)

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
Date: Wednesday, March 25, 1992 - 5:08 pm

apr%dec001.ziap.wtza-berlin.de@noc.belwue.de (Andreas Priebe) writes:


I have only one drive.  I believe I mentioned in my original posting
that I made no guarantees if you have more than one.  Linus says my
patches broke support for two drives.  I've got his version, which
might work for you, but I'm reluctant to post patches that Linus sent
me via email.  Based on past performance I'd expect Linus would have
an official version that supports extended partitions fairly soon.

On looking back at my patch, I do see a problem with multiple drives.
Since I only have one, I can't test it with more than one.  But I
believe my code

        current_minor += 4;  /* first "extra" minor */
        if (*(unsigned short *) (bh->b_data+510) == 0xAA55) {
                p = 0x1BE + (void *)bh->b_data;
                for (i=1 ; i<=4 ; i++,p++) {

should probably be changed to

        i = current_minor & 0xff;
        current_minor += 4;  /* first "extra" minor */
        if (*(unsigned short *) (bh->b_data+510) == 0xAA55) {
                int n;
                p = 0x1BE + (void *)bh->b_data;
                for (n=1 ; n<=4 ; i++,n++,p++) {

This isn't the most elegant solution, but is the one involving the
fewest changes.  The best solution involve a change in variable
names, to something like

  i --> minor
  current_minor --> next_minor

If this change works please tell me and I'll update my archived copy
of the diffs.  I have no way to test it myself.
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: Extended Partitions (bug in my previous diff), Charles Hedrick, (Wed Mar 25, 5:08 pm)