Re: [PATCH -mm 1/3] swsusp: Add ioctl for swap files support
- From: Arnd Bergmann <arnd@xxxxxxxx>
- Date: Sat, 30 Sep 2006 22:37:21 +0200
Am Saturday 30 September 2006 21:58 schrieb Rafael J. Wysocki:
Your definition looks wrong, '_IOW(SNAPSHOT_IOC_MAGIC, 13, void *)' means
your ioctl passes a pointer to a 'void *'.
You probably mean
#define SNAPSHOT_SET_SWAP_AREA _IOW(SNAPSHOT_IOC_MAGIC, 13, \
struct resume_swap_area)
No. I mean the ioctl passes a pointer, the size of which is sizeof(void *).
That's a very bad thing to do. It means that the ioctl number is different
between 32 and 64 bit and you need to write a conversion handler that
first reads your pointer and then then writes the real data.
Also, it needs to be at least _IOR() in the case you're describing,
because the pointer is read, not written (I hope).
Arnd <><
-
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/
- References:
- [PATCH -mm 0/3] swsusp: Add ioctl for swap files support and update documentation
- From: Rafael J. Wysocki
- Re: [PATCH -mm 1/3] swsusp: Add ioctl for swap files support
- From: Arnd Bergmann
- Re: [PATCH -mm 1/3] swsusp: Add ioctl for swap files support
- From: Rafael J. Wysocki
- [PATCH -mm 0/3] swsusp: Add ioctl for swap files support and update documentation
- Prev by Date: Re: GPLv3 Position Statement
- Next by Date: [PATCH] scsi: convert ninja driver to struct scsi_cmnd
- Previous by thread: Re: [PATCH -mm 1/3] swsusp: Add ioctl for swap files support
- Next by thread: [PATCH -mm 2/3] swsusp: Update userland interface documentation
- Index(es):
Relevant Pages
|
|