Commit 6c86a7fb authored by Mike Hibler's avatar Mike Hibler

Merge remote-tracking branch 'remotes/origin/arm64'

parents d29bb148 b59c9309
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
/* config.h.in */ /* config.h.in. Generated from configure.ac by autoheader. */
/* For current automake/autoconf incompatibility. */
#undef PACKAGE
#undef VERSION
/* Obsolete */
#undef ELVIN_COMPAT #undef ELVIN_COMPAT
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
/* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H
/* Define to 1 if you have the <Python.h> header file. */
#undef HAVE_PYTHON_H
/* Define to 1 if you have the <stdint.h> header file. */
#undef HAVE_STDINT_H
/* Define to 1 if you have the <stdlib.h> header file. */
#undef HAVE_STDLIB_H
/* Define to 1 if you have the <strings.h> header file. */
#undef HAVE_STRINGS_H
/* Define to 1 if you have the <string.h> header file. */
#undef HAVE_STRING_H
/* Define to 1 if you have the <sys/stat.h> header file. */
#undef HAVE_SYS_STAT_H
/* Define to 1 if you have the <sys/types.h> header file. */
#undef HAVE_SYS_TYPES_H
/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
/* Syslog log facility for Emulab daemons */
#undef LOG_TESTBED #undef LOG_TESTBED
/* Define to the address where bug reports for this package should be sent. */
#undef PACKAGE_BUGREPORT
/* Define to the full name of this package. */
#undef PACKAGE_NAME
/* Define to the full name and version of this package. */
#undef PACKAGE_STRING
/* Define to the one symbol short name of this package. */
#undef PACKAGE_TARNAME
/* Define to the home page for this package. */
#undef PACKAGE_URL
/* Define to the version of this package. */
#undef PACKAGE_VERSION
/* Define to 1 if you have the ANSI C header files. */
#undef STDC_HEADERS
/* Something about TPM */
#undef TPM #undef TPM
/* Support Windows images */
#undef WINSUPPORT
This diff is collapsed.
...@@ -20,10 +20,10 @@ ...@@ -20,10 +20,10 @@
# #
# }}} # }}}
# #
AC_PREREQ(2.62) AC_PREREQ(2.69)
AC_INIT(Makeconf.in) AC_INIT(Makeconf.in)
AC_CONFIG_AUX_DIR(${srcdir}/autoconf) AC_CONFIG_AUX_DIR(autoconf)
AC_CONFIG_HEADER(config.h) AC_CONFIG_HEADER(config.h)
AC_CANONICAL_HOST AC_CANONICAL_HOST
...@@ -110,7 +110,7 @@ NOSHAREDFS=0 ...@@ -110,7 +110,7 @@ NOSHAREDFS=0
TBLOGFACIL="local5" TBLOGFACIL="local5"
LOG_TESTBED=`echo "LOG_$TBLOGFACIL" | tr a-z A-Z` LOG_TESTBED=`echo "LOG_$TBLOGFACIL" | tr a-z A-Z`
AC_DEFINE_UNQUOTED(LOG_TESTBED, $LOG_TESTBED) AC_DEFINE_UNQUOTED(LOG_TESTBED, $LOG_TESTBED, [Syslog log facility for Emulab daemons])
AC_SUBST(LOG_TESTBED) AC_SUBST(LOG_TESTBED)
AC_SUBST(TBLOGFACIL) AC_SUBST(TBLOGFACIL)
...@@ -171,7 +171,7 @@ else ...@@ -171,7 +171,7 @@ else
os/imagezip/ntfs/liblocale/GNUmakefile \ os/imagezip/ntfs/liblocale/GNUmakefile \
os/imagezip/ntfs/libntfs/GNUmakefile \ os/imagezip/ntfs/libntfs/GNUmakefile \
os/imagezip/fat/GNUmakefile" os/imagezip/fat/GNUmakefile"
AC_DEFINE_UNQUOTED(WINSUPPORT, 1) AC_DEFINE_UNQUOTED(WINSUPPORT, 1, [Support Windows images])
fi fi
# #
...@@ -184,7 +184,7 @@ if test "$enable_elvin_compat" = "yes"; then ...@@ -184,7 +184,7 @@ if test "$enable_elvin_compat" = "yes"; then
ELVIN_COMPAT=1 ELVIN_COMPAT=1
fi fi
if test $ELVIN_COMPAT -eq 1; then if test $ELVIN_COMPAT -eq 1; then
AC_DEFINE_UNQUOTED(ELVIN_COMPAT, 1) AC_DEFINE_UNQUOTED(ELVIN_COMPAT, 1, [Obsolete])
fi fi
AC_ARG_ENABLE(TPM, AC_ARG_ENABLE(TPM,
...@@ -194,7 +194,7 @@ if test "$enable_TPM" = "yes"; then ...@@ -194,7 +194,7 @@ if test "$enable_TPM" = "yes"; then
TPM=1 TPM=1
fi fi
if test $TPM -eq 1; then if test $TPM -eq 1; then
AC_DEFINE_UNQUOTED(TPM, 1) AC_DEFINE_UNQUOTED(TPM, 1, [Something about TPM])
fi fi
# BEGIN Python detection. For the event library. # BEGIN Python detection. For the event library.
...@@ -271,6 +271,7 @@ outfiles="Makeconf GNUmakefile setversion \ ...@@ -271,6 +271,7 @@ outfiles="Makeconf GNUmakefile setversion \
tmcc/ubuntu10/GNUmakefile \ tmcc/ubuntu10/GNUmakefile \
tmcc/ubuntu11/GNUmakefile \ tmcc/ubuntu11/GNUmakefile \
tmcc/ubuntu14/GNUmakefile \ tmcc/ubuntu14/GNUmakefile \
tmcc/linux-ms/GNUmakefile \
tmcc/freebsd5/GNUmakefile tmcc/freebsd5/supfile \ tmcc/freebsd5/GNUmakefile tmcc/freebsd5/supfile \
tmcc/freebsd6/GNUmakefile tmcc/freebsd6/supfile \ tmcc/freebsd6/GNUmakefile tmcc/freebsd6/supfile \
tmcc/freebsd6/netif-emulab \ tmcc/freebsd6/netif-emulab \
...@@ -301,6 +302,5 @@ outfiles="Makeconf GNUmakefile setversion \ ...@@ -301,6 +302,5 @@ outfiles="Makeconf GNUmakefile setversion \
DISTCLEAN_FILES="$outfiles" DISTCLEAN_FILES="$outfiles"
AC_SUBST(DISTCLEAN_FILES) AC_SUBST(DISTCLEAN_FILES)
AC_OUTPUT($outfiles) AC_CONFIG_FILES([$outfiles])
AC_OUTPUT
# #
# Copyright (c) 2000-2012 University of Utah and the Flux Group. # Copyright (c) 2000-2014 University of Utah and the Flux Group.
# #
# {{{EMULAB-LICENSE # {{{EMULAB-LICENSE
# #
...@@ -25,16 +25,22 @@ TESTBED_SRCDIR = @top_srcdir@ ...@@ -25,16 +25,22 @@ TESTBED_SRCDIR = @top_srcdir@
OBJDIR = @top_builddir@ OBJDIR = @top_builddir@
SUBDIR = $(subst $(TESTBED_SRCDIR)/,,$(SRCDIR)) SUBDIR = $(subst $(TESTBED_SRCDIR)/,,$(SRCDIR))
SYSTEM := $(shell uname -s) SYSTEM := $(shell uname -s)
ARCH := $(shell uname -m)
include $(OBJDIR)/Makeconf include $(OBJDIR)/Makeconf
SUBDIRS = program-agent link-agent tevc proxy linktest SUBDIRS = program-agent link-agent tevc proxy
ifneq ($(ARCH),aarch64)
SUBDIRS += linktest
endif
ifeq ($(SYSTEM),Linux) ifeq ($(SYSTEM),Linux)
SUBDIRS += disk-agent SUBDIRS += disk-agent
endif endif
ifneq ($(SYSTEM),CYGWIN_NT-5.1) ifneq ($(SYSTEM),CYGWIN_NT-5.1)
ifneq ($(ARCH),aarch64)
SUBDIRS += trafgen SUBDIRS += trafgen
endif endif
endif
ifeq ($(SYSTEM),FreeBSD) ifeq ($(SYSTEM),FreeBSD)
SUBDIRS += delay-agent SUBDIRS += delay-agent
endif endif
......
/* /*
* Copyright (c) 2000-2007 University of Utah and the Flux Group. * Copyright (c) 2000-2014 University of Utah and the Flux Group.
* *
* {{{EMULAB-LICENSE * {{{EMULAB-LICENSE
* *
...@@ -141,7 +141,8 @@ main(int argc, char **argv) ...@@ -141,7 +141,8 @@ main(int argc, char **argv)
loginit(0, logfile); loginit(0, logfile);
else { else {
/* Become a daemon */ /* Become a daemon */
daemon(0, 0); if (daemon(0, 0))
fatal("could not daemonize");
if (logfile) if (logfile)
loginit(0, logfile); loginit(0, logfile);
...@@ -213,18 +214,18 @@ main(int argc, char **argv) ...@@ -213,18 +214,18 @@ main(int argc, char **argv)
if ((bp = index(ap, ',')) == NULL) if ((bp = index(ap, ',')) == NULL)
usage(); usage();
*bp++ = (char) NULL; *bp++ = '\0';
link = ap; link = ap;
vnode = bp; vnode = bp;
if ((bp = index(bp, ',')) == NULL) if ((bp = index(bp, ',')) == NULL)
usage(); usage();
*bp++ = (char) NULL; *bp++ = '\0';
iface = bp; iface = bp;
if ((bp = index(bp, ',')) == NULL) if ((bp = index(bp, ',')) == NULL)
usage(); usage();
*bp++ = (char) NULL; *bp++ = '\0';
mac = convertmac(bp); mac = convertmac(bp);
if (! mac) { if (! mac) {
fatal("Must have a proper MAC!"); fatal("Must have a proper MAC!");
...@@ -271,7 +272,7 @@ main(int argc, char **argv) ...@@ -271,7 +272,7 @@ main(int argc, char **argv)
strcat(bp, ","); strcat(bp, ",");
} }
else else
*bp = (char) NULL; *bp = '\0';
strcat(bp, link); strcat(bp, link);
strcat(bp, ","); strcat(bp, ",");
strcat(bp, buf); strcat(bp, buf);
......
...@@ -344,7 +344,7 @@ sigchld(int sig) ...@@ -344,7 +344,7 @@ sigchld(int sig)
{ {
char dummy = 0; char dummy = 0;
write(childpipe[1], &dummy, sizeof(dummy)); (void) write(childpipe[1], &dummy, sizeof(dummy));
} }
#if defined(SIGINFO) #if defined(SIGINFO)
...@@ -620,7 +620,8 @@ main(int argc, char **argv) ...@@ -620,7 +620,8 @@ main(int argc, char **argv)
loginit(0, logfile); loginit(0, logfile);
else { else {
/* Become a daemon */ /* Become a daemon */
if (!remote) daemon(0, 0); if (!remote && daemon(0, 0))
fatal("Cannot daemonize");
if (logfile) if (logfile)
loginit(0, logfile); loginit(0, logfile);
...@@ -671,7 +672,7 @@ main(int argc, char **argv) ...@@ -671,7 +672,7 @@ main(int argc, char **argv)
} }
if (st.st_uid != pw->pw_uid || st.st_gid != pw->pw_gid) { if (st.st_uid != pw->pw_uid || st.st_gid != pw->pw_gid) {
chown(LOGDIR, pw->pw_uid, pw->pw_gid); (void)chown(LOGDIR, pw->pw_uid, pw->pw_gid);
} }
if (st.st_mode != 0775) { if (st.st_mode != 0775) {
...@@ -738,7 +739,7 @@ main(int argc, char **argv) ...@@ -738,7 +739,7 @@ main(int argc, char **argv)
else { else {
char ipbuf[BUFSIZ]; char ipbuf[BUFSIZ];
fgets(ipbuf, sizeof(ipbuf), fp); (void) fgets(ipbuf, sizeof(ipbuf), fp);
(void) fclose(fp); (void) fclose(fp);
if ((idx = strchr(ipbuf, '\n')) != NULL) if ((idx = strchr(ipbuf, '\n')) != NULL)
*idx = '\0'; *idx = '\0';
...@@ -805,7 +806,7 @@ main(int argc, char **argv) ...@@ -805,7 +806,7 @@ main(int argc, char **argv)
* Change to the temp directory, this will be inherited by any children * Change to the temp directory, this will be inherited by any children
* that do not have their own directory setting. * that do not have their own directory setting.
*/ */
chdir(_PATH_TMP); (void) chdir(_PATH_TMP);
/* /*
* Install our SIGCHLD handler so that we can send the COMPLETE event * Install our SIGCHLD handler so that we can send the COMPLETE event
...@@ -1234,7 +1235,7 @@ start_callback(event_handle_t handle, ...@@ -1234,7 +1235,7 @@ start_callback(event_handle_t handle,
((st.st_mode == S_IFREG) || ((st.st_mode == S_IFREG) ||
(st.st_mode == S_IFLNK)); (st.st_mode == S_IFLNK));
#endif /* __CYGWIN__ */ #endif /* __CYGWIN__ */
if ((file_or_link) && if (file_or_link && got_path &&
(find_agent(path) != NULL) && (find_agent(path) != NULL) &&
((ext = fileext(de->d_name)) != NULL) && ((ext = fileext(de->d_name)) != NULL) &&
((strncmp(ext, "out", 3) == 0) || ((strncmp(ext, "out", 3) == 0) ||
...@@ -2117,14 +2118,14 @@ child_callback(pubsub_handle_t *pshandle, ...@@ -2117,14 +2118,14 @@ child_callback(pubsub_handle_t *pshandle,
LOGDIR, LOGDIR,
pi->name); pi->name);
unlink(path2); unlink(path2);
symlink(path, path2); (void) symlink(path, path2);
if (pi->tag != NULL) { if (pi->tag != NULL) {
snprintf(path2, snprintf(path2,
sizeof(path), sizeof(path),
"%s/%s.%s.status", "%s/%s.%s.status",
LOGDIR, pi->name, pi->tag); LOGDIR, pi->name, pi->tag);
unlink(path2); unlink(path2);
symlink(path, path2); (void) symlink(path, path2);
} }
/* ... notify the scheduler of the completion. */ /* ... notify the scheduler of the completion. */
......
/* /*
* Copyright (c) 2003-2011 University of Utah and the Flux Group. * Copyright (c) 2003-2014 University of Utah and the Flux Group.
* *
* {{{EMULAB-LICENSE * {{{EMULAB-LICENSE
* *
...@@ -80,7 +80,6 @@ main(int argc, char **argv) ...@@ -80,7 +80,6 @@ main(int argc, char **argv)
char *port = NULL; char *port = NULL;
char *myeid = NULL; char *myeid = NULL;
char *pidfile = NULL; char *pidfile = NULL;
char *vnodeid = NULL;
char buf[BUFSIZ], ipaddr[32]; char buf[BUFSIZ], ipaddr[32];
char hostname[MAXHOSTNAMELEN]; char hostname[MAXHOSTNAMELEN];
struct hostent *he; struct hostent *he;
...@@ -108,7 +107,7 @@ main(int argc, char **argv) ...@@ -108,7 +107,7 @@ main(int argc, char **argv)
myeid = optarg; myeid = optarg;
break; break;
case 'v': case 'v':
vnodeid = optarg; fprintf(stderr, "WARNING: -v option ignored\n");
break; break;
default: default:
usage(progname); usage(progname);
...@@ -154,8 +153,8 @@ main(int argc, char **argv) ...@@ -154,8 +153,8 @@ main(int argc, char **argv)
/* /*
* XXX Need to daemonize earlier or the threads go away. * XXX Need to daemonize earlier or the threads go away.
*/ */
if (!debug) if (!debug && daemon(0, 0))
daemon(0, 0); fatal("could not daemonize");
/* /*
* Convert server/port to elvin thing. * Convert server/port to elvin thing.
......
/* /*
* Copyright (c) 2003-2011 University of Utah and the Flux Group. * Copyright (c) 2003-2014 University of Utah and the Flux Group.
* *
* {{{EMULAB-LICENSE * {{{EMULAB-LICENSE
* *
...@@ -244,7 +244,8 @@ main(int argc, char **argv) ...@@ -244,7 +244,8 @@ main(int argc, char **argv)
* event system calls. * event system calls.
*/ */
if (!debug) { if (!debug) {
daemon(0, 0); if (daemon(0, 0))
fatal("could not daemonize");
loginit(0, "/var/emulab/logs/evproxy.log"); loginit(0, "/var/emulab/logs/evproxy.log");
} }
......
...@@ -56,7 +56,7 @@ static char *usagestr = ...@@ -56,7 +56,7 @@ static char *usagestr =
void void
usage() usage()
{ {
fprintf(stderr, usagestr); fprintf(stderr, "%s", usagestr);
exit(1); exit(1);
} }
......
...@@ -465,8 +465,8 @@ main(int argc, char **argv) ...@@ -465,8 +465,8 @@ main(int argc, char **argv)
if (!programmode && argc != 2) if (!programmode && argc != 2)
usage(); usage();
if (!debug) if (!debug && daemon(0, 0))
(void)daemon(0, 0); die("Could not daemonize");
Machine = argv[0]; Machine = argv[0];
programargv = argv; programargv = argv;
...@@ -1799,9 +1799,9 @@ progmode(int isrestart) ...@@ -1799,9 +1799,9 @@ progmode(int isrestart)
close(0); close(0);
close(1); close(1);
close(2); close(2);
dup(pipefds[1]); (void)dup(pipefds[1]);
dup(pipefds[1]); (void)dup(pipefds[1]);
dup(pipefds[1]); (void)dup(pipefds[1]);
/* /*
* Close all other descriptors. * Close all other descriptors.
......
/* /*
* Copyright (c) 2000-2005 University of Utah and the Flux Group. * Copyright (c) 2000-2014 University of Utah and the Flux Group.
* *
* {{{EMULAB-LICENSE * {{{EMULAB-LICENSE
* *
...@@ -107,6 +107,7 @@ int showdiskinfo(char *disk); ...@@ -107,6 +107,7 @@ int showdiskinfo(char *disk);
char *progname; char *progname;
int list = 1, verbose, fdisk, usenewpart = 1; int list = 1, verbose, fdisk, usenewpart = 1;
int
main(int argc, char *argv[]) main(int argc, char *argv[])
{ {
int ch; int ch;
...@@ -344,7 +345,7 @@ tweakdiskinfo(char *disk) ...@@ -344,7 +345,7 @@ tweakdiskinfo(char *disk)
dp = &diskinfo.parts[lastunused]; dp = &diskinfo.parts[lastunused];
if (fdisk) { if (fdisk) {
printf("p %d %d %d %d\n", printf("p %d %d %ld %ld\n",
lastunused+1, dp->dp_typ ? dp->dp_typ : DOSPTYP_386BSD, lastunused+1, dp->dp_typ ? dp->dp_typ : DOSPTYP_386BSD,
dp->dp_start ? dp->dp_start : firstfree, dp->dp_start ? dp->dp_start : firstfree,
diskinfo.disksize-firstfree); diskinfo.disksize-firstfree);
...@@ -353,7 +354,7 @@ tweakdiskinfo(char *disk) ...@@ -353,7 +354,7 @@ tweakdiskinfo(char *disk)
if (verbose || list) { if (verbose || list) {
if (dp->dp_start) if (dp->dp_start)
printf("%s: %s size of partition %d " printf("%s: %s size of partition %d "
"from %lu to %lu\n", disk, "from %u to %lu\n", disk,
list ? "would change" : "changing", list ? "would change" : "changing",
lastunused+1, dp->dp_size, lastunused+1, dp->dp_size,
diskinfo.disksize-firstfree); diskinfo.disksize-firstfree);
...@@ -383,7 +384,7 @@ showdiskinfo(char *disk) ...@@ -383,7 +384,7 @@ showdiskinfo(char *disk)
printf("\n"); printf("\n");
for (i = 0; i < NDOSPART; i++) { for (i = 0; i < NDOSPART; i++) {
dp = &diskinfo.parts[i]; dp = &diskinfo.parts[i];
printf(" %d: start=%9lu, size=%9lu, type=0x%02x\n", printf(" %d: start=%9u, size=%9u, type=0x%02x\n",
i+1, dp->dp_start, dp->dp_size, dp->dp_typ); i+1, dp->dp_start, dp->dp_size, dp->dp_typ);
} }
} }
...@@ -415,7 +416,7 @@ setdiskinfo(char *disk) ...@@ -415,7 +416,7 @@ setdiskinfo(char *disk)
} }
if (cc != sizeof(diskinfo.bootblock)) { if (cc != sizeof(diskinfo.bootblock)) {
warnx("%s: partial write (%d != %d)\n", disk, warnx("%s: partial write (%d != %d)\n", disk,
cc, sizeof(diskinfo.bootblock)); cc, (int)sizeof(diskinfo.bootblock));
} }
#ifdef __linux__ #ifdef __linux__
printf("Calling ioctl() to re-read partition table.\n"); printf("Calling ioctl() to re-read partition table.\n");
......
...@@ -629,7 +629,6 @@ hashmap_compute_delta(struct range *curranges, char *hfile, int infd, ...@@ -629,7 +629,6 @@ hashmap_compute_delta(struct range *curranges, char *hfile, int infd,
unsigned char hash[HASH_MAXSIZE]; unsigned char hash[HASH_MAXSIZE];
struct range dummy_head, *range_tail; struct range dummy_head, *range_tail;
struct hashregion *hreg, *ereg; struct hashregion *hreg, *ereg;
char *hashstr;
struct hashinfo *hinfo; struct hashinfo *hinfo;
struct range *drange, tmprange; struct range *drange, tmprange;
int retval, changed, gapcount; int retval, changed, gapcount;
...@@ -675,12 +674,10 @@ hashmap_compute_delta(struct range *curranges, char *hfile, int infd, ...@@ -675,12 +674,10 @@ hashmap_compute_delta(struct range *curranges, char *hfile, int infd,
default: default:
hashlen = 16; hashlen = 16;
hashfunc = MD5; hashfunc = MD5;
hashstr = "MD5 digest";
break; break;
case HASH_TYPE_SHA1: case HASH_TYPE_SHA1:
hashlen = 20; hashlen = 20;
hashfunc = SHA1; hashfunc = SHA1;
hashstr = "SHA1 digest";
break; break;
} }
......
...@@ -459,10 +459,6 @@ dumphash(char *name, struct hashinfo *hinfo, int withchunk) ...@@ -459,10 +459,6 @@ dumphash(char *name, struct hashinfo *hinfo, int withchunk)
{ {
uint32_t i; uint32_t i;
struct hashregion *reg; struct hashregion *reg;
int haschunkrange = 0;
if (hinfo->version > HASH_VERSION_1)
haschunkrange = 1;
if (detail > 1) { if (detail > 1) {
switch (hinfo->version) { switch (hinfo->version) {
...@@ -596,7 +592,8 @@ createhash(char *name, struct hashinfo **hinfop) ...@@ -596,7 +592,8 @@ createhash(char *name, struct hashinfo **hinfop)
dump_stats(0); dump_stats(0);
#ifdef TIMEIT #ifdef TIMEIT
printf("%qu bytes: inflate cycles: %llu\n", ndatabytes, dcycles); printf("%qu bytes: inflate cycles: %llu\n",
ndatabytes, (unsigned long long)dcycles);
#endif #endif
free(hfile); free(hfile);
return 0; return 0;
...@@ -733,7 +730,8 @@ checkhash(char *name, struct hashinfo *hinfo) ...@@ -733,7 +730,8 @@ checkhash(char *name, struct hashinfo *hinfo)
dump_readbufs(); dump_readbufs();
#ifdef TIMEIT #ifdef TIMEIT
printf("%llu bytes: read cycles: %llu, hash cycles: %llu, cmp cycles: %llu\n", printf("%llu bytes: read cycles: %llu, hash cycles: %llu, cmp cycles: %llu\n",
ndatabytes, rcycles, hcycles, ccycles); ndatabytes, (unsigned long long)rcycles,
(unsigned long long)hcycles, (unsigned long long)ccycles);
#endif #endif
return badhashes; return badhashes;
} }
......
/* /*
* Copyright (c) 2000-2012 University of Utah and the Flux Group. * Copyright (c) 2000-2014 University of Utah and the Flux Group.
* *
* {{{EMULAB-LICENSE * {{{EMULAB-LICENSE
* *
...@@ -190,7 +190,7 @@ static char *usagestr = ...@@ -190,7 +190,7 @@ static char *usagestr =
void void
usage() usage()
{ {
fprintf(stderr, usagestr); fprintf(stderr, "%s", usagestr);
exit(1); exit(1);
} }
...@@ -317,8 +317,10 @@ main(int argc, char **argv) ...@@ -317,8 +317,10 @@ main(int argc, char **argv)
#endif #endif
/* Now become a daemon */ /* Now become a daemon */
if (!debug) if (!debug && daemon(0, 1)) {
daemon(0, 1); error("Could not daemonize");
exit(1);
}
signal(SIGUSR1, setverbose); signal(SIGUSR1, setverbose);
signal(SIGUSR2, setverbose); signal(SIGUSR2, setverbose);
......
...@@ -99,6 +99,9 @@ endif ...@@ -99,6 +99,9 @@ endif
ifeq ($(MDSUBDIR),ubuntu14) ifeq ($(MDSUBDIR),ubuntu14)
MDSUBDIR = ubuntu14 MDSUBDIR = ubuntu14