Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp4451150ybe; Mon, 16 Sep 2019 12:25:47 -0700 (PDT) X-Google-Smtp-Source: APXvYqwoSkLAXwhq59ruT6iaDGVJGx72QIt5HFOhb/EltxQ85XdAs3b1WefxDWB2OkgdU3n2+xqN X-Received: by 2002:a50:95c1:: with SMTP id x1mr931283eda.180.1568661947589; Mon, 16 Sep 2019 12:25:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568661947; cv=none; d=google.com; s=arc-20160816; b=j7LhmCLjj4UrWBuQYrZ8pR3a1CqflngoSH6zufghmw4ykcx3Dv86PP1J47C4muAVfg V9+vTH+qnkTzyzZYtKXnkN0Dmu700uUK4QFfyfZ0qT9grDfr/L9PRoF5wz9Yo4EkNnHV J4D4Eha80rdVMpLtf8oO6g4EzNMC17unMDhhwyZyeh8T3FhZcj20iBR0CxCCjihPUvI2 FfaVBZGCr5/rr1/YEhuajL7pkh7YqWS0c1zyasrgdTSfkaDpD2jDitc3iBDDoYCtvMI0 yua5m5WanobuXchKhZCv4E8O7a0/sBzxeodqF6O47w+dOf8hOVyxqeaPP1KjqCFowJ2I Gt5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=7sagxoUG42OMguE/ZOeoQRii+7AyuQtg3C9mB3aZH4E=; b=BC9Ib6qYzev9nZnwlYWhv7WkGiNMDgw7O7aDkdBseuuJUNeFXUKwQJG9qA+Vxhz5Rt B2vpzQrfDVGjoCMgjHw4QwfiaefYcO7NZ/izO+IniXB+4A7556qL7SLoC7XFjlaocRWq O7bH3TWKtI4b6OIDbnwLzuXYoLeJgVaQiPTwMa6J5CM037H1C8n2H9jKziHM4KbCQaWR lLC3c2MSjtNr7avNVXAdqLZsPHEgM7zMZKlisAVyMJqQYXKeAkBaadXOZanDWD0seeWq G/SoWgyIbkE0yVVE3SAeIPy2Tre8/K50nh3YRcUuEbC/9JRa5L/Nf5Czpt7pGGyn36mF YFoQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h14si14078edk.315.2019.09.16.12.25.24; Mon, 16 Sep 2019 12:25:47 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388092AbfIPN6J (ORCPT + 99 others); Mon, 16 Sep 2019 09:58:09 -0400 Received: from smtp1.de.adit-jv.com ([93.241.18.167]:37294 "EHLO smtp1.de.adit-jv.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727989AbfIPN6J (ORCPT ); Mon, 16 Sep 2019 09:58:09 -0400 Received: from localhost (smtp1.de.adit-jv.com [127.0.0.1]) by smtp1.de.adit-jv.com (Postfix) with ESMTP id 0BFA83C0579; Mon, 16 Sep 2019 15:58:06 +0200 (CEST) Received: from smtp1.de.adit-jv.com ([127.0.0.1]) by localhost (smtp1.de.adit-jv.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id IWPcCamjG3-f; Mon, 16 Sep 2019 15:57:59 +0200 (CEST) Received: from HI2EXCH01.adit-jv.com (hi2exch01.adit-jv.com [10.72.92.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by smtp1.de.adit-jv.com (Postfix) with ESMTPS id 6B0E33C00C4; Mon, 16 Sep 2019 15:57:59 +0200 (CEST) Received: from vmlxhi-102.adit-jv.com (10.72.93.184) by HI2EXCH01.adit-jv.com (10.72.92.24) with Microsoft SMTP Server (TLS) id 14.3.468.0; Mon, 16 Sep 2019 15:57:58 +0200 Date: Mon, 16 Sep 2019 15:57:56 +0200 From: Eugeniu Rosca To: shuah CC: Eugeniu Rosca , "George G. Davis" , Jerry Hoemann , Colin Ian King , , , Eugeniu Rosca Subject: Re: [PATCH 2/2] selftests: watchdog: Add command line option to show watchdog_info Message-ID: <20190916135756.GA24319@vmlxhi-102.adit-jv.com> References: <20190907085833.21167-1-erosca@de.adit-jv.com> <20190907085833.21167-2-erosca@de.adit-jv.com> <2b08fa83-185b-4eb7-1217-37ed31d810b5@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <2b08fa83-185b-4eb7-1217-37ed31d810b5@kernel.org> User-Agent: Mutt/1.12.1+40 (7f8642d4ee82) (2019-06-28) X-Originating-IP: [10.72.93.184] Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Shuah, CC George On Mon, Sep 16, 2019 at 07:26:41AM -0600, shuah wrote: [..] > > case 'f': > > /* Handled above */ > > break; > > + case 'i': > > + /* > > + * watchdog_info was obtained as part of file open > > + * validation. So we just show it here. > > + */ > > + oneshot = 1; > > + printf("watchdog_info:\n"); > > + printf(" identity:\t\t%s\n", info.identity); > > + printf(" firmware_version:\t%u\n", > > + info.firmware_version); > > + printf(" options:\t\t%08x\n", info.options); > > + break; > > default: > > usage(argv[0]); > > > > I would like to see these combined. Please don't add another argument. > Combine patch and 1&2. With all my appreciation for your comment, why do you think it is better to get rid of the new argument? I don't think it is user-friendly to always report the watchdog_info to the user. Just look at outputs [1-2] and imagine that the watchdog_info part would pop up unconditionally. It looks too busy to me. [1] watchdog-test -b -i Last boot is caused by: Power-On-Reset. watchdog_info: identity: Renesas WDT Watchdog firmware_version: 0 options: 000081a0 [2] watchdog-test -i --help watchdog_info: identity: Renesas WDT Watchdog firmware_version: 0 options: 000081a0 Usage: ./watchdog-test [options] -f, --file Open watchdog device file Default is /dev/watchdog -i, --info Show watchdog_info -b, --bootstatus Get last boot status (Watchdog/POR) -d, --disable Turn off the watchdog timer -e, --enable Turn on the watchdog timer -h, --help Print the help message -p, --pingrate=P Set ping rate to P seconds (default 1) -t, --timeout=T Set timeout to T seconds -T, --gettimeout Get the timeout -n, --pretimeout=T Set the pretimeout to T seconds -N, --getpretimeout Get the pretimeout -L, --gettimeleft Get the time left until timer expires Parameters are parsed left-to-right in real-time. Example: ./watchdog-test -d -t 10 -p 5 -e Example: ./watchdog-test -t 12 -T -n 7 -N -- Best Regards, Eugeniu.