public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH] kvm tools: ignore nonexisting custom stage2
  2011-12-21 10:15 [PATCH] kvm tools: ignore nonexisting custom stage2 Konstantin Khlebnikov
@ 2011-12-21  9:46 ` Sasha Levin
  2011-12-21  9:49   ` Konstantin Khlebnikov
  0 siblings, 1 reply; 6+ messages in thread
From: Sasha Levin @ 2011-12-21  9:46 UTC (permalink / raw)
  To: Konstantin Khlebnikov; +Cc: penberg, kvm

On Wed, 2011-12-21 at 13:15 +0300, Konstantin Khlebnikov wrote:
> fix permanent failing with message "Fatal: Failed linking stage 2 of init."
> if there is no custom init_stage2.

Why would it happen? whats the usecase?

-- 

Sasha.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] kvm tools: ignore nonexisting custom stage2
  2011-12-21  9:46 ` Sasha Levin
@ 2011-12-21  9:49   ` Konstantin Khlebnikov
  2011-12-21 10:11     ` Sasha Levin
  0 siblings, 1 reply; 6+ messages in thread
From: Konstantin Khlebnikov @ 2011-12-21  9:49 UTC (permalink / raw)
  To: Sasha Levin; +Cc: penberg@kernel.org, kvm@vger.kernel.org

Sasha Levin wrote:
> On Wed, 2011-12-21 at 13:15 +0300, Konstantin Khlebnikov wrote:
>> fix permanent failing with message "Fatal: Failed linking stage 2 of init."
>> if there is no custom init_stage2.
>
> Why would it happen? whats the usecase?
>

run "lkvm run" in dir there is no "guest" subdirectory

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] kvm tools: ignore nonexisting custom stage2
  2011-12-21  9:49   ` Konstantin Khlebnikov
@ 2011-12-21 10:11     ` Sasha Levin
  2011-12-21 10:15       ` Konstantin Khlebnikov
  0 siblings, 1 reply; 6+ messages in thread
From: Sasha Levin @ 2011-12-21 10:11 UTC (permalink / raw)
  To: Konstantin Khlebnikov; +Cc: penberg@kernel.org, kvm@vger.kernel.org

On Wed, 2011-12-21 at 13:49 +0400, Konstantin Khlebnikov wrote:
> Sasha Levin wrote:
> > On Wed, 2011-12-21 at 13:15 +0300, Konstantin Khlebnikov wrote:
> >> fix permanent failing with message "Fatal: Failed linking stage 2 of init."
> >> if there is no custom init_stage2.
> >
> > Why would it happen? whats the usecase?
> >
> 
> run "lkvm run" in dir there is no "guest" subdirectory

Yup, but how would that happen? 'guest' is part of the git tree and the
makefile builds the executables in it.

-- 

Sasha.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] kvm tools: ignore nonexisting custom stage2
  2011-12-21 10:11     ` Sasha Levin
@ 2011-12-21 10:15       ` Konstantin Khlebnikov
  2011-12-21 10:18         ` Sasha Levin
  0 siblings, 1 reply; 6+ messages in thread
From: Konstantin Khlebnikov @ 2011-12-21 10:15 UTC (permalink / raw)
  To: Sasha Levin; +Cc: penberg@kernel.org, kvm@vger.kernel.org

Sasha Levin wrote:
> On Wed, 2011-12-21 at 13:49 +0400, Konstantin Khlebnikov wrote:
>> Sasha Levin wrote:
>>> On Wed, 2011-12-21 at 13:15 +0300, Konstantin Khlebnikov wrote:
>>>> fix permanent failing with message "Fatal: Failed linking stage 2 of init."
>>>> if there is no custom init_stage2.
>>>
>>> Why would it happen? whats the usecase?
>>>
>>
>> run "lkvm run" in dir there is no "guest" subdirectory
>
> Yup, but how would that happen? 'guest' is part of the git tree and the
> makefile builds the executables in it.
>

Current wokring directory can be anything,
or lkvm supposed to work only if cwd is .../linux-kvm/tools/kvm ? =)

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH] kvm tools: ignore nonexisting custom stage2
@ 2011-12-21 10:15 Konstantin Khlebnikov
  2011-12-21  9:46 ` Sasha Levin
  0 siblings, 1 reply; 6+ messages in thread
From: Konstantin Khlebnikov @ 2011-12-21 10:15 UTC (permalink / raw)
  To: penberg, kvm

fix permanent failing with message "Fatal: Failed linking stage 2 of init."
if there is no custom init_stage2.

Signed-off-by: Konstantin Khlebnikov <khlebnikov@openvz.org>
---
 tools/kvm/builtin-run.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/tools/kvm/builtin-run.c b/tools/kvm/builtin-run.c
index fac274c..094c0fa2 100644
--- a/tools/kvm/builtin-run.c
+++ b/tools/kvm/builtin-run.c
@@ -752,7 +752,7 @@ static int kvm_custom_stage2(void)
 
 	src = realpath("guest/init_stage2", NULL);
 	if (src == NULL)
-		return -ENOMEM;
+		return errno == ENOENT ? 0 : -errno;
 
 	snprintf(tmp, PATH_MAX, "%s%s/virt/init_stage2", kvm__get_dir(), rootfs);
 	remove(tmp);


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] kvm tools: ignore nonexisting custom stage2
  2011-12-21 10:15       ` Konstantin Khlebnikov
@ 2011-12-21 10:18         ` Sasha Levin
  0 siblings, 0 replies; 6+ messages in thread
From: Sasha Levin @ 2011-12-21 10:18 UTC (permalink / raw)
  To: Konstantin Khlebnikov; +Cc: penberg@kernel.org, kvm@vger.kernel.org

On Wed, 2011-12-21 at 14:15 +0400, Konstantin Khlebnikov wrote:
> Sasha Levin wrote:
> > On Wed, 2011-12-21 at 13:49 +0400, Konstantin Khlebnikov wrote:
> >> Sasha Levin wrote:
> >>> On Wed, 2011-12-21 at 13:15 +0300, Konstantin Khlebnikov wrote:
> >>>> fix permanent failing with message "Fatal: Failed linking stage 2 of init."
> >>>> if there is no custom init_stage2.
> >>>
> >>> Why would it happen? whats the usecase?
> >>>
> >>
> >> run "lkvm run" in dir there is no "guest" subdirectory
> >
> > Yup, but how would that happen? 'guest' is part of the git tree and the
> > makefile builds the executables in it.
> >
> 
> Current wokring directory can be anything,
> or lkvm supposed to work only if cwd is .../linux-kvm/tools/kvm ? =)

Right, so this is the issue that should really be fixed.

If you omit the 'guest' directory, custom rootfs won't work at all
either, so just ignoring that check would lead to breakage later on.

-- 

Sasha.


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2011-12-21 10:18 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-21 10:15 [PATCH] kvm tools: ignore nonexisting custom stage2 Konstantin Khlebnikov
2011-12-21  9:46 ` Sasha Levin
2011-12-21  9:49   ` Konstantin Khlebnikov
2011-12-21 10:11     ` Sasha Levin
2011-12-21 10:15       ` Konstantin Khlebnikov
2011-12-21 10:18         ` Sasha Levin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox