← Commit list

f86bd9f2c

Glenn L McGrath
Glenn L McGrath
2003-10-03
FAILED Duration: 61s

Subject

Reverse my previous changes and make a note about why its dont this way

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

applets/busybox.c+12 -1
@@ -162,7 +162,18 @@ int busybox_main(int argc, char **argv)
been_there_done_that = 1;
/* Move the command line down a notch */
- return (main(argc, argv+1));
+ /* Preserve pointers so setproctitle() works consistently */
+ len = argv[argc] + strlen(argv[argc]) - argv[1];
+ memmove(argv[0], argv[1], len);
+ memset(argv[0] + len, 0, argv[1] - argv[0]);
+
+ /* Fix up the argv pointers */
+ len = argv[1] - argv[0];
+ memmove(argv, argv + 1, sizeof(char *) * (argc + 1));
+ for (i = 0; i < argc; i++)
+ argv[i] -= len;
+
+ return (main(argc, argv));
}
/*