[PATCH 2/2] env: add option -S to split string
Csókás Bence
csokas.bence at prolan.hu
Mon Apr 7 13:26:00 UTC 2025
Hi,
On 2025. 04. 07. 12:08, Marc Kewitz wrote:
> +// inspired by GNU core utilities env.c
> +static void split_string (char const *str, int *optind, int *argc, char ***argv)
> +{
> + // remember the amount of extra arguments after the string to split
> + int extra_argc = *argc - *optind;
> + // 1 is reserved for the executable name of env
> + int new_argc = extra_argc + 1;
> + int new_ind = new_argc - extra_argc;
So, just '1'?
Bence
More information about the busybox
mailing list