- value = strchr(argv[1], '=');
- if (value) {
- *value = 0;
- value++;
- if (!uci_validate_text(value))
- return 1;
- }
-
- if (value && (cmd != CMD_SET) && (cmd != CMD_ADD_LIST) && (cmd != CMD_RENAME))
- return 1;
-
- do {
- str = strchr(argv[1], '.'); /* look up section part */
- if (!str)
- break;
-
- str++;
- str = strchr(str, '.'); /* look up option part */
- if (!str)
- break;
-
- /* separate option from the rest of the pointer */
- *str = 0;
- option = str + 1;
- } while (0);
-
- if (uci_lookup_ext(ctx, &e, argv[1]) != UCI_OK) {
+ if (uci_lookup_ptr(ctx, &ptr, argv[1], true) != UCI_OK) {