bug-parted
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bug in libparted/fs/hfs/probe.c


From: Bart Hakvoort
Subject: Re: Bug in libparted/fs/hfs/probe.c
Date: Wed, 24 May 2006 22:32:59 +0200 (CEST)
User-agent: SquirrelMail/1.4.6

Confirmed

> libparted/fs/hfs/probe.c - lines 40-48:
> ---- CUT HERE ----
> int
> hfsc_can_use_geom (PedGeometry* geom)
> {
>       PedDevice* dev;
>
>       PED_ASSERT (geom != NULL, return 0);
>       PED_ASSERT ((dev = geom->dev) != NULL, return 0);
>
>       if (dev->sector_size != PED_SECTOR_SIZE_DEFAULT) {
> ---- CUT HERE ----
>
> but if DEBUG is not defined PED_ASSERT becomes nothing
> (include/parted/debug.h:85):
>
> ---- CUT HERE ----
> #define PED_ASSERT(cond, action)      while (0) {}
> ---- CUT HERE ----
>
> so the line 46 should look like this:
>
> ---- CUT HERE ----
>       dev = geom->dev; PED_ASSERT (dev != NULL, return 0);
> ---- CUT HERE ----
>
> or something similar.
>
>
> This solution works for me. I found the bug when I used parted with soem
> disk having unformatted partition (containing garbage).
>
>
> --
> | Wladyslaw Bodzek                                               |
> | Institute of Computer Science, Poznan University of Technology |
> | Piotrowo 2, 60-965 Poznan, Poland.                             |
> | gg: #2103109   jabber: address@hidden   phone: +48616652994 |
>
>
> _______________________________________________
> bug-parted mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/bug-parted
>


-- 
--- plors





reply via email to

[Prev in Thread] Current Thread [Next in Thread]