udevadm - argument order question
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.
Signature · 2 lines
GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT! Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01
Quoted 7 lines · Thomas Bartosik
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
Quoted 11 lines · Kay Sievers
Quoted 7 lines · Thomas Bartosik
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
Quoted 13 lines · Dan Nicholson
Quoted 11 lines · Kay Sievers
Quoted 7 lines · Thomas Bartosik
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.
Quoted 8 lines
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