From 59e2907500d7f9d4eb65d044a11775559ad36513 Mon Sep 17 00:00:00 2001 From: Natalia Portillo Date: Tue, 1 Jan 2019 02:06:00 +0000 Subject: [PATCH] Allow opening read-only devices on Linux. --- DiscImageChef.Devices/Device/Constructor.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DiscImageChef.Devices/Device/Constructor.cs b/DiscImageChef.Devices/Device/Constructor.cs index 30c75bb94..985de0b0b 100644 --- a/DiscImageChef.Devices/Device/Constructor.cs +++ b/DiscImageChef.Devices/Device/Constructor.cs @@ -94,7 +94,7 @@ namespace DiscImageChef.Devices { LastError = Marshal.GetLastWin32Error(); - if(LastError == 13) // EACCES + if(LastError == 13 || LastError == 30) // EACCES or EROFS { FileHandle = Linux.Extern.open(devicePath, FileFlags.Readonly | FileFlags.NonBlocking); if((int)FileHandle < 0)