1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00
lvm2/lib/label/label.h
Patrick Caulfield 515df8784a Write the location of both labels in the labels so we can check them. I don't do
much with this ATM (apart from check that they all match up).
Use a different CRC routine.
2001-12-14 13:15:15 +00:00

34 lines
909 B
C

/*
* Copyright (C) 2001 Sistina Software (UK) Limited.
*
* This file is released under the GPL.
*/
struct label
{
uint32_t magic;
uint32_t crc;
uint64_t label1_loc;
uint64_t label2_loc;
uint16_t datalen;
char disk_type[32];
uint32_t version[3];
char *data; /* Should be freed with label_free() */
};
#define VERSION_MATCH_EQUAL 1
#define VERSION_MATCH_LESSTHAN 2
#define VERSION_MATCH_LESSEQUAL 3
#define VERSION_MATCH_ANY 4
extern int label_write(struct device *dev, struct label *label);
extern int label_read(struct device *dev, struct label *label);
extern void label_free(struct label *label);
extern int is_labelled(struct device *dev);
extern int labels_match(struct device *dev);
extern struct dev_filter *label_filter_create();
extern struct dev_filter *label_format_filter_create(char *disk_type, uint32_t version[3], int match_type);