Comment cleanup

This commit is contained in:
RaSCSI User 2022-03-14 02:16:21 +00:00
parent b7c88d2d45
commit 8e48e72bf1
8 changed files with 47 additions and 40 deletions

View File

@ -1,4 +1,17 @@
#include "disk_image/disk_image_handle.h"
//---------------------------------------------------------------------------
//
// SCSI Target Emulator RaSCSI (*^..^*)
// for Raspberry Pi
//
// Copyright (C) 2022 akuker
//
// Base class for interfacing with disk images.
//
// [ DiskImageHandle ]
//
//---------------------------------------------------------------------------
#include "disk_image/disk_image_handle.h"
DiskImageHandle::DiskImageHandle(const Filepath& path, int size, uint32_t blocks, off_t imgoff){

View File

@ -1,19 +1,15 @@
//---------------------------------------------------------------------------
//
// X68000 EMULATOR "XM6"
// SCSI Target Emulator RaSCSI (*^..^*)
// for Raspberry Pi
//
// Copyright (C) 2001-2006 (ytanaka@ipc-tokai.or.jp)
// Copyright (C) 2014-2020 GIMONS
// Copyright (C) 2022 akuker
//
// XM6i
// Copyright (C) 2010-2015 isaki@NetBSD.org
// Base class for interfacing with disk images.
//
// Imported sava's Anex86/T98Next image and MO format support patch.
// Comments translated to english by akuker.
// [ DiskImageHandle ]
//
// [ DiskTrack and DiskCache ]
//
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
#pragma once

View File

@ -1,17 +1,13 @@
//---------------------------------------------------------------------------
//
// X68000 EMULATOR "XM6"
// SCSI Target Emulator RaSCSI (*^..^*)
// for Raspberry Pi
//
// Copyright (C) 2001-2006 (ytanaka@ipc-tokai.or.jp)
// Copyright (C) 2014-2020 GIMONS
// Copyright (C) 2022 akuker
//
// XM6i
// Copyright (C) 2010-2015 isaki@NetBSD.org
// Factory class for creating DiskImageHandles
//
// Imported sava's Anex86/T98Next image and MO format support patch.
// Comments translated to english by akuker.
//
// [ DiskTrack and DiskCache ]
// [ DiskImageHandleFactory ]
//
//---------------------------------------------------------------------------
@ -23,27 +19,30 @@
DiskImageHandleType DiskImageHandleFactory::current_access_type = DiskImageHandleType::ePosixFile;
DiskImageHandle *DiskImageHandleFactory::CreateFileAccess(const Filepath& path, int size, uint32_t blocks, off_t imgoff){
DiskImageHandle *DiskImageHandleFactory::CreateDiskImageHandle(const Filepath &path, int size, uint32_t blocks, off_t imgoff)
{
DiskImageHandle *result = NULL;
if (current_access_type == DiskImageHandleType::eMmapFile){
if (current_access_type == DiskImageHandleType::eMmapFile)
{
LOGINFO("%s Creating MmapFileAccess %s", __PRETTY_FUNCTION__, path.GetPath())
result = new MmapFileHandle(path, size, blocks, imgoff);
}
else if(current_access_type == DiskImageHandleType::eRamCache) {
else if (current_access_type == DiskImageHandleType::eRamCache)
{
LOGINFO("%s Creating DiskCache %s", __PRETTY_FUNCTION__, path.GetPath())
result = new DiskCache(path, size, blocks, imgoff);
}
else if(current_access_type == DiskImageHandleType::ePosixFile) {
else if (current_access_type == DiskImageHandleType::ePosixFile)
{
LOGINFO("%s Creating PosixFileHandle %s", __PRETTY_FUNCTION__, path.GetPath())
result = new PosixFileHandle(path, size, blocks, imgoff);
}
if (result == NULL){
if (result == NULL)
{
LOGWARN("%s Unable to create the File Access", __PRETTY_FUNCTION__);
}
return result;
}

View File

@ -1,17 +1,13 @@
//---------------------------------------------------------------------------
//
// X68000 EMULATOR "XM6"
// SCSI Target Emulator RaSCSI (*^..^*)
// for Raspberry Pi
//
// Copyright (C) 2001-2006 (ytanaka@ipc-tokai.or.jp)
// Copyright (C) 2014-2020 GIMONS
// Copyright (C) 2022 akuker
//
// XM6i
// Copyright (C) 2010-2015 isaki@NetBSD.org
// Factory class for creating DiskImageHandles
//
// Imported sava's Anex86/T98Next image and MO format support patch.
// Comments translated to english by akuker.
//
// [ DiskTrack and DiskCache ]
// [ DiskImageHandleFactory ]
//
//---------------------------------------------------------------------------
@ -31,7 +27,7 @@ public:
static void SetFileAccessMethod(DiskImageHandleType method) { current_access_type = method; };
static DiskImageHandleType GetFileAccessMethod() { return current_access_type; };
static DiskImageHandle *CreateFileAccess(const Filepath& path, int size, uint32_t blocks, off_t imgoff = 0);
static DiskImageHandle *CreateDiskImageHandle(const Filepath& path, int size, uint32_t blocks, off_t imgoff = 0);
private:
static DiskImageHandleType current_access_type;

View File

@ -1,5 +1,8 @@
//---------------------------------------------------------------------------
//
// SCSI Target Emulator RaSCSI (*^..^*)
// for Raspberry Pi
//
// Copyright (C) 2022 akuker
//
// This method of file access will use the mmap() capabilities to 'map' the

View File

@ -16,7 +16,7 @@
// caching mechanism (like in disk_track_cache.h), we just rely on the
// operating system.
//
// [ MmapFileAccess ]
// [ MmapFileHandle ]
//
//---------------------------------------------------------------------------

View File

@ -3,7 +3,7 @@
// SCSI Target Emulator RaSCSI (*^..^*)
// for Raspberry Pi
//
// Copyright (C) 2021 akuker
// Copyright (C) 2022 akuker
//
// [ PosixFileHandle ]
//

View File

@ -3,7 +3,7 @@
// SCSI Target Emulator RaSCSI (*^..^*)
// for Raspberry Pi
//
// Copyright (C) 2021 akuker
// Copyright (C) 2022 akuker
//
// [ PosixFileHandle ]
//