From owner-freebsd-gnome@FreeBSD.ORG Fri Nov 3 10:04:58 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 7650E16A494; Fri, 3 Nov 2006 10:04:58 +0000 (UTC) (envelope-from jylefort@FreeBSD.org) Received: from mirapoint7.brutele.be (mirapoint7.brutele.be [212.68.199.151]) by mx1.FreeBSD.org (Postfix) with ESMTP id A4FC743D53; Fri, 3 Nov 2006 10:04:57 +0000 (GMT) (envelope-from jylefort@FreeBSD.org) Received: from host-212-68-244-81.brutele.be (host-212-68-244-81.brutele.be [212.68.244.81]) by mirapoint7.brutele.be (MOS 3.7.5a-GA) with ESMTP id ABD52518; Fri, 3 Nov 2006 11:04:55 +0100 (CET) Received: from jsite.lefort.net (jsite.lefort.net [192.168.1.2]) by gateway.lefort.net (Postfix) with ESMTP id 7F36054E7; Fri, 3 Nov 2006 11:04:55 +0100 (CET) Received: from jsite.lefort.net (localhost [127.0.0.1]) by jsite.lefort.net (Postfix) with SMTP id 4EECF73; Fri, 3 Nov 2006 11:04:55 +0100 (CET) Date: Fri, 3 Nov 2006 11:04:54 +0100 From: Jean-Yves Lefort To: Joe Marcus Clarke Message-Id: <20061103110454.68b6a2c1.jylefort@FreeBSD.org> In-Reply-To: <1162508657.22424.57.camel@shumai.marcuscom.com> References: <1162508657.22424.57.camel@shumai.marcuscom.com> X-Mailer: Sylpheed running on FreeBSD Mime-Version: 1.0 Content-Type: multipart/signed; protocol="application/pgp-signature"; micalg="PGP-SHA1"; boundary="Signature=_Fri__3_Nov_2006_11_04_54_+0100_YP_hp_rP/+I96PRU" X-Junkmail-Status: score=10/50, host=mirapoint7.brutele.be X-Junkmail-SD-Raw: score=unknown, refid=str=0001.0A090207.454B13E5.0090,ss=1,fgs=0, ip=212.68.244.81, so=2006-05-09 23:27:51, dmn=5.2.121/2006-09-27 Cc: FreeBSD GNOME Users Subject: Re: HEADS UP: More HAL testers needed 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: Fri, 03 Nov 2006 10:04:58 -0000 --Signature=_Fri__3_Nov_2006_11_04_54_+0100_YP_hp_rP/+I96PRU Content-Type: text/plain; charset=US-ASCII Content-Disposition: inline Content-Transfer-Encoding: 7bit On Thu, 02 Nov 2006 18:04:17 -0500 Joe Marcus Clarke wrote: > I am working to sync our HAL backend up with the latest HAL spec. To > that end, I have added support for displaying more volume.partition > properties. This patch will only affect HAL objects that have the > volume.is_partition property set to TRUE. The only way you'd notice any > difference is using lshal. The old output looked something like: > > volume.partition.number = 3 (0x3) (int) > volume.msdos_part_table_type = 165 (0xa5) (int) > > The new style looks like this: > > volume.partition.start = 18268346880 (0x440e0da00) (uint64) > volume.partition.media_size = 61730726400 (0xe5f702200) (uint64) > volume.partition.type = '0xa5' (string) > volume.partition.scheme = 'mbr' (string) > volume.partition.number = 3 (0x3) (int) > > I'd be particularly interested with feedback from those that have gpt or > apple schemes, but feedback from mbr users is just as good (i.e. to let > me know it works on more that just my system). Thanks. > > http://www.marcuscom.com/downloads/patch-hal_volume Useless elements underlined: + if (geom_obj->uuid) ^^^^^^^^^^^^^^^^^^^ + g_free(geom_obj->uuid); + + if (geom_obj->apple_type) ^^^^^^^^^^^^^^^^^^^^^^^^^ + g_free(geom_obj->apple_type); + *mediasize = (guint64) hf_probe_volume_getenv_uintmax("HF_VOLUME_SIZE"); ^^^^^^^^^ + *offset = (guint64) hf_probe_volume_getenv_uintmax("HF_VOLUME_OFFSET"); ^^^^^^^^^ + if ((sscanf(partno + 1, "%i", number)) != (int) (strlen(partno) - 1)) ^ ^ ^^^^^ ^ ^ Btw, that last construct breaks in two cases: - "partno + 1" is empty: number is left undefined - "partno + 1" is a number > 9: sscanf(...) = 1, strlen > 1 Do this instead: int len; ... len = strlen(partno) - 1; if (len > 0 && strspn(partno + 1, "0123456789") == len) number = atoi(partno); else return FALSE; -- Jean-Yves Lefort jylefort@FreeBSD.org http://lefort.be.eu.org/ --Signature=_Fri__3_Nov_2006_11_04_54_+0100_YP_hp_rP/+I96PRU Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (FreeBSD) iD8DBQFFSxRHyzD7UaO4AGoRAgl4AJsEw8gYzK6rpl8kv0HwQze1azx9WQCfZJKV ndhFghTJDRxxrRpO3JWLFps= =7EIu -----END PGP SIGNATURE----- --Signature=_Fri__3_Nov_2006_11_04_54_+0100_YP_hp_rP/+I96PRU--