[ymodem] silent warnings
This commit is contained in:
parent
c3162f373f
commit
169fca84f7
|
@ -15,8 +15,6 @@
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <sys/statfs.h>
|
#include <sys/statfs.h>
|
||||||
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
@ -115,7 +113,7 @@ static enum rym_code _rym_send_begin(
|
||||||
rt_kprintf("error open file.\n");
|
rt_kprintf("error open file.\n");
|
||||||
return RYM_ERR_FILE;
|
return RYM_ERR_FILE;
|
||||||
}
|
}
|
||||||
sprintf((char *)buf, "%s%c%ld", (char *) & (cctx->fpath[1]), insert_0, file_buf.st_size);
|
rt_sprintf((char *)buf, "%s%c%d", (char *) & (cctx->fpath[1]), insert_0, file_buf.st_size);
|
||||||
|
|
||||||
return RYM_CODE_SOH;
|
return RYM_CODE_SOH;
|
||||||
}
|
}
|
||||||
|
@ -140,8 +138,7 @@ static enum rym_code _rym_send_data(
|
||||||
if (read_size < len)
|
if (read_size < len)
|
||||||
{
|
{
|
||||||
rt_memset(buf + read_size, 0x1A, len - read_size);
|
rt_memset(buf + read_size, 0x1A, len - read_size);
|
||||||
/* stage = RYM_STAGE_FINISHING */
|
ctx->stage = RYM_STAGE_FINISHING;
|
||||||
ctx->stage = 4;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return RYM_CODE_SOH;
|
return RYM_CODE_SOH;
|
||||||
|
|
|
@ -72,7 +72,7 @@ enum rym_code
|
||||||
|
|
||||||
enum rym_stage
|
enum rym_stage
|
||||||
{
|
{
|
||||||
RYM_STAGE_NONE,
|
RYM_STAGE_NONE = 0,
|
||||||
/* set when C is send */
|
/* set when C is send */
|
||||||
RYM_STAGE_ESTABLISHING,
|
RYM_STAGE_ESTABLISHING,
|
||||||
/* set when we've got the packet 0 and sent ACK and second C */
|
/* set when we've got the packet 0 and sent ACK and second C */
|
||||||
|
|
Loading…
Reference in New Issue