Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S261699AbTIYE4g (ORCPT ); Thu, 25 Sep 2003 00:56:36 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S261696AbTIYE4g (ORCPT ); Thu, 25 Sep 2003 00:56:36 -0400 Received: from fw.osdl.org ([65.172.181.6]:6873 "EHLO mail.osdl.org") by vger.kernel.org with ESMTP id S261699AbTIYE4f (ORCPT ); Thu, 25 Sep 2003 00:56:35 -0400 Date: Wed, 24 Sep 2003 21:56:31 -0700 (PDT) From: Linus Torvalds To: Andries Brouwer cc: linux-kernel@vger.kernel.org Subject: Re: rfc: test whether a device has a partition table In-Reply-To: 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: 866 Lines: 24 On Wed, 24 Sep 2003, Linus Torvalds wrote: > > And your random byte checks for power-of-2 make no sense. What are they > based on? Oh, I found the regular DOS bootsector layout. The thing is, that's FAT-specific. The BIOS doesn't care, and the old Linux boot-sector stuff never had that, for example. It has the 0xAA55 flag, and that makes it bootable. I bet the same is true of other bootsectors too, that either didn't know about the FAT version, or just needed the space for better things and knew the BIOS didn't care. And some of them might easily have powers-of-two values in those magic bytes. Linus - 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/