1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
|
$FreeBSD$
--- cfs_nfs.c.orig
+++ cfs_nfs.c
@@ -877,12 +877,11 @@
static DIR *dp=NULL;
static struct dirent *dent;
entry **prev;
- long loc;
char s1[NFS_MAXNAMLEN+1];
char *s;
cfskey *key;
- static long curcookie=0;
- long cookie;
+ static int32_t curcookie=0;
+ int32_t cookie;
int eof;
int ne;
int bytes;
@@ -944,7 +943,7 @@
else if (strcmp(s,"..")==0) /* parent */
entrytab[ne].fileid=fhpid(h);
else entrytab[ne].fileid=dent->d_fileno;
- bcopy(&cookie,entrytab[ne].cookie,sizeof(long));
+ bcopy(&cookie,entrytab[ne].cookie,sizeof(int32_t));
*prev = &entrytab[ne];
prev = &entrytab[ne].nextentry;
entrytab[ne].nextentry=NULL;
@@ -964,12 +963,12 @@
DIR *curdir;
int curdirid=0;
-long curcookie;
+int32_t curcookie;
DIR *
cfsopendir(dir,cookie)
cfs_fileid *dir;
- long cookie;
+ int32_t cookie;
{
DIR *ret;
DIR *fhopendir();
@@ -1151,7 +1150,7 @@
typedef char str[NFS_MAXNAMLEN+1];
static str names[MAXENTRIES];
entry **prev;
- long cookie;
+ int32_t cookie;
int eof;
int ne;
int bytes;
@@ -1163,7 +1162,7 @@
ne=0;
prev= &ret.readdirres_u.reply.entries;
*prev=NULL;
- bcopy(ap->cookie,&cookie,sizeof(long));
+ bcopy(ap->cookie,&cookie,sizeof(int32_t));
eof=1;
ret.status=NFS_OK;
@@ -1182,7 +1181,7 @@
else entrytab[ne].fileid=dent->d_fileno;
cookie=dent->d_reclen; /* may not work everywhere */
*prev = &entrytab[ne];
- bcopy(&cookie,entrytab[ne].cookie,sizeof(long));
+ bcopy(&cookie,entrytab[ne].cookie,sizeof(int32_t));
prev = &entrytab[ne].nextentry;
entrytab[ne].nextentry=NULL;
ne++;
|