From patchwork Sat Aug 27 16:06:26 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 2311 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-ed1-f72.google.com (mail-ed1-f72.google.com [209.85.208.72]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 3CE703F066 for ; Sat, 27 Aug 2022 18:06:33 +0200 (CEST) Received: by mail-ed1-f72.google.com with SMTP id y11-20020a056402270b00b00446a7e4f1bcsf2909178edd.1 for ; Sat, 27 Aug 2022 09:06:33 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1661616393; cv=pass; d=google.com; s=arc-20160816; b=P19hU4cF1vBV2MOO725YhhqEV7x8eC9Zje0OdV8vt6PPbE9r3Nij6uXAXMShLvbRtg 4XvfKfufv328xyxT+H/KJGaeuWdp2DrAZog4s50VgYpYE/IzxmRNuSwfBV/OygLla6wK PgRDj94/o/FxoS7Wogo+Jn7pwa44rK/1/OlJqM7rVCy/lwjCphu4e0y5P/zUdK9PMPJA RbuI5zCqDoOgfLR+2xwOVhZXOtiBH7RjULJxkPzsts92pGni9tnHuckfZC+Q2RB2663b IpX/PbcjCFya9jCDHwHED1PsTeEQQY19cUTEUExUqT5b9YwRkH7jYMPzmohAVrGbcxhi RdBg== 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=aFXM25J70hIso9jbTlIYLZxuFpa0BLJ26BmubQqF9rSLMlowSrWpq2gOjljZQX1vF/ L48Cc6efxrLHfbfk7oAGQiYKu8wiTbdMw0Cl52GO28fG5UWjl17+zV2rcR1E+0ucN4xb Byq6QZC4ea7jkFNiCxY/aM/dA73ijVrM8L0abCLkLOba1mZOfv6QrAuOhgM3hjj15m5X 3y44iiIQXlaqlctyu7MYXo539SPtUmiznh4KUOTc5tKeEXp2deBfzeZG1DaI31POpRER JbvvWeshV3PFffC43Ocyzr1k88uMilq5uZUInxXJy+Z2CIzJD1G/6U59RF7ia262qrF+ uiwA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=ojbVk7+z; 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=rUoGRfTNbhyhXnKjfj9tmEdoxfkUVWxcFyxX+Lvk76oANTu3i6B4V8cEPYsk9L5oHH 66LGiUlx0z1W0rJstEyBjI+RSBPm7e64hmp4K/l6vTXU9ae4t/i/Jx2mPCShKlc/gQES 1x7Z0pOV5zxVgGslcY5oYgPYqwBsbs9Stblmk= 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=DNOFDVhg/SmlhiU3k9nJJpzOHOJM2GnmBBS+v6IrUTCie1N1itH14x+OMbwj2ftKA5 1gOWOTWqLhBzADJkDyjoYkjY3kaoIdkmiXfQJtm8H6ba+HSTRJqGu/DZilypf0PhIGrS P8wPohw+Nqwk2iYPHJlOo4rjAUnJVRbiPBN/a55TzH4fEQkTEvXXyc9UZrNDb9u2+o9y SK7/JZvPji7VBWYnpCH5yTFOo7NgO93izrNvVZ5/9dupynY7DkLygwoxgFuV7tAjJ9mD twRGTyokVmArTSCBDqdIA/6KnOrd32NFTfHT/MMRbhSlSXf/BMY2KExedz6WqMeiVbgj Mcsw== X-Gm-Message-State: ACgBeo0WN4B2CdKVsc17nUsyNQzZKbC90sh7RxyGFXgRT/KNEZeRvpa5 vQ4rOCCgM0GoNUC5Xb5vB7MPAXlj X-Google-Smtp-Source: AA6agR42EqwNwcecHGn+fu8xGP6jNm929xHeQSZszQXVznuvsDlD4x4U2vePVqCtxzh/dZEfISP1QA== X-Received: by 2002:a05:6402:268b:b0:446:381d:7b45 with SMTP id w11-20020a056402268b00b00446381d7b45mr10581128edd.372.1661616392508; Sat, 27 Aug 2022 09:06:32 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:906:d85:b0:730:6a7d:1422 with SMTP id m5-20020a1709060d8500b007306a7d1422ls3219113eji.4.-pod-prod-gmail; Sat, 27 Aug 2022 09:06:31 -0700 (PDT) X-Received: by 2002:a17:907:980e:b0:73d:de94:e8c6 with SMTP id ji14-20020a170907980e00b0073dde94e8c6mr6060444ejc.39.1661616391277; Sat, 27 Aug 2022 09:06:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661616391; cv=none; d=google.com; s=arc-20160816; b=FgJ53WnWg+Zhuv6v46CI33nCv21xn629iv9vDxpxnizE6NTh89tQXfIrNyD9y2gdsr CfxvsGpGTSJ/WsHNZRTbVywAXBwxxAs9UFcC16A8hjJ0TyLT2v3FoDTMzMfZcU/Nkznz fX12Z790SLTwGsg2EeOvk2R6B/IJhziL15jXUFKqooimqwmA9aPmxH94AR29Ue/R3Lhw Ix6XTaca+ZG/gVQuFp1rq7JfEUGLTO2XJ2aOuize6qOa3RqRg0/AUuir3bu5lsxvH2Jm MZadRT8e8Et5aABqRp5Rm+nNmIuhmgaNCydibcsWR6f1FWEVHfNwp/qPDeh1/0SyucUV ULTg== 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=FB+w8xT38cWuupCjUHmJ2TkHVnQMP41jMQH4AV+vsvTjBfHdPA3cqoV9fnrNiHJkX4 IS10y55nsCYvXR+QmaT2PAIkml8/0GQekPm17TYHV2Up/dcyOQCvbTvPFkt6/ImSpAK0 QYShxyu+XEYT7VwAghBH5G2G7ppNEw9oFr501z7oA/EGSgk+ANH5TrSE+ym0N3V3hk1Y kXUjKWlPFYbWHPlOzYiJOl0y2ko+X3SHOlTUx2JhaQy8A6kp4ev3QW4n+DzQ3QvCwyqK +/MEkhyEqwGz5h8XXPuk0uTG9FV9Pvp4rNmsr3LKSoVcVodMTYTVK5WmpiLC8uudEvyB 2gmA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=ojbVk7+z; 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 h16-20020a1709070b1000b00730b6545eecsor1821160ejl.89.2022.08.27.09.06.31 for (Google Transport Security); Sat, 27 Aug 2022 09:06:31 -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:906:846f:b0:741:3edd:94f5 with SMTP id hx15-20020a170906846f00b007413edd94f5mr3078927ejc.221.1661616391035; Sat, 27 Aug 2022 09:06:31 -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 kx19-20020a170907775300b00734bfab4d59sm2225757ejc.170.2022.08.27.09.06.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 27 Aug 2022 09:06:30 -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: Sat, 27 Aug 2022 18:06:26 +0200 Message-Id: <20220827160627.682125-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=ojbVk7+z; 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: