public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: u-boot@lists.denx.de
Subject: [PATCH v1] test: Include /sbin to the PATH when creating ext4 disk image
Date: Fri, 5 Feb 2021 21:40:07 +0200	[thread overview]
Message-ID: <YB2fFz5jOBr+oQJC@smile.fi.intel.com> (raw)
In-Reply-To: <YB2AhMG54098wAG1@smile.fi.intel.com>

On Fri, Feb 05, 2021 at 07:29:40PM +0200, Andy Shevchenko wrote:
> On Thu, Feb 04, 2021 at 08:17:23PM -0700, Simon Glass wrote:
> > On Wed, 3 Feb 2021 at 08:32, Andy Shevchenko
> > <andriy.shevchenko@linux.intel.com> wrote:
> 
> ...
> 
> > >      if os.path.exists(persistent):
> > >          c.log.action('Disk image file ' + persistent + ' already exists')
> > >      else:
> > > +        root_path = os.path.abspath('.').split(os.path.sep)[0] + os.path.sep
> > 
> > Is it not enough to do os.path.abspath('.') ? I think it would be good
> > to have a comment as to what we need this gymnastics.
> 
> It's just a portable code. Of course we can simple use abspath() on *nix OSes.
> My preference is to have portable code, though. What's yours?
> 
> > > +        sbin_path = os.path.join(root_path, 'sbin')
> > > +        os.environ["PATH"] += os.pathsep + sbin_path
> > >          try:
> > >              u_boot_utils.run_and_log(c, 'dd if=/dev/zero of=%s bs=1M count=16' % persistent)
> > >              u_boot_utils.run_and_log(c, 'mkfs.ext4 %s' % persistent)

Since below we have /dev/zero explicitly I will replace the above to simple
'/sbin'.

-- 
With Best Regards,
Andy Shevchenko

  reply	other threads:[~2021-02-05 19:40 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-03 15:31 [PATCH v1] test: Include /sbin to the PATH when creating ext4 disk image Andy Shevchenko
2021-02-05  3:17 ` Simon Glass
2021-02-05 17:29   ` Andy Shevchenko
2021-02-05 19:40     ` Andy Shevchenko [this message]
2021-02-05 23:57       ` Simon Glass

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=YB2fFz5jOBr+oQJC@smile.fi.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=u-boot@lists.denx.de \
    /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