mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
o Added a basic makefile to build liblvm.a again
o Modified source files so that this works
This commit is contained in:
parent
a88c46c2d8
commit
bb6ddc2de7
23
lib/Makefile
Normal file
23
lib/Makefile
Normal file
@ -0,0 +1,23 @@
|
||||
|
||||
CFLAGS = -I.
|
||||
|
||||
SRC= \
|
||||
config/config.c \
|
||||
dev-mgr/dev-manager.c \
|
||||
dev-mgr/hash.c \
|
||||
log/log.c \
|
||||
mm/pool.c \
|
||||
mm/dbg_malloc.c
|
||||
|
||||
OBJ=${SRC:.c=.o}
|
||||
TARGET=liblvm.a
|
||||
|
||||
all: ${TARGET}
|
||||
|
||||
liblvm.a: $(OBJ)
|
||||
rm -f $@
|
||||
ar r $@ $(OBJ)
|
||||
ranlib $@
|
||||
|
||||
clean:
|
||||
rm -f ${OBJ} ${TARGET}
|
@ -29,8 +29,8 @@
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include "pool.h"
|
||||
#include "log.h"
|
||||
#include "mm/pool.h"
|
||||
#include "log/log.h"
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
|
@ -35,9 +35,13 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "liblvm.h"
|
||||
#include <dirent.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
#include "hash.h"
|
||||
#include "pool.h"
|
||||
#include "mm/pool.h"
|
||||
#include "log/log.h"
|
||||
#include "dev-manager.h"
|
||||
|
||||
#define DEFAULT_BASE_DIR "/dev"
|
||||
@ -223,7 +227,7 @@ static int _dir_scan(struct dev_mgr *dm, const char *dirname)
|
||||
static struct dev_i *_add(struct dev_mgr *dm,
|
||||
const char *directory, const char *devname)
|
||||
{
|
||||
char devpath[NAME_LEN];
|
||||
char devpath[128];
|
||||
|
||||
if (!directory || !devname)
|
||||
return 0;
|
||||
@ -239,7 +243,7 @@ static struct dev_i *_add_named_device(struct dev_mgr *dm, const char *devpath)
|
||||
struct stat stat_b;
|
||||
|
||||
/* FIXME: move lvm_check_dev into this file */
|
||||
if ((stat(devpath, &stat_b) == -1) || lvm_check_dev(&stat_b, TRUE))
|
||||
if ((stat(devpath, &stat_b) == -1) || lvm_check_dev(&stat_b, 1))
|
||||
goto out;
|
||||
|
||||
/* Check for directories and scan them if they aren't this directory
|
||||
|
@ -22,7 +22,7 @@
|
||||
#ifndef DEV_MANAGER_H
|
||||
#define DEV_MANAGER_H
|
||||
|
||||
#include "config.h"
|
||||
#include "config/config.h"
|
||||
|
||||
struct device {
|
||||
char *name;
|
||||
|
@ -32,7 +32,7 @@
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "dbg_malloc.h"
|
||||
#include "log.h"
|
||||
#include "log/log.h"
|
||||
|
||||
struct memblock {
|
||||
struct memblock *prev, *next; /* All allocated blocks are linked */
|
||||
|
@ -22,7 +22,7 @@
|
||||
|
||||
#include "pool.h"
|
||||
#include "dbg_malloc.h"
|
||||
#include "log.h"
|
||||
#include "log/log.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user