Print this page
6581 cmd/format should be able label virtio BLKDEV drives
Reviewed by: Hans Rosenfeld <hans.rosenfeld@nexenta.com>
Reviewed by: Toomas Soome <tsoome@me.com>
@@ -21,10 +21,11 @@
/*
* Copyright (c) 1993, 2010, Oracle and/or its affiliates. All rights reserved.
* Copyright 2012 Milan Jurik. All rights reserved.
* Copyright 2014 Toomas Soome <tsoome@me.com>
* Copyright 2015 Nexenta Systems, Inc. All rights reserved.
+ * Copyright 2016 Igor Kozhukhov <ikozhukhov@gmail.com>
*/
/*
* This file contains functions that implement the command menu commands.
*/
@@ -1619,11 +1620,12 @@
#endif
(void) memset((char *)&label, 0, sizeof (struct dk_label));
(void) strcpy(x86_devname, cur_disk->disk_name);
- if (cur_ctype->ctype_ctype == DKC_DIRECT)
+ if (cur_ctype->ctype_ctype == DKC_DIRECT ||
+ cur_ctype->ctype_ctype == DKC_BLKDEV)
dptr = auto_direct_get_geom_label(cur_file, &label);
else
dptr = auto_sense(cur_file, 1, &label);
if (dptr == NULL) {
fmt_print("Autoconfiguration failed.\n");