Skip to content
  • Eduardo Habkost's avatar
    43fa1e0b
    vl: Reset location after handling command-line arguments · 43fa1e0b
    Eduardo Habkost authored
    
    
    After looping through all command-line arguments, error location
    info becomes obsolete, and any function calling error_report()
    will print misleading information. This breaks error reporting
    for some option handling, like:
    
      $ qemu-system-x86_64 -icount rr=x -vnc :0
      qemu-system-x86_64: -vnc :0: Invalid icount rr option: x
    
      $ qemu-system-x86_64 -m size= -vnc :0
      qemu-system-x86_64: -vnc :0: missing 'size' option value
    
    Fix this by resetting location info as soon as we exit the
    command-line handling loop.
    
    With this, replay_configure() and set_memory_options() won't
    print any location info yet, but at least they won't print
    incorrect information.
    
    Signed-off-by: default avatarEduardo Habkost <ehabkost@redhat.com>
    Message-Id: <1455303747-19776-3-git-send-email-ehabkost@redhat.com>
    Reviewed-by: default avatarLaszlo Ersek <lersek@redhat.com>
    ["Do not insert code here" comment added to prevent regressions]
    Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
    43fa1e0b
    vl: Reset location after handling command-line arguments
    Eduardo Habkost authored
    
    
    After looping through all command-line arguments, error location
    info becomes obsolete, and any function calling error_report()
    will print misleading information. This breaks error reporting
    for some option handling, like:
    
      $ qemu-system-x86_64 -icount rr=x -vnc :0
      qemu-system-x86_64: -vnc :0: Invalid icount rr option: x
    
      $ qemu-system-x86_64 -m size= -vnc :0
      qemu-system-x86_64: -vnc :0: missing 'size' option value
    
    Fix this by resetting location info as soon as we exit the
    command-line handling loop.
    
    With this, replay_configure() and set_memory_options() won't
    print any location info yet, but at least they won't print
    incorrect information.
    
    Signed-off-by: default avatarEduardo Habkost <ehabkost@redhat.com>
    Message-Id: <1455303747-19776-3-git-send-email-ehabkost@redhat.com>
    Reviewed-by: default avatarLaszlo Ersek <lersek@redhat.com>
    ["Do not insert code here" comment added to prevent regressions]
    Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
Loading