Message ID | 20201222140914.9933-3-m.szyprowski@samsung.com |
---|---|
State | Superseded |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:a02:85a7:0:0:0:0:0 with SMTP id d36csp5357716jai; Tue, 22 Dec 2020 06:10:01 -0800 (PST) X-Google-Smtp-Source: ABdhPJw4G0dHnxrUnUqcKWE7UnQMHhngJCqD9kjMfyNFLKt1J3fZk5tffN2aJMdgEnYoSuOpHrfw X-Received: by 2002:a50:8163:: with SMTP id 90mr20126238edc.142.1608646201308; Tue, 22 Dec 2020 06:10:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608646201; cv=none; d=google.com; s=arc-20160816; b=LAxJdgoCY1CsnFK77MkkY1xXkE8AA2FY0gBLBT/tKfqYBdBX4r+5h1TAgTfQ7W/dfG XiXCher/7/hG/dpPaRc5k7F3vT10CO6+p7RcJ9LG4WFzalWR4KpBQyUCDzOnOaX1XHGX TXfzK+2nlawc1+Clfnk68dcIxGeLY6tI6HrdUrSAzTPW1Sv7J3oaGVAC9WdLGiRDquVH MjsUDh9vpFn2HL89aSDDLeS3UWcSj6ujyR/vVCFE/MY9hQQagMoYhZ9dBEm76MVSg7md bxZMK6JepfIyp4fuS+4nn9KTvVqVjPDUlzv+lwIg330JAYC+vbhFv+RTEjL2qWZZfvGW ngFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:references:cms-type:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature:dkim-filter; bh=Ugopsy/ZxytmB8ap3xn0lUro0TDiqP7g+knq07e92AU=; b=qHwdqY+NdghOmAaUr+vv2wMa7GYR5d/V8op9zNEqpYV+J6dEORxBWlo9G7ta4uGRlg 81yYNHQuVnkKYFSF/e0wU5BQn72nP5AYMlDgamejdMmWS5EkyL7T4/38wfSop8gzsTev RWq+cb2ipduOIUXEv4R9iwq2dMvVo13eS6haB29JpUpSlwel0irtWtkDmKLrs7VKd+h9 DDyBSeGlkcDtjZ5+R/U+PZ6UVBXZ4O74eOKLAF6Mxgvkm8ZAO/wN93elGKdRNcHVIQ8/ 4IrkHNpn1l4oy311v1iTXZV7WP8dd38mk88xdmzv4/06JR6AqcIXSJO/tA52BomqeTWS m2Fw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=KtQXOdgN; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: <u-boot-bounces@lists.denx.de> Received: from phobos.denx.de (phobos.denx.de. [2a01:238:438b:c500:173d:9f52:ddab:ee01]) by mx.google.com with ESMTPS id s23si10321166ejf.192.2020.12.22.06.09.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 22 Dec 2020 06:10:01 -0800 (PST) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; Authentication-Results: mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=KtQXOdgN; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 9F68A82A92; Tue, 22 Dec 2020 15:09:55 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=samsung.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=samsung.com header.i=@samsung.com header.b="KtQXOdgN"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id D3D3382ACE; Tue, 22 Dec 2020 15:09:52 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-7.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_HI, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mailout1.w1.samsung.com (mailout1.w1.samsung.com [210.118.77.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id C7C4782A92 for <u-boot@lists.denx.de>; Tue, 22 Dec 2020 15:09:49 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=samsung.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=m.szyprowski@samsung.com Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20201222140949euoutp019510096fa9234b6b029ee6ce89aae291~TDy_qqq322282222822euoutp01b for <u-boot@lists.denx.de>; Tue, 22 Dec 2020 14:09:49 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20201222140949euoutp019510096fa9234b6b029ee6ce89aae291~TDy_qqq322282222822euoutp01b DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1608646189; bh=Ugopsy/ZxytmB8ap3xn0lUro0TDiqP7g+knq07e92AU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KtQXOdgNtzqlq5wd3EwvZBfiJXB3NXRS0HrTV1NVadl7vJWUK4NqTFrBp0auZ/Apw c2MByPe58fmZm/21q143BhQpG8rYozt9am/WzGNStauGRLwbPMkoavDZfsf2b4TLGC 08yET/Po0EL2RiDSnnBGA2AOmUOMjmn981gV/U0g= Received: from eusmges1new.samsung.com (unknown [203.254.199.242]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20201222140948eucas1p1dddbaf0634049030a1fd07f3f6ff32f4~TDy_Q-rhg0660906609eucas1p1O; Tue, 22 Dec 2020 14:09:48 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges1new.samsung.com (EUCPMTA) with SMTP id DC.C5.27958.C2EF1EF5; Tue, 22 Dec 2020 14:09:48 +0000 (GMT) Received: from eusmtrp1.samsung.com (unknown [182.198.249.138]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20201222140948eucas1p1cf6eb463b42c4f9c5c34e886e1c36b85~TDy925EjN0662506625eucas1p1E; Tue, 22 Dec 2020 14:09:48 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp1.samsung.com (KnoxPortal) with ESMTP id 20201222140948eusmtrp1257b214f939f398098f06e8ecf101c84~TDy9zr5Dj0854808548eusmtrp1R; Tue, 22 Dec 2020 14:09:48 +0000 (GMT) X-AuditID: cbfec7f2-f15ff70000006d36-80-5fe1fe2ca5a2 Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id 63.37.16282.C2EF1EF5; Tue, 22 Dec 2020 14:09:48 +0000 (GMT) Received: from AMDC2765.digital.local (unknown [106.120.51.73]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20201222140947eusmtip11dad5c34cb41a8bb405f742faa55e64c~TDy9bIZgp0857608576eusmtip1F; Tue, 22 Dec 2020 14:09:47 +0000 (GMT) From: Marek Szyprowski <m.szyprowski@samsung.com> To: u-boot@lists.denx.de Cc: Marek Szyprowski <m.szyprowski@samsung.com>, Lukasz Majewski <lukma@denx.de>, Simon Glass <sjg@chromium.org>, Heinrich Schuchardt <xypron.glpk@gmx.de>, Jaehoon Chung <jh80.chung@samsung.com>, Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Subject: [PATCH v2 2/6] disk: dos: add some defines for the hardcoded numbers Date: Tue, 22 Dec 2020 15:09:10 +0100 Message-Id: <20201222140914.9933-3-m.szyprowski@samsung.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201222140914.9933-1-m.szyprowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrPIsWRmVeSWpSXmKPExsWy7djP87o6/x7GGzR26FtsnLGe1eLGrzZW i+fvLjNZrD1yl93i25ZtjBZv93ayWxye+oHRgd1jdsNFFo95s06weHz4GOdx9s4ORo++LasY A1ijuGxSUnMyy1KL9O0SuDLebFrNWNDJVfH15xbWBsa5HF2MnBwSAiYSXduaWbsYuTiEBFYw SvTffw3lfGGUmPTwBZTzmVFi77E+ZpiW9t3dLBCJ5YwSR14eZINrmTVjGSNIFZuAoUTX2y42 EFtEQELiV/9VRpAiZoF/jBIHf30EmsvBISzgL/H5QTlIDYuAqsTUrr1gG3gFbCS+LP3ABrFN XmL1hgNgcU4BW4ljL+4wg8yREJjJIXHr5zYmiCIXieYd8xghbGGJV8e3sEPYMhKnJ/ewQDQ0 M0o8PLeWHcLpYZS43DQDqsNa4s65X2wgFzELaEqs36UPEXaUOPrnM9ihEgJ8EjfeCoKEmYHM SdumM0OEeSU62oQgqtUkZh1fB7f24IVL0NDykLj25x0riC0kMIFR4t/kkAmM8rMQdi1gZFzF KJ5aWpybnlpsmJdarlecmFtcmpeul5yfu4kRmCZO/zv+aQfj3Fcf9Q4xMnEwHmKU4GBWEuE1 k7ofL8SbklhZlVqUH19UmpNafIhRmoNFSZx31ew18UIC6YklqdmpqQWpRTBZJg5OqQamWR0i 6Qvma+S9O+/x7b3InX0xN41sFqsWBxXbJz7ZUSkudkNNpLXBxP78ct5XYbs9NH3ls7ruuhz5 la1aNylnsr7If5/gbbP4b2w7/7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P6lMmn5O0XnnVS2+Xbu+PLNrD7mw tdR1od3M8/IpK6zWbBU/fd1p9v4lJ972aFSuL4l9Ye68hSvkclxPZP76YJ3v/hYH5+yXPPjf UWFNG/fiEsUQDgWVr3WqZX13fx1j3RwSpndyhbvly/vs+Qbcb5Z8YJwYIMWeGbVn0yr/sFc+ 6awiZ+uiTA69C4+f4y4uf1mJpTgj0VCLuag4EQDFuwuq4QIAAA== X-CMS-MailID: 20201222140948eucas1p1cf6eb463b42c4f9c5c34e886e1c36b85 X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20201222140948eucas1p1cf6eb463b42c4f9c5c34e886e1c36b85 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20201222140948eucas1p1cf6eb463b42c4f9c5c34e886e1c36b85 References: <20201222140914.9933-1-m.szyprowski@samsung.com> <CGME20201222140948eucas1p1cf6eb463b42c4f9c5c34e886e1c36b85@eucas1p1.samsung.com> X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion <u-boot.lists.denx.de> List-Unsubscribe: <https://lists.denx.de/options/u-boot>, <mailto:u-boot-request@lists.denx.de?subject=unsubscribe> List-Archive: <https://lists.denx.de/pipermail/u-boot/> List-Post: <mailto:u-boot@lists.denx.de> List-Help: <mailto:u-boot-request@lists.denx.de?subject=help> List-Subscribe: <https://lists.denx.de/listinfo/u-boot>, <mailto:u-boot-request@lists.denx.de?subject=subscribe> Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" <u-boot-bounces@lists.denx.de> X-Virus-Scanned: clamav-milter 0.102.3 at phobos.denx.de X-Virus-Status: Clean |
Series |
Add MBR partition table creation and verify command
|
expand
|
diff --git a/disk/part_dos.c b/disk/part_dos.c index ef706fb59c..20d35dc9cd 100644 --- a/disk/part_dos.c +++ b/disk/part_dos.c @@ -42,9 +42,9 @@ static inline unsigned int le32_to_int(unsigned char *le32) static inline int is_extended(int part_type) { - return (part_type == 0x5 || - part_type == 0xf || - part_type == 0x85); + return (part_type == DOS_PART_TYPE_EXTENDED || + part_type == DOS_PART_TYPE_EXTENDED_LBA || + part_type == DOS_PART_TYPE_EXTENDED_LINUX); } static int get_bootable(dos_partition_t *p) diff --git a/disk/part_dos.h b/disk/part_dos.h index 434b021ae8..dd909a9317 100644 --- a/disk/part_dos.h +++ b/disk/part_dos.h @@ -15,6 +15,9 @@ #define DOS_PBR_MEDIA_TYPE_OFFSET 0x15 #define DOS_MBR 0 #define DOS_PBR 1 +#define DOS_PART_TYPE_EXTENDED 0x05 +#define DOS_PART_TYPE_EXTENDED_LBA 0x0F +#define DOS_PART_TYPE_EXTENDED_LINUX 0x85 typedef struct dos_partition { unsigned char boot_ind; /* 0x80 - active */
Add some handy defines for some hardcoded magic numbers related to extended partition handling. Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> --- disk/part_dos.c | 6 +++--- disk/part_dos.h | 3 +++ 2 files changed, 6 insertions(+), 3 deletions(-) -- 2.17.1