Henning Meier-Geinitz wrote:

> How can I get the major/minor number of a device file?

Hi Henning,

I never did this but:

lstat and fstat have a field 
        dev_t st_dev 
        dev_t st_rdev
(man stat).

There are macros defined in linux/fs.h:
        MAJOR(dev_t dev)
        MINOR(dev_t dev)

that extract the major and minor number from
the device id.

I think this should work for linux.

Bye
Oliver

-- 
Homepage:       http://www.rauch-domain.de
sane-umax:      http://www.rauch-domain.de/sane-umax
xsane:          http://www.xsane.org
E-Mail:         mailto:[email protected]

Reply via email to