[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Bug in GNU Parted
From: |
Andrew Clausen |
Subject: |
Re: Bug in GNU Parted |
Date: |
Sun, 13 May 2001 07:41:36 +1000 |
Wouter Coene wrote:
>
> 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
Did you type anything before?
I can't reproduce the bug here.
> 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/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.
Exactly. I want to find out why Parted "isn't programmed
according to the API".
Andrew Clausen