From owner-svn-src-all@FreeBSD.ORG Thu Sep 27 23:31:20 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1619D1065B4C; Thu, 27 Sep 2012 23:31:20 +0000 (UTC) (envelope-from mdf@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DF1518FC08; Thu, 27 Sep 2012 23:31:19 +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 q8RNVJPg024066; Thu, 27 Sep 2012 23:31:19 GMT (envelope-from mdf@svn.freebsd.org) Received: (from mdf@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8RNVJfA024060; Thu, 27 Sep 2012 23:31:19 GMT (envelope-from mdf@svn.freebsd.org) Message-Id: <201209272331.q8RNVJfA024060@svn.freebsd.org> From: Matthew D Fleming Date: Thu, 27 Sep 2012 23:31:19 +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: r241015 - in head: usr.bin/find usr.sbin/lpr/lpr usr.sbin/makefs/ffs usr.sbin/quot usr.sbin/snapinfo X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Sep 2012 23:31:20 -0000 Author: mdf Date: Thu Sep 27 23:31:19 2012 New Revision: 241015 URL: http://svn.freebsd.org/changeset/base/241015 Log: Fix usr.bin/ and usr.sbin/ build with a 64-bit ino_t. Original code by: Gleb Kurtsou Modified: head/usr.bin/find/ls.c head/usr.sbin/lpr/lpr/lpr.c head/usr.sbin/makefs/ffs/ffs_alloc.c head/usr.sbin/quot/quot.c head/usr.sbin/snapinfo/snapinfo.c Modified: head/usr.bin/find/ls.c ============================================================================== --- head/usr.bin/find/ls.c Thu Sep 27 23:31:12 2012 (r241014) +++ head/usr.bin/find/ls.c Thu Sep 27 23:31:19 2012 (r241015) @@ -63,7 +63,7 @@ printlong(char *name, char *accpath, str { char modep[15]; - (void)printf("%6lu %8"PRId64" ", (u_long) sb->st_ino, sb->st_blocks); + (void)printf("%6ju %8"PRId64" ", (uintmax_t)sb->st_ino, sb->st_blocks); (void)strmode(sb->st_mode, modep); (void)printf("%s %3u %-*s %-*s ", modep, sb->st_nlink, MAXLOGNAME - 1, user_from_uid(sb->st_uid, 0), MAXLOGNAME - 1, Modified: head/usr.sbin/lpr/lpr/lpr.c ============================================================================== --- head/usr.sbin/lpr/lpr/lpr.c Thu Sep 27 23:31:12 2012 (r241014) +++ head/usr.sbin/lpr/lpr/lpr.c Thu Sep 27 23:31:19 2012 (r241015) @@ -75,6 +75,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -386,8 +387,8 @@ main(int argc, char *argv[]) continue; /* file unreasonable */ if (sflag && (cp = linked(arg)) != NULL) { - (void) snprintf(buf, sizeof(buf), "%u %u", statb.st_dev, - statb.st_ino); + (void)snprintf(buf, sizeof(buf), "%u %ju", + statb.st_dev, (uintmax_t)statb.st_ino); card('S', buf); if (format == 'p') card('T', title ? title : arg); Modified: head/usr.sbin/makefs/ffs/ffs_alloc.c ============================================================================== --- head/usr.sbin/makefs/ffs/ffs_alloc.c Thu Sep 27 23:31:12 2012 (r241014) +++ head/usr.sbin/makefs/ffs/ffs_alloc.c Thu Sep 27 23:31:19 2012 (r241015) @@ -48,6 +48,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include "makefs.h" @@ -439,8 +440,8 @@ ffs_blkfree(struct inode *ip, daddr_t bn } cg = dtog(fs, bno); if (bno >= fs->fs_size) { - warnx("bad block %lld, ino %llu", (long long)bno, - (unsigned long long)ip->i_number); + warnx("bad block %lld, ino %ju", (long long)bno, + (uintmax_t)ip->i_number); return; } error = bread(ip->i_fd, ip->i_fs, fsbtodb(fs, cgtod(fs, cg)), Modified: head/usr.sbin/quot/quot.c ============================================================================== --- head/usr.sbin/quot/quot.c Thu Sep 27 23:31:12 2012 (r241014) +++ head/usr.sbin/quot/quot.c Thu Sep 27 23:31:19 2012 (r241015) @@ -484,8 +484,8 @@ static void donames(int fd, struct fs *super, char *name) { int c; - ino_t inode; ino_t maxino; + uintmax_t inode; union dinode *dp; maxino = super->fs_ncg * super->fs_ipg - 1; @@ -493,9 +493,9 @@ donames(int fd, struct fs *super, char * while ((c = getchar()) != EOF && (c < '0' || c > '9')) while ((c = getchar()) != EOF && c != '\n'); ungetc(c,stdin); - while (scanf("%u",&inode) == 1) { + while (scanf("%ju", &inode) == 1) { if (inode > maxino) { - warnx("illegal inode %d",inode); + warnx("illegal inode %ju", inode); return; } errno = 0; Modified: head/usr.sbin/snapinfo/snapinfo.c ============================================================================== --- head/usr.sbin/snapinfo/snapinfo.c Thu Sep 27 23:31:12 2012 (r241014) +++ head/usr.sbin/snapinfo/snapinfo.c Thu Sep 27 23:31:19 2012 (r241015) @@ -34,6 +34,7 @@ #include #include #include +#include #include #include #include @@ -149,7 +150,7 @@ compare_function(const char *path, const printf("\tsnapshot "); printf("%s", path); if (verbose) - printf(" (inode %d)", st->st_ino); + printf(" (inode %ju)", (uintmax_t)st->st_ino); printf("\n"); if (!cont_search) return (EEXIST);