2 * Copyright (C) 2001-2004 Sistina Software, Inc. All rights reserved.
3 * Copyright (C) 2004-2006 Red Hat, Inc. All rights reserved.
5 * This file is part of LVM2.
7 * This copyrighted material is made available to anyone wishing to use,
8 * modify, copy, or redistribute it subject to the terms and conditions
9 * of the GNU Lesser General Public License v.2.1.
11 * You should have received a copy of the GNU Lesser General Public License
12 * along with this program; if not, write to the Free Software Foundation,
13 * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
27 * Unique logical volume identifier
28 * With format1 this is VG uuid + LV uuid + '\0' + padding
32 char s[2 * sizeof(struct id) + 1 + 7];
35 int lvid_from_lvnum(union lvid *lvid, struct id *vgid, uint32_t lv_num);
36 int lvnum_from_lvid(union lvid *lvid);
37 int lvid_in_restricted_range(union lvid *lvid);
39 void uuid_from_num(char *uuid, uint32_t num);
41 int lvid_create(union lvid *lvid, struct id *vgid);
42 int id_create(struct id *id);
43 int id_valid(struct id *id);
44 int id_equal(const struct id *lhs, const struct id *rhs);
47 * Fills 'buffer' with a more human readable form
50 int id_write_format(const struct id *id, char *buffer, size_t size);
53 * Reads a formatted uuid.
55 int id_read_format(struct id *id, const char *buffer);
57 char *id_format_and_copy(struct dm_pool *mem, const struct id *id);