diff options
author | cg149915 <none@none> | 2006-02-12 18:34:23 -0800 |
---|---|---|
committer | cg149915 <none@none> | 2006-02-12 18:34:23 -0800 |
commit | 0167b58cea98965c58fab4be4e690b6e456f7440 (patch) | |
tree | ce95848e01ff762edd1c89304f9881b61db127e8 /usr/src/lib/libdiskmgt/common/findevs.c | |
parent | 7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fe (diff) | |
download | illumos-joyent-0167b58cea98965c58fab4be4e690b6e456f7440.tar.gz |
PSARC 2005/731 hotpluggable disk support
6348407 Enable EFI partitions and device ID supports for hotpluggable devices
Diffstat (limited to 'usr/src/lib/libdiskmgt/common/findevs.c')
-rw-r--r-- | usr/src/lib/libdiskmgt/common/findevs.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/usr/src/lib/libdiskmgt/common/findevs.c b/usr/src/lib/libdiskmgt/common/findevs.c index 9c55ee7e2d..5a5bd4fc15 100644 --- a/usr/src/lib/libdiskmgt/common/findevs.c +++ b/usr/src/lib/libdiskmgt/common/findevs.c @@ -20,7 +20,7 @@ * CDDL HEADER END */ /* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -56,6 +56,7 @@ #define PROD_ID_PROP "inquiry-product-id" #define PROD_ID_USB_PROP "usb-product-name" #define REMOVABLE_PROP "removable-media" +#define HOTPLUGGABLE_PROP "hotpluggable" #define SCSI_OPTIONS_PROP "scsi-options" #define VENDOR_ID_PROP "inquiry-vendor-id" #define VENDOR_ID_USB_PROP "usb-vendor-name" @@ -973,10 +974,20 @@ create_disk(char *deviceid, char *kernel_name, struct search_args *args) diskp->drv_type = DM_DT_FLOPPY; diskp->removable = 1; } else { - /* not a "CD-ROM" or Floppy */ + /* not a "CD-ROM" or Floppy */ diskp->removable = get_prop(REMOVABLE_PROP, args->node); if (diskp->removable == -1) { + /* + * This is a workaround. Hotpluggable devices don't export + * a "removable-media" property, but they are treated as + * removable media devices by vold to implement automount. + * Once vold is EOL'ed, it should be removed. + */ + diskp->removable = get_prop(HOTPLUGGABLE_PROP, args->node); + } + + if (diskp->removable == -1) { diskp->removable = 0; #if defined(i386) || defined(__amd64) /* |