chiark / gitweb /
dump-runlisp-image.c (finish_job): Prevent fresh images from junking!
authorMark Wooding <mdw@distorted.org.uk>
Mon, 4 Mar 2024 16:06:22 +0000 (16:06 +0000)
committerMark Wooding <mdw@distorted.org.uk>
Mon, 4 Mar 2024 16:06:22 +0000 (16:06 +0000)
We'd notice the old images just fine, but the new ones used to get
zapped until you ran a second pass, in which case the symlink was set
correctly.

dump-runlisp-image.c

index e33582d9de6f9953d0e3ebe9be2d6488cd6b14fc..836dc54c4de6bf539cc99a95bcd56a900b6a314c 100644 (file)
@@ -996,6 +996,12 @@ static void finish_job(struct job *job)
        ok = 0; break;
       }
 
+      /* Notice the image so that it doesn't get junked. */
+      if (flags&AF_JUNK) {
+       p = strrchr(job->imghash, '/'); if (p) p++; else p = job->imghash;
+       notice_filename(p, strlen(p));
+      }
+
       /* Determine the basename of the final image. */
       p = strrchr(job->imghash, '/'); if (p) p++; else p = job->imghash;