r824 - in lvm2/trunk/debian: . patches

Bastian Blank waldi at alioth.debian.org
Fri Jun 4 08:24:40 UTC 2010


Author: waldi
Date: Fri Jun  4 08:24:36 2010
New Revision: 824

Log:
* debian/changelog: Update.
* debian/patches/series: Add new patch.
* debian/patches/upstream-define-union-semun.patch: Add upstream patch.

Added:
   lvm2/trunk/debian/patches/upstream-define-union-semun.patch
Modified:
   lvm2/trunk/debian/changelog
   lvm2/trunk/debian/patches/series

Modified: lvm2/trunk/debian/changelog
==============================================================================
--- lvm2/trunk/debian/changelog	Fri Jun  4 08:16:24 2010	(r823)
+++ lvm2/trunk/debian/changelog	Fri Jun  4 08:24:36 2010	(r824)
@@ -1,6 +1,8 @@
 lvm2 (2.02.66-1) UNRELEASED; urgency=low
 
   * New upstream version.
+  * Define and use a union for semaphore access as mandated by the standard.
+    (closes: #583677)
 
  -- Bastian Blank <waldi at debian.org>  Fri, 04 Jun 2010 07:59:01 +0000
 

Modified: lvm2/trunk/debian/patches/series
==============================================================================
--- lvm2/trunk/debian/patches/series	Fri Jun  4 08:16:24 2010	(r823)
+++ lvm2/trunk/debian/patches/series	Fri Jun  4 08:24:36 2010	(r824)
@@ -1,3 +1,4 @@
+upstream-define-union-semun.patch
 install.patch
 libs-cleanup.patch
 config.patch

Added: lvm2/trunk/debian/patches/upstream-define-union-semun.patch
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ lvm2/trunk/debian/patches/upstream-define-union-semun.patch	Fri Jun  4 08:24:36 2010	(r824)
@@ -0,0 +1,45 @@
+===================================================================
+RCS file: /cvs/lvm2/LVM2/libdm/libdm-common.c,v
+retrieving revision 1.95
+retrieving revision 1.96
+diff -u -r1.95 -r1.96
+--- LVM2/libdm/libdm-common.c	2010/05/03 21:06:53	1.95
++++ LVM2/libdm/libdm-common.c	2010/05/27 15:02:56	1.96
+@@ -43,6 +43,18 @@
+ 
+ #define DEV_DIR "/dev/"
+ 
++#ifdef UDEV_SYNC_SUPPORT
++#ifdef _SEM_SEMUN_UNDEFINED
++union semun
++{
++	int val;			/* value for SETVAL */
++	struct semid_ds *buf;		/* buffer for IPC_STAT & IPC_SET */
++	unsigned short int *array;	/* array for GETALL & SETALL */
++	struct seminfo *__buf;		/* buffer for IPC_INFO */
++};
++#endif
++#endif
++
+ static char _dm_dir[PATH_MAX] = DEV_DIR DM_DIR;
+ 
+ static int _verbose = 0;
+@@ -1076,6 +1088,7 @@
+ 	int gen_semid;
+ 	uint16_t base_cookie;
+ 	uint32_t gen_cookie;
++	union semun sem_arg;
+ 
+ 	if ((fd = open("/dev/urandom", O_RDONLY)) < 0) {
+ 		log_error("Failed to open /dev/urandom "
+@@ -1123,7 +1136,9 @@
+ 	log_debug("Udev cookie 0x%" PRIx32 " (semid %d) created",
+ 		  gen_cookie, gen_semid);
+ 
+-	if (semctl(gen_semid, 0, SETVAL, 1) < 0) {
++	sem_arg.val = 1;
++
++	if (semctl(gen_semid, 0, SETVAL, sem_arg) < 0) {
+ 		log_error("semid %d: semctl failed: %s", gen_semid, strerror(errno));
+ 		/* We have to destroy just created semaphore
+ 		 * so it won't stay in the system. */



More information about the pkg-lvm-commits mailing list