From owner-freebsd-hackers@FreeBSD.ORG Thu Jul 27 06:40:08 2006 Return-Path: X-Original-To: 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 371EA16A4DA for ; Thu, 27 Jul 2006 06:40:08 +0000 (UTC) (envelope-from andreas@klemm.apsfilter.org) Received: from srv1.cosmo-project.de (srv1.cosmo-project.de [213.83.6.106]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9CF9443D46 for ; Thu, 27 Jul 2006 06:40:06 +0000 (GMT) (envelope-from andreas@klemm.apsfilter.org) Received: from srv1.cosmo-project.de (localhost [IPv6:::1]) by srv1.cosmo-project.de (8.12.10/8.12.10) with ESMTP id k6R6e5nZ065453 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO) for ; Thu, 27 Jul 2006 08:40:05 +0200 (CEST) (envelope-from andreas@klemm.apsfilter.org) Received: (from uucp@localhost) by srv1.cosmo-project.de (8.12.10/8.12.10/Submit) with UUCP id k6R6e4Gq065452 for hackers@freebsd.org; Thu, 27 Jul 2006 08:40:04 +0200 (CEST) (envelope-from andreas@klemm.apsfilter.org) Received: from titan.klemm.apsfilter.org (localhost.klemm.apsfilter.org [127.0.0.1]) by klemm.apsfilter.org (8.13.6/8.13.4) with ESMTP id k6R6ddSa002499 for ; Thu, 27 Jul 2006 08:39:39 +0200 (CEST) (envelope-from andreas@titan.klemm.apsfilter.org) Received: (from andreas@localhost) by titan.klemm.apsfilter.org (8.13.6/8.13.4/Submit) id k6R6dbXE002498 for hackers@freebsd.org; Thu, 27 Jul 2006 08:39:37 +0200 (CEST) (envelope-from andreas) Date: Thu, 27 Jul 2006 08:39:37 +0200 From: Andreas Klemm To: hackers@freebsd.org Message-ID: <20060727063936.GA1246@titan.klemm.apsfilter.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Operating-System: FreeBSD 6.1-STABLE X-Disclaimer: A free society is one where it is safe to be unpopular User-Agent: Mutt/1.5.11 Cc: Subject: disklabel differences FreeBSD, DragonFly 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, 27 Jul 2006 06:40:08 -0000 Hi, DragonFly uses another disklabel as FreeBSD I discovered. Made a test installation of their 1.6 yesterday. Later I wanted to mount the dfly filesystems on FreeBSD 6.1, of course still my main Unix ;-) But it wasn't possible. The disklabel couldn't be read and as a result devfs didn't create the devices under /dev. So I compared sys/disklabel.h on the 2 BSDs and discovered a difference at the very beginning of the struct. I'm not sure for what exact purpose Matt uses his new pack identifier. Does somebody have a clue ??? Is this perhaps something useful that FreeBSD could also use/need ? Or at least adopt, to be compatible if it doesn't hurt too much ??? Would be cool to be able to mount fs's across BSDs. Our FreeBSD 6.1 one: struct disklabel { u_int32_t d_magic; /* the magic number */ u_int16_t d_type; /* drive type */ u_int16_t d_subtype; /* controller/d_type specific */ char d_typename[16]; /* type name, e.g. "eagle" */ char d_packname[16]; /* pack identifier */ /* disk geometry: */ DragonFly: struct disklabel { u_int32_t d_magic; /* the magic number */ u_int16_t d_type; /* drive type */ u_int16_t d_subtype; /* controller/d_type specific */ char d_typename[16]; /* type name, e.g. "eagle" */ /* * d_packname contains the pack identifier and is returned when * the disklabel is read off the disk or in-core copy. * d_boot0 and d_boot1 are the (optional) names of the * primary (block 0) and secondary (block 1-15) bootstraps * as found in /boot. These are returned when using * getdiskbyname(3) to retrieve the values from /etc/disktab. */ union { char un_d_packname[16]; /* pack identifier */ struct { char *un_d_boot0; /* primary bootstrap name */ char *un_d_boot1; /* secondary bootstrap name */ } un_b; } d_un; #define d_packname d_un.un_d_packname #define d_boot0 d_un.un_b.un_d_boot0 #define d_boot1 d_un.un_b.un_d_boot1 /* disk geometry: */ Andreas /// -- Andreas Klemm - Powered by FreeBSD 6 Need a magic printfilter today ? -> http://www.apsfilter.org/