Message ID | 20200420083907.39519-1-christian.storm@siemens.com |
---|---|
State | Accepted |
Headers | show |
Series | tools: swupdate-sendtohawkbit: set IPC message length | expand |
On 20.04.20 10:39, Christian Storm wrote: > As with commit a19e03d for tools/swupdate-hawkbitcfg, > set ipc_message's data.instmsg.buf length conforming > to ipc_message's description. > > Signed-off-by: Christian Storm <christian.storm@siemens.com> > --- > tools/swupdate-sendtohawkbit.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/tools/swupdate-sendtohawkbit.c b/tools/swupdate-sendtohawkbit.c > index 6ad7b8e..c6e740e 100644 > --- a/tools/swupdate-sendtohawkbit.c > +++ b/tools/swupdate-sendtohawkbit.c > @@ -92,6 +92,7 @@ int main(int argc, char *argv[]) { > written = snprintf(buf, size, "}"); > > fprintf(stdout, "Sending: '%s'", msg.data.instmsg.buf); > + msg.data.instmsg.len = strnlen(buf, size); > > rc = ipc_send_cmd(&msg); > > Acked-by : Stefano Babic <sbabic@denx.de> Best regards, Stefano Babic
diff --git a/tools/swupdate-sendtohawkbit.c b/tools/swupdate-sendtohawkbit.c index 6ad7b8e..c6e740e 100644 --- a/tools/swupdate-sendtohawkbit.c +++ b/tools/swupdate-sendtohawkbit.c @@ -92,6 +92,7 @@ int main(int argc, char *argv[]) { written = snprintf(buf, size, "}"); fprintf(stdout, "Sending: '%s'", msg.data.instmsg.buf); + msg.data.instmsg.len = strnlen(buf, size); rc = ipc_send_cmd(&msg);
As with commit a19e03d for tools/swupdate-hawkbitcfg, set ipc_message's data.instmsg.buf length conforming to ipc_message's description. Signed-off-by: Christian Storm <christian.storm@siemens.com> --- tools/swupdate-sendtohawkbit.c | 1 + 1 file changed, 1 insertion(+)