From: VMware, Inc <> Date: Wed, 24 Feb 2010 22:22:20 +0000 (-0800) Subject: OVT: do not ship dbllnklst.c X-Git-Tag: 2010.02.23-236320~19 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4e22734376d7a2ae29d6a7689fce8d894440087e;p=thirdparty%2Fopen-vm-tools.git OVT: do not ship dbllnklst.c The file is just a shell of its former self and does not contain any compilable code anymore (all meat was moved into the header file) so there is no point in shipping it. Signed-off-by: Marcelo Vanzin --- diff --git a/open-vm-tools/lib/misc/Makefile.am b/open-vm-tools/lib/misc/Makefile.am index 10bba45e1..bba7b55a1 100644 --- a/open-vm-tools/lib/misc/Makefile.am +++ b/open-vm-tools/lib/misc/Makefile.am @@ -21,7 +21,6 @@ libMisc_la_SOURCES = libMisc_la_SOURCES += atomic.c libMisc_la_SOURCES += base64.c libMisc_la_SOURCES += codesetOld.c -libMisc_la_SOURCES += dbllnklst.c libMisc_la_SOURCES += dynarray.c libMisc_la_SOURCES += dynbuf.c libMisc_la_SOURCES += escape.c diff --git a/open-vm-tools/lib/misc/dbllnklst.c b/open-vm-tools/lib/misc/dbllnklst.c deleted file mode 100644 index f9bc45156..000000000 --- a/open-vm-tools/lib/misc/dbllnklst.c +++ /dev/null @@ -1,240 +0,0 @@ -/********************************************************* - * Copyright (C) 1998 VMware, Inc. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of the GNU Lesser General Public License as published - * by the Free Software Foundation version 2.1 and no later version. - * - * This program 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 Lesser GNU General Public - * License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - *********************************************************/ - -/********************************************************* - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of VMware Inc. nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission of VMware Inc. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - *********************************************************/ - -/********************************************************* - * The contents of this file are subject to the terms of the Common - * Development and Distribution License (the "License") version 1.0 - * and no later version. You may not use this file except in - * compliance with the License. - * - * You can obtain a copy of the License at - * http://www.opensource.org/licenses/cddl1.php - * - * See the License for the specific language governing permissions - * and limitations under the License. - * - *********************************************************/ - -#include "vmware.h" -#include "dbllnklst.h" - -/* - * dbllnklst.c -- - * - * Light (but nonetheless powerful) implementation of doubly linked lists - */ - - -/* - * XXX This file is empty because I made all the functions inline. - * -- edward - */ - - -#if 0 -/* - * Test code (which also demonstrates how to use this library) - */ - -/* - * Add the double linked list capability to any of your data structure just by - * adding a DblLnkLst_Links field inside it. It is not required that the field - * comes first, but if it does, the execution will be slighly faster. - * - * Here we create a doubly linked list of integers - */ - -#include -#include - -typedef struct member { - int i; - DblLnkLst_Links l; -} member; - - -/* Member constructor */ -member * -make_member(int i) -{ - member *m; - - m = malloc(sizeof(*m)); - DblLnkLst_Init(&m->l); - m->i = i; - - return m; -} - - -/* Dump a circular list */ -void -dump_circular(const member *c) // IN -{ - const member *current; - - printf("forward: "); - current = c; - do { - printf("%d ", current->i); - current = DblLnkLst_Container(current->l.next, member, l); - } while (current != c); - printf("backward: "); - do { - printf("%d ", current->i); - current = DblLnkLst_Container(current->l.prev, member, l); - } while (current != c); - printf("\n"); -} - - -/* Dump an anchored list */ -void -dump_anchored(const DblLnkLst_Links *h) // IN -{ - DblLnkLst_Links *cur_l; - - printf("forward: "); - for (cur_l = h->next; cur_l != h; cur_l = cur_l->next) { - member *current; - - current = DblLnkLst_Container(cur_l, member, l); - printf("%d ", current->i); - } - printf("backward: "); - for (cur_l = h->prev; cur_l != h; cur_l = cur_l->prev) { - member *current; - - current = DblLnkLst_Container(cur_l, member, l); - printf("%d ", current->i); - } - printf("\n"); -} - - -/* Test code entry point */ -int -main(int argc, // IN - char **argv) // IN -{ - member *c1; - member *c2; - member *c3; - member *c4; - - DblLnkLst_Links h; - member *a1; - member *a2; - member *a3; - - printf("Circular list: there is no origin\n"); - - /* Create the 1st member */ - c1 = make_member(1); - /* Special case: there is no list to merge with, initially */ - - /* Add the 2nd member _after_ the 1st one */ - c2 = make_member(2); - DblLnkLst_Link(&c1->l, &c2->l); - - /* Add the 3rd member _after_ the 2nd one */ - c3 = make_member(3); - DblLnkLst_Link(&c1->l, &c3->l); - - /* Add the 4th member _before_ the 3rd one */ - c4 = make_member(4); - DblLnkLst_Link(&c3->l, &c4->l); - - printf("See it from this member...\n"); - dump_circular(c1); - printf("...Or from this one\n"); - dump_circular(c4); - - printf("\n"); - printf("Anchored (linear) list: it has a beginning and an end\n"); - - /* Create the 'head' of the list */ - DblLnkLst_Init(&h); - - /* Add the 1st member at the _end_ */ - a1 = make_member(5); - DblLnkLst_LinkLast(&h, &a1->l); - - /* Add the 2nd member at the _beginning_ */ - a2 = make_member(6); - DblLnkLst_LinkFirst(&h, &a2->l); - - /* Add the 3rd member _before_ the 1st one */ - a3 = make_member(7); - DblLnkLst_Link(&a1->l, &a3->l); - - dump_anchored(&h); - - printf("\n"); - printf("Merge both lists: the result is an anchored list\n"); - - DblLnkLst_Link(&h, &c4->l); - - dump_anchored(&h); - - printf("\n"); - printf("Remove a member\n"); - - DblLnkLst_Unlink1(&c3->l); - - dump_anchored(&h); - - printf("\n"); - printf("Split the result in two lists: an anchored one and a circular " - "one\n"); - DblLnkLst_Unlink(&h, &a1->l); - - dump_anchored(&h); - dump_circular(a1); - - return 0; -} -#endif diff --git a/open-vm-tools/modules/freebsd/vmblock/Makefile b/open-vm-tools/modules/freebsd/vmblock/Makefile index 563da034d..10c0886dc 100644 --- a/open-vm-tools/modules/freebsd/vmblock/Makefile +++ b/open-vm-tools/modules/freebsd/vmblock/Makefile @@ -39,7 +39,6 @@ HEADERS += vmblock_k.h HEADERS += os.h CSRCS := block.c -CSRCS += dbllnklst.c CSRCS += vfsops.c CSRCS += vnops.c CSRCS += subr.c diff --git a/open-vm-tools/modules/freebsd/vmhgfs/Makefile b/open-vm-tools/modules/freebsd/vmhgfs/Makefile index 28fe3f0c3..06b24a051 100644 --- a/open-vm-tools/modules/freebsd/vmhgfs/Makefile +++ b/open-vm-tools/modules/freebsd/vmhgfs/Makefile @@ -33,7 +33,6 @@ HEADERS += transport.h COMMON_SRCS := cpName.c COMMON_SRCS += cpNameLinux.c COMMON_SRCS += cpNameLite.c -COMMON_SRCS += dbllnklst.c COMMON_SRCS += sha1.c COMMON_SRCS += hgfsEscape.c COMMON_SRCS += hgfsBd.c diff --git a/open-vm-tools/modules/linux/dkms.sh b/open-vm-tools/modules/linux/dkms.sh index 4d36906c0..7f7619393 100644 --- a/open-vm-tools/modules/linux/dkms.sh +++ b/open-vm-tools/modules/linux/dkms.sh @@ -78,7 +78,6 @@ do if test $m = vmblock then cp -f $src/lib/include/vmblock.h $mdst/linux - cp -f $src/lib/misc/dbllnklst.c $mdst/linux cp -rf $src/modules/shared/vmblock/* $mdst/linux fi diff --git a/open-vm-tools/modules/solaris/vmblock/Makefile b/open-vm-tools/modules/solaris/vmblock/Makefile index 1f7b0e48e..58c3046bd 100644 --- a/open-vm-tools/modules/solaris/vmblock/Makefile +++ b/open-vm-tools/modules/solaris/vmblock/Makefile @@ -48,7 +48,6 @@ CFLAGS += -I. ## Objects needed to build vmblock kernel module ## VMBLOCK_OBJS := block.o -VMBLOCK_OBJS += dbllnklst.o VMBLOCK_OBJS += module.o VMBLOCK_OBJS += stubs.o VMBLOCK_OBJS += vfsops.o diff --git a/open-vm-tools/modules/solaris/vmhgfs/Makefile b/open-vm-tools/modules/solaris/vmhgfs/Makefile index 8132c96dd..ef086918d 100644 --- a/open-vm-tools/modules/solaris/vmhgfs/Makefile +++ b/open-vm-tools/modules/solaris/vmhgfs/Makefile @@ -75,7 +75,6 @@ SOLHGFS_64_KRN_OBJS := $(addprefix amd64/, $(SOLHGFS_KRN_OBJS)) SOLHGFS_LIB_OBJS := backdoor.o SOLHGFS_LIB_OBJS += cpName.o SOLHGFS_LIB_OBJS += cpNameLinux.o -SOLHGFS_LIB_OBJS += dbllnklst.o SOLHGFS_LIB_OBJS += hgfsBd.o SOLHGFS_LIB_OBJS += hgfsEscape.o SOLHGFS_LIB_OBJS += hgfsUtil.o