fix vfs_lseek() result checking in enduser_setup and clarify SPIFFS_lseek() return value (#1570)
This commit is contained in:
parent
058777ea60
commit
fdc766be9f
|
@ -424,7 +424,7 @@ static int enduser_setup_http_load_payload(void)
|
|||
c_sprintf(cl_hdr, http_header_content_len_fmt, file_len);
|
||||
size_t cl_len = c_strlen(cl_hdr);
|
||||
|
||||
if (!f || err != VFS_RES_OK || err2 != VFS_RES_OK)
|
||||
if (!f || err == VFS_RES_ERR || err2 == VFS_RES_ERR)
|
||||
{
|
||||
ENDUSER_SETUP_DEBUG("enduser_setup_http_load_payload unable to load file enduser_setup.html, loading backup HTML.");
|
||||
|
||||
|
|
|
@ -459,7 +459,8 @@ static sint32_t myspiffs_vfs_lseek( const struct vfs_file *fd, sint32_t off, int
|
|||
break;
|
||||
}
|
||||
|
||||
return SPIFFS_lseek( &fs, fh, off, spiffs_whence );
|
||||
sint32_t res = SPIFFS_lseek( &fs, fh, off, spiffs_whence );
|
||||
return res >= 0 ? res : VFS_RES_ERR;
|
||||
}
|
||||
|
||||
static sint32_t myspiffs_vfs_eof( const struct vfs_file *fd ) {
|
||||
|
|
Loading…
Reference in New Issue