From owner-freebsd-sparc64@FreeBSD.ORG Mon Jan 18 00:07:22 2010 Return-Path: Delivered-To: freebsd-sparc64@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C98F6106566C for ; Mon, 18 Jan 2010 00:07:22 +0000 (UTC) (envelope-from pyunyh@gmail.com) Received: from qw-out-2122.google.com (qw-out-2122.google.com [74.125.92.24]) by mx1.freebsd.org (Postfix) with ESMTP id 782348FC18 for ; Mon, 18 Jan 2010 00:07:22 +0000 (UTC) Received: by qw-out-2122.google.com with SMTP id 5so522972qwd.7 for ; Sun, 17 Jan 2010 16:07:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:received:from:date:to:cc :subject:message-id:reply-to:references:mime-version:content-type :content-disposition:in-reply-to:user-agent; bh=czg5v6FjU0Pks0nrJjDiPK0nuok5Tih18VeY34ekvbQ=; b=A0Dqb+opEwvkugRvOSnVDQN1dE8yuKyTPtQPbsgqZBVjkIdE2b0XT2KVNO7V+NEqh7 jFite3lhZ5La74e4mLkXo8oLGdIgDbtiLqiVDhcYQYybde2s/0/tTddmSX00SRK2ANGi fo/19X2qIV0nOUYFSynQXagKRU60XBW3YDXjY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:date:to:cc:subject:message-id:reply-to:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; b=n1+kpnNwkXNQV/wgYmQ9cgpAQIGt7V7QUssUE0erGivb/nt4iVVny28aYphxr356Cm XAs3BO722WLKTpbSLdmqXxguUJphvtaKIF+6TRx1ydQE4uucCKXq4LyDJiFqyz3GmwQI jMORDKis8p0Q0lnLhIBMd2o2bH7u7PtB5p+1M= Received: by 10.224.86.223 with SMTP id t31mr3985043qal.267.1263773241811; Sun, 17 Jan 2010 16:07:21 -0800 (PST) Received: from pyunyh@gmail.com ([174.35.1.224]) by mx.google.com with ESMTPS id 23sm4467147qyk.3.2010.01.17.16.07.18 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 17 Jan 2010 16:07:20 -0800 (PST) Received: by pyunyh@gmail.com (sSMTP sendmail emulation); Sun, 17 Jan 2010 16:06:41 -0800 From: Pyun YongHyeon Date: Sun, 17 Jan 2010 16:06:41 -0800 To: Marius Strobl Message-ID: <20100118000641.GD1132@michelle.cdnetworks.com> References: <0334FB50-D299-4723-A36A-0228EC062D34@ameri.ca> <20100110162033.GA79724@alchemy.franken.de> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="4Ckj6UjgE2iN1+kY" Content-Disposition: inline In-Reply-To: <20100110162033.GA79724@alchemy.franken.de> User-Agent: Mutt/1.4.2.3i Cc: freebsd-sparc64@freebsd.org Subject: Re: smbfs X-BeenThere: freebsd-sparc64@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: pyunyh@gmail.com List-Id: Porting FreeBSD to the Sparc List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Jan 2010 00:07:22 -0000 --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 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--