From owner-freebsd-bugs@FreeBSD.ORG Thu Jun 17 11:40:06 2010 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4FCAA1065672 for ; Thu, 17 Jun 2010 11:40:06 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 131DE8FC21 for ; Thu, 17 Jun 2010 11:40:06 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id o5HBe51j029185 for ; Thu, 17 Jun 2010 11:40:05 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id o5HBe5Sr029184; Thu, 17 Jun 2010 11:40:05 GMT (envelope-from gnats) Resent-Date: Thu, 17 Jun 2010 11:40:05 GMT Resent-Message-Id: <201006171140.o5HBe5Sr029184@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Martin Simmons Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 162D01065679 for ; Thu, 17 Jun 2010 11:30:41 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21]) by mx1.freebsd.org (Postfix) with ESMTP id 04F088FC0A for ; Thu, 17 Jun 2010 11:30:41 +0000 (UTC) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.14.3/8.14.3) with ESMTP id o5HBUeNA034302 for ; Thu, 17 Jun 2010 11:30:40 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.14.3/8.14.3/Submit) id o5HBUeeM034301; Thu, 17 Jun 2010 11:30:40 GMT (envelope-from nobody) Message-Id: <201006171130.o5HBUeeM034301@www.freebsd.org> Date: Thu, 17 Jun 2010 11:30:40 GMT From: Martin Simmons To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: bin/147938: ioctl sign-extension warnings from some mt commands on 64-bit X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Jun 2010 11:40:06 -0000 >Number: 147938 >Category: bin >Synopsis: ioctl sign-extension warnings from some mt commands on 64-bit >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu Jun 17 11:40:05 UTC 2010 >Closed-Date: >Last-Modified: >Originator: Martin Simmons >Release: 8.0-RELEASE-p2 >Organization: >Environment: FreeBSD lwfs1-cam.cam.lispworks.com 8.0-RELEASE-p2 FreeBSD 8.0-RELEASE-p2 #0: Tue Jan 5 21:11:58 UTC 2010 root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC amd64 >Description: On amd64, some of the mt commands cause a message to be logged to syslog, such as +WARNING pid 31794 (mt): ioctl sign-extension ioctl ffffffff80046d08 >How-To-Repeat: mt seteotmodel 1 >Fix: The c_code field in the command structure in /usr/src/usr.bin/mt/mt.c needs to be unsigned long to match the type of the second argument to ioctl as in the attached patch. Patch attached with submission follows: --- usr.bin/mt/mt.c.orig 2009-10-25 01:10:29.000000000 +0000 +++ usr.bin/mt/mt.c 2010-06-17 12:04:10.618188834 +0100 @@ -79,7 +79,7 @@ struct commands { const char *c_name; - int c_code; + unsigned long c_code; int c_ronly; int c_flags; } com[] = { >Release-Note: >Audit-Trail: >Unformatted: