patch-2.1.4 linux/fs/fat/dir.c
Next file: linux/fs/fat/file.c
Previous file: linux/fs/ext2/super.c
Back to the patch index
Back to the overall index
- Lines: 33
- Date:
Sun Oct 13 21:11:16 1996
- Orig file:
v2.1.3/linux/fs/fat/dir.c
- Orig date:
Sat Sep 28 23:39:53 1996
diff -u --recursive --new-file v2.1.3/linux/fs/fat/dir.c linux/fs/fat/dir.c
@@ -344,7 +344,8 @@
int len, slen;
int dotdir;
- if (get_user(&d1->d_reclen) != 0) {
+ get_user(len, &d1->d_reclen);
+ if (len != 0) {
return -1;
}
@@ -357,19 +358,19 @@
len = strlen(name);
}
if (len != name_len) {
- memcpy_tofs(d2->d_name, name, len);
+ copy_to_user(d2->d_name, name, len);
put_user(0, d2->d_name + len);
put_user(len, &d2->d_reclen);
put_user(ino, &d2->d_ino);
put_user(offset, &d2->d_off);
slen = name_len - len;
- memcpy_tofs(d1->d_name, name+len+1, slen);
+ copy_to_user(d1->d_name, name+len+1, slen);
put_user(0, d1->d_name+slen);
put_user(slen, &d1->d_reclen);
} else {
put_user(0, d2->d_name);
put_user(0, &d2->d_reclen);
- memcpy_tofs(d1->d_name, name, len);
+ copy_to_user(d1->d_name, name, len);
put_user(0, d1->d_name+len);
put_user(len, &d1->d_reclen);
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov