Skip to content

Conversation

jcea
Copy link
Member

@jcea jcea commented Jan 25, 2018

Trivial patch. The only questionable thing is the __sun define use. This is needed because autoconf doesn't test st_fstype. This would be something to patch in autoconf.

Example:

$ LD_LIBRARY_PATH=/home/cpython/cpython-bpo-32659 ./python
Python 3.7.0a4+ (default, Jan 25 2018, 03:34:04) 
[GCC 4.9.4] on sunos5
Type "help", "copyright", "credits" or "license" for more information.
>>> os.stat('/etc/passwd').st_fstype
'zfs'

https://bugs.python.org/issue32659

@jcea
Copy link
Member Author

jcea commented Jan 25, 2018

For reference, I checked Solaris 10, released in 2005, and this field is already present there:

NAME
     stat, lstat, fstat, fstatat - get file status
[...]
char     st_fstype[_ST_FSTYPSZ];
                                 /* Null-terminated type of filesystem */
[...]
SunOS 5.10          Last change: 13 Feb 2007                    1


String that uniquely identifies the type of the filesystem that
contains the file.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should there be a versionadded?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, @csabella . PR updated.

Thanks.

@jcea jcea merged commit 6c51d51 into python:master Jan 28, 2018
@bedevere-bot
Copy link

@jcea: Please replace # with GH- in the commit message next time. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants