Changeset b53e6d9 in mainline for uspace/srv/part/mbr_part/mbr_part.c


Ignore:
Timestamp:
2009-09-04T22:11:24Z (15 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
3052ff4, 502984be, da3e227
Parents:
40240b1 (diff), 309ede1 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge small improvements to mbd_part and bdd.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/part/mbr_part/mbr_part.c

    r40240b1 rb53e6d9  
    3939 *
    4040 * Limitations:
    41  *
     41 * 
    4242 * Only works with boot records using LBA. CHS-only records are not
    43  * supported. Maximum number of partitions is fixed.
     43 * supported.
     44 *
     45 * Referemces:
     46 *     
     47 * The source of MBR structures for this driver have been the following
     48 * Wikipedia articles:
     49 *      - http://en.wikipedia.org/wiki/Master_Boot_Record
     50 *      - http://en.wikipedia.org/wiki/Extended_boot_record
     51 *
     52 * The fact that the extended partition has type 0x05 is pure observation.
     53 * (TODO: can it have any other type number?)
    4454 */
    4555
     
    7080
    7181        /** Boot record signature */
    72         BR_SIGNATURE    = 0xAA55,
     82        BR_SIGNATURE    = 0xAA55
    7383};
    7484
    7585enum ptype {
     86        /** Unused partition entry */
     87        PT_UNUSED       = 0x00,
    7688        /** Extended partition */
    77         PT_EXTENDED     = 0x05
     89        PT_EXTENDED     = 0x05,
    7890};
    7991
     
    365377        part->length     = len;
    366378
    367         part->present = (sa != 0 || len != 0) ? true : false;
     379        part->present = (pte->ptype != PT_UNUSED) ? true : false;
     380
    368381        part->dev = 0;
    369382        part->next = NULL;
Note: See TracChangeset for help on using the changeset viewer.