From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 96711C433EF for ; Fri, 19 Nov 2021 20:26:09 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id EB0F961AA2 for ; Fri, 19 Nov 2021 20:26:08 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org EB0F961AA2 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id CFA6E83772; Fri, 19 Nov 2021 21:25:24 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="kz2otyTh"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 3B645835B4; Fri, 19 Nov 2021 21:24:48 +0100 (CET) Received: from mail-ot1-x331.google.com (mail-ot1-x331.google.com [IPv6:2607:f8b0:4864:20::331]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 3A28283744 for ; Fri, 19 Nov 2021 21:24:28 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-ot1-x331.google.com with SMTP id z2-20020a9d71c2000000b0055c6a7d08b8so18480525otj.5 for ; Fri, 19 Nov 2021 12:24:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=+u/qiZ83Vzp2Q5NfhWQovrXKF2mwZHQnn03OoaUtKaI=; b=kz2otyThO/26244K/AM2C6+h+7esnubxjrtvuat5Q+ZLfQ6UoPZVGKj011cq1BNzqE lsoHOhEGd5/CJHOXYLhFTk57/IGsTX9xFbAdzmIWzuEziuP0Z8+g24xXJ5C382uDfT7V Rvw9p/mxtooWprv9+uBTqIzXcPc9G2pqp1Ywg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=+u/qiZ83Vzp2Q5NfhWQovrXKF2mwZHQnn03OoaUtKaI=; b=TPh6M1uRqHGEgJ7DctuwcfdVT4uX4Xgue4ed0cMGw1ZwS8wh5nIyXqMHrrsMNIUeHf hSWi9Xym6F8QOK18bbiuCyAPjs9s5yG7CWFLRihlK4W2vy4OykrOtbyqhG2UjJHycQVD XNC/6MgaGGbMlENmN9pHkNKreqdbZtKBmGyJUGGAFzBwBN+Qp6KFdmUto5FlLFZAi1x8 Dg0OM0BlarjGU8BSANYzcbPV7OcFKTXswVCpdVCiQuYSaf7P8SfQqCXgXxgRR80OvAmF 3U0WW7+fyOyzcbwRiVxHkg721riP3FkEKFtlhKwD65s7Y4gsmp0BzjJdnaLchoc835gC Bg3g== X-Gm-Message-State: AOAM531/CxoDcslMcTkeklw7VGMd1Ie72MKiUKzl4SvvQwKZcsGJEK0Q p2e9HCEdOIzW214rTWTTupHXJOxd2MQ69g== X-Google-Smtp-Source: ABdhPJxYSdzsyqRtlApzUBOfLBcgh1E+o5uj2mbdJ2Rc/i0vsaAbEWk0ghuUg3ZARBYNcaWeQi7ZMQ== X-Received: by 2002:a9d:6541:: with SMTP id q1mr3864651otl.342.1637353466623; Fri, 19 Nov 2021 12:24:26 -0800 (PST) Received: from kiwi.bld.corp.google.com (c-67-190-101-114.hsd1.co.comcast.net. [67.190.101.114]) by smtp.gmail.com with ESMTPSA id bl33sm197093oib.47.2021.11.19.12.24.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Nov 2021 12:24:26 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Cc: Anatolij Gustschin , Tom Rini , Simon Glass Subject: [PATCH 08/23] sandbox: Enable support for the gzip command Date: Fri, 19 Nov 2021 13:23:52 -0700 Message-Id: <20211119202408.1815506-9-sjg@chromium.org> X-Mailer: git-send-email 2.34.0.rc2.393.gf8c9666880-goog In-Reply-To: <20211119202408.1815506-1-sjg@chromium.org> References: <20211119202408.1815506-1-sjg@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.37 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean This does not work with sandbox at present. Fix it up to use map_sysmem() to convert an address to a pointer. Signed-off-by: Simon Glass --- cmd/unzip.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cmd/unzip.c b/cmd/unzip.c index 3d1f5f3ac10..bc6cee06043 100644 --- a/cmd/unzip.c +++ b/cmd/unzip.c @@ -8,6 +8,7 @@ #include #include #include +#include #include static int do_unzip(struct cmd_tbl *cmdtp, int flag, int argc, @@ -28,7 +29,8 @@ static int do_unzip(struct cmd_tbl *cmdtp, int flag, int argc, return CMD_RET_USAGE; } - if (gunzip((void *) dst, dst_len, (void *) src, &src_len) != 0) + if (gunzip(map_sysmem(dst, dst_len), dst_len, map_sysmem(src, 0), + &src_len) != 0) return 1; printf("Uncompressed size: %lu = 0x%lX\n", src_len, src_len); -- 2.34.0.rc2.393.gf8c9666880-goog