[PATCH 10/10] mtd: nand: Add command to generate a flash BBT

Juergen Beisert jbe at pengutronix.de
Mon Mar 4 15:43:11 EST 2013


Sascha Hauer wrote:
> [...]
> +static int do_imx_nand_bbm(int argc, char *argv[])
> +{
> +	int opt, ret;
> +	struct cdev *cdev;
> +	struct mtd_info *mtd;
> +	int yes = 0;
> +	void *bbt;
> +
> +	while ((opt = getopt(argc, argv, "y")) > 0) {
> +		switch (opt) {
> +		case 'y':
> +			yes = 1;
> +			break;
> +		default:
> +			return COMMAND_ERROR_USAGE;
> +		}
> +	}
> +
> +	cdev = cdev_open("nand0", O_RDWR);

Is a fixed name a good idea?

> [...]

jbe

-- 
Pengutronix e.K.                              | Juergen Beisert             |
Linux Solutions for Science and Industry      | http://www.pengutronix.de/  |



More information about the barebox mailing list