[Top][All Lists]

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

Re: Bug in GNU Parted

From: Wouter Coene
Subject: Re: Bug in GNU Parted
Date: Sat, 12 May 2001 22:22:06 +0200

According to Charles Briscoe-Smith (address@hidden):
> Seen when I hit Ctrl-D at the (parted) prompt:
> You found a bug in GNU Parted.  Please email a bug report to address@hidden 
> containing the version (1.4.11), and the following message:
> Assertion (dev->open_count > 0) at device.c:816 in function ped_device_close()
> failed.
> Ignore Cancel ?
> I'm using the Debian parted package, version 1.4.11-1

Apply the following patch to the source (it's for 1.4.10, but if patch fails
I think its intention is clear, and you might be able to patch the source
by hand):

diff -uraN parted-1.4.10.orig/libparted/device.c 
--- parted-1.4.10.orig/libparted/device.c       Thu Feb 15 21:39:47 2001
+++ parted-1.4.10/libparted/device.c    Sat Mar 24 00:08:33 2001
@@ -814,7 +814,7 @@
        PED_ASSERT (dev != NULL, return 0);
        PED_ASSERT (!dev->external_mode, return 0);
-       if (--dev->open_count)
+       if ((dev->open_count==0) || (--dev->open_count))
                return _do_refresh_close (dev);
        return _do_close (dev);

I've submitted this patch before, but it was refused claiming this condition
couldn't happen if parted was programmed according to the API specification.

* Wouter Coene * C/PHP/TCL * address@hidden *
 *** I do not speak for my employer until I say I do ***
  ** "First they ignore you. Then they laugh at you. **
   ** Then they fight you. Then you win." -- Gandhi **

reply via email to

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