Skip to contentSkip to conversation

The ioctl(SIOCGIFNAME) call requires a struct ifreq.

PATCH Applied Erik Kline 5 participants 6 messages Apr 23, 2019 – May 9, 2019

lore
Share & tools
lore

Erik Kline

author
#0 lore raw

PATCH 1/1 The ioctl(SIOCGIFNAME) call requires a struct ifreq.

---
 linux-user/ioctls.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
linux-user/ioctls.h +1 -1
index ae8951625f..37501f575c 100644
@@ -178,7 +178,7 @@
 #endif /* CONFIG_USBFS */
 
   IOCTL(SIOCATMARK, IOC_R, MK_PTR(TYPE_INT))
-  IOCTL(SIOCGIFNAME, IOC_RW, MK_PTR(TYPE_INT))
+  IOCTL(SIOCGIFNAME, IOC_RW, MK_PTR(MK_STRUCT(STRUCT_int_ifreq)))
   IOCTL(SIOCGIFFLAGS, IOC_W | IOC_R, MK_PTR(MK_STRUCT(STRUCT_short_ifreq)))
   IOCTL(SIOCSIFFLAGS, IOC_W, MK_PTR(MK_STRUCT(STRUCT_short_ifreq)))
   IOCTL(SIOCGIFADDR, IOC_W | IOC_R, MK_PTR(MK_STRUCT(STRUCT_sockaddr_ifreq)))
Signature · 1 line
2.21.0.593.g511ec345e18-goog
#1 lore raw
Patchew URL: https://patchew.org/QEMU/[email protected]/

Patchew URL: https://patchew.org/QEMU/[email protected]/

Hi,

This series seems to have some coding style problems. See output below for more information:

Type: series
Message-id: [email protected]
Subject: [Qemu-devel] [PATCH] The ioctl(SIOCGIFNAME) call requires a struct ifreq.

=== TEST SCRIPT BEGIN ===
#!/bin/bash
git rev-parse base > /dev/null || exit 0
git config --local diff.renamelimit 0
git config --local diff.renames True
git config --local diff.algorithm histogram
./scripts/checkpatch.pl --mailback base..
=== TEST SCRIPT END ===

Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
From https://github.com/patchew-project/qemu

 t [tag update]            patchew/[email protected] -> patchew/[email protected]
 t [tag update]            patchew/[email protected] -> patchew/[email protected]
 t [tag update]            patchew/[email protected] -> patchew/[email protected]
 * [new tag]               patchew/[email protected] -> patchew/[email protected]

Switched to a new branch 'test'
eea8c80609 The ioctl(SIOCGIFNAME) call requires a struct ifreq.

=== OUTPUT BEGIN ===
ERROR: Author email address is mangled by the mailing list #2:
Author: Erik Kline via Qemu-devel <[email protected]>

total: 1 errors, 0 warnings, 8 lines checked

Commit eea8c8060982 (The ioctl(SIOCGIFNAME) call requires a struct ifreq.) has style problems, please review. If any of these errors are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
=== OUTPUT END ===

Test command exited with code: 1

The full log is available at
http://patchew.org/logs/[email protected]/testing.checkpatch/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to [email protected]

Reviewed-by on v1 1/1
#2 lore raw
In reply to Erik Kline
Quoted 21 lines · Erik Kline via Qemu-devel
---
 linux-user/ioctls.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
linux-user/ioctls.h +1 -2
index ae8951625f..37501f575c 100644
@@ -178,7 +178,7 @@
 #endif /* CONFIG_USBFS */
 
   IOCTL(SIOCATMARK, IOC_R, MK_PTR(TYPE_INT))
-  IOCTL(SIOCGIFNAME, IOC_RW, MK_PTR(TYPE_INT))
+  IOCTL(SIOCGIFNAME, IOC_RW, MK_PTR(MK_STRUCT(STRUCT_int_ifreq)))
   IOCTL(SIOCGIFFLAGS, IOC_W | IOC_R, MK_PTR(MK_STRUCT(STRUCT_short_ifreq)))
   IOCTL(SIOCSIFFLAGS, IOC_W, MK_PTR(MK_STRUCT(STRUCT_short_ifreq)))
   IOCTL(SIOCGIFADDR, IOC_W | IOC_R, MK_PTR(MK_STRUCT(STRUCT_sockaddr_ifreq)))
--
Quoted 2 lines

2.21.0.593.g511ec345e18-goog

thanks
-- PMM

#3 lore raw

Anything else I need to do?

Quoted 33 lines · Peter Maydell
Quoted 12 lines · Erik Kline via Qemu-devel
---
 linux-user/ioctls.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
linux-user/ioctls.h +0 -0
index ae8951625f..37501f575c 100644

linux-user/ioctls.h line 182

Quoted 6 lines
linux-user/ioctls.h +1 -1
@@ -178,7 +178,7 @@
 #endif /* CONFIG_USBFS */
 
   IOCTL(SIOCATMARK, IOC_R, MK_PTR(TYPE_INT))
-  IOCTL(SIOCGIFNAME, IOC_RW, MK_PTR(TYPE_INT))
+  IOCTL(SIOCGIFNAME, IOC_RW, MK_PTR(MK_STRUCT(STRUCT_int_ifreq)))
   IOCTL(SIOCGIFFLAGS, IOC_W | IOC_R,

MK_PTR(MK_STRUCT(STRUCT_short_ifreq)))

linux-user/ioctls.h line 184

Quoted 2 lines
linux-user/ioctls.h +0 -0
   IOCTL(SIOCSIFFLAGS, IOC_W, MK_PTR(MK_STRUCT(STRUCT_short_ifreq)))
   IOCTL(SIOCGIFADDR, IOC_W | IOC_R,

MK_PTR(MK_STRUCT(STRUCT_sockaddr_ifreq)))

Quoted 3 lines

--
2.21.0.593.g511ec345e18-goog

thanks
-- PMM

#4 lore raw

Ah, just noticed the linux-user maintainers weren't cc'd on this patch. Laurent, could you pick this patch up, please?

thanks
-- PMM

Quoted 35 lines · Erik Kline

Anything else I need to do?

Quoted 31 lines · Peter Maydell
Quoted 21 lines · Erik Kline via Qemu-devel
---
 linux-user/ioctls.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
linux-user/ioctls.h +1 -2
index ae8951625f..37501f575c 100644
@@ -178,7 +178,7 @@
 #endif /* CONFIG_USBFS */
 
   IOCTL(SIOCATMARK, IOC_R, MK_PTR(TYPE_INT))
-  IOCTL(SIOCGIFNAME, IOC_RW, MK_PTR(TYPE_INT))
+  IOCTL(SIOCGIFNAME, IOC_RW, MK_PTR(MK_STRUCT(STRUCT_int_ifreq)))
   IOCTL(SIOCGIFFLAGS, IOC_W | IOC_R, MK_PTR(MK_STRUCT(STRUCT_short_ifreq)))
   IOCTL(SIOCSIFFLAGS, IOC_W, MK_PTR(MK_STRUCT(STRUCT_short_ifreq)))
   IOCTL(SIOCGIFADDR, IOC_W | IOC_R, MK_PTR(MK_STRUCT(STRUCT_sockaddr_ifreq)))
--
Quoted 2 lines

2.21.0.593.g511ec345e18-goog

thanks
-- PMM

#5 lore raw
Quoted 3 lines · Peter Maydell

Ah, just noticed the linux-user maintainers weren't cc'd on this patch. Laurent, could you pick this patch up, please?

Applied to my linux-user branch.

Thanks,
Laurent

Quoted 40 lines

thanks
-- PMM

Quoted 35 lines · Erik Kline

Anything else I need to do?

Quoted 31 lines · Peter Maydell
Quoted 21 lines · Erik Kline via Qemu-devel
---
  linux-user/ioctls.h | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
linux-user/ioctls.h +1 -2
index ae8951625f..37501f575c 100644
@@ -178,7 +178,7 @@
  #endif /* CONFIG_USBFS */
 
    IOCTL(SIOCATMARK, IOC_R, MK_PTR(TYPE_INT))
-  IOCTL(SIOCGIFNAME, IOC_RW, MK_PTR(TYPE_INT))
+  IOCTL(SIOCGIFNAME, IOC_RW, MK_PTR(MK_STRUCT(STRUCT_int_ifreq)))
    IOCTL(SIOCGIFFLAGS, IOC_W | IOC_R, MK_PTR(MK_STRUCT(STRUCT_short_ifreq)))
    IOCTL(SIOCSIFFLAGS, IOC_W, MK_PTR(MK_STRUCT(STRUCT_short_ifreq)))
    IOCTL(SIOCGIFADDR, IOC_W | IOC_R, MK_PTR(MK_STRUCT(STRUCT_sockaddr_ifreq)))
--
Quoted 2 lines

2.21.0.593.g511ec345e18-goog

thanks
-- PMM