Commit 1edb9b6a authored by Kevin Corry's avatar Kevin Corry Committed by Linus Torvalds

[PATCH] dm: Use new format_dev_t macro

Use the format_dev_t function for target status functions.
parent 754bc768
......@@ -79,7 +79,7 @@ static int linear_status(struct dm_target *ti, status_type_t type,
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 @@ static int linear_status(struct dm_target *ti, status_type_t type,
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;
......
......@@ -187,7 +187,7 @@ static int stripe_status(struct dm_target *ti,
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 @@ static int stripe_status(struct dm_target *ti,
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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment