Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Wed, 31 Jul 2002 18:35:43 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Wed, 31 Jul 2002 18:35:43 -0400 Received: from leibniz.math.psu.edu ([146.186.130.2]:48874 "EHLO math.psu.edu") by vger.kernel.org with ESMTP id ; Wed, 31 Jul 2002 18:35:42 -0400 Date: Wed, 31 Jul 2002 18:39:08 -0400 (EDT) From: Alexander Viro To: Peter Chubb cc: Pavel Machek , Matt_Domsch@Dell.com, Andries.Brouwer@cwi.nl, linux-kernel@vger.kernel.org Subject: Re: 2.5.28 and partitions In-Reply-To: <15688.25919.138565.6427@wombat.chubb.wattle.id.au> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1228 Lines: 36 On Thu, 1 Aug 2002, Peter Chubb wrote: > Maybe we need to roll our own? I suggest something like: > struct linux_volume_header { > char volname[16]; > __u32 nparts; > __u32 blocksize; > struct linux_partition { > char partname[16] > __u64 start; > __u64 len; > __u32 usage; > __u32 flags; > } parts[] > } Oh, ferchrissake! WHY??? People, we'd seen a lot of demonstrations of the reasons why binary structures are *bad* for such stuff. What the bleedin' hell is wrong with \n - all in ASCII? Terminated by \0. No need for flags, no need for endianness crap, no need to worry about field becoming too narrow... What, parsing that would be too slow? Right. Sure. How many times do we parse partition table? How many times do we end up reading it from disk? How does IO time compare to the "overhead" of trivial sscanf loop? Furrfu... "ASCII is tough, let's go shopping"... - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/