Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp441617ybt; Wed, 17 Jun 2020 05:14:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzxeya/fRztJuC6Pfyi4YfacxFVCbKGOK4CMI85+b7FW+f41VM+6nU7LITGpT/Sow0sKaVy X-Received: by 2002:aa7:c15a:: with SMTP id r26mr6669175edp.21.1592396051038; Wed, 17 Jun 2020 05:14:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592396051; cv=none; d=google.com; s=arc-20160816; b=ZpoNADvZq7IIsh6E67EoXea9OQSXTE0nYNrzcAXRDN4LKnDhEqJ7ryxNYNod90F8Z2 tlK7/2hE8LcaTWtsuhQjWjfPJWgUrWZ0rK+obVlLkbAsouVOJAAkph3ww+DTYqlzEm3v OTiLw3SoEPWKUzq1C0Oeqwc6cJ3jaBHD7NLCb3LBpNrehYVgKi2+aXejvhSOelT9XyP9 BE+9+IrY84YYUkYwR0bHC+HfH/PvZ0zfuHoC19f+CwfrGhiiFQjXABM7UAkC8QY8flPE vLFS0N6h1l7MtDLpAxfVowW6s1ZeopSCWbDCUQDkUvBwhZA45hHb2RBDoHHDcfmdCNly 247g== 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=DUng0AAP8e1RJRguN413X/9JqJRoi+egm8U5TRI8wtI=; b=FWAPbR0nxoJM3oGR6KanBK+DSiyCjqYxpH79BPAGg+0wx34m82XjT/ljTs9UgcrQb9 ro1a4j5bIYVt9IomUMXXh27FH7ZO0W+h1xsOS8ZP7KFa1eAKcyGn/sw5rT3TGqGC1vBL tbjsnlk45wNFY+SGq9/UbjlkBd+a4AQvoro/VGsJt2kHCQ/hgXehPxvAZBD4uFmJL/uu I75Z7b2x9Va66UtoDPoqWGVLj6EUjD1AsuX/43yh02o1WfAzAhICZa+1WiPItcYuDsBC NHaASIqT1ujsUziQjhw+OVtzW+92H7GCPmKoJRnQtfp+SGKMnNRQ/DD5TRPqdgIl8kkh 0Ulg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y24si12411505edu.80.2020.06.17.05.13.48; Wed, 17 Jun 2020 05:14:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726355AbgFQMMA (ORCPT + 99 others); Wed, 17 Jun 2020 08:12:00 -0400 Received: from mx2.suse.de ([195.135.220.15]:41110 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725967AbgFQMMA (ORCPT ); Wed, 17 Jun 2020 08:12:00 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 45557AAC7; Wed, 17 Jun 2020 12:12:03 +0000 (UTC) Date: Wed, 17 Jun 2020 14:11:58 +0200 From: Petr Mladek To: jim.cromie@gmail.com Cc: Jason Baron , LKML , akpm@linuxfoundation.org, Greg KH , Rasmus Villemoes Subject: Re: [PATCH v2 19/24] dyndbg: accept query terms like module:foo and file=bar Message-ID: <20200617121156.GV31238@alley> References: <20200613155738.2249399-1-jim.cromie@gmail.com> <20200613155738.2249399-20-jim.cromie@gmail.com> <20200616115727.GN31238@alley> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue 2020-06-16 14:08:57, jim.cromie@gmail.com wrote: > On Tue, Jun 16, 2020 at 5:57 AM Petr Mladek wrote: > > > > On Sat 2020-06-13 09:57:33, Jim Cromie wrote: > > > Current code expects "keyword" "arg" as 2 space separated words. > > > Change to also accept "keyword:arg" and "keyword=arg" forms as well, > > > and drop !(nwords%2) requirement. > > > > > > Then in rest of function, use new keyword,arg variables instead of > > > word[i],word[i+1] > > > > I like the idea. But please allow only one form. IMHO, parameter=value > > is a common way to pass values to commandline parameters. > > > > I dont see a basis to prefer one over the other. > we already now accept " file foo.c:func " > that might argue for file=foo:func > but file:foo:func is what youd expect reading left-to-right > > > Note that "keyword" and "arg" is strange naming, especially "arg". > > > > I think keyword is clear in context. query_term is suitable, but no better. > > arg is pretty generic, without overloaded meaning like value ( like > lvalue ? rvalue ?) > almost as old as 'i', but generally a string (not an int) > Is there an alternative you favor ? You made to do some research and I was wrong. For example, getopt() operates with options and their arguments. So, 'keyword' and 'arg' names look good after all. Well, I still think that only one syntax should be supported. And it is better to distinguish keywords and arguments, so I prefer keyword=arg. I see "filename:func" or "filename:line" as a compound parameter. People are familiar with this syntax, for example, from gdb. But using '=' is very common for first level delimiter: getopt, qemu. Well, I do not have strong opinion on this. Best Regards, Petr