While talking to Lars about tarfile.py, he has noted an interesting detail in the current implementation of os.stat(filename).r_dev: ------------- With the current os.stat(), it is impossible to implement addition of those devices. That's because the result for st_rdev is just a plain integer, which still must be divided into the major and minor part. This division (resp. the C type dev_t) differs between several operating systems: OS format major minor Linux 32-bit upper 16bits lower 16bits SVR4 32-bit upper 14bits lower 18bits BSD 16-bit upper 8bits lower 8bits ------------- It seems like we really need some way to decode r_dev. One possible solutions are to implement major(), minor(), and makedev() somewhere. Another solution, if r_dev's raw value has no obvious use, would be to turn it into a two elements tuple like (major, minor). Any suggestions? -- Gustavo Niemeyer [ 2AAC 7928 0FBF 0299 5EB5 60E2 2253 B29A 6664 3A0C ]
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4