Пример #1
0
static int setfb64_main(int argc, char **argv)
{
	if (!nvram_set_file(argv[1], argv[2], 10240)) {
		fprintf(stderr, "Unable to set %s or read %s\n", argv[1], argv[2]);
		return 1;
	}
	return 0;
}
Пример #2
0
static inline int check_host_key(const char *ktype, const char *nvname, const char *hkfn)
{
	unlink(hkfn);

	if (!nvram_get_file(nvname, hkfn, 2048)) {
		eval("dropbearkey", "-t", (char *)ktype, "-f", (char *)hkfn);
		if (nvram_set_file(nvname, hkfn, 2048)) {
			return 1;
		}
	}

	return 0;
}