static void tree_freplace(struct augeas *aug, const char *fpath,
                         struct tree *sub) {
    struct tree *parent;

    parent = tree_fpath_cr(aug, fpath);
    ERR_RET(aug);

    tree_unlink_children(aug, parent);
    list_append(parent->children, sub);
    list_for_each(s, sub) {
        s->parent = parent;
    }
}
static void tree_freplace(struct augeas *aug, const char *fpath,
                         struct tree *sub) {
    struct tree *parent;

    parent = tree_fpath_cr(aug, fpath);
    ERR_RET(aug);

    tree_unlink_children(aug, parent);
    list_append(parent->children, sub);
    list_for_each(s, sub) {
        s->parent = parent;
    }
}