patch-2.4.19 linux-2.4.19/arch/ia64/ia32/ia32_ioctl.c
Next file: linux-2.4.19/arch/ia64/ia32/ia32_signal.c
Previous file: linux-2.4.19/arch/ia64/ia32/ia32_entry.S
Back to the patch index
Back to the overall index
- Lines: 39
- Date:
Fri Aug 2 17:39:42 2002
- Orig file:
linux-2.4.18/arch/ia64/ia32/ia32_ioctl.c
- Orig date:
Fri Nov 9 14:26:17 2001
diff -urN linux-2.4.18/arch/ia64/ia32/ia32_ioctl.c linux-2.4.19/arch/ia64/ia32/ia32_ioctl.c
@@ -79,6 +79,38 @@
return ret;
}
+ case IOCTL_NR(SIOCGIFCONF):
+ {
+ struct ifconf32 {
+ int ifc_len;
+ unsigned int ifc_ptr;
+ } ifconf32;
+ struct ifconf ifconf;
+ int i, n;
+ char *p32, *p64;
+ char buf[32]; /* sizeof IA32 ifreq structure */
+
+ if (copy_from_user(&ifconf32, P(arg), sizeof(ifconf32)))
+ return -EFAULT;
+ ifconf.ifc_len = ifconf32.ifc_len;
+ ifconf.ifc_req = P(ifconf32.ifc_ptr);
+ ret = DO_IOCTL(fd, SIOCGIFCONF, &ifconf);
+ ifconf32.ifc_len = ifconf.ifc_len;
+ if (copy_to_user(P(arg), &ifconf32, sizeof(ifconf32)))
+ return -EFAULT;
+ n = ifconf.ifc_len / sizeof(struct ifreq);
+ p32 = P(ifconf32.ifc_ptr);
+ p64 = P(ifconf32.ifc_ptr);
+ for (i = 0; i < n; i++) {
+ if (copy_from_user(buf, p64, sizeof(struct ifreq)))
+ return -EFAULT;
+ if (copy_to_user(p32, buf, sizeof(buf)))
+ return -EFAULT;
+ p32 += sizeof(buf);
+ p64 += sizeof(struct ifreq);
+ }
+ return ret;
+ }
case IOCTL_NR(DRM_IOCTL_VERSION):
{
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)