On 07/03/2018 04:29 AM, Han Han wrote: > Implement virFileCdromStatus() in virStorageBackendVolOpen to show > detailed errors or warnings of cdrom instead of general Input/output error. > > Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1596096 > Signed-off-by: Han Han <hhan@xxxxxxxxxx> > --- > src/storage/storage_util.c | 38 ++++++++++++++++++++++++++++++++++++++ > 1 file changed, 38 insertions(+) > > diff --git a/src/storage/storage_util.c b/src/storage/storage_util.c > index a701a75702..5a7ed4c76f 100644 > --- a/src/storage/storage_util.c > +++ b/src/storage/storage_util.c > @@ -1538,6 +1538,44 @@ virStorageBackendVolOpen(const char *path, struct stat *sb, > return -1; > } > > + if (virFileIsCDROM(path) == 1) { > + switch (virFileCdromStatus(path)) { See? With my proposal this would be a single function call. Michal -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list