Inspired by Marian Durkovic's commit [80f9f873 ] Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>