Ejemplo n.º 1
0
int arch_flash_init(struct blocklevel_device **r_bl, const char *file)
{
	struct blocklevel_device *new_bl;

	new_bl = arch_init_blocklevel(file);
	if (!new_bl)
		return -1;

	*r_bl = new_bl;
	return 0;
}
Ejemplo n.º 2
0
int arch_flash_init(struct blocklevel_device **r_bl, const char *file, bool keep_alive)
{
	struct blocklevel_device *new_bl;

	/*
	 * In theory here we should check that something crazy wasn't
	 * passed to arch_flash_access() and refuse to init.
	 * However, arch_flash_access won't accept anything except
	 * PNOR_MTD, if they want something different then they should
	 * have checked with arch_flash_access()
	 */
	new_bl = arch_init_blocklevel(file, keep_alive);
	if (!new_bl)
		return -1;

	*r_bl = new_bl;
	return 0;
}