--- nono/vm/scsi.h 2026/04/29 17:04:29 1.1.1.2 +++ nono/vm/scsi.h 2026/04/29 17:04:36 1.1.1.4 @@ -1,6 +1,7 @@ // // nono -// Copyright (C) 2018 isaki@NetBSD.org +// Copyright (C) 2020 nono project +// Licensed under nono-license.txt // #pragma once @@ -42,10 +43,10 @@ class SCSI }; // フェーズ文字列を返す - static const char * const GetPhaseName(int phase) { + static const char * GetPhaseName(int phase) { return GetPhaseName((Phase)phase); } - static const char * const GetPhaseName(Phase phase) { + static const char * GetPhaseName(Phase phase) { switch (phase) { case BusFree: return "BusFree"; case Arbitration: return "Arbitration"; @@ -57,10 +58,10 @@ class SCSI } // 情報転送フェーズ文字列を返す - static const char * const GetXferPhaseName(int xfer) { + static const char * GetXferPhaseName(int xfer) { return GetXferPhaseName((XferPhase)xfer); } - static const char * const GetXferPhaseName(XferPhase xfer) { + static const char * GetXferPhaseName(XferPhase xfer) { switch (xfer) { case DataOut: return "DataOut"; case DataIn: return "DataIn"; @@ -177,10 +178,10 @@ class SCSI // Mode Select(6) ヘッダ struct ModeParamHdr { - uint8 mode_param_len; // ヘッダ以降のバイト数 + uint8 mode_param_len; // バイト長 (このバイトを含まずこれ以降) uint8 media_type; uint8 device_specific_param; - uint8 block_desc_len; // 0 か 8の倍数 + uint8 block_desc_len; // ブロックディスクリプタ長 } __packed; // Mode Select(6) ブロックディスクリプタ