[svn-commits] sruffell: linux/trunk r6124 - in /linux/trunk: drivers/dahdi/ include/dahdi/

SVN commits to the Digium repositories svn-commits at lists.digium.com
Wed Mar 11 09:51:02 CDT 2009


Author: sruffell
Date: Wed Mar 11 09:50:58 2009
New Revision: 6124

URL: http://svn.digium.com/svn-view/dahdi?view=rev&rev=6124
Log:
Fix direction bits on several ioctls.

(related to issue #14499)
Reported by: ys

Modified:
    linux/trunk/drivers/dahdi/dahdi-base.c
    linux/trunk/include/dahdi/user.h

Modified: linux/trunk/drivers/dahdi/dahdi-base.c
URL: http://svn.digium.com/svn-view/dahdi/linux/trunk/drivers/dahdi/dahdi-base.c?view=diff&rev=6124&r1=6123&r2=6124
==============================================================================
--- linux/trunk/drivers/dahdi/dahdi-base.c (original)
+++ linux/trunk/drivers/dahdi/dahdi-base.c Wed Mar 11 09:50:58 2009
@@ -3435,6 +3435,7 @@
 
 	switch(cmd) {
 		/* get channel parameters */
+	case DAHDI_GET_PARAMS_V1: /* Intentional drop through. */
 	case DAHDI_GET_PARAMS:
 		size_to_copy = sizeof(struct dahdi_params);
 		if (copy_from_user(&stack.param, (struct dahdi_params *) data, size_to_copy))
@@ -3665,6 +3666,7 @@
 		if (copy_to_user((struct dahdi_spaninfo *) data, &stack.spaninfo, size_to_copy))
 			return -EFAULT;
 		break;
+	case DAHDI_CHANDIAG_V1: /* Intentional drop through. */
 	case DAHDI_CHANDIAG:
 		get_user(j, (int *)data); /* get channel number from user */
 		/* make sure its a valid channel number */
@@ -4531,6 +4533,7 @@
 		rv = start_tone(chan, j);
 		spin_unlock_irqrestore(&chan->lock, flags);
 		return rv;
+	case DAHDI_GETCONF_V1: /* intentional drop through */
 	case DAHDI_GETCONF:  /* get conf stuff */
 		if (copy_from_user(&stack.conf,(struct dahdi_confinfo *) data,sizeof(stack.conf)))
 			return -EFAULT;
@@ -4546,6 +4549,7 @@
 		if (copy_to_user((struct dahdi_confinfo *) data,&stack.conf,sizeof(stack.conf)))
 			return -EFAULT;
 		break;
+	case DAHDI_SETCONF_V1: /* Intentional fall through. */
 	case DAHDI_SETCONF:  /* set conf stuff */
 		if (copy_from_user(&stack.conf,(struct dahdi_confinfo *) data,sizeof(stack.conf)))
 			return -EFAULT;
@@ -4708,6 +4712,7 @@
 		spin_unlock(&chan->lock);
 		spin_unlock_irqrestore(&bigzaplock, flags);
 		return(rv);
+	case DAHDI_CONFDIAG_V1: /* Intention fall-through */
 	case DAHDI_CONFDIAG:  /* output diagnostic info to console */
 		if (!(chan->flags & DAHDI_FLAG_AUDIO)) return (-EINVAL);
 		get_user(j,(int *)data);  /* get conf # */

Modified: linux/trunk/include/dahdi/user.h
URL: http://svn.digium.com/svn-view/dahdi/linux/trunk/include/dahdi/user.h?view=diff&rev=6124&r1=6123&r2=6124
==============================================================================
--- linux/trunk/include/dahdi/user.h (original)
+++ linux/trunk/include/dahdi/user.h Wed Mar 11 09:50:58 2009
@@ -478,8 +478,9 @@
 	__u32 chan_alarms;	/* alarms on this channel */
 };
 
-#define DAHDI_GET_PARAMS		_IOR(DAHDI_CODE, 5, struct dahdi_params)
-#define DAHDI_SET_PARAMS		_IOW(DAHDI_CODE, 5, struct dahdi_params)
+#define DAHDI_GET_PARAMS_V1		_IOR(DAHDI_CODE,  5, struct dahdi_params)
+#define DAHDI_GET_PARAMS		_IOWR(DAHDI_CODE, 5, struct dahdi_params)
+#define DAHDI_SET_PARAMS		_IOW(DAHDI_CODE,  5, struct dahdi_params)
 
 /*
  * Set Hookswitch Status
@@ -547,8 +548,11 @@
 	int	confmode;	/* conferencing mode */
 };
 
-#define DAHDI_GETCONF			_IOR(DAHDI_CODE, 12, struct dahdi_confinfo)
-#define DAHDI_SETCONF			_IOW(DAHDI_CODE, 12, struct dahdi_confinfo)
+#define DAHDI_GETCONF_V1		_IOR(DAHDI_CODE,   12, struct dahdi_confinfo)
+#define DAHDI_GETCONF			_IOWR(DAHDI_CODE,  12, struct dahdi_confinfo)
+
+#define DAHDI_SETCONF_V1		_IOW(DAHDI_CODE,  12, struct dahdi_confinfo)
+#define DAHDI_SETCONF			_IOWR(DAHDI_CODE, 13, struct dahdi_confinfo)
 
 /*
  * Setup or Remove Conference Link
@@ -558,7 +562,8 @@
 /*
  * Display Conference Diagnostic Information on Console
  */
-#define DAHDI_CONFDIAG			_IOR(DAHDI_CODE, 15, int)
+#define DAHDI_CONFDIAG_V1		_IOR(DAHDI_CODE, 15, int)
+#define DAHDI_CONFDIAG			_IOW(DAHDI_CODE, 15, int)
 
 /*
  * Get/Set Channel audio gains
@@ -569,8 +574,9 @@
 	unsigned char txgain[256];	/* Transmit gain table */
 };
 
-#define DAHDI_GETGAINS			_IOR(DAHDI_CODE, 16, struct dahdi_gains)
-#define DAHDI_SETGAINS			_IOW(DAHDI_CODE, 16, struct dahdi_gains)
+#define DAHDI_GETGAINS_V1		_IOR(DAHDI_CODE,  16, struct dahdi_gains)
+#define DAHDI_GETGAINS			_IOWR(DAHDI_CODE, 16, struct dahdi_gains)
+#define DAHDI_SETGAINS			_IOW(DAHDI_CODE,  16, struct dahdi_gains)
 
 /*
  * Set Line (T1) Configurations
@@ -810,7 +816,8 @@
 /*
  * Display Channel Diagnostic Information on Console
  */
-#define DAHDI_CHANDIAG			_IOR(DAHDI_CODE, 44, int) 
+#define DAHDI_CHANDIAG_V1		_IOR(DAHDI_CODE, 44, int)
+#define DAHDI_CHANDIAG			_IOW(DAHDI_CODE, 44, int)
 
 /*
  * Set Channel's SF Tone Configuration




More information about the svn-commits mailing list