1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

define FMT_64 to be the right format string for 64-bit types a la GFS

This commit is contained in:
Patrick Caulfield 2001-11-15 14:27:34 +00:00
parent 5389c987a3
commit 1a5123da94
2 changed files with 12 additions and 4 deletions

View 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,

View File

@ -23,6 +23,14 @@
#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 */