Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.sbin/pstat Prevent sign extension when reading device nu...
details: https://anonhg.NetBSD.org/src/rev/0787f1b4d6e4
branches: trunk
changeset: 749148:0787f1b4d6e4
user: enami <enami%NetBSD.org@localhost>
date: Thu Nov 19 02:52:54 2009 +0000
description:
Prevent sign extension when reading device number in ufs1 on disk inode
so that devname(3) correctly converts it to device filename.
diffstat:
usr.sbin/pstat/pstat.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (27 lines):
diff -r 791fcf25ecdc -r 0787f1b4d6e4 usr.sbin/pstat/pstat.c
--- a/usr.sbin/pstat/pstat.c Thu Nov 19 00:30:25 2009 +0000
+++ b/usr.sbin/pstat/pstat.c Thu Nov 19 02:52:54 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pstat.c,v 1.115 2009/09/16 07:27:41 mlelstv Exp $ */
+/* $NetBSD: pstat.c,v 1.116 2009/11/19 02:52:54 enami Exp $ */
/*-
* Copyright (c) 1980, 1991, 1993, 1994
@@ -39,7 +39,7 @@
#if 0
static char sccsid[] = "@(#)pstat.c 8.16 (Berkeley) 5/9/95";
#else
-__RCSID("$NetBSD: pstat.c,v 1.115 2009/09/16 07:27:41 mlelstv Exp $");
+__RCSID("$NetBSD: pstat.c,v 1.116 2009/11/19 02:52:54 enami Exp $");
#endif
#endif /* not lint */
@@ -491,7 +491,7 @@
if (ump.um_fstype == UFS1) {
KGETRET(ip->i_din.ffs1_din, &dip, sizeof (struct ufs1_dinode),
"inode's dinode");
- rdev = dip.dp1.di_rdev;
+ rdev = (uint32_t)dip.dp1.di_rdev;
} else {
KGETRET(ip->i_din.ffs2_din, &dip, sizeof (struct ufs2_dinode),
"inode's UFS2 dinode");
Home |
Main Index |
Thread Index |
Old Index