public inbox for util-linux@vger.kernel.org
 help / color / mirror / Atom feed
From: Dave Reisner <d@falconindy.com>
To: Andreas Henriksson <andreas@fatal.se>
Cc: util-linux@vger.kernel.org
Subject: Re: [PATCH] Fix switch_root/pivot_root cut-n-paste error in configure.ac
Date: Thu, 24 Jul 2014 13:26:27 -0400	[thread overview]
Message-ID: <20140724172627.GC519@rampage> (raw)
In-Reply-To: <20140724171924.GA21736@fatal.se>

On Thu, Jul 24, 2014 at 07:19:24PM +0200, Andreas Henriksson wrote:
> Hello Dave Reisner!
> 
> On Thu, Jul 24, 2014 at 12:52:26PM -0400, Dave Reisner wrote:
> > Is this really correct? Seems to me like the check should simply be
> > removed. In sys-utils/pivot_root.c, we have the following:
> > 
> >   #define pivot_root(new_root,put_old) syscall(SYS_pivot_root,new_root,put_old)
> > 
> > So, the subsequent check for the syscall seems like the only necessary
> > check needed. As is, I think that u-l now fails to build in places where
> > the pivot_root wrapper doesn't exist in the libc, but the syscall exists
> > (does such a platform even exist?).
> 
> I cought this when trying to build on Debian GNU/kFreeBSD (with incorrect
> configure flags for that platform) where the SYS_pivot_root check
> failed the build.
> Not knowing anything about non-linux architectures myself it was not obvious
> to me why this was.
> 
> Passing --disable-pivot_root fixed the build and it would be more
> obvious that this is the correct thing to do if it was pointed out that
> this is only expected to work on Linux.
> I consider the UL_REQUIRES_LINUX check as a more obvious
> way to point out this error so people like myself doesn't need to
> spend so much time scratching their heads over this.
> 
> From what I can tell, Linux is the only system offering this syscall anyway.
> Do you know of any non-linux system offering this?
> If not, then I think the check is still correct and helpful.

Ah, I wrongly assumed what UL_REQUIRES_LINUX does. Makes more sense
having now read the .m4 file, and I agree with your fix.

d

  reply	other threads:[~2014-07-24 17:26 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-23 17:39 [PATCH] Fix switch_root/pivot_root cut-n-paste error in configure.ac Andreas Henriksson
2014-07-24 10:13 ` Karel Zak
2014-07-24 16:52 ` Dave Reisner
2014-07-24 17:19   ` Andreas Henriksson
2014-07-24 17:26     ` Dave Reisner [this message]
2014-07-25  8:45       ` Karel Zak
2014-07-25  8:39   ` Karel Zak

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=20140724172627.GC519@rampage \
    --to=d@falconindy.com \
    --cc=andreas@fatal.se \
    --cc=util-linux@vger.kernel.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