]> git.proxmox.com Git - mirror_qemu.git/blobdiff - blockjob.c
s390x/kvm: fix build against qemu_uuid
[mirror_qemu.git] / blockjob.c
index 6816b78fcbfdaeb6e6da97a600b29591dce980ef..a167f96fd47926eadae1d14013567ac2f145a344 100644 (file)
@@ -132,6 +132,10 @@ void *block_job_create(const char *job_id, const BlockJobDriver *driver,
 
     if (job_id == NULL) {
         job_id = bdrv_get_device_name(bs);
+        if (!*job_id) {
+            error_setg(errp, "An explicit job ID is required for this node");
+            return NULL;
+        }
     }
 
     if (!id_wellformed(job_id)) {
@@ -553,6 +557,7 @@ BlockErrorAction block_job_error_action(BlockJob *job, BlockdevOnError on_err,
 
     switch (on_err) {
     case BLOCKDEV_ON_ERROR_ENOSPC:
+    case BLOCKDEV_ON_ERROR_AUTO:
         action = (error == ENOSPC) ?
                  BLOCK_ERROR_ACTION_STOP : BLOCK_ERROR_ACTION_REPORT;
         break;