From owner-freebsd-hackers@FreeBSD.ORG Thu Jun 22 21:38:40 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A281416A47C for ; Thu, 22 Jun 2006 21:38:40 +0000 (UTC) (envelope-from mwm-keyword-freebsdhackers2.e313df@mired.org) Received: from mired.org (vpn.mired.org [66.92.153.74]) by mx1.FreeBSD.org (Postfix) with SMTP id E65B24580A for ; Thu, 22 Jun 2006 21:38:39 +0000 (GMT) (envelope-from mwm-keyword-freebsdhackers2.e313df@mired.org) Received: (qmail 1694 invoked by uid 1001); 22 Jun 2006 21:38:39 -0000 Received: by bhuda.mired.org (tmda-sendmail, from uid 1001); Thu, 22 Jun 2006 17:38:38 -0400 (EDT) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <17563.3550.496244.953904@bhuda.mired.org> Date: Thu, 22 Jun 2006 17:38:38 -0400 To: Andrew In-Reply-To: <1151008839.2360.30.camel@LatitudeFC5.network> References: <1151008839.2360.30.camel@LatitudeFC5.network> X-Mailer: VM 7.17 under 21.4 (patch 19) "Constant Variable" XEmacs Lucid X-Primary-Address: mwm@mired.org X-face: "5Mnwy%?j>IIV\)A=):rjWL~NB2aH[}Yq8Z=u~vJ`"(,&SiLvbbz2W`; h9L,Yg`+vb1>RG% *h+%X^n0EZd>TM8_IB;a8F?(Fb"lw'IgCoyM.[Lg#r\ X-Delivery-Agent: TMDA/1.0.3 (Seattle Slew) From: Mike Meyer Cc: freebsd-hackers@freebsd.org Subject: Re: Coding question: finding the size of a block device X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jun 2006 21:38:40 -0000 In <1151008839.2360.30.camel@LatitudeFC5.network>, Andrew typed: > So I guess my question is: is there a POSIX compatible function that > will allow me to check the size of a given block device? I'd be surprised - POSIX doesn't seem to deal with block devices at all. Checking the sources to df, it uses statfs to get the information. Linux appears to have it as well, so it may be portable. http://www.mired.org/consulting.html Independent Network/Unix/Perforce consultant, email for more information.