From ab515b681b35a75302aaf6ba79cbabe4eb310136 Mon Sep 17 00:00:00 2001 From: christos Date: Sun, 28 Dec 2008 19:36:30 +0000 Subject: [PATCH] fix dev_t formats. --- usr.sbin/mtree/compare.c | 9 +++++---- usr.sbin/mtree/create.c | 7 ++++--- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/usr.sbin/mtree/compare.c b/usr.sbin/mtree/compare.c index fc76a75223c7..91da6cc340f6 100644 --- a/usr.sbin/mtree/compare.c +++ b/usr.sbin/mtree/compare.c @@ -1,4 +1,4 @@ -/* $NetBSD: compare.c,v 1.51 2007/02/04 08:03:18 elad Exp $ */ +/* $NetBSD: compare.c,v 1.52 2008/12/28 19:36:30 christos Exp $ */ /*- * Copyright (c) 1989, 1993 @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "@(#)compare.c 8.1 (Berkeley) 6/6/93"; #else -__RCSID("$NetBSD: compare.c,v 1.51 2007/02/04 08:03:18 elad Exp $"); +__RCSID("$NetBSD: compare.c,v 1.52 2008/12/28 19:36:30 christos Exp $"); #endif #endif /* not lint */ @@ -191,8 +191,9 @@ typeerr: LABEL; (s->type == F_BLOCK || s->type == F_CHAR) && s->st_rdev != p->fts_statp->st_rdev) { LABEL; - printf("%sdevice (%#x, %#x", - tab, s->st_rdev, p->fts_statp->st_rdev); + printf("%sdevice (%#llx, %#llx", + tab, (long long)s->st_rdev, + (long long)p->fts_statp->st_rdev); if (uflag) { if ((unlink(p->fts_accpath) == -1) || (mknod(p->fts_accpath, diff --git a/usr.sbin/mtree/create.c b/usr.sbin/mtree/create.c index ebee8847710e..0e9c751f3a39 100644 --- a/usr.sbin/mtree/create.c +++ b/usr.sbin/mtree/create.c @@ -1,4 +1,4 @@ -/* $NetBSD: create.c,v 1.55 2007/12/05 16:55:29 christos Exp $ */ +/* $NetBSD: create.c,v 1.56 2008/12/28 19:36:30 christos Exp $ */ /*- * Copyright (c) 1989, 1993 @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "@(#)create.c 8.1 (Berkeley) 6/6/93"; #else -__RCSID("$NetBSD: create.c,v 1.55 2007/12/05 16:55:29 christos Exp $"); +__RCSID("$NetBSD: create.c,v 1.56 2008/12/28 19:36:30 christos Exp $"); #endif #endif /* not lint */ @@ -189,7 +189,8 @@ statf(FTSENT *p) output(&indent, "mode=%#o", p->fts_statp->st_mode & MBITS); if (keys & F_DEV && (S_ISBLK(p->fts_statp->st_mode) || S_ISCHR(p->fts_statp->st_mode))) - output(&indent, "device=%#x", p->fts_statp->st_rdev); + output(&indent, "device=%#llx", + (long long)p->fts_statp->st_rdev); if (keys & F_NLINK && p->fts_statp->st_nlink != 1) output(&indent, "nlink=%u", p->fts_statp->st_nlink); if (keys & F_SIZE && S_ISREG(p->fts_statp->st_mode))