mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-10 07:04:28 +00:00
fw_env: fix build error
The following error appears:
tools/env/fw_env.c:1149:25: error: lvalue required as unary ‘&’ operand
rc = write(fd, &ENV_REDUND_OBSOLETE, sizeof(ENV_REDUND_OBSOLETE));
Fixes: d3716dd
("env: Rename the redundancy flags")
Signed-off-by: Pierre-Jean Texier <pjtexier@koncepto.io>
Tested-by: Joris Offouga <offougajoris@gmail.com>
Tested-by: Heiko Schocher <hs@denx.de>
Suggested-by: Heiko Schocher <hs@denx.de>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
This commit is contained in:
parent
e184a3b4fd
commit
7ce01c78dc
1 changed files with 2 additions and 1 deletions
3
tools/env/fw_env.c
vendored
3
tools/env/fw_env.c
vendored
|
@ -1135,6 +1135,7 @@ static int flash_flag_obsolete(int dev, int fd, off_t offset)
|
|||
{
|
||||
int rc;
|
||||
struct erase_info_user erase;
|
||||
char tmp = ENV_REDUND_OBSOLETE;
|
||||
|
||||
erase.start = DEVOFFSET(dev);
|
||||
erase.length = DEVESIZE(dev);
|
||||
|
@ -1146,7 +1147,7 @@ static int flash_flag_obsolete(int dev, int fd, off_t offset)
|
|||
return rc;
|
||||
}
|
||||
ioctl(fd, MEMUNLOCK, &erase);
|
||||
rc = write(fd, &ENV_REDUND_OBSOLETE, sizeof(ENV_REDUND_OBSOLETE));
|
||||
rc = write(fd, &tmp, sizeof(tmp));
|
||||
ioctl(fd, MEMLOCK, &erase);
|
||||
if (rc < 0)
|
||||
perror("Could not set obsolete flag");
|
||||
|
|
Loading…
Reference in a new issue