linux-trace-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Yordan Karadzhov (VMware)" <y.karadz@gmail.com>
To: Steven Rostedt <rostedt@goodmis.org>,
	Linux Trace Devel <linux-trace-devel@vger.kernel.org>
Cc: howaboutsynergy@pm.me
Subject: Re: [PATCH] kernel-shark: Add quotes around $XDG_SESSION_TYPE in kshark-su-record
Date: Tue, 23 Jul 2019 11:02:13 +0300	[thread overview]
Message-ID: <208b69d0-1c73-d155-78b1-b446571a4904@gmail.com> (raw)
In-Reply-To: <20190722113707.156a099f@gandalf.local.home>



On 22.07.19 г. 18:37 ч., Steven Rostedt wrote:
> 
> From: "Steven Rostedt (VMware)" <rostedt@goodmis.org>
> 
> If XDG_SESSION_TYPE is not set, then $XDG_SESSION_TYPE will become nothing,
> which means the test:
> 
>   if [ $XDG_SESSION_TYPE = "wayland" ];
> 
> turns into
> 
>   if [  = "wayland" ];
> 
> And will cause a shell error. Adding quotes around "$XDG_SESSION_TYPE"
> changes an empty $XDG_SESSION_TYPE into:
> 
>   if [ "" = "wayland" ];
> 
> which the shell can understand.
> 
> Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=204261
> Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
> ---
>   kernel-shark/bin/kshark-su-record | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/kernel-shark/bin/kshark-su-record b/kernel-shark/bin/kshark-su-record
> index ee839a26..2477045f 100755
> --- a/kernel-shark/bin/kshark-su-record
> +++ b/kernel-shark/bin/kshark-su-record
> @@ -1,6 +1,6 @@
>   #!/bin/bash
>   
> -if [ $XDG_SESSION_TYPE = "wayland" ]
> +if [ "$XDG_SESSION_TYPE" = "wayland" ]
>   then
>       xhost +si:localuser:root &>/dev/null
>   fi
> 

Thanks!

Reviewed-by: Yordan Karadzhov (VMware) <y.karadz@gmail.com>

      reply	other threads:[~2019-07-23  8:01 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-22 15:37 [PATCH] kernel-shark: Add quotes around $XDG_SESSION_TYPE in kshark-su-record Steven Rostedt
2019-07-23  8:02 ` Yordan Karadzhov (VMware) [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=208b69d0-1c73-d155-78b1-b446571a4904@gmail.com \
    --to=y.karadz@gmail.com \
    --cc=howaboutsynergy@pm.me \
    --cc=linux-trace-devel@vger.kernel.org \
    --cc=rostedt@goodmis.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).