On 1 June 2012 02:16, Peter A. G. Crosthwaite <peter.crosthwa...@petalogix.com> wrote: > @@ -240,10 +241,13 @@ static int load_dtb(target_phys_addr_t addr, const > struct arm_boot_info *binfo) > fprintf(stderr, "couldn't set /memory/reg\n"); > } > > - rc = qemu_devtree_setprop_string(fdt, "/chosen", "bootargs", > - binfo->kernel_cmdline); > - if (rc < 0) { > - fprintf(stderr, "couldn't set /chosen/bootargs\n"); > + machine_opts = qemu_opts_find(qemu_find_opts("machine"), 0); > + if (machine_opts && qemu_opt_get(machine_opts, "append")) { > + rc = qemu_devtree_setprop_string(fdt, "/chosen", "bootargs", > + binfo->kernel_cmdline); > + if (rc < 0) { > + fprintf(stderr, "couldn't set /chosen/bootargs\n"); > + } > }
Can you just check for binfo->kernel_cmdline being NULL or not rather than rereading the option via qemu_opt_get? The latter seems pretty ugly. -- PMM