Re: [PATCH] DM 1/6: Use new format_dev_t macro

From: Kevin Corry
Date: Tue Sep 23 2003 - 09:08:41 EST


On Tuesday 23 September 2003 02:57, viro@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
wrote:
> On Tue, Sep 23, 2003 at 08:57:07AM +0100, Joe Thornber wrote:
> > On Monday, September 22, 2003, at 08:29 PM,
> >
> > viro@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx wrote:
> > >On Mon, Sep 22, 2003 at 10:51:27AM -0500, Kevin Corry wrote:
> > >>Use the format_dev_t function for target status functions.
> > >
> > >[instead of bdevname, that is]
> > >
> > >It's wrong. Simply because "sdb3" is immediately parsed by admin and
> > >08:13 is nowhere near that convenient. These are error messages, let's
> > >keep them readable.
> >
> > No they are not just error messages, userland tools use them.
>
> In which case the change in question would break said userland tools,
> wouldn't it?

No, actually this change brings the status info back in-line with how the 2.4
version of DM behaves. A while back the bdevname() function changed to return
a text name (it used to return a major:minor, similar to kdevname in 2.4). In
many cases the only way to make any sense of this text name is to search
around in sysfs for a matching entry (provided, of course, that sysfs is
mounted, which many people still don't realize they should be doing. :) And
if you find that entry in sysfs, the info you're really looking for is in the
"dev" file, whose contents are displayed using format_dev_t().

--
Kevin Corry
kevcorry@xxxxxxxxxx
http://evms.sourceforge.net/

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/