Re: [PATCH] portable use of mktemp

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jun 15, 2018 at 06:37:01AM +0200, Luc Van Oostenryck wrote:
> Most manpages for mktemp(1) specify that the 'XXXXXX' part of the
> template must be at the end (of course, the GNU's version accept
> it anywhere). At least the busybox's version used by Alpine Linux
> tries to enforce that and fails in sparse current use of it:
> 	tmp.XXXXXX.{llvm,o}
> 
> Fix that by moving the XXXXXX at the end like:
> 	tmp.{l,o}.XXXXXX

That's rather annoying, as busybox mktemp also doesn't support --suffix.
I don't see any way around it, though.

> Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@xxxxxxxxx>
> ---
>  sparsec | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/sparsec b/sparsec
> index e421776e2..bba16920a 100755
> --- a/sparsec
> +++ b/sparsec
> @@ -29,8 +29,8 @@ while [ $# -gt 0 ]; do
>  	shift
>  done
>  
> -TMPLLVM=`mktemp -t tmp.XXXXXX.llvm`
> -TMPFILE=`mktemp -t tmp.XXXXXX.o`
> +TMPLLVM=`mktemp -t tmp.l.XXXXXX`
> +TMPFILE=`mktemp -t tmp.o.XXXXXX`
>  
>  $DIRNAME/sparse-llvm $SPARSEOPTS > $TMPLLVM
>  
> -- 
> 2.17.1
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux