From patchwork Fri Aug 26 10:27:27 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 2303 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-ed1-f69.google.com (mail-ed1-f69.google.com [209.85.208.69]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id A79B540F48 for ; Fri, 26 Aug 2022 12:27:56 +0200 (CEST) Received: by mail-ed1-f69.google.com with SMTP id p4-20020a056402500400b00447e8b6f62bsf866612eda.17 for ; Fri, 26 Aug 2022 03:27:56 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1661509676; cv=pass; d=google.com; s=arc-20160816; b=TocU3AT9b22H2hj/ox0kH65+1ec/qc/Y8YFi0wp8oV9cg6jivpjx8a1ztqQE7C9M0i MlsblA1I9N1Ds5riM7WoDYFFVHL1RqAiyVsohy9sPTs3fLrEspvksmPQ4P8y/EpAmTun V4ZjvPwg8KNt73NEGR4JRky/Ia+rMJFaYK6ysMSvP8UHcNDMKBVO6vP68KgBnFBZPeC5 xJQi3k3X5MJ+H40nJd0XQsjP26+W7axZkRnXUIXOWtwfa2wHNYZUzPSTGuEjuIDHTIjf QzXwSTZ3iVBXov2315N4tWiDvvEmTxhJNEj4kXHG2soetKdHdlVbytpw1nEtGc+0hOHL j/VA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:message-id:date:subject:cc:to :from:dkim-signature; bh=99bxO/2BIPueVpeEvOmFbeoRUzctgahjeQsIn9Pggjw=; b=tZ5/RzBD1t8o8oLN6Ql77uOR8XArIrkW0LkxmIMi2nTpdX0uL551kZzqaQIkZ/ieqy mTgr3E3mr2jHAOOgbHOZNlsEIT0LH9Slu+AnKIUXdFeKTO7QYTZLVh19uO8rgw1tByb5 J4yreCtmAOb10azb4iEJ8ghgVXJQqEgSxfrWgARIcM1RN3Q4HbE9E+7UvUbTqxiAzxtF FD4/ARw0b+gdCsUfoaFCGRRTz+EBmhInpZ34V/OmJXhGjHz8w5AP+TSthmQQv0Vi0X/R lwoOlr9euDlCdjBVs/uslpHBccKUL8coH5T9ie5AcMyaky2lxwMbkzzD+ch4A71E3DDA UnZg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="lUc7QA/N"; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:x-original-authentication-results :x-original-sender:mime-version:message-id:date:subject:cc:to:from :from:to:cc; bh=99bxO/2BIPueVpeEvOmFbeoRUzctgahjeQsIn9Pggjw=; b=EETODhwyxjsMkyUz8e9aiAYw2QLZoatlj7mYpIdzyKY3csYvQnkMqEJsMpGTDYJMN6 4aK7UdiRvBNmK3ddLj6PCygYnfW7X++ZBCYGEu2RM66QA4L++1mH7k4Huw0X8hXqSjyh bZJZfc6wsLmPn/0j4OnjgfLswtKje2yl1i8GA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=list-unsubscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence :x-original-authentication-results:x-original-sender:mime-version :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc; bh=99bxO/2BIPueVpeEvOmFbeoRUzctgahjeQsIn9Pggjw=; b=yQ0Ncc8qtC1+W6QMiXBgzaHdGXam7ptfBSqoLgU9sbw9EJKICYlcAIbHlTFhBvQprg B7wK1YLYWMuOKDs7RZZfMIiD5/FtxQA8kihbrR8kQzO3HLxEWKrUa3zxUaTErnLPA+75 s/abAFcKmcwfdZSVfd/c9sScnWMciIEJ252cV8thlx8KEFHAgI8pO1kGVo4cCJ5a3Gd8 ctByf9SWB0r6okKaPZsWeFPD7LgaeW8gpjjFzvTZw8r9HoEHEDMu5eg3Y/of7UqhXiTB 7bfiFFgQW+vIVrDhCZ8maw2Jur/2k1sOjGwfyGj7zhU75hBBGEuvNh7MOia8F4JQzQ93 ySwg== X-Gm-Message-State: ACgBeo24/fzZwXS908wFW8i/jhg/GdzZ4Llj1jdDHxGK+BV3S7pKSzHv EUEBHIB9sQbfjVP79HzX5OBYMN+C X-Google-Smtp-Source: AA6agR4kILjn/Vel8yFRbtc+t+82vu2kfEBxzOm9QiFL5xWHM53L6Qw/miPJsAES1mtHR7I5odwS/g== X-Received: by 2002:a17:907:7625:b0:73d:6593:6562 with SMTP id jy5-20020a170907762500b0073d65936562mr5029042ejc.505.1661509676247; Fri, 26 Aug 2022 03:27:56 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:906:c2d9:b0:73d:6af2:48f4 with SMTP id ch25-20020a170906c2d900b0073d6af248f4ls1834269ejb.3.-pod-prod-gmail; Fri, 26 Aug 2022 03:27:55 -0700 (PDT) X-Received: by 2002:a17:906:ef90:b0:730:9af7:5702 with SMTP id ze16-20020a170906ef9000b007309af75702mr5189741ejb.107.1661509675014; Fri, 26 Aug 2022 03:27:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661509675; cv=none; d=google.com; s=arc-20160816; b=YdvTAY5DywqDEJXeHvhS3i1Owr1Btk4A2cApZBBpYw3XSPTNeb9+NxI9ifWAMgOa7M 4eP1n6zjBqGZdo9KqLnQEuhu4g7v5ZrrKEeUl5WbP5xHst0S8dzw9EYFTP0D79XxGhbU /IeLUGRYOJ/Be/UT8CsoXLDjMbXTtVOf/5KAKc6iJ/ICA2UQwox8IjkYIi3tvqzgFIru trcvPHLQey7nmF7jNullAOzcVVrLaqYoQQd3yR3Bd8Kceykm7Hv7q6TWh+nQVnikSe4x CrFE5A2h+nZaqsfLTztWzZ5DwpajxywVNToYb2AV8g0EVU76EB9II31TnjSC7f1yasQz W2dg== 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:dkim-signature; bh=X8eeAPtqmw8RzZTUzvCg8gt0OKS8MUeyq5T0HoYRPyo=; b=A96n4WhrinE2Fs0crQUNQ0E3gdfog29NTPwROntaq+cU3hH9E/3Oi+d7vyt6vNjsqc KYAx/2mW3795f/J2m1gLbYKPaRKSxwkxO0VcQGBBhiMqAQQCwgak0zEqhucLDqrHl3Zc 36bxV/unMXSJFPNeN4vAegkijhsMQLbAG3PeDqarBkKx/X6HGO5IcBTQtbnfn6lh0cFE D+8kEebWyUDXs2Z/e7woT5VcbH5htpBXAl7fH8yDddKKDzjxqzmXdkWTwSWTgW0lB9Rb qv1POiAwbf7TDLKVmAh8FM6ByEMdHegDCioEPAmdzIC0j2PepAz7PEkCA+STJNFeyGaI fUpA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="lUc7QA/N"; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id sg36-20020a170907a42400b0073db6233474sor660372ejc.103.2022.08.26.03.27.54 for (Google Transport Security); Fri, 26 Aug 2022 03:27:54 -0700 (PDT) Received-SPF: pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41; X-Received: by 2002:a17:907:a075:b0:73d:bf94:9f with SMTP id ia21-20020a170907a07500b0073dbf94009fmr5214288ejc.109.1661509674757; Fri, 26 Aug 2022 03:27:54 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.homenet.telecomitalia.it (host-79-31-31-9.retail.telecomitalia.it. [79.31.31.9]) by smtp.gmail.com with ESMTPSA id jt2-20020a170906ca0200b0072f0a9a8e6dsm710138ejb.194.2022.08.26.03.27.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Aug 2022 03:27:54 -0700 (PDT) From: Dario Binacchi To: busybox@busybox.net Cc: Randolph Chung , Denys Vlasenko , linux-amarula@amarulasolutions.com, Dario Binacchi Subject: [RFC PATCH 1/2] fbset: abort on not handled options Date: Fri, 26 Aug 2022 12:27:27 +0200 Message-Id: <20220826102728.573192-1-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 X-Original-Sender: dario.binacchi@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="lUc7QA/N"; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Not all options are actually implemented. In this case, return a message and an error code to make it clear that the requested command has not been executed. Signed-off-by: Dario Binacchi --- util-linux/fbset.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/util-linux/fbset.c b/util-linux/fbset.c index 41cc29f37b78..0eaa7c0a6427 100644 --- a/util-linux/fbset.c +++ b/util-linux/fbset.c @@ -519,6 +519,9 @@ int fbset_main(int argc, char **argv) var_set.bits_per_pixel = xatou32(argv[1]); break; #endif + default: + bb_perror_msg_and_die("option '%s' not handled", + g_cmdoptions[i].name); } switch (g_cmdoptions[i].code) { case CMD_FB: