[sane-devel] All sane frontends segfault with my HP 5200C

Oliver Rauch oliver.rauch at rauch-domain.de
Sun Feb 3 13:18:30 GMT 2002


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:Oliver.Rauch at rauch-domain.de



More information about the sane-devel mailing list