At 09:14 03/05/02, Pavel Machek wrote:
>Hi!
>
>How do I do (above)?
include/linux/fs.h declares:
extern struct block_device *bdget(dev_t).
(you of course need to bdput(struct block_device *) when finished with it)
Along the way you may also need include/linux/kdev_t.h defining:
static inline int kdev_t_to_nr(kdev_t dev)
{
return MKDEV(major(dev), minor(dev));
}
static inline kdev_t to_kdev_t(int dev)
{
return mk_kdev(MAJOR(dev),MINOR(dev));
}
Hope this helps.
Best regards,
Anton
>[I really need it for resume; user pases resume=hda3 on command line
>and I need to access that device...]
> Pavel
>--
>(about SSSCA) "I don't say this lightly. However, I really think that the
>U.S.
>no longer is classifiable as a democracy, but rather as a plutocracy." --hpa
>-
>To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
>the body of a message to majordomo@vger.kernel.org
>More majordomo info at http://vger.kernel.org/majordomo-info.html
>Please read the FAQ at http://www.tux.org/lkml/
-- "I've not lost my mind. It's backed up on tape somewhere." - Unknown -- Anton Altaparmakov <aia21 at cantab.net> (replace at with @) Linux NTFS Maintainer / IRC: #ntfs on irc.openprojects.net WWW: http://linux-ntfs.sf.net/ & http://www-stu.christs.cam.ac.uk/~aia21/- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Tue May 07 2002 - 22:00:19 EST