kvm tools: ignore nonexisting custom stage2
PATCH 1/1 kvm tools: ignore nonexisting custom stage2
fix permanent failing with message "Fatal: Failed linking stage 2 of init." if there is no custom init_stage2.
--- tools/kvm/builtin-run.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
tools/kvm/builtin-run.c +1 -1
@@ -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);
Quoted 2 lines · Konstantin Khlebnikov
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?
Signature · 1 line
Sasha.
Quoted 6 lines · Sasha Levin
Quoted 2 lines · Konstantin Khlebnikov
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
Quoted 9 lines · Konstantin Khlebnikov
Quoted 6 lines · Sasha Levin
Quoted 2 lines · Konstantin Khlebnikov
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.
Signature · 1 line
Sasha.
Quoted 6 lines · Sasha Levin
Quoted 5 lines · Konstantin Khlebnikov
Quoted 4 lines · Sasha Levin
Quoted 2 lines · Konstantin Khlebnikov
fix permanent failing with message "Fatal: Failed linking stage 2 of init." if there is no custom
init_stage2.
Quoted 8 lines
Quoted 4 lines
Quoted 2 lines
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 ? =)
Quoted 10 lines · Konstantin Khlebnikov
Quoted 9 lines · Sasha Levin
Quoted 8 lines · Konstantin Khlebnikov
Quoted 6 lines · Sasha Levin
Quoted 2 lines · Konstantin Khlebnikov
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?
Quoted 8 lines
Quoted 5 lines
Quoted 1 line
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.
Signature · 1 line
Sasha.