]> sourceware.org Git - lvm2.git/commitdiff
define FMT_64 to be the right format string for 64-bit types a la GFS
authorPatrick Caulfield <pcaulfie@redhat.com>
Thu, 15 Nov 2001 14:27:34 +0000 (14:27 +0000)
committerPatrick Caulfield <pcaulfie@redhat.com>
Thu, 15 Nov 2001 14:27:34 +0000 (14:27 +0000)
lib/display/display.c
lib/display/display.h

index 4065976a90f4193a1eb356d248bf744f252c456f..11a5f3da6f7433d73b750be1b31abc7fcd499a56 100644 (file)
@@ -103,7 +103,7 @@ void pvdisplay_colons(struct physical_volume *pv)
 
        uuid = display_uuid(pv->id.uuid);
 
-       log_print("%s:%s:%llu:-1:%u:%u:-1:%llu:%u:%u:%u:%s",
+       log_print("%s:%s:%" FMT_64 "u:-1:%u:%u:-1:%" FMT_64 "u:%u:%u:%u:%s",
                  dev_name(pv->dev), pv->vg_name, pv->size,
                  /* FIXME pv->pv_number, Derive or remove? */
                  pv->status,   /* FIXME Support old or new format here? */
@@ -170,9 +170,9 @@ void pvdisplay_full(struct physical_volume *pv)
 /*********FIXME
        log_print("Cur LV                %u", pv->lv_cur);
 *********/
-       log_print("PE Size (KByte)       %llu", pv->pe_size / 2);
+       log_print("PE Size (KByte)       %" FMT_64 "u", pv->pe_size / 2);
        log_print("Total PE              %u", pv->pe_count);
-       log_print("Free PE               %llu", pe_free);
+       log_print("Free PE               %" FMT_64 "u", pe_free);
        log_print("Allocated PE          %u", pv->pe_allocated);
 
 #ifdef LVM_FUTURE
@@ -205,7 +205,7 @@ void pv_display_short(struct physical_volume *pv)
 
 void lvdisplay_colons(struct logical_volume *lv)
 {
-       log_print("%s/%s:%s:%d:%d:-1:%d:%llu:%d:-1:%d:%d:-1:-1",
+       log_print("%s/%s:%s:%d:%d:-1:%d:%" FMT_64 "u:%d:-1:%d:%d:-1:-1",
                  /* FIXME Prefix - attach to struct volume_group? */
                  lv->vg->name,
                  lv->name,
index 1677b5458288512c1a95542d32e73b62a08b16b1..44740e1b897a59f9aeeac21c907dda82bf50d20b 100644 (file)
 
 #include "metadata.h"
 
+#include <stdint.h>
+
+#if (__WORDSIZE == 64)
+#define FMT_64 "l"
+#else
+#define FMT_64 "ll"
+#endif
+
 typedef        enum {SIZE_LONG=0, SIZE_SHORT=1} size_len_t;
 
 /* Specify size in KB */
This page took 0.039892 seconds and 5 git commands to generate.