aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/dm-snap.c
diff options
context:
space:
mode:
authorAndrew Morton <akpm@osdl.org>2006-03-27 04:17:48 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-03-27 11:44:58 -0500
commit4ee218cd67b385759993a6c840ea45f0ee0a8b30 (patch)
tree788d33b31e9d008eeb2de2a7f874e45b09695719 /drivers/md/dm-snap.c
parent930d332a23682202c07df0276dd665a57755b37d (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-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,
959 snap->store.fraction_full(&snap->store, 959 snap->store.fraction_full(&snap->store,
960 &numerator, 960 &numerator,
961 &denominator); 961 &denominator);
962 snprintf(result, maxlen, 962 snprintf(result, maxlen, "%llu/%llu",
963 SECTOR_FORMAT "/" SECTOR_FORMAT, 963 (unsigned long long)numerator,
964 numerator, denominator); 964 (unsigned long long)denominator);
965 } 965 }
966 else 966 else
967 snprintf(result, maxlen, "Unknown"); 967 snprintf(result, maxlen, "Unknown");
@@ -974,9 +974,10 @@ static int snapshot_status(struct dm_target *ti, status_type_t type,
974 * to make private copies if the output is to 974 * to make private copies if the output is to
975 * make sense. 975 * make sense.
976 */ 976 */
977 snprintf(result, maxlen, "%s %s %c " SECTOR_FORMAT, 977 snprintf(result, maxlen, "%s %s %c %llu",
978 snap->origin->name, snap->cow->name, 978 snap->origin->name, snap->cow->name,
979 snap->type, snap->chunk_size); 979 snap->type,
980 (unsigned long long)snap->chunk_size);
980 break; 981 break;
981 } 982 }
982 983