Skip to content
Commit 3b9ab374 authored by Bamvor Jian Zhang's avatar Bamvor Jian Zhang Committed by Greg Kroah-Hartman
Browse files

ppdev: convert to y2038 safe



The y2038 issue for ppdev is changes of timeval in the ioctl
(PPSETTIME and PPGETTIME). The size of struct timeval changes from
8bytes to 16bytes due to the changes of time_t. It lead to the
changes of the command of ioctl, e.g. for PPGETTIME, We have:

on 32-bit (old): 0x80087095
on 32-bit (new): 0x80107095
on 64-bit      : 0x80107095

This patch define these two ioctl commands to support the 32bit
and 64bit time_t application at the same time. And, introduce
pp_set_timeout to remove some duplicated code.

Signed-off-by: default avatarBamvor Jian Zhang <bamvor.zhangjian@linaro.org>
Reviewed-by: default avatarArnd Bergmann <arnd@arndb.de>
Tested-by: default avatarSudip Mukherjee <sudipm.mukherjee@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 468623bb
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment