1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

cleanup: self compilable headers

This commit is contained in:
Zdenek Kabelac 2012-01-25 23:26:33 +01:00
parent b53e9ba66a
commit 30a81e5989
14 changed files with 39 additions and 6 deletions

View File

@ -23,6 +23,7 @@
#define _CLVM_H #define _CLVM_H
#include "configure.h" #include "configure.h"
#include <inttypes.h>
struct clvm_header { struct clvm_header {
uint8_t cmd; /* See below */ uint8_t cmd; /* See below */

View File

@ -48,6 +48,7 @@ enum dm_event_mask {
#define DM_EVENT_ALL_ERRORS DM_EVENT_ERROR_MASK #define DM_EVENT_ALL_ERRORS DM_EVENT_ERROR_MASK
#define DM_EVENT_PROTOCOL_VERSION 1 #define DM_EVENT_PROTOCOL_VERSION 1
struct dm_task;
struct dm_event_handler; struct dm_event_handler;
struct dm_event_handler *dm_event_handler_create(void); struct dm_event_handler *dm_event_handler_create(void);

View File

@ -19,6 +19,8 @@
#include <sys/types.h> #include <sys/types.h>
#include <inttypes.h> #include <inttypes.h>
#include "libdevmapper.h"
/* Define some portable printing types */ /* Define some portable printing types */
#define PRIsize_t "zu" #define PRIsize_t "zu"
#define PRIptrdiff_t "td" #define PRIptrdiff_t "td"

View File

@ -16,6 +16,9 @@
#ifndef _LVM_STR_LIST_H #ifndef _LVM_STR_LIST_H
#define _LVM_STR_LIST_H #define _LVM_STR_LIST_H
struct dm_list;
struct dm_pool;
struct dm_list *str_list_create(struct dm_pool *mem); struct dm_list *str_list_create(struct dm_pool *mem);
int str_list_add(struct dm_pool *mem, struct dm_list *sll, const char *str); int str_list_add(struct dm_pool *mem, struct dm_list *sll, const char *str);
void str_list_del(struct dm_list *sll, const char *str); void str_list_del(struct dm_list *sll, const char *str);

View File

@ -17,6 +17,7 @@
#define _LVM_DEVICE_H #define _LVM_DEVICE_H
#include "uuid.h" #include "uuid.h"
#include "lvm-types.h"
#include <fcntl.h> #include <fcntl.h>

View File

@ -16,6 +16,9 @@
#ifndef _LVM_TEXT_IMPORT_H #ifndef _LVM_TEXT_IMPORT_H
#define _LVM_TEXT_IMPORT_H #define _LVM_TEXT_IMPORT_H
#include <inttypes.h>
struct dm_hash_table;
struct lv_segment; struct lv_segment;
struct dm_config_node; struct dm_config_node;

View File

@ -15,9 +15,9 @@
#ifndef _LVM_LV_H #ifndef _LVM_LV_H
#define _LVM_LV_H #define _LVM_LV_H
#include "vg.h"
union lvid; union lvid;
struct volume_group;
struct dm_list;
struct lv_segment; struct lv_segment;
struct replicator_device; struct replicator_device;
enum activation_change; enum activation_change;

View File

@ -16,6 +16,8 @@
#ifndef _LVM_LV_ALLOC_H #ifndef _LVM_LV_ALLOC_H
#define _LVM_LV_ALLOC_H #define _LVM_LV_ALLOC_H
#include "metadata-exported.h"
struct lv_segment *alloc_lv_segment(const struct segment_type *segtype, struct lv_segment *alloc_lv_segment(const struct segment_type *segtype,
struct logical_volume *lv, struct logical_volume *lv,
uint32_t le, uint32_t len, uint32_t le, uint32_t len,

View File

@ -15,7 +15,9 @@
#ifndef _LVM_PV_H #ifndef _LVM_PV_H
#define _LVM_PV_H #define _LVM_PV_H
struct id; #include "uuid.h"
#include "libdevmapper.h"
struct device; struct device;
struct format_type; struct format_type;
struct volume_group; struct volume_group;

View File

@ -14,6 +14,15 @@
#ifndef _LVM_PV_ALLOC_H #ifndef _LVM_PV_ALLOC_H
#include <inttypes.h>
struct dm_list;
struct dm_pool;
struct lv_segment;
struct physical_volume;
struct pv_segment;
struct volume_group;
int alloc_pv_segment_whole_pv(struct dm_pool *mem, struct physical_volume *pv); int alloc_pv_segment_whole_pv(struct dm_pool *mem, struct physical_volume *pv);
int peg_dup(struct dm_pool *mem, struct dm_list *peg_new, struct dm_list *peg_old); int peg_dup(struct dm_pool *mem, struct dm_list *peg_new, struct dm_list *peg_old);
struct pv_segment *assign_peg_to_lvseg(struct physical_volume *pv, uint32_t pe, struct pv_segment *assign_peg_to_lvseg(struct physical_volume *pv, uint32_t pe,

View File

@ -15,11 +15,11 @@
#ifndef _LVM_VG_H #ifndef _LVM_VG_H
#define _LVM_VG_H #define _LVM_VG_H
#include "uuid.h"
#include "libdevmapper.h"
struct cmd_context; struct cmd_context;
struct dm_pool;
struct format_instance; struct format_instance;
struct dm_list;
struct id;
struct logical_volume; struct logical_volume;
typedef enum { typedef enum {

View File

@ -16,6 +16,8 @@
#ifndef _LVM_CRC_H #ifndef _LVM_CRC_H
#define _LVM_CRC_H #define _LVM_CRC_H
#include <inttypes.h>
#define INITIAL_CRC 0xf597a6cf #define INITIAL_CRC 0xf597a6cf
uint32_t calc_crc(uint32_t initial, const uint8_t *buf, uint32_t size); uint32_t calc_crc(uint32_t initial, const uint8_t *buf, uint32_t size);

View File

@ -19,6 +19,11 @@
#define ID_LEN 32 #define ID_LEN 32
#define ID_LEN_S "32" #define ID_LEN_S "32"
#include <inttypes.h>
#include <sys/types.h>
struct dm_pool;
struct id { struct id {
int8_t uuid[ID_LEN]; int8_t uuid[ID_LEN];
}; };

View File

@ -7,6 +7,8 @@
#ifndef __DM_LOG_USERSPACE_H__ #ifndef __DM_LOG_USERSPACE_H__
#define __DM_LOG_USERSPACE_H__ #define __DM_LOG_USERSPACE_H__
#include <inttypes.h>
#include "dm-ioctl.h" /* For DM_UUID_LEN */ #include "dm-ioctl.h" /* For DM_UUID_LEN */
/* /*