Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 1 Apr 2011 20:13:26 +0400
From:      Sergey Kandaurov <pluknet@freebsd.org>
To:        Warner Losh <imp@bsdimp.com>
Cc:        Alexander Best <arundel@freebsd.org>, FreeBSD Current <freebsd-current@freebsd.org>, freebsd-hackers@freebsd.org
Subject:   Re: issue with devstat_buildmatch(3) and certain strings
Message-ID:  <AANLkTi=kyV6kikZ2dfgq=UNTuOjekoEz_OM3z4rteNft@mail.gmail.com>
In-Reply-To: <3AB0D20A-D81D-49EC-BA77-83EACC308796@bsdimp.com>
References:  <20110331210349.GA4112@freebsd.org> <AANLkTinK2u4G9m00RXUKK6C%2BBAtO7SdNNX8Er%2BY4YRNL@mail.gmail.com> <AANLkTimGGwnAORNPzDYzMD6PoHkri3NdQHht3xyVGytO@mail.gmail.com> <3AB0D20A-D81D-49EC-BA77-83EACC308796@bsdimp.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 1 April 2011 18:50, Warner Losh <imp@bsdimp.com> wrote:
> On Apr 1, 2011, at 5:40 AM, Sergey Kandaurov wrote:
>>
>> =A0=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 if (++tempstr >=3D &tstr[=
5])
>>
>> =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=
=A0=A0=A0=A0=A0=A0^^^^
>> BTW,
>> this game with pointers might prevent devstat(3) from work on big-endian=
.
>
> I'm very curious about your reasoning here.
> Warner

I meant the above comparison of pointers might not work
(I'm not sure, as I have no big-endian to test). Look:

# iostat -t da,scsi,pass
tempstr=3D0x7fffffffcfa0, &tstr[5]=3D0x7fffffffcfc8
tempstr=3D0x7fffffffcfa8, &tstr[5]=3D0x7fffffffcfc8
tempstr=3D0x7fffffffcfb0, &tstr[5]=3D0x7fffffffcfc8


D'oh.. endianness doesn't matter with arrays *blush
(Unless that's some system with decreasing memory
addressing. Ok, nevermind.)

--=20
wbr,
pluknet



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTi=kyV6kikZ2dfgq=UNTuOjekoEz_OM3z4rteNft>