summaryrefslogtreecommitdiffstats
path: root/drivers/md/dm-snap.c
diff options
context:
space:
mode:
authorAndrew Morton <akpm@osdl.org>2006-03-27 11:17:48 +0200
committerLinus Torvalds <torvalds@g5.osdl.org>2006-03-27 18:44:58 +0200
commit4ee218cd67b385759993a6c840ea45f0ee0a8b30 (patch)
tree788d33b31e9d008eeb2de2a7f874e45b09695719 /drivers/md/dm-snap.c
parent[PATCH] drivers/md/dm-raid1.c: Fix inconsistent mirroring after interrupted r... (diff)
downloadlinux-4ee218cd67b385759993a6c840ea45f0ee0a8b30.tar.xz
linux-4ee218cd67b385759993a6c840ea45f0ee0a8b30.zip
[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-snap.c')
-rw-r--r--drivers/md/dm-snap.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/md/dm-snap.c b/drivers/md/dm-snap.c
index 14bd1a1815b1..a5765f9fbe02 100644
--- a/drivers/md/dm-snap.c
+++ b/drivers/md/dm-snap.c
@@ -959,9 +959,9 @@ static int snapshot_status(struct dm_target *ti, status_type_t type,
snap->store.fraction_full(&snap->store,
&numerator,
&denominator);
- snprintf(result, maxlen,
- SECTOR_FORMAT "/" SECTOR_FORMAT,
- numerator, denominator);
+ snprintf(result, maxlen, "%llu/%llu",
+ (unsigned long long)numerator,
+ (unsigned long long)denominator);
}
else
snprintf(result, maxlen, "Unknown");
@@ -974,9 +974,10 @@ static int snapshot_status(struct dm_target *ti, status_type_t type,
* to make private copies if the output is to
* make sense.
*/
- snprintf(result, maxlen, "%s %s %c " SECTOR_FORMAT,
+ snprintf(result, maxlen, "%s %s %c %llu",
snap->origin->name, snap->cow->name,
- snap->type, snap->chunk_size);
+ snap->type,
+ (unsigned long long)snap->chunk_size);
break;
}