From owner-freebsd-hackers Thu Sep 30 12:41:25 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from nomis.simon-shapiro.org (nomis.simon-shapiro.org [209.86.126.163]) by hub.freebsd.org (Postfix) with SMTP id 5D3BF14CB1 for ; Thu, 30 Sep 1999 12:41:20 -0700 (PDT) (envelope-from shimon@simon-shapiro.org) Received: (qmail 46378 invoked from network); 30 Sep 1999 19:41:20 -0000 Received: from localhost.simon-shapiro.org (HELO simon-shapiro.org) (127.0.0.1) by localhost.simon-shapiro.org with SMTP; 30 Sep 1999 19:41:20 -0000 Message-ID: <37F3BCE0.A7D1E168@simon-shapiro.org> Date: Thu, 30 Sep 1999 15:41:20 -0400 From: Simon Shapiro as Himself Organization: Simon's Garage X-Mailer: Mozilla 4.6 [en] (X11; I; FreeBSD 3.3-RELEASE i386) X-Accept-Language: en MIME-Version: 1.0 To: hackers@freebsd.org Subject: Kernel cdevsw.size Content-Type: text/plain; charset= Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Hi Y'll The function pointer (entry point, etc.) that indicates a device size is defined in sys/conf.h as: typedef int d_psize_t __P((dev_t dev)); The problem I have is that i2o devices express size as 64bit unsigned value (this is in bytes). This means that a device with more than 2billion sectors will fail to work correctly. While I realize this is not a very practical worry to most, such devices are not purely imaginary, nor inconcievable. Just casting the data will intruduce a latent and undocumented bug, sort of y2k of device sizes. Suggestions? -- Sincerely Yours, Shimon@Simon-Shapiro.ORG 404.644.6401 Simon Shapiro Unwritten code has no bugs and executes at twice the speed of mouth To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message