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){ 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) 2022 akuker
// Copyright (C) 2014-2020 GIMONS
// //
// XM6i // Base class for interfacing with disk images.
// Copyright (C) 2010-2015 isaki@NetBSD.org
// //
// Imported sava's Anex86/T98Next image and MO format support patch. // [ DiskImageHandle ]
// Comments translated to english by akuker.
// //
// [ DiskTrack and DiskCache ] //---------------------------------------------------------------------------
//
//---------------------------------------------------------------------------
#pragma once #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) 2022 akuker
// Copyright (C) 2014-2020 GIMONS
// //
// XM6i // Factory class for creating DiskImageHandles
// Copyright (C) 2010-2015 isaki@NetBSD.org
// //
// Imported sava's Anex86/T98Next image and MO format support patch. // [ DiskImageHandleFactory ]
// Comments translated to english by akuker.
//
// [ DiskTrack and DiskCache ]
// //
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
@ -23,27 +19,30 @@
DiskImageHandleType DiskImageHandleFactory::current_access_type = DiskImageHandleType::ePosixFile; 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; DiskImageHandle *result = NULL;
if (current_access_type == DiskImageHandleType::eMmapFile){ if (current_access_type == DiskImageHandleType::eMmapFile)
{
LOGINFO("%s Creating MmapFileAccess %s", __PRETTY_FUNCTION__, path.GetPath()) LOGINFO("%s Creating MmapFileAccess %s", __PRETTY_FUNCTION__, path.GetPath())
result = new MmapFileHandle(path, size, blocks, imgoff); 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()) LOGINFO("%s Creating DiskCache %s", __PRETTY_FUNCTION__, path.GetPath())
result = new DiskCache(path, size, blocks, imgoff); 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()) LOGINFO("%s Creating PosixFileHandle %s", __PRETTY_FUNCTION__, path.GetPath())
result = new PosixFileHandle(path, size, blocks, imgoff); result = new PosixFileHandle(path, size, blocks, imgoff);
} }
if (result == NULL){ if (result == NULL)
{
LOGWARN("%s Unable to create the File Access", __PRETTY_FUNCTION__); LOGWARN("%s Unable to create the File Access", __PRETTY_FUNCTION__);
} }
return result; 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) 2022 akuker
// Copyright (C) 2014-2020 GIMONS
// //
// XM6i // Factory class for creating DiskImageHandles
// Copyright (C) 2010-2015 isaki@NetBSD.org
// //
// Imported sava's Anex86/T98Next image and MO format support patch. // [ DiskImageHandleFactory ]
// Comments translated to english by akuker.
//
// [ DiskTrack and DiskCache ]
// //
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
@ -31,7 +27,7 @@ public:
static void SetFileAccessMethod(DiskImageHandleType method) { current_access_type = method; }; static void SetFileAccessMethod(DiskImageHandleType method) { current_access_type = method; };
static DiskImageHandleType GetFileAccessMethod() { return current_access_type; }; 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: private:
static DiskImageHandleType current_access_type; static DiskImageHandleType current_access_type;

View File

@ -1,5 +1,8 @@
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// //
// SCSI Target Emulator RaSCSI (*^..^*)
// for Raspberry Pi
//
// Copyright (C) 2022 akuker // Copyright (C) 2022 akuker
// //
// This method of file access will use the mmap() capabilities to 'map' the // 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 // caching mechanism (like in disk_track_cache.h), we just rely on the
// operating system. // operating system.
// //
// [ MmapFileAccess ] // [ MmapFileHandle ]
// //
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------

View File

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

View File

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