From: <vl...@us...> - 2007-07-05 14:20:22
|
Revision: 141 http://svn.sourceforge.net/scst/?rev=141&view=rev Author: vlnb Date: 2007-07-05 07:20:17 -0700 (Thu, 05 Jul 2007) Log Message: ----------- Separate block devices from non-block ones Modified Paths: -------------- trunk/scst/src/dev_handlers/scst_user.c Modified: trunk/scst/src/dev_handlers/scst_user.c =================================================================== --- trunk/scst/src/dev_handlers/scst_user.c 2007-07-02 11:36:22 UTC (rev 140) +++ trunk/scst/src/dev_handlers/scst_user.c 2007-07-05 14:20:17 UTC (rev 141) @@ -2489,7 +2489,10 @@ goto out; } - if (dev_desc->type != TYPE_TAPE) { + switch(dev_desc->type) { + case TYPE_DISK: + case TYPE_ROM: + case TYPE_MOD: if (dev_desc->block_size == 0) { PRINT_ERROR_PR("Wrong block size %d", dev_desc->block_size); res = -EINVAL; @@ -2500,8 +2503,11 @@ res = -EINVAL; goto out; } - } else + break; + default: block = dev_desc->block_size; + break; + } if (!try_module_get(THIS_MODULE)) { PRINT_ERROR_PR("%s", "Fail to get module"); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |