mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
Fix uuid warning in pvcreate to use terminated (and dash formatted) UUID string.
# pvcreate -u udwxr7-BoKY-EeKM-r033-xK6o-4og7-F13sGi /dev/sdc uuid udwxr7BoKYEeKMr033xK6o4og7F13sGi|��� already in use on "/dev/sdb1" is now # pvcreate -u udwxr7-BoKY-EeKM-r033-xK6o-4og7-F13sGi /dev/sdc uuid udwxr7-BoKY-EeKM-r033-xK6o-4og7-F13sGi already in use on "/dev/sdb1"
This commit is contained in:
parent
3d37e976bf
commit
c2d4398d47
@ -1,5 +1,6 @@
|
||||
Version 2.02.52 -
|
||||
=================================
|
||||
Fix pvcreate string termination in duplicate uuid warning message.
|
||||
Fix pvcreate on a partition (2.02.51).
|
||||
Fix vgcfgrestore error paths when locking fails (2.02.49).
|
||||
Added configure --enable-clogd to conditionally build the cluster log daemon.
|
||||
|
@ -1264,6 +1264,7 @@ struct physical_volume * pvcreate_single(struct cmd_context *cmd, const char *pv
|
||||
struct device *dev;
|
||||
struct dm_list mdas;
|
||||
struct pvcreate_params default_pp;
|
||||
char buffer[64] __attribute((aligned(8)));
|
||||
|
||||
fill_default_pvcreate_params(&default_pp);
|
||||
if (!pp)
|
||||
@ -1272,8 +1273,11 @@ struct physical_volume * pvcreate_single(struct cmd_context *cmd, const char *pv
|
||||
if (pp->idp) {
|
||||
if ((dev = device_from_pvid(cmd, pp->idp)) &&
|
||||
(dev != dev_cache_get(pv_name, cmd->filter))) {
|
||||
log_error("uuid %s already in use on \"%s\"",
|
||||
pp->idp->uuid, dev_name(dev));
|
||||
if (!id_write_format((const struct id*)&pp->idp->uuid,
|
||||
buffer, sizeof(buffer)))
|
||||
return_NULL;
|
||||
log_error("uuid %s already in use on \"%s\"", buffer,
|
||||
dev_name(dev));
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user