Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
emulab-devel
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Merge Requests
0
Merge Requests
0
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Hussamuddin Nasir
emulab-devel
Commits
7b535647
Commit
7b535647
authored
May 16, 2014
by
Mike Hibler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Nit: add missing newlines to various error messages.
parent
2fbfc5dd
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
37 additions
and
29 deletions
+37
-29
clientside/lib/event/event.c
clientside/lib/event/event.c
+20
-12
pxe/bootinfo.c
pxe/bootinfo.c
+4
-4
pxe/bootinfo_cfile.c
pxe/bootinfo_cfile.c
+5
-5
pxe/bootinfosend.c
pxe/bootinfosend.c
+3
-3
pxe/event-support.c
pxe/event-support.c
+2
-2
pxe/main.c
pxe/main.c
+3
-3
No files found.
clientside/lib/event/event.c
View file @
7b535647
/*
* Copyright (c) 2000-201
3
University of Utah and the Flux Group.
* Copyright (c) 2000-201
4
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
{
...
...
pxe/bootinfo.c
View file @
7b535647
/*
* Copyright (c) 2000-201
3
University of Utah and the Flux Group.
* Copyright (c) 2000-201
4
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
...
...
pxe/bootinfo_cfile.c
View file @
7b535647
/*
* Copyright (c) 2000-20
03
University of Utah and the Flux Group.
* Copyright (c) 2000-20
14
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
;
...
...
pxe/bootinfosend.c
View file @
7b535647
/*
* Copyright (c) 2000-201
2
University of Utah and the Flux Group.
* Copyright (c) 2000-201
4
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
...
...
pxe/event-support.c
View file @
7b535647
/*
* Copyright (c) 2000-20
04, 2007
University of Utah and the Flux Group.
* Copyright (c) 2000-20
14
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
);
/*
...
...
pxe/main.c
View file @
7b535647
/*
* Copyright (c) 2000-201
2
University of Utah and the Flux Group.
* Copyright (c) 2000-201
4
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
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment