[stgt] [PATCH 10/15] tgt: os.h: getnameinfo() is different on none-Linux systems

FUJITA Tomonori fujita.tomonori at lab.ntt.co.jp
Mon Mar 2 15:24:31 CET 2009


On Mon, 02 Mar 2009 15:59:54 +0200
Boaz Harrosh <bharrosh at panasas.com> wrote:

> FUJITA Tomonori wrote:
> > On Sun,  1 Mar 2009 18:52:26 +0200
> > Boaz Harrosh <bharrosh at panasas.com> wrote:
> >> +			if (ret) {
> >> +				eprintf("getnameinfo Faild=>%d: %s\n",
> >> +					ret, gai_strerror(ret));
> >> +				/* Let failure show in target traces */
> >> +				strcpy(p, "getnameinfo_Faild");
> > 
> > Hmm, you put "getnameinfo_Faild" in a buffer that will be sent to an
> > initiator? If so, it's unacceptable. Just use eprintf.
> > 
> 
> Otherwise this is very confusing to debug because the initiator gets
> half an address, and tries to go on and only fails down the ladder later
> which makes it hard to understand what fails. This way It showed in initiator
> traces and it is easy to diagnose.
> 
> I got this idea from your code, just below you do:
> 	text_key_add(conn, key, "NotUnderstood");

"NotUnderstood" is legal in the iSCSI RFC. Anything that is not the
RFC is unacceptable.

> Should we do something like this? Is there a protocol text_key_add()
> we can use to denote proper failure here?

--
To unsubscribe from this list: send the line "unsubscribe stgt" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html



More information about the stgt mailing list