Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bpo-32659: Solaris "stat" should support "st_fstype" #5307

Merged
merged 2 commits into from
Jan 28, 2018
Merged

bpo-32659: Solaris "stat" should support "st_fstype" #5307

merged 2 commits into from
Jan 28, 2018

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