Changeset 5beb1ff in mainline for uspace/lib/gpt/libgpt.h


Ignore:
Timestamp:
2012-12-19T01:29:04Z (11 years ago)
Author:
Dominik Taborsky (AT DOT) <brembyseznamcz>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
ec50ac4a
Parents:
f4abd56 (diff), 7570e800 (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:

minor fixes

File:
1 edited

Legend:

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

    rf4abd56 r5beb1ff  
    11/*
    2  * Copyright (c) 2009 Jiri Svoboda, 2011 Dominik Taborsky
     2 * Copyright (c) 2009 Jiri Svoboda, 2011, 2012, 2013 Dominik Taborsky
    33 * All rights reserved.
    44 *
     
    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.