Commit db6f3b96 authored by Mike Hibler's avatar Mike Hibler

Initial support for ARM-64 clientside.

Clientside builds on HP Moonshot, haven't tried running anything.

The most significant change here is moving to autoconf 2.69, which
is the first that supports "aarch64". This required replacing the
scripts in autoconf/ and significant textual changes to configure.in
files.

Other than that, it was all lint.
parent 36f8964c
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
/* config.h.in */
/* For current automake/autoconf incompatibility. */
#undef PACKAGE
#undef VERSION
/* config.h.in. Generated from configure.ac by autoheader. */
/* Obsolete */
#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
/* 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
/* Support Windows images */
#undef WINSUPPORT
This diff is collapsed.
......@@ -20,10 +20,10 @@
#
# }}}
#
AC_PREREQ(2.62)
AC_PREREQ(2.69)
AC_INIT(Makeconf.in)
AC_CONFIG_AUX_DIR(${srcdir}/autoconf)
AC_CONFIG_AUX_DIR(autoconf)
AC_CONFIG_HEADER(config.h)
AC_CANONICAL_HOST
......@@ -110,7 +110,7 @@ NOSHAREDFS=0
TBLOGFACIL="local5"
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(TBLOGFACIL)
......@@ -171,7 +171,7 @@ else
os/imagezip/ntfs/liblocale/GNUmakefile \
os/imagezip/ntfs/libntfs/GNUmakefile \
os/imagezip/fat/GNUmakefile"
AC_DEFINE_UNQUOTED(WINSUPPORT, 1)
AC_DEFINE_UNQUOTED(WINSUPPORT, 1, [Support Windows images])
fi
#
......@@ -184,7 +184,7 @@ if test "$enable_elvin_compat" = "yes"; then
ELVIN_COMPAT=1
fi
if test $ELVIN_COMPAT -eq 1; then
AC_DEFINE_UNQUOTED(ELVIN_COMPAT, 1)
AC_DEFINE_UNQUOTED(ELVIN_COMPAT, 1, [Obsolete])
fi
AC_ARG_ENABLE(TPM,
......@@ -194,7 +194,7 @@ if test "$enable_TPM" = "yes"; then
TPM=1
fi
if test $TPM -eq 1; then
AC_DEFINE_UNQUOTED(TPM, 1)
AC_DEFINE_UNQUOTED(TPM, 1, [Something about TPM])
fi
# BEGIN Python detection. For the event library.
......@@ -300,6 +300,5 @@ outfiles="Makeconf GNUmakefile setversion \
DISTCLEAN_FILES="$outfiles"
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
#
......@@ -25,16 +25,22 @@ TESTBED_SRCDIR = @top_srcdir@
OBJDIR = @top_builddir@
SUBDIR = $(subst $(TESTBED_SRCDIR)/,,$(SRCDIR))
SYSTEM := $(shell uname -s)
ARCH := $(shell uname -m)
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)
SUBDIRS += disk-agent
endif
ifneq ($(SYSTEM),CYGWIN_NT-5.1)
ifneq ($(ARCH),aarch64)
SUBDIRS += trafgen
endif
endif
ifeq ($(SYSTEM),FreeBSD)
SUBDIRS += delay-agent
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
*
......@@ -141,7 +141,8 @@ main(int argc, char **argv)
loginit(0, logfile);
else {
/* Become a daemon */
daemon(0, 0);
if (daemon(0, 0))
fatal("could not daemonize");
if (logfile)
loginit(0, logfile);
......@@ -213,18 +214,18 @@ main(int argc, char **argv)
if ((bp = index(ap, ',')) == NULL)
usage();
*bp++ = (char) NULL;
*bp++ = '\0';
link = ap;
vnode = bp;
if ((bp = index(bp, ',')) == NULL)
usage();
*bp++ = (char) NULL;
*bp++ = '\0';
iface = bp;
if ((bp = index(bp, ',')) == NULL)
usage();
*bp++ = (char) NULL;
*bp++ = '\0';
mac = convertmac(bp);
if (! mac) {
fatal("Must have a proper MAC!");
......@@ -271,7 +272,7 @@ main(int argc, char **argv)
strcat(bp, ",");
}
else
*bp = (char) NULL;
*bp = '\0';
strcat(bp, link);
strcat(bp, ",");
strcat(bp, buf);
......
......@@ -344,7 +344,7 @@ sigchld(int sig)
{
char dummy = 0;
write(childpipe[1], &dummy, sizeof(dummy));
(void) write(childpipe[1], &dummy, sizeof(dummy));
}
#if defined(SIGINFO)
......@@ -620,7 +620,8 @@ main(int argc, char **argv)
loginit(0, logfile);
else {
/* Become a daemon */
if (!remote) daemon(0, 0);
if (!remote && daemon(0, 0))
fatal("Cannot daemonize");
if (logfile)
loginit(0, logfile);
......@@ -671,7 +672,7 @@ main(int argc, char **argv)
}
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) {
......@@ -738,7 +739,7 @@ main(int argc, char **argv)
else {
char ipbuf[BUFSIZ];
fgets(ipbuf, sizeof(ipbuf), fp);
(void) fgets(ipbuf, sizeof(ipbuf), fp);
(void) fclose(fp);
if ((idx = strchr(ipbuf, '\n')) != NULL)
*idx = '\0';
......@@ -805,7 +806,7 @@ main(int argc, char **argv)
* Change to the temp directory, this will be inherited by any children
* 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
......@@ -1234,7 +1235,7 @@ start_callback(event_handle_t handle,
((st.st_mode == S_IFREG) ||
(st.st_mode == S_IFLNK));
#endif /* __CYGWIN__ */
if ((file_or_link) &&
if (file_or_link && got_path &&
(find_agent(path) != NULL) &&
((ext = fileext(de->d_name)) != NULL) &&
((strncmp(ext, "out", 3) == 0) ||
......@@ -2117,14 +2118,14 @@ child_callback(pubsub_handle_t *pshandle,
LOGDIR,
pi->name);
unlink(path2);
symlink(path, path2);
(void) symlink(path, path2);
if (pi->tag != NULL) {
snprintf(path2,
sizeof(path),
"%s/%s.%s.status",
LOGDIR, pi->name, pi->tag);
unlink(path2);
symlink(path, path2);
(void) symlink(path, path2);
}
/* ... 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
*
......@@ -80,7 +80,6 @@ main(int argc, char **argv)
char *port = NULL;
char *myeid = NULL;
char *pidfile = NULL;
char *vnodeid = NULL;
char buf[BUFSIZ], ipaddr[32];
char hostname[MAXHOSTNAMELEN];
struct hostent *he;
......@@ -108,7 +107,7 @@ main(int argc, char **argv)
myeid = optarg;
break;
case 'v':
vnodeid = optarg;
fprintf(stderr, "WARNING: -v option ignored\n");
break;
default:
usage(progname);
......@@ -154,8 +153,8 @@ main(int argc, char **argv)
/*
* XXX Need to daemonize earlier or the threads go away.
*/
if (!debug)
daemon(0, 0);
if (!debug && daemon(0, 0))
fatal("could not daemonize");
/*
* 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
*
......@@ -244,7 +244,8 @@ main(int argc, char **argv)
* event system calls.
*/
if (!debug) {
daemon(0, 0);
if (daemon(0, 0))
fatal("could not daemonize");
loginit(0, "/var/emulab/logs/evproxy.log");
}
......
......@@ -56,7 +56,7 @@ static char *usagestr =
void
usage()
{
fprintf(stderr, usagestr);
fprintf(stderr, "%s", usagestr);
exit(1);
}
......
......@@ -64,7 +64,6 @@
#include <sys/time.h>
#include <signal.h>
#include <sys/ioctl.h>
#include <sys/termios.h>
#ifdef USESOCKETS
#include <sys/types.h>
#include <sys/socket.h>
......@@ -466,8 +465,8 @@ main(int argc, char **argv)
if (!programmode && argc != 2)
usage();
if (!debug)
(void)daemon(0, 0);
if (!debug && daemon(0, 0))
die("Could not daemonize");
Machine = argv[0];
programargv = argv;
......@@ -1786,9 +1785,9 @@ progmode(int isrestart)
close(0);
close(1);
close(2);
dup(pipefds[1]);
dup(pipefds[1]);
dup(pipefds[1]);
(void)dup(pipefds[1]);
(void)dup(pipefds[1]);
(void)dup(pipefds[1]);
/*
* 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
*
......@@ -107,6 +107,7 @@ int showdiskinfo(char *disk);
char *progname;
int list = 1, verbose, fdisk, usenewpart = 1;
int
main(int argc, char *argv[])
{
int ch;
......@@ -344,7 +345,7 @@ tweakdiskinfo(char *disk)
dp = &diskinfo.parts[lastunused];
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,
dp->dp_start ? dp->dp_start : firstfree,
diskinfo.disksize-firstfree);
......@@ -353,7 +354,7 @@ tweakdiskinfo(char *disk)
if (verbose || list) {
if (dp->dp_start)
printf("%s: %s size of partition %d "
"from %lu to %lu\n", disk,
"from %u to %lu\n", disk,
list ? "would change" : "changing",
lastunused+1, dp->dp_size,
diskinfo.disksize-firstfree);
......@@ -383,7 +384,7 @@ showdiskinfo(char *disk)
printf("\n");
for (i = 0; i < NDOSPART; 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);
}
}
......@@ -415,7 +416,7 @@ setdiskinfo(char *disk)
}
if (cc != sizeof(diskinfo.bootblock)) {
warnx("%s: partial write (%d != %d)\n", disk,
cc, sizeof(diskinfo.bootblock));
cc, (int)sizeof(diskinfo.bootblock));
}
#ifdef __linux__
printf("Calling ioctl() to re-read partition table.\n");
......
......@@ -51,7 +51,7 @@
/* XXX these should be defined per controller (or drive) elsewhere, not here! */
#if defined(__i386__) || defined(__amd64__) || defined(__arm__) || \
defined(__ia64__) || defined(__powerpc__)
defined(__ia64__) || defined(__powerpc__) || defined(__aarch64__)
#define LABELSECTOR 1 /* sector containing label */
#define LABELOFFSET 0 /* offset of label in sector */
#endif
......
......@@ -629,7 +629,6 @@ hashmap_compute_delta(struct range *curranges, char *hfile, int infd,
unsigned char hash[HASH_MAXSIZE];
struct range dummy_head, *range_tail;
struct hashregion *hreg, *ereg;
char *hashstr;
struct hashinfo *hinfo;
struct range *drange, tmprange;
int retval, changed, gapcount;
......@@ -675,12 +674,10 @@ hashmap_compute_delta(struct range *curranges, char *hfile, int infd,
default:
hashlen = 16;
hashfunc = MD5;
hashstr = "MD5 digest";
break;
case HASH_TYPE_SHA1:
hashlen = 20;
hashfunc = SHA1;
hashstr = "SHA1 digest";
break;
}
......
......@@ -459,10 +459,6 @@ dumphash(char *name, struct hashinfo *hinfo, int withchunk)
{
uint32_t i;
struct hashregion *reg;
int haschunkrange = 0;
if (hinfo->version > HASH_VERSION_1)
haschunkrange = 1;
if (detail > 1) {
switch (hinfo->version) {
......@@ -596,7 +592,8 @@ createhash(char *name, struct hashinfo **hinfop)
dump_stats(0);
#ifdef TIMEIT
printf("%qu bytes: inflate cycles: %llu\n", ndatabytes, dcycles);
printf("%qu bytes: inflate cycles: %llu\n",
ndatabytes, (unsigned long long)dcycles);
#endif
free(hfile);
return 0;
......@@ -733,7 +730,8 @@ checkhash(char *name, struct hashinfo *hinfo)
dump_readbufs();
#ifdef TIMEIT
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
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
*
......@@ -190,7 +190,7 @@ static char *usagestr =
void
usage()
{
fprintf(stderr, usagestr);
fprintf(stderr, "%s", usagestr);
exit(1);
}
......@@ -317,8 +317,10 @@ main(int argc, char **argv)
#endif
/* Now become a daemon */
if (!debug)
daemon(0, 1);
if (!debug && daemon(0, 1)) {
error("Could not daemonize");
exit(1);
}
signal(SIGUSR1, setverbose);
signal(SIGUSR2, setverbose);
......
/*
* Copyright (c) 2001-2010 University of Utah and the Flux Group.
* Copyright (c) 2001-2014 University of Utah and the Flux Group.
*
* {{{EMULAB-LICENSE
*
......@@ -311,8 +311,8 @@ find_iface(char *macaddr)
return -1;
}
/* Eat a couple of lines */
fgets(buf, sizeof(buf), fp);
fgets(buf, sizeof(buf), fp);
(void)fgets(buf, sizeof(buf), fp);
(void)fgets(buf, sizeof(buf), fp);
while (fgets(buf, sizeof(buf), fp)) {
sscanf(buf, "%s:", ifr->ifr_name);
......
/*
* Copyright (c) 2000-2009 University of Utah and the Flux Group.
* Copyright (c) 2000-2014 University of Utah and the Flux Group.
*
* {{{EMULAB-LICENSE
*
......@@ -393,7 +393,7 @@ void usage(char *progname) {
"interfaces... A list of interfaces to monitor\n";
fprintf(stderr,short_usage,progname,progname);
fprintf(stderr,long_usage);
fprintf(stderr,"%s",long_usage);
exit(-1);
}
......@@ -1058,7 +1058,7 @@ int main (int argc, char **argv) {
int fd;
struct feedclient_args *args;
struct sockaddr client_addr;
size_t client_addrlen = sizeof(&client_addr);
socklen_t client_addrlen = sizeof(&client_addr);
fd = accept(sock,&client_addr,&client_addrlen);
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment