Message ID | 20200504103943.5194-1-offougajoris@gmail.com |
---|---|
State | Changes Requested |
Headers | show |
Series | swupdate-progress: fix psplash_fifo_dir | expand |
Hi Joris, On 04.05.20 12:39, Joris Offouga wrote: > Now psplash use /run for communication FIFO see [1] > > [1]:http://git.yoctoproject.org/cgit/cgit.cgi/psplash/commit/?id=568f28ed8dc0cc79a0afc6f1689dc6cb007c285c > > Signed-off-by: Joris Offouga <offougajoris@gmail.com> > --- > tools/swupdate-progress.c | 10 +++++----- > 1 file changed, 5 insertions(+), 5 deletions(-) > > diff --git a/tools/swupdate-progress.c b/tools/swupdate-progress.c > index cd8abd1..01d926e 100644 > --- a/tools/swupdate-progress.c > +++ b/tools/swupdate-progress.c > @@ -174,7 +174,7 @@ int main(int argc, char **argv) > { > int connfd; > struct progress_msg msg; > - const char *tmpdir; > + const char *rundir; > char psplash_pipe_path[256]; > int psplash_ok = 0; > unsigned int curstep = 0; > @@ -223,10 +223,10 @@ int main(int argc, char **argv) > } > } > > - tmpdir = getenv("TMPDIR"); > - if (!tmpdir) > - tmpdir = "/tmp"; > - snprintf(psplash_pipe_path, sizeof(psplash_pipe_path), "%s/psplash_fifo", tmpdir); > + rundir = getenv("PSPLASH_FIFO_DIR"); > + if (!rundir) > + rundir = "/run"; > + snprintf(psplash_pipe_path, sizeof(psplash_pipe_path), "%s/psplash_fifo", rundir); > > > connfd = -1; > Thanks for this, I was not aware of this change. Anyway, this makes an incompatibility between older and newer code, that is in case a nwere SWUpdate (that often happens) is built together with an older poky (because people cannot fast switch to a newe version). I will at least suggest to add in the commit message some advises about this incompatibility and even how they get it running with previious version, for example by setting "PSPLASH_FIFO_DIR" in the startup script. Best regards, Stefano
diff --git a/tools/swupdate-progress.c b/tools/swupdate-progress.c index cd8abd1..01d926e 100644 --- a/tools/swupdate-progress.c +++ b/tools/swupdate-progress.c @@ -174,7 +174,7 @@ int main(int argc, char **argv) { int connfd; struct progress_msg msg; - const char *tmpdir; + const char *rundir; char psplash_pipe_path[256]; int psplash_ok = 0; unsigned int curstep = 0; @@ -223,10 +223,10 @@ int main(int argc, char **argv) } } - tmpdir = getenv("TMPDIR"); - if (!tmpdir) - tmpdir = "/tmp"; - snprintf(psplash_pipe_path, sizeof(psplash_pipe_path), "%s/psplash_fifo", tmpdir); + rundir = getenv("PSPLASH_FIFO_DIR"); + if (!rundir) + rundir = "/run"; + snprintf(psplash_pipe_path, sizeof(psplash_pipe_path), "%s/psplash_fifo", rundir); connfd = -1;
Now psplash use /run for communication FIFO see [1] [1]:http://git.yoctoproject.org/cgit/cgit.cgi/psplash/commit/?id=568f28ed8dc0cc79a0afc6f1689dc6cb007c285c Signed-off-by: Joris Offouga <offougajoris@gmail.com> --- tools/swupdate-progress.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)