git.annexia.org
/
febootstrap.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e576d2e
)
helper: Improve error message when run on random files (thanks Alexey Torkhov).
author
Richard W.M. Jones
<rjones@redhat.com>
Thu, 6 Oct 2011 12:50:45 +0000
(13:50 +0100)
committer
Richard W.M. Jones
<rjones@redhat.com>
Thu, 6 Oct 2011 12:50:45 +0000
(13:50 +0100)
helper/appliance.c
patch
|
blob
|
history
diff --git
a/helper/appliance.c
b/helper/appliance.c
index
b2cc840
..
c4d0b32
100644
(file)
--- a/
helper/appliance.c
+++ b/
helper/appliance.c
@@
-284,7
+284,9
@@
add_hostfiles (const char *hostfiles_file, struct writer *writer)
if (strchr (hostfile, '*') || strchr (hostfile, '?')) {
char *dirname = xstrdup (hostfile);
char *patt = strrchr (dirname, '/');
- assert (patt);
+ if (!patt)
+ error (EXIT_FAILURE, 0, "%s: line %zu: invalid pattern\n(is this file a supermin appliance hostfiles file?)",
+ hostfiles_file, i+1);
*patt++ = '\0';
char **files = read_dir (dirname);