Ignore:
Timestamp:
2015-07-02T19:01:37Z (9 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
6a0d4ce2
Parents:
3faa03d
Message:

Propagate label and partition block ranges and other info up through the stack.

File:
1 edited

Legend:

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

    r3faa03d r1626cd4  
    4343
    4444typedef struct label label_t;
     45typedef struct label_info label_info_t;
    4546typedef struct label_part label_part_t;
    4647typedef struct label_part_info label_part_info_t;
     
    5354        void (*close)(label_t *);
    5455        int (*destroy)(label_t *);
     56        int (*get_info)(label_t *, label_info_t *);
    5557        label_part_t *(*part_first)(label_t *);
    5658        label_part_t *(*part_next)(label_part_t *);
     
    6062} label_ops_t;
    6163
    62 typedef struct {
     64struct label_info {
    6365        /** Disk contents */
    6466        label_disk_cnt_t dcnt;
    6567        /** Label type */
    6668        label_type_t ltype;
    67 } label_info_t;
     69        /** First block that can be allocated */
     70        aoff64_t ablock0;
     71        /** Number of blocks that can be allocated */
     72        aoff64_t anblocks;
     73};
    6874
    6975struct label_part_info {
     76        /** Partition index */
     77        int index;
    7078        /** Address of first block */
    7179        aoff64_t block0;
     
    8088        /** Link to label_t.parts */
    8189        link_t llabel;
     90        /** Index */
     91        int index;
     92        /** First block */
    8293        aoff64_t block0;
     94        /** Number of blocks */
    8395        aoff64_t nblocks;
    8496};
     
    96108        /** Partitions */
    97109        list_t parts; /* of label_part_t */
     110        /** First block that can be allocated */
     111        aoff64_t ablock0;
     112        /** Number of blocks that can be allocated */
     113        aoff64_t anblocks;
    98114};
    99115
Note: See TracChangeset for help on using the changeset viewer.