linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* udevadm - argument order question
@ 2009-07-06 13:20 Thomas Bartosik
  2009-07-06 13:27 ` Kay Sievers
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Thomas Bartosik @ 2009-07-06 13:20 UTC (permalink / raw)
  To: linux-hotplug

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!)

Maybe I am wrong, but I think this is a bug or at least an undocumented feature.

Please advise whether I should create a bug report and where.
-- 
GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT!
Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: udevadm - argument order question
  2009-07-06 13:20 udevadm - argument order question Thomas Bartosik
@ 2009-07-06 13:27 ` Kay Sievers
  2009-07-06 16:52 ` Dan Nicholson
  2009-07-06 22:57 ` Kay Sievers
  2 siblings, 0 replies; 4+ messages in thread
From: Kay Sievers @ 2009-07-06 13:27 UTC (permalink / raw)
  To: linux-hotplug

On Mon, Jul 6, 2009 at 15:20, Thomas Bartosik<thomas.bartosik@gmx.at> 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.

Also:
  udevadm info --query=all --name=/dev/sdb1
saves you the weird sub-command construct.

Kay

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: udevadm - argument order question
  2009-07-06 13:20 udevadm - argument order question Thomas Bartosik
  2009-07-06 13:27 ` Kay Sievers
@ 2009-07-06 16:52 ` Dan Nicholson
  2009-07-06 22:57 ` Kay Sievers
  2 siblings, 0 replies; 4+ messages in thread
From: Dan Nicholson @ 2009-07-06 16:52 UTC (permalink / raw)
  To: linux-hotplug

On Mon, Jul 6, 2009 at 6:27 AM, Kay Sievers<kay.sievers@vrfy.org> wrote:
> On Mon, Jul 6, 2009 at 15:20, Thomas Bartosik<thomas.bartosik@gmx.at> 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;
}

Or it could also just warn and drop the second argument.

--
Dan

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: udevadm - argument order question
  2009-07-06 13:20 udevadm - argument order question Thomas Bartosik
  2009-07-06 13:27 ` Kay Sievers
  2009-07-06 16:52 ` Dan Nicholson
@ 2009-07-06 22:57 ` Kay Sievers
  2 siblings, 0 replies; 4+ messages in thread
From: Kay Sievers @ 2009-07-06 22:57 UTC (permalink / raw)
  To: linux-hotplug

On Mon, Jul 6, 2009 at 18:52, Dan Nicholson<dbn.lists@gmail.com> wrote:
> On Mon, Jul 6, 2009 at 6:27 AM, Kay Sievers<kay.sievers@vrfy.org> wrote:
>> On Mon, Jul 6, 2009 at 15:20, Thomas Bartosik<thomas.bartosik@gmx.at> 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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-07-06 22:57 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-06 13:20 udevadm - argument order question Thomas Bartosik
2009-07-06 13:27 ` Kay Sievers
2009-07-06 16:52 ` Dan Nicholson
2009-07-06 22:57 ` Kay Sievers

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).