From owner-freebsd-arch Mon Jun 4 12:24:49 2001 Delivered-To: freebsd-arch@freebsd.org Received: from mail.disney.com (mail.disney.com [204.128.192.15]) by hub.freebsd.org (Postfix) with ESMTP id DAB2437B401 for ; Mon, 4 Jun 2001 12:24:43 -0700 (PDT) (envelope-from Jim.Pirzyk@disney.com) Received: from pain10.corp.disney.com (root@pain10.corp.disney.com [153.7.110.100]) by mail.disney.com (Switch-2.0.1/Switch-2.0.1) with SMTP id f54JO4A07497 for ; Mon, 4 Jun 2001 12:24:04 -0700 (PDT) Received: from [172.30.50.1] by pain.corp.disney.com with ESMTP for freebsd-arch@freebsd.org; Mon, 4 Jun 2001 12:25:18 -0700 Received: from mercury.fan.fa.disney.com (mercury.fan.fa.disney.com [153.7.119.1]) by louie.fa.disney.com (8.9.2/8.9.2) with ESMTP id MAA25466 for ; Mon, 4 Jun 2001 12:24:27 -0700 (PDT) (envelope-from Jim.Pirzyk@disney.com) Received: from snoopy.fan.fa.disney.com by mercury.fan.fa.disney.com for freebsd-arch@freebsd.org; Mon, 4 Jun 2001 12:24:27 -0700 Content-Type: text/plain; charset="us-ascii" From: Jim Pirzyk Organization: Walt Disney Feature Animation To: freebsd-arch@freebsd.org Subject: sysctl interger type max Date: Mon, 4 Jun 2001 12:24:27 -0700 X-Mailer: KMail [version 1.2] MIME-Version: 1.0 Message-Id: <01060412242703.00744@snoopy> Content-Transfer-Encoding: 8bit Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG In sysctl(8), you can set an integer type, but the max value an int can be is 2 * N-1 where N is the size of int. This leads to a problem when trying to set kern.hostid and the number is greater that 2GB on an IA32 system. So my question is should CTLTYPE_INT be treated as a long or some other larger numeric number? Or should we declare some CLTYPE_UINT type? If there is going to be overflow, should it not be because of the sysctl being set and not because of the sysctl(8) causing it? See PR kern/21132 for an instance. - JimP -- --- @(#) $Id: dot.signature,v 1.10 2001/05/17 23:38:49 Jim.Pirzyk Exp $ __o Jim.Pirzyk@disney.com ------------- pirzyk@freebsd.org _'\<,_ Senior Systems Engineer, Walt Disney Feature Animation (*)/ (*) To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message