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, ...@@ -79,7 +79,7 @@ static int linear_status(struct dm_target *ti, status_type_t type,
char *result, unsigned int maxlen) char *result, unsigned int maxlen)
{ {
struct linear_c *lc = (struct linear_c *) ti->private; struct linear_c *lc = (struct linear_c *) ti->private;
char b[BDEVNAME_SIZE]; char buffer[32];
switch (type) { switch (type) {
case STATUSTYPE_INFO: case STATUSTYPE_INFO:
...@@ -87,8 +87,8 @@ static int linear_status(struct dm_target *ti, status_type_t type, ...@@ -87,8 +87,8 @@ static int linear_status(struct dm_target *ti, status_type_t type,
break; break;
case STATUSTYPE_TABLE: case STATUSTYPE_TABLE:
snprintf(result, maxlen, "%s " SECTOR_FORMAT, format_dev_t(buffer, lc->dev->bdev->bd_dev);
bdevname(lc->dev->bdev, b), lc->start); snprintf(result, maxlen, "%s " SECTOR_FORMAT, buffer, lc->start);
break; break;
} }
return 0; return 0;
......
...@@ -187,7 +187,7 @@ static int stripe_status(struct dm_target *ti, ...@@ -187,7 +187,7 @@ static int stripe_status(struct dm_target *ti,
struct stripe_c *sc = (struct stripe_c *) ti->private; struct stripe_c *sc = (struct stripe_c *) ti->private;
int offset; int offset;
unsigned int i; unsigned int i;
char b[BDEVNAME_SIZE]; char buffer[32];
switch (type) { switch (type) {
case STATUSTYPE_INFO: case STATUSTYPE_INFO:
...@@ -198,10 +198,10 @@ static int stripe_status(struct dm_target *ti, ...@@ -198,10 +198,10 @@ static int stripe_status(struct dm_target *ti,
offset = snprintf(result, maxlen, "%d " SECTOR_FORMAT, offset = snprintf(result, maxlen, "%d " SECTOR_FORMAT,
sc->stripes, sc->chunk_mask + 1); sc->stripes, sc->chunk_mask + 1);
for (i = 0; i < sc->stripes; i++) { for (i = 0; i < sc->stripes; i++) {
format_dev_t(buffer, sc->stripe[i].dev->bdev->bd_dev);
offset += offset +=
snprintf(result + offset, maxlen - offset, snprintf(result + offset, maxlen - offset,
" %s " SECTOR_FORMAT, " %s " SECTOR_FORMAT, buffer,
bdevname(sc->stripe[i].dev->bdev, b),
sc->stripe[i].physical_start); sc->stripe[i].physical_start);
} }
break; 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