summaryrefslogtreecommitdiffstats
path: root/sys/geom/geom_disk.c
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2003-05-25 16:57:10 +0000
committerphk <phk@FreeBSD.org>2003-05-25 16:57:10 +0000
commitf716dc5d968bece30da1ce41f673a328d1d4ef9f (patch)
treef5eedc97e1dc46a459b09b57dd63901f653b7429 /sys/geom/geom_disk.c
parenta4b79b551bdacdbec0e42b72d220765c0c857449 (diff)
downloadFreeBSD-src-f716dc5d968bece30da1ce41f673a328d1d4ef9f.zip
FreeBSD-src-f716dc5d968bece30da1ce41f673a328d1d4ef9f.tar.gz
Don't do silly thing if the disk_create() event gets canceled.
Approved by: re/scottl
Diffstat (limited to 'sys/geom/geom_disk.c')
-rw-r--r--sys/geom/geom_disk.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/geom/geom_disk.c b/sys/geom/geom_disk.c
index 84ca409..83d55b2 100644
--- a/sys/geom/geom_disk.c
+++ b/sys/geom/geom_disk.c
@@ -295,12 +295,14 @@ g_disk_dumpconf(struct sbuf *sb, const char *indent, struct g_geom *gp, struct g
}
static void
-g_disk_create(void *arg, int flag __unused)
+g_disk_create(void *arg, int flag)
{
struct g_geom *gp;
struct g_provider *pp;
struct disk *dp;
+ if (flag == EV_CANCEL)
+ return;
g_topology_assert();
dp = arg;
gp = g_new_geomf(&g_disk_class, "%s%d", dp->d_name, dp->d_unit);
OpenPOWER on IntegriCloud