Index: uspace/app/hrctl/hrctl.c
===================================================================
--- uspace/app/hrctl/hrctl.c	(revision 6d55e39c08f9ac6a590dc2cce004774672533d4d)
+++ uspace/app/hrctl/hrctl.c	(revision 50bed55dd5e0faca9133e9d152967c4d75296bf6)
@@ -159,5 +159,5 @@
 	level_str = sif_node_get_attr(narray, "level");
 	if (level_str == NULL)
-		cfg->level = hr_l_empty;
+		cfg->level = HR_LVL_UNKNOWN;
 	else
 		cfg->level = strtol(level_str, NULL, 10);
@@ -218,5 +218,5 @@
 
 	retval = 0;
-	cfg->level = hr_l_empty;
+	cfg->level = HR_LVL_UNKNOWN;
 	cfg->dev_no = 0;
 	create = assemble = false;
@@ -286,27 +286,27 @@
 			return 0;
 		case 'l':
-			if (cfg->level != hr_l_empty)
+			if (cfg->level != HR_LVL_UNKNOWN)
 				goto bad;
 			cfg->level = strtol(optarg, NULL, 10);
 			break;
 		case '0':
-			if (cfg->level != hr_l_empty)
-				goto bad;
-			cfg->level = hr_l_0;
+			if (cfg->level != HR_LVL_UNKNOWN)
+				goto bad;
+			cfg->level = HR_LVL_0;
 			break;
 		case '1':
-			if (cfg->level != hr_l_empty)
-				goto bad;
-			cfg->level = hr_l_1;
+			if (cfg->level != HR_LVL_UNKNOWN)
+				goto bad;
+			cfg->level = HR_LVL_1;
 			break;
 		case '4':
-			if (cfg->level != hr_l_empty)
-				goto bad;
-			cfg->level = hr_l_4;
+			if (cfg->level != HR_LVL_UNKNOWN)
+				goto bad;
+			cfg->level = HR_LVL_4;
 			break;
 		case '5':
-			if (cfg->level != hr_l_empty)
-				goto bad;
-			cfg->level = hr_l_5;
+			if (cfg->level != HR_LVL_UNKNOWN)
+				goto bad;
+			cfg->level = HR_LVL_5;
 			break;
 		case 'n':
@@ -325,5 +325,5 @@
 		goto bad;
 
-	if (create && cfg->level == hr_l_empty) {
+	if (create && cfg->level == HR_LVL_UNKNOWN) {
 		printf("hrctl: invalid level, exiting\n");
 		return 1;
Index: uspace/lib/device/include/hr.h
===================================================================
--- uspace/lib/device/include/hr.h	(revision 6d55e39c08f9ac6a590dc2cce004774672533d4d)
+++ uspace/lib/device/include/hr.h	(revision 50bed55dd5e0faca9133e9d152967c4d75296bf6)
@@ -46,16 +46,15 @@
 #define HR_DEVNAME_LEN 32
 
+typedef enum hr_level {
+	HR_LVL_0	= 0x00, /* striping, no redundancy */
+	HR_LVL_1	= 0x01, /* n-way mirroring */
+	HR_LVL_4	= 0x04, /* dedicated parity */
+	HR_LVL_5	= 0x05, /* distributed parity */
+	HR_LVL_UNKNOWN	= 0xFF
+} hr_level_t;
+
 typedef struct hr {
 	async_sess_t *sess;
 } hr_t;
-
-typedef enum hr_level {
-	hr_l_0 = 0,
-	hr_l_1 = 1,
-	hr_l_4 = 4,
-	hr_l_5 = 5,
-	hr_l_linear = 254,
-	hr_l_empty = 255
-} hr_level_t;
 
 typedef struct hr_config {
Index: uspace/lib/device/src/hr.c
===================================================================
--- uspace/lib/device/src/hr.c	(revision 6d55e39c08f9ac6a590dc2cce004774672533d4d)
+++ uspace/lib/device/src/hr.c	(revision 50bed55dd5e0faca9133e9d152967c4d75296bf6)
@@ -131,5 +131,5 @@
 
 	printf("level: %d\n", vol_info->level);
-	if (vol_info->level == hr_l_0 || vol_info->level == hr_l_4) {
+	if (vol_info->level == HR_LVL_0 || vol_info->level == HR_LVL_4) {
 		if (vol_info->strip_size / 1024 < 1)
 			printf("strip size in bytes: %u\n",
@@ -144,5 +144,5 @@
 	printf("block size: %zu\n", vol_info->bsize);
 
-	if (vol_info->level == hr_l_4)
+	if (vol_info->level == HR_LVL_4)
 		printf("extents: [P] [status] [index] [devname]\n");
 	else
@@ -153,7 +153,7 @@
 		if (rc != EOK)
 			return rc;
-		if (i == 0 && vol_info->level == hr_l_4)
+		if (i == 0 && vol_info->level == HR_LVL_4)
 			printf("          P   %d        %zu       %s\n", ext->status, i, devname);
-		else if (vol_info->level == hr_l_4)
+		else if (vol_info->level == HR_LVL_4)
 			printf("              %d        %zu       %s\n", ext->status, i, devname);
 		else
Index: uspace/srv/bd/hr/hr.c
===================================================================
--- uspace/srv/bd/hr/hr.c	(revision 6d55e39c08f9ac6a590dc2cce004774672533d4d)
+++ uspace/srv/bd/hr/hr.c	(revision 50bed55dd5e0faca9133e9d152967c4d75296bf6)
@@ -147,8 +147,8 @@
 
 	if (assemble) {
-		if (cfg->level != hr_l_empty)
+		if (cfg->level != HR_LVL_UNKNOWN)
 			log_msg(LOG_DEFAULT, LVL_WARN,
 			    "level manually set when assembling, ingoring");
-		new_volume->level = hr_l_empty;
+		new_volume->level = HR_LVL_UNKNOWN;
 	}
 
@@ -172,17 +172,17 @@
 
 	switch (new_volume->level) {
-	case hr_l_1:
+	case HR_LVL_1:
 		new_volume->hr_ops.create = hr_raid1_create;
 		new_volume->hr_ops.init = hr_raid1_init;
 		break;
-	case hr_l_0:
+	case HR_LVL_0:
 		new_volume->hr_ops.create = hr_raid0_create;
 		new_volume->hr_ops.init = hr_raid0_init;
 		break;
-	case hr_l_4:
+	case HR_LVL_4:
 		new_volume->hr_ops.create = hr_raid4_create;
 		new_volume->hr_ops.init = hr_raid4_init;
 		break;
-	case hr_l_5:
+	case HR_LVL_5:
 		new_volume->hr_ops.create = hr_raid5_create;
 		new_volume->hr_ops.init = hr_raid5_init;
Index: uspace/srv/bd/hr/raid0.c
===================================================================
--- uspace/srv/bd/hr/raid0.c	(revision 6d55e39c08f9ac6a590dc2cce004774672533d4d)
+++ uspace/srv/bd/hr/raid0.c	(revision 50bed55dd5e0faca9133e9d152967c4d75296bf6)
@@ -214,5 +214,5 @@
 	errno_t rc;
 
-	assert(new_volume->level == hr_l_0);
+	assert(new_volume->level == HR_LVL_0);
 
 	if (new_volume->dev_no < 2) {
@@ -237,5 +237,5 @@
 	uint64_t total_blkno;
 
-	assert(vol->level == hr_l_0);
+	assert(vol->level == HR_LVL_0);
 
 	rc = hr_check_devs(vol, &total_blkno, &bsize);
Index: uspace/srv/bd/hr/raid1.c
===================================================================
--- uspace/srv/bd/hr/raid1.c	(revision 6d55e39c08f9ac6a590dc2cce004774672533d4d)
+++ uspace/srv/bd/hr/raid1.c	(revision 50bed55dd5e0faca9133e9d152967c4d75296bf6)
@@ -182,5 +182,5 @@
 	errno_t rc;
 
-	assert(new_volume->level == hr_l_1);
+	assert(new_volume->level == HR_LVL_1);
 
 	if (new_volume->dev_no < 2) {
@@ -205,5 +205,5 @@
 	uint64_t total_blkno;
 
-	assert(vol->level == hr_l_1);
+	assert(vol->level == HR_LVL_1);
 
 	rc = hr_check_devs(vol, &total_blkno, &bsize);
Index: uspace/srv/bd/hr/raid4.c
===================================================================
--- uspace/srv/bd/hr/raid4.c	(revision 6d55e39c08f9ac6a590dc2cce004774672533d4d)
+++ uspace/srv/bd/hr/raid4.c	(revision 50bed55dd5e0faca9133e9d152967c4d75296bf6)
@@ -264,5 +264,5 @@
 	errno_t rc;
 
-	assert(new_volume->level == hr_l_4);
+	assert(new_volume->level == HR_LVL_4);
 
 	if (new_volume->dev_no < 3) {
@@ -287,5 +287,5 @@
 	uint64_t total_blkno;
 
-	assert(vol->level == hr_l_4);
+	assert(vol->level == HR_LVL_4);
 
 	rc = hr_check_devs(vol, &total_blkno, &bsize);
Index: uspace/srv/bd/hr/raid5.c
===================================================================
--- uspace/srv/bd/hr/raid5.c	(revision 6d55e39c08f9ac6a590dc2cce004774672533d4d)
+++ uspace/srv/bd/hr/raid5.c	(revision 50bed55dd5e0faca9133e9d152967c4d75296bf6)
@@ -276,5 +276,5 @@
 	errno_t rc;
 
-	assert(new_volume->level == hr_l_5);
+	assert(new_volume->level == HR_LVL_5);
 
 	if (new_volume->dev_no < 3) {
@@ -299,5 +299,5 @@
 	uint64_t total_blkno;
 
-	assert(vol->level == hr_l_5);
+	assert(vol->level == HR_LVL_5);
 
 	rc = hr_check_devs(vol, &total_blkno, &bsize);
Index: uspace/srv/bd/hr/superblock.c
===================================================================
--- uspace/srv/bd/hr/superblock.c	(revision 6d55e39c08f9ac6a590dc2cce004774672533d4d)
+++ uspace/srv/bd/hr/superblock.c	(revision 50bed55dd5e0faca9133e9d152967c4d75296bf6)
@@ -67,5 +67,5 @@
 
 	meta_blkno = (HR_META_OFF + HR_META_SIZE);
-	if (vol->level != hr_l_1)
+	if (vol->level != HR_LVL_1)
 		meta_blkno *= vol->dev_no;
 
