Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.3 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 69A96C12002 for ; Thu, 15 Jul 2021 01:27:43 +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 68E1B613D0 for ; Thu, 15 Jul 2021 01:27:42 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 68E1B613D0 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=konsulko.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 8DD2481E1C; Thu, 15 Jul 2021 03:27:40 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=konsulko.com 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=konsulko.com header.i=@konsulko.com header.b="RFkP+8gO"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 98FB281E1C; Thu, 15 Jul 2021 03:27:38 +0200 (CEST) Received: from mail-qt1-x82a.google.com (mail-qt1-x82a.google.com [IPv6:2607:f8b0:4864:20::82a]) (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 CBE3C80608 for ; Thu, 15 Jul 2021 03:27:34 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=trini@konsulko.com Received: by mail-qt1-x82a.google.com with SMTP id d15so3344744qte.13 for ; Wed, 14 Jul 2021 18:27:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=WP14sY8QhkbweCF1L+4EiBb1dRFN1X4SF2iQRlgG6js=; b=RFkP+8gOYbr9tWxNj2UfQyVh2R5w+pIVBErotxKLILbNMiEjT1X7W6PrGGIgkhTvp4 aMEKhUbv4OcYFIOhU5pKHNIG4dmnY1NETQXwG680iEZxv8IaoOUmwgnT+AklrgsxcScu zldgMqLT8qoAsYleOWmahEvh4YlieBU8K6lgU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=WP14sY8QhkbweCF1L+4EiBb1dRFN1X4SF2iQRlgG6js=; b=Mb9yzO69ppdgRTqGDkcVDgVrlWj1A8DbecMlQthMT9wPjUuG9jORbZGEZpgFJWvaCG L7yiXe3VS6hXt35ABCtRa6Bd5g/3acZgf9tFG+sfe8MAIHMFQAwigLYYrLQbjVAVEaW9 7mW4EnX61HWOQht1S3J6MVwqRPYyIeuBhvO3vtZYWNwuQg62ZkKozIvZHO2biddhVMaw FgJwHDUscg0yrFdasxI0j8eHlJa5JfSmrYYMX9vTmrxj3Viqn2sK8gZzajFmL9AV0yx9 XIbkDdKL6/CVui0ML1fuEr63RCbD60RrWEIlpFkjtQlgihCHLBUfijiRexlak5TchNtC L2AA== X-Gm-Message-State: AOAM5335F5FydQDT8+auzkUt5g7PUTggQr+ujzCxdLShYNpxE1b3zWjr EGLYgfBGruoAWgSmO2N4EVejCw== X-Google-Smtp-Source: ABdhPJw2o4cnTL8ZVznUwbnVw3TE60c002zUcM2HHoZ8r/kfCPRgzzkyR57fVBw3f30ZQm+X5jMpeg== X-Received: by 2002:ac8:4241:: with SMTP id r1mr1037841qtm.121.1626312453654; Wed, 14 Jul 2021 18:27:33 -0700 (PDT) Received: from bill-the-cat (2603-6081-7b01-cbda-715c-901d-db03-e6e4.res6.spectrum.com. [2603:6081:7b01:cbda:715c:901d:db03:e6e4]) by smtp.gmail.com with ESMTPSA id h10sm1503287qta.74.2021.07.14.18.27.32 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 14 Jul 2021 18:27:32 -0700 (PDT) Date: Wed, 14 Jul 2021 21:27:31 -0400 From: Tom Rini To: yann.dirson@blade-group.com Cc: u-boot@lists.denx.de, Yann Dirson Subject: Re: [PATCH] mkimage: allow -l to work on block devices on Linux Message-ID: <20210715012731.GJ9516@bill-the-cat> References: <20210518085904.1966773-1-yann@blade-group.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="Wkk4GRjB0hXhWKMS" Content-Disposition: inline In-Reply-To: <20210518085904.1966773-1-yann@blade-group.com> X-Clacks-Overhead: GNU Terry Pratchett User-Agent: Mutt/1.9.4 (2018-02-28) X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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 --Wkk4GRjB0hXhWKMS Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, May 18, 2021 at 10:59:04AM +0200, yann.dirson@blade-group.com wrote: > From: Yann Dirson >=20 > When "mkimage -l" was run on a block device it would fail with > erroneous message, because fstat reports a size of zero for those: >=20 > mkimage: Bad size: "/dev/sdb4" is not valid image >=20 > This patch identifies the "is a block device" case and reports it as > such, and if it knows how to determine the size of a block device on > the current OS, proceeds. >=20 > As shown in > http://www.mit.edu/afs.new/sipb/user/tytso/e2fsprogs/lib/blkid/getsize.c > this is no portable task, and I only handled the case of a modern > Linux kernel, which is what I can test. >=20 > Signed-off-by: Yann Dirson Applied to u-boot/master, thanks! --=20 Tom --Wkk4GRjB0hXhWKMS Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmDvjwAACgkQFHw5/5Y0 tyyq7wwAiYy5P95US7LRDIiNkexx8QnnE+FEObfq/0qkBP9C8HdhZTc0lDW8uUG+ mg4MDtVw7vgRmOWybzexD6MbOsgD7Dmbshyt9oWeiZfT9rT495qxgAwY1+EiDWuQ Wg27hPFwq9KFd5u3twZXCzWy/umqEA7TDA/+6hiG52sVQuC++reyipZ4EPbWjUOP K5oRZGvOyrhQUfruZNLdZdJddxqIbdLx75NYmhbo4ty7St807dBhNAmR9VGo0X6e f3VMeK7Bc6MURkdj7gpFKVz3ocTCGd6viw9K/asT8CGPiSrmbDtuhlyATvsTi+7+ ob7i8ohgQAMZhQ1xqVoE/ixoe98hgeCMbQAYUZOtEsv1ALEmSW3smpCKqPi+Fxpy 3MjHPTCR4lp8DC79QSNlRyeLtYzd4I9Zf0KxpGltwGR5O6vVE09cjkvIV1T6uDZY V/FcaWzuhjsnZB/ala+naMtzCblwDJXwnBHnx5etejoxQKyoM0UIO3i3ca8/v6sa mIemI0rK =u6Ve -----END PGP SIGNATURE----- --Wkk4GRjB0hXhWKMS--