3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-11-02 18:19:23 +01:00
Commit Graph

26 Commits

Author SHA1 Message Date
Tim Kourt
6d31c9313f client: Introduce command options
Enable parsing of the command-line options by the command module.
The parsed command-line option values are stored in command_options
list and made available through the module’s public API:
command_option_get – allows querying options by name,
command_has_options – checks existence of the options.
2019-08-15 15:06:59 -05:00
Tim Kourt
f1dd6b1084 client: Fix network name completion after restart of iwd
Previously, on service disappeared event the list of the known
proxy objects was cleared, but pointers to the default entity
per command family wasn’t reset. Reset default entities for
the command families to remove the dead pointers to the deleted
proxy objects.

==1325== Invalid read of size 8
==1325==    at 0x4055D4: proxy_interface_is_same (dbus-proxy.c:439)
==1325==    by 0x407C28: match_by_partial_name (network.c:220)
==1325==    by 0x40547C: proxy_interface_find_all (dbus-proxy.c:424)
==1325==    by 0x405592: proxy_property_str_completion (dbus-proxy.c:153)
==1325==    by 0x407DA9: network_name_completion (network.c:241)
==1325==    by 0x4E596D5: rl_completion_matches (in /usr/lib64/libreadline.so.7.0)
2019-07-18 23:37:54 -05:00
Marcel Holtmann
42f5d905b1 client: List all enum values in switch statement 2018-12-07 08:58:53 +01:00
Tim Kourt
5afe4576a1 client: Enable 'help', 'version' cmds in non-interactive mode 2018-11-12 10:37:09 -06:00
Marcel Holtmann
63bafa7adf client: Fix includes for using with -std=c99 compiler option 2018-11-01 22:19:45 +01:00
Tim Kourt
1d931d8a68 client: add noninteractive support for cmds 2018-08-06 12:42:03 -05:00
Tim Kourt
ef2878d5ee client: rename generic cmd list 2018-08-06 12:32:49 -05:00
Tim Kourt
2ba4efe39e client: add new command statuses
Split CMD_STATUS_OK into CMD_STATUS_DONE and CMD_STATUS_TRIGGERED.
The split is necessary for the enablement of noninteractive mode.
2018-08-06 12:32:22 -05:00
Andrew Zaborowski
15ade259e6 client: Fix parsing commands with no "entity" part
The code would assume that a command with argc >= 3 would always be
composed of <family name> <entity> <command> and thus
"known-networks forget <ssid>" could not be executed.  Instead of
checking argc >= 3 check whether command->entity is non-NULL.
2018-07-31 11:38:35 -05:00
Denis Kenzior
67e590cfeb client: Utilize l_parse_args 2018-07-30 08:59:55 -05:00
Tim Kourt
c5cf3b083f client: add cmd line token finder
This allows to inspect the cmd line for the existence of a provided
token. This enables the completers to look back to what was entered
before them and make decisions based on that information. For
example, this can be used in completion of the property values
to identify the property for which the value is being completed.
2018-07-25 11:47:10 -05:00
Tim Kourt
fd23c87110 client: define default entity setter for cmd families 2018-05-31 19:30:44 -05:00
Tim Kourt
2817aeb35d client: disable cmd completion for the agent prompt 2018-05-03 16:00:23 -05:00
Marcel Holtmann
f41fa52f99 client: Set saveptr argument of strtok_r to NULL for initial invocation 2017-08-30 23:17:53 +02:00
Tim Kourt
9bb19526d9 client: Exclude unnecessary checks
Arrays are guaranteed to be initialized during
the compilation time.
2017-08-23 16:26:05 -05:00
Tim Kourt
e6d4a34773 client: Add caption for misc. cmds 2017-05-30 17:14:08 -05:00
Tim Kourt
bfbffa1111 client: Add 'forget' cmd for known network 2017-04-26 14:36:25 -05:00
Tim Kourt
e0117febd5 client: Introduce cmd execution status 2017-04-26 14:36:25 -05:00
Tim Kourt
02b52adf61 client: Entity argument completion 2017-04-21 12:56:46 -05:00
Tim Kourt
c85ea2f924 client: Command family argument completion 2017-04-21 12:56:46 -05:00
Tim Kourt
34797796ed client: Introduce command completion 2017-04-21 12:56:46 -05:00
Tim Kourt
6c2eae6999 client: Add COMMAND_FAMILY 2017-04-13 13:21:19 -05:00
Tim Kourt
dcf2a0cae5 client: Implement command execution 2017-04-13 13:20:58 -05:00
Tim Kourt
17569c8d8b client: define basic command ops 2017-04-12 15:32:17 -05:00
Tim Kourt
4fc6a3038a client: Allow command registration 2017-04-11 16:48:15 -05:00
Tim Kourt
db679448bc client: Introduce command files
The purpose of these files is to encapsulate all of
the command processing functionality
2017-04-11 16:48:15 -05:00