1
0
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:
AJ Lewis 2001-08-21 15:23:45 +00:00
parent a88c46c2d8
commit bb6ddc2de7
6 changed files with 36 additions and 9 deletions

23
lib/Makefile Normal file
View 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}

View File

@ -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>

View File

@ -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

View File

@ -22,7 +22,7 @@
#ifndef DEV_MANAGER_H
#define DEV_MANAGER_H
#include "config.h"
#include "config/config.h"
struct device {
char *name;

View File

@ -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 */

View File

@ -22,7 +22,7 @@
#include "pool.h"
#include "dbg_malloc.h"
#include "log.h"
#include "log/log.h"
#include <stdlib.h>