lkml.org 
[lkml]   [2003]   [Jul]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] print_dev_t for 2.6.0-test1-mm
Greg KH <greg@kroah.com> wrote:
>
> Here's a patch against 2.6.0-test1-mm that fixes up the different places
> where we export a dev_t to userspace. This fixes all of the compiler
> warnings that were previously reported with these files.

I added this as well:

static inline char *format_dev_t(char *buffer, dev_t dev)
{
sprintf(buffer, "%04lx\n", (unsigned long)dev);
return buffer;
}

tp be placed direct in a printk().

We'll probably need to do something more fancy in here later, because once
a dev_t becomes 32:32, it'll need to be printed out with "%016llx", which
is daft.

So we'll need to come up with some standardised way of presenting a dev_t
to the user. Presumably that will just be

sprintf(buf, "%d:%d", major(dev), minor(dev));

But if we do this, will it break your existing stuff?

> If I should put the print_dev_t() function in a different header file,
> please let me know.

Seems OK. Every kdev_t.h includer now needs to include kernel.h too. Fair
enough.
-
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/

\
 
 \ /
  Last update: 2005-03-22 13:46    [W:0.082 / U:0.188 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site