patch-2.1.4 linux/net/core/sock.c
Next file: linux/net/ipv4/af_inet.c
Previous file: linux/net/core/iovec.c
Back to the patch index
Back to the overall index
- Lines: 46
- Date:
Sun Oct 13 21:11:26 1996
- Orig file:
v2.1.3/linux/net/core/sock.c
- Orig date:
Sat Aug 17 20:28:10 1996
diff -u --recursive --new-file v2.1.3/linux/net/core/sock.c linux/net/core/sock.c
@@ -149,7 +149,7 @@
if(err)
return err;
- val = get_user((int *)optval);
+ get_user(val, (int *)optval);
valbool = val?1:0;
switch(optname)
@@ -219,7 +219,7 @@
err=verify_area(VERIFY_READ,optval,sizeof(ling));
if(err)
return err;
- memcpy_fromfs(&ling,optval,sizeof(ling));
+ copy_from_user(&ling,optval,sizeof(ling));
if(ling.l_onoff==0)
sk->linger=0;
else
@@ -305,10 +305,10 @@
err=verify_area(VERIFY_WRITE,optlen,sizeof(int));
if(err)
return err;
- put_fs_long(sizeof(ling),(unsigned long *)optlen);
+ put_user(sizeof(ling), optlen);
ling.l_onoff=sk->linger;
ling.l_linger=sk->lingertime;
- memcpy_tofs(optval,&ling,sizeof(ling));
+ copy_to_user(optval,&ling,sizeof(ling));
return 0;
case SO_BSDCOMPAT:
@@ -321,12 +321,12 @@
err=verify_area(VERIFY_WRITE, optlen, sizeof(int));
if(err)
return err;
- put_fs_long(sizeof(int),(unsigned long *) optlen);
+ put_user(sizeof(int), optlen);
err=verify_area(VERIFY_WRITE, optval, sizeof(int));
if(err)
return err;
- put_fs_long(val,(unsigned long *)optval);
+ put_user(val,(unsigned int *)optval);
return(0);
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov