Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion boot/nxboot/include/nxboot.h
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ enum progress_msg_e
****************************************************************************/

#ifdef CONFIG_NXBOOT_PROGRESS
void nxboot_progress(enum progress_type_e type, ...);
void nxboot_progress(int type, ...);
#else
#define nxboot_progress(type, ...) do {} while (0)
#endif
Expand Down
13 changes: 8 additions & 5 deletions boot/nxboot/loader/flash.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@

#include <stdio.h>
#include <errno.h>
#include <inttypes.h>
#include <string.h>
#include <stddef.h>
#include <fcntl.h>
Expand Down Expand Up @@ -137,14 +138,15 @@ int flash_partition_write(int fd, const void *buf, size_t count, off_t off)
pos = lseek(fd, off, SEEK_SET);
if (pos != off)
{
syslog(LOG_ERR, "Could not seek to %ld: %s\n", off, strerror(errno));
syslog(LOG_ERR, "Could not seek to %" PRIdOFF ": %s\n",
off, strerror(errno));
return ERROR;
}

nbytes = write(fd, buf, count);
if (nbytes != count)
{
syslog(LOG_ERR, "Write to offset %ld failed %s\n",
syslog(LOG_ERR, "Write to offset %" PRIdOFF " failed %s\n",
off, strerror(errno));
return ERROR;
}
Expand Down Expand Up @@ -195,15 +197,16 @@ int flash_partition_read(int fd, void *buf, size_t count, off_t off)
pos = lseek(fd, off, SEEK_SET);
if (pos != off)
{
syslog(LOG_ERR, "Could not seek to %ld: %s\n", off, strerror(errno));
syslog(LOG_ERR, "Could not seek to %" PRIdOFF ": %s\n",
off, strerror(errno));
return ERROR;
}

nbytes = read(fd, buf, count);
if (nbytes != count)
{
syslog(LOG_ERR, "Read from offset %ld failed %s\n", off,
strerror(errno));
syslog(LOG_ERR, "Read from offset %" PRIdOFF " failed %s\n",
off, strerror(errno));
return ERROR;
}

Expand Down
2 changes: 1 addition & 1 deletion boot/nxboot/nxboot_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ static const char *progress_msgs[] =
****************************************************************************/

#ifdef CONFIG_NXBOOT_PROGRESS
void nxboot_progress(enum progress_type_e type, ...)
void nxboot_progress(int type, ...)
{
#ifdef CONFIG_NXBOOT_PRINTF_PROGRESS
va_list arg;
Expand Down
Loading