diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2005-08-28 23:03:49 +0000 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2005-08-28 23:03:49 +0000 |
commit | a91f305beee5ff6fe5bb3e2a0312d8184f4763b7 (patch) | |
tree | 10ef2e37960b46c4ac4c65d3e13cd7f9b141548f /source/scripting/ejs/smbscript.c | |
parent | a4e89f4c75af824064a213fbafe7cfa59f66bd8c (diff) | |
download | samba-a91f305beee5ff6fe5bb3e2a0312d8184f4763b7.tar.gz samba-a91f305beee5ff6fe5bb3e2a0312d8184f4763b7.tar.xz samba-a91f305beee5ff6fe5bb3e2a0312d8184f4763b7.zip |
r9722: Initial attempt at converting samba3dump to EJS..
Diffstat (limited to 'source/scripting/ejs/smbscript.c')
-rw-r--r-- | source/scripting/ejs/smbscript.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/scripting/ejs/smbscript.c b/source/scripting/ejs/smbscript.c index a35b988e56f..f8d6d507d43 100644 --- a/source/scripting/ejs/smbscript.c +++ b/source/scripting/ejs/smbscript.c @@ -86,6 +86,11 @@ void ejs_exception(const char *reason) /* load the script and advance past interpreter line*/ script = file_load(fname, &script_size, mem_ctx); + if (!script) { + fprintf(stderr, "Unable to load script from '%s'\n", fname); + exit(1); + } + /* allow scriptable js */ if (strncmp(script, "#!", 2) == 0) { script += strcspn(script, "\r\n"); |