diff options
author | Guido van Rossum <guido@python.org> | 1999-02-03 16:32:37 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1999-02-03 16:32:37 (GMT) |
commit | 0c9608cf1bcad32d3e7226b2743f245be231a119 (patch) | |
tree | efd89512c209faf4f161bfe0ee7ebc25adc67335 /Modules | |
parent | c256ece88c81ffc573c5a1e7f0e45e68a656ee29 (diff) | |
download | cpython-0c9608cf1bcad32d3e7226b2743f245be231a119.zip cpython-0c9608cf1bcad32d3e7226b2743f245be231a119.tar.gz cpython-0c9608cf1bcad32d3e7226b2743f245be231a119.tar.bz2 |
Portability fix for [f]statvfs() return tuple: no longer return the
f_fsid field, since it's not a scalar on all systems supporting this
call (in particular, it's a tuple of two longs on AIX). Since it's
not particularly useful, just nuke it. Adapted the doc strings too.
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/posixmodule.c | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c index 821a3cd..f925d6e 100644 --- a/Modules/posixmodule.c +++ b/Modules/posixmodule.c @@ -3025,8 +3025,8 @@ posix_WSTOPSIG(self, args) #include <sys/statvfs.h> static char posix_fstatvfs__doc__[] = -"fstatvfs(fd) -> \ -(bsize,frsize,blocks,bfree,bavail,files,ffree,favail,fsid,flag, namemax)\n\ +"fstatvfs(fd) -> \n\ + (bsize, frsize, blocks, bfree, bavail, files, ffree, favail, flag, namemax)\n\ Perform an fstatvfs system call on the given fd."; static PyObject * @@ -3044,7 +3044,7 @@ posix_fstatvfs(self, args) if (res != 0) return posix_error(); #if !defined(HAVE_LARGEFILE_SUPPORT) - return Py_BuildValue("(lllllllllll)", + return Py_BuildValue("(llllllllll)", (long) st.f_bsize, (long) st.f_frsize, (long) st.f_blocks, @@ -3053,11 +3053,10 @@ posix_fstatvfs(self, args) (long) st.f_files, (long) st.f_ffree, (long) st.f_favail, - (long) st.f_fsid, (long) st.f_flag, (long) st.f_namemax); #else - return Py_BuildValue("(llLLLLLLlll)", + return Py_BuildValue("(llLLLLLLll)", (long) st.f_bsize, (long) st.f_frsize, (LONG_LONG) st.f_blocks, @@ -3066,7 +3065,6 @@ posix_fstatvfs(self, args) (LONG_LONG) st.f_files, (LONG_LONG) st.f_ffree, (LONG_LONG) st.f_favail, - (long) st.f_fsid, (long) st.f_flag, (long) st.f_namemax); #endif @@ -3078,8 +3076,8 @@ posix_fstatvfs(self, args) #include <sys/statvfs.h> static char posix_statvfs__doc__[] = -"statvfs(path) -> \ -(bsize,frsize,blocks,bfree,bavail,files,ffree,favail,fsid,flag, namemax)\n\ +"statvfs(path) -> \n\ + (bsize, frsize, blocks, bfree, bavail, files, ffree, favail, flag, namemax)\n\ Perform a statvfs system call on the given path."; static PyObject * @@ -3098,7 +3096,7 @@ posix_statvfs(self, args) if (res != 0) return posix_error_with_filename(path); #if !defined(HAVE_LARGEFILE_SUPPORT) - return Py_BuildValue("(lllllllllll)", + return Py_BuildValue("(llllllllll)", (long) st.f_bsize, (long) st.f_frsize, (long) st.f_blocks, @@ -3107,11 +3105,10 @@ posix_statvfs(self, args) (long) st.f_files, (long) st.f_ffree, (long) st.f_favail, - (long) st.f_fsid, (long) st.f_flag, (long) st.f_namemax); #else /* HAVE_LARGEFILE_SUPPORT */ - return Py_BuildValue("(llLLLLLLlll)", + return Py_BuildValue("(llLLLLLLll)", (long) st.f_bsize, (long) st.f_frsize, (LONG_LONG) st.f_blocks, @@ -3120,7 +3117,6 @@ posix_statvfs(self, args) (LONG_LONG) st.f_files, (LONG_LONG) st.f_ffree, (LONG_LONG) st.f_favail, - (long) st.f_fsid, (long) st.f_flag, (long) st.f_namemax); #endif |