]> git.openfabrics.org - ~ardavis/dapl.git/commitdiff
fix makefile
authorArlin Davis <arlin.r.davis@intel.com>
Mon, 21 May 2012 22:32:27 +0000 (15:32 -0700)
committerArlin Davis <arlin.r.davis@intel.com>
Mon, 21 May 2012 22:32:27 +0000 (15:32 -0700)
Makefile.am
dapl/svc/mpxy.c [deleted file]

index 462c8f7b2617962343d6489435a6a0d927180908..3599c90826136051bc9f9eae6d3b2e7e01204127 100755 (executable)
@@ -77,7 +77,7 @@ if DEFINE_UCM
 daplliboucm_LTLIBRARIES = dapl/udapl/libdaploucm.la
 endif
 if DEFINE_MCM
-dapllibopcm_LTLIBRARIES = dapl/udapl/libdaplomcm.la
+dapllibomcm_LTLIBRARIES = dapl/udapl/libdaplomcm.la
 endif
 
 dat_udat_libdat2_la_CFLAGS = $(AM_CFLAGS) -D_GNU_SOURCE $(OSFLAGS) $(XFLAGS) \
@@ -701,13 +701,13 @@ EXTRA_DIST = dat/common/dat_dictionary.h \
             dapl/udapl/libdaplofa.map \
             dapl/udapl/libdaploscm.map \
             dapl/udapl/libdaploucm.map \
-            dapl/udapl/libdaplopcm.map \
+            dapl/udapl/libdaplomcm.map \
             LICENSE.txt \
             LICENSE2.txt \
             LICENSE3.txt \
             doc/dat.conf \
             dapl.spec.in \
-            daplpxd.init.in \
+            daplmpxy.init.in \
             $(man_MANS) \
             test/dapltest/include/dapl_bpool.h \
             test/dapltest/include/dapl_client_info.h \
@@ -738,7 +738,7 @@ EXTRA_DIST = dat/common/dat_dictionary.h \
             test/dapltest/mdep/linux/dapl_mdep_user.h $(XHEADERS)
         
 sbin_PROGRAMS = svc/mpxyd
-svc_mpxy_SOURCES = dapl/svc/mpxy.c
+svc_mpxy_SOURCES = dapl/svc/mpxyd.c
 svc_mpxy_CFLAGS = $(AM_CFLAGS)
 
 install-exec-hook:
diff --git a/dapl/svc/mpxy.c b/dapl/svc/mpxy.c
deleted file mode 100644 (file)
index d1bb77a..0000000
+++ /dev/null
@@ -1,192 +0,0 @@
-/*
- * Copyright (c) 2012 Intel Corporation. All rights reserved.
- *
- * This software is available to you under the OpenIB.org BSD license
- * below:
- *
- *     Redistribution and use in source and binary forms, with or
- *     without modification, are permitted provided that the following
- *     conditions are met:
- *
- *      - Redistributions of source code must retain the above
- *        copyright notice, this list of conditions and the following
- *        disclaimer.
- *
- *      - 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.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AWV
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-#if HAVE_CONFIG_H
-#  include <config.h>
-#endif /* HAVE_CONFIG_H */
-
-#include <stdio.h>
-#include <stdarg.h>
-#include <string.h>
-#include <osd.h>
-#include <arpa/inet.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/time.h>
-#include <getopt.h>
-#include <fcntl.h>
-#include <udat.h>
-#include <scif.h>
-#include "dat2/udat.h"
-
-
-/*
- * Service options - set through mpxy_opts file.
- */
-static char *opts_file = MPXY_CONF_DIR "/" MPXY_OPTS_FILE;
-static char log_file[128] = "/var/log/mpxy.log";
-static int log_level = 0;
-static char lock_file[128] = "/var/run/mpxy.pid";
-static short service_id = SCIF_OFED_PORT_7;
-
-static FILE *lfile;
-static lock_t llock;
-
-#define mpxy_log(level, format, ...) \
-       mpxy_write(level, "%s: "format, __func__, ## __VA_ARGS__)
-
-static void mpxy_write(int level, const char *format, ...)
-{
-       va_list args;
-       struct timeval tv;
-
-       if (level > log_level)
-               return;
-
-       gettimeofday(&tv, NULL);
-       va_start(args, format);
-       lock_acquire(&llock);
-       fprintf(flog, "%u.%03u: ", (unsigned) tv.tv_sec, (unsigned) (tv.tv_usec / 1000));
-       vfprintf(flog, format, args);
-       fflush(flog);
-       lock_release(&llock);
-       va_end(args);
-}
-
-static FILE *mpxy_open_log(void)
-{
-       FILE *f;
-
-       if (!stricmp(lfile, "stdout"))
-               return stdout;
-
-       if (!stricmp(lfile, "stderr"))
-               return stderr;
-
-       if (!(f = fopen(lfile, "w")))
-               f = stdout;
-
-       return f;
-}
-
-static int mpxy_open_lock(void)
-{
-       int lock_fd;
-       char pid[16];
-
-       lock_fd = open(lock_file, O_RDWR | O_CREAT, 0640);
-       if (lock_fd < 0)
-               return lock_fd;
-
-       if (lockf(lock_fd, F_TLOCK, 0)) {
-               close(lock_fd);
-               return -1;
-       }
-
-       sprintf(pid, "%d\n", getpid());
-       write(lock_fd, pid, strlen(pid));
-       return 0;
-}
-
-static void daemonize(void)
-{
-       id_t pid, sid;
-
-       pid = fork();
-       if (pid)
-               exit(pid < 0);
-
-       umask(0);
-
-       sid = setsid();
-       if (sid < 0)
-               exit(1);
-
-       if (chdir("/"))
-               exit(1);
-
-       freopen("/dev/null", "r", stdin);
-       freopen("/dev/null", "w", stdout);
-       freopen("/dev/null", "w", stderr);
-}
-
-static void show_usage(char *program)
-{
-        printf("usage: %s\n", program);
-        printf("   [-P]             - run as a standard process, (default daemon)\n");
-        printf("   [-O option_file] - option configuration file\n");
-        printf("                      (default %s/%s\n", MPXY_CONF_DIR, MPXY_OPTS_FILE);
-}
-
-
-int main(int argc, char **argv)
-{
-       int i, op, daemon = 1;
-
-       while ((op = getopt(argc, argv, "DPO:")) != -1) {
-               switch (op) {
-               case 'P':
-                       daemon = 0;
-                       break;
-               case 'O':
-                       opts_file = optarg;
-                       break;
-
-               default:
-                       show_usage(argv[0]);
-                       exit(1);
-               }
-       }
-
-       if (daemon)
-               daemonize();
-
-       mpxy_set_options();
-       if (pxd_open_lock_file())
-               return -1;
-
-       lock_init(&log_lock);
-       logfile = pxd_open_log();
-
-       mpxy_log(0, "MIC Indirect - STD (scif to dapl) Proxy Service\n");
-       mpxy_log_options();
-
-       if (mpxy_open_devices()) {
-               acm_log(0, "ERROR - unable to open any devices\n");
-               return -1;
-       }
-
-       mpxy_log(1, "starting server\n");
-       mpxy_server();
-
-
-       mpxy_log(0, "shutting down\n");
-       fclose(logfile);
-       return 0;
-}