Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/gpl2/lvm2/dist Fix cinflicts created by import of l...



details:   https://anonhg.NetBSD.org/src/rev/35c5ef316aa6
branches:  trunk
changeset: 749533:35c5ef316aa6
user:      haad <haad%NetBSD.org@localhost>
date:      Wed Dec 02 00:58:02 2009 +0000

description:
Fix cinflicts created by import of latest lvm2tools LVM2-2-02-56.

diffstat:

 external/gpl2/lvm2/dist/daemons/clogd/Makefile     |    77 -
 external/gpl2/lvm2/dist/daemons/clogd/clogd.c      |   285 -
 external/gpl2/lvm2/dist/daemons/clogd/cluster.c    |  1553 ----
 external/gpl2/lvm2/dist/daemons/clogd/cluster.h    |    15 -
 external/gpl2/lvm2/dist/daemons/clogd/common.h     |    42 -
 external/gpl2/lvm2/dist/daemons/clogd/functions.c  |  1790 ----
 external/gpl2/lvm2/dist/daemons/clogd/functions.h  |    22 -
 external/gpl2/lvm2/dist/daemons/clogd/link_mon.c   |   140 -
 external/gpl2/lvm2/dist/daemons/clogd/link_mon.h   |    11 -
 external/gpl2/lvm2/dist/daemons/clogd/list.h       |   473 -
 external/gpl2/lvm2/dist/daemons/clogd/local.c      |   381 -
 external/gpl2/lvm2/dist/daemons/clogd/local.h      |    11 -
 external/gpl2/lvm2/dist/daemons/clogd/logging.c    |    27 -
 external/gpl2/lvm2/dist/daemons/clogd/logging.h    |    83 -
 external/gpl2/lvm2/dist/include/dm-ioctl.h         |    23 +-
 external/gpl2/lvm2/dist/include/lvm2.h             |    55 -
 external/gpl2/lvm2/dist/lib/activate/fs.c          |    46 +-
 external/gpl2/lvm2/dist/lib/commands/toolcontext.c |   253 +-
 external/gpl2/lvm2/dist/lib/device/dev-cache.c     |    14 +-
 external/gpl2/lvm2/dist/lib/device/dev-io.c        |    46 +-
 external/gpl2/lvm2/dist/lib/lvm2.h                 |    55 -
 external/gpl2/lvm2/dist/lib/metadata/lv_manip.c    |   726 +-
 external/gpl2/lvm2/dist/libdm/libdm-common.c       |   683 +-
 external/gpl2/lvm2/dist/libdm/libdm-deptree.c      |   353 +-
 external/gpl2/lvm2/dist/man/Makefile.in            |   140 +-
 external/gpl2/lvm2/dist/man/fsadm.8                |    47 +-
 external/gpl2/lvm2/dist/po/lvm2.po                 |  7630 ++++++++++++++++++++
 external/gpl2/lvm2/dist/tools/version.h.in         |     3 -
 28 files changed, 9469 insertions(+), 5515 deletions(-)

diffs (truncated from 16309 to 300 lines):

diff -r 5583eafafcca -r 35c5ef316aa6 external/gpl2/lvm2/dist/daemons/clogd/Makefile
--- a/external/gpl2/lvm2/dist/daemons/clogd/Makefile    Wed Dec 02 00:32:06 2009 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,77 +0,0 @@
-###############################################################################
-###############################################################################
-##
-##  Copyright (C) 2009 Red Hat, Inc.  All rights reserved.
-##
-##  This copyrighted material is made available to anyone wishing to use,
-##  modify, copy, or redistribute it subject to the terms and conditions
-##  of the GNU General Public License v.2.
-##
-###############################################################################
-###############################################################################
-
-SOURCES = clogd.c cluster.c functions.c link_mon.c local.c logging.c
-
-TARGET = $(shell if [ ! -e /usr/include/linux/dm-clog-tfr.h ]; then \
-               echo 'no_clogd_kernel_headers'; \
-       elif [ ! -e /usr/include/linux/ext2_fs.h ]; then \
-               echo 'no_e2fsprogs_devel'; \
-       elif [ ! -e /usr/include/openais/saCkpt.h ]; then \
-               echo 'no_openais_devel'; \
-       else \
-               echo 'clogd'; \
-       fi)
-
-ifneq ($(DEBUG), )
-CFLAGS += -DDEBUG
-endif
-
-ifneq ($(MEMB), )
-CFLAGS += -DMEMB
-endif
-
-ifneq ($(CKPT), )
-CFLAGS += -DCKPT
-endif
-
-ifneq ($(RESEND), )
-CFLAGS += -DRESEND
-endif
-
-CFLAGS += -g
-
-LDFLAGS += $(shell if [ -e /usr/lib64/openais ]; then \
-               echo '-L/usr/lib64/openais -L/usr/lib64'; \
-       else \
-               echo '-L/usr/lib/openais -L/usr/lib'; \
-       fi)
-LDFLAGS += -lcpg -lSaCkpt -lext2fs
-
-all: ${TARGET}
-
-clogd: ${SOURCES}
-       ${CC} ${CFLAGS} -o $@ $^ ${LDFLAGS}
-
-no_clogd_kernel_headers:
-       echo "Unable to find clogd kernel headers"
-       exit 1
-
-no_e2fsprogs_devel:
-       echo "Unable to find ext2fs kernel headers."
-       echo "Install 'e2fsprogs-devel'?"
-       exit 1
-
-no_openais_devel:
-       echo "Unable to find openAIS headers."
-       echo "http://sources.redhat.com/cluster/wiki/";
-       exit 1
-
-install: clogd
-       install -d /usr/sbin
-       install clogd /usr/sbin
-
-uninstall:
-       rm /usr/sbin/clogd
-
-clean:
-       rm -f *.o clogd *~
diff -r 5583eafafcca -r 35c5ef316aa6 external/gpl2/lvm2/dist/daemons/clogd/clogd.c
--- a/external/gpl2/lvm2/dist/daemons/clogd/clogd.c     Wed Dec 02 00:32:06 2009 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,285 +0,0 @@
-/*     $NetBSD: clogd.c,v 1.1.1.1 2009/02/18 11:16:31 haad Exp $       */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <stdint.h>
-#include <string.h>
-#include <errno.h>
-#include <sched.h>
-#include <sys/types.h>
-#include <sys/wait.h>
-#include <sys/stat.h>
-#include <signal.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <linux/types.h>
-#include <sys/socket.h>
-#include <linux/netlink.h>
-#include <linux/dm-clog-tfr.h>
-#include <linux/dm-ioctl.h>
-
-#include "functions.h"
-#include "local.h"
-#include "cluster.h"
-#include "common.h"
-#include "logging.h"
-#include "link_mon.h"
-
-static int exit_now = 0;
-static sigset_t signal_mask;
-static int signal_received;
-
-static void process_signals(void);
-static void daemonize(void);
-static void init_all(void);
-static void cleanup_all(void);
-static void set_priority(void);
-
-int main(int argc, char *argv[])
-{
-       daemonize();
-
-       init_all();
-
-       /* Parent can now exit, we're ready to handle requests */
-       kill(getppid(), SIGTERM);
-
-       /* set_priority(); -- let's try to do w/o this */
-
-       LOG_PRINT("Starting clogd:");
-       LOG_PRINT(" Built: "__DATE__" "__TIME__"\n");
-       LOG_DBG(" Compiled with debugging.");
-
-       while (!exit_now) {
-               links_monitor();
-
-               links_issue_callbacks();
-
-               process_signals();
-       }
-       exit(EXIT_SUCCESS);
-}
-
-/*
- * parent_exit_handler: exit the parent
- * @sig: the signal
- *
- */
-static void parent_exit_handler(int sig)
-{
-       exit_now = 1;
-}
-
-/*
- * create_lockfile - create and lock a lock file
- * @lockfile: location of lock file
- *
- * Returns: 0 on success, -1 otherwise
- */
-static int create_lockfile(char *lockfile)
-{
-       int fd;
-       struct flock lock;
-       char buffer[50];
-
-       if((fd = open(lockfile, O_CREAT | O_WRONLY,
-                     (S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH))) < 0)
-               return -errno;
-
-       lock.l_type = F_WRLCK;
-       lock.l_start = 0;
-       lock.l_whence = SEEK_SET;
-       lock.l_len = 0;
-
-       if (fcntl(fd, F_SETLK, &lock) < 0) {
-               close(fd);
-               return -errno;
-       }
-
-       if (ftruncate(fd, 0) < 0) {
-               close(fd);
-               return -errno;
-       }
-
-       sprintf(buffer, "%d\n", getpid());
-
-       if(write(fd, buffer, strlen(buffer)) < strlen(buffer)){
-               close(fd);
-               unlink(lockfile);
-               return -errno;
-       }
-
-       return 0;
-}
-
-static void sig_handler(int sig)
-{
-       sigaddset(&signal_mask, sig);
-       ++signal_received;
-}
-
-static void process_signal(int sig){
-       int r = 0;
-
-       switch(sig) {
-       case SIGINT:
-       case SIGQUIT:
-       case SIGTERM:
-       case SIGHUP:
-               r += log_status();
-               break;
-       case SIGUSR1:
-       case SIGUSR2:
-               log_debug();
-               /*local_debug();*/
-               cluster_debug();
-               return;
-       default:
-               LOG_PRINT("Unknown signal received... ignoring");
-               return;
-       }
-
-       if (!r) {
-               LOG_DBG("No current cluster logs... safe to exit.");
-               cleanup_all();
-               exit(EXIT_SUCCESS);
-       }
-
-       LOG_ERROR("Cluster logs exist.  Refusing to exit.");
-}
-
-static void process_signals(void)
-{
-       int x;
-
-       if (!signal_received)
-               return;
-
-       signal_received = 0;
-
-       for (x = 1; x < _NSIG; x++) {
-               if (sigismember(&signal_mask, x)) {
-                       sigdelset(&signal_mask, x);
-                       process_signal(x);
-               }
-       }
-}
-
-/*
- * daemonize
- *
- * Performs the steps necessary to become a daemon.
- */
-static void daemonize(void)
-{
-       int pid;
-       int status;
-
-       signal(SIGTERM, &parent_exit_handler);
-
-       pid = fork();
-
-       if (pid < 0) {
-               LOG_ERROR("Unable to fork()");
-               exit(EXIT_FAILURE);
-       }
-
-       if (pid) {
-               /* Parent waits here for child to get going */
-               while (!waitpid(pid, &status, WNOHANG) && !exit_now);
-               if (exit_now)
-                       exit(EXIT_SUCCESS);
-
-               switch (WEXITSTATUS(status)) {
-               case EXIT_LOCKFILE:
-                       LOG_ERROR("Failed to create lockfile");
-                       LOG_ERROR("Process already running?");
-                       break;
-               case EXIT_KERNEL_TFR_SOCKET:
-                       LOG_ERROR("Unable to create netlink socket");
-                       break;
-               case EXIT_KERNEL_TFR_BIND:
-                       LOG_ERROR("Unable to bind to netlink socket");
-                       break;
-               case EXIT_KERNEL_TFR_SETSOCKOPT:
-                       LOG_ERROR("Unable to setsockopt on netlink socket");
-                       break;
-               case EXIT_CLUSTER_CKPT_INIT:
-                       LOG_ERROR("Unable to initialize checkpoint service");
-                       LOG_ERROR("Has the cluster infrastructure been started?");
-                       break;
-               case EXIT_FAILURE:
-                       LOG_ERROR("Failed to start: Generic error");
-                       break;
-               default:
-                       LOG_ERROR("Failed to start: Unknown error");



Home | Main Index | Thread Index | Old Index