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 12:52:26 -0400	[thread overview]
Message-ID: <20140724165226.GB519@rampage> (raw)
In-Reply-To: <1406137142-15441-1-git-send-email-andreas@fatal.se>

On Wed, Jul 23, 2014 at 07:39:02PM +0200, Andreas Henriksson wrote:
> The "linux only" check for pivot_root seems to suffer from
> a cut-n-paste problem from the earlier switch_root part.
> 
> Signed-off-by: Andreas Henriksson <andreas@fatal.se>
> ---
>  configure.ac | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/configure.ac b/configure.ac
> index db53dff..aae2456 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -1193,7 +1193,7 @@ AC_ARG_ENABLE([pivot_root],
>    [], [UL_DEFAULT_ENABLE([pivot_root], [check])]
>  )
>  UL_BUILD_INIT([pivot_root])
> -UL_REQUIRES_LINUX([switch_root])
> +UL_REQUIRES_LINUX([pivot_root])

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?).

Cheers,
dave

>  UL_REQUIRES_SYSCALL_CHECK([pivot_root], [UL_CHECK_SYSCALL([pivot_root])])
>  AM_CONDITIONAL([BUILD_PIVOT_ROOT], [test "x$build_pivot_root" = xyes])
>  
> -- 
> 2.0.1
> 
> --
> To unsubscribe from this list: send the line "unsubscribe util-linux" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2014-07-24 16:52 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 [this message]
2014-07-24 17:19   ` Andreas Henriksson
2014-07-24 17:26     ` Dave Reisner
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=20140724165226.GB519@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