NetBSD Problem Report #44490
From www@NetBSD.org Sun Jan 30 11:38:34 2011
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
by www.NetBSD.org (Postfix) with ESMTP id 4F31A63B874
for <gnats-bugs@gnats.NetBSD.org>; Sun, 30 Jan 2011 11:38:34 +0000 (UTC)
Message-Id: <20110130113833.423BF63B873@www.NetBSD.org>
Date: Sun, 30 Jan 2011 11:38:33 +0000 (UTC)
From: alnsn@yandex.ru
Reply-To: alnsn@yandex.ru
To: gnats-bugs@NetBSD.org
Subject: kernel doesn't build with -DLOCKF_DEBUG
X-Send-Pr-Version: www-1.0
>Number: 44490
>Category: kern
>Synopsis: kernel doesn't build with -DLOCKF_DEBUG
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: kern-bug-people
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sun Jan 30 11:40:00 +0000 2011
>Closed-Date: Mon Jan 31 08:38:01 +0000 2011
>Last-Modified: Mon Jan 31 08:38:01 +0000 2011
>Originator: Alexander Nasonov
>Release: NetBSD 5.99.34 amd64
>Organization:
home sweet home
>Environment:
NetBSD 5.99.34 amd64
>Description:
Gcc doesn't like %qx in printf.
>How-To-Repeat:
Add "options LOCKF_DEBUG" to a config file.
>Fix:
Index: sys/kern/vfs_lockf.c
===================================================================
RCS file: /cvsroot/src/sys/kern/vfs_lockf.c,v
retrieving revision 1.72
diff -u -u -r1.72 vfs_lockf.c
--- sys/kern/vfs_lockf.c 5 Aug 2009 19:39:50 -0000 1.72
+++ sys/kern/vfs_lockf.c 30 Jan 2011 01:55:29 -0000
@@ -138,11 +138,11 @@
printf("proc %d", ((struct proc *)lock->lf_id)->p_pid);
else
printf("file %p", (struct file *)lock->lf_id);
- printf(" %s, start %qx, end %qx",
+ printf(" %s, start %jd, end %jd",
lock->lf_type == F_RDLCK ? "shared" :
lock->lf_type == F_WRLCK ? "exclusive" :
lock->lf_type == F_UNLCK ? "unlock" :
- "unknown", lock->lf_start, lock->lf_end);
+ "unknown", (intmax_t)lock->lf_start, (intmax_t)lock->lf_end);
if (TAILQ_FIRST(&lock->lf_blkhd))
printf(" block %p\n", TAILQ_FIRST(&lock->lf_blkhd));
else
@@ -161,22 +161,22 @@
printf("proc %d", ((struct proc *)lf->lf_id)->p_pid);
else
printf("file %p", (struct file *)lf->lf_id);
- printf(", %s, start %qx, end %qx",
+ printf(", %s, start %jd, end %jd",
lf->lf_type == F_RDLCK ? "shared" :
lf->lf_type == F_WRLCK ? "exclusive" :
lf->lf_type == F_UNLCK ? "unlock" :
- "unknown", lf->lf_start, lf->lf_end);
+ "unknown", (intmax_t)lf->lf_start, (intmax_t)lf->lf_end);
TAILQ_FOREACH(blk, &lf->lf_blkhd, lf_block) {
if (blk->lf_flags & F_POSIX)
printf("; proc %d",
((struct proc *)blk->lf_id)->p_pid);
else
printf("; file %p", (struct file *)blk->lf_id);
- printf(", %s, start %qx, end %qx",
+ printf(", %s, start %jd, end %jd",
blk->lf_type == F_RDLCK ? "shared" :
blk->lf_type == F_WRLCK ? "exclusive" :
blk->lf_type == F_UNLCK ? "unlock" :
- "unknown", blk->lf_start, blk->lf_end);
+ "unknown", (intmax_t)blk->lf_start, (intmax_t)blk->lf_end);
if (TAILQ_FIRST(&blk->lf_blkhd))
panic("lf_printlist: bad list");
}
>Release-Note:
>Audit-Trail:
From: "David A. Holland" <dholland@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/44490 CVS commit: src/sys/kern
Date: Mon, 31 Jan 2011 08:25:32 +0000
Module Name: src
Committed By: dholland
Date: Mon Jan 31 08:25:32 UTC 2011
Modified Files:
src/sys/kern: vfs_lockf.c
Log Message:
Fix build with LOCKF_DEBUG on LP64 platforms; from Alexander Nasonov
in PR 44490.
To generate a diff of this commit:
cvs rdiff -u -r1.72 -r1.73 src/sys/kern/vfs_lockf.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
State-Changed-From-To: open->closed
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Mon, 31 Jan 2011 08:38:01 +0000
State-Changed-Why:
committed, thanks.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.