Changeset edebb4a1 in mainline for uspace/lib/label


Ignore:
Timestamp:
2015-10-14T22:30:12Z (10 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
ea0ff6b
Parents:
4b6635a7
Message:

Handle dummy partition addition/removal during label destruction/creation. Handle dummy label properly in fdisk.

Location:
uspace/lib/label/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/label/src/gpt.c

    r4b6635a7 redebb4a1  
    544544}
    545545
     546static bool gpt_can_delete_part(label_t *label)
     547{
     548        return list_count(&label->parts) > 0;
     549}
     550
    546551static int gpt_get_info(label_t *label, label_info_t *linfo)
    547552{
     
    551556        if (gpt_can_create_pri(label))
    552557                linfo->flags = linfo->flags | lf_can_create_pri;
     558        if (gpt_can_delete_part(label))
     559                linfo->flags = linfo->flags | lf_can_delete_part;
    553560        linfo->ablock0 = label->ablock0;
    554561        linfo->anblocks = label->anblocks;
  • uspace/lib/label/src/mbr.c

    r4b6635a7 redebb4a1  
    399399}
    400400
     401static bool mbr_can_delete_part(label_t *label)
     402{
     403        return list_count(&label->parts) > 0;
     404}
     405
    401406static int mbr_get_info(label_t *label, label_info_t *linfo)
    402407{
     
    416421        if (label->ext_part != NULL)
    417422                linfo->flags |= lf_can_create_log;
     423        /* Can delete partition */
     424        if (mbr_can_delete_part(label))
     425                linfo->flags |= lf_can_delete_part;
    418426
    419427        linfo->ablock0 = label->ablock0;
Note: See TracChangeset for help on using the changeset viewer.