public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/sandbox:master commit in: src/, libsbutil/, etc/, tests/
@ 2012-06-23 21:21 Mike Frysinger
  0 siblings, 0 replies; only message in thread
From: Mike Frysinger @ 2012-06-23 21:21 UTC (permalink / raw
  To: gentoo-commits

commit:     a7f12a1d89aa3d7810996330b79acc577f3a558e
Author:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Mon Jun 18 03:47:04 2012 +0000
Commit:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Sat Jun 23 21:12:36 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/sandbox.git;a=commit;h=a7f12a1d

sandbox: drop beep support

Almost no one has beep support turned on anymore, and ebeep in the main
tree has been deprecated (meaning it wasn't found useful while building
packages).  So punt support for it from sandbox too.

Signed-off-by: Mike Frysinger <vapier <AT> gentoo.org>

---
 etc/sandbox.conf   |    6 ------
 libsbutil/sbutil.h |    3 ---
 src/environ.c      |    1 -
 src/sandbox.c      |   15 +--------------
 tests/local.at     |    1 -
 5 files changed, 1 insertions(+), 25 deletions(-)

diff --git a/etc/sandbox.conf b/etc/sandbox.conf
index 6ad1c15..dc460f0 100644
--- a/etc/sandbox.conf
+++ b/etc/sandbox.conf
@@ -22,12 +22,6 @@
 #  operations caught by sandbox.  Default is "no"
 #SANDBOX_DEBUG="no"
 
-# SANDBOX_BEEP
-#
-#  The amount of beeps sandbox will issue when it exits with access violations
-#  after printing the normal log.  Default is "3"
-#SANDBOX_BEEP=3
-
 # NOCOLOR
 #
 #  Determine the use of color in the output.  Default is "false" (ie, use color)

diff --git a/libsbutil/sbutil.h b/libsbutil/sbutil.h
index bdff33f..ad9ce25 100644
--- a/libsbutil/sbutil.h
+++ b/libsbutil/sbutil.h
@@ -57,7 +57,6 @@ extern const char env_sandbox_testing[];
 #define ENV_SANDBOX_PREDICT    "SANDBOX_PREDICT"
 
 #define ENV_SANDBOX_ON         "SANDBOX_ON"
-#define ENV_SANDBOX_BEEP       "SANDBOX_BEEP"
 
 #define ENV_SANDBOX_PID        "SANDBOX_PID"
 #define ENV_SANDBOX_ABORT      "SANDBOX_ABORT"
@@ -66,8 +65,6 @@ extern const char env_sandbox_testing[];
 #define ENV_SANDBOX_ACTIVE     "SANDBOX_ACTIVE"
 #define SANDBOX_ACTIVE         "armedandready"
 
-#define DEFAULT_BEEP_COUNT     3
-
 #define SB_BUF_LEN             2048
 
 #define COLOR_NORMAL           "\033[0m"

diff --git a/src/environ.c b/src/environ.c
index 8f4968f..45bf9a6 100644
--- a/src/environ.c
+++ b/src/environ.c
@@ -188,7 +188,6 @@ static int setup_cfg_vars(struct sandbox_info_t *sandbox_info)
 {
 	setup_cfg_var(ENV_SANDBOX_VERBOSE);
 	setup_cfg_var(ENV_SANDBOX_DEBUG);
-	setup_cfg_var(ENV_SANDBOX_BEEP);
 	setup_cfg_var(ENV_NOCOLOR);
 
 	if (-1 == setup_access_var(ENV_SANDBOX_DENY))

diff --git a/src/sandbox.c b/src/sandbox.c
index a8e28fe..0fda106 100644
--- a/src/sandbox.c
+++ b/src/sandbox.c
@@ -85,8 +85,7 @@ static int setup_sandbox(struct sandbox_info_t *sandbox_info, bool interactive)
 
 static void print_sandbox_log(char *sandbox_log)
 {
-	int sandbox_log_file, beep_count;
-	char *beep_count_env;
+	int sandbox_log_file;
 	size_t len;
 	char buffer[1024];
 
@@ -114,18 +113,6 @@ static void print_sandbox_log(char *sandbox_log)
 	sb_close(sandbox_log_file);
 
 	SB_EERROR("--------------------------------------------------------------------------------", "\n");
-
-	beep_count_env = getenv(ENV_SANDBOX_BEEP);
-	if (beep_count_env)
-		beep_count = atoi(beep_count_env);
-	else
-		beep_count = DEFAULT_BEEP_COUNT;
-
-	while (beep_count--) {
-		fputc('\a', stderr);
-		if (beep_count)
-			sleep(1);
-	}
 }
 
 static void stop(int signum)

diff --git a/tests/local.at b/tests/local.at
index da44b76..f937ff1 100644
--- a/tests/local.at
+++ b/tests/local.at
@@ -5,7 +5,6 @@ dnl any of the tempdirs.  Same goes for predict access, but this is
 dnl due to the default PM test env having that predict.
 m4_defun([SB_RUN],[\
 	env \
-		SANDBOX_BEEP=0 \
 		SANDBOX_LOG="$PWD/sandbox.log" \
 		sandbox.sh \
 			addpredict / \; \



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2012-06-23 21:22 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-23 21:21 [gentoo-commits] proj/sandbox:master commit in: src/, libsbutil/, etc/, tests/ Mike Frysinger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox