Change variable used for directory offset from "int" to "off_t".
Overkill, but avoids a host of truncation problems.
This commit is contained in:
parent
ad853adad7
commit
197579af47
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: fdesc_vnops.c,v 1.52 1999/08/24 23:29:08 sommerfeld Exp $ */
|
||||
/* $NetBSD: fdesc_vnops.c,v 1.53 1999/08/25 14:42:35 sommerfeld Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1992, 1993
|
||||
@ -678,7 +678,7 @@ fdesc_readdir(v)
|
||||
struct uio *uio = ap->a_uio;
|
||||
struct dirent d;
|
||||
struct filedesc *fdp;
|
||||
int i;
|
||||
off_t i;
|
||||
int error;
|
||||
off_t *cookies = NULL;
|
||||
int ncookies = 0;
|
||||
@ -773,7 +773,7 @@ fdesc_readdir(v)
|
||||
if (fdp->fd_ofiles[i - 2] == NULL)
|
||||
continue;
|
||||
d.d_fileno = i - 2 + FD_STDIN;
|
||||
d.d_namlen = sprintf(d.d_name, "%d", i - 2);
|
||||
d.d_namlen = sprintf(d.d_name, "%d", (int) i - 2);
|
||||
d.d_type = DT_UNKNOWN;
|
||||
break;
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: kernfs_vnops.c,v 1.66 1999/08/24 23:29:09 sommerfeld Exp $ */
|
||||
/* $NetBSD: kernfs_vnops.c,v 1.67 1999/08/25 14:42:35 sommerfeld Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1992, 1993
|
||||
@ -611,7 +611,7 @@ kernfs_readdir(v)
|
||||
struct uio *uio = ap->a_uio;
|
||||
struct dirent d;
|
||||
struct kern_target *kt;
|
||||
int i;
|
||||
off_t i;
|
||||
int error;
|
||||
off_t *cookies = NULL;
|
||||
int ncookies = 0, nc = 0;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: procfs_vnops.c,v 1.67 1999/08/24 23:29:09 sommerfeld Exp $ */
|
||||
/* $NetBSD: procfs_vnops.c,v 1.68 1999/08/25 14:42:36 sommerfeld Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1993 Jan-Simon Pendry
|
||||
@ -847,7 +847,7 @@ procfs_readdir(v)
|
||||
struct uio *uio = ap->a_uio;
|
||||
struct dirent d;
|
||||
struct pfsnode *pfs;
|
||||
int i;
|
||||
off_t i;
|
||||
int error;
|
||||
off_t *cookies = NULL;
|
||||
int ncookies;
|
||||
|
Loading…
Reference in New Issue
Block a user