Index: uspace/app/vol/vol.c
===================================================================
--- uspace/app/vol/vol.c	(revision 4285f384e4a854f4435e5f334456da415d9e1134)
+++ uspace/app/vol/vol.c	(revision 629b480c8129cdb6142f3771670d36a06e295b38)
@@ -54,58 +54,4 @@
 } vol_cmd_t;
 
-/** Find volume by current mount point. */
-static errno_t vol_cmd_part_by_mp(vol_t *vol, const char *mp,
-    service_id_t *rid)
-{
-	vol_part_info_t vinfo;
-	service_id_t *part_ids = NULL;
-	char *canon_mp_buf = NULL;
-	char *canon_mp;
-	size_t nparts;
-	size_t i;
-	errno_t rc;
-
-	canon_mp_buf = str_dup(mp);
-	if (canon_mp_buf == NULL) {
-		printf("Out of memory.\n");
-		rc = ENOMEM;
-		goto out;
-	}
-
-	canon_mp = vfs_absolutize(canon_mp_buf, NULL);
-	if (canon_mp == NULL) {
-		printf("Invalid volume path '%s'.\n", mp);
-		rc = EINVAL;
-		goto out;
-	}
-
-	rc = vol_get_parts(vol, &part_ids, &nparts);
-	if (rc != EOK) {
-		printf("Error getting list of volumes.\n");
-		goto out;
-	}
-
-	for (i = 0; i < nparts; i++) {
-		rc = vol_part_info(vol, part_ids[i], &vinfo);
-		if (rc != EOK) {
-			printf("Error getting volume information.\n");
-			rc = EIO;
-			goto out;
-		}
-
-		if (str_cmp(vinfo.cur_mp, canon_mp) == 0) {
-			*rid = part_ids[i];
-			rc = EOK;
-			goto out;
-		}
-	}
-
-	rc = ENOENT;
-out:
-	free(part_ids);
-	free(canon_mp_buf);
-	return rc;
-}
-
 static errno_t vol_cmd_eject(const char *volspec, bool physical)
 {
@@ -120,5 +66,5 @@
 	}
 
-	rc = vol_cmd_part_by_mp(vol, volspec, &part_id);
+	rc = vol_part_by_mp(vol, volspec, &part_id);
 	if (rc != EOK) {
 		printf("Error looking up volume '%s'.\n", volspec);
