return NULL;
if (vgid) {
- id_write_format((const struct id*)vgid, uuid, 64);
+ if (!id_write_format((const struct id*)vgid, uuid, sizeof(uuid)))
+ return_0;
reply = daemon_send_simple(_lvmetad, "vg_lookup", "uuid = %s", uuid, NULL);
} else {
if (!vgname)
if (!_using_lvmetad)
return 1; /* just fake it */
- id_write_format(&vg->id, uuid, 64);
+ if (!id_write_format(&vg->id, uuid, sizeof(uuid)))
+ return_0;
+
reply = daemon_send_simple(_lvmetad, "vg_remove", "uuid = %s", uuid, NULL);
return _lvmetad_handle_reply(reply, "remove VG", vg->name);
if (!_using_lvmetad)
return_0;
- id_write_format(&pvid, uuid, 64);
+ if (!id_write_format(&pvid, uuid, sizeof(uuid)))
+ return_0;
reply = daemon_send_simple(_lvmetad, "pv_lookup", "uuid = %s", uuid, NULL);
if (!_using_lvmetad)
return 1;
- id_write_format(&pvid, uuid, 64);
+ if (!id_write_format(&pvid, uuid, sizeof(uuid)))
+ return_0;
/* FIXME A more direct route would be much preferable. */
if ((info = lvmcache_info_from_pvid((const char *)&pvid, 0)))