Diff for /qemu/hw/device-hotplug.c between versions 1.1.1.5 and 1.1.1.6

version 1.1.1.5, 2018/04/24 18:38:40 version 1.1.1.6, 2018/04/24 19:48:15
Line 26 Line 26
 #include "boards.h"  #include "boards.h"
 #include "net.h"  #include "net.h"
 #include "blockdev.h"  #include "blockdev.h"
   #include "qemu-config.h"
   #include "sysemu.h"
   #include "monitor.h"
   
 DriveInfo *add_init_drive(const char *optstr)  DriveInfo *add_init_drive(const char *optstr)
 {  {
Line 44  DriveInfo *add_init_drive(const char *op Line 47  DriveInfo *add_init_drive(const char *op
   
     return dinfo;      return dinfo;
 }  }
   
   #if !defined(TARGET_I386)
   int pci_drive_hot_add(Monitor *mon, const QDict *qdict,
                         DriveInfo *dinfo, int type)
   {
       /* On non-x86 we don't do PCI hotplug */
       monitor_printf(mon, "Can't hot-add drive to type %d\n", type);
       return -1;
   }
   #endif
   
   void drive_hot_add(Monitor *mon, const QDict *qdict)
   {
       int type;
       DriveInfo *dinfo = NULL;
       const char *opts = qdict_get_str(qdict, "opts");
   
       dinfo = add_init_drive(opts);
       if (!dinfo) {
           goto err;
       }
       if (dinfo->devaddr) {
           monitor_printf(mon, "Parameter addr not supported\n");
           goto err;
       }
       type = dinfo->type;
   
       switch (type) {
       case IF_NONE:
           monitor_printf(mon, "OK\n");
           break;
       default:
           if (pci_drive_hot_add(mon, qdict, dinfo, type)) {
               goto err;
           }
       }
       return;
   
   err:
       if (dinfo) {
           drive_put_ref(dinfo);
       }
       return;
   }

Removed from v.1.1.1.5  
changed lines
  Added in v.1.1.1.6


unix.superglobalmegacorp.com