From 19e63688fd49c729582bb94fd68df9176ead79d5 Mon Sep 17 00:00:00 2001 From: Xiao Jia Date: Fri, 22 Jan 2016 18:11:28 -0800 Subject: [PATCH] lkl tools: hijack lib: fix ioctl Before commit: $ ./run ~/ethtool-4.2/ethtool lo Settings for lo: Cannot get device settings: Invalid argument Cannot get wake-on-lan settings: Invalid argument Cannot get message level: Invalid argument Cannot get link status: Invalid argument No data available After commit: $ ./run ~/ethtool-4.2/ethtool lo Settings for lo: Link detected: yes It also allows other things (e.g. ifconfig, ip) to work properly. Signed-off-by: Xiao Jia --- tools/lkl/lib/hijack/hijack.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/lkl/lib/hijack/hijack.c b/tools/lkl/lib/hijack/hijack.c index ca3951d5d85189..288e51a3f15c9a 100644 --- a/tools/lkl/lib/hijack/hijack.c +++ b/tools/lkl/lib/hijack/hijack.c @@ -182,7 +182,7 @@ int ioctl(int fd, unsigned long req, ...) if (!is_lklfd(fd)) return host_ioctl(fd, req, arg); - return lkl_call(__lkl__NR_fcntl, 3, fd, lkl_ioctl_req_xlate(req), arg); + return lkl_call(__lkl__NR_ioctl, 3, fd, lkl_ioctl_req_xlate(req), arg); }