Index: uspace/app/fdisk/fdisk.c
===================================================================
--- uspace/app/fdisk/fdisk.c	(revision 64ffd83f5f89887b8cfde324d0603dcecba12312)
+++ uspace/app/fdisk/fdisk.c	(revision b4c8a7b739aac1e573af093827e365f4f0a49e32)
@@ -65,4 +65,6 @@
 	/** Create logical partition */
 	devac_create_log_part,
+	/** Modify partition */
+	devac_modify_part,
 	/** Delete partition */
 	devac_delete_part,
@@ -70,4 +72,12 @@
 	devac_exit
 } devac_t;
+
+/** Partition property to modify */
+typedef enum {
+	/** Modify mount point */
+	pm_mountp,
+	/** Cancel */
+	pm_cancel
+} pmprop_t;
 
 /** Confirm user selection. */
@@ -507,31 +517,4 @@
 	}
 
-	/* Ask for mount point */
-	tinput = tinput_new();
-	if (tinput == NULL) {
-		rc = ENOMEM;
-		goto error;
-	}
-
-	rc = tinput_set_prompt(tinput, "?> ");
-	if (rc != EOK)
-		goto error;
-
-	while (true) {
-		printf("Enter mount point for new partition (Auto, None or /path).\n");
-		rc = tinput_read_i(tinput, "Auto", &mountp);
-		if (rc != EOK)
-			goto error;
-
-		rc = vol_mountp_validate(mountp);
-		if (rc == EOK)
-			break;
-
-		free(mountp);
-		mountp = NULL;
-	}
-
-	tinput_destroy(tinput);
-	tinput = NULL;
 
 	fdisk_pspec_init(&pspec);
@@ -560,7 +543,14 @@
 }
 
-static errno_t fdsk_delete_part(fdisk_dev_t *dev)
+/** Add an option to choice for each partition.
+ *
+ * @param dev Fdisk device
+ * @param choice Choice to add optionts to
+ *
+ * @return EOK on sucess or error code
+ */
+static errno_t fdsk_add_part_choices(fdisk_dev_t *dev,
+    nchoice_t *choice)
 {
-	nchoice_t *choice = NULL;
 	fdisk_part_t *part;
 	fdisk_part_info_t pinfo;
@@ -570,21 +560,5 @@
 	char *sdesc = NULL;
 	const char *label;
-	bool confirm;
-	void *sel;
 	errno_t rc;
-
-	rc = nchoice_create(&choice);
-	if (rc != EOK) {
-		assert(rc == ENOMEM);
-		printf("Out of memory.\n");
-		goto error;
-	}
-
-	rc = nchoice_set_prompt(choice, "Select partition to delete");
-	if (rc != EOK) {
-		assert(rc == ENOMEM);
-		printf("Out of memory.\n");
-		goto error;
-	}
 
 	part = fdisk_part_first(dev);
@@ -656,42 +630,4 @@
 	}
 
-	rc = nchoice_add(choice, "Cancel", NULL, 0);
-	if (rc != EOK) {
-		assert(rc == ENOMEM);
-		printf("Out of memory.\n");
-		goto error;
-	}
-
-	rc = nchoice_get(choice, &sel);
-	if (rc == ENOENT)
-		return EOK;
-	if (rc != EOK) {
-		printf("Error getting user selection.\n");
-		goto error;
-	}
-
-
-	nchoice_destroy(choice);
-	choice = NULL;
-
-	if (sel == NULL)
-		return EOK;
-
-	rc = fdsk_confirm("Warning. Any data in partition will be lost. "
-	    "Really delete partition?", &confirm);
-	if (rc != EOK) {
-		printf("Error getting user confirmation.\n");
-		goto error;
-	}
-
-	if (!confirm)
-		return EOK;
-
-	rc = fdisk_part_destroy((fdisk_part_t *)sel);
-	if (rc != EOK) {
-		printf("Error deleting partition.\n");
-		return rc;
-	}
-
 	return EOK;
 error:
@@ -701,4 +637,237 @@
 	free(sdesc);
 
+	return rc;
+}
+
+/** Modify partition mount point.
+ *
+ * Run the interaction to modify a partition mount point
+ *
+ * @part Fdisk partition
+ * @return EOK on success or error code
+ */
+static errno_t fdsk_modify_mountp(fdisk_part_t *part)
+{
+	tinput_t *tinput = NULL;
+	errno_t rc;
+	char *mountp = NULL;
+
+	/* Ask for mount point */
+	tinput = tinput_new();
+	if (tinput == NULL) {
+		rc = ENOMEM;
+		goto error;
+	}
+
+	rc = tinput_set_prompt(tinput, "?> ");
+	if (rc != EOK)
+		goto error;
+
+	while (true) {
+		printf("Enter mount point for new partition (Auto, None or /path).\n");
+		rc = tinput_read_i(tinput, "Auto", &mountp);
+		if (rc != EOK)
+			goto error;
+
+		rc = vol_mountp_validate(mountp);
+		if (rc == EOK)
+			break;
+
+		free(mountp);
+		mountp = NULL;
+	}
+
+	rc = fdisk_part_set_mountp(part, mountp);
+	if (rc != EOK)
+		goto error;
+
+	free(mountp);
+
+	tinput_destroy(tinput);
+	tinput = NULL;
+	return EOK;
+error:
+	if (mountp != NULL)
+		free(mountp);
+	if (tinput != NULL)
+		tinput_destroy(tinput);
+	return rc;
+}
+
+/** Modify partition.
+ *
+ * Run the interaction to modify a partition.
+ *
+ * @param dev Fdisk device
+ * @return EOK on success or error code
+ */
+static errno_t fdsk_modify_part(fdisk_dev_t *dev)
+{
+	nchoice_t *choice = NULL;
+	fdisk_part_t *part;
+	void *sel;
+	errno_t rc;
+
+	rc = nchoice_create(&choice);
+	if (rc != EOK) {
+		assert(rc == ENOMEM);
+		printf("Out of memory.\n");
+		goto error;
+	}
+
+	rc = nchoice_set_prompt(choice, "Select partition to modify");
+	if (rc != EOK) {
+		assert(rc == ENOMEM);
+		printf("Out of memory.\n");
+		goto error;
+	}
+
+	rc = fdsk_add_part_choices(dev, choice);
+	if (rc != EOK)
+		goto error;
+
+	rc = nchoice_add(choice, "Cancel", NULL, 0);
+	if (rc != EOK) {
+		assert(rc == ENOMEM);
+		printf("Out of memory.\n");
+		goto error;
+	}
+
+	rc = nchoice_get(choice, &sel);
+	if (rc == ENOENT)
+		return EOK;
+	if (rc != EOK) {
+		printf("Error getting user selection.\n");
+		goto error;
+	}
+
+	nchoice_destroy(choice);
+	choice = NULL;
+
+	if (sel == NULL)
+		return EOK;
+
+	part = (fdisk_part_t *)sel;
+
+	rc = nchoice_create(&choice);
+	if (rc != EOK) {
+		assert(rc == ENOMEM);
+		printf("Out of memory.\n");
+		goto error;
+	}
+
+	rc = nchoice_set_prompt(choice, "Select property to modify");
+	if (rc != EOK) {
+		assert(rc == ENOMEM);
+		printf("Out of memory.\n");
+		goto error;
+	}
+
+	rc = nchoice_add(choice, "Mount point", (void *)pm_mountp, 0);
+	if (rc != EOK) {
+		assert(rc == ENOMEM);
+		printf("Out of memory.\n");
+		goto error;
+	}
+
+	rc = nchoice_add(choice, "Cancel", (void *)pm_cancel, 0);
+	if (rc != EOK) {
+		assert(rc == ENOMEM);
+		printf("Out of memory.\n");
+		goto error;
+	}
+
+	rc = nchoice_get(choice, &sel);
+	if (rc == ENOENT)
+		return EOK;
+	if (rc != EOK) {
+		printf("Error getting user selection.\n");
+		goto error;
+	}
+
+	nchoice_destroy(choice);
+	choice = NULL;
+
+	switch ((pmprop_t)sel) {
+	case pm_mountp:
+		rc = fdsk_modify_mountp(part);
+		break;
+	case pm_cancel:
+		rc = EOK;
+		break;
+	}
+
+	return rc;
+error:
+	if (choice != NULL)
+		nchoice_destroy(choice);
+	return rc;
+}
+
+static errno_t fdsk_delete_part(fdisk_dev_t *dev)
+{
+	nchoice_t *choice = NULL;
+	bool confirm;
+	void *sel;
+	errno_t rc;
+
+	rc = nchoice_create(&choice);
+	if (rc != EOK) {
+		assert(rc == ENOMEM);
+		printf("Out of memory.\n");
+		goto error;
+	}
+
+	rc = nchoice_set_prompt(choice, "Select partition to delete");
+	if (rc != EOK) {
+		assert(rc == ENOMEM);
+		printf("Out of memory.\n");
+		goto error;
+	}
+
+	rc = fdsk_add_part_choices(dev, choice);
+	if (rc != EOK)
+		goto error;
+
+	rc = nchoice_add(choice, "Cancel", NULL, 0);
+	if (rc != EOK) {
+		assert(rc == ENOMEM);
+		printf("Out of memory.\n");
+		goto error;
+	}
+
+	rc = nchoice_get(choice, &sel);
+	if (rc == ENOENT)
+		return EOK;
+	if (rc != EOK) {
+		printf("Error getting user selection.\n");
+		goto error;
+	}
+
+
+	nchoice_destroy(choice);
+	choice = NULL;
+
+	if (sel == NULL)
+		return EOK;
+
+	rc = fdsk_confirm("Warning. Any data in partition will be lost. "
+	    "Really delete partition?", &confirm);
+	if (rc != EOK) {
+		printf("Error getting user confirmation.\n");
+		goto error;
+	}
+
+	if (!confirm)
+		return EOK;
+
+	rc = fdisk_part_destroy((fdisk_part_t *)sel);
+	if (rc != EOK) {
+		printf("Error deleting partition.\n");
+		return rc;
+	}
+
+	return EOK;
+error:
 	if (choice != NULL)
 		nchoice_destroy(choice);
@@ -989,4 +1158,14 @@
 	}
 
+	if ((linfo.flags & lf_can_modify_part) != 0) {
+		rc = nchoice_add(choice, "Modify partition",
+		    (void *)devac_modify_part, 0);
+		if (rc != EOK) {
+			assert(rc == ENOMEM);
+			printf("Out of memory.\n");
+			goto error;
+		}
+	}
+
 	if ((linfo.flags & lf_can_delete_part) != 0) {
 		rc = nchoice_add(choice, "Delete partition",
@@ -1061,4 +1240,7 @@
 		(void) fdsk_create_part(dev, lpk_logical);
 		break;
+	case devac_modify_part:
+		(void) fdsk_modify_part(dev);
+		break;
 	case devac_delete_part:
 		(void) fdsk_delete_part(dev);
