- char *envp[10] = {NULL};
- int n = 0;
- xasprintf(&envp[n++], "NETNAME=%s", netname ? : "");
- xasprintf(&envp[n++], "DEVICE=%s", device ? : "");
- xasprintf(&envp[n++], "INTERFACE=%s", iface ? : "");
- xasprintf(&envp[n++], "NODE=%s", owner->name);
+ environment_t env;
+ environment_init(&env);
+ environment_add(&env, "NODE=%s", owner->name);