diff options
author | Andrew Morton <akpm@osdl.org> | 2006-03-27 04:17:48 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-27 11:44:58 -0500 |
commit | 4ee218cd67b385759993a6c840ea45f0ee0a8b30 (patch) | |
tree | 788d33b31e9d008eeb2de2a7f874e45b09695719 /drivers/md/dm-stripe.c | |
parent | 930d332a23682202c07df0276dd665a57755b37d (diff) |
[PATCH] dm: remove SECTOR_FORMAT
We don't know what type sector_t has. Sometimes it's unsigned long, sometimes
it's unsigned long long. For example on ppc64 it's unsigned long with
CONFIG_LBD=n and on x86_64 it's unsigned long long with CONFIG_LBD=n.
The way to handle all of this is to always use unsigned long long and to
always typecast the sector_t when printing it.
Acked-by: Alasdair G Kergon <agk@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/md/dm-stripe.c')
-rw-r--r-- | drivers/md/dm-stripe.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/md/dm-stripe.c b/drivers/md/dm-stripe.c index 697aacafb02a..204f796ee9e3 100644 --- a/drivers/md/dm-stripe.c +++ b/drivers/md/dm-stripe.c | |||
@@ -49,9 +49,9 @@ static inline struct stripe_c *alloc_context(unsigned int stripes) | |||
49 | static int get_stripe(struct dm_target *ti, struct stripe_c *sc, | 49 | static int get_stripe(struct dm_target *ti, struct stripe_c *sc, |
50 | unsigned int stripe, char **argv) | 50 | unsigned int stripe, char **argv) |
51 | { | 51 | { |
52 | sector_t start; | 52 | unsigned long long start; |
53 | 53 | ||
54 | if (sscanf(argv[1], SECTOR_FORMAT, &start) != 1) | 54 | if (sscanf(argv[1], "%llu", &start) != 1) |
55 | return -EINVAL; | 55 | return -EINVAL; |
56 | 56 | ||
57 | if (dm_get_device(ti, argv[0], start, sc->stripe_width, | 57 | if (dm_get_device(ti, argv[0], start, sc->stripe_width, |
@@ -201,10 +201,11 @@ static int stripe_status(struct dm_target *ti, | |||
201 | break; | 201 | break; |
202 | 202 | ||
203 | case STATUSTYPE_TABLE: | 203 | case STATUSTYPE_TABLE: |
204 | DMEMIT("%d " SECTOR_FORMAT, sc->stripes, sc->chunk_mask + 1); | 204 | DMEMIT("%d %llu", sc->stripes, |
205 | (unsigned long long)sc->chunk_mask + 1); | ||
205 | for (i = 0; i < sc->stripes; i++) | 206 | for (i = 0; i < sc->stripes; i++) |
206 | DMEMIT(" %s " SECTOR_FORMAT, sc->stripe[i].dev->name, | 207 | DMEMIT(" %s %llu", sc->stripe[i].dev->name, |
207 | sc->stripe[i].physical_start); | 208 | (unsigned long long)sc->stripe[i].physical_start); |
208 | break; | 209 | break; |
209 | } | 210 | } |
210 | return 0; | 211 | return 0; |