Re: [PATCH] cosa.h ioctl numbers

From: Jan Kasprzak
Date: Thu Dec 02 2004 - 08:16:55 EST


Arnd Bergmann wrote:
: > /* Write the block to the device memory (i.e. download the microcode) */
: > -#define COSAIODOWNLD _IOW('C',0xf2, struct cosa_download)
: > +#define COSAIODOWNLD _IOW('C',0xf2, struct cosa_download *)
:
: Isn't that rather misleading? I suppose the real argument is
: 'struct cosa_download', so you should have some kind of comment there,
: e.g.
:
: #define COSAIODOWNLD _IOW('C',0xf2, long) /* actually struct cosa_download */

Well, the third argument of ioctl(2) is of type
struct cosa_download *.

OK, second try with comments added.

Signed-off-by: Jan "Yenya" Kasprzak <kas@xxxxxxxxxx>

--- linux-2.6.10-rc2/drivers/net/wan/cosa.h.orig 2004-12-02 13:34:24.142501564 +0100
+++ linux-2.6.10-rc2/drivers/net/wan/cosa.h 2004-12-02 14:09:23.000860524 +0100
@@ -76,10 +76,16 @@
#define COSAIOSTRT _IOW('C',0xf1, int)

/* Read the block from the device memory */
-#define COSAIORMEM _IOWR('C',0xf2, struct cosa_download)
+#define COSAIORMEM _IOWR('C',0xf2, struct cosa_download *)
+ /* actually the struct cosa_download itself; this is to keep
+ * the ioctl number same as in 2.4 in order to keep the user-space
+ * utils compatible. */

/* Write the block to the device memory (i.e. download the microcode) */
-#define COSAIODOWNLD _IOW('C',0xf2, struct cosa_download)
+#define COSAIODOWNLD _IOW('C',0xf2, struct cosa_download *)
+ /* actually the struct cosa_download itself; this is to keep
+ * the ioctl number same as in 2.4 in order to keep the user-space
+ * utils compatible. */

/* Read the device type (one of "srp", "cosa", and "cosa8" for now) */
#define COSAIORTYPE _IOR('C',0xf3, char *)


--
| Jan "Yenya" Kasprzak <kas at {fi.muni.cz - work | yenya.net - private}> |
| GPG: ID 1024/D3498839 Fingerprint 0D99A7FB206605D7 8B35FCDE05B18A5E |
| http://www.fi.muni.cz/~kas/ Czech Linux Homepage: http://www.linux.cz/ |
> Whatever the Java applications and desktop dances may lead to, Unix will <
> still be pushing the packets around for a quite a while. --Rob Pike <
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/