All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paul Durrant <xadimgnik@gmail.com>
To: "'Ian Jackson'" <ian.jackson@citrix.com>,
	"'Jan Beulich'" <jbeulich@suse.com>
Cc: 'Andrew Cooper' <Andrew.Cooper3@citrix.com>,
	xen-devel@lists.xenproject.org, 'Wei Liu' <wl@xen.org>,
	'Elliott Mitchell' <ehem+xen@m5p.com>,
	'Jason Andryuk' <jandryuk@gmail.com>
Subject: RE: [XEN RFC for-4.14] Re: use of "stat -"
Date: Thu, 25 Jun 2020 08:03:17 +0100	[thread overview]
Message-ID: <000201d64abe$b4ab86b0$1e029410$@xen.org> (raw)
In-Reply-To: <24307.32018.502303.817846@mariner.uk.xensource.com>

> -----Original Message-----
> From: Ian Jackson <ian.jackson@citrix.com>
> Sent: 24 June 2020 17:20
> To: Jan Beulich <jbeulich@suse.com>
> Cc: Elliott Mitchell <ehem+xen@m5p.com>; Andrew Cooper <Andrew.Cooper3@citrix.com>; Jason Andryuk
> <jandryuk@gmail.com>; Paul Durrant <paul@xen.org>; Wei Liu <wl@xen.org>; xen-
> devel@lists.xenproject.org
> Subject: [XEN RFC for-4.14] Re: use of "stat -"
> 
> Jan Beulich writes ("Re: use of "stat -""):
> > [CAUTION - EXTERNAL EMAIL] DO NOT reply, click links, or open attachments unless you have verified
> the sender and know the content is safe.
> > On 14.05.2020 13:02, Ian Jackson wrote:
> > > I've read this thread.  Jan, I'm sorry that this causes you
> > > inconvenience.  I'm hoping it won't come down to a choice between
> > > supporting people who want to ship a dom0 without perl, and people who
> > > want a dom0 using more-than-a-decade-old coreutils.
> > >
> > > Jan, can you tell me what the output is of this on your ancient
> > > system:
> > >
> > >   $ rm -f t
> > >   $ >t
> > >   $ exec 3<t
> > >   $ stat -L -c '%F %i' /dev/stdin <&3
> > >   regular empty file 393549
> > >   $ rm t
> > >   $ stat -L -c '%F %i' /dev/stdin <&3
> > >   regular empty file 393549
> > >   $ strace -ou stat -L -c '%F %i' /dev/stdin <&3
> > >   $
> >
> > $ rm -f t
> > $ >t
> > $ exec 3<t
> > $ stat -L -c '%F %i' /dev/stdin <&3
> > regular empty file 3380369
> > $ rm t
> > $ stat -L -c '%F %i' /dev/stdin <&3
> > regular empty file 3380369
> > $ strace -ou stat -L -c '%F %i' /dev/stdin <&3
> > regular empty file 3380369
> >
> > > Also, the contents of the file "u" afterwards, please.
> >
> > Attached.
> 
> Thanks.
> 
> I think this means that `stat -' can be replaced by `stat /dev/stdin'.
> 
> This script is only run on Linux where /dev/stdin has existed
> basically forever.  The strace output shows
>   stat("/dev/stdin", {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
> and the transcript shows that your stat(1) behaves as I hope.
> 
> Jan, will you send a patch ?  It is best if someone else but me writes
> it and tests it because then I am a "clean" reviewer.
> 
> Paul, supposing I review such a patch and say it is low risk, and we
> commit it by Friday, can it have a release-ack ?
> 

In principle yes but, given Jason's response, it doesn't sound like we have agreement on what the final patch will look like yet.

  Paul

> Thanks,
> Ian.



      parent reply	other threads:[~2020-06-25  7:03 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-12 10:58 use of "stat -" Jan Beulich
2020-05-12 14:19 ` Wei Liu
2020-05-12 14:33   ` Jan Beulich
2020-05-12 14:47     ` Andrew Cooper
2020-05-12 14:59       ` Jan Beulich
2020-05-12 15:52         ` Jason Andryuk
2020-05-12 19:50           ` Elliott Mitchell
2020-05-12 19:54             ` Andrew Cooper
2020-05-12 22:54               ` Elliott Mitchell
2020-05-14 11:02                 ` Ian Jackson
2020-05-14 12:39                   ` Jan Beulich
2020-05-18 10:34                   ` Jan Beulich
2020-06-24 15:55                     ` Ping: " Jan Beulich
2020-06-24 16:19                     ` [XEN RFC for-4.14] " Ian Jackson
2020-06-25  2:37                       ` Jason Andryuk
2020-06-25  7:05                         ` Jan Beulich
2020-06-25 12:04                           ` Jason Andryuk
2020-06-25 13:31                           ` Ian Jackson
2020-06-25 13:48                             ` Jan Beulich
2020-06-25 14:16                               ` Jason Andryuk
2020-06-25  7:27                         ` Rich Persaud
2020-06-25 13:27                         ` Ian Jackson
2020-06-25 14:08                           ` Jan Beulich
2020-06-25 14:18                             ` Jason Andryuk
2020-06-25 14:37                               ` Ian Jackson
2020-06-25 14:19                             ` Ian Jackson
2020-06-25  7:03                       ` Paul Durrant [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='000201d64abe$b4ab86b0$1e029410$@xen.org' \
    --to=xadimgnik@gmail.com \
    --cc=Andrew.Cooper3@citrix.com \
    --cc=ehem+xen@m5p.com \
    --cc=ian.jackson@citrix.com \
    --cc=jandryuk@gmail.com \
    --cc=jbeulich@suse.com \
    --cc=paul@xen.org \
    --cc=wl@xen.org \
    --cc=xen-devel@lists.xenproject.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.