Changeset f57ccb5 in mainline for uspace/lib/label/include


Ignore:
Timestamp:
2015-08-11T16:03:59Z (10 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
0bde8523
Parents:
1b23e33
Message:

Set partition type based on selected filesystem type.

Location:
uspace/lib/label/include
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/label/include/label.h

    r1b23e33 rf57ccb5  
    5555extern int label_part_destroy(label_part_t *);
    5656extern void label_pspec_init(label_part_spec_t *);
     57extern int label_suggest_ptype(label_t *, label_pcnt_t, label_ptype_t *);
    5758
    5859#endif
  • uspace/lib/label/include/std/gpt.h

    r1b23e33 rf57ccb5  
    7777} __attribute__((packed)) gpt_entry_t;
    7878
     79/** Microsoft Basic Data Partition */
     80#define GPT_MS_BASIC_DATA "EBD0A0A2-B9E5-4433-87C0-68B6B72699C7"
     81/** Linux Filesystem Data */
     82#define GPT_LINUX_FS_DATA "0FC63DAF-8483-4772-8E79-3D69D8477DE4"
     83/** I could not find any definition of Minix GUID partition type.
     84 * This is a randomly generated UUID */
     85#define GPT_MINIX_FAKE "8308e350-4e2d-46c7-8e3b-24b07e8ac674"
     86
    7987#endif
    8088
  • uspace/lib/label/include/std/mbr.h

    r1b23e33 rf57ccb5  
    5757};
    5858
    59 enum ptype {
     59enum mbr_ptype {
    6060        /** Unused partition entry */
    61         mbr_pt_unused   = 0x00,
     61        mbr_pt_unused       = 0x00,
    6262        /** Extended partition */
    63         mbr_pt_extended = 0x05
     63        mbr_pt_extended     = 0x05,
     64        /** Extended partition with LBA */
     65        mbr_pt_extended_lba = 0x0f,
     66        /** FAT16 with LBA */
     67        mbr_pt_fat16_lba    = 0x0e,
     68        /** FAT32 with LBA */
     69        mbr_pt_fat32_lba    = 0x0c,
     70        /** IFS, HPFS, NTFS, exFAT */
     71        mbr_pt_ms_advanced  = 0x07,
     72        /** Minix */
     73        mbr_pt_minix        = 0x81,
     74        /** Linux */
     75        mbr_pt_linux        = 0x83
    6476};
    6577
  • uspace/lib/label/include/types/liblabel.h

    r1b23e33 rf57ccb5  
    6161        int (*part_create)(label_t *, label_part_spec_t *, label_part_t **);
    6262        int (*part_destroy)(label_part_t *);
     63        int (*suggest_ptype)(label_t *, label_pcnt_t, label_ptype_t *);
    6364} label_ops_t;
    6465
     
    106107        aoff64_t nblocks;
    107108        /** Partition type */
    108         uint64_t ptype;
     109        label_ptype_t ptype;
    109110        /** Partition UUID */
    110111        uuid_t part_uuid;
     
    124125        label_pkind_t pkind;
    125126        /** Partition type */
    126         uint64_t ptype;
     127        label_ptype_t ptype;
    127128};
    128129
Note: See TracChangeset for help on using the changeset viewer.