--- old/usr/src/cmd/hal/hald/solaris/devinfo_storage.c	2014-05-05 22:34:22.259636310 +0100
+++ new/usr/src/cmd/hal/hald/solaris/devinfo_storage.c	2014-05-05 22:34:22.269223643 +0100
@@ -4,6 +4,7 @@
  *
  * Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
+ * Copyright 2014 Andrew Stormont.
  *
  * Licensed under the Academic Free License version 2.1
  *
@@ -81,8 +82,7 @@
 
 static char *devinfo_scsi_dtype2str(int dtype);
 static char *devinfo_volume_get_slice_name (char *devlink);
-static gboolean dos_to_dev(char *path, char **devpath, int *partnum);
-static gboolean is_dos_path(char *path, int *partnum);
+static boolean_t is_dos_slice(const char *slice, int *partnum);
 
 static void devinfo_storage_set_nicknames (HalDevice *d);
 
@@ -859,14 +859,6 @@
 			continue;
 		}
 
-		/* ignore p1..N - we'll use p0:N instead */
-		if ((strlen (slice) > 1) && (slice[0] == 'p') && isdigit(slice[1]) &&
-		    ((atol(&slice[1])) > 0)) {
-			free (devlink);
-			di_devfs_path_free (minor_path);
-			continue;
-		}
-
 		m = devinfo_storage_new_minor(minor_path, slice, devlink, dev, -1);
 		if (m == NULL) {
 			free (devlink);
@@ -913,20 +905,6 @@
 		devinfo_add_enqueue (parent, maindev_path, &devinfo_storage_handler);
 	}
 
-	/* add virtual dos volumes to enable pcfs probing */
-	if (!is_cdrom) {
-		doslink_len = strlen (maindev->devlink) + sizeof (":NNN") + 1;
-		if ((doslink = (char *)calloc (1, doslink_len)) != NULL) {
-			for (i = 1; i < 16; i++) {
-				snprintf(dospath, sizeof (dospath), "%s:%d", maindev->slice, i);
-				snprintf(doslink, doslink_len, "%s:%d", maindev->devlink, i);
-				m = devinfo_storage_new_minor(maindev_path, dospath, doslink, maindev->dev, i);
-				g_queue_push_tail (mq, m);
-			}
-			free (doslink);
-		}
-	}
-
 	maindev_is_d0 = (strcmp (maindev->slice, "d0") == 0);
 
 	/* enqueue all volumes */
@@ -1077,7 +1055,7 @@
 	whole_disk = hal_device_has_capability (storage_d,
 	    "storage.cdrom") ? "s2" : WHOLE_DISK;
 
-	if (is_dos_path(block_device, &dos_num)) {
+	if (is_dos_slice(slice, &dos_num)) {
 		/* don't probe more dos volumes than probe-storage found */
 		if ((hal_device_property_get_bool (storage_d, "storage.no_partitions_hint") ||
 		    (dos_num > hal_device_property_get_int (storage_d, "storage.solaris.num_dos_partitions")))) {
@@ -1398,32 +1376,17 @@
 	}
 }
 
-static gboolean
-is_dos_path(char *path, int *partnum)
+static boolean_t
+is_dos_slice(const char *slice, int *partnum)
 {
 	char *p;
 
-	if ((p = strrchr (path, ':')) == NULL) {
-		return (FALSE);
+	if ((p = strrchr(slice, 'p')) == NULL &&
+	    (p = strrchr(slice, ':')) == NULL) {
+		return (B_FALSE);
 	}
-	return ((*partnum = atoi(p + 1)) != 0);
-}
-
-static gboolean
-dos_to_dev(char *path, char **devpath, int *partnum)
-{
-	char *p;
 
-	if ((p = strrchr (path, ':')) == NULL) {
-		return (FALSE);
-	}
-	if ((*partnum = atoi(p + 1)) == 0) {
-		return (FALSE);
-	}
-	p[0] = '\0';
-	*devpath = strdup(path);
-	p[0] = ':';
-	return (*devpath != NULL);
+	return ((*partnum = atoi(p + 1)) != 0);
 }
 
 static void
--- old/usr/src/cmd/hal/utils/fsutils.c	2014-05-05 22:34:22.472339699 +0100
+++ new/usr/src/cmd/hal/utils/fsutils.c	2014-05-05 22:34:22.480083961 +0100
@@ -5,6 +5,8 @@
  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  *
+ * Copyright 2014 Andrew Stormont.
+ *
  * Licensed under the Academic Free License version 2.1
  *
  */
@@ -33,22 +35,31 @@
 
 /*
  * Separates dos notation device spec into device and drive number
+ *     pN partition names are rewritten to point to p0
+ *     :N partition names are dropped
  */
 boolean_t
 dos_to_dev(char *path, char **devpath, int *num)
 {
-	char *p;
+	int i;
+	char *buf;
+	boolean_t found = B_FALSE;
 
-	if ((p = strrchr(path, ':')) == NULL) {
-		return (B_FALSE);
+	for (i = strlen(path); i > 0; i--) {
+		if (path[i] == 'p' || path[i] == ':') {
+			found = B_TRUE;
+			break;
+		}
 	}
-	if ((*num = atoi(p + 1)) == 0) {
+
+	if (found == B_FALSE || (*num = atoi(path + i + 1)) == 0 ||
+	    (buf = strdup(path)) == NULL) {
 		return (B_FALSE);
 	}
-	p[0] = '\0';
-	*devpath = strdup(path);
-	p[0] = ':';
-	return (*devpath != NULL);
+
+	(void) strcpy(buf + i, path[i] == 'p' ? "p0" : "");
+	*devpath = buf;
+	return (B_TRUE);
 }
 
 char *
