Index: uspace/app/fdisk/fdisk.c
===================================================================
--- uspace/app/fdisk/fdisk.c	(revision 03661d192d37602b5a4a80d9df091bb800a4ba95)
+++ uspace/app/fdisk/fdisk.c	(revision 3feeab2bb1fdb0b4062cc7b3e6c493d1552814dc)
@@ -65,4 +65,32 @@
 } devac_t;
 
+static int fdsk_pcnt_fs_format(vol_part_cnt_t pcnt, vol_fstype_t fstype,
+    char **rstr)
+{
+	int rc;
+	char *s;
+
+	switch (pcnt) {
+	case vpc_empty:
+		s = str_dup("Empty");
+		if (s == NULL)
+			return ENOMEM;
+		break;
+	case vpc_fs:
+		rc = fdisk_fstype_format(fstype, &s);
+		if (rc != EOK)
+			return ENOMEM;
+		break;
+	case vpc_unknown:
+		s = str_dup("Unknown");
+		if (s == NULL)
+			return ENOMEM;
+		break;
+	}
+
+	*rstr = s;
+	return EOK;
+}
+
 /** Confirm user selection. */
 static int fdsk_confirm(const char *msg, bool *rconfirm)
@@ -538,5 +566,5 @@
 
 		if (pinfo.pkind != lpk_extended) {
-			rc = fdisk_fstype_format(pinfo.fstype, &sfstype);
+			rc = fdsk_pcnt_fs_format(pinfo.pcnt, pinfo.fstype, &sfstype);
 			if (rc != EOK) {
 				printf("Out of memory.\n");
@@ -730,5 +758,5 @@
 		}
 
-		rc = fdisk_fstype_format(pinfo.fstype, &sfstype);
+		rc = fdsk_pcnt_fs_format(pinfo.pcnt, pinfo.fstype, &sfstype);
 		if (rc != EOK) {
 			printf("Out of memory.\n");
@@ -753,15 +781,5 @@
 
 		if (pinfo.pkind != lpk_extended) {
-			switch (pinfo.pcnt) {
-			case vpc_empty:
-				printf(", Empty");
-				break;
-			case vpc_fs:
-				printf(", %s", sfstype);
-				break;
-			case vpc_unknown:
-				printf(", Unknown");
-				break;
-			}
+			printf(", %s", sfstype);
 		}
 
