bin/147938: ioctl sign-extension warnings from some mt commands on
64-bit
Martin Simmons
martin at lispworks.com
Thu Jun 17 11:40:06 UTC 2010
>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 at 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:
More information about the freebsd-bugs
mailing list