[dahdi-commits] tzafrir: linux/trunk r10692 - /linux/trunk/drivers/dahdi/xpp/card_global.c

SVN commits to the DAHDI project dahdi-commits at lists.digium.com
Thu Jun 21 12:34:11 CDT 2012


Author: tzafrir
Date: Thu Jun 21 12:34:09 2012
New Revision: 10692

URL: http://svnview.digium.com/svn/dahdi?view=rev&rev=10692
Log:
xpp: usermode_helper() bugfix for kernels >= 3.3.0

* UMH_WAIT_PROC semantics (and value) was changed from enum to
  a bitmask (via #define)
* This constant was missing from kernels older than 2.6.23

Signed-off-by: Oron Peled <oron.peled at xorcom.com>
Acked-by: Tzafrir Cohen <tzafrir.cohen at xorcom.com>

Modified:
    linux/trunk/drivers/dahdi/xpp/card_global.c

Modified: linux/trunk/drivers/dahdi/xpp/card_global.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/xpp/card_global.c?view=diff&rev=10692&r1=10691&r2=10692
==============================================================================
--- linux/trunk/drivers/dahdi/xpp/card_global.c (original)
+++ linux/trunk/drivers/dahdi/xpp/card_global.c Thu Jun 21 12:34:09 2012
@@ -22,6 +22,7 @@
 
 #include <linux/module.h>
 #include <linux/delay.h>
+#include <linux/kmod.h>
 #include "xdefs.h"
 #include "xpd.h"
 #include "xpp_dahdi.h"
@@ -673,6 +674,15 @@
 }
 
 #define	MAX_PATH_STR	128
+
+#ifndef	UMH_WAIT_PROC
+/*
+ * - UMH_WAIT_PROC was introduced as enum in 2.6.23
+ *   with a value of 1
+ * - It was changed to a macro (and it's value was modified) in 3.3.0
+ */
+#define	UMH_WAIT_PROC	1
+#endif
 
 int run_initialize_registers(xpd_t *xpd)
 {
@@ -764,7 +774,7 @@
 	}
 	XPD_DBG(DEVICES, xpd, "running '%s' for type=%d revision=%d\n",
 		init_card, xpd->type, xbus->revision);
-	ret = call_usermodehelper(init_card, argv, envp, 1);
+	ret = call_usermodehelper(init_card, argv, envp, UMH_WAIT_PROC);
 	/*
 	 * Carefully report results
 	 */




More information about the dahdi-commits mailing list