1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-01-30 01:47:56 +03:00

Don't print char type[8] as a plain string

pvck prints 'extra' character from the label since there is no '\0'
after the struct label entry and just uint64_t follows directly.
So avoid it by limiting 8 chars to be printed.

https://www.redhat.com/archives/lvm-devel/2011-January/msg00109.html

Signed-off-by: Paul Bolle <pebolle tiscali nl>
This commit is contained in:
Zdenek Kabelac 2011-10-24 10:24:39 +00:00
parent 5ee6718daa
commit 80cdb5240e
2 changed files with 2 additions and 1 deletions

View File

@ -1,5 +1,6 @@
Version 2.02.89 -
==================================
Don't print char type[8] as a plain string in pvck PV type.
Use vg memory pool implicitely for vg read.
Always use vg memory pool for allocated lv segment.
Remove extra 4kB buffer allocated on stack in print_log().

View File

@ -3794,7 +3794,7 @@ int pv_analyze(struct cmd_context *cmd, const char *pv_name,
return 0;
}
log_print("Found label on %s, sector %"PRIu64", type=%s",
log_print("Found label on %s, sector %"PRIu64", type=%.8s",
pv_name, label->sector, label->type);
/*