mirror of
https://github.com/akuker/RASCSI.git
synced 2024-06-28 05:29:33 +00:00
* PbDevice returns information on whether a device is removable * Fixed log message * Added additional status data (ejectable, protctable, removable) * Assume ejectable == removable * Removed obsolete fields * Added locked/lockable to interface * Code review * Logging update * The user should be allowed to also write protect hard disk drives * Updated error handling * Testing * INSERT also has to search in the default file folder * Added TODO * Manpage update * Message updates * Moved some sanity checks to the server, so that they are run for any client * Updated error handling * Moved CR/LF handling to the client, the server should not format too much * rascsi should not mention "rasctl" in its messages, there may be other clients * Improved error messages * Improved error handling by returning an error string * Added TODO * Moved check for duplicate ID to ProcessCmd() * Removed debug output * Moved include * Removed obsolete includes, updated includes * Reverted ready check * Fixed error messages * Added convenience method * Simplified error handling * Socket/error handling review * "NO MEDIA" is added by the client, not by the server * Added missing include * Only check for duplicate ID when attaching a device * Added type/string converters for PbDeviceType * PbDevice indicates whether image files are supported * Write-protecing a read-only devices is not treated as an error anymore * Updated read-only check * Made difference between read-only and protected more explicit * Added comment * Comment update * Made hard disk drives write-protectable by the user * Resolved https://github.com/akuker/RASCSI/issues/166 * Addressing compiler error - type needs to be initialized Co-authored-by: akuker <akuker@gmail.com>
48 lines
1.4 KiB
C++
48 lines
1.4 KiB
C++
//---------------------------------------------------------------------------
|
||
//
|
||
// SCSI Target Emulator RaSCSI (*^..^*)
|
||
// for Raspberry Pi
|
||
//
|
||
// Copyright (C) 2001-2006 PI.(ytanaka@ipc-tokai.or.jp)
|
||
// Copyright (C) 2014-2020 GIMONS
|
||
// Copyright (C) akuker
|
||
//
|
||
// Licensed under the BSD 3-Clause License.
|
||
// See LICENSE file in the project root folder.
|
||
//
|
||
// [ SCSI NEC "Genuine" Hard Disk]
|
||
//
|
||
//---------------------------------------------------------------------------
|
||
#pragma once
|
||
|
||
#include "scsihd.h"
|
||
|
||
//===========================================================================
|
||
//
|
||
// SCSI hard disk (PC-9801-55 NEC genuine /Anex86/T98Next)
|
||
//
|
||
//===========================================================================
|
||
class SCSIHD_NEC : public SCSIHD
|
||
{
|
||
public:
|
||
// Basic Functions
|
||
SCSIHD_NEC(); // Constructor
|
||
const char *Open(const Filepath& path, BOOL attn = TRUE); // Open
|
||
|
||
// commands
|
||
int Inquiry(const DWORD *cdb, BYTE *buf, DWORD major, DWORD minor); // INQUIRY command
|
||
|
||
// Internal processing
|
||
int AddError(BOOL change, BYTE *buf); // Add error
|
||
int AddFormat(BOOL change, BYTE *buf); // Add format
|
||
int AddDrive(BOOL change, BYTE *buf); // Add drive
|
||
|
||
private:
|
||
int cylinders; // Number of cylinders
|
||
int heads; // Number of heads
|
||
int sectors; // Number of sectors
|
||
int sectorsize; // Sector size
|
||
off64_t imgoffset; // Image offset
|
||
off64_t imgsize; // Image size
|
||
};
|