+ if (ctx->flags & UCI_FLAG_SAVED_HISTORY)
+ uci_add_history(ctx, &p->saved_history, cmd, ptr.section, ptr.option, ptr.value);
+
+ switch(cmd) {
+ case UCI_CMD_REORDER:
+ expand_ptr(ctx, &ptr, true);
+ if (!ptr.s)
+ UCI_THROW(ctx, UCI_ERR_NOTFOUND);
+ UCI_INTERNAL(uci_reorder_section, ctx, ptr.s, strtoul(ptr.value, NULL, 10));
+ break;
+ case UCI_CMD_RENAME:
+ UCI_INTERNAL(uci_rename, ctx, &ptr);
+ break;
+ case UCI_CMD_REMOVE:
+ UCI_INTERNAL(uci_delete, ctx, &ptr);
+ break;
+ case UCI_CMD_LIST_ADD:
+ UCI_INTERNAL(uci_add_list, ctx, &ptr);
+ break;
+ case UCI_CMD_ADD:
+ case UCI_CMD_CHANGE:
+ UCI_INTERNAL(uci_set, ctx, &ptr);
+ e = ptr.last;
+ if (!ptr.option && e && (cmd == UCI_CMD_ADD))
+ uci_to_section(e)->anonymous = true;
+ break;
+ }