Re: [Q] get device major/minor number

2010-11-30 Thread Thomas Portmann
On Tue, Nov 30, 2010 at 9:18 PM, Dan M wrote: > On Tue, 30 Nov 2010 21:09:14 +0100, Thomas Portmann wrote: >> In the example below, I would like to get the major (8) and minor (0, 1, >> 2) numbers of /dev/sda{,1,2}. How can I get them? > > I think the os.major() and os.mino

[Q] get device major/minor number

2010-11-30 Thread Thomas Portmann
Hello all, In a script I would like to extract all device infos from block or character device. The "stat" function gives me most of the infos (mode, timestamp, user and group id, ...), however I did not find how to get the devices major and minor numbers. Of course I could do it by calling an ext