[PATCH spice-gtk v2 22/33] fixup! usb-redir: add files for SCSI and USB MSC implementation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Set correctly loaded flag in case media_params is NULL.
In case the pointer is NULL the action is the same as an unload.
---
 src/cd-scsi.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/cd-scsi.c b/src/cd-scsi.c
index d623d665..62c58942 100644
--- a/src/cd-scsi.c
+++ b/src/cd-scsi.c
@@ -531,11 +531,12 @@ static void cd_scsi_lu_load(CdScsiLU *dev,
         dev->size = media_params->size;
         dev->block_size = media_params->block_size;
         dev->num_blocks = media_params->size / media_params->block_size;
+        dev->loaded = TRUE;
     } else {
         dev->media_event = CD_MEDIA_EVENT_MEDIA_REMOVAL;
         cd_scsi_lu_media_reset(dev);
+        dev->loaded = FALSE;
     }
-    dev->loaded = TRUE;
 }
 
 static void cd_scsi_lu_unload(CdScsiLU *dev)
-- 
2.20.1

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux Virtualization]     [Linux Virtualization]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]