From patchwork Wed Oct 30 10:15:43 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefano Babic X-Patchwork-Id: 2004093 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=googlegroups.com header.i=@googlegroups.com header.a=rsa-sha256 header.s=20230601 header.b=NxDVu53a; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=googlegroups.com (client-ip=2a00:1450:4864:20::23e; helo=mail-lj1-x23e.google.com; envelope-from=swupdate+bncbd2zdgn6sekrbxeorc4qmgqe72hgybi@googlegroups.com; receiver=patchwork.ozlabs.org) Received: from mail-lj1-x23e.google.com (mail-lj1-x23e.google.com [IPv6:2a00:1450:4864:20::23e]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Xdjh42FxFz1xxm for ; Wed, 30 Oct 2024 21:16:03 +1100 (AEDT) Received: by mail-lj1-x23e.google.com with SMTP id 38308e7fff4ca-2fb5035169dsf55497591fa.3 for ; Wed, 30 Oct 2024 03:16:03 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1730283358; cv=pass; d=google.com; s=arc-20240605; b=NqfoX/MVesocsvgia5E9YKi3bJZnoWZO934hq3Nr25uQ9flQEtSU+voNXSwA7bydqd JMKYOJYHE6Nupy8k+Hvwg8EZPhx4Ddz/5+0og6wSJ+2My/J/R7tE6w1jtsjkDonDxiuE Dy2gXXjA7BBuKcqhZpJHfPQWm32iEEI1xEGrbm+LBa+MlMF3vYss1+aXWpcf/HSYJRkd yHCvVk0jDvcZkVwowua0gsuZcQy+1mNWaPW68Z4AshIiLZmDOgNVCg9F0QyvO0ki1Dzd GW804h4x5SmZ1rJWghF4t0WkMA2sxhIYWZnU3Ka1RUvgLBnOXXZ6SLUriHsNseU86w5q vAZg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:ui-outboundreport:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from:sender :dkim-signature; bh=mM4uSguUNgG4f/KJUI9N+erZHeDwYO4iK72brJIEVBM=; fh=DJtiwrViXn61eeDlLBCv53Ns0XCDaaU0+zAFFHFPcGs=; b=E5qAgYovCm+QuDPgFlt1JbOlUKuKn60UPzJWygtBuPVAiImztNbt0N4qFXw2dd4JrZ Tbiqo3Fq2jMEV7W2E5kX4XtF5LQhFlHLXSeBMyRUAJU3om00FD28A77EYShIkXhLpIp8 QRMmPZ+jtDifTN8zbgH+xTgf/FgukoKg4SrKiXmgWYSTzSIMGxzKOAiMLoVheblYrLs4 asGQ2vxpFAZ5y9AcdeCgSb1Maa9XWRvR6kVRn+TDODh83B1yapvocuUweRQa+wdoXMO8 ED4GT+FeXfawbbhmbr6V5etEiwQjkymbibIfGYmG4cQ8UIY/o/GN0Q+JZVkAePvIPrDQ ww5w==; darn=patchwork.ozlabs.org ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@swupdate.org header.s=s1-ionos header.b=cIhIF2YL; spf=pass (google.com: domain of stefano.babic@swupdate.org designates 217.72.192.75 as permitted sender) smtp.mailfrom=stefano.babic@swupdate.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20230601; t=1730283358; x=1730888158; darn=patchwork.ozlabs.org; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:x-original-authentication-results :x-original-sender:ui-outboundreport:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:sender:from:to:cc :subject:date:message-id:reply-to; bh=mM4uSguUNgG4f/KJUI9N+erZHeDwYO4iK72brJIEVBM=; b=NxDVu53aW2x4ZWEZY23j2J2GrdhMC2JNj6ia2acWvop6qHoCtSbNze4SPVORe5RT/u TZf68STRb0qEvs4KI8OHaoPq2IFHFuuaQ6ovJdfTXzeHqId8XvZUmZmrUedJBZRMiMOz lkTrIEqaPgbfGnS0wN7VxIWlXzl6b624rZnEul2fL9oQ05ZgIco9r9ncpz6Kjk2TdqDX TppTKXBGtG/I62ekXm0UiiAsumB0yp2ejWXoBAjKCNzhzrQrUqQaw8zxLF2pkTdhJQ9I 6ML0ZuBZ2xOxLLZsRjh2F+qxuTxJH17w51UK//XO0K1NVW+aVGr1GSkC7EAIqyE6Hkfa BHyg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730283358; x=1730888158; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence :x-original-authentication-results:x-original-sender :ui-outboundreport:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:x-beenthere:x-gm-message-state:sender:from :to:cc:subject:date:message-id:reply-to; bh=mM4uSguUNgG4f/KJUI9N+erZHeDwYO4iK72brJIEVBM=; b=SLqzVxUWFDp7ZB8aYUrqJ3KcxbgXNiK400s4yv/VEB7hMk3I+/KJrOnE7ABQ9vc9J/ OcFhulEBzCjWekEplGXuFyHsZFvlTldFUlOc7PHIVnaACE925Yo03fe46SI+Wev3p9e7 4BbKGWwoqescZK2Jj4yDrYRnZJBtpYQZVMPajU99ULpLG6W7jQHkzTLCPGa3bXi30GnZ CxR7gBd1wRbv0v4jKIYHUtdfKr+kTVFaCv8kSXdL34rHC9WpAc86XJkNc6IlFHPCF15u SlZgRji9528UsG05VFBQdttA5tk64Tye8LXgUJfeXQii5zxMiLWZQVYSgYZqY3ynoABZ wZnw== Sender: swupdate@googlegroups.com X-Forwarded-Encrypted: i=2; AJvYcCXg8C6ErrSEu8VNwTiyUUoVftpfO+Vq/30QAge4kytQRq6bd1In9GntwTki4TDhD0zfa1gG0xg3wg==@patchwork.ozlabs.org X-Gm-Message-State: AOJu0YyfE0MiV/oV2DHbJoCPwIZqU99GvPZtI0F2/9tzRkPBKAQWmlV7 a+gosxOJq6GsA8dM1bDTWrB2NrNxkkAVZCI78hqf+glvrukE11yt X-Google-Smtp-Source: AGHT+IGXqo6eBC/Blm+1b/M1WG5pH++2lA+6SNXyxhRhQWLD9VxyChO3glymv382kjY9gj9I3ghg6g== X-Received: by 2002:a05:651c:2220:b0:2fb:6110:c5df with SMTP id 38308e7fff4ca-2fcbe063fe2mr125828701fa.31.1730283357980; Wed, 30 Oct 2024 03:15:57 -0700 (PDT) X-BeenThere: swupdate@googlegroups.com Received: by 2002:a2e:2a83:0:b0:2fa:c8ad:64a6 with SMTP id 38308e7fff4ca-2fca5976e23ls189911fa.2.-pod-prod-05-eu; Wed, 30 Oct 2024 03:15:54 -0700 (PDT) X-Received: by 2002:a2e:9b81:0:b0:2f3:f1ee:2256 with SMTP id 38308e7fff4ca-2fcbe0a359bmr94997181fa.44.1730283354259; Wed, 30 Oct 2024 03:15:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1730283354; cv=none; d=google.com; s=arc-20240605; b=F8ql07gWOKRdgl0NiMYwn+Hm4dxDHIq8ygv0V2JMvCQWGjWLbvYke5fZx66mzKuo1t mkcGRISdvS89pFWna0k9yumLM6pIzZrDCsbVh4HiGKS4RAByAjguTLXXOvChGOba8uhp /nmnPdz2jAi+6gsrihjk1//xN1hGAREmGGzUNt8X4Fut9Is+tZ9SsXcNF/QsplCyHyEY ICeMSQIQu+fRnWB74bJoltz+EzU+aQzhczdEUKIl2m7vPpfSomwVZy03ZQE1atktwHUJ ynUIil5t8eGbb3iBCrgnakOTum3cvQooOsUKMFiw7ecuwPI6qqCUd4ARys8Us7m1Fj2R eaew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=ui-outboundreport:content-transfer-encoding:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature; bh=tKlvLpJPevrnzo2BjNfNHHLivrvUj5KBD9gj8in/MNQ=; fh=TiEWcqMcKpHk5s7uErzpntoONrNfOXwKpI5P8bIlggk=; b=gpx8dbKM0DAelJlsqvM19BEmFIMpVuKYyoaVFMkG0v8W81YMt1tUhtk5cLBqCf+CBB gD38yROQkRqy5OdOg478W4w9UlFv1ukeTPE/DYPIARtYoEPawUom4OsjdPYDbrCOJRLN mloZmKyy2KMOFlE/HDT71f0MyWiTYFmu0J9DPXpY92LKsXOOyT7zXk14V/0H9CTG5uQx UrluEvBFma/KesX2x2YFwnYBB2+0eVTXbEL7iXdxDbQEO6CrTKQz3ZOVRtmDr0WJeDQi ANC6OJODtAgxSf4Y7omIZlvIgsEFD8gbCK3r6L0cBwF8cWpAvBB0E80MBxQmtiAYDkeB KXPw==; dara=google.com ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@swupdate.org header.s=s1-ionos header.b=cIhIF2YL; spf=pass (google.com: domain of stefano.babic@swupdate.org designates 217.72.192.75 as permitted sender) smtp.mailfrom=stefano.babic@swupdate.org Received: from mout.kundenserver.de (mout.kundenserver.de. [217.72.192.75]) by gmr-mx.google.com with ESMTPS id 38308e7fff4ca-2fd5360e4f6si292391fa.6.2024.10.30.03.15.54 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Oct 2024 03:15:54 -0700 (PDT) Received-SPF: pass (google.com: domain of stefano.babic@swupdate.org designates 217.72.192.75 as permitted sender) client-ip=217.72.192.75; X-UI-Sender-Class: 55c96926-9e95-11ee-ae09-1f7a4046a0f6 Received: from paperino.fritz.box ([88.217.136.221]) by mrelayeu.kundenserver.de (mreue107 [213.165.67.113]) with ESMTPSA (Nemesis) id 1N94qX-1ttZ2E2G7L-013Lwk; Wed, 30 Oct 2024 11:15:53 +0100 From: Stefano Babic To: swupdate@googlegroups.com Cc: Stefano Babic Subject: [swupdate] [PATCH 03/10] Cleanup: use bool instead of int for mount option Date: Wed, 30 Oct 2024 11:15:43 +0100 Message-Id: <20241030101550.21014-4-stefano.babic@swupdate.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241030101550.21014-1-stefano.babic@swupdate.org> References: <20241030101550.21014-1-stefano.babic@swupdate.org> MIME-Version: 1.0 X-Provags-ID: V03:K1:/mQjzbZXxEdPO/hKSwbe2phIY8JVWp464FQLC4slPzCuL/8C3Ay 3j3Gb3HLOlXaO5p22PcA5Hj+hVzqQExLUANKkK4kROkN0CX2dMtIscLCuWDxMg0OJgX0yuV axnvEY9XfqT1pndAYDnN/HL3zzJk1PuVArG2NROJc/ESphM3hCgaJWcOTybCUtKGUIbw/eP eNwbmBr7yH3ScvdGCTFCA== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:K+mrz0MwSx4=;jokvzpP+p2B6YgzswAGwheGmruE IpdTCRZQ8dIVefpg+btDpXrfOXsIYtuNj5QG+N6YpracdIS6ae3yu4F+8gVvbhkuBB7I7rA6o NP4PPacdmN8SqYCxsAojViyJ6BLFIEluW9KUIxSF/opTbB65yxlxdubOm3D3j1zIhz7/j/BJ4 SjpjlK+efaepp/ueeCKNUjibgwSnGzqijmWImyOyl7Q804sKeVNCfxOmFXQHGTKVMFo9dmQBe Wr0mbT/l00gJhhbA6jMW3HpociXecmBHFSRIaejP7rwmvNjKRyHM4RrtVC04YM5fFsDIRzye4 LasWlqu+Lm/g5cT3i1AeuRXStK1oNMYLkqUhaQdsxYcVWh7IiuRjlQGejwUtJsXnf6TcvPQOi ce7pEab8iMYhnEQzqCgptSWoIqzdiq7zeYodRIWhakAMS5SDjUXGVYZ7c7jogsLKRep+HGS9p iu4QfJHroi7moL0aV3jvcZTCPakDsn35BVgnt3CGhAsprjwARVrUpIxfAA2ACmiqXK8TUwmBR 6BvxWAjjsHHXAiQYVd94K2RLpHusBZNVVFE/+4WkokrGozweov4Q+1yEjroKZqg1cRUaA5Sro nfhw6hZXOuYKuUHJQZdCpf2aFxyQaqB3AKZERtHTdik/vdZesRvShrDIHiLDJCsqM/M9mxXRR DjfIRr6PhsktSE8639+Sz7CXvoHs5lu6QgH2zByAP3ZKa03GbXUjYbeAsqdj9lMXBpMKgoqEB FRIICnhyyRHCKhLCyYMwArGi8BEaZvHZQ== X-Original-Sender: stefano.babic@swupdate.org X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@swupdate.org header.s=s1-ionos header.b=cIhIF2YL; spf=pass (google.com: domain of stefano.babic@swupdate.org designates 217.72.192.75 as permitted sender) smtp.mailfrom=stefano.babic@swupdate.org 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: , Replace in archive and raw handler. Signed-off-by: Stefano Babic --- handlers/archive_handler.c | 2 +- handlers/raw_handler.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) -- 2.34.1 diff --git a/handlers/archive_handler.c b/handlers/archive_handler.c index 73ce73a3..bf5c500a 100644 --- a/handlers/archive_handler.c +++ b/handlers/archive_handler.c @@ -233,7 +233,7 @@ static int install_archive_image(struct img_type *img, char pwd[256] = "\0"; struct extract_data tf; pthread_attr_t attr; - int use_mount = (strlen(img->device) && strlen(img->filesystem)) ? 1 : 0; + bool use_mount = (strlen(img->device) && strlen(img->filesystem)) ? true : false; int is_mounted = 0; int exitval = -EFAULT; char *DATADST_DIR = NULL; diff --git a/handlers/raw_handler.c b/handlers/raw_handler.c index 93aa29e4..0123e019 100644 --- a/handlers/raw_handler.c +++ b/handlers/raw_handler.c @@ -154,7 +154,7 @@ static int install_raw_file(struct img_type *img, int fdout = -1; int ret = -1; int cleanup_ret = 0; - int use_mount = (strlen(img->device) && strlen(img->filesystem)) ? 1 : 0; + bool use_mount = (strlen(img->device) && strlen(img->filesystem)) ? true : false; char* DATADST_DIR = NULL; if (strlen(img->path) == 0) {