Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 17 Jun 2010 11:30:40 GMT
From:      Martin Simmons <martin@lispworks.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   bin/147938: ioctl sign-extension warnings from some mt commands on 64-bit
Message-ID:  <201006171130.o5HBUeeM034301@www.freebsd.org>
Resent-Message-ID: <201006171140.o5HBe5Sr029184@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>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:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201006171130.o5HBUeeM034301>