All new accounts created on Gitlab now require administrator approval. If you invite any collaborators, please let Flux staff know so they can approve the accounts.

Commit 7b535647 authored by Mike Hibler's avatar Mike Hibler

Nit: add missing newlines to various error messages.

parent 2fbfc5dd
/*
* Copyright (c) 2000-2013 University of Utah and the Flux Group.
* Copyright (c) 2000-2014 University of Utah and the Flux Group.
*
* {{{EMULAB-LICENSE
*
......@@ -135,16 +135,16 @@ event_register_withkeyfile_withretry(char *name, int threaded,
int cc;
if ((fp = fopen(keyfile, "r")) == NULL) {
ERROR("could not open keyfile: %s", keyfile);
ERROR("could not open keyfile: %s\n", keyfile);
return 0;
}
if ((cc = fread(buf, sizeof(char), sizeof(buf), fp)) == 0) {
ERROR("could not read keyfile: %s", keyfile);
ERROR("could not read keyfile: %s\n", keyfile);
fclose(fp);
return 0;
}
if (cc == sizeof(buf)) {
ERROR("keyfile is too big: %s", keyfile);
ERROR("keyfile is too big: %s\n", keyfile);
fclose(fp);
return 0;
}
......@@ -214,8 +214,12 @@ event_register_withkeydata_withretry(char *name, int threaded,
int scanres;
FILE *fp;
ERROR("could not get IP address from hostname, "
"reading IP from %s.\n", IPADDRFILE);
if (strlen(hostname)) {
ERROR("could not get IP address from hostname");
} else {
ERROR("hostname not set or not fully qualified");
}
fprintf(stderr, ", reading IP from %s.\n", IPADDRFILE);
/* Try getting the node's ID from BOOTDIR/myip before giving up. */
fp = fopen(IPADDRFILE, "r");
if (fp != NULL) {
......@@ -231,7 +235,7 @@ event_register_withkeydata_withretry(char *name, int threaded,
}
snprintf(ipaddr, sizeof(ipaddr), "%u.%u.%u.%u", o1, o2, o3, o4);
} else {
ERROR("could not get IP from local file %s either!", IPADDRFILE);
ERROR("could not get IP from local file %s either!\n", IPADDRFILE);
return 0;
}
}
......@@ -276,7 +280,7 @@ event_register_withkeydata_withretry(char *name, int threaded,
sstr = strrchr(cp, '/');
}
if (!sstr) {
ERROR("could not parse: %s", name);
ERROR("could not parse: %s\n", name);
goto bad;
}
*sstr++ = '\0';
......@@ -1191,7 +1195,9 @@ addclause(char *tag, char *clause, char *exp, int size, int *index)
char *bp;
char clausecopy[EXPRESSION_LENGTH], *strp = clausecopy;
char buf[EXPRESSION_LENGTH];
#if 0
int needglob = 1;
#endif
/* Must copy clause since we use strsep! */
if (strlen(clause) >= sizeof(clausecopy)-1)
......@@ -1208,8 +1214,10 @@ addclause(char *tag, char *clause, char *exp, int size, int *index)
if (! *bp)
continue;
#if 0
if (! strcmp("*", bp))
needglob = 0;
#endif
count += snprintf(&buf[count], sizeof(buf) - count,
"%s %s == \"%s\" ",
......@@ -2240,7 +2248,7 @@ event_notification_t event_notification_create_v(event_handle_t handle,
address_tuple_t tuple;
if ((tuple = address_tuple_alloc()) == NULL) {
ERROR("could not allocate address tuple");
ERROR("could not allocate address tuple\n");
errno = ENOMEM;
}
else {
......@@ -2304,7 +2312,7 @@ event_notification_t event_notification_create_v(event_handle_t handle,
when = va_arg(args, struct timeval *);
break;
default:
ERROR("unknown tag value");
ERROR("unknown tag value\n");
errno = EINVAL;
return 0;
}
......@@ -2313,7 +2321,7 @@ event_notification_t event_notification_create_v(event_handle_t handle,
if ((retval = event_notification_alloc(handle,
tuple)) == NULL) {
ERROR("could not allocate notification");
ERROR("could not allocate notification\n");
errno = ENOMEM;
}
else {
......@@ -2355,7 +2363,7 @@ int event_do_v(event_handle_t handle, ea_tag_t tag, va_list args)
if ((en = event_notification_create_v(handle, &when,
tag, args)) == NULL) {
ERROR("could not allocate notification");
ERROR("could not allocate notification\n");
errno = ENOMEM;
}
else {
......
/*
* Copyright (c) 2000-2013 University of Utah and the Flux Group.
* Copyright (c) 2000-2014 University of Utah and the Flux Group.
*
* {{{EMULAB-LICENSE
*
......@@ -60,18 +60,18 @@ bootinfo_init(void)
/* Initialize data base */
err = open_bootinfo_db();
if (err) {
error("could not open database");
error("could not open database\n");
return -1;
}
err = bicache_init();
if (err) {
error("could not initialize cache");
error("could not initialize cache\n");
return -1;
}
#ifdef EVENTSYS
err = bievent_init();
if (err) {
error("could not initialize event system");
error("could not initialize event system\n");
return -1;
}
#endif
......
/*
* Copyright (c) 2000-2003 University of Utah and the Flux Group.
* Copyright (c) 2000-2014 University of Utah and the Flux Group.
*
* {{{EMULAB-LICENSE
*
......@@ -102,7 +102,7 @@ parse_host(char *name)
if (!isdigit(name[0])) {
he = gethostbyname(name);
if (he == 0) {
error("%s: unknown host", name);
error("%s: unknown host\n", name);
return 0;
}
return *(int *)he->h_addr;
......@@ -121,7 +121,7 @@ parse_configs(char *filename)
int ipaddr;
if ((fp = fopen(filename, "r")) == NULL) {
error("%s: cannot open", filename);
error("%s: cannot open\n", filename);
return 1;
}
......@@ -133,7 +133,7 @@ parse_configs(char *filename)
continue;
if (numconfigs >= MAX_CONFIGS) {
error("%s: too many lines", filename);
error("%s: too many lines\n", filename);
fclose(fp);
return 1;
}
......@@ -143,7 +143,7 @@ parse_configs(char *filename)
configp = (struct config *) calloc(sizeof *configp, 1);
if (!configp) {
bad:
error("%s: parse error", filename);
error("%s: parse error\n", filename);
fclose(fp);
close_bootinfo_db();
return 1;
......
/*
* Copyright (c) 2000-2012 University of Utah and the Flux Group.
* Copyright (c) 2000-2014 University of Utah and the Flux Group.
*
* {{{EMULAB-LICENSE
*
......@@ -121,13 +121,13 @@ main(int argc, char **argv)
err = open_bootinfo_db();
if (err) {
error("could not open database");
error("could not open database\n");
exit(1);
}
#ifdef EVENTSYS
err = bievent_init();
if (err) {
error("could not initialize event system");
error("could not initialize event system\n");
exit(1);
}
#endif
......
/*
* Copyright (c) 2000-2004, 2007 University of Utah and the Flux Group.
* Copyright (c) 2000-2014 University of Utah and the Flux Group.
*
* {{{EMULAB-LICENSE
*
......@@ -118,7 +118,7 @@ bievent_send(struct in_addr ipaddr, void *opaque, char *event)
info("Sending event %s for node %s\n", event, nodeid);
if (event_notify(event_handle, notification) == 0) {
error("Unable to send notification!");
error("Unable to send notification!\n");
event_notification_free(event_handle, notification);
/*
......
/*
* Copyright (c) 2000-2012 University of Utah and the Flux Group.
* Copyright (c) 2000-2014 University of Utah and the Flux Group.
*
* {{{EMULAB-LICENSE
*
......@@ -131,7 +131,7 @@ main(int argc, char **argv)
err = bootinfo_init();
if (err) {
error("could not initialize bootinfo");
error("could not initialize bootinfo\n");
exit(1);
}
/* Create socket from which to read. */
......@@ -198,7 +198,7 @@ onhup(int sig)
close_bootinfo_db();
err = open_bootinfo_db();
if (err) {
error("Could not reopen database");
error("Could not reopen database\n");
exit(1);
}
}
......
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