Index: uspace/lib/label/src/gpt.c
===================================================================
--- uspace/lib/label/src/gpt.c	(revision b33d140f53df46bff63409f9e614b46f85b8db6f)
+++ uspace/lib/label/src/gpt.c	(revision a53ed3a8097360ccf174e8d94fb407db919eb66a)
@@ -46,30 +46,30 @@
 #include "gpt.h"
 
-static int gpt_open(label_bd_t *, label_t **);
-static int gpt_create(label_bd_t *, label_t **);
+static errno_t gpt_open(label_bd_t *, label_t **);
+static errno_t gpt_create(label_bd_t *, label_t **);
 static void gpt_close(label_t *);
-static int gpt_destroy(label_t *);
-static int gpt_get_info(label_t *, label_info_t *);
+static errno_t gpt_destroy(label_t *);
+static errno_t gpt_get_info(label_t *, label_info_t *);
 static label_part_t *gpt_part_first(label_t *);
 static label_part_t *gpt_part_next(label_part_t *);
 static void gpt_part_get_info(label_part_t *, label_part_info_t *);
-static int gpt_part_create(label_t *, label_part_spec_t *, label_part_t **);
-static int gpt_part_destroy(label_part_t *);
-static int gpt_suggest_ptype(label_t *, label_pcnt_t, label_ptype_t *);
-
-static int gpt_check_free_idx(label_t *, int);
-static int gpt_check_free_range(label_t *, uint64_t, uint64_t);
+static errno_t gpt_part_create(label_t *, label_part_spec_t *, label_part_t **);
+static errno_t gpt_part_destroy(label_part_t *);
+static errno_t gpt_suggest_ptype(label_t *, label_pcnt_t, label_ptype_t *);
+
+static errno_t gpt_check_free_idx(label_t *, int);
+static errno_t gpt_check_free_range(label_t *, uint64_t, uint64_t);
 
 static void gpt_unused_pte(gpt_entry_t *);
-static int gpt_part_to_pte(label_part_t *, gpt_entry_t *);
-static int gpt_pte_to_part(label_t *, gpt_entry_t *, int);
-static int gpt_pte_update(label_t *, gpt_entry_t *, int);
-
-static int gpt_update_pt_crc(label_t *, uint32_t);
+static errno_t gpt_part_to_pte(label_part_t *, gpt_entry_t *);
+static errno_t gpt_pte_to_part(label_t *, gpt_entry_t *, int);
+static errno_t gpt_pte_update(label_t *, gpt_entry_t *, int);
+
+static errno_t gpt_update_pt_crc(label_t *, uint32_t);
 static void gpt_hdr_compute_crc(gpt_header_t *, size_t);
-static int gpt_hdr_get_crc(gpt_header_t *, size_t, uint32_t *);
-
-static int gpt_pmbr_create(label_bd_t *, size_t, uint64_t);
-static int gpt_pmbr_destroy(label_bd_t *, size_t);
+static errno_t gpt_hdr_get_crc(gpt_header_t *, size_t, uint32_t *);
+
+static errno_t gpt_pmbr_create(label_bd_t *, size_t, uint64_t);
+static errno_t gpt_pmbr_destroy(label_bd_t *, size_t);
 
 const uint8_t efi_signature[8] = {
@@ -92,5 +92,5 @@
 };
 
-static int gpt_open(label_bd_t *bd, label_t **rlabel)
+static errno_t gpt_open(label_bd_t *bd, label_t **rlabel)
 {
 	label_t *label = NULL;
@@ -111,5 +111,5 @@
 	uint32_t hdr_crc;
 	int i, j;
-	int rc;
+	errno_t rc;
 
 	gpt_hdr[0] = NULL;
@@ -345,5 +345,5 @@
 }
 
-static int gpt_create(label_bd_t *bd, label_t **rlabel)
+static errno_t gpt_create(label_bd_t *bd, label_t **rlabel)
 {
 	label_t *label = NULL;
@@ -362,5 +362,5 @@
 	uuid_t disk_uuid;
 	int i, j;
-	int rc;
+	errno_t rc;
 
 	rc = bd->ops->get_bsize(bd->arg, &bsize);
@@ -510,5 +510,5 @@
 }
 
-static int gpt_destroy(label_t *label)
+static errno_t gpt_destroy(label_t *label)
 {
 	gpt_header_t *gpt_hdr = NULL;
@@ -516,5 +516,5 @@
 	label_part_t *part;
 	int i;
-	int rc;
+	errno_t rc;
 
 	part = gpt_part_first(label);
@@ -580,5 +580,5 @@
 }
 
-static int gpt_get_info(label_t *label, label_info_t *linfo)
+static errno_t gpt_get_info(label_t *label, label_info_t *linfo)
 {
 	memset(linfo, 0, sizeof(label_info_t));
@@ -624,10 +624,10 @@
 }
 
-static int gpt_part_create(label_t *label, label_part_spec_t *pspec,
+static errno_t gpt_part_create(label_t *label, label_part_spec_t *pspec,
     label_part_t **rpart)
 {
 	label_part_t *part;
 	gpt_entry_t pte;
-	int rc;
+	errno_t rc;
 
 	part = calloc(1, sizeof(label_part_t));
@@ -696,8 +696,8 @@
 }
 
-static int gpt_part_destroy(label_part_t *part)
+static errno_t gpt_part_destroy(label_part_t *part)
 {
 	gpt_entry_t pte;
-	int rc;
+	errno_t rc;
 
 	/* Prepare unused partition table entry */
@@ -715,9 +715,9 @@
 }
 
-static int gpt_suggest_ptype(label_t *label, label_pcnt_t pcnt,
+static errno_t gpt_suggest_ptype(label_t *label, label_pcnt_t pcnt,
     label_ptype_t *ptype)
 {
 	const char *ptid;
-	int rc;
+	errno_t rc;
 
 	ptid = NULL;
@@ -748,5 +748,5 @@
 
 /** Verify that the specified index is valid and free. */
-static int gpt_check_free_idx(label_t *label, int index)
+static errno_t gpt_check_free_idx(label_t *label, int index)
 {
 	label_part_t *part;
@@ -771,5 +771,5 @@
 }
 
-static int gpt_check_free_range(label_t *label, uint64_t block0,
+static errno_t gpt_check_free_range(label_t *label, uint64_t block0,
     uint64_t nblocks)
 {
@@ -796,5 +796,5 @@
 }
 
-static int gpt_part_to_pte(label_part_t *part, gpt_entry_t *pte)
+static errno_t gpt_part_to_pte(label_part_t *part, gpt_entry_t *pte)
 {
 	uint64_t eblock;
@@ -814,5 +814,5 @@
 }
 
-static int gpt_pte_to_part(label_t *label, gpt_entry_t *pte, int index)
+static errno_t gpt_pte_to_part(label_t *label, gpt_entry_t *pte, int index)
 {
 	label_part_t *part;
@@ -856,5 +856,5 @@
  * @a pte.
  */
-static int gpt_pte_update(label_t *label, gpt_entry_t *pte, int index)
+static errno_t gpt_pte_update(label_t *label, gpt_entry_t *pte, int index)
 {
 	size_t pos;
@@ -866,5 +866,5 @@
 	uint32_t crc;
 	int i;
-	int rc;
+	errno_t rc;
 
 	/* Byte offset of partition entry */
@@ -921,8 +921,8 @@
 }
 
-static int gpt_update_pt_crc(label_t *label, uint32_t crc)
+static errno_t gpt_update_pt_crc(label_t *label, uint32_t crc)
 {
 	gpt_header_t *gpt_hdr;
-	int rc;
+	errno_t rc;
 	int i;
 
@@ -968,5 +968,5 @@
 }
 
-static int gpt_hdr_get_crc(gpt_header_t *hdr, size_t hdr_size, uint32_t *crc)
+static errno_t gpt_hdr_get_crc(gpt_header_t *hdr, size_t hdr_size, uint32_t *crc)
 {
 	gpt_header_t *c;
@@ -985,9 +985,9 @@
 
 /** Create GPT Protective MBR */
-static int gpt_pmbr_create(label_bd_t *bd, size_t bsize, uint64_t nblocks)
+static errno_t gpt_pmbr_create(label_bd_t *bd, size_t bsize, uint64_t nblocks)
 {
 	mbr_br_block_t *pmbr = NULL;
 	uint64_t pmbr_nb;
-	int rc;
+	errno_t rc;
 
 	pmbr = calloc(1, bsize);
@@ -1023,8 +1023,8 @@
 
 /** Destroy GPT Protective MBR */
-static int gpt_pmbr_destroy(label_bd_t *bd, size_t bsize)
+static errno_t gpt_pmbr_destroy(label_bd_t *bd, size_t bsize)
 {
 	mbr_br_block_t *pmbr = NULL;
-	int rc;
+	errno_t rc;
 
 	pmbr = calloc(1, bsize);
