diff options
author | mav <mav@FreeBSD.org> | 2013-06-11 10:06:07 +0000 |
---|---|---|
committer | mav <mav@FreeBSD.org> | 2013-06-11 10:06:07 +0000 |
commit | 0fc5c36eb63a53746d4373a5feb6ad62b6f38a8c (patch) | |
tree | 1b3e9da58ee6a642988592c2fc132291e44bc035 /sys/geom | |
parent | 9b3ee4394f7f44ae2496f5d0dff5faa3706f667f (diff) | |
download | FreeBSD-src-0fc5c36eb63a53746d4373a5feb6ad62b6f38a8c.zip FreeBSD-src-0fc5c36eb63a53746d4373a5feb6ad62b6f38a8c.tar.gz |
Don't update provider properties and don't set DISKFLAG_OPEN if d_open()
disk method call returned error. GEOM considers devices in such case as
still closed, and won't call symmetric d_close() for them.
Diffstat (limited to 'sys/geom')
-rw-r--r-- | sys/geom/geom_disk.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/geom/geom_disk.c b/sys/geom/geom_disk.c index bb7b4ce..b645040 100644 --- a/sys/geom/geom_disk.c +++ b/sys/geom/geom_disk.c @@ -138,6 +138,8 @@ g_disk_access(struct g_provider *pp, int r, int w, int e) printf("Opened disk %s -> %d\n", pp->name, error); g_disk_unlock_giant(dp); + if (error != 0) + return (error); } pp->mediasize = dp->d_mediasize; pp->sectorsize = dp->d_sectorsize; |