[stgt] [PATCH] Fix IPv6 discovery by stripping Zone ID

FUJITA Tomonori fujita.tomonori at lab.ntt.co.jp
Tue Mar 5 03:59:13 CET 2013


On Mon, 04 Mar 2013 18:34:21 -0800
Lee Duncan <lduncan at suse.com> wrote:

> 
> 
> On 03/04/2013 06:04 PM, FUJITA Tomonori wrote:
>> On Mon,  4 Mar 2013 15:15:57 -0800
>> Lee Duncan <lduncan at suse.com> wrote:
>> 
>>> This strips off the "%ZONEID" that can be at the end of IPv6
>> 
>> 'Can' means that possibly the string doesn't exist, right? The
>> following code works in such case?
> 
> Yes, correct. The strsep() only puts a NULL in the string if it finds
> any tokens from the supplied list, "%" in this case. Otherwise, the
> string is untouched.

Hmm, looks like the man page says different

https://www.kernel.org/doc/man-pages/online/pages/man3/strsep.3.html

In case no delimiter was found, the token is taken to be the entire
string *stringp, and *stringp is made NULL.

--
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