Hi Martin! First, some self-corrections.. :-) > > It seems like we really need some way to decode r_dev. One possible > > solutions are to implement major(), minor(), and makedev() somewhere. "solution is" > > Another solution, if r_dev's raw value has no obvious use, would be to This should be st_rdev. > > turn it into a two elements tuple like (major, minor). > I'd add a field r_dev_pair which splits this into major and minor. I > would not remove r_dev, since existing code may break. Isn't st_rdev being made available only in 2.3, trough stat attributes? > Notice that major, minor, and makedev is already available through > TYPES on many platforms, although this has the known limitations, and > is probably wrong for Linux at the moment. Indeed. Here's what's defined here: def major(dev): return ((int)(((dev) >> 8) & 0xff)) def minor(dev): return ((int)((dev) & 0xff)) def major(dev): return (((dev).__val[1] >> 8) & 0xff) def minor(dev): return ((dev).__val[1] & 0xff) def major(dev): return (((dev).__val[0] >> 8) & 0xff) def minor(dev): return ((dev).__val[0] & 0xff) -- 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