patch-2.4.19 linux-2.4.19/arch/mips/kernel/sysirix.c
Next file: linux-2.4.19/arch/mips/kernel/sysmips.c
Previous file: linux-2.4.19/arch/mips/kernel/syscalls.h
Back to the patch index
Back to the overall index
- Lines: 31
- Date:
Fri Aug 2 17:39:43 2002
- Orig file:
linux-2.4.18/arch/mips/kernel/sysirix.c
- Orig date:
Sun Aug 12 15:05:26 2001
diff -urN linux-2.4.18/arch/mips/kernel/sysirix.c linux-2.4.19/arch/mips/kernel/sysirix.c
@@ -1876,7 +1876,8 @@
return 0;
}
-asmlinkage int irix_ngetdents(unsigned int fd, void * dirent, unsigned int count, int *eob)
+asmlinkage int irix_ngetdents(unsigned int fd, void * dirent,
+ unsigned int count, int *eob)
{
struct file *file;
struct irix_dirent32 *lastdirent;
@@ -1900,6 +1901,7 @@
error = vfs_readdir(file, irix_filldir32, &buf);
if (error < 0)
goto out_putf;
+
error = buf.error;
lastdirent = buf.previous;
if (lastdirent) {
@@ -1908,11 +1910,10 @@
}
if (put_user(0, eob) < 0) {
- error = EFAULT;
+ error = -EFAULT;
goto out_putf;
}
-
#ifdef DEBUG_GETDENTS
printk("eob=%d returning %d\n", *eob, count - buf.count);
#endif
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)