Bug#1107203: unblock: initramfs-tools/0.148.1 (2/2)
From
Ben Hutchings@21:1/5 to
All on Tue Jun 3 00:20:01 2025
[continued from previous message]
+ sprintf(out_subdirname, "%s/early%u",
+ out_dirname, early_count);
+ if (!mkdir_allow_exist(out_subdirname, 0777)) {
+ warn("%s", out_subdirname);
+ ok = false;
+ break;
+ }
+ if (!spawn_cpio(cpio_optc, cpio_optv,
+ &early_cpio_proc)) {
+ ok = false;
+ break;
+ }
+ ok = handle_uncompressed(in_file, in_filename,
+ early_cpio_proc.pipe)
+ && write_trailer(early_cpio_proc.pipe);
+ if (!end_cpio(&early_cpio_proc, ok))
+ ok = false;
+ if (!ok)
+ break;
+ } else {
+ /*
+ * Otherwise, extract to either the base
+ * output directory or a "main" subdirectory,
+ * depending on whether we already created
+ * subdirectories.
+ */
+ if (!cpio_proc.pid) {
+ if (do_list) {
+ ;
+ } else if (early_count) {
+ sprintf(out_subdirname, "%s/main",
+ out_dirname);
+ if (!mkdir_allow_exist(out_subdirname, + 0777)) {
+ warn("%s", out_subdirname);
+ ok = false;
+ break;
+ }
+ } else {
+ strcpy(out_subdirname, out_dirname);
+ }
+ if (!spawn_cpio(cpio_optc, cpio_optv,
+ &cpio_proc)) {
+ ok = false;
+ break;
+ }
+ }
+ if (me->format == FORMAT_CPIO_NEW) {
+ ok = handle_uncompressed(in_file, in_filename, + cpio_proc.pipe);
+ if (!ok)
+ break;
+ } else {
+ ok = handle_compressed(in_file, me->format,
+ cpio_proc.pipe);
+ break;
+ }
+ }
+ }
+
+ fclose(in_file);
+
+ if (cpio_proc.pid && !end_cpio(&cpio_proc, ok))
+ ok = false;
+
+ return !ok;
+}
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)