Rebrand project to PiSCSI (#1016)

* Rebrand project to PiSCSI
- rascsi ->piscsi
- rasctl -> scsictl
- rasdump -> scsidump
- ras* -> piscsi* (rasutil -> piscsi_util, etc.)

* Refined the formatting and wording of the app startup banner
* Kept some references to rascsi and rasctl where backwards compatibility is concerned
* Point to the new github repo URL

Co-authored-by: nucleogenic <nr@nucleogenic.com>
Co-authored-by: Uwe Seimet <Uwe.Seimet@seimet.de>
This commit is contained in:
Daniel Markstedt 2022-12-05 09:58:23 -08:00 committed by GitHub
parent 12068cafb8
commit 52c2aa474f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
274 changed files with 2341 additions and 2380 deletions

View File

@ -2,8 +2,8 @@
/*
# Paths to include
!/docker/backend/rascsi_wrapper.sh
!/docker/web/start.sh
!/docker/backend/piscsi_wrapper.sh
!/docker/web/web_start_wrapper.sh
!/doc
!/python
!/cpp
@ -22,7 +22,7 @@
**/*.pyc
**/__pycache__
**/.pytest_cache
**/rascsi_interface_pb2.py
**/piscsi_interface_pb2.py
**/report.xml
**/.idea

View File

@ -3,7 +3,7 @@
- Which version of Pi are you using:
- Which github revision of software:
- Which board version:
- Which computer is the RaSCSI connected to:
- Which computer is the PiSCSI connected to:
# Describe the issue

View File

@ -53,10 +53,10 @@ jobs:
# supports .ZIP files.
# This is workaround for https://github.com/actions/upload-artifact/issues/38
- name: Tar binary output
run: tar -czvf ${{ env.debug_flag_filename }}rascsi-${{ inputs.connect-type }}.tar.gz ./bin
run: tar -czvf ${{ env.debug_flag_filename }}piscsi-${{ inputs.connect-type }}.tar.gz ./bin
- name: Upload binaries
uses: actions/upload-artifact@v3
with:
name: ${{ env.debug_flag_filename }}arm-binaries-${{ inputs.connect-type }}.tar.gz
path: cpp/${{ env.debug_flag_filename }}rascsi-${{ inputs.connect-type }}.tar.gz
path: cpp/${{ env.debug_flag_filename }}piscsi-${{ inputs.connect-type }}.tar.gz

View File

@ -10,28 +10,28 @@ on:
jobs:
fullspec:
uses: akuker/RASCSI/.github/workflows/arm_cross_compile.yml@develop
uses: PiSCSI/piscsi/.github/workflows/arm_cross_compile.yml@develop
with:
connect-type: "FULLSPEC"
standard:
uses: akuker/RASCSI/.github/workflows/arm_cross_compile.yml@develop
uses: PiSCSI/piscsi/.github/workflows/arm_cross_compile.yml@develop
with:
connect-type: "STANDARD"
aibom:
uses: akuker/RASCSI/.github/workflows/arm_cross_compile.yml@develop
uses: PiSCSI/piscsi/.github/workflows/arm_cross_compile.yml@develop
with:
connect-type: "AIBOM"
gamernium:
uses: akuker/RASCSI/.github/workflows/arm_cross_compile.yml@develop
uses: PiSCSI/piscsi/.github/workflows/arm_cross_compile.yml@develop
with:
connect-type: "GAMERNIUM"
# The fullspec connection board is the most common
debug-fullspec:
uses: akuker/RASCSI/.github/workflows/arm_cross_compile.yml@develop
uses: PiSCSI/piscsi/.github/workflows/arm_cross_compile.yml@develop
with:
connect-type: "FULLSPEC"
debug-flag: true
debug-flag: true

View File

@ -26,25 +26,25 @@ jobs:
run: make -j $(nproc) test
- name: Run unit tests
run: (set -o pipefail && bin/fullspec/rascsi_test | tee rascsi_test_log.txt)
run: (set -o pipefail && bin/fullspec/piscsi_test | tee piscsi_test_log.txt)
- name: Upload logs
uses: actions/upload-artifact@v3
with:
name: rascsi_test_log.txt
path: cpp/rascsi_test_log.txt
name: piscsi_test_log.txt
path: cpp/piscsi_test_log.txt
sonarcloud:
runs-on: ubuntu-22.04
if: github.repository == 'akuker/RASCSI'
if: github.repository == 'PiSCSI/piscsi'
env:
SOURCES: cpp
BUILD_WRAPPER_OUT_DIR: "$HOME/.build_wrapper_out" # Directory where build-wrapper output will be placed
SONAR_SCANNER_VERSION: 4.7.0.2747
SONAR_SERVER_URL: "https://sonarcloud.io"
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_PROJECT_KEY: "akuker_RASCSI"
SONAR_ORGANIZATION: "rascsi"
SONAR_PROJECT_KEY: "akuker_PISCSI"
SONAR_ORGANIZATION: "piscsi"
steps:
- uses: actions/checkout@v3
with:

View File

@ -1,4 +1,4 @@
name: Generate a RaSCSI OS image, based upon the official Rapsberry Pi OS
name: Generate a PiSCSI OS image, based upon the official Rapsberry Pi OS
# Controls when the workflow will run
on:
@ -22,13 +22,13 @@ jobs:
# TODO: I don't think this step is needed....
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Checkout RaSCSI
- name: Checkout PiSCSI
uses: actions/checkout@v2
with:
path: RASCSI
path: PISCSI
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Checkout RaSCSI
- name: Checkout PiSCSI
uses: actions/checkout@v2
with:
repository: akuker/pi-gen
@ -40,8 +40,8 @@ jobs:
- name: Configure the build
run: |
echo -----------------------------------------------------
echo "IMG_NAME=RaSCSI-$GITHUB_RUN_ID" > config
echo "TARGET_HOSTNAME=rascsi" >> config
echo "IMG_NAME=PiSCSI-$GITHUB_RUN_ID" > config
echo "TARGET_HOSTNAME=piscsi" >> config
echo "ENABLE_SSH=1" >> config
echo "LOCALE_DEFAULT=en_US.UTF-8" >> config
echo "KEYBOARD_KEYMAP=us" >> config

1
.gitignore vendored
View File

@ -10,6 +10,7 @@ core
__pycache__
current
rascsi_interface_pb2.py
piscsi_interface_pb2.py
messages.pot
messages.mo
report.xml

View File

@ -3,7 +3,7 @@ BSD 3-Clause License
Copyright (C) 2001-2006 (ytanaka@ipc-tokai.or.jp)
Copyright (C) 2014-2020 GIMONS
Copyright (c) 2020-2021 akuker
Copyright (c) RaSCSI project contributors (github.com/akuker/rascsi)
Copyright (c) PiSCSI project contributors (github.com/PiSCSI/piscsi)
All rights reserved.
Redistribution and use in source and binary forms, with or without

View File

@ -1,10 +1,10 @@
# What is RaSCSI Reloaded?
RaSCSI Reloaded is a virtual SCSI device emulator that runs on a Raspberry Pi. It runs in userspace, and can emulate several SCSI devices at one time. There is a control interface to attach / detach drives during runtime, as well as insert and eject removable media. This project is aimed at users of vintage Macintosh and Atari computers and more (see [compatibility list](https://github.com/akuker/RASCSI/wiki/Compatibility)) from the 1980's and 1990's.
# What is PiSCSI?
PiSCSI is a virtual SCSI device emulator that runs on a Raspberry Pi. It runs in userspace, and can emulate several SCSI devices at one time. There is a control interface to attach / detach drives during runtime, as well as insert and eject removable media. This project is aimed at users of vintage Macintosh and Atari computers and more (see [compatibility list](https://github.com/PiSCSI/piscsi/wiki/Compatibility)) from the 1980's and 1990's.
Please check out the full story with much more detail on the [wiki](https://github.com/akuker/RASCSI/wiki)!
Please check out the full story with much more detail on the [wiki](https://github.com/PiSCSI/piscsi/wiki)!
# How do I contribute?
RaSCSI Reloaded is using the <a href="https://datasift.github.io/gitflow/IntroducingGitFlow.html">Gitflow Workflow</a>. A quick overview:
PiSCSI is using the <a href="https://datasift.github.io/gitflow/IntroducingGitFlow.html">Gitflow Workflow</a>. A quick overview:
- The *master* branch should always reflect the contents of the last stable release
- The *develop* branch should contain the latest tested & approved updates. Pull requests should be used to merge changes into develop.
@ -13,11 +13,11 @@ RaSCSI Reloaded is using the <a href="https://datasift.github.io/gitflow/Introdu
Typically, releases will only be planned every few months.
When you are ready to contribute code to RaSCSI Reloaded, follow the <a href="https://docs.github.com/en/get-started/quickstart/contributing-to-projects">GitHub Forking and Pull Request workflow</a> to create your own fork where you can make changes, and then contribute it back to the project. Please remember to always make Pull Requests against the *develop* branch.
When you are ready to contribute code to PiSCSI, follow the <a href="https://docs.github.com/en/get-started/quickstart/contributing-to-projects">GitHub Forking and Pull Request workflow</a> to create your own fork where you can make changes, and then contribute it back to the project. Please remember to always make Pull Requests against the *develop* branch.
If you want to add a new translation, or improve upon an existing one, please follow the <a href="https://github.com/akuker/RASCSI/blob/develop/python/web/README.md#localizing-the-web-interface">instructions in the Web Interface README</a>. Once the translation is complete, please use the same workflow as above to contribute it to the project.
If you want to add a new translation, or improve upon an existing one, please follow the <a href="https://github.com/PiSCSI/piscsi/tree/master/python/web#localizing-the-web-interface">instructions in the Web Interface README</a>. Once the translation is complete, please use the same workflow as above to contribute it to the project.
<a href="https://www.tindie.com/stores/landogriffin/?ref=offsite_badges&utm_source=sellers_akuker&utm_medium=badges&utm_campaign=badge_large"><img src="https://d2ss6ovg47m0r5.cloudfront.net/badges/tindie-larges.png" alt="I sell on Tindie" width="200" height="104"></a>[![SonarCloud](https://sonarcloud.io/images/project_badges/sonarcloud-orange.svg)](https://sonarcloud.io/summary/new_code?id=akuker_RASCSI)
<a href="https://www.tindie.com/stores/landogriffin/?ref=offsite_badges&utm_source=sellers_akuker&utm_medium=badges&utm_campaign=badge_large"><img src="https://d2ss6ovg47m0r5.cloudfront.net/badges/tindie-larges.png" alt="I sell on Tindie" width="200" height="104"></a>[![SonarCloud](https://sonarcloud.io/images/project_badges/sonarcloud-orange.svg)](https://sonarcloud.io/summary/new_code?id=akuker_PISCSI)
# GitHub Sponsors
Thank you to all of the GitHub sponsors who support the development community!

2
cpp/.gitignore vendored
View File

@ -7,7 +7,7 @@
*.vcd
*.json
*.html
rascsi.dat
piscsi.dat
obj
bin
coverage

View File

@ -41,7 +41,7 @@ ifeq "$(GCCVERSION10)" "1"
endif
## CONNECT_TYPE=FULLSPEC : Specify the type of RaSCSI board type
## CONNECT_TYPE=FULLSPEC : Specify the type of PiSCSI board type
## that you are using. The typical options are
## STANDARD or FULLSPEC. The default is FULLSPEC
## * THIS IS TYPICALLY THE ONLY COMPILE OPTION YOU
@ -53,90 +53,90 @@ ifdef CONNECT_TYPE
CXXFLAGS += -DCONNECT_TYPE_$(CONNECT_TYPE)
endif
RASCSI = rascsi
RASCTL = rasctl
RASDUMP = rasdump
PISCSI = piscsi
SCSICTL = scsictl
SCSIDUMP = scsidump
SCSIMON = scsimon
RASCSI_TEST = rascsi_test
PISCSI_TEST = piscsi_test
SCSILOOP = scsiloop
SYSTEMD_CONF = /etc/systemd/system/rascsi.service
RSYSLOG_CONF = /etc/rsyslog.d/rascsi.conf
RSYSLOG_LOG = /var/log/rascsi.log
SYSTEMD_CONF = /etc/systemd/system/piscsi.service
RSYSLOG_CONF = /etc/rsyslog.d/piscsi.conf
RSYSLOG_LOG = /var/log/piscsi.log
USR_LOCAL_BIN = /usr/local/bin
MAN_PAGE_DIR = /usr/local/man/man1
DOC_DIR = ../doc
COVERAGE_DIR = coverage
COVERAGE_FILE = rascsi.dat
COVERAGE_FILE = piscsi.dat
OS_FILES = os_integration
OBJDIR := obj/$(shell echo $(CONNECT_TYPE) | tr '[:upper:]' '[:lower:]')
BINDIR := bin/$(shell echo $(CONNECT_TYPE) | tr '[:upper:]' '[:lower:]')
BIN_ALL = \
$(BINDIR)/$(RASCSI) \
$(BINDIR)/$(RASCTL) \
$(BINDIR)/$(PISCSI) \
$(BINDIR)/$(SCSICTL) \
$(BINDIR)/$(SCSIMON) \
$(BINDIR)/$(RASDUMP) \
$(BINDIR)/$(SCSIDUMP) \
$(BINDIR)/$(SCSILOOP)
SRC_PROTOC = rascsi_interface.proto
SRC_PROTOC = piscsi_interface.proto
SRC_GENERATED = $(GENERATED_DIR)/rascsi_interface.pb.cpp
SRC_GENERATED = $(GENERATED_DIR)/piscsi_interface.pb.cpp
SRC_PROTOBUF = \
shared/protobuf_util.cpp \
shared/protobuf_serializer.cpp
SRC_SHARED = \
shared/rascsi_version.cpp \
shared/rasutil.cpp
shared/piscsi_version.cpp \
shared/piscsi_util.cpp
SRC_RASCSI_CORE = $(shell find ./rascsi -name '*.cpp')
SRC_RASCSI_CORE += $(shell find ./controllers -name '*.cpp')
SRC_RASCSI_CORE += $(shell find ./devices -name '*.cpp')
SRC_RASCSI_CORE += $(shell find ./hal -name '*.cpp')
SRC_PISCSI_CORE = $(shell find ./piscsi -name '*.cpp')
SRC_PISCSI_CORE += $(shell find ./controllers -name '*.cpp')
SRC_PISCSI_CORE += $(shell find ./devices -name '*.cpp')
SRC_PISCSI_CORE += $(shell find ./hal -name '*.cpp')
SRC_RASCSI = rascsi.cpp
SRC_PISCSI = piscsi.cpp
SRC_SCSIMON = scsimon.cpp
SRC_SCSIMON += $(shell find ./monitor -name '*.cpp')
SRC_SCSIMON += $(shell find ./hal -name '*.cpp')
SRC_RASCTL_CORE = $(shell find ./rasctl -name '*.cpp')
SRC_SCSICTL_CORE = $(shell find ./scsictl -name '*.cpp')
SRC_RASCTL = rasctl.cpp
SRC_SCSICTL = scsictl.cpp
SRC_RASDUMP = rasdump.cpp
SRC_RASDUMP += $(shell find ./rasdump -name '*.cpp')
SRC_RASDUMP += $(shell find ./hal -name '*.cpp')
SRC_SCSIDUMP = scsidump.cpp
SRC_SCSIDUMP += $(shell find ./scsidump -name '*.cpp')
SRC_SCSIDUMP += $(shell find ./hal -name '*.cpp')
SRC_RASCSI_TEST = $(shell find ./test -name '*.cpp')
SRC_RASCSI_TEST += $(shell find ./rasdump -name '*.cpp')
SRC_RASCSI_TEST += $(shell find ./monitor -name '*.cpp')
SRC_PISCSI_TEST = $(shell find ./test -name '*.cpp')
SRC_PISCSI_TEST += $(shell find ./scsidump -name '*.cpp')
SRC_PISCSI_TEST += $(shell find ./monitor -name '*.cpp')
SRC_SCSILOOP = scsiloop.cpp
SRC_SCSILOOP += $(shell find ./scsiloop -name '*.cpp')
SRC_SCSILOOP += $(shell find ./hal -name '*.cpp')
vpath %.h ./ ./shared ./controllers ./devices ./monitor ./hal \
./hal/boards ./hal/pi_defs ./rascsi ./rasctl ./rasdump \
./hal/boards ./hal/pi_defs ./piscsi ./scsictl ./scsidump \
./scsiloop
vpath %.cpp ./ ./shared ./controllers ./devices ./monitor ./hal \
./hal/boards ./hal/pi_defs ./rascsi ./rasctl ./rasdump \
./hal/boards ./hal/pi_defs ./piscsi ./scsictl ./scsidump \
./scsiloop ./test
vpath %.o ./$(OBJDIR)
vpath ./$(BINDIR)
OBJ_RASCSI_CORE := $(addprefix $(OBJDIR)/,$(notdir $(SRC_RASCSI_CORE:%.cpp=%.o)))
OBJ_RASCSI := $(addprefix $(OBJDIR)/,$(notdir $(SRC_RASCSI:%.cpp=%.o)))
OBJ_RASCTL_CORE := $(addprefix $(OBJDIR)/,$(notdir $(SRC_RASCTL_CORE:%.cpp=%.o)))
OBJ_RASCTL := $(addprefix $(OBJDIR)/,$(notdir $(SRC_RASCTL:%.cpp=%.o)))
OBJ_RASDUMP := $(addprefix $(OBJDIR)/,$(notdir $(SRC_RASDUMP:%.cpp=%.o)))
OBJ_PISCSI_CORE := $(addprefix $(OBJDIR)/,$(notdir $(SRC_PISCSI_CORE:%.cpp=%.o)))
OBJ_PISCSI := $(addprefix $(OBJDIR)/,$(notdir $(SRC_PISCSI:%.cpp=%.o)))
OBJ_SCSICTL_CORE := $(addprefix $(OBJDIR)/,$(notdir $(SRC_SCSICTL_CORE:%.cpp=%.o)))
OBJ_SCSICTL := $(addprefix $(OBJDIR)/,$(notdir $(SRC_SCSICTL:%.cpp=%.o)))
OBJ_SCSIDUMP := $(addprefix $(OBJDIR)/,$(notdir $(SRC_SCSIDUMP:%.cpp=%.o)))
OBJ_SCSIMON := $(addprefix $(OBJDIR)/,$(notdir $(SRC_SCSIMON:%.cpp=%.o)))
OBJ_RASCSI_TEST := $(addprefix $(OBJDIR)/,$(notdir $(SRC_RASCSI_TEST:%.cpp=%.o)))
OBJ_PISCSI_TEST := $(addprefix $(OBJDIR)/,$(notdir $(SRC_PISCSI_TEST:%.cpp=%.o)))
OBJ_SCSILOOP := $(addprefix $(OBJDIR)/,$(notdir $(SRC_SCSILOOP:%.cpp=%.o)))
OBJ_SHARED := $(addprefix $(OBJDIR)/,$(notdir $(SRC_SHARED:%.cpp=%.o)))
OBJ_PROTOBUF := $(addprefix $(OBJDIR)/,$(notdir $(SRC_PROTOBUF:%.cpp=%.o)))
@ -151,7 +151,7 @@ TEST_WRAPS = -Wl,--wrap=fopen64
# The following will include all of the auto-generated dependency files (*.d)
# if they exist. This will trigger a rebuild of a source file if a header changes
ALL_DEPS := $(patsubst %.o,%.d,$(OBJ_RASCSI_CORE) $(OBJ_RASCTL_CORE) $(OBJ_RASCSI) $(OBJ_RASCTL) $(OBJ_RASDUMP) $(OBJ_SCSIMON) $(OBJ_SHARED) $(OBJ_PROTOBUF) $(OBJ_RASCSI_TEST) $(OBJ_SCSILOOP))
ALL_DEPS := $(patsubst %.o,%.d,$(OBJ_PISCSI_CORE) $(OBJ_SCSICTL_CORE) $(OBJ_PISCSI) $(OBJ_SCSICTL) $(OBJ_SCSIDUMP) $(OBJ_SCSIMON) $(OBJ_SHARED) $(OBJ_PROTOBUF) $(OBJ_PISCSI_TEST) $(OBJ_SCSILOOP))
-include $(ALL_DEPS)
$(OBJDIR) $(BINDIR):
@ -165,7 +165,7 @@ $(SRC_GENERATED) : $(SRC_PROTOC)
@echo "-- Generating protobuf-based source files"
mkdir -p $(GENERATED_DIR)
protoc --cpp_out=$(GENERATED_DIR) $(SRC_PROTOC)
mv $(GENERATED_DIR)/rascsi_interface.pb.cc $@
mv $(GENERATED_DIR)/piscsi_interface.pb.cc $@
$(OBJ_GENERATED) : $(SRC_GENERATED)
$(CXX) $(CXXFLAGS) -c $< -o $@
@ -183,46 +183,46 @@ $(OBJ_GENERATED) : $(SRC_GENERATED)
.PHONY: all ALL docs test coverage lcov
all: $(BIN_ALL) docs
test: $(BINDIR)/$(RASCSI_TEST)
$(BINDIR)/$(RASCSI_TEST)
test: $(BINDIR)/$(PISCSI_TEST)
$(BINDIR)/$(PISCSI_TEST)
coverage: CXXFLAGS += --coverage
coverage: test
lcov: CXXFLAGS += --coverage
lcov: test
lcov -q -c -d . --include '*/cpp/*' -o $(COVERAGE_FILE) --exclude '*/test/*' --exclude '*/interfaces/*' --exclude '*/rascsi_interface.pb*'
lcov -q -c -d . --include '*/cpp/*' -o $(COVERAGE_FILE) --exclude '*/test/*' --exclude '*/interfaces/*' --exclude '*/piscsi_interface.pb*'
genhtml -q -o $(COVERAGE_DIR) --legend $(COVERAGE_FILE)
docs: $(DOC_DIR)/rascsi_man_page.txt $(DOC_DIR)/rasctl_man_page.txt $(DOC_DIR)/scsimon_man_page.txt $(DOC_DIR)/rasdump_man_page.txt $(DOC_DIR)/scsiloop_man_page.txt
docs: $(DOC_DIR)/piscsi_man_page.txt $(DOC_DIR)/scsictl_man_page.txt $(DOC_DIR)/scsimon_man_page.txt $(DOC_DIR)/scsidump_man_page.txt $(DOC_DIR)/scsiloop_man_page.txt
$(SRC_RASCSI_CORE) $(SRC_RASCTL_CORE) : $(OBJ_GENERATED)
$(SRC_PISCSI_CORE) $(SRC_SCSICTL_CORE) : $(OBJ_GENERATED)
$(BINDIR)/$(RASCSI): $(SRC_GENERATED) $(OBJ_RASCSI_CORE) $(OBJ_RASCSI) $(OBJ_SHARED) $(OBJ_PROTOBUF) $(OBJ_GENERATED) | $(BINDIR)
$(CXX) $(CXXFLAGS) -o $@ $(OBJ_RASCSI_CORE) $(OBJ_RASCSI) $(OBJ_SHARED) $(OBJ_PROTOBUF) $(OBJ_GENERATED) -lpthread -lpcap -lprotobuf -lstdc++fs
$(BINDIR)/$(PISCSI): $(SRC_GENERATED) $(OBJ_PISCSI_CORE) $(OBJ_PISCSI) $(OBJ_SHARED) $(OBJ_PROTOBUF) $(OBJ_GENERATED) | $(BINDIR)
$(CXX) $(CXXFLAGS) -o $@ $(OBJ_PISCSI_CORE) $(OBJ_PISCSI) $(OBJ_SHARED) $(OBJ_PROTOBUF) $(OBJ_GENERATED) -lpthread -lpcap -lprotobuf -lstdc++fs
$(BINDIR)/$(RASCTL): $(SRC_GENERATED) $(OBJ_RASCTL_CORE) $(OBJ_RASCTL) $(OBJ_SHARED) $(OBJ_PROTOBUF) $(OBJ_GENERATED) | $(BINDIR)
$(CXX) $(CXXFLAGS) -o $@ $(OBJ_RASCTL_CORE) $(OBJ_RASCTL) $(OBJ_SHARED) $(OBJ_PROTOBUF) $(OBJ_GENERATED) -lpthread -lprotobuf
$(BINDIR)/$(SCSICTL): $(SRC_GENERATED) $(OBJ_SCSICTL_CORE) $(OBJ_SCSICTL) $(OBJ_SHARED) $(OBJ_PROTOBUF) $(OBJ_GENERATED) | $(BINDIR)
$(CXX) $(CXXFLAGS) -o $@ $(OBJ_SCSICTL_CORE) $(OBJ_SCSICTL) $(OBJ_SHARED) $(OBJ_PROTOBUF) $(OBJ_GENERATED) -lpthread -lprotobuf
$(BINDIR)/$(RASDUMP): $(OBJ_RASDUMP) $(OBJ_SHARED) | $(BINDIR)
$(CXX) $(CXXFLAGS) -o $@ $(OBJ_RASDUMP) $(OBJ_SHARED)
$(BINDIR)/$(SCSIDUMP): $(OBJ_SCSIDUMP) $(OBJ_SHARED) | $(BINDIR)
$(CXX) $(CXXFLAGS) -o $@ $(OBJ_SCSIDUMP) $(OBJ_SHARED)
$(BINDIR)/$(SCSIMON): $(OBJ_SCSIMON) $(OBJ_SHARED) | $(BINDIR)
$(CXX) $(CXXFLAGS) -o $@ $(OBJ_SCSIMON) $(OBJ_SHARED)
$(BINDIR)/$(RASCSI_TEST): $(SRC_GENERATED) $(OBJ_RASCSI_CORE) $(OBJ_RASCTL_CORE) $(OBJ_RASCSI_TEST) $(OBJ_RASCTL_TEST) $(OBJ_SHARED) $(OBJ_PROTOBUF) $(OBJ_GENERATED) | $(BINDIR)
$(CXX) $(CXXFLAGS) $(TEST_WRAPS) -o $@ $(OBJ_RASCSI_CORE) $(OBJ_RASCTL_CORE) $(OBJ_RASCSI_TEST) $(OBJ_SHARED) $(OBJ_PROTOBUF) $(OBJ_GENERATED) -lpthread -lpcap -lprotobuf -lstdc++fs -lgmock -lgtest
$(BINDIR)/$(PISCSI_TEST): $(SRC_GENERATED) $(OBJ_PISCSI_CORE) $(OBJ_SCSICTL_CORE) $(OBJ_PISCSI_TEST) $(OBJ_SCSICTL_TEST) $(OBJ_SHARED) $(OBJ_PROTOBUF) $(OBJ_GENERATED) | $(BINDIR)
$(CXX) $(CXXFLAGS) $(TEST_WRAPS) -o $@ $(OBJ_PISCSI_CORE) $(OBJ_SCSICTL_CORE) $(OBJ_PISCSI_TEST) $(OBJ_SHARED) $(OBJ_PROTOBUF) $(OBJ_GENERATED) -lpthread -lpcap -lprotobuf -lstdc++fs -lgmock -lgtest
$(BINDIR)/$(SCSILOOP): $(OBJ_SHARED) $(OBJ_SCSILOOP) | $(BINDIR)
$(CXX) $(CXXFLAGS) -o $@ $(OBJ_SHARED) $(OBJ_SCSILOOP)
# Phony rules for building individual utilities
.PHONY: $(RASCSI) $(RASCTL) $(RASDUMP) $(SCSIMON) $(RASCSI_TEST) $(SCSILOOP)
$(RASCSI) : $(BINDIR)/$(RASCSI)
$(RASCTL) : $(BINDIR)/$(RASCTL)
$(RASDUMP) : $(BINDIR)/$(RASDUMP)
.PHONY: $(PISCSI) $(SCSICTL) $(SCSIDUMP) $(SCSIMON) $(PISCSI_TEST) $(SCSILOOP)
$(PISCSI) : $(BINDIR)/$(PISCSI)
$(SCSICTL) : $(BINDIR)/$(SCSICTL)
$(SCSIDUMP) : $(BINDIR)/$(SCSIDUMP)
$(SCSIMON) : $(BINDIR)/$(SCSIMON)
$(RASCSI_TEST): $(BINDIR)/$(RASCSI_TEST)
$(PISCSI_TEST): $(BINDIR)/$(PISCSI_TEST)
$(SCSILOOP) : $(BINDIR)/$(SCSILOOP)
## clean : Remove all of the object files, intermediate
@ -233,28 +233,28 @@ clean:
## install : Copies all of the man pages to the correct location
## Copies the binaries to a global install location
## Configures the Systemd and RSyslog services to auto-run RaSCSI
## Configures the Systemd and RSyslog services to auto-run PiSCSI
## * This target needs to be run with sudo (ex: sudo make install)
## * Before running this, you need to stop the rascsi service if
## * Before running this, you need to stop the piscsi service if
## * it is already running:
## * sudo systemctl stop rascsi
## * sudo systemctl stop piscsi
## * After running this, you will need to reboot or run:
## * sudo systemctl daemon-reload
## * sudo systemctl restart rsyslog
## * sudo systemctl enable rascsi
## * sudo systemctl start rascsi
## * sudo systemctl enable piscsi
## * sudo systemctl start piscsi
.PHONY: install
install: \
$(MAN_PAGE_DIR)/rascsi.1 \
$(MAN_PAGE_DIR)/rasctl.1 \
$(MAN_PAGE_DIR)/piscsi.1 \
$(MAN_PAGE_DIR)/scsictl.1 \
$(MAN_PAGE_DIR)/scsimon.1 \
$(MAN_PAGE_DIR)/scsiloop.1 \
$(MAN_PAGE_DIR)/rasdump.1 \
$(USR_LOCAL_BIN)/$(RASCTL) \
$(USR_LOCAL_BIN)/$(RASCSI) \
$(MAN_PAGE_DIR)/scsidump.1 \
$(USR_LOCAL_BIN)/$(SCSICTL) \
$(USR_LOCAL_BIN)/$(PISCSI) \
$(USR_LOCAL_BIN)/$(SCSIMON) \
$(USR_LOCAL_BIN)/$(SCSILOOP) \
$(USR_LOCAL_BIN)/$(RASDUMP) \
$(USR_LOCAL_BIN)/$(SCSIDUMP) \
$(SYSTEMD_CONF) \
$(RSYSLOG_CONF) \
$(RSYSLOG_LOG)
@ -283,8 +283,8 @@ $(RSYSLOG_CONF) : $(OS_FILES)/$(notdir $(RSYSLOG_CONF))
$(RSYSLOG_LOG) :
@echo "-- Creating $@"
touch /var/log/rascsi.log
chown root:adm /var/log/rascsi.log
touch /var/log/piscsi.log
chown root:adm /var/log/piscsi.log
$(MAN_PAGE_DIR)/:
echo "-- Creating directory $@"

View File

@ -1,13 +1,13 @@
//---------------------------------------------------------------------------
//
// SCSI Target Emulator RaSCSI Reloaded
// SCSI Target Emulator PiSCSI
// for Raspberry Pi
//
// Copyright (C) 2022 Uwe Seimet
//
//---------------------------------------------------------------------------
#include "shared/rascsi_exceptions.h"
#include "shared/piscsi_exceptions.h"
#include "devices/primary_device.h"
#include "abstract_controller.h"

View File

@ -1,6 +1,6 @@
//---------------------------------------------------------------------------
//
// SCSI Target Emulator RaSCSI Reloaded
// SCSI Target Emulator PiSCSI
// for Raspberry Pi
//
// Copyright (C) 2022 Uwe Seimet
@ -30,9 +30,9 @@ public:
static inline const int UNKNOWN_INITIATOR_ID = -1;
enum class rascsi_shutdown_mode {
enum class piscsi_shutdown_mode {
NONE,
STOP_RASCSI,
STOP_PISCSI,
STOP_PI,
RESTART_PI
};
@ -49,7 +49,7 @@ public:
// Get requested LUN based on IDENTIFY message, with LUN from the CDB as fallback
virtual int GetEffectiveLun() const = 0;
virtual void ScheduleShutdown(rascsi_shutdown_mode) = 0;
virtual void ScheduleShutdown(piscsi_shutdown_mode) = 0;
int GetTargetId() const { return target_id; }
int GetMaxLuns() const { return max_luns; }

View File

@ -1,6 +1,6 @@
//---------------------------------------------------------------------------
//
// SCSI Target Emulator RaSCSI Reloaded
// SCSI Target Emulator PiSCSI
// for Raspberry Pi
//
// Copyright (C) 2022 Uwe Seimet

View File

@ -1,6 +1,6 @@
//---------------------------------------------------------------------------
//
// SCSI Target Emulator RaSCSI Reloaded
// SCSI Target Emulator PiSCSI
// for Raspberry Pi
//
// Copyright (C) 2022 Uwe Seimet

View File

@ -1,6 +1,6 @@
//---------------------------------------------------------------------------
//
// SCSI Target Emulator RaSCSI Reloaded
// SCSI Target Emulator PiSCSI
// for Raspberry Pi
//
// Copyright (C) 2022 Uwe Seimet

View File

@ -1,6 +1,6 @@
//---------------------------------------------------------------------------
//
// SCSI Target Emulator RaSCSI Reloaded
// SCSI Target Emulator PiSCSI
// for Raspberry Pi
//
// Copyright (C) 2001-2006 (ytanaka@ipc-tokai.or.jp)
@ -13,7 +13,7 @@
//
//---------------------------------------------------------------------------
#include "shared/rascsi_exceptions.h"
#include "shared/piscsi_exceptions.h"
#include "hal/gpiobus.h"
#include "hal/systimer.h"
#include "devices/interfaces/byte_writer.h"
@ -108,29 +108,29 @@ void ScsiController::BusFree()
SetByteTransfer(false);
if (shutdown_mode != rascsi_shutdown_mode::NONE) {
if (shutdown_mode != piscsi_shutdown_mode::NONE) {
// Prepare the shutdown by flushing all caches
for (const auto& device : GetControllerManager()->GetAllDevices()) {
device->FlushCache();
}
}
// When the bus is free RaSCSI or the Pi may be shut down.
// When the bus is free PiSCSI or the Pi may be shut down.
// This code has to be executed in the bus free phase and thus has to be located in the controller.
switch(shutdown_mode) {
case rascsi_shutdown_mode::STOP_RASCSI:
logger.Info("RaSCSI shutdown requested");
case piscsi_shutdown_mode::STOP_PISCSI:
logger.Info("PiSCSI shutdown requested");
exit(EXIT_SUCCESS);
break;
case rascsi_shutdown_mode::STOP_PI:
case piscsi_shutdown_mode::STOP_PI:
logger.Info("Raspberry Pi shutdown requested");
if (system("init 0") == -1) {
logger.Error("Raspberry Pi shutdown failed: " + string(strerror(errno)));
}
break;
case rascsi_shutdown_mode::RESTART_PI:
case piscsi_shutdown_mode::RESTART_PI:
logger.Info("Raspberry Pi restart requested");
if (system("init 6") == -1) {
logger.Error("Raspberry Pi restart failed: " + string(strerror(errno)));

View File

@ -1,6 +1,6 @@
//---------------------------------------------------------------------------
//
// SCSI Target Emulator RaSCSI Reloaded
// SCSI Target Emulator PiSCSI
// for Raspberry Pi
//
// Copyright (C) 2001-2006 (ytanaka@ipc-tokai.or.jp)
@ -83,7 +83,7 @@ public:
// e.g. by using ifdef __arm__. Currently the unit tests require this method to be public.
virtual void Execute();
void ScheduleShutdown(rascsi_shutdown_mode mode) override { shutdown_mode = mode; }
void ScheduleShutdown(piscsi_shutdown_mode mode) override { shutdown_mode = mode; }
private:
@ -117,6 +117,6 @@ private:
scsi_t scsi = {};
AbstractController::rascsi_shutdown_mode shutdown_mode = AbstractController::rascsi_shutdown_mode::NONE;
AbstractController::piscsi_shutdown_mode shutdown_mode = AbstractController::piscsi_shutdown_mode::NONE;
};

View File

@ -1,6 +1,6 @@
//---------------------------------------------------------------------------
//
// SCSI Target Emulator RaSCSI Reloaded
// SCSI Target Emulator PiSCSI
// for Raspberry Pi
//
// Copyright (C) 2001-2006 (ytanaka@ipc-tokai.or.jp)

View File

@ -1,6 +1,6 @@
//---------------------------------------------------------------------------
//
// SCSI Target Emulator RaSCSI Reloaded
// SCSI Target Emulator PiSCSI
// for Raspberry Pi
//
// Copyright (C) 2001-2006 (ytanaka@ipc-tokai.or.jp)

View File

@ -1,6 +1,6 @@
//---------------------------------------------------------------------------
//
// SCSI Target Emulator RaSCSI Reloaded
// SCSI Target Emulator PiSCSI
// for Raspberry Pi
//
// Powered by XM6 TypeG Technology.

View File

@ -1,6 +1,6 @@
//---------------------------------------------------------------------------
//
// SCSI Target Emulator RaSCSI Reloaded
// SCSI Target Emulator PiSCSI
// for Raspberry Pi
//
// Powered by XM6 TypeG Technology.

View File

@ -1,6 +1,6 @@
//---------------------------------------------------------------------------
//
// SCSI Target Emulator RaSCSI Reloaded
// SCSI Target Emulator PiSCSI
// for Raspberry Pi
//
// Powered by XM6 TypeG Technology.
@ -10,8 +10,8 @@
//---------------------------------------------------------------------------
#include "shared/log.h"
#include "shared/rasutil.h"
#include "shared/rascsi_exceptions.h"
#include "shared/piscsi_util.h"
#include "shared/piscsi_exceptions.h"
#include <unistd.h>
#include <poll.h>
#include <arpa/inet.h>
@ -28,7 +28,7 @@
#endif
using namespace std;
using namespace ras_util;
using namespace piscsi_util;
//---------------------------------------------------------------------------
//
@ -60,10 +60,10 @@ CTapDriver::~CTapDriver()
if (int br_socket_fd; (br_socket_fd = socket(AF_LOCAL, SOCK_STREAM, 0)) < 0) {
LOGERROR("Can't open bridge socket: %s", strerror(errno))
} else {
LOGDEBUG("brctl delif %s ras0", BRIDGE_NAME)
if (!br_setif(br_socket_fd, BRIDGE_NAME, "ras0", false)) { //NOSONAR No exception is raised here
LOGWARN("Warning: Removing ras0 from the bridge failed.")
LOGWARN("You may need to manually remove the ras0 tap device from the bridge")
LOGDEBUG("brctl delif %s piscsi0", BRIDGE_NAME)
if (!br_setif(br_socket_fd, BRIDGE_NAME, "piscsi0", false)) { //NOSONAR No exception is raised here
LOGWARN("Warning: Removing piscsi0 from the bridge failed.")
LOGWARN("You may need to manually remove the piscsi0 tap device from the bridge")
}
close(br_socket_fd);
}
@ -148,7 +148,7 @@ bool CTapDriver::Init(const unordered_map<string, string>& const_params)
// IFF_NO_PI for no extra packet information
ifreq ifr = {};
ifr.ifr_flags = IFF_TAP | IFF_NO_PI;
string dev = "ras0";
string dev = "piscsi0";
strncpy(ifr.ifr_name, dev.c_str(), IFNAMSIZ - 1);
LOGTRACE("Going to open %s", ifr.ifr_name)
@ -315,18 +315,18 @@ bool CTapDriver::Init(const unordered_map<string, string>& const_params)
LOGINFO("%s is already available", BRIDGE_NAME)
}
LOGTRACE("ip link set ras0 up")
LOGTRACE("ip link set piscsi0 up")
if (!ip_link(ip_fd, "ras0", true)) {
if (!ip_link(ip_fd, "piscsi0", true)) {
close(m_hTAP);
close(ip_fd);
close(br_socket_fd);
return false;
}
LOGTRACE("brctl addif %s ras0", BRIDGE_NAME)
LOGTRACE("brctl addif %s piscsi0", BRIDGE_NAME)
if (!br_setif(br_socket_fd, BRIDGE_NAME, "ras0", true)) {
if (!br_setif(br_socket_fd, BRIDGE_NAME, "piscsi0", true)) {
close(m_hTAP);
close(ip_fd);
close(br_socket_fd);
@ -378,8 +378,8 @@ void CTapDriver::OpenDump(const string& path) {
bool CTapDriver::Enable() const
{
const int fd = socket(PF_INET, SOCK_DGRAM, 0);
LOGDEBUG("%s: ip link set ras0 up", __PRETTY_FUNCTION__)
const bool result = ip_link(fd, "ras0", true);
LOGDEBUG("%s: ip link set piscsi0 up", __PRETTY_FUNCTION__)
const bool result = ip_link(fd, "piscsi0", true);
close(fd);
return result;
}
@ -387,8 +387,8 @@ bool CTapDriver::Enable() const
bool CTapDriver::Disable() const
{
const int fd = socket(PF_INET, SOCK_DGRAM, 0);
LOGDEBUG("%s: ip link set ras0 down", __PRETTY_FUNCTION__)
const bool result = ip_link(fd, "ras0", false);
LOGDEBUG("%s: ip link set piscsi0 down", __PRETTY_FUNCTION__)
const bool result = ip_link(fd, "piscsi0", false);
close(fd);
return result;
}

View File

@ -1,6 +1,6 @@
//---------------------------------------------------------------------------
//
// SCSI Target Emulator RaSCSI Reloaded
// SCSI Target Emulator PiSCSI
// for Raspberry Pi
//
// Powered by XM6 TypeG Technology.
@ -22,7 +22,7 @@ using namespace std;
class CTapDriver
{
static constexpr const char *BRIDGE_NAME = "rascsi_bridge";
static constexpr const char *BRIDGE_NAME = "piscsi_bridge";
public:
@ -37,8 +37,8 @@ public:
int Receive(uint8_t *buf);
int Send(const uint8_t *buf, int len);
bool PendingPackets() const; // Check if there are IP packets available
bool Enable() const; // Enable the ras0 interface
bool Disable() const; // Disable the ras0 interface
bool Enable() const; // Enable the piscsi0 interface
bool Disable() const; // Disable the piscsi0 interface
void Flush(); // Purge all of the packets that are waiting to be processed
static uint32_t Crc32(const uint8_t *, int);

View File

@ -1,13 +1,13 @@
//---------------------------------------------------------------------------
//
// SCSI Target Emulator RaSCSI Reloaded
// SCSI Target Emulator PiSCSI
// for Raspberry Pi
//
// Copyright (C) 2021-2022 Uwe Seimet
//
//---------------------------------------------------------------------------
#include "shared/rascsi_version.h"
#include "shared/piscsi_version.h"
#include "device.h"
#include <cassert>
#include <sstream>
@ -18,7 +18,7 @@ using namespace std;
Device::Device(PbDeviceType type, int lun) : type(type), lun(lun)
{
ostringstream os;
os << setw(2) << setfill('0') << rascsi_major_version << setw(2) << setfill('0') << rascsi_minor_version;
os << setw(2) << setfill('0') << piscsi_major_version << setw(2) << setfill('0') << piscsi_minor_version;
revision = os.str();
}

View File

@ -1,6 +1,6 @@
//---------------------------------------------------------------------------
//
// SCSI Target Emulator RaSCSI Reloaded
// SCSI Target Emulator PiSCSI
// for Raspberry Pi
//
// Copyright (C) 2021-2022 Uwe Seimet
@ -10,16 +10,16 @@
#pragma once
#include "shared/log.h"
#include "generated/rascsi_interface.pb.h"
#include "generated/piscsi_interface.pb.h"
#include <unordered_map>
#include <string>
using namespace std;
using namespace rascsi_interface;
using namespace piscsi_interface;
class Device //NOSONAR The number of fields and methods is justified, the complexity is low
{
const string DEFAULT_VENDOR = "RaSCSI";
const string DEFAULT_VENDOR = "PiSCSI";
PbDeviceType type;

View File

@ -1,13 +1,13 @@
//---------------------------------------------------------------------------
//
// SCSI Target Emulator RaSCSI Reloaded
// SCSI Target Emulator PiSCSI
// for Raspberry Pi
//
// Copyright (C) 2021-2022 Uwe Seimet
//
//---------------------------------------------------------------------------
#include "shared/rasutil.h"
#include "shared/piscsi_util.h"
#include "scsihd.h"
#include "scsihd_nec.h"
#include "scsimo.h"
@ -24,8 +24,8 @@
#include <unistd.h>
using namespace std;
using namespace rascsi_interface;
using namespace ras_util;
using namespace piscsi_interface;
using namespace piscsi_util;
DeviceFactory::DeviceFactory()
{
@ -139,7 +139,7 @@ shared_ptr<PrimaryDevice> DeviceFactory::CreateDevice(PbDeviceType type, int lun
case SCHS:
device = make_shared<HostServices>(lun);
// Since this is an emulation for a specific device the full INQUIRY data have to be set accordingly
device->SetVendor("RaSCSI");
device->SetVendor("PiSCSI");
device->SetProduct("Host Services");
break;
@ -179,7 +179,7 @@ vector<string> DeviceFactory::GetNetworkInterfaces() const
while (tmp) {
if (tmp->ifa_addr && tmp->ifa_addr->sa_family == AF_PACKET &&
strcmp(tmp->ifa_name, "lo") && strcmp(tmp->ifa_name, "rascsi_bridge")) {
strcmp(tmp->ifa_name, "lo") && strcmp(tmp->ifa_name, "piscsi_bridge")) {
const int fd = socket(PF_INET, SOCK_DGRAM, IPPROTO_IP);
ifreq ifr = {};

View File

@ -1,6 +1,6 @@
//---------------------------------------------------------------------------
//
// SCSI Target Emulator RaSCSI Reloaded
// SCSI Target Emulator PiSCSI
// for Raspberry Pi
//
// Copyright (C) 2021-2022 Uwe Seimet
@ -15,10 +15,10 @@
#include <vector>
#include <unordered_set>
#include <unordered_map>
#include "generated/rascsi_interface.pb.h"
#include "generated/piscsi_interface.pb.h"
using namespace std;
using namespace rascsi_interface;
using namespace piscsi_interface;
class PrimaryDevice;

View File

@ -1,6 +1,6 @@
//---------------------------------------------------------------------------
//
// SCSI Target Emulator RaSCSI Reloaded
// SCSI Target Emulator PiSCSI
// for Raspberry Pi
//
// Copyright (C) 2022 Uwe Seimet

View File

@ -1,6 +1,6 @@
//---------------------------------------------------------------------------
//
// SCSI Target Emulator RaSCSI Reloaded
// SCSI Target Emulator PiSCSI
// for Raspberry Pi
//
// Copyright (C) 2022 Uwe Seimet

View File

@ -14,7 +14,7 @@
//
//---------------------------------------------------------------------------
#include "shared/rascsi_exceptions.h"
#include "shared/piscsi_exceptions.h"
#include "scsi_command_util.h"
#include "disk.h"
#include <sstream>

View File

@ -1,6 +1,6 @@
//---------------------------------------------------------------------------
//
// SCSI Target Emulator RaSCSI Reloaded
// SCSI Target Emulator PiSCSI
// for Raspberry Pi
//
// Copyright (C) 2022 Uwe Seimet
@ -14,13 +14,13 @@
//
// 1. Vendor-specific mode page 0x20 returns the current date and time, see mode_page_datetime
//
// 2. START/STOP UNIT shuts down RaSCSI or shuts down/reboots the Raspberry Pi
// a) !start && !load (STOP): Shut down RaSCSI
// 2. START/STOP UNIT shuts down PiSCSI or shuts down/reboots the Raspberry Pi
// a) !start && !load (STOP): Shut down PiSCSI
// b) !start && load (EJECT): Shut down the Raspberry Pi
// c) start && load (LOAD): Reboot the Raspberry Pi
//
#include "shared/rascsi_exceptions.h"
#include "shared/piscsi_exceptions.h"
#include "controllers/scsi_controller.h"
#include "scsi_command_util.h"
#include "host_services.h"
@ -59,14 +59,14 @@ void HostServices::StartStopUnit() const
if (!start) {
if (load) {
GetController()->ScheduleShutdown(AbstractController::rascsi_shutdown_mode::STOP_PI);
GetController()->ScheduleShutdown(AbstractController::piscsi_shutdown_mode::STOP_PI);
}
else {
GetController()->ScheduleShutdown(AbstractController::rascsi_shutdown_mode::STOP_RASCSI);
GetController()->ScheduleShutdown(AbstractController::piscsi_shutdown_mode::STOP_PISCSI);
}
}
else if (load) {
GetController()->ScheduleShutdown(AbstractController::rascsi_shutdown_mode::RESTART_PI);
GetController()->ScheduleShutdown(AbstractController::piscsi_shutdown_mode::RESTART_PI);
}
else {
throw scsi_exception(sense_key::ILLEGAL_REQUEST, asc::INVALID_FIELD_IN_CDB);

View File

@ -1,6 +1,6 @@
//---------------------------------------------------------------------------
//
// SCSI Target Emulator RaSCSI Reloaded
// SCSI Target Emulator PiSCSI
// for Raspberry Pi
//
// Copyright (C) 2022 Uwe Seimet

View File

@ -1,6 +1,6 @@
//---------------------------------------------------------------------------
//
// SCSI Target Emulator RaSCSI Reloaded
// SCSI Target Emulator PiSCSI
// for Raspberry Pi
//
// Copyright (C) 2022 Uwe Seimet

View File

@ -1,6 +1,6 @@
//---------------------------------------------------------------------------
//
// SCSI Target Emulator RaSCSI Reloaded
// SCSI Target Emulator PiSCSI
// for Raspberry Pi
//
// Copyright (C) 2021-2022 Uwe Seimet

View File

@ -1,6 +1,6 @@
//---------------------------------------------------------------------------
//
// SCSI Target Emulator RaSCSI Reloaded
// SCSI Target Emulator PiSCSI
// for Raspberry Pi
//
// Copyright (C) 2021-2022 Uwe Seimet

View File

@ -1,6 +1,6 @@
//---------------------------------------------------------------------------
//
// SCSI Target Emulator RaSCSI Reloaded
// SCSI Target Emulator PiSCSI
// for Raspberry Pi
//
// Copyright (C) 2021-2022 Uwe Seimet
@ -24,7 +24,7 @@ public:
virtual void Inquiry() = 0;
virtual void ReportLuns() = 0;
// Optional commands implemented by all RaSCSI device types
// Optional commands implemented by all PiSCSI device types
virtual void RequestSense() = 0;
virtual void ReleaseUnit() = 0;
virtual void ReserveUnit() = 0;

View File

@ -1,6 +1,6 @@
//---------------------------------------------------------------------------
//
// SCSI Target Emulator RaSCSI Reloaded
// SCSI Target Emulator PiSCSI
// for Raspberry Pi
//
// Copyright (C) 2021-2022 Uwe Seimet

View File

@ -1,6 +1,6 @@
//---------------------------------------------------------------------------
//
// SCSI Target Emulator RaSCSI Reloaded
// SCSI Target Emulator PiSCSI
// for Raspberry Pi
//
// Copyright (C) 2022 Uwe Seimet
@ -9,7 +9,7 @@
//
//---------------------------------------------------------------------------
#include "shared/rascsi_exceptions.h"
#include "shared/piscsi_exceptions.h"
#include "scsi_command_util.h"
#include "mode_page_device.h"
#include <cstddef>

View File

@ -1,6 +1,6 @@
//---------------------------------------------------------------------------
//
// SCSI Target Emulator RaSCSI Reloaded
// SCSI Target Emulator PiSCSI
// for Raspberry Pi
//
// Copyright (C) 2022 Uwe Seimet

View File

@ -1,13 +1,13 @@
//---------------------------------------------------------------------------
//
// SCSI Target Emulator RaSCSI Reloaded
// SCSI Target Emulator PiSCSI
// for Raspberry Pi
//
// Copyright (C) 2022 Uwe Seimet
//
//---------------------------------------------------------------------------
#include "shared/rascsi_exceptions.h"
#include "shared/piscsi_exceptions.h"
#include "scsi_command_util.h"
#include "primary_device.h"
#include <sstream>
@ -24,7 +24,7 @@ bool PrimaryDevice::Init(const unordered_map<string, string>& params)
AddCommand(scsi_command::eCmdInquiry, [this] { Inquiry(); });
AddCommand(scsi_command::eCmdReportLuns, [this] { ReportLuns(); });
// Optional commands supported by all RaSCSI devices
// Optional commands supported by all PiSCSI devices
AddCommand(scsi_command::eCmdRequestSense, [this] { RequestSense(); });
AddCommand(scsi_command::eCmdReserve6, [this] { ReserveUnit(); });
AddCommand(scsi_command::eCmdRelease6, [this] { ReleaseUnit(); });

View File

@ -1,6 +1,6 @@
//---------------------------------------------------------------------------
//
// SCSI Target Emulator RaSCSI Reloaded
// SCSI Target Emulator PiSCSI
// for Raspberry Pi
//
// Copyright (C) 2022 Uwe Seimet

View File

@ -1,13 +1,13 @@
//---------------------------------------------------------------------------
//
// SCSI Target Emulator RaSCSI Reloaded
// SCSI Target Emulator PiSCSI
// for Raspberry Pi
//
// Copyright (C) 2022 Uwe Seimet
//
//---------------------------------------------------------------------------
#include "shared/rascsi_exceptions.h"
#include "shared/piscsi_exceptions.h"
#include "device_logger.h"
#include "scsi_command_util.h"
#include <cstring>
@ -54,9 +54,9 @@ void scsi_command_util::ModeSelect(const DeviceLogger& logger, scsi_command cmd,
// drives support this, e.g FUJITSU M2624S
// We are fine as long as the current sector size remains unchanged
if (GetInt16(buf, offset + 12) != sector_size) {
// With rascsi it is not possible to permanently (by formatting) change the sector size,
// With piscsi it is not possible to permanently (by formatting) change the sector size,
// because the size is an externally configurable setting only
logger.Warn("In order to change the sector size use the -b option when launching rascsi");
logger.Warn("In order to change the sector size use the -b option when launching piscsi");
throw scsi_exception(sense_key::ILLEGAL_REQUEST, asc::INVALID_FIELD_IN_PARAMETER_LIST);
}

View File

@ -1,6 +1,6 @@
//---------------------------------------------------------------------------
//
// SCSI Target Emulator RaSCSI Reloaded
// SCSI Target Emulator PiSCSI
// for Raspberry Pi
//
// Copyright (C) 2022 Uwe Seimet