mount_smbfs
Daisuke Aoyama
aoyama at peach.ne.jp
Fri Jan 23 21:28:31 UTC 2015
Thank you for a comment.
I didn't think about endian functions.
>Please use {l,b}e16dec, or if the code is suppose to be native endian,
>make it dependant on __NO_STRICT_ALIGNMENT and add the proper endian
>swap, not __arm__ as there are other arches that require the same fix...
I make a patch again for supporting BE CPU.
man page don't mention about strict alignment, if le16enc is not using byte access,
you need expand it like this:
+ le16enc(cp, le16toh(NBENCODE(toupper(*name))));
vvvvvv
+ *(cp + 0) = le16toh(NBENCODE(toupper(*name))) & 0xffU;
+ *(cp + 1) = (le16toh(NBENCODE(toupper(*name))) >> 8) & 0xffU;
--
Daisuke Aoyama
-------------- next part --------------
A non-text attachment was scrubbed...
Name: nb_name.c.patch2
Type: application/octet-stream
Size: 1257 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-arm/attachments/20150124/1f026e2f/attachment.obj>
More information about the freebsd-arm
mailing list