[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: misc. patches for 1.4.10
From: |
Andrew Clausen |
Subject: |
Re: misc. patches for 1.4.10 |
Date: |
Sat, 24 Mar 2001 10:46:45 +1100 |
Wouter Coene wrote:
>
> Hi,
>
> I have some patches that I'd like to submit.
Cool!
> This first one fixes a bug where when dev->open_count=0 an infinite loop
> would occur.
ped_device_close() shouldn't be called if dev->open_count == 0.
>
> 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);
I think it is better to add:
PED_ASSERT (dev->open_count > 0, return 0);
> A patch to detect and report a bug in gcc 2.95.2 (at least the debian
> version), whereby compiling with -Os would result in zero numgroups in
> ext2_mkfs_init_sb().
>
> diff -uraN parted-1.4.10.orig/libparted/fs_ext2/ext2_mkfs.c
> parted-1.4.10/libparted/fs_ext2/ext2_mkfs.c
> --- parted-1.4.10.orig/libparted/fs_ext2/ext2_mkfs.c Thu Feb 15 21:39:47
> 2001
> +++ parted-1.4.10/libparted/fs_ext2/ext2_mkfs.c Sat Mar 24 00:06:23 2001
> @@ -384,6 +384,9 @@
> int inodes_per_group, int sparse_sb,
> int reserved_block_percentage)
> {
> + /* catch a bug in gcc 2.95.2 */
> + PED_ASSERT(numgroups!=0, return 0);
> +
Thanks.
> The last one is to make parted compile with NLS disabled.
>
> diff -uraN parted-1.4.10.orig/libparted/libparted.c
> parted-1.4.10/libparted/libparted.c
> --- parted-1.4.10.orig/libparted/libparted.c Wed Mar 14 00:10:51 2001
> +++ parted-1.4.10/libparted/libparted.c Fri Mar 23 11:15:43 2001
> @@ -88,7 +88,9 @@
> if (getlogin())
> initgroups (getlogin(), 0);
>
> +#ifdef LOCALEDIR
> bindtextdomain (PACKAGE, LOCALEDIR);
> +#endif /* LOCALEDIR */
>
> init_disk_types ();
> init_file_system_types ();
Thanks!
Andrew Clausen
P.S. I'm having problems with my computer, so patches, etc. will be slow
in getting applied :-( My computer has a bad case of bit rot :-(