From owner-svn-src-all@FreeBSD.ORG Tue Nov 10 16:45:24 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0C3F3106566C; Tue, 10 Nov 2009 16:45:24 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id BDF338FC16; Tue, 10 Nov 2009 16:45:23 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id nAAGdksd023894; Tue, 10 Nov 2009 09:39:46 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Tue, 10 Nov 2009 09:39:56 -0700 (MST) Message-Id: <20091110.093956.2069119515.imp@bsdimp.com> To: nwhitehorn@freebsd.org From: "M. Warner Losh" In-Reply-To: <4AF85D75.1010605@freebsd.org> References: <200911091139.nA9BdpAU019880@svn.freebsd.org> <4AF85D75.1010605@freebsd.org> X-Mailer: Mew version 5.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, mav@freebsd.org, src-committers@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn commit: r199079 - head/sbin/camcontrol X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Nov 2009 16:45:24 -0000 In message: <4AF85D75.1010605@freebsd.org> Nathan Whitehorn writes: : Alexander Motin wrote: : > Author: mav : > Date: Mon Nov 9 11:39:51 2009 : > New Revision: 199079 : > URL: http://svn.freebsd.org/changeset/base/199079 : > : > Log: : > Add support for ATA Power Management. : > : > Modified: : > head/sbin/camcontrol/camcontrol.8 : > head/sbin/camcontrol/camcontrol.c : > : [...] : > +static int : > +atapm(struct cam_device *device, int argc, char **argv, : > + char *combinedopt, int retry_count, int timeout) : > +{ : > + union ccb *ccb; : > + int retval = 0; : > + int t = -1; : > + char c; : > : > : [...] : > + : > + while ((c = getopt(argc, argv, combinedopt)) != -1) { : > + switch (c) { : > + case 't': : > + t = atoi(optarg); : > + break; : > + default: : > + break; : > + } : > + } : This broke world on PowerPC, where char is unsigned. Could you change : the type of c to int, or explicitly mark it signed? Since it is the result of getopt, it must be int. It can't be signed char. Warner