aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2009-02-12 18:41:41 -0500
committerMike Frysinger <vapier@gentoo.org>2009-02-12 18:47:23 -0500
commit515cb60c9aecff2d10c691f7fc5779f53fa97541 (patch)
tree596a201d8285209e864f6eb8abf57820d678078e /src
parentdisable tests for unavailable funcs (diff)
downloadsandbox-515cb60c9aecff2d10c691f7fc5779f53fa97541.tar.gz
sandbox-515cb60c9aecff2d10c691f7fc5779f53fa97541.tar.bz2
sandbox-515cb60c9aecff2d10c691f7fc5779f53fa97541.zip
sandbox: do not dist sandbox.sh and clean up error messages
The sandbox.sh file is generated now, so do not mark it as a dist target. To make this kind of error easier to figure out in the future, have all sandbox errors related to files include the full filename that is causing an error. URL: http://bugs.gentoo.org/258690 Signed-off-by: Mike Frysinger <vapier@gentoo.org> Reported-by: Alexis Ballier <aballier@gentoo.org>
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.am2
-rw-r--r--src/sandbox.c10
2 files changed, 6 insertions, 6 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index d48cf17..2744542 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,7 +1,5 @@
AUTOMAKE_OPTIONS = foreign
-EXTRA_DIST = sandbox.sh
-
bin_PROGRAMS = sandbox
AM_CPPFLAGS = \
diff --git a/src/sandbox.c b/src/sandbox.c
index 87444cf..dd2f36c 100644
--- a/src/sandbox.c
+++ b/src/sandbox.c
@@ -62,7 +62,8 @@ static int setup_sandbox(struct sandbox_info_t *sandbox_info, bool interactive)
get_sandbox_log(sandbox_info->sandbox_log);
if (rc_file_exists(sandbox_info->sandbox_log)) {
if (-1 == unlink(sandbox_info->sandbox_log)) {
- sb_pwarn("could not unlink old log file");
+ sb_pwarn("could not unlink old log file: %s",
+ sandbox_info->sandbox_log);
return -1;
}
}
@@ -71,7 +72,8 @@ static int setup_sandbox(struct sandbox_info_t *sandbox_info, bool interactive)
get_sandbox_debug_log(sandbox_info->sandbox_debug_log);
if (rc_file_exists(sandbox_info->sandbox_debug_log)) {
if (-1 == unlink(sandbox_info->sandbox_debug_log)) {
- sb_pwarn("could not unlink old debug log file");
+ sb_pwarn("could not unlink old debug log file: %s",
+ sandbox_info->sandbox_debug_log);
return -1;
}
}
@@ -88,7 +90,7 @@ static void print_sandbox_log(char *sandbox_log)
sandbox_log_file = sb_open(sandbox_log, O_RDONLY, 0);
if (-1 == sandbox_log_file) {
- sb_pwarn("could not open og file");
+ sb_pwarn("could not open log file: %s", sandbox_log);
return;
}
@@ -262,7 +264,7 @@ int main(int argc, char **argv)
dputs("Verification of the required files.");
if (!rc_file_exists(sandbox_info.sandbox_rc))
- sb_perr("could not open the sandbox rc file");
+ sb_perr("could not open the sandbox rc file: %s", sandbox_info.sandbox_rc);
/* set up the required environment variables */
dputs("Setting up the required environment variables.");