diff options
author | sjelinek <none@none> | 2005-10-27 09:01:18 -0700 |
---|---|---|
committer | sjelinek <none@none> | 2005-10-27 09:01:18 -0700 |
commit | 3e1bd7a2aaeb6188caef90679b98088cfef1edc6 (patch) | |
tree | f96d6ce4a25ea39514dd8b1fd2a23978cabc5055 /usr/src/lib/libdiskmgt/common/slice.c | |
parent | 108322fb1c3ed341aba9c80c9774df0ed9e35768 (diff) | |
download | illumos-joyent-3e1bd7a2aaeb6188caef90679b98088cfef1edc6.tar.gz |
PSARC 2004/776 device checking for fs utilities
PSARC 2005/461 Device in use checking environment variables
5084421 libdiskmgt needs to detect in use ZFS data
5085739 remove workaround for bug 4725434
6194015 Device in use checking for Solaris utilities-PSARC/2004/776
6261853 libdiskmgt does not work correctly in all cases on amd64
6268374 libdiskmgt allocates incorrect size for readdir_r() dirent argument
6291309 PSARC/2005/461 - libdiskmgt should enable bypassing of inuse checking
6301815 PSARC/2005/461-Need Sun private libdiskmgt flag for use during install to disable sysevent starting
--HG--
rename : usr/src/cmd/format/checkmount.c => usr/src/cmd/format/checkdev.c
rename : usr/src/cmd/format/checkmount.h => usr/src/cmd/format/checkdev.h
Diffstat (limited to 'usr/src/lib/libdiskmgt/common/slice.c')
-rw-r--r-- | usr/src/lib/libdiskmgt/common/slice.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/usr/src/lib/libdiskmgt/common/slice.c b/usr/src/lib/libdiskmgt/common/slice.c index 607efeb120..c88c0a31c9 100644 --- a/usr/src/lib/libdiskmgt/common/slice.c +++ b/usr/src/lib/libdiskmgt/common/slice.c @@ -20,7 +20,7 @@ * CDDL HEADER END */ /* - * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * Copyright 2005 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -60,6 +60,7 @@ static struct inuse_detectors { } detectors[] = { {inuse_mnt, DM_USE_MOUNT}, {inuse_svm, DM_USE_SVM}, + {inuse_zpool, DM_USE_ZPOOL}, {inuse_lu, DM_USE_LU}, {inuse_dump, DM_USE_DUMP}, {inuse_vxvm, DM_USE_VXVM}, @@ -453,10 +454,6 @@ get_attrs(descriptor_t *dp, int fd, nvlist_t *attrs) /* First make sure media is inserted and spun up. */ if (!media_read_info(fd, &minfo)) { -#ifdef i386 - /* XXX Work around bug 4725434 */ - if (dp->p.disk->removable) -#endif return (ENODEV); } @@ -838,7 +835,7 @@ get_removable_assocs(descriptor_t *desc, char *volm_path, int *errp) struct dirent *dentp; dentp = (struct dirent *)malloc(sizeof (struct dirent) + - _PC_NAME_MAX + 1); + PATH_MAX + 1); if (dentp != NULL) { #ifdef _LP64 while (readdir_r(dirp, dentp, &result) != NULL) { @@ -1092,7 +1089,7 @@ make_volm_dir_descriptors(disk_t *dp, int dirfd, char *volm_path) error = 0; dentp = (struct dirent *)malloc(sizeof (struct dirent) + - _PC_NAME_MAX + 1); + PATH_MAX + 1); if (dentp != NULL) { #ifdef _LP64 while (readdir_r(dirp, dentp, &result) != NULL) { @@ -1284,7 +1281,7 @@ match_removable_name(disk_t *diskp, char *name, int *errp) slice_rdsk2dsk(volm_path, devpath, sizeof (devpath)); dentp = (struct dirent *)malloc(sizeof (struct dirent) + - _PC_NAME_MAX + 1); + PATH_MAX + 1); if (dentp != NULL) { #ifdef _LP64 while (readdir_r(dirp, dentp, &result) != NULL) { @@ -1361,7 +1358,7 @@ num_removable_slices(int fd, struct stat *bufp, char *volm_path) slice_rdsk2dsk(volm_path, devpath, sizeof (devpath)); dentp = (struct dirent *)malloc(sizeof (struct dirent) + - _PC_NAME_MAX + 1); + PATH_MAX + 1); if (dentp != NULL) { #ifdef _LP64 while (readdir_r(dirp, dentp, &result) != NULL) { |