From owner-freebsd-gnome@FreeBSD.ORG Wed Oct 25 18:07:23 2006 Return-Path: X-Original-To: gnome@FreeBSD.org Delivered-To: freebsd-gnome@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 91B3A16A4AB; Wed, 25 Oct 2006 18:07:23 +0000 (UTC) (envelope-from marcus@FreeBSD.org) Received: from av-tac-rtp.cisco.com (hen.cisco.com [64.102.19.198]) by mx1.FreeBSD.org (Postfix) with ESMTP id D6E0C43DDC; Wed, 25 Oct 2006 18:06:13 +0000 (GMT) (envelope-from marcus@FreeBSD.org) X-TACSUNS: Virus Scanned Received: from rooster.cisco.com (localhost [127.0.0.1]) by av-tac-rtp.cisco.com (8.11.7p1+Sun/8.11.7) with ESMTP id k9PI6D820670; Wed, 25 Oct 2006 14:06:13 -0400 (EDT) Received: from [64.102.192.117] (dhcp-64-102-192-117.cisco.com [64.102.192.117]) by rooster.cisco.com (8.11.7p1+Sun/8.11.7) with ESMTP id k9PI6CS16047; Wed, 25 Oct 2006 14:06:12 -0400 (EDT) Message-ID: <453FA7B0.5030105@FreeBSD.org> Date: Wed, 25 Oct 2006 14:06:40 -0400 From: Joe Marcus Clarke Organization: FreeBSD, Inc. User-Agent: Thunderbird 1.5.0.7 (Macintosh/20060909) MIME-Version: 1.0 To: Jean-Yves Lefort References: <1161699824.1029.6.camel@shumai.marcuscom.com> <20061025143425.0a1f6c64.jylefort@FreeBSD.org> In-Reply-To: <20061025143425.0a1f6c64.jylefort@FreeBSD.org> X-Enigmail-Version: 0.94.0.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: FreeBSD GNOME Users Subject: Re: Patch to add more GEOM support to hal X-BeenThere: freebsd-gnome@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: GNOME for FreeBSD -- porting and maintaining List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Oct 2006 18:07:23 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Jean-Yves Lefort wrote: > On Tue, 24 Oct 2006 10:23:44 -0400 > Joe Marcus Clarke wrote: > >> If you currently use a lot of different GEOM classes, and have noticed >> some strange hal-related behavior in GNOME when it comes to mounting >> disks, or seeing icons for RAID members on the desktop, try the >> following patch for sysutils/hal: >> >> http://www.marcuscom.com/downloads/patch-geom >> >> This patch removes libdisk usage from hal, and replaces it with pure >> GEOM configuration parsing. I'm interested in getting all feedback. >> The idea is to fix any GEOM-related volume problems without introducing >> anything new. So if something feels worse after this patch, definitely >> let me know. > > - What are these GEOM problems? Virtual GEOM classes like LABEL, MIRROR, GELI, etc. are not handled correctly. libdisk doesn't understand these. Consequently, people see mirror elements as mountable volumes on the desktop (for example). However, these volumes cannot be mounted. > > - Memory leak: > > fields = g_strsplit(lines[i], " ", 0); > - if (g_strv_length(fields) >= 3 && ! strcmp(fields[1], "DISK")) > + if (g_strv_length(fields) < 3) > + continue; Thanks, I'll fix that. > > - Don't forget to remove -ldisk from Makefile.am I'll fix that as well. The patch is not complete. I still have style issues. I just wanted to get it tested in more environments. > > - Why these explicit conversions? > > + sibling_geom = g_hash_table_lookup(hf_storage_geom_hash, > + (gconstpointer) sibling->data); > ^^^^^^^^^^^^^^^ > > + geom_obj->mediasize = (guint64) strtoumax(fields[3], (char **) NULL, 10); > ^^^^^^^^^ ^^^^^^^^^ > > (and so on) Just being pedantic. They are not needed. I'll take care of them in my style sweep. Joe - -- Joe Marcus Clarke FreeBSD GNOME Team :: gnome@FreeBSD.org FreeNode / #freebsd-gnome http://www.FreeBSD.org/gnome -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFFP6evb2iPiv4Uz4cRAkXOAJ0VcaSwPqRcOpUcwadOvqYNwZcoPgCfSvIN ueFD2I1y3lYt4mIhOsRQScI= =KfdN -----END PGP SIGNATURE-----