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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 02 Mar 2009 15:59:54 +0200
Boaz Harrosh <bharrosh@xxxxxxxxxxx> wrote:

> FUJITA Tomonori wrote:
> > On Sun,  1 Mar 2009 18:52:26 +0200
> > Boaz Harrosh <bharrosh@xxxxxxxxxxx> 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@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux SCSI]     [Linux RAID]     [Linux Clusters]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]

  Powered by Linux