From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from relay7-d.mail.gandi.net ([217.70.183.200]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1l6JBP-0004Ca-Gv for barebox@lists.infradead.org; Sun, 31 Jan 2021 20:18:58 +0000 Received: from geraet.fritz.box (unknown [87.123.110.69]) (Authenticated sender: ahmad@a3f.at) by relay7-d.mail.gandi.net (Postfix) with ESMTPSA id 79B2220005 for ; Sun, 31 Jan 2021 20:18:54 +0000 (UTC) From: Ahmad Fatoum Date: Sun, 31 Jan 2021 21:18:44 +0100 Message-Id: <20210131201846.3440477-6-ahmad@a3f.at> In-Reply-To: <20210131201846.3440477-1-ahmad@a3f.at> References: <20210131201846.3440477-1-ahmad@a3f.at> MIME-Version: 1.0 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Sender: "barebox" Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: [PATCH 5/7] commands: add beep command To: barebox@lists.infradead.org QWRkIGEgYmVlcCBjb21tYW5kIHRoYXQncyBjb21wYXRpYmxlIHdpdGggR1JVQidzCgogIHBsYXkg InRlbXBvIHBpdGNoMSBkdXJhdGlvbjEuLi4iCgpVbmxpa2UgdGhlIEdSVUIgY29tbWFuZCwgcGxh eWluZyBhIHR1bmUgaXMgbm90IGEgYmxvY2tpbmcgb3BlcmF0aW5nLgpGb3IgdGhpcyByZWFzb24g YmFyZWJveCwgYWRkaXRpb25hbGx5IHN1cHBvcnRzOgogICogLXc6IHdhaXQgdW50aWwgdHVuZSBp cyBvdmVyCiAgKiAtYzogY2FuY2VsIHBsYXlpbmcgdHVuZQoKQWRkaXRpb25hbGx5LCBgYmVlcCB0 ZW1wb2AgY2FuIGJlIHVzZWQgdG8gcmluZyB0aGUgYmVsbCBhdCBhIGZyZXF1ZW5jeQpjaG9zZW4g YnkgdGhlIHNvdW5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