Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
a903b878
Commit
a903b878
authored
Dec 15, 1992
by
Guido van Rossum
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix misunderstood readdir count (bytes, not dir entries)
and minor other changes.
parent
68a2716c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
4 deletions
+3
-4
Demo/rpc/nfsclient.py
Demo/rpc/nfsclient.py
+3
-4
No files found.
Demo/rpc/nfsclient.py
View file @
a903b878
...
...
@@ -169,7 +169,7 @@ class NFSClient(UDPClient):
# Shorthand to get the entire contents of a directory
def
Listdir
(
self
,
dir
):
list
=
[]
ra
=
(
dir
,
0
,
16
)
ra
=
(
dir
,
0
,
2000
)
while
1
:
(
status
,
rest
)
=
self
.
Readdir
(
ra
)
if
status
<>
NFS_OK
:
...
...
@@ -177,10 +177,9 @@ class NFSClient(UDPClient):
entries
,
eof
=
rest
last_cookie
=
None
for
fileid
,
name
,
cookie
in
entries
:
print
(
fileid
,
name
,
cookie
)
# XXX
list
.
append
(
fileid
,
name
)
last_cookie
=
cookie
if
eof
or
not
last_cooki
e
:
if
eof
or
last_cookie
==
Non
e
:
break
ra
=
(
ra
[
0
],
last_cookie
,
ra
[
2
])
return
list
...
...
@@ -208,6 +207,6 @@ def test():
print
as
list
=
ncl
.
Listdir
(
fh
)
for
item
in
list
:
print
item
mcl
.
U
n
mnt
(
filesys
)
mcl
.
Umnt
(
filesys
)
test
()
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment