lkml.org 
[lkml]   [2003]   [Sep]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] DM 1/6: Use new format_dev_t macro
Date
Use the format_dev_t function for target status functions.

--- diff/drivers/md/dm-linear.c 2003-06-30 10:07:21.000000000 +0100
+++ source/drivers/md/dm-linear.c 2003-09-17 13:08:44.000000000 +0100
@@ -79,7 +79,7 @@
char *result, unsigned int maxlen)
{
struct linear_c *lc = (struct linear_c *) ti->private;
- char b[BDEVNAME_SIZE];
+ char buffer[32];

switch (type) {
case STATUSTYPE_INFO:
@@ -87,8 +87,8 @@
break;

case STATUSTYPE_TABLE:
- snprintf(result, maxlen, "%s " SECTOR_FORMAT,
- bdevname(lc->dev->bdev, b), lc->start);
+ format_dev_t(buffer, lc->dev->bdev->bd_dev);
+ snprintf(result, maxlen, "%s " SECTOR_FORMAT, buffer, lc->start);
break;
}
return 0;
--- diff/drivers/md/dm-stripe.c 2003-08-20 14:16:28.000000000 +0100
+++ source/drivers/md/dm-stripe.c 2003-09-17 13:08:44.000000000 +0100
@@ -187,7 +187,7 @@
struct stripe_c *sc = (struct stripe_c *) ti->private;
int offset;
unsigned int i;
- char b[BDEVNAME_SIZE];
+ char buffer[32];

switch (type) {
case STATUSTYPE_INFO:
@@ -198,10 +198,10 @@
offset = snprintf(result, maxlen, "%d " SECTOR_FORMAT,
sc->stripes, sc->chunk_mask + 1);
for (i = 0; i < sc->stripes; i++) {
+ format_dev_t(buffer, sc->stripe[i].dev->bdev->bd_dev);
offset +=
snprintf(result + offset, maxlen - offset,
- " %s " SECTOR_FORMAT,
- bdevname(sc->stripe[i].dev->bdev, b),
+ " %s " SECTOR_FORMAT, buffer,
sc->stripe[i].physical_start);
}
break;
-
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:48    [from the cache]
©2003-2011 Jasper Spaans