1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-10-27 18:55:19 +03:00

Use POSIX defined PRIu64 for formatting 64 bit unsigned integer types

This commit is contained in:
Patrick Caulfield 2001-11-15 15:18:53 +00:00
parent 78125be9c2
commit 2fa9bf7052
4 changed files with 6 additions and 12 deletions

View File

@ -119,7 +119,7 @@ static int _emit_target(struct dm_task *dmt, struct logical_volume *lv,
count++;
}
snprintf(params, sizeof(params), "%s %" FMT_64 "u",
snprintf(params, sizeof(params), "%s %" PRIu64,
dev_name(first->pv->dev),
first->pv->pe_start + (esize * first->pe));

View File

@ -103,7 +103,7 @@ void pvdisplay_colons(struct physical_volume *pv)
uuid = display_uuid(pv->id.uuid);
log_print("%s:%s:%" FMT_64 "u:-1:%u:%u:-1:%" FMT_64 "u:%u:%u:%u:%s",
log_print("%s:%s:%" PRIu64 ":-1:%u:%u:-1:%" PRIu64 ":%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) %" FMT_64 "u", pv->pe_size / 2);
log_print("PE Size (KByte) %" PRIu64, pv->pe_size / 2);
log_print("Total PE %u", pv->pe_count);
log_print("Free PE %" FMT_64 "u", pe_free);
log_print("Free PE %" PRIu64, 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:%" FMT_64 "u:%d:-1:%d:%d:-1:-1",
log_print("%s/%s:%s:%d:%d:-1:%d:%" PRIu64 ":%d:-1:%d:%d:-1:-1",
/* FIXME Prefix - attach to struct volume_group? */
lv->vg->name,
lv->name,

View File

@ -25,12 +25,6 @@
#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 */

View File

@ -91,7 +91,7 @@ static void pvcreate_single(const char *pv_name)
return;
}
log_verbose("Set up physical volume for %s with %llu sectors",
log_verbose("Set up physical volume for %s with %" PRIu64 " sectors",
pv_name, pv->size);
log_verbose("Writing physical volume data to disk %s", pv_name);