Fix error value returned from readdir_generic
MODIFY
sys/kern/vfs_readdir.c
sys/kern/vfs_readdir.c
@@ -33,9 +33,9 @@ int readdir_generic(vnode_t *v, uio_t *uio, readdir_ops_t *ops) {
ops->convert(v, it, dir);
error = uiomove(dir, reclen, uio);
kfree(M_TEMP, dir);
- if (error < 0)
- return -error;
+ if (error)
+ return error;
}
- return uio->uio_offset - offset;
+ return 0;
}

Fix error value returned from readdir_generic (#560)