compat_ioctl: ppp: move simple commands into ppp_generic.c
All ppp commands that are not already handled in ppp_compat_ioctl() are compatible, so they can now handled by calling the native ppp_ioctl() directly. Without CONFIG_BLOCK, the generic compat_ioctl table is now empty, so add a check to avoid a build failure in the looking function for that configuration. Cc: netdev@vger.kernel.org Cc: linux-ppp@vger.kernel.org Cc: Paul Mackerras <paulus@samba.org> Cc: "David S. Miller" <davem@davemloft.net> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
This commit is contained in:
@@ -903,6 +903,10 @@ static long ppp_compat_ioctl(struct file *file, unsigned int cmd, unsigned long
|
||||
}
|
||||
mutex_unlock(&ppp_mutex);
|
||||
|
||||
/* all other commands have compatible arguments */
|
||||
if (err == -ENOIOCTLCMD)
|
||||
err = ppp_ioctl(file, cmd, (unsigned long)compat_ptr(arg));
|
||||
|
||||
return err;
|
||||
}
|
||||
#endif
|
||||
|
Referens i nytt ärende
Block a user