bpo-32659: Solaris "stat" should support "st_fstype" by jcea · Pull Request #5307 · python/cpython (original) (raw)

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 andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation4 Commits2 Checks0 Files changed

Conversation

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters

[ Show hidden characters]({{ revealButtonHref }})

jcea

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

@jcea

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

csabella

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

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?

Choose a reason for hiding this comment

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

@jcea

@bedevere-bot

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