Module Name: src Committed By: enami Date: Thu Nov 19 02:52:54 UTC 2009
Modified Files: src/usr.sbin/pstat: pstat.c Log Message: Prevent sign extension when reading device number in ufs1 on disk inode so that devname(3) correctly converts it to device filename. To generate a diff of this commit: cvs rdiff -u -r1.115 -r1.116 src/usr.sbin/pstat/pstat.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/usr.sbin/pstat/pstat.c diff -u src/usr.sbin/pstat/pstat.c:1.115 src/usr.sbin/pstat/pstat.c:1.116 --- src/usr.sbin/pstat/pstat.c:1.115 Wed Sep 16 07:27:41 2009 +++ src/usr.sbin/pstat/pstat.c Thu Nov 19 02:52:54 2009 @@ -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");