Implemented SCSI EVPD 82h

This commit is contained in:
2016-10-13 04:01:39 +01:00
parent 61c7d68f85
commit c5e94dd9e9
4 changed files with 47 additions and 0 deletions

View File

@@ -104,6 +104,29 @@ namespace DiscImageChef.Decoders.SCSI
return StringHandlers.CToString(ascii);
}
/// <summary>
/// Decodes VPD page 0x82: ASCII implemented operating definition
/// </summary>
/// <returns>ASCII implemented operating definition.</returns>
/// <param name="page">Page 0x82.</param>
public static string DecodePage82(byte[] page)
{
if(page == null)
return null;
if(page[1] != 0x82)
return null;
if(page.Length != page[3] + 4)
return null;
byte[] ascii = new byte[page.Length - 4];
Array.Copy(page, 4, ascii, 0, page.Length - 4);
return StringHandlers.CToString(ascii);
}
}
}