mirror of
https://github.com/akuker/RASCSI.git
synced 2024-06-10 02:29:33 +00:00
Updated to match new versioning structure
This commit is contained in:
parent
acd3cb2722
commit
ed27c07fcb
|
@ -75,6 +75,7 @@ SRC_RASCSI = \
|
|||
gpiobus.cpp \
|
||||
filepath.cpp \
|
||||
fileio.cpp\
|
||||
rascsi_version.cpp
|
||||
# os.cpp
|
||||
# rasctl_command.cpp
|
||||
# rascsi_mgr.cpp
|
||||
|
@ -87,13 +88,15 @@ SRC_SCSIMON = \
|
|||
scsi.cpp \
|
||||
gpiobus.cpp \
|
||||
filepath.cpp \
|
||||
fileio.cpp
|
||||
fileio.cpp\
|
||||
rascsi_version.cpp
|
||||
SRC_SCSIMON += $(shell find ./controllers -name '*.cpp')
|
||||
SRC_SCSIMON += $(shell find ./devices -name '*.cpp')
|
||||
|
||||
|
||||
SRC_RASCTL = \
|
||||
rasctl.cpp
|
||||
rasctl.cpp\
|
||||
rascsi_version.cpp
|
||||
# rasctl_command.cpp
|
||||
|
||||
SRC_RASDUMP = \
|
||||
|
@ -101,14 +104,16 @@ SRC_RASDUMP = \
|
|||
scsi.cpp \
|
||||
gpiobus.cpp \
|
||||
filepath.cpp \
|
||||
fileio.cpp
|
||||
fileio.cpp\
|
||||
rascsi_version.cpp
|
||||
|
||||
SRC_SASIDUMP = \
|
||||
sasidump.cpp \
|
||||
scsi.cpp \
|
||||
gpiobus.cpp \
|
||||
filepath.cpp \
|
||||
fileio.cpp
|
||||
fileio.cpp\
|
||||
rascsi_version.cpp
|
||||
|
||||
vpath %.h ./ ./controllers ./devices
|
||||
vpath %.cpp ./ ./controllers ./devices
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
#include "controllers/scsidev_ctrl.h"
|
||||
#include "gpiobus.h"
|
||||
#include "devices/scsi_host_bridge.h"
|
||||
#include "rascsi_version.h"
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
|
@ -553,12 +554,8 @@ void FASTCALL SCSIDEV::CmdInquiry()
|
|||
|
||||
// Processed on the disk side (it is originally processed by the controller)
|
||||
if (disk) {
|
||||
#ifdef RASCSI
|
||||
major = (DWORD)(RASCSI >> 8);
|
||||
minor = (DWORD)(RASCSI & 0xff);
|
||||
#else
|
||||
host->GetVM()->GetVersion(major, minor);
|
||||
#endif // RASCSI
|
||||
major = (DWORD)rascsi_major_version;
|
||||
minor = (DWORD)rascsi_minor_version;
|
||||
ctrl.length =
|
||||
ctrl.unit[lun]->Inquiry(ctrl.cmd, ctrl.buffer, major, minor);
|
||||
} else {
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
#include "controllers/scsidev_ctrl.h"
|
||||
#include "controllers/sasidev_ctrl.h"
|
||||
#include "gpiobus.h"
|
||||
#include "rascsi_version.h"
|
||||
#include "spdlog/spdlog.h"
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
@ -78,10 +79,8 @@ void KillHandler(int sig)
|
|||
void Banner(int argc, char* argv[])
|
||||
{
|
||||
FPRT(stdout,"SCSI Target Emulator RaSCSI(*^..^*) ");
|
||||
FPRT(stdout,"version %01d.%01d%01d(%s, %s)\n",
|
||||
(int)((VERSION >> 8) & 0xf),
|
||||
(int)((VERSION >> 4) & 0xf),
|
||||
(int)((VERSION ) & 0xf),
|
||||
FPRT(stdout,"version %s (%s, %s)\n",
|
||||
rascsi_get_version_string(),
|
||||
__DATE__,
|
||||
__TIME__);
|
||||
FPRT(stdout,"Powered by XM6 TypeG Technology / ");
|
||||
|
|
44
src/raspberrypi/rascsi_version.cpp
Normal file
44
src/raspberrypi/rascsi_version.cpp
Normal file
|
@ -0,0 +1,44 @@
|
|||
//---------------------------------------------------------------------------
|
||||
//
|
||||
// SCSI Target Emulator RaSCSI (*^..^*)
|
||||
// for Raspberry Pi
|
||||
//
|
||||
// Copyright (C) 2020 akuker
|
||||
// [ Define the version string]
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
#include "rascsi_version.h"
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
// The following should be updated for each release
|
||||
const int rascsi_major_version = 20; // Last two digits of year
|
||||
const int rascsi_minor_version = 12; // Month
|
||||
const int rascsi_patch_version = 2; // Patch number - increment for each update
|
||||
|
||||
static char rascsi_version_string[30]; // Allow for string up to "XX.XX.XXX" + null character + "development build"
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
// Get the RaSCSI version string
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
char* rascsi_get_version_string()
|
||||
{
|
||||
if(rascsi_patch_version < 0)
|
||||
{
|
||||
snprintf(rascsi_version_string, sizeof(rascsi_version_string),
|
||||
"%02d.%02d --DEVELOPMENT BUILD--",
|
||||
rascsi_major_version,
|
||||
rascsi_minor_version);
|
||||
}
|
||||
else
|
||||
{
|
||||
snprintf(rascsi_version_string, sizeof(rascsi_version_string), "%02d.%02d.%d",
|
||||
rascsi_major_version,
|
||||
rascsi_minor_version,
|
||||
rascsi_patch_version);
|
||||
}
|
||||
return rascsi_version_string;
|
||||
}
|
21
src/raspberrypi/rascsi_version.h
Normal file
21
src/raspberrypi/rascsi_version.h
Normal file
|
@ -0,0 +1,21 @@
|
|||
//---------------------------------------------------------------------------
|
||||
//
|
||||
// SCSI Target Emulator RaSCSI (*^..^*)
|
||||
// for Raspberry Pi
|
||||
//
|
||||
// Copyright (C) 2020 akuker
|
||||
// [ Define the version string]
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
#pragma once
|
||||
|
||||
extern const int rascsi_major_version; // Last two digits of year
|
||||
extern const int rascsi_minor_version; // Month
|
||||
extern const int rascsi_patch_version; // Patch number
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
// Fetch the version string
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
extern char* rascsi_get_version_string();
|
|
@ -10,6 +10,7 @@
|
|||
//---------------------------------------------------------------------------
|
||||
|
||||
#include "os.h"
|
||||
#include "rascsi_version.h"
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
|
@ -84,6 +85,10 @@ int main(int argc, char* argv[])
|
|||
// Display help
|
||||
if (argc < 2) {
|
||||
fprintf(stderr, "SCSI Target Emulator RaSCSI Controller\n");
|
||||
fprintf(stderr, "version %s (%s, %s)\n",
|
||||
rascsi_get_version_string(),
|
||||
__DATE__,
|
||||
__TIME__);
|
||||
fprintf(stderr,
|
||||
"Usage: %s -i ID [-u UNIT] [-c CMD] [-t TYPE] [-f FILE]\n",
|
||||
argv[0]);
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
#include "fileio.h"
|
||||
#include "filepath.h"
|
||||
#include "gpiobus.h"
|
||||
#include "rascsi_version.h"
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
|
@ -62,10 +63,10 @@ void KillHandler(int sig)
|
|||
BOOL Banner(int argc, char* argv[])
|
||||
{
|
||||
printf("RaSCSI hard disk dump utility ");
|
||||
printf("version %01d.%01d%01d\n",
|
||||
(int)((VERSION >> 8) & 0xf),
|
||||
(int)((VERSION >> 4) & 0xf),
|
||||
(int)((VERSION ) & 0xf));
|
||||
printf("version %s (%s, %s)\n",
|
||||
rascsi_get_version_string(),
|
||||
__DATE__,
|
||||
__TIME__);
|
||||
|
||||
if (argc < 2 || strcmp(argv[1], "-h") == 0) {
|
||||
printf("Usage: %s -i ID [-b BID] -f FILE [-r]\n", argv[0]);
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
#include "fileio.h"
|
||||
#include "filepath.h"
|
||||
#include "gpiobus.h"
|
||||
#include "rascsi_version.h"
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
|
@ -73,10 +74,10 @@ void KillHandler(int sig)
|
|||
BOOL Banner(int argc, char* argv[])
|
||||
{
|
||||
printf("RaSCSI hard disk dump utility(SASI HDD) ");
|
||||
printf("version %01d.%01d%01d\n",
|
||||
(int)((VERSION >> 8) & 0xf),
|
||||
(int)((VERSION >> 4) & 0xf),
|
||||
(int)((VERSION ) & 0xf));
|
||||
printf("version %s (%s, %s)\n",
|
||||
rascsi_get_version_string(),
|
||||
__DATE__,
|
||||
__TIME__);
|
||||
|
||||
if (argc < 2 || strcmp(argv[1], "-h") == 0) {
|
||||
printf("Usage: %s -i ID [-u UT] [-b BSIZE] -c COUNT -f FILE [-r]\n", argv[0]);
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
#include "devices/disk.h"
|
||||
#include "log.h"
|
||||
#include "gpiobus.h"
|
||||
#include "rascsi_version.h"
|
||||
#include "spdlog/spdlog.h"
|
||||
#include <sys/time.h>
|
||||
|
||||
|
@ -80,10 +81,8 @@ void KillHandler(int sig)
|
|||
void Banner(int argc, char* argv[])
|
||||
{
|
||||
LOGINFO("SCSI Monitor Capture Tool - part of RaSCSI(*^..^*) ");
|
||||
LOGINFO("version %01d.%01d%01d(%s, %s)",
|
||||
(int)((VERSION >> 8) & 0xf),
|
||||
(int)((VERSION >> 4) & 0xf),
|
||||
(int)((VERSION ) & 0xf),
|
||||
LOGINFO("version %s (%s, %s)\n",
|
||||
rascsi_get_version_string(),
|
||||
__DATE__,
|
||||
__TIME__);
|
||||
LOGINFO("Powered by XM6 TypeG Technology ");
|
||||
|
|
|
@ -13,19 +13,12 @@
|
|||
#if !defined(xm6_h)
|
||||
#define xm6_h
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
// VERSION
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
#define VERSION 0x0147
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
// RaSCSI
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
#define RASCSI VERSION
|
||||
#define RASCSI 1
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
|
|
Loading…
Reference in New Issue
Block a user