Date: Sun, 17 Jan 2010 16:06:41 -0800 From: Pyun YongHyeon <pyunyh@gmail.com> To: Marius Strobl <marius@alchemy.franken.de> Cc: freebsd-sparc64@freebsd.org Subject: Re: smbfs Message-ID: <20100118000641.GD1132@michelle.cdnetworks.com> In-Reply-To: <20100110162033.GA79724@alchemy.franken.de> References: <0334FB50-D299-4723-A36A-0228EC062D34@ameri.ca> <20100110162033.GA79724@alchemy.franken.de>
next in thread | previous in thread | raw e-mail | index | archive | help
--4Ckj6UjgE2iN1+kY Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Sun, Jan 10, 2010 at 05:20:33PM +0100, Marius Strobl wrote: > On Fri, Jan 08, 2010 at 08:49:30AM -0500, brad dreisbach wrote: > > what is the status of smbfs support in the sparc64 port? > > AFAICT it's still unchanged from last Februrary: > http://lists.freebsd.org/pipermail/freebsd-sparc64/2009-February/006189.html > It still would be interesting to know how far the kernel part > actually gets these days on sparc64. > >From my very limited testing, it seems to work. Since smbfs related libraries and kernel module are not installed by default you may have to use attached patch and rebuild all or manually build/install required files. Marius, since other strict alignment architectures like ia64 or powerpc enabled smbfs, I guess it's ok to enable smbfs on sparc64. What's your opinion? The attached patch also fixes an endian bug of smbutil(1). --4Ckj6UjgE2iN1+kY Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="smbfs.sparc64.diff" Index: contrib/smbfs/smbutil/view.c =================================================================== --- contrib/smbfs/smbutil/view.c (revision 202534) +++ contrib/smbfs/smbutil/view.c (working copy) @@ -69,6 +69,7 @@ struct smb_ctx sctx, *ctx = &sctx; struct smb_share_info_1 *rpbuf, *ep; char *cp; + u_int32_t remark; u_int16_t type; int error, opt, bufsize, i, entries, total; @@ -117,11 +118,13 @@ } for (ep = rpbuf, i = 0; i < entries; i++, ep++) { type = le16toh(ep->shi1_type); + remark = le32toh(ep->shi1_remark); + remark &= 0xFFFF; - cp = (char*)rpbuf + ep->shi1_remark; + cp = (char*)rpbuf + remark; printf("%-12s %-10s %s\n", ep->shi1_netname, shtype[min(type, sizeof shtype / sizeof(char *) - 1)], - ep->shi1_remark ? nls_str_toloc(cp, cp) : ""); + remark ? nls_str_toloc(cp, cp) : ""); } printf("\n%d shares listed from %d available\n", entries, total); free(rpbuf); Index: lib/Makefile =================================================================== --- lib/Makefile (revision 202534) +++ lib/Makefile (working copy) @@ -120,6 +120,10 @@ _libsmb= libsmb .endif +.if ${MACHINE_ARCH} == "sparc64" +_libsmb= libsmb +.endif + .if ${MK_OPENSSL} != "no" _libmp= libmp .endif Index: usr.bin/Makefile =================================================================== --- usr.bin/Makefile (revision 202534) +++ usr.bin/Makefile (working copy) @@ -386,4 +386,8 @@ _smbutil= smbutil .endif +.if ${MACHINE_ARCH} == "sparc64" +_smbutil= smbutil +.endif + .include <bsd.subdir.mk> Index: usr.sbin/Makefile =================================================================== --- usr.sbin/Makefile (revision 202534) +++ usr.sbin/Makefile (working copy) @@ -512,6 +512,7 @@ .if ${MACHINE_ARCH} == "sparc64" _eeprom= eeprom +_mount_smbfs= mount_smbfs _ofwdump= ofwdump .endif Index: sys/modules/Makefile =================================================================== --- sys/modules/Makefile (revision 202534) +++ sys/modules/Makefile (working copy) @@ -615,6 +615,7 @@ .if ${MK_CDDL} != "no" || defined(ALL_MODULES) _opensolaris= opensolaris .endif +_smbfs= smbfs _sound= sound .if ${MK_ZFS} != "no" || defined(ALL_MODULES) _zfs= zfs --4Ckj6UjgE2iN1+kY--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20100118000641.GD1132>