From owner-svn-src-head@FreeBSD.ORG Sat May 12 20:23:31 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 346AD1065672; Sat, 12 May 2012 20:23:31 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 09C8A8FC12; Sat, 12 May 2012 20:23:31 +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 q4CKNUqD050409; Sat, 12 May 2012 20:23:30 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4CKNUHs050406; Sat, 12 May 2012 20:23:30 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201205122023.q4CKNUHs050406@svn.freebsd.org> From: Andriy Gapon Date: Sat, 12 May 2012 20:23:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235361 - head/sys/boot/zfs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 May 2012 20:23:31 -0000 Author: avg Date: Sat May 12 20:23:30 2012 New Revision: 235361 URL: http://svn.freebsd.org/changeset/base/235361 Log: zfs boot code: use %j and uintmax_t instead %ll and uint64_t in printfs This is to silence warnings that result from different definitions of uint64_t on different architectures, specifically i386 and sparc64. MFC after: 1 month Modified: head/sys/boot/zfs/zfs.c head/sys/boot/zfs/zfsimpl.c Modified: head/sys/boot/zfs/zfs.c ============================================================================== --- head/sys/boot/zfs/zfs.c Sat May 12 20:11:35 2012 (r235360) +++ head/sys/boot/zfs/zfs.c Sat May 12 20:23:30 2012 (r235361) @@ -433,8 +433,8 @@ zfs_dev_open_spa(struct open_file *f, sp return (rv); } if (mount->objset.os_type != DMU_OST_ZFS) { - printf("Unexpected object set type %llu\n", - mount->objset.os_type); + printf("Unexpected object set type %ju\n", + (uintmax_t)mount->objset.os_type); free(mount); return (EIO); } Modified: head/sys/boot/zfs/zfsimpl.c ============================================================================== --- head/sys/boot/zfs/zfsimpl.c Sat May 12 20:11:35 2012 (r235360) +++ head/sys/boot/zfs/zfsimpl.c Sat May 12 20:23:30 2012 (r235361) @@ -32,6 +32,7 @@ __FBSDID("$FreeBSD$"); */ #include +#include #include "zfsimpl.h" #include "zfssubr.c" @@ -290,7 +291,7 @@ nvlist_print(const unsigned char *nvlist case DATA_TYPE_UINT64: { uint64_t val; xdr_uint64_t(&p, &val); - printf(" = 0x%llx\n", val); + printf(" = 0x%jx\n", (uintmax_t)val); break; } @@ -350,7 +351,7 @@ vdev_read_phys(vdev_t *vdev, const blkpt psize = size; } - /*printf("ZFS: reading %d bytes at 0x%llx to %p\n", psize, offset, buf);*/ + /*printf("ZFS: reading %d bytes at 0x%jx to %p\n", psize, (uintmax_t)offset, buf);*/ rc = vdev->v_phys_read(vdev, vdev->v_read_priv, offset, buf, psize); if (rc) return (rc); @@ -1375,7 +1376,7 @@ mzap_list(spa_t *spa, const dnode_phys_t for (i = 0; i < chunks; i++) { mze = &mz->mz_chunk[i]; if (mze->mze_name[0]) - //printf("%-32s 0x%llx\n", mze->mze_name, mze->mze_value); + //printf("%-32s 0x%jx\n", mze->mze_name, (uintmax_t)mze->mze_value); printf("%s\n", mze->mze_name); } @@ -1449,7 +1450,7 @@ fzap_list(spa_t *spa, const dnode_phys_t */ value = fzap_leaf_value(&zl, zc); - printf("%s 0x%llx\n", name, value); + printf("%s 0x%jx\n", name, (uintmax_t)value); } } @@ -1649,7 +1650,7 @@ zfs_rlookup(spa_t *spa, uint64_t objnum, *p = '\0'; if (objset_get_dnode(spa, &spa->spa_mos, objnum, &dataset)) { - printf("ZFS: can't find dataset %llu\n", objnum); + printf("ZFS: can't find dataset %ju\n", (uintmax_t)objnum); return (EIO); } ds = (dsl_dataset_phys_t *)&dataset.dn_bonus; @@ -1751,13 +1752,14 @@ zfs_mount_dataset(spa_t *spa, uint64_t o dsl_dataset_phys_t *ds; if (objset_get_dnode(spa, &spa->spa_mos, objnum, &dataset)) { - printf("ZFS: can't find dataset %llu\n", objnum); + printf("ZFS: can't find dataset %ju\n", (uintmax_t)objnum); return (EIO); } ds = (dsl_dataset_phys_t *) &dataset.dn_bonus; if (zio_read(spa, &ds->ds_bp, objset)) { - printf("ZFS: can't read object set for dataset %llu\n", objnum); + printf("ZFS: can't read object set for dataset %ju\n", + (uintmax_t)objnum); return (EIO); } @@ -1921,8 +1923,8 @@ zfs_lookup(const struct zfsmount *mount, spa = mount->spa; if (mount->objset.os_type != DMU_OST_ZFS) { - printf("ZFS: unexpected object set type %llu\n", - mount->objset.os_type); + printf("ZFS: unexpected object set type %ju\n", + (uintmax_t)mount->objset.os_type); return (EIO); }