Changeset 7570e800 in mainline for uspace/lib/gpt/libgpt.h


Ignore:
Timestamp:
2012-12-18T23:05:20Z (12 years ago)
Author:
Dominik Taborsky (AT DOT) <brembyseznamcz>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
5beb1ff
Parents:
cbd64057
Message:

libgpt update

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/gpt/libgpt.h

    rcbd64057 r7570e800  
    3636#define __GPT_H__
    3737
     38#define NAME    "libgpt"
     39
    3840#include <sys/types.h>
    3941
     
    5254};
    5355
    54 /** GPT header */
     56/** GPT header
     57 * - all in little endian.
     58 */
    5559typedef struct {
    5660        uint8_t efi_signature[8];
     
    7781        service_id_t device;
    7882        /** Linked list of partitions (initially NULL) */
    79         //g_part_t * partitions;        //shall we keep this? same problem as in libmbr
    80         //NOTE: if we have partition list here, do we free() it or not?
    8183} gpt_t;
    8284
     
    109111        /** Resizable partition array */
    110112        gpt_entry_t * part_array;
    111        
    112113} gpt_parts_t;
    113114
     
    115116        const char * desc;
    116117        const char * guid;
    117 }
     118};
    118119
    119 struct partition_type gpt_ptypes[] {
     120struct partition_type gpt_ptypes[] = {
    120121        { "Unused entry",                                       "00000000-0000-0000-0000-000000000000" },
    121122        { "MBR partition scheme",                       "024DEE41-33E7-11D3-9D69-0008C781F39F" },
     
    184185
    185186extern gpt_t * gpt_read_gpt_header(service_id_t dev_handle);
    186 extern int gpt_write_gpt_header(gpt_header_t header, service_id_t dev_handle);
     187extern int gpt_write_gpt_header(gpt_t * header, service_id_t dev_handle);
    187188
    188189extern gpt_parts_t * gpt_read_partitions(gpt_t * gpt);
    189 extern int gpt_write_partitions(gpt_parts_t * parts, gpt_t * header);
    190 extern gpt_parts_t * gpt_add_partition(gpt_parts_t * parts, g_part_t partition);
    191 extern gpt_parts_t * gpt_remove_partition(gpt_parts_t * parts, int idx);
     190extern int                       gpt_write_partitions(gpt_parts_t * parts, gpt_t * header, service_id_t dev_handle);
     191extern int                       gpt_add_partition(gpt_parts_t * parts, g_part_t * partition);
     192extern void                      gpt_remove_partition(gpt_parts_t * parts, int idx);
     193extern void              gpt_set_part_type(g_part_t * p, int type);
     194extern void              gpt_set_part_name(gpt_entry_t * p, char * name[], size_t length);
    192195
    193196extern void gpt_free_gpt(gpt_t * gpt);
Note: See TracChangeset for help on using the changeset viewer.