All of lore.kernel.org
 help / color / mirror / Atom feed
* tools: Parsing commands is lenient?
@ 2013-12-03 21:27 Karol Babioch
  0 siblings, 0 replies; only message in thread
From: Karol Babioch @ 2013-12-03 21:27 UTC (permalink / raw)
  To: linux-bluetooth

[-- Attachment #1: Type: text/plain, Size: 1548 bytes --]

Hi,

I've stumbled across something, which is probably a feature, but I
couldn't find it documented anywhere, so I'm going to bring it up anyway.

The parsing of the "command" field for (at least) the tools "hcitool"
and "sdptool" is quite inaccurate. For example when I want to scan for
Bluetooth devices, I would use something like:

[johnpatcher@vpcs ~]$ hcitool scan
Scanning ...

This works great, but so does the following, too:

[johnpatcher@vpcs ~]$ hcitool scan123
Scanning ...

So, it seems that basically you can append whatever you want to a
command, as long as the command itself is valid.

First of all, I'm not sure whether it is actually a good idea to be
lenient when it comes down to parsing a command. I guess most of you are
around *nix systems even longer than me, but at least I'm used to some
sort of an error message as soon as I goof up a command on the console.
At least, theoretically speaking, one could come up with some scenarios,
where this could go terribly wrong when some commands are added and/or
changed.

Secondly, I think that this sort of behavior should actually be
documented when this is and/or was an explicit consideration, for
instance within the man page(s) of the appropriate tools.

Maybe I'm making too much of a fuss about this, but at least I was
*really* surprised by this. I just want to make sure that this isn't
something that was overlooked and/or introduced by a stupid
carelessness, but rather was a conscious decision.

Best regards,
Karol Babioch


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2013-12-03 21:27 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-03 21:27 tools: Parsing commands is lenient? Karol Babioch

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.