aboutsummaryrefslogtreecommitdiff
path: root/src/sg_format.c
diff options
context:
space:
mode:
authorDouglas Gilbert <dgilbert@interlog.com>2011-08-02 17:30:40 +0000
committerDouglas Gilbert <dgilbert@interlog.com>2011-08-02 17:30:40 +0000
commitf1d4d50712b3455c011a91f244c336552d735f6a (patch)
tree69d2772fd762e81dd9b1a1204beb386098e38715 /src/sg_format.c
parent958a8af2165226b80370858153f16bc0c2eb4aea (diff)
downloadsg3_utils-f1d4d50712b3455c011a91f244c336552d735f6a.tar.gz
sg_cmds_basic: strengthen sense key with GOOD status handling; sg_format: allow MO type
git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@410 6180dd3e-e324-4e3e-922d-17de1ae2f315
Diffstat (limited to 'src/sg_format.c')
-rw-r--r--src/sg_format.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/sg_format.c b/src/sg_format.c
index be41a468..b35014b2 100644
--- a/src/sg_format.c
+++ b/src/sg_format.c
@@ -6,7 +6,7 @@
*
* Copyright (C) 2003 Grant Grundler grundler at parisc-linux dot org
* Copyright (C) 2003 James Bottomley jejb at parisc-linux dot org
- * Copyright (C) 2005-2009 Douglas Gilbert dgilbert at interlog dot com
+ * Copyright (C) 2005-2011 Douglas Gilbert dgilbert at interlog dot com
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -45,7 +45,7 @@
#include "sg_cmds_basic.h"
#include "sg_cmds_extra.h"
-static char * version_str = "1.19 20101203";
+static char * version_str = "1.19 20110730";
#define RW_ERROR_RECOVERY_PAGE 1 /* every disk should have one */
#define FORMAT_DEV_PAGE 3 /* Format Device Mode Page [now obsolete] */
@@ -535,9 +535,10 @@ main(int argc, char **argv)
printf(" << supports protection information>>\n");
if ((0 != inq_out.peripheral_type) &&
+ (7 != inq_out.peripheral_type) &&
(0xe != inq_out.peripheral_type)) {
fprintf(stderr, "This format is only defined for disks "
- "(using SBC-2 or RBC)\n");
+ "(using SBC-2 or RBC) and MO media\n");
ret = SG_LIB_CAT_MALFORMED;
goto out;
}