On Wed, 21 Nov 2018 at 02:11, Li Zhijian <[email protected]> wrote: > > CC: Paolo Bonzini <[email protected]> > CC: Richard Henderson <[email protected]> > CC: Eduardo Habkost <[email protected]> > CC: "Michael S. Tsirkin" <[email protected]> > CC: Marcel Apfelbaum <[email protected]> > Signed-off-by: Li Zhijian <[email protected]> > --- > hw/i386/pc.c | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/hw/i386/pc.c b/hw/i386/pc.c > index f095725..2ffe6fb 100644 > --- a/hw/i386/pc.c > +++ b/hw/i386/pc.c > @@ -984,7 +984,10 @@ static void load_linux(PCMachineState *pcms, > initrd_addr = (initrd_max-initrd_size) & ~4095; > > initrd_data = g_malloc(initrd_size); > - load_image(initrd_filename, initrd_data); > + if (load_image(initrd_filename, initrd_data) < 0) { > + fprintf(stderr, "failed to load initrd\n"); > + exit(1); > + }
Reviewed-by: Peter Maydell <[email protected]> thanks -- PMM
