From owner-freebsd-current@FreeBSD.ORG Wed Aug 4 15:48:13 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0F44016A4CE for ; Wed, 4 Aug 2004 15:48:13 +0000 (GMT) Received: from critter.freebsd.dk (critter.freebsd.dk [212.242.86.163]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4579143D5C for ; Wed, 4 Aug 2004 15:48:12 +0000 (GMT) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.13.1/8.13.1) with ESMTP id i74Fm4si002891; Wed, 4 Aug 2004 17:48:09 +0200 (CEST) (envelope-from phk@critter.freebsd.dk) To: John-Mark Gurney From: "Poul-Henning Kamp" In-Reply-To: Your message of "Wed, 04 Aug 2004 07:43:50 PDT." <20040804144350.GX991@funkthat.com> Date: Wed, 04 Aug 2004 17:48:04 +0200 Message-ID: <2890.1091634484@critter.freebsd.dk> Sender: phk@critter.freebsd.dk cc: Maxim Sobolev cc: current@freebsd.org Subject: Re: GEOM is too verbose X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Aug 2004 15:48:13 -0000 In message <20040804144350.GX991@funkthat.com>, John-Mark Gurney writes: >Maxim Sobolev wrote this message on Wed, Aug 04, 2004 at 12:27 +0200: >> On Tue, Aug 03, 2004 at 02:22:27PM -0700, John-Mark Gurney wrote: >> > Maxim Sobolev wrote this message on Sat, Jul 31, 2004 at 20:15 +0300: >> > > >>It is python program, so that ioctl() is out of question. Usage of >> > > > >> > > > >> > > >Hm python has ioctl support, where is the problem? >> > > >> > > Really? Anyway, I doubt that name of this ioctl is the same on the >> > > different unices, so that binary search is still the best from the >> > > portability POV. >> > >> > fcntl.ioctl... it might take some hand expansion of the ioctl macros >> > to get it though... the old pytoh that would generate these couldn't >> > handle FreeBSD's ioctl defines (but this was back in the early 4.x >> > days)... You could always write a simple C program to get the value >> > necessary.. >> >> Heh, but I have other means to spend my spare time. Rewriting perfectly >> working code for perfection sake is not one of them. > >I only suggested: >#include >#include > >void >main() >{ > printf("%ul\n", DIOCGMEDIASIZE); >} > >and then use that value in python's fctl.ioctl. see diskinfo(8) -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence.