FreeBSD Bugzilla – Attachment 142393 Details for
Bug 189415
[patch] mount_smbfs missing from arm
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
file.diff
file.diff (text/plain), 1.98 KB, created by
Keith White
on 2014-05-07 12:40:00 UTC
(
hide
)
Description:
file.diff
Filename:
MIME Type:
Creator:
Keith White
Created:
2014-05-07 12:40:00 UTC
Size:
1.98 KB
patch
obsolete
>Index: contrib/smbfs/lib/smb/nb_name.c >=================================================================== >--- contrib/smbfs/lib/smb/nb_name.c (revision 265468) >+++ contrib/smbfs/lib/smb/nb_name.c (working copy) >@@ -146,14 +146,26 @@ > #define NBENCODE(c) (htole16((u_short)(((u_char)(c) >> 4) | \ > (((u_char)(c) & 0xf) << 8)) + 0x4141)) > >+#ifdef __arm__ > static void > memsetw(char *dst, int n, u_short word) > { > while (n--) { >+ ((u_char*)dst)[0] = word & 0xff; >+ ((u_char*)dst)[1] = word >> 8; >+ dst += 2; >+ } >+} >+#else >+static void >+memsetw(char *dst, int n, u_short word) >+{ >+ while (n--) { > *(u_short*)dst = word; > dst += 2; > } > } >+#endif > > int > nb_name_encode(struct nb_name *np, u_char *dst) >@@ -165,18 +177,30 @@ > *cp++ = NB_ENCNAMELEN; > name = np->nn_name; > if (name[0] == '*' && name[1] == 0) { >+#ifdef __arm__ >+ memsetw(cp, 1, NBENCODE('*')); >+#else > *(u_short*)cp = NBENCODE('*'); >+#endif > memsetw(cp + 2, NB_NAMELEN - 1, NBENCODE(' ')); > cp += NB_ENCNAMELEN; > } else { > for (i = 0; *name && i < NB_NAMELEN - 1; i++, cp += 2, name++) >+#ifdef __arm__ >+ memsetw(cp, 1, NBENCODE(toupper(*name))); >+#else > *(u_short*)cp = NBENCODE(toupper(*name)); >+#endif > i = NB_NAMELEN - i - 1; > if (i > 0) { > memsetw(cp, i, NBENCODE(' ')); > cp += i * 2; > } >+#ifdef __arm__ >+ memsetw(cp, 1, NBENCODE(np->nn_type)); >+#else > *(u_short*)cp = NBENCODE(np->nn_type); >+#endif > cp += 2; > } > *cp = 0; >Index: lib/Makefile >=================================================================== >--- lib/Makefile (revision 265468) >+++ lib/Makefile (working copy) >@@ -217,6 +217,10 @@ > _libvmmapi= libvmmapi > .endif > >+.if ${MACHINE_CPUARCH} == "arm" >+_libsmb= libsmb >+.endif >+ > .if ${MACHINE_CPUARCH} == "ia64" > _libefi= libefi > _libsmb= libsmb >Index: usr.sbin/Makefile.arm >=================================================================== >--- usr.sbin/Makefile.arm (revision 265468) >+++ usr.sbin/Makefile.arm (working copy) >@@ -2,3 +2,4 @@ > > SUBDIR+= ofwdump > SUBDIR+= kgmon >+SUBDIR+= mount_smbfs
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 189415
: 142393