[LinuxPPS] linuxpps-v5.3.2 is missing ioctl32 compatibility
George Spelvin
linux at horizon.com
Mon Oct 27 09:58:57 CET 2008
Rodolfo Giometti <giometti at enneenne.com> wrote:
> In the end, can you please provide a proper patch?
Well, here's what I have so far. You're welcome to change it, of
course.
(Public domain; copyright abandoned. Anyone may use this change for any
purpose, including evil purposes, as long as they don't bother me asking
for permission.)
diff --git a/fs/compat_ioctl.c b/fs/compat_ioctl.c
index 5235c67..0c32809 100644
--- a/fs/compat_ioctl.c
+++ b/fs/compat_ioctl.c
@@ -59,6 +59,7 @@
#include <linux/i2c-dev.h>
#include <linux/atalk.h>
#include <linux/loop.h>
+#include <linux/pps.h>
#include <net/bluetooth/bluetooth.h>
#include <net/bluetooth/hci.h>
@@ -2019,6 +2020,12 @@ COMPATIBLE_IOCTL(RTC_WKALM_RD)
*/
COMPATIBLE_IOCTL(_IOR('p', 20, int[7])) /* RTCGET */
COMPATIBLE_IOCTL(_IOW('p', 21, int[7])) /* RTCSET */
+/* LinuxPPS entries, also little p */
+COMPATIBLE_IOCTL(PPS_CHECK)
+COMPATIBLE_IOCTL(PPS_GETPARAMS)
+COMPATIBLE_IOCTL(PPS_SETPARAMS)
+COMPATIBLE_IOCTL(PPS_GETCAP)
+COMPATIBLE_IOCTL(PPS_FETCH)
/* Little m */
COMPATIBLE_IOCTL(MTIOCTOP)
/* Socket level stuff */
diff --git a/include/linux/pps.h b/include/linux/pps.h
index 9a74d06..58ea515 100644
--- a/include/linux/pps.h
+++ b/include/linux/pps.h
@@ -61,7 +61,7 @@ struct pps_ktime {
__s64 sec;
__s32 nsec;
__u32 flags;
-};
+} __attribute__((aligned(8)));
#define PPS_TIME_INVALID (1<<0) /* used to specify timeout==NULL */
struct pps_kinfo {
@@ -124,10 +124,10 @@ struct pps_fdata {
#include <linux/ioctl.h>
#define PPS_CHECK _IO('p', 0xa0)
-#define PPS_GETPARAMS _IOR('p', 0xa1, struct pps_kparams *)
-#define PPS_SETPARAMS _IOW('p', 0xa2, struct pps_kparams *)
-#define PPS_GETCAP _IOR('p', 0xa3, int *)
-#define PPS_FETCH _IOWR('p', 0xa4, struct pps_fdata *)
+#define PPS_GETPARAMS _IOR('p', 0xa1, struct pps_kparams)
+#define PPS_SETPARAMS _IOW('p', 0xa2, struct pps_kparams)
+#define PPS_GETCAP _IOR('p', 0xa3, int)
+#define PPS_FETCH _IOWR('p', 0xa4, struct pps_fdata)
#ifdef __KERNEL__
More information about the LinuxPPS
mailing list