From owner-svn-src-stable@FreeBSD.ORG Sun May 13 02:09:28 2012 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 26199106566C; Sun, 13 May 2012 02:09:28 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 103F78FC08; Sun, 13 May 2012 02:09:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4D29RH5062204; Sun, 13 May 2012 02:09:27 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4D29RxA062202; Sun, 13 May 2012 02:09:27 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201205130209.q4D29RxA062202@svn.freebsd.org> From: Alexander Motin Date: Sun, 13 May 2012 02:09:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235387 - stable/8/sys/geom/multipath X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 May 2012 02:09:28 -0000 Author: mav Date: Sun May 13 02:09:27 2012 New Revision: 235387 URL: http://svn.freebsd.org/changeset/base/235387 Log: MFC r235069: Fix `gmultipath configure` for big-endian machines. Modified: stable/8/sys/geom/multipath/g_multipath.c Directory Properties: stable/8/sys/ (props changed) Modified: stable/8/sys/geom/multipath/g_multipath.c ============================================================================== --- stable/8/sys/geom/multipath/g_multipath.c Sun May 13 01:59:50 2012 (r235386) +++ stable/8/sys/geom/multipath/g_multipath.c Sun May 13 02:09:27 2012 (r235387) @@ -942,7 +942,7 @@ g_multipath_ctl_configure(struct gctl_re struct g_geom *gp; struct g_consumer *cp; struct g_provider *pp; - struct g_multipath_metadata *md; + struct g_multipath_metadata md; const char *name; int error, *val; void *buf; @@ -978,14 +978,15 @@ g_multipath_ctl_configure(struct gctl_re return; } g_topology_unlock(); - md = buf = g_malloc(pp->sectorsize, M_WAITOK | M_ZERO); - strlcpy(md->md_magic, G_MULTIPATH_MAGIC, sizeof(md->md_magic)); - memcpy(md->md_uuid, sc->sc_uuid, sizeof (sc->sc_uuid)); - strlcpy(md->md_name, name, sizeof(md->md_name)); - md->md_version = G_MULTIPATH_VERSION; - md->md_size = pp->mediasize; - md->md_sectorsize = pp->sectorsize; - md->md_active_active = sc->sc_active_active; + buf = g_malloc(pp->sectorsize, M_WAITOK | M_ZERO); + strlcpy(md.md_magic, G_MULTIPATH_MAGIC, sizeof(md.md_magic)); + memcpy(md.md_uuid, sc->sc_uuid, sizeof (sc->sc_uuid)); + strlcpy(md.md_name, name, sizeof(md.md_name)); + md.md_version = G_MULTIPATH_VERSION; + md.md_size = pp->mediasize; + md.md_sectorsize = pp->sectorsize; + md.md_active_active = sc->sc_active_active; + multipath_metadata_encode(&md, buf); error = g_write_data(cp, pp->mediasize - pp->sectorsize, buf, pp->sectorsize); g_topology_lock();