@@ -350,7 +350,6 @@ void *network_thread (void *data)
if (instp->status == IDLE) {
instp->fd = ctrlconnfd;
instp->source = msg.data.instmsg.source;
- instp->len = min(msg.data.instmsg.len, sizeof(instp->info));
/*
* Communicate if a dry run is asked and set it
@@ -360,9 +359,6 @@ void *network_thread (void *data)
else
instp->dry_run = 0;
- memcpy(instp->info, msg.data.instmsg.buf,
- instp->len);
-
/*
* Prepare answer
*/
@@ -607,8 +607,7 @@ void *network_initializer(void *data)
int get_install_info(sourcetype *source, char *buf, size_t len)
{
len = min(len, inst.len);
-
- memcpy(buf, inst.info, len);
+ memcpy(buf, inst.data, len);
*source = inst.source;
return len;
@@ -19,7 +19,7 @@ struct installer {
sourcetype source; /* Who triggered the update */
int dry_run; /* set it if no changes in hardware must be done */
unsigned int len; /* Len of data valid in info, data is optional */
- char info[2048]; /* info */
+ char data[2048]; /* This is a placeholder for installation request */
};
#endif
The "info" buffer used to trigger an update is quite unused. The name of the original SWU is pushed in case of local update, but it is not used. Drop the filename and change the name to a more generic data, as this will be used to pass a request structure with several fields instead of pure formatted strings. Signed-off-by: Stefano Babic <sbabic@denx.de> --- core/network_thread.c | 4 ---- core/stream_interface.c | 3 +-- include/installer_priv.h | 2 +- 3 files changed, 2 insertions(+), 7 deletions(-)