From 168852fea404ee85c52e47c129bd8956b099e551 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=B4=E6=95=8F=E6=9D=B0?= Date: Thu, 12 Jun 2025 08:08:24 +0000 Subject: [PATCH 1/2] =?UTF-8?q?bunzip2=E8=A7=A3=E5=8E=8B=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 吴敏杰 --- toys/other/bzcat.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/toys/other/bzcat.c b/toys/other/bzcat.c index f745344..f00f968 100644 --- a/toys/other/bzcat.c +++ b/toys/other/bzcat.c @@ -681,7 +681,11 @@ static void do_bunzip2(int fd, char *name) // Trim off .bz or .bz2 extension dotbz = name+len-3; if ((len>3 && !strcmp(dotbz, ".bz")) || (len>4 && !strcmp(--dotbz, ".bz2"))) - dotbz = 0; +#ifdef TOYBOX_OH_ADAPT + *dotbz = 0; +#else + dotba = 0; +#endif // For - no replace if (toys.optflags&FLAG_t) outfd = xopen("/dev/null", O_WRONLY); -- Gitee From 0e1c7d97aef125e2504fecb1be812204af6f490a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=B4=E6=95=8F=E6=9D=B0?= Date: Thu, 12 Jun 2025 08:41:42 +0000 Subject: [PATCH 2/2] grep MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 吴敏杰 --- toys/posix/grep.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/toys/posix/grep.c b/toys/posix/grep.c index 2f3c999..73249d3 100644 --- a/toys/posix/grep.c +++ b/toys/posix/grep.c @@ -375,7 +375,11 @@ static int lensort(struct arg_list **a, struct arg_list **b) static void parse_regex(void) { struct arg_list *al, *new, *list = NULL, **last; +#ifndef TOYBOX_OH_ADAPT char *s, *ss, *special = "\\.^$[()|*+?{"; +#else + char *s, *ss, *special = "\\.^$[()*+?{"; +#endif int len, ii, key; // Add all -f lines to -e list. (Yes, this is leaking allocation context for -- Gitee