Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/bin/ls PR bin/48798: fix format for ino_t.
details: https://anonhg.NetBSD.org/src/rev/9b15dfb7b430
branches: trunk
changeset: 329131:9b15dfb7b430
user: martin <martin%NetBSD.org@localhost>
date: Sat May 10 09:39:18 2014 +0000
description:
PR bin/48798: fix format for ino_t.
Slightly modifed variant of the patch provided by Thomas Schmitt.
diffstat:
bin/ls/print.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diffs (45 lines):
diff -r 384f19b02840 -r 9b15dfb7b430 bin/ls/print.c
--- a/bin/ls/print.c Fri May 09 23:26:36 2014 +0000
+++ b/bin/ls/print.c Sat May 10 09:39:18 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: print.c,v 1.54 2014/02/22 13:11:42 mlelstv Exp $ */
+/* $NetBSD: print.c,v 1.55 2014/05/10 09:39:18 martin Exp $ */
/*
* Copyright (c) 1989, 1993, 1994
@@ -37,7 +37,7 @@
#if 0
static char sccsid[] = "@(#)print.c 8.5 (Berkeley) 7/28/94";
#else
-__RCSID("$NetBSD: print.c,v 1.54 2014/02/22 13:11:42 mlelstv Exp $");
+__RCSID("$NetBSD: print.c,v 1.55 2014/05/10 09:39:18 martin Exp $");
#endif
#endif /* not lint */
@@ -46,6 +46,7 @@
#include <err.h>
#include <errno.h>
+#include <inttypes.h>
#include <fts.h>
#include <grp.h>
#include <pwd.h>
@@ -136,8 +137,7 @@
continue;
sp = p->fts_statp;
if (f_inode)
- (void)printf("%*lu ", dp->s_inode,
- (unsigned long)sp->st_ino);
+ (void)printf("%*"PRIu64" ", dp->s_inode, sp->st_ino);
if (f_size) {
if (f_humanize) {
if ((humanize_number(szbuf, sizeof(szbuf),
@@ -365,7 +365,7 @@
sp = p->fts_statp;
chcnt = 0;
if (f_inode)
- chcnt += printf("%*lu ", inodefield, (unsigned long)sp->st_ino);
+ chcnt += printf("%*"PRIu64" ", inodefield, sp->st_ino);
if (f_size) {
if (f_humanize) {
if ((humanize_number(szbuf, sizeof(szbuf), sp->st_size,
Home |
Main Index |
Thread Index |
Old Index