[svn-commits] tzafrir: linux/trunk r8822 - /linux/trunk/README

SVN commits to the Digium repositories svn-commits at lists.digium.com
Tue Jun 29 07:27:02 CDT 2010


Author: tzafrir
Date: Tue Jun 29 07:26:59 2010
New Revision: 8822

URL: http://svnview.digium.com/svn/dahdi?view=rev&rev=8822
Log:
Fix the README "_V1" ioctls examples

zap->dahdi and such.

Modified:
    linux/trunk/README

Modified: linux/trunk/README
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/README?view=diff&rev=8822&r1=8821&r2=8822
==============================================================================
--- linux/trunk/README (original)
+++ linux/trunk/README Tue Jun 29 07:26:59 2010
@@ -828,34 +828,33 @@
 
 So suppose we had the following ioctl:
 ----------------------------------
-struct zt_example {
+struct dahdi_example {
 	int sample;
 }
 
-#define DAHDI_EXAMPLE     _IOWR (DAHDI_CODE, 62, struct zt_example)
+#define DAHDI_EXAMPLE     _IOWR (DAHDI_CODE, 62, struct dahdi_example)
 ----------------------------------
 
 And we want to add the field 'int onemore', we won't just add it to the
 struct. We will do something that is more complex:
 ------------------------------------
 /* The original, unchanged: */
-struct zt_example_v1 {
+struct dahdi_example_v1 {
 	int sample;
 }
 
 /* The new struct: */
-struct zt_example {
+struct dahdi_example {
 	int sample;
 	int onemore;
 }
 
-#define DAHDI_EXAMPLE_V1  _IOWR (DAHDI_CODE, 62, struct zt_example_v1)
-#define DAHDI_EXAMPLE     _IOWR (DAHDI_CODE, 62, struct zt_example)
+#define DAHDI_EXAMPLE_V1  _IOWR(DAHDI_CODE, 62, struct dahdi_example_v1)
+#define DAHDI_EXAMPLE     _IOWR(DAHDI_CODE, 62, struct dahdi_example)
 ------------------------------------
 We actually have here two different ioctls: the old DAHDI_EXAMPLE would be
-0xC0044A3E . DAHDI_EXAMPLE_V1 would have the same value. But the new value
-of DAHDI_EXAMPLE would be 0xC0084A3E .
-(TODO: fix ioctl values)
+0xC004DA3E . DAHDI_EXAMPLE_V1 would have the same value. But the new value
+of DAHDI_EXAMPLE would be 0xC008DA3E .
 
 Programs built with the original dahdi/user.h (before the change) use the
 original ioctl, whether or not the kernel code is actually of the newer
@@ -863,7 +862,7 @@
 
 When can we have compatibility issues? If we have code built with the new
 dahdi/user.h, but the loaded kernel code (modules) are of the older version.
-Thus the userspace program will try to use the newer DAHDI_EXAMPLE (0xC0084A3E).
+Thus the userspace program will try to use the newer DAHDI_EXAMPLE (0xC008DA3E).
 But the kernel code has no handler for that ioctl. The result: the error 25,
 ENOTTY, which means "Inappropriate ioctl for device".
 




More information about the svn-commits mailing list