@@ -41,11 +41,11 @@
* 2 = install directly (stream to the handler)
* -1= error found
*/
-int check_if_required(struct imglist *list, struct filehdr *pfdh,
+swupdate_file_t check_if_required(struct imglist *list, struct filehdr *pfdh,
const char *destdir,
struct img_type **pimg)
{
- int skip = SKIP_FILE;
+ swupdate_file_t skip = SKIP_FILE;
struct img_type *img;
/*
@@ -122,7 +122,7 @@ static int extract_files(int fd, struct swupdate_cfg *software)
int status = STREAM_WAIT_DESCRIPTION;
unsigned long offset;
struct filehdr fdh;
- int skip;
+ swupdate_file_t skip;
uint32_t checksum;
int fdout;
struct img_type *img, *part;
@@ -14,7 +14,7 @@
#include "handler.h"
#include "cpiohdr.h"
-int check_if_required(struct imglist *list, struct filehdr *pfdh,
+swupdate_file_t check_if_required(struct imglist *list, struct filehdr *pfdh,
const char *destdir,
struct img_type **pimg);
int install_images(struct swupdate_cfg *sw);
@@ -35,11 +35,11 @@ typedef enum {
* in the .swu image is required for the
* device, or can be skipped
*/
-enum {
+typedef enum {
COPY_FILE,
SKIP_FILE,
INSTALL_FROM_STREAM
-};
+} swupdate_file_t;
typedef enum {
SKIP_NONE=0,
There is already an enum, so replace the generic int return and use the enumeration. Signed-off-by: Stefano Babic <sbabic@denx.de> --- core/installer.c | 4 ++-- core/stream_interface.c | 2 +- include/installer.h | 2 +- include/swupdate.h | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-)