aboutsummaryrefslogtreecommitdiffstats
path: root/main/busybox/0002-add-config-knob-for-default-freq-and-length.patch
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2009-08-21 14:10:17 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2009-08-21 14:10:17 +0000
commit49215dddb6eb715823be0e4b21bba37a8fd55ad3 (patch)
tree13e4ac2131400d03a673aac9d5f475bae6829198 /main/busybox/0002-add-config-knob-for-default-freq-and-length.patch
parent4f53083405e28b13463689bc983289d477b0ea35 (diff)
downloadaports-49215dddb6eb715823be0e4b21bba37a8fd55ad3.tar.bz2
aports-49215dddb6eb715823be0e4b21bba37a8fd55ad3.tar.xz
busybox: backport the beep applet from git
Diffstat (limited to 'main/busybox/0002-add-config-knob-for-default-freq-and-length.patch')
-rw-r--r--main/busybox/0002-add-config-knob-for-default-freq-and-length.patch79
1 files changed, 79 insertions, 0 deletions
diff --git a/main/busybox/0002-add-config-knob-for-default-freq-and-length.patch b/main/busybox/0002-add-config-knob-for-default-freq-and-length.patch
new file mode 100644
index 0000000000..5055ae874a
--- /dev/null
+++ b/main/busybox/0002-add-config-knob-for-default-freq-and-length.patch
@@ -0,0 +1,79 @@
+From b2e8817293648eac825ef64be4604af505b65d65 Mon Sep 17 00:00:00 2001
+From: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
+Date: Fri, 21 Aug 2009 14:40:29 +0200
+Subject: [PATCH 2/2] add config knob for default freq and length
+
+Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
+---
+ miscutils/Config.in | 16 ++++++++++++++++
+ miscutils/beep.c | 12 ++++++++++--
+ scripts/defconfig | 3 +++
+ 3 files changed, 29 insertions(+), 2 deletions(-)
+
+diff --git a/miscutils/Config.in b/miscutils/Config.in
+index e56a3fc..f2104bb 100644
+--- a/miscutils/Config.in
++++ b/miscutils/Config.in
+@@ -25,6 +25,22 @@ config BEEP
+ help
+ The beep applets beeps in a given freq/Hz.
+
++config FEATURE_BEEP_FREQ
++ int "default frequency"
++ range 0 2147483647
++ default 4000
++ depends on BEEP
++ help
++ Frequency for default beep.
++
++config FEATURE_BEEP_LENGTH
++ int "default length"
++ range 0 2147483647
++ default 30
++ depends on BEEP
++ help
++ Length in ms for default beep.
++
+ config CHAT
+ bool "chat"
+ default n
+diff --git a/miscutils/beep.c b/miscutils/beep.c
+index d5c3531..79e7547 100644
+--- a/miscutils/beep.c
++++ b/miscutils/beep.c
+@@ -19,8 +19,16 @@
+ #define OPT_d (1<<2)
+ #define OPT_r (1<<3)
+ /* defaults */
+-#define FREQ (4440)
+-#define LENGTH (50)
++#ifndef CONFIG_FEATURE_BEEP_FREQ
++# define FREQ (4000)
++#else
++# define FREQ (CONFIG_FEATURE_BEEP_FREQ)
++#endif
++#ifndef CONFIG_FEATURE_BEEP_LENGTH
++# define LENGTH (30)
++#else
++# define LENGTH (CONFIG_FEATURE_BEEP_LENGTH)
++#endif
+ #define DELAY (0)
+ #define REPETITIONS (1)
+
+diff --git a/scripts/defconfig b/scripts/defconfig
+index f991363..d7cef7c 100644
+--- a/scripts/defconfig
++++ b/scripts/defconfig
+@@ -554,6 +554,9 @@ CONFIG_FEATURE_MOUNT_LOOP=y
+ #
+ CONFIG_ADJTIMEX=y
+ # CONFIG_BBCONFIG is not set
++CONFIG_BEEP=y
++CONFIG_FEATURE_BEEP_FREQ=4000
++CONFIG_FEATURE_BEEP_LENGTH=30
+ CONFIG_CHAT=y
+ CONFIG_FEATURE_CHAT_NOFAIL=y
+ # CONFIG_FEATURE_CHAT_TTY_HIFI is not set
+--
+1.6.4
+