[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
misc. patches for 1.4.10
From: |
Wouter Coene |
Subject: |
misc. patches for 1.4.10 |
Date: |
Sat, 24 Mar 2001 00:19:41 +0100 |
Hi,
I have some patches that I'd like to submit.
This first one fixes a bug where when dev->open_count=0 an infinite loop
would occur.
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);
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);
+
memset(sb, 0, 1024);
sb->s_inodes_count = PED_CPU_TO_LE32(numgroups * inodes_per_group);
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 ();
Wouter Coene
--
* Wouter Coene * C/PHP3/TCL/Shell scripting *
* address@hidden * #include <std-disclaimer.h> *
*"First they ignore you. Then they laugh at you.*
* Then they fight you. Then you win." -- Gandhi *
- misc. patches for 1.4.10,
Wouter Coene <=