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