]> git.baikalelectronics.ru Git - kernel.git/commit
alarmtimer: Use EOPNOTSUPP instead of ENOTSUPP
authorThadeu Lima de Souza Cascardo <cascardo@canonical.com>
Tue, 3 Sep 2019 17:18:02 +0000 (14:18 -0300)
committerThomas Gleixner <tglx@linutronix.de>
Thu, 5 Sep 2019 19:19:26 +0000 (21:19 +0200)
commit066290a451f8e369c6c960fa8b374efd924af6f1
treeee642b2934ba01c1e5ee4f367bde2340abdef4b7
parent5dc86df7395ff5abae3221d045df87235351940d
alarmtimer: Use EOPNOTSUPP instead of ENOTSUPP

ENOTSUPP is not supposed to be returned to userspace. This was found on an
OpenPower machine, where the RTC does not support set_alarm.

On that system, a clock_nanosleep(CLOCK_REALTIME_ALARM, ...) results in
"524 Unknown error 524"

Replace it with EOPNOTSUPP which results in the expected "95 Operation not
supported" error.

Fixes: 44da6e9214ff (alarmtimers: Return -ENOTSUPP if no RTC device is present)
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: stable@vger.kernel.org
Link: https://lkml.kernel.org/r/20190903171802.28314-1-cascardo@canonical.com
kernel/time/alarmtimer.c