Author: Alex Gaynor <alex.gay...@gmail.com> Branch: Changeset: r65487:b95b5d213403 Date: 2013-07-19 15:23 -0700 http://bitbucket.org/pypy/pypy/changeset/b95b5d213403/
Log: added statvfs_result to posix diff --git a/pypy/module/posix/__init__.py b/pypy/module/posix/__init__.py --- a/pypy/module/posix/__init__.py +++ b/pypy/module/posix/__init__.py @@ -34,6 +34,7 @@ appleveldefs = { 'error' : 'app_posix.error', 'stat_result': 'app_posix.stat_result', + 'statvfs_result': 'app_posix.statvfs_result', 'fdopen' : 'app_posix.fdopen', 'tmpfile' : 'app_posix.tmpfile', 'popen' : 'app_posix.popen', diff --git a/pypy/module/posix/app_posix.py b/pypy/module/posix/app_posix.py --- a/pypy/module/posix/app_posix.py +++ b/pypy/module/posix/app_posix.py @@ -65,6 +65,23 @@ if self.st_ctime is None: self.__dict__['st_ctime'] = self[9] + +class statvfs_result: + __metaclass__ = structseqtype + + name = osname + ".statvfs_result" + + f_bsize = structseqfield(0) + f_frsize = structseqfield(1) + f_blocks = structseqfield(2) + f_bfree = structseqfield(3) + f_bavail = structseqfield(4) + f_files = structseqfield(5) + f_ffree = structseqfield(6) + f_favail = structseqfield(7) + f_flag = structseqfield(8) + f_namemax = structseqfield(9) + if osname == 'posix': # POSIX: we want to check the file descriptor when fdopen() is called, # not later when we read or write data. So we call fstat(), letting _______________________________________________ pypy-commit mailing list pypy-commit@python.org http://mail.python.org/mailman/listinfo/pypy-commit