Re: [Intel-gfx] [PATCH 5/8] dim: avoid errors with rm $foo/ expanding to /

2017-03-22 Thread Jani Nikula
On Wed, 22 Mar 2017, David Weinehall wrote: > On Wed, Mar 22, 2017 at 12:53:24PM +0200, Jani Nikula wrote: >> On Wed, 22 Mar 2017, David Weinehall wrote: >> > rm -rf / woes can be remedied by always passing "--preserve-root" to rm >> > (I believe that this is the default already though). >> >> T

Re: [Intel-gfx] [PATCH 5/8] dim: avoid errors with rm $foo/ expanding to /

2017-03-22 Thread David Weinehall
On Wed, Mar 22, 2017 at 12:53:24PM +0200, Jani Nikula wrote: > On Wed, 22 Mar 2017, David Weinehall wrote: > > rm -rf / woes can be remedied by always passing "--preserve-root" to rm > > (I believe that this is the default already though). > > That doesn't help with 'rm -rf /*' though. Hmmm, but

Re: [Intel-gfx] [PATCH 5/8] dim: avoid errors with rm $foo/ expanding to /

2017-03-22 Thread Jani Nikula
On Wed, 22 Mar 2017, David Weinehall wrote: > rm -rf / woes can be remedied by always passing "--preserve-root" to rm > (I believe that this is the default already though). That doesn't help with 'rm -rf /*' though. BR, Jani. -- Jani Nikula, Intel Open Source Technology Center ___

Re: [Intel-gfx] [PATCH 5/8] dim: avoid errors with rm $foo/ expanding to /

2017-03-22 Thread David Weinehall
On Tue, Mar 21, 2017 at 01:50:48PM +0100, Daniel Vetter wrote: > On Tue, Mar 21, 2017 at 01:15:59PM +0200, Jani Nikula wrote: > > On Tue, 21 Mar 2017, Daniel Vetter wrote: > > > On Tue, Mar 21, 2017 at 12:14:31PM +0200, Jani Nikula wrote: > > >> Fix shellcheck SC2115: Use "${var:?}" to ensure this

Re: [Intel-gfx] [PATCH 5/8] dim: avoid errors with rm $foo/ expanding to /

2017-03-21 Thread Daniel Vetter
On Tue, Mar 21, 2017 at 01:15:59PM +0200, Jani Nikula wrote: > On Tue, 21 Mar 2017, Daniel Vetter wrote: > > On Tue, Mar 21, 2017 at 12:14:31PM +0200, Jani Nikula wrote: > >> Fix shellcheck SC2115: Use "${var:?}" to ensure this never expands to /. > >> > >> Signed-off-by: Jani Nikula > > > > I'm

Re: [Intel-gfx] [PATCH 5/8] dim: avoid errors with rm $foo/ expanding to /

2017-03-21 Thread Jani Nikula
On Tue, 21 Mar 2017, Daniel Vetter wrote: > On Tue, Mar 21, 2017 at 12:14:31PM +0200, Jani Nikula wrote: >> Fix shellcheck SC2115: Use "${var:?}" to ensure this never expands to /. >> >> Signed-off-by: Jani Nikula > > I'm not sold on these because if those are ever unset, dim will fail all > ove

Re: [Intel-gfx] [PATCH 5/8] dim: avoid errors with rm $foo/ expanding to /

2017-03-21 Thread Daniel Vetter
On Tue, Mar 21, 2017 at 12:14:31PM +0200, Jani Nikula wrote: > Fix shellcheck SC2115: Use "${var:?}" to ensure this never expands to /. > > Signed-off-by: Jani Nikula I'm not sold on these because if those are ever unset, dim will fail all over the place. I'm leaning towards shutting this one u

[Intel-gfx] [PATCH 5/8] dim: avoid errors with rm $foo/ expanding to /

2017-03-21 Thread Jani Nikula
Fix shellcheck SC2115: Use "${var:?}" to ensure this never expands to /. Signed-off-by: Jani Nikula --- dim | 16 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/dim b/dim index 0fe125335a67..8bbff67b3f80 100755 --- a/dim +++ b/dim @@ -461,18 +461,26 @@ function r