static int set_pgpolicy(vector strvec, void *ptr) { char * buff; int *int_ptr = (int *)ptr; buff = set_value(strvec); if (!buff) return 1; *int_ptr = get_pgpolicy_id(buff); FREE(buff); return 0; }
static int def_pgpolicy_handler(vector strvec) { char * buff; buff = set_value(strvec); if (!buff) return 1; conf->pgpolicy = get_pgpolicy_id(buff); FREE(buff); return 0; }
static int hw_pgpolicy_handler(vector strvec) { char * buff; struct hwentry * hwe = VECTOR_LAST_SLOT(conf->hwtable); buff = set_value(strvec); if (!buff) return 1; hwe->pgpolicy = get_pgpolicy_id(buff); FREE(buff); return 0; }
static int mp_pgpolicy_handler(vector strvec) { char * buff; struct mpentry * mpe = VECTOR_LAST_SLOT(conf->mptable); if (!mpe) return 1; buff = set_value(strvec); if (!buff) return 1; mpe->pgpolicy = get_pgpolicy_id(buff); FREE(buff); return 0; }