FUJITA Tomonori wrote: > On Wed, 22 Oct 2008 10:08:20 +0200 > Doron Shoham <dorons@xxxxxxxxxxxx> wrote: > >> return error if tid is not a postive integer >> >> Signed-off-by: Doron Shoham <dorons@xxxxxxxxxxxx> > > In general, this patch does the right things: > > 1. we do more strict checking > 2. we create a target whose id is 0. > > But I'm a bit worry about the latter change since I guess that some > parts of the code assume that zero tid is an error. Exept from the strict checking of tid<=0, can you remember where in the code we assume such thing? > > If you are confident that all the code can handle zero tid, it's > fine. But if not, please change this patch to handle zero tid as an > error. Before this patch, when a user gave an invalid tid number the strtol function returned 0. This caused the new target to be created with tid=0. Unless we artificially decide that target's tid cannot be 0, I don't see any problems with that. If we do want to use tid 0, we can consider update the tgt-admin script to start searching the next available tid from 0. -- To unsubscribe from this list: send the line "unsubscribe stgt" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html