summaryrefslogtreecommitdiff
path: root/usr/src
diff options
context:
space:
mode:
authorphitran <none@none>2006-10-27 17:25:46 -0700
committerphitran <none@none>2006-10-27 17:25:46 -0700
commitdd97b1d649428a0da2553d75f71a56bd2a00a06c (patch)
treefd7a0017397b3f8b47e3780eb1d997a98e5ee3aa /usr/src
parent6bdb8e6668c46f69f3d8d2987cbedf475ccdea3c (diff)
downloadillumos-joyent-dd97b1d649428a0da2553d75f71a56bd2a00a06c.tar.gz
6485290 rmformat should check for hotpluggable property
Diffstat (limited to 'usr/src')
-rw-r--r--usr/src/cmd/rmformat/rmf_misc.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/usr/src/cmd/rmformat/rmf_misc.c b/usr/src/cmd/rmformat/rmf_misc.c
index 6d0a65205b..320e8fde0f 100644
--- a/usr/src/cmd/rmformat/rmf_misc.c
+++ b/usr/src/cmd/rmformat/rmf_misc.c
@@ -1156,7 +1156,9 @@ find_device(int defer, char *tmpstr)
struct dirent *dirent;
char sdev[PATH_MAX], dev[PATH_MAX], *pname;
device_t *t_dev;
- int removable, device_type;
+ int removable = 0;
+ int device_type = 0;
+ int hotpluggable = 0;
struct dk_minfo mediainfo;
static int found = 0;
@@ -1255,8 +1257,10 @@ find_device(int defer, char *tmpstr)
device_type = mediainfo.dki_media_type;
}
- if (!ioctl(t_dev->d_fd, DKIOCREMOVABLE, &removable)) {
- if (removable) {
+ if (!ioctl(t_dev->d_fd, DKIOCREMOVABLE, &removable) &&
+ !ioctl(t_dev->d_fd, DKIOCHOTPLUGGABLE,
+ &hotpluggable)) {
+ if (removable || hotpluggable) {
removable_found++;
pname = get_physical_name(sdev);
if (sn) {