LVM2 ./WHATS_NEW lib/Makefile.in test/api/test ...
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: twoerner at sourceware.org 2009-02-24 13:03:45
Modified files:
. : WHATS_NEW lib : Makefile.in test/api : test.c
Added files:
lib : lvm.h lvm_base.c
Removed files:
lib : lvm2.h
Log message:
Added files lib/lvm.h and lib/lvm_base.c:
New structure lvm (used as an alias to cmd_context), new type definition lvm_t for the lvm handle. Added functions lvm_create, lvm_destroy and lvm_reload_config using the new handle.
Modified test/api/test.c:
Use new lvm.h header file and lvm_t handle.
Removed lib/lvm2.h
Author: Thomas Woerner <[email protected]>
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.1050&r2=1.1051
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/lvm.h.diff?cvsroot=lvm2&r1=NONE&r2=1.1
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/lvm_base.c.diff?cvsroot=lvm2&r1=NONE&r2=1.1
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/Makefile.in.diff?cvsroot=lvm2&r1=1.87&r2=1.88
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/lvm2.h.diff?cvsroot=lvm2&r1=1.3&r2=NONE
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/api/test.c.diff?cvsroot=lvm2&r1=1.1&r2=1.2
WHATS_NEW +1 -0
@@ -1,5 +1,6 @@ Version 2.02.45 - =================================== + Add lib/lvm.h and lib/lvm_base.c for the new library interface. Move tools/version.h to lib/misc/lvm-version.h. Split LVM_VERSION into MAJOR, MINOR, PATCHLEVEL, RELEASE and RELEASE_DATE. Add system_dir parameter to create_toolcontext().
/cvs/lvm2/LVM2/lib/lvm.h,v --> standard output
revision 1.1
- renamed from lib/lvm.h +57 -0
57 lines not on this page · raw message
/cvs/lvm2/LVM2/lib/lvm_base.c,v --> standard output revision 1.1
- renamed from lib/lvm_base.c +64 -0
64 lines not on this page · raw message
lib/Makefile.in +3 -2
@@ -1,6 +1,6 @@ # # Copyright (C) 2001-2004 Sistina Software, Inc. All rights reserved. -# Copyright (C) 2004-2007 Red Hat, Inc. All rights reserved. +# Copyright (C) 2004-2009 Red Hat, Inc. All rights reserved. # # This file is part of LVM2. #
@@ -86,7 +86,8 @@ report/report.c \ striped/striped.c \ uuid/uuid.c \ - zero/zero.c + zero/zero.c \ + lvm_base.c ifeq ("@LVM1@", "internal") SOURCES +=\
test/api/test.c +8 -9
@@ -1,6 +1,6 @@/* * Copyright (C) 2001-2004 Sistina Software, Inc. All rights reserved. -* Copyright (C) 2004-2008 Red Hat, Inc. All rights reserved. +* Copyright (C) 2004-2009 Red Hat, Inc. All rights reserved. * * This file is part of LVM2. *
@@ -16,7 +16,7 @@#include <string.h> #include <stdlib.h> #include <readline/readline.h> -#include "lvm2.h" +#include "lvm.h" #define MAX_ARGS 64
@@ -48,7 +48,7 @@return *argc; } -static int lvmapi_test_shell (void *h) +static int lvmapi_test_shell (lvm_t libh) {int argc, i;char *input =NULL , *args[MAX_ARGS ], **argv;
@@ -99,18 +99,17 @@int main (int argc,char *argv[]) { -void *h; +lvm_t libh; - h =lvm2_create (); -if (!h) { + libh =lvm_create (NULL ); +if (!libh) {printf ("Unable to open lvm library instance\n" );return 1 ; } -lvmapi_test_shell (h); +lvmapi_test_shell (libh); -if (h) -lvm2_destroy (h); +lvm_destroy (libh);return 0 ; }