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

Tidy include files

This commit is contained in:
Alasdair Kergon 2001-10-01 15:14:39 +00:00
parent fa42e6493d
commit b8ef655fb7
22 changed files with 52 additions and 585 deletions

View File

@ -38,8 +38,8 @@
#include <errno.h>
#include "config.h"
#include "mm/pool.h"
#include "log/log.h"
#include "pool.h"
#include "log.h"
enum {
TOK_INT,

View File

@ -1,6 +1,4 @@
/*
* tools/lib/datastruct/hash.h
*
* Copyright (C) 2001 Sistina Software
*
* This file is released under the GPL.

View File

@ -1,13 +1,11 @@
/*
* tools/lib/datastruct/hash.h
*
* Copyright (C) 2001 Sistina Software
*
* This file is released under the GPL.
*/
#ifndef HASH_H
#define HASH_H
#ifndef _LVM_HASH_H
#define _LVM_HASH_H
struct hash_table;
typedef void (*iterate_fn)(void *data);

View File

@ -1,7 +1,7 @@
/* stolen from the Linux kernel. */
#ifndef _LINUX_LIST_H
#define _LINUX_LIST_H
#ifndef _LVM_LIST_H
#define _LVM_LIST_H
#ifdef __KERNEL__

View File

@ -1,6 +1,4 @@
/*
* tools/lib/dev-manager.h
*
* Copyright (C) 2001 Sistina Software
*
* This file is released under the GPL.

View File

@ -6,8 +6,8 @@
* This file is released under the GPL.
*/
#ifndef DEV_CACHE_H
#define DEV_CACHE_H
#ifndef _LVM_DEV_CACHE_H
#define _LVM_DEV_CACHE_H
struct device {
char *name;

View File

@ -1,6 +1,4 @@
/*
* tools/lib/dev-manager.c
*
* Copyright (C) 2001 Sistina Software
*
* This LVM library is free software; you can redistribute it and/or
@ -19,22 +17,6 @@
* MA 02111-1307, USA
*/
/*
* Changelog
*
* 14/08/2001 - Initial checkin (AJL)
* 15/08/2001 - Several structural changes
* + Got rid of _hash_name_lookup and _hash_dev_lookup
* + Got rid of _destroy_hash_table
* + The fin_* fxns now return void
* + Split _hash_insert into _name_insert, _dev_insert, and
* _list_insert. Most of the logic from _hash_insert is now in
* _add.
* 20/08/2001 - Created _add_named_device and used it in dev_by_name
* 21/08/2001 - Basic config file support added
*
*/
#include <dirent.h>
#include <sys/types.h>
#include <sys/stat.h>
@ -42,8 +24,8 @@
#include <string.h>
#include <linux/kdev_t.h>
#include "hash.h"
#include "mm/pool.h"
#include "log/log.h"
#include "pool.h"
#include "log.h"
#include "dev-manager.h"
#define DEFAULT_BASE_DIR "/dev"

View File

@ -1,6 +1,4 @@
/*
* tools/lib/dev-manager.h
*
* Copyright (C) 2001 Sistina Software
*
* This LVM library is free software; you can redistribute it and/or
@ -23,7 +21,7 @@
#define _LVM_DEV_MANAGER_H
#include <sys/types.h>
#include "config/config.h"
#include "config.h"
struct device {
char *name;

View File

@ -1,41 +0,0 @@
/*
* Copyright (C) 2001 Sistina Software
*
* This LVM library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This LVM library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this LVM library; if not, write to the Free
* Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
* MA 02111-1307, USA
*/
#ifndef _LVM_HASH_H
#define _LVM_HASH_H
extern unsigned char hash_nums[256];
static inline unsigned hash(const char *str)
{
unsigned long int h = 0, g;
while (*str) {
h <<= 4;
h += hash_nums[(int) *str++];
g = h & ((unsigned long) 0xf << 16u);
if (g) {
h ^= g >> 16u;
h ^= g >> 5u;
}
}
return h;
};
#endif

View File

@ -32,7 +32,7 @@
#include <linux/genhd.h>
#include "device.h"
#include "log/log.h"
#include "log.h"
int do_ioctl(const char *file, int mode, unsigned long cmd, void *req)
{

View File

@ -20,10 +20,10 @@
#include <sys/types.h>
#include <string.h>
#include "display/display.h"
#include "metadata/metadata.h"
#include "mm/dbg_malloc.h"
#include "log/log.h"
#include "display.h"
#include "metadata.h"
#include "dbg_malloc.h"
#include "log.h"
#define SIZE_BUF 128

View File

@ -20,10 +20,10 @@
#include <sys/types.h>
#include <string.h>
#include "display/display.h"
#include "display/metadata.h"
#include "mm/dbg_malloc.h"
#include "log/log.h"
#include "display.h"
#include "metadata.h"
#include "dbg_malloc.h"
#include "log.h"
void pv_display_colons(pv_t * pv)
{

View File

@ -1,6 +1,4 @@
/*
* tools/lib/lvm_log.c
*
* Copyright (C) 2001 Sistina Software
*
*
@ -21,13 +19,6 @@
*
*/
/*
* Changelog
*
* 22/01/2001 - First version (Joe Thornber)
*
*/
#include "log.h"
#include <stdarg.h>
#include <syslog.h>

View File

@ -24,10 +24,10 @@
#include <errno.h>
#include <sys/stat.h>
#include "mm/dbg_malloc.h"
#include "dev-mgr/dev-manager.h"
#include "log/log.h"
#include "metadata/metadata.h"
#include "dbg_malloc.h"
#include "dev-manager.h"
#include "log.h"
#include "metadata.h"
/*
* FIXME: these should not allocate memory

View File

@ -18,14 +18,14 @@
*/
#include <string.h>
#include "mm/dbg_malloc.h"
#include "dev-mgr/dev-manager.h"
#include "log/log.h"
#include "metadata/metadata.h"
#include "dbg_malloc.h"
#include "dev-manager.h"
#include "log.h"
#include "metadata.h"
/* FIXME: Use registered fn ptrs to avoid including this? */
/* Split into external/internal hdr files? */
#include "metadata/lvm_v1.h"
#include "lvm_v1.h"
pv_t *pv_read(struct dev_mgr *dm, const char *pv_name)
{

View File

@ -7,8 +7,8 @@
* associated physical and logical volumes.
*/
#ifndef METADATA_H
#define METADATA_H
#ifndef _LVM_METADATA_H
#define _LVM_METADATA_H
#define ID_LEN 32

View File

@ -1,6 +1,4 @@
/*
* dbg_malloc.c
*
* Copyright (C) 2000, 2001 Sistina Software
*
* lvm is free software; you can redistribute it and/or modify
@ -18,10 +16,6 @@
* the Free Software Foundation, 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*
* Changelog
*
* 9/11/2000 - First version by Joe Thornber
*
* TODO:
*
* Thread safety seems to have fallen out, put lock back in.
@ -33,7 +27,7 @@
#include <string.h>
#include "dbg_malloc.h"
#include "log/log.h"
#include "log.h"
struct memblock {
struct memblock *prev, *next; /* All allocated blocks are linked */

View File

@ -1,6 +1,4 @@
/*
* tools/lib/pool.c
*
* Copyright (C) 2001 Sistina Software
*
* LVM is free software; you can redistribute it and/or modify
@ -24,7 +22,7 @@
#include "pool.h"
#include "dbg_malloc.h"
#include "log/log.h"
#include "log.h"
struct chunk {
char *begin, *end;

View File

@ -1,7 +1,7 @@
/* stolen from the Linux kernel. */
#ifndef _LINUX_LIST_H
#define _LINUX_LIST_H
#ifndef _LVM_LIST_H
#define _LVM_LIST_H
#ifdef __KERNEL__

View File

@ -21,460 +21,10 @@
#ifndef _LVM_ERROR_H_INCLUDE
#define _LVM_ERROR_H_INCLUDE
/* Tool return codes */
#define LVM_E_CHECK_ERRORS 1
#define LVM_E_FCLOSE 4
#define LVM_E_FOPEN 5
#define LVM_E_FSCK_PATH 6
#define LVM_E_FSCK_RUN 7
#define LVM_E_FSSIZE_CHANGE 9
#define LVM_E_GET_FREE_VG_NUMBER 10
#define LVM_E_INVALID 11
#define LVM_E_LV_CHECK_ACTIVE 15
#define LVM_E_LV_CHECK_EXIST 16
#define LVM_E_LV_CHECK_EXIST_OLD 18
#define LVM_E_LV_CHECK_NAME 19
#define LVM_E_LV_COUNT 21
#define LVM_E_LV_CREATE 22
#define LVM_E_LV_CREATE_NODE 23
#define LVM_E_LV_EXISTS 25
#define LVM_E_LV_EXTEND 26
#define LVM_E_LV_EXTEND_PATH 27
#define LVM_E_LV_EXTEND_RUN 28
#define LVM_E_LV_GET_INDEX 29
#define LVM_E_LV_INIT_COW_TABLE 31
#define LVM_E_LV_LSTAT 32
#define LVM_E_LV_MISSING 34
#define LVM_E_LVMTAB 35
#define LVM_E_LVM_TAB_VG_INSERT 36
#define LVM_E_LVM_TAB_VG_REMOVE 37
#define LVM_E_LV_OPEN 41
#define LVM_E_LV_PATH 42
#define LVM_E_LV_READ 43
#define LVM_E_LV_READ_COW_TABLE 44
#define LVM_E_LV_REDUCE 45
#define LVM_E_LV_REDUCE_PATH 46
#define LVM_E_LV_REDUCE_RUN 47
#define LVM_E_LV_RELEASE 48
#define LVM_E_LV_REMOVE 49
#define LVM_E_LV_RENAME 50
#define LVM_E_LV_SET_ACCESS 51
#define LVM_E_LV_SET_ALLOCATION 52
#define LVM_E_LV_SET_STATUS 53
#define LVM_E_LV_SETUP 54
#define LVM_E_LV_SETUP_COW_TABLE_FOR_CREATE 55
#define LVM_E_LV_SIZE 56
#define LVM_E_LV_SIZE_FREE 57
#define LVM_E_LV_SIZE_MAX 58
#define LVM_E_LV_SNAPSHOT 59
#define LVM_E_LV_WRITE 63
#define LVM_E_LV_WRITE_ALL_PV 64
#define LVM_E_MALLOC 65
#define LVM_E_MAX_LV 66
#define LVM_E_MAX_VG 67
#define LVM_E_NO_DEV 69
#define LVM_E_NO_DISKS_FOUND 70
#define LVM_E_NO_EMPTY_PV 71
#define LVM_E_NO_EXT2 72
#define LVM_E_NO_FILES_FOUND 73
#define LVM_E_NO_PV_FOUND 75
#define LVM_E_NOT_EXTENDABLE 76
#define LVM_E_NO_VALID_PV 77
#define LVM_E_NO_VG 78
#define LVM_E_NO_VG_NAME 79
#define LVM_E_NO_VGS 80
#define LVM_E_OPEN 81
#define LVM_E_PE_FREE 83
#define LVM_E_PE_OVERLAP 86
#define LVM_E_PV_CHANGE 88
#define LVM_E_PV_CHECK_CONSISTENCY 89
#define LVM_E_PV_CHECK_IN_VG 90
#define LVM_E_PV_CHECK_NEW 93
#define LVM_E_PV_COUNT 94
#define LVM_E_PV_FIND_ALL_PV_NAMES 95
#define LVM_E_PV_GET_SIZE 97
#define LVM_E_PV_MAX 98
#define LVM_E_PV_MISSING 99
#define LVM_E_PV_MULTIPLE 101
#define LVM_E_PV_NAME 102
#define LVM_E_PV_NUMBER 103
#define LVM_E_PV_ONLINE 104
#define LVM_E_PV_READ 105
#define LVM_E_PV_READ_ALL_PV 106
#define LVM_E_PV_READ_PE 107
#define LVM_E_PV_SETUP 108
#define LVM_E_PV_TOO_SMALL 110
#define LVM_E_PV_WRITE 111
#define LVM_E_PV_WRITE_ALL_PV_OF_VG 112
#define LVM_E_READ_AHEAD 113
#define LVM_E_REALLOC 114
#define LVM_E_RESET 115
#define LVM_E_RESIZE_PATH 116
#define LVM_E_RESIZE_RUN 117
#define LVM_E_SOME_INVALID_PV 118
#define LVM_E_STRIPE_COUNT 119
#define LVM_E_VG_CFGBACKUP 123
#define LVM_E_VG_CFG_BACKUP 124
#define LVM_E_VG_CFGBACKUP_LVMTAB 125
#define LVM_E_VG_CFGRESTORE 126
#define LVM_E_VG_CHECK_ACTIVE 127
#define LVM_E_VG_CHECK_CONSISTENCY 128
#define LVM_E_VG_CHECK_DIR 129
#define LVM_E_VG_CHECK_EXIST 130
#define LVM_E_VG_CHECK_EXIST_NEW 131
#define LVM_E_VG_CHECK_EXIST_OLD 132
#define LVM_E_VG_CHECK_NAME_NEW 134
#define LVM_E_VG_CHECK_NAME_OLD 135
#define LVM_E_VG_CREATE 136
#define LVM_E_VG_CREATE_DIR_AND_GROUP_NODES 137
#define LVM_E_VG_CREATE_DIR_AND_GROUP_NODES_EXIST 138
#define LVM_E_VG_CREATE_DIR_AND_GROUP_NODES_NEW 139
#define LVM_E_VG_DIFF 140
#define LVM_E_VG_DIR_NEW 141
#define LVM_E_VG_DIR_OLD 142
#define LVM_E_VG_EEXIST 143
#define LVM_E_VG_ERROR 144
#define LVM_E_VG_EXTEND 145
#define LVM_E_VG_INSERT 146
#define LVM_E_VG_MISSING 147
#define LVM_E_VG_NAME 148
#define LVM_E_VG_NAMES 150
#define LVM_E_VG_NAMES_IDENTICAL 151
#define LVM_E_VG_NOT_FOUND 152
#define LVM_E_VG_NOT_REDUCABLE 153
#define LVM_E_VG_PV_NAMES 154
#define LVM_E_VG_READ 155
#define LVM_E_VG_REDUCE 159
#define LVM_E_VG_REMOVE 160
#define LVM_E_VG_REMOVE_DIR 161
#define LVM_E_VG_REMOVE_DIR_AND_GROUP_NODES 162
#define LVM_E_VG_RENAME 163
#define LVM_E_VG_SETUP 164
#define LVM_E_VG_SIZE 165
#define LVM_E_VG_STATUS 166
#define LVM_E_VG_WRITE 167
#define LVM_ECMD_PROCESSED 170
#define LVM_EVG_CHECK_ACTIVE 171
#define LVM_EVG_READ 172
#define LVM_ELV_STATUS 173
#define LVM_EVG_WRITE 175
#define LVM_ENOMEM 176
#define LVM_EDRIVER 177
#define LVM_EINVALID_IOP 178
#define LVM_ELVMTAB 180
#define LVM_EINVALID_CMD_LINE 181
#define LVM_EPARAM 182
#define LVM_ENO_SUCH_CMD 490
/* Library return codes */
#define LVM_ELVM_CHECK_CHARS 183
#define LVM_ELVM_FIND_VG_REALLOC 184
#define LVM_ELVM_IOP_VERSION_OPEN 185
#define LVM_ELVM_LOCK_YET_LOCKED 186
#define LVM_ELVM_NOT_LOCKED 187
#define LVM_ELVM_TAB_CREATE_LVMTAB 188
#define LVM_ELVM_TAB_CREATE_LVMTAB_DIR 189
#define LVM_ELVM_TAB_GET_FREE_BLK_DEV_LVM_TAB_VG_CHECK_EXIST 190
#define LVM_ELVM_TAB_GET_FREE_BLK_DEV_NO_DEV 191
#define LVM_ELVM_TAB_GET_FREE_BLK_DEV_REALLOC 192
#define LVM_ELVM_TAB_GET_FREE_VG_NUMBER_MALLOC 193
#define LVM_ELVM_TAB_LV_READ_BY_NAME_LVM_TAB_VG_READ_WITH_PV_AND_LV 194
#define LVM_ELVM_TAB_LV_READ_BY_NAME_LV_GET_INDEX_BY_NAME 195
#define LVM_ELVM_TAB_READ_FSTAT 196
#define LVM_ELVM_TAB_READ_MALLOC 197
#define LVM_ELVM_TAB_READ_OPEN 198
#define LVM_ELVM_TAB_READ_PV_CHECK_NAME 199
#define LVM_ELVM_TAB_READ_READ 200
#define LVM_ELVM_TAB_READ_SIZE 201
#define LVM_ELVM_TAB_READ_VG_CHECK_NAME 202
#define LVM_ELVM_TAB_VG_CHECK_EXIST_ALL_VG_REALLOC 203
#define LVM_ELVM_TAB_VG_INSERT_REALLOC 204
#define LVM_ELVM_TAB_VG_INSERT_VG_EXISTS 205
#define LVM_ELVM_TAB_VG_REMOVE_NOT_EXISTS 206
#define LVM_ELVM_TAB_VG_REMOVE_UNLINK 207
#define LVM_ELVM_TAB_WRITE_FCHMOD 208
#define LVM_ELVM_TAB_WRITE_OPEN 209
#define LVM_ELVM_TAB_WRITE_WRITE 210
#define LVM_ELV_ACCESS 211
#define LVM_ELV_ALLOCATED_LE 212
#define LVM_ELV_ALLOCATION 213
#define LVM_ELV_BADBLOCK 214
#define LVM_ELV_CHECK_NAME_LV_NAME 215
#define LVM_ELV_CHECK_NAME_LV_NUM 216
#define LVM_ELV_CHECK_NAME_VG_NAME 217
#define LVM_ELV_CHECK_STRIPE_SIZE 218
#define LVM_ELV_CREATE_NODE_CHMOD 219
#define LVM_ELV_CREATE_NODE_CHOWN 220
#define LVM_ELV_CREATE_NODE_MKNOD 221
#define LVM_ELV_CREATE_NODE_UNLINK 222
#define LVM_ELV_CREATE_REMOVE_OPEN 223
#define LVM_ELV_CURRENT_LE 224
#define LVM_ELV_EXTEND_REDUCE_OPEN 225
#define LVM_ELV_INIT_COW_TABLE_CLOSE 226
#define LVM_ELV_INIT_COW_TABLE_LLSEEK 227
#define LVM_ELV_INIT_COW_TABLE_MALLOC 228
#define LVM_ELV_INIT_COW_TABLE_OPEN 229
#define LVM_ELV_INIT_COW_TABLE_WRITE 230
#define LVM_ELV_LE_REMAP_OPEN 231
#define LVM_ELV_LVNAME 232
#define LVM_ELV_MIRROR_COPIES 233
#define LVM_ELV_NUMBER 234
#define LVM_ELV_OPEN 235
#define LVM_ELV_READ_ALL_LV_LSEEK 236
#define LVM_ELV_READ_ALL_LV_MALLOC 237
#define LVM_ELV_READ_ALL_LV_NL 238
#define LVM_ELV_READ_ALL_LV_OPEN 239
#define LVM_ELV_READ_ALL_LV_READ 240
#define LVM_ELV_READ_ALL_LV_VG_READ 241
#define LVM_ELV_READ_BYINDEX_LV_READ_ALL_LV 242
#define LVM_ELV_READ_BYINDEX_VG_NAME 243
#define LVM_ELV_READ_BYINDEX_VG_READ 244
#define LVM_ELV_READ_COW_TABLE_CLOSE 245
#define LVM_ELV_READ_COW_TABLE_LLSEEK 246
#define LVM_ELV_READ_COW_TABLE_MALLOC 247
#define LVM_ELV_READ_COW_TABLE_OPEN 248
#define LVM_ELV_READ_COW_TABLE_READ 249
#define LVM_ELV_READ_LV 250
#define LVM_ELV_READ_LV_NAME 251
#define LVM_ELV_READ_LV_READ_ALL_LV 252
#define LVM_ELV_READ_VG_NAME 253
#define LVM_ELV_READ_VG_READ 254
#define LVM_ELV_RECOVERY 255
#define LVM_ELV_RELEASE_LV_NUM 257
#define LVM_ELV_RENAME_OPEN 258
#define LVM_ELV_SCHEDULE 259
#define LVM_ELV_SETUP_COW_TABLE_FOR_CREATE_MALLOC 260
#define LVM_ELV_SETUP_FOR_CREATE_LVM_TAB_GET_FREE_BLK_DEV 261
#define LVM_ELV_SETUP_FOR_CREATE_LV_MAX 262
#define LVM_ELV_SETUP_FOR_CREATE_MALLOC 263
#define LVM_ELV_SETUP_FOR_CREATE_PE 264
#define LVM_ELV_SETUP_FOR_CREATE_STRIPES 265
#define LVM_ELV_SETUP_FOR_CREATE_STRIPESIZE 266
#define LVM_ELV_SETUP_FOR_EXTEND_LV_INDEX 267
#define LVM_ELV_SETUP_FOR_EXTEND_REALLOC 268
#define LVM_ELV_SETUP_FOR_EXTEND_STRIPES 269
#define LVM_ELV_SETUP_FOR_REDUCE_LV_INDEX 270
#define LVM_ELV_SETUP_FOR_REDUCE_MALLOC 271
#define LVM_ELV_SHOW_CURRENT_PE_TEXT_LV_INDEX 272
#define LVM_ELV_SHOW_VG_READ_WITH_PV_AND_LV 273
#define LVM_ELV_SIZE 274
#define LVM_ELV_STATUS_ALL_LV_OF_VG_MALLOC 275
#define LVM_ELV_STATUS_BYINDEX_MALLOC 276
#define LVM_ELV_STATUS_BYNAME_MALLOC 277
#define LVM_ELV_STATUS_INTERNAL_OPEN 278
#define LVM_ELV_STATUS_NL 279
#define LVM_ELV_STRIPES 280
#define LVM_ELV_STRIPESIZE 281
#define LVM_ELV_TIMEOUT 282
#define LVM_ELV_VGNAME 283
#define LVM_ELV_WRITE_ALL_LV_LSEEK 284
#define LVM_ELV_WRITE_ALL_LV_MALLOC 285
#define LVM_ELV_WRITE_ALL_LV_OPEN 286
#define LVM_ELV_WRITE_ALL_LV_WRITE 287
#define LVM_ELV_WRITE_LSEEK 288
#define LVM_ELV_WRITE_OPEN 289
#define LVM_ELV_WRITE_WRITE 290
#define LVM_EPE_LOCK 291
#define LVM_EPV_CHANGE_ALL_PV_FOR_LV_OF_VG_LV_NUM 292
#define LVM_EPV_CHANGE_OPEN 293
#define LVM_EPV_CHECK_CONSISTENCY_ALL_PV_PE 294
#define LVM_EPV_CHECK_CONSISTENCY_LVM_ID 295
#define LVM_EPV_CHECK_CONSISTENCY_LV_CUR 296
#define LVM_EPV_CHECK_CONSISTENCY_MAJOR 297
#define LVM_EPV_CHECK_CONSISTENCY_PE_ALLOCATED 298
#define LVM_EPV_CHECK_CONSISTENCY_PE_SIZE 299
#define LVM_EPV_CHECK_CONSISTENCY_PE_STALE 300
#define LVM_EPV_CHECK_CONSISTENCY_PE_TOTAL 301
#define LVM_EPV_CHECK_CONSISTENCY_PV_ALLOCATABLE 302
#define LVM_EPV_CHECK_CONSISTENCY_PV_NAME 303
#define LVM_EPV_CHECK_CONSISTENCY_PV_SIZE 304
#define LVM_EPV_CHECK_CONSISTENCY_PV_STATUS 305
#define LVM_EPV_CHECK_CONSISTENCY_STRUCT_VERSION 306
#define LVM_EPV_CHECK_CONSISTENCY_VG_NAME 307
#define LVM_EPV_CHECK_NAME 308
#define LVM_EPV_CHECK_NAME_STAT 309
#define LVM_EPV_CHECK_NUMBER_MALLOC 310
#define LVM_EPV_CHECK_NUMBER_MAX_NUMBER 311
#define LVM_EPV_CHECK_NUMBER_PV_NUMBER 312
#define LVM_EPV_CHECK_PART 313
#define LVM_EPV_FIND_ALL_PV_PV_READ 314
#define LVM_EPV_FLUSH_OPEN 315
#define LVM_EPV_GET_SIZE_IOCTL 316
#define LVM_EPV_GET_SIZE_LLSEEK 317
#define LVM_EPV_GET_SIZE_LVM_DIR_CACHE 318
#define LVM_EPV_GET_SIZE_NO_EXTENDED 319
#define LVM_EPV_GET_SIZE_NO_PRIMARY 320
#define LVM_EPV_GET_SIZE_OPEN 321
#define LVM_EPV_GET_SIZE_PART 322
#define LVM_EPV_GET_SIZE_READ 323
#define LVM_EPV_MOVE_LV_LE_REMAP 324
#define LVM_EPV_MOVE_PES_ALLOC_STRIPES 325
#define LVM_EPV_MOVE_PES_NO_PES 326
#define LVM_EPV_MOVE_PES_NO_SPACE 327
#define LVM_EPV_MOVE_PES_REALLOC 328
#define LVM_EPV_MOVE_PE_LLSEEK_IN 329
#define LVM_EPV_MOVE_PE_LLSEEK_OUT 330
#define LVM_EPV_MOVE_PE_LOCK 331
#define LVM_EPV_MOVE_PE_LV_GET_NAME 332
#define LVM_EPV_MOVE_PE_OPEN 333
#define LVM_EPV_MOVE_PE_OPEN_IN 334
#define LVM_EPV_MOVE_PE_READ_IN 335
#define LVM_EPV_MOVE_PE_UNLOCK 336
#define LVM_EPV_MOVE_PE_WRITE_OUT 337
#define LVM_EPV_MOVE_PV_CHANGE_DEST 338
#define LVM_EPV_MOVE_PV_CHANGE_SRC 339
#define LVM_EPV_MOVE_PV_PV_WRITE_WITH_PE_DEST 340
#define LVM_EPV_MOVE_PV_PV_WRITE_WITH_PE_SRC 341
#define LVM_EPV_READ_ALL_PE_OF_VG_MALLOC 342
#define LVM_EPV_READ_ALL_PE_OF_VG_PV_NUMBER 343
#define LVM_EPV_READ_ALL_PV_LVM_DIR_CACHE 344
#define LVM_EPV_READ_ALL_PV_MALLOC 345
#define LVM_EPV_READ_ALL_PV_OF_VG_MALLOC 346
#define LVM_EPV_READ_ALL_PV_OF_VG_NP 347
#define LVM_EPV_READ_ALL_PV_OF_VG_NP_SORT 348
#define LVM_EPV_READ_ALL_PV_OF_VG_PV_NUMBER 349
#define LVM_EPV_READ_ID_INVALID 350
#define LVM_EPV_READ_LVM_STRUCT_VERSION 351
#define LVM_EPV_READ_MAJOR 352
#define LVM_EPV_READ_MD_DEVICE 353
#define LVM_EPV_READ_OPEN 354
#define LVM_EPV_READ_PE_LSEEK 355
#define LVM_EPV_READ_PE_MALLOC 356
#define LVM_EPV_READ_PE_OPEN 357
#define LVM_EPV_READ_PE_READ 358
#define LVM_EPV_READ_PE_SIZE 359
#define LVM_EPV_READ_PV_CREATE_NAME_FROM_KDEV_T 360
#define LVM_EPV_READ_PV_EXPORTED 361
#define LVM_EPV_READ_PV_FLUSH 362
#define LVM_EPV_READ_RDEV 363
#define LVM_EPV_READ_READ 364
#define LVM_EPV_READ_STAT 365
#define LVM_EPV_READ_UUIDLIST_LSEEK 366
#define LVM_EPV_READ_UUIDLIST_OPEN 367
#define LVM_EPV_READ_UUIDLIST_READ 368
#define LVM_EPV_READ_UUIDLIST_MALLOC 369
#define LVM_EPV_RELEASE_PE_NO_PV 370
#define LVM_EPV_RELEASE_PE_REALLOC 371
#define LVM_EPV_SHOW_PE_TEXT_MALLOC 372
#define LVM_EPV_SHOW_PE_TEXT_REALLOC 373
#define LVM_EPV_SHOW_PE_TEXT_VG_READ_WITH_PV_AND_LV 374
#define LVM_EPV_STATUS_ALL_PV_LVM_DIR_CACHE 375
#define LVM_EPV_STATUS_ALL_PV_OF_VG_MALLOC 376
#define LVM_EPV_STATUS_ALL_PV_OF_VG_NP 377
#define LVM_EPV_STATUS_OPEN 378
#define LVM_EPV_TIME_CHECK 379
#define LVM_EPV_WRITE_LSEEK 380
#define LVM_EPV_WRITE_OPEN 381
#define LVM_EPV_WRITE_PE_LSEEK 382
#define LVM_EPV_WRITE_PE_OPEN 383
#define LVM_EPV_WRITE_PE_SIZE 384
#define LVM_EPV_WRITE_PE_WRITE 385
#define LVM_EPV_WRITE_UUIDLIST_LSEEK 386
#define LVM_EPV_WRITE_UUIDLIST_MALLOC 387
#define LVM_EPV_WRITE_UUIDLIST_OPEN 388
#define LVM_EPV_WRITE_UUIDLIST_WRITE 389
#define LVM_EPV_WRITE_WRITE 390
#define LVM_EREMOVE_RECURSIVE_MALLOC 391
#define LVM_EREMOVE_RECURSIVE_OPENDIR 392
#define LVM_ESIZE 393
#define LVM_ESYSTEM_ID_SET_UNAME 394
#define LVM_EVG_CFGBACKUP_FILE_EXISTS 395
#define LVM_EVG_CFGBACKUP_MALLOC 396
#define LVM_EVG_CFGBACKUP_OPEN 397
#define LVM_EVG_CFGBACKUP_READ 398
#define LVM_EVG_CFGBACKUP_RENAME 399
#define LVM_EVG_CFGBACKUP_TMP_FILE 400
#define LVM_EVG_CFGBACKUP_UNLINK 401
#define LVM_EVG_CFGBACKUP_VG_CHECK_EXIST 402
#define LVM_EVG_CFGBACKUP_VG_READ_WITH_PV_AND_LV 403
#define LVM_EVG_CFGBACKUP_WRITE 404
#define LVM_EVG_CFGRESTORE_FILE_EXISTS 405
#define LVM_EVG_CFGRESTORE_LV_CHECK_CONSISTENCY 406
#define LVM_EVG_CFGRESTORE_MALLOC 407
#define LVM_EVG_CFGRESTORE_OPEN 408
#define LVM_EVG_CFGRESTORE_PV_CHECK_CONSISTENCY 409
#define LVM_EVG_CFGRESTORE_READ 410
#define LVM_EVG_CFGRESTORE_VG_CHECK_CONSISTENCY 411
#define LVM_EVG_CFGRESTORE_VG_CHECK_CONSISTENCY_WITH_PV_AND_LV 412
#define LVM_EVG_CHECK_ACTIVE_ALL_VG_COUNT 413
#define LVM_EVG_CHECK_ACTIVE_ALL_VG_MALLOC 414
#define LVM_EVG_CHECK_ACTIVE_ALL_VG_NAMELIST 415
#define LVM_EVG_CHECK_CONSISTENCY 416
#define LVM_EVG_CHECK_CONSISTENCY_LV_CUR 417
#define LVM_EVG_CHECK_CONSISTENCY_PE_ALLOCATED 419
#define LVM_EVG_CHECK_CONSISTENCY_PE_SIZE 420
#define LVM_EVG_CHECK_CONSISTENCY_PE_TOTAL 421
#define LVM_EVG_CHECK_CONSISTENCY_PVG_TOTAL 422
#define LVM_EVG_CHECK_CONSISTENCY_PV_ACT 423
#define LVM_EVG_CHECK_CONSISTENCY_PV_CUR 424
#define LVM_EVG_CHECK_CONSISTENCY_VGDA 425
#define LVM_EVG_CHECK_CONSISTENCY_VG_ACCESS 426
#define LVM_EVG_CHECK_CONSISTENCY_VG_NAME 427
#define LVM_EVG_CHECK_CONSISTENCY_VG_STATUS 428
#define LVM_EVG_CHECK_EXIST_PV_COUNT 429
#define LVM_EVG_CHECK_NAME 430
#define LVM_EVG_CHECK_ONLINE_ALL_PV 431
#define LVM_EVG_CHECK_ONLINE_ALL_PV_MALLOC 432
#define LVM_EVG_CHECK_PE_SIZE 433
#define LVM_EVG_CREATE_DIR_AND_GROUP_CHMOD_DIR 434
#define LVM_EVG_CREATE_DIR_AND_GROUP_CHMOD_GROUP 435
#define LVM_EVG_CREATE_DIR_AND_GROUP_CHOWN_GROUP 436
#define LVM_EVG_CREATE_DIR_AND_GROUP_MKDIR 437
#define LVM_EVG_CREATE_DIR_AND_GROUP_MKNOD 438
#define LVM_EVG_CREATE_REMOVE_OPEN 439
#define LVM_EVG_EXTEND_REDUCE_OPEN 440
#define LVM_EVG_READ_LSEEK 441
#define LVM_EVG_READ_LVM_STRUCT_VERSION 442
#define LVM_EVG_READ_OPEN 443
#define LVM_EVG_READ_PV 444
#define LVM_EVG_READ_READ 445
#define LVM_EVG_READ_VG_EXPORTED 446
#define LVM_EVG_READ_WITH_PV_AND_LV_LV_ALLOCATED_LE 447
#define LVM_EVG_READ_WITH_PV_AND_LV_MALLOC 448
#define LVM_EVG_READ_WITH_PV_AND_LV_PV_CUR 449
#define LVM_EVG_RENAME_OPEN 450
#define LVM_EVG_SETUP_FOR_CREATE_MALLOC 451
#define LVM_EVG_SETUP_FOR_CREATE_PV_SIZE_MIN 452
#define LVM_EVG_SETUP_FOR_CREATE_VG_NUMBER 453
#define LVM_EVG_SETUP_FOR_EXTEND_MALLOC 454
#define LVM_EVG_SETUP_FOR_EXTEND_MAX_PV 455
#define LVM_EVG_SETUP_FOR_EXTEND_NO_PV 456
#define LVM_EVG_SETUP_FOR_EXTEND_PV_ALREADY 457
#define LVM_EVG_SETUP_FOR_EXTEND_PV_CHECK_NAME 458
#define LVM_EVG_SETUP_FOR_EXTEND_PV_CHECK_NEW 459
#define LVM_EVG_SETUP_FOR_EXTEND_PV_GET_SIZE 460
#define LVM_EVG_SETUP_FOR_EXTEND_PV_SIZE 461
#define LVM_EVG_SETUP_FOR_EXTEND_PV_SIZE_REL 462
#define LVM_EVG_SETUP_FOR_MERGE_BLK_DEV 463
#define LVM_EVG_SETUP_FOR_MERGE_LV_MAX 464
#define LVM_EVG_SETUP_FOR_MERGE_PE_SIZE 465
#define LVM_EVG_SETUP_FOR_MERGE_PV_MAX 466
#define LVM_EVG_SETUP_FOR_MERGE_VG_CHECK_CONSISTENCY_WITH_PV_AND_LV 467
#define LVM_EVG_SETUP_FOR_REDUCE_LAST_PV 468
#define LVM_EVG_SETUP_FOR_REDUCE_LAST_PV_NOT_IN_VG 469
#define LVM_EVG_SETUP_FOR_REDUCE_LV 470
#define LVM_EVG_SETUP_FOR_REDUCE_NO_PV_TO_REDUCE 471
#define LVM_EVG_SETUP_FOR_REDUCE_PV_INVALID 472
#define LVM_EVG_SETUP_FOR_REDUCE_REALLOC 473
#define LVM_EVG_SETUP_FOR_SPLIT_LV_ON_PV 474
#define LVM_EVG_SETUP_FOR_SPLIT_MALLOC 475
#define LVM_EVG_SETUP_FOR_SPLIT_PV 476
#define LVM_EVG_SETUP_FOR_SPLIT_PV_COUNT 477
#define LVM_EVG_SETUP_FOR_SPLIT_VG_NUMBER 478
#define LVM_EVG_SET_CLEAR_EXTENDABLE_OPEN 479
#define LVM_EVG_STATUS_GET_COUNT_OPEN 480
#define LVM_EVG_STATUS_GET_NAMELIST_OPEN 481
#define LVM_EVG_STATUS_MALLOC 482
#define LVM_EVG_STATUS_OPEN 483
#define LVM_EVG_WRITE_LSEEK 484
#define LVM_EVG_WRITE_OPEN 485
#define LVM_EVG_WRITE_WRITE 486
#define LVM_ELV_PV_CREATE_NAME_FROM_KDEV_T 487
#define LVM_EPV_FLUSH_STAT 488
#define LVM_EVG_SETUP_FOR_CREATE_PV_SIZE_MAX 489
#define LVM_EINVALID_CMD_LINE 1
#define LVM_ENOMEM 2
#define LVM_ENO_SUCH_CMD 3
#define LVM_ECMD_PROCESSED 4
#endif /* #ifndef _LVM_ERROR_H_INCLUDE */

View File

@ -18,8 +18,8 @@
*
*/
#ifndef LVM_TOOLLIB_H
#define LVM_TOOLLIB_H
#ifndef _LVM_TOOLLIB_H
#define _LVM_TOOLLIB_H
int autobackup_set (void);
int init_autobackup (void);

View File

@ -17,8 +17,8 @@
* Boston, MA 02111-1307, USA.
*/
#ifndef TOOLS_H
#define TOOLS_H
#ifndef _LVM_TOOLS_H
#define _LVM_TOOLS_H
#include <stdio.h>
#include <stdarg.h>
@ -27,15 +27,16 @@
#include <sys/types.h>
#include <string.h>
#include "metadata/metadata.h"
#include "config/config.h"
#include "dev-mgr/dev-manager.h"
#include "device/device.h"
#include "display/display.h"
#include "display/metadata.h"
#include "metadata.h"
#include "config.h"
#include "dev-cache.h"
#include "dev-manager.h"
#include "device.h"
#include "display.h"
#include "errors.h"
#include "log/log.h"
#include "mm/dbg_malloc.h"
#include "list.h"
#include "log.h"
#include "dbg_malloc.h"
#include "toollib.h"
#define CMD_LEN 256