diff options
| author | ny155746 <none@none> | 2008-06-03 22:06:31 -0700 |
|---|---|---|
| committer | ny155746 <none@none> | 2008-06-03 22:06:31 -0700 |
| commit | 2b237d4b481f3f7c7ed92fb7c78e2de888bb007a (patch) | |
| tree | 5a62f8c57d534eb8772cd6f46b843dd0ffafe1d3 /usr/src/cmd/format/checkdev.c | |
| parent | f11a3086bc0b6b242d387296efedd61d43316e8d (diff) | |
| download | illumos-joyent-2b237d4b481f3f7c7ed92fb7c78e2de888bb007a.tar.gz | |
6632563 format reports error with device in use checking, when writing a label
Diffstat (limited to 'usr/src/cmd/format/checkdev.c')
| -rw-r--r-- | usr/src/cmd/format/checkdev.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/usr/src/cmd/format/checkdev.c b/usr/src/cmd/format/checkdev.c index 071341b0f5..c72dfebf9c 100644 --- a/usr/src/cmd/format/checkdev.c +++ b/usr/src/cmd/format/checkdev.c @@ -19,7 +19,7 @@ * CDDL HEADER END */ /* - * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -339,9 +339,15 @@ checkdevinuse(char *cur_disk_path, diskaddr_t start, diskaddr_t end, int print, dm_get_slices(cur_disk_path, &slices, &error); if (error) { - err_print("Error occurred with device in use checking: %s\n", - strerror(error)); - return (found); + /* + * If ENODEV, it actually means the device is not in use. + * We will return 0 without displaying error. + */ + if (error != ENODEV) { + err_print("Error occurred with device in use" + "checking: %s\n", strerror(error)); + return (found); + } } if (slices == NULL) return (found); |
