From: Sergei Sharonov Date: Mon, 12 Sep 2005 16:02:36 +0000 (UTC) Subject: [U-Boot-Users] env tools & dataflash Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi, When using Linux tools to read/write u-boot environment in Dataflash there seems to be a problem. In fw_env.c / flash_io(): resid = DEVESIZE (otherdev) - CFG_ENV_SIZE; If I understand correctly DEVESIZE (otherdev) is an erase block size which 0x210 for Dataflash and is smaller than CFG_ENV_SIZE. Then malloc in if ((data = malloc (resid)) == NULL) { fails because of negative size. Sergei