void xtables_restore_parse(struct nft_handle *h,
const struct nft_xt_restore_parse *p,
- struct nft_xt_restore_cb *cb,
- int argc, char *argv[]);
+ struct nft_xt_restore_cb *cb);
void nft_check_xt_legacy(int family, bool is_ipt_save);
#endif
void xtables_restore_parse(struct nft_handle *h,
const struct nft_xt_restore_parse *p,
- struct nft_xt_restore_cb *cb,
- int argc, char *argv[])
+ struct nft_xt_restore_cb *cb)
{
const struct builtin_table *curtable = NULL;
char buffer[10240];
parsestart = buffer;
}
- add_argv(argv[0], 0);
+ add_argv(xt_params->program_name, 0);
add_argv("-t", 0);
add_argv(curtable->name, 0);
exit(EXIT_FAILURE);
}
- xtables_restore_parse(&h, &p, &restore_cb, argc, argv);
+ xtables_restore_parse(&h, &p, &restore_cb);
nft_fini(&h);
fclose(p.in);
nft_init_eb(&h, "ebtables-restore");
h.noflush = noflush;
- xtables_restore_parse(&h, &p, &ebt_restore_cb, argc, argv);
+ xtables_restore_parse(&h, &p, &ebt_restore_cb);
nft_fini(&h);
return 0;
struct nft_handle h;
nft_init_arp(&h, "arptables-restore");
- xtables_restore_parse(&h, &p, &arp_restore_cb, argc, argv);
+ xtables_restore_parse(&h, &p, &arp_restore_cb);
nft_fini(&h);
return 0;
printf("# Translated by %s v%s on %s",
argv[0], PACKAGE_VERSION, ctime(&now));
- xtables_restore_parse(&h, &p, &cb_xlate, argc, argv);
+ xtables_restore_parse(&h, &p, &cb_xlate);
printf("# Completed on %s", ctime(&now));
nft_fini(&h);