public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Kevin Corry <kevcorry@us.ibm.com>
To: torvalds@osdl.org, akpm@zip.com.au, thornber@sistina.com
Cc: LKML <linux-kernel@vger.kernel.org>
Subject: [PATCH] DM 1/6: Use new format_dev_t macro
Date: Mon, 22 Sep 2003 10:51:27 -0500	[thread overview]
Message-ID: <200309221051.27714.kevcorry@us.ibm.com> (raw)
In-Reply-To: <200309221044.21694.kevcorry@us.ibm.com>

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;


  reply	other threads:[~2003-09-22 15:51 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-09-22 15:44 2.6.0-test5-mm2 Device Mapper Patches Kevin Corry
2003-09-22 15:51 ` Kevin Corry [this message]
2003-09-22 19:29   ` [PATCH] DM 1/6: Use new format_dev_t macro viro
2003-09-23  7:57     ` Joe Thornber
2003-09-23  7:57       ` viro
2003-09-23 14:07         ` Kevin Corry
2003-09-22 15:51 ` [PATCH] DM 2/6: Drop extra table ref-count Kevin Corry
2003-09-22 15:52 ` [PATCH] DM 3/6: Move retrieve_status function Kevin Corry
2003-09-22 15:52 ` [PATCH] DM 4/6: Return table status for dev_wait Kevin Corry
2003-09-22 15:52 ` [PATCH] DM 5/6: Message fix in dm-linear Kevin Corry
2003-09-22 15:53 ` [PATCH] DM 6/6: Support arbitrary number of target params Kevin Corry

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200309221051.27714.kevcorry@us.ibm.com \
    --to=kevcorry@us.ibm.com \
    --cc=akpm@zip.com.au \
    --cc=linux-kernel@vger.kernel.org \
    --cc=thornber@sistina.com \
    --cc=torvalds@osdl.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox