From: Kay Sievers Date: Mon, 06 Jul 2009 22:57:16 +0000 Subject: Re: udevadm - argument order question Message-Id: List-Id: References: <20090706132026.9190@gmx.net> In-Reply-To: <20090706132026.9190@gmx.net> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit To: linux-hotplug@vger.kernel.org On Mon, Jul 6, 2009 at 18:52, Dan Nicholson wrote: > On Mon, Jul 6, 2009 at 6:27 AM, Kay Sievers wrote: >> On Mon, Jul 6, 2009 at 15:20, Thomas Bartosik wrote: >>> consider the following two commands: >>> >>> udevadm info --attribute-walk --query=all --path=$(udevadm info --query=path --name=/dev/sdb1) >>> >>> udevadm info --query=all --attribute-walk  --path=$(udevadm info --query=path --name=/dev/sdb1) >>> >>> They produce different results. I don't think this is as expected (at least I did not expect it, tried aome time and thought all the ATTRS fields do not exist anymore since the conversion from udevinfo to udevadm info.. until I found this out!) >> >> Sure, one is an  --attribute-walk, the other is --query. It makes no >> sense to specify both at the same time. > > Maybe info should bomb if multiple action arguments are supplied? > Would be pretty simple: > > if (action != ACTION_NONE) { >    fprintf(stderr, "action already specified\n"); >    rc = 2; >    goto exit; > } Sure, send a patch if you like. Kay