Index: uspace/lib/gpt/libgpt.h
===================================================================
--- uspace/lib/gpt/libgpt.h	(revision a2aa81cb68fd01c0a20c10390ebc0c8ec3655508)
+++ uspace/lib/gpt/libgpt.h	(revision 44c488656656806dc143099d9a82d6bb2b1bf293)
@@ -86,9 +86,6 @@
 typedef struct {
 	/** Raw header. Has more bytes alloced than sizeof(gpt_header_t)!
-	 * See gpt_read_gpt_header() to know why. */
-	gpt_header_t * raw_data;
-	/** Device where the data are from */
-	service_id_t device;
-	/** Linked list of partitions (initially NULL) */
+	 * See gpt_alloc_header() to know why. */
+	gpt_header_t *header;
 } gpt_t;
 
@@ -123,42 +120,46 @@
 	size_t arr_size;
 	/** Resizable partition array */
-	gpt_entry_t * part_array;
+	gpt_entry_t *part_array;
 } gpt_partitions_t;
 
 
 typedef struct gpt_table {
-	gpt_t * gpt;
-	gpt_partitions_t * parts;
+	gpt_t *gpt;
+	gpt_partitions_t *parts;
+	service_id_t device;
 } gpt_label_t;
 
 struct partition_type {
-	const char * desc;
-	const char * guid;
+	const char *desc;
+	const char *guid;
 };
 
 extern const struct partition_type gpt_ptypes[];
 
+extern gpt_label_t * gpt_alloc_label(void);
+extern void gpt_free_label(gpt_label_t *);
 
-extern gpt_t * gpt_alloc_gpt_header(void);
-extern gpt_t * gpt_read_gpt_header(service_id_t dev_handle);
-extern int     gpt_write_gpt_header(gpt_t * header, service_id_t dev_handle);
+extern gpt_t * gpt_alloc_header(size_t);
+extern int     gpt_read_header(gpt_label_t *, service_id_t);
+extern int     gpt_write_header(gpt_label_t *, service_id_t);
 
 extern gpt_partitions_t * gpt_alloc_partitions(void);
-extern gpt_partitions_t * gpt_read_partitions(gpt_t * gpt);
-extern int             gpt_write_partitions(gpt_partitions_t * parts, gpt_t * header, service_id_t dev_handle);
-extern gpt_part_t *    gpt_alloc_partition (gpt_partitions_t * parts);
-extern int             gpt_add_partition   (gpt_partitions_t * parts, gpt_part_t * partition);
-extern int             gpt_remove_partition(gpt_partitions_t * parts, size_t idx);
+extern int             gpt_read_partitions (gpt_label_t *);
+extern int             gpt_write_partitions(gpt_label_t *, service_id_t);
+extern gpt_part_t *    gpt_alloc_partition (void);
+extern gpt_part_t *    gpt_get_partition   (gpt_label_t *);
+extern int             gpt_add_partition   (gpt_label_t *, gpt_part_t *);
+extern int             gpt_remove_partition(gpt_label_t *, size_t);
 
-extern size_t          gpt_get_part_type(gpt_part_t * p);
-extern void            gpt_set_part_type(gpt_part_t * p, size_t type);
-extern void            gpt_set_start_lba(gpt_part_t * p, uint64_t start);
-extern uint64_t        gpt_get_start_lba(gpt_part_t * p);
-extern void            gpt_set_end_lba  (gpt_part_t * p, uint64_t end);
-extern uint64_t        gpt_get_end_lba  (gpt_part_t * p);
-extern unsigned char * gpt_get_part_name(gpt_part_t * p);
-extern void            gpt_set_part_name(gpt_part_t * p, char * name[], size_t length);
-extern bool            gpt_get_flag     (gpt_part_t * p, GPT_ATTR flag);
-extern void            gpt_set_flag     (gpt_part_t * p, GPT_ATTR flag, bool value);
+extern size_t          gpt_get_part_type(gpt_part_t *);
+extern void            gpt_set_part_type(gpt_part_t *, size_t);
+extern void            gpt_set_start_lba(gpt_part_t *, uint64_t);
+extern uint64_t        gpt_get_start_lba(gpt_part_t *);
+extern void            gpt_set_end_lba  (gpt_part_t *, uint64_t);
+extern uint64_t        gpt_get_end_lba  (gpt_part_t *);
+extern unsigned char * gpt_get_part_name(gpt_part_t *);
+extern void            gpt_set_part_name(gpt_part_t *, char *[], size_t);
+extern bool            gpt_get_flag     (gpt_part_t *, GPT_ATTR);
+extern void            gpt_set_flag     (gpt_part_t *, GPT_ATTR, bool);
 
 
@@ -168,6 +169,6 @@
 		    iterator < (parts)->part_array + (parts)->fill; ++iterator)
 
-extern void gpt_free_gpt(gpt_t * gpt);
-extern void gpt_free_partitions(gpt_partitions_t * parts);
+extern void gpt_free_gpt(gpt_t *);
+extern void gpt_free_partitions(gpt_partitions_t *);
 
 #endif
