From patchwork Tue Jun 9 15:20:21 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefano Babic X-Patchwork-Id: 1306035 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=googlegroups.com (client-ip=2a00:1450:4864:20::53a; helo=mail-ed1-x53a.google.com; envelope-from=swupdate+bncbcxploxj6ikrbpgr733akgqenhlyn2a@googlegroups.com; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=googlegroups.com header.i=@googlegroups.com header.a=rsa-sha256 header.s=20161025 header.b=TsyRDXpP; dkim-atps=neutral Received: from mail-ed1-x53a.google.com (mail-ed1-x53a.google.com [IPv6:2a00:1450:4864:20::53a]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49hDMj4crPz9sRW for ; Wed, 10 Jun 2020 01:20:32 +1000 (AEST) Received: by mail-ed1-x53a.google.com with SMTP id t23sf8381263edq.5 for ; Tue, 09 Jun 2020 08:20:32 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1591716028; cv=pass; d=google.com; s=arc-20160816; b=bt6qQesvbRuZ70OrSQl2URm32S0wn98Va93wZCqnwbZ74WU+q8bP+I4jM7A6z3uYQf TI7juZBUCvEmkbAs5R9tFdvOWi7Q+ysW7gDcpSjGkx5/T2jzIvmiN0bMn6qD9sn/gW9c /ez8NgZ/YF7LYqwgd0ULSCOUEqfqFZBCeDLmJBRWCyQt5ZSLJ2UqMeOqN++jaCY1jgvk Ru/nWD9H9ylpad3C0P8yVE9zYqLGGlGfIbVU6Y+LlNSyA7HcnNUiIH1qGrBQs0gv4+Ec kiBVuPq8dPOVbZZtLZ7tFhEliZiy7JSgaOniF/n1g0GaWzSOhF2oRXsmvOhTnAJPcchs otEQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:mime-version:message-id:date :subject:cc:to:from:sender:dkim-signature; bh=JAMB2vndryDOLpvVmcUgTcZf2QIFczgWMRp3taguLyA=; b=WK8M1ThPTuXq4kKhG35R0mjE8EQhMSsfT1EPtl1suFtSBTmKujkJL/n1cZ6B4T40sr BKlY7rTnsRT/yHXgGGbVAasPVPoI3KX37XjX65Hz5BNR+t5EY+GJqiftafU6qkBzo4kp 1xkTrptEjBoB/onhQ6NmqG0j8+9k4UVjWYSogyxZyF2i6pvICtP7y+aeXtFhMfdinQYR ONurGMg6IuUDUExXUbm6EEfmUefUB6oe7yIJpL/8J1fHGJeDR/z0c5MSUOrpaRmWka7A FEHy7AIHYC7Uhr7U9+md2i1TqaiOfNe8xCteJsH9WlKPksbKUxC0KMLrcIYHRCO2HEIl 5TaQ== ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=neutral (google.com: 212.18.0.9 is neither permitted nor denied by best guess record for domain of sbabic@denx.de) smtp.mailfrom=sbabic@denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:mime-version :x-original-sender:x-original-authentication-results:precedence :mailing-list:list-id:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=JAMB2vndryDOLpvVmcUgTcZf2QIFczgWMRp3taguLyA=; b=TsyRDXpP1Luj4NWjhvYbu9s3PC93eWHJHjxx8okonT2xQwk+DUIbhPwswv+5cX0oiT m5mwIOBexGF9C2V9sA0cVe6rDtJ9bz0+hopfFuYmlPAtBIWR69wxmNZlATdA2yIlyoDz wZ3E4lJueK93c45O8Hg46AtfMSOPHBhyZ4OyTuGFeJjycpp+Bu4T8ehE1vd770JzYDXm LwXurucXr9WAGP+VqaGNEIqtEZBq3sAPCSA1dJofGhRIfqnJOZxbzjw7yXFs5BCNgy3j g9pagLiAunB8H4UEYKoU/Bfpm+M/+OBtZdEJj0Mb7X24AQAPJL7YrTTTReLE63nXQCsF nSRg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=sender:x-gm-message-state:from:to:cc:subject:date:message-id :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:x-spam-checked-in-group:list-post :list-help:list-archive:list-subscribe:list-unsubscribe; bh=JAMB2vndryDOLpvVmcUgTcZf2QIFczgWMRp3taguLyA=; b=Z65/LVixAwLlpxcV5YKY1IJ0D1SiR5j6TQGAJSHsx/1LcrZgZgcgT5HW9Z2YD16JdQ dczybRu5cnKJSr5xfBLGvYh4oNeecXZRlZsFqeS6RTFnGten/LqRgrt3nH2JVCAqu0ar oAYaO4sgTUhLATr1rVzMhhxZMZMTc9sQBJLvniYpFr1qZmGLQosl0gj+66cij1nQrPpM wpEKsflidAmXwmcYuBm0valxvj5dmt6c72AEmAeaM1sXFFSs6IIc3uHaiwTNT+M7HmSB 2OgUzkl0oCp4I2sbeT02l4xmRV0MA++qzjligHpIhJ6j1ZjV88mt41lM9v5sLpcr4ZW9 1thw== Sender: swupdate@googlegroups.com X-Gm-Message-State: AOAM532sgEKDKCsQWj2gFLLmsz/j7soa6xcv1wYQQaAF7sayjNPVqbH+ 2glmzp/amDzvpupSWjx5ilI= X-Google-Smtp-Source: ABdhPJw5GzuVTGYV1BVGjY8d0t3mLHDC8siJrrG2yw2XTh9gsM1sjF85Zyr2VnVnRWbr7a7Z3GRJuQ== X-Received: by 2002:a17:906:f53:: with SMTP id h19mr25422620ejj.343.1591716028474; Tue, 09 Jun 2020 08:20:28 -0700 (PDT) X-BeenThere: swupdate@googlegroups.com Received: by 2002:a17:906:84a:: with SMTP id f10ls9257187ejd.10.gmail; Tue, 09 Jun 2020 08:20:27 -0700 (PDT) X-Received: by 2002:a17:906:9397:: with SMTP id l23mr27425174ejx.79.1591716027632; Tue, 09 Jun 2020 08:20:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591716027; cv=none; d=google.com; s=arc-20160816; b=T8o0BrQLpBApRJx2roCTXg4kyaCi4X7z3hjAdx/6P9lh6+gk2p+LZkdB/2HJOeSqcx tlJNDXQeydZoT5/kfpL0xneau7LrKdOrl3doR5eEuUAOAIRoETcilc23vJViyHf1pbBa oZ/bRhWUZYGJ4KhCx7a6Lyb/dbmYD5qr+R86TY4z3+WUyQlE5bCuWreORcr3LJmTXYNh LzgKduxtgiH8NWe1G8xZKzpmu08A9W/5SNHPL2lBE/DN7AF9BHw+w4QQZwqNBLxLjmTx wa22hkBYLFfhxprR01MIwNPYeh2ZRchj2ObpD8evEHcylgwS2X2aMXrBUPknB8YxoEqd f1tQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from; bh=w0xnpiRzB++8gaHDD796aeGn6jSinSG0cnVuz7SWoXw=; b=O0lDAA+tXKvRdS/CwY0FY01ZqhOKC2unugX+xrHdOmk/iNk7zVcj0aBTnqPdBE0g6d ULhbmGp4Sovn/tIb39mfqkn8z+fbZ8UqoHEwvefZhDqNSe7xE+4N/G+sgGLQBPChiggS 6WOm+duVgNE/natRcSmsv4dht+FeswPMtMswfgUxiaRlHcHhUOEKo/7gesmA/wfOHxy+ 80A7C15I5gSXRKTZtTXOCO7OfOjJzIX7TlBEfjpk+409wrKUvxxK9C6iPXWLaisjC/ef FLTeNpSa6YD77buTOwPjyuC+eVR8JupLr/JQzSz/UDEhS76FLdgxYHrfEOFXN+mOoo75 au7g== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=neutral (google.com: 212.18.0.9 is neither permitted nor denied by best guess record for domain of sbabic@denx.de) smtp.mailfrom=sbabic@denx.de Received: from mail-out.m-online.net (mail-out.m-online.net. [212.18.0.9]) by gmr-mx.google.com with ESMTPS id fx6si1029058ejb.0.2020.06.09.08.20.27 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 09 Jun 2020 08:20:27 -0700 (PDT) Received-SPF: neutral (google.com: 212.18.0.9 is neither permitted nor denied by best guess record for domain of sbabic@denx.de) client-ip=212.18.0.9; Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 49hDMb2nsDz1qs07; Tue, 9 Jun 2020 17:20:27 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 49hDMb2WL3z1sPMw; Tue, 9 Jun 2020 17:20:27 +0200 (CEST) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id jj16BnsTuf4b; Tue, 9 Jun 2020 17:20:26 +0200 (CEST) Received: from babic.homelinux.org (host-88-217-136-221.customer.m-online.net [88.217.136.221]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPS; Tue, 9 Jun 2020 17:20:26 +0200 (CEST) Received: from localhost (mail.babic.homelinux.org [127.0.0.1]) by babic.homelinux.org (Postfix) with ESMTP id 328F245406AE; Tue, 9 Jun 2020 17:20:26 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at babic.homelinux.org Received: from babic.homelinux.org ([IPv6:::1]) by localhost (mail.babic.homelinux.org [IPv6:::1]) (amavisd-new, port 10024) with ESMTP id G8up-cuQZibN; Tue, 9 Jun 2020 17:20:23 +0200 (CEST) Received: from paperino.fritz.box (paperino.fritz.box [192.168.178.64]) by babic.homelinux.org (Postfix) with ESMTP id 5B9EC4540315; Tue, 9 Jun 2020 17:20:23 +0200 (CEST) From: Stefano Babic To: swupdate@googlegroups.com Cc: Stefano Babic Subject: [swupdate] [PATCH] diskpart: force kernel to reread partition table Date: Tue, 9 Jun 2020 17:20:21 +0200 Message-Id: <20200609152021.815671-1-sbabic@denx.de> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Original-Sender: sbabic@denx.de X-Original-Authentication-Results: gmr-mx.google.com; spf=neutral (google.com: 212.18.0.9 is neither permitted nor denied by best guess record for domain of sbabic@denx.de) smtp.mailfrom=sbabic@denx.de Precedence: list Mailing-list: list swupdate@googlegroups.com; contact swupdate+owners@googlegroups.com List-ID: X-Spam-Checked-In-Group: swupdate@googlegroups.com X-Google-Group-Id: 605343134186 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , After writing a partition table to disk, the kernel should be informed (like the partconf tool does), else it is not possible to install images in the new created partitions. Signed-off-by: Stefano Babic --- handlers/diskpart_handler.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/handlers/diskpart_handler.c b/handlers/diskpart_handler.c index 16adc17..372412b 100644 --- a/handlers/diskpart_handler.c +++ b/handlers/diskpart_handler.c @@ -273,7 +273,8 @@ static int diskpart(struct img_type *img, /* * Everything done, write into disk */ - ret = fdisk_write_disklabel(cxt); + ret = fdisk_write_disklabel(cxt) | + fdisk_reread_partition_table(cxt); handler_exit: if (fdisk_deassign_device(cxt, 0))