uweseimet / scsi2pi

Advanced performant SCSI/SASI emulation and tools for the PiSCSI/RaSCSI board
https://www.scsi2pi.net
BSD 3-Clause "New" or "Revised" License
9 stars 2 forks source link

s2p: Add support for properties and property files #15

Closed uweseimet closed 9 months ago

uweseimet commented 9 months ago

Configuring s2p with command line options can sometimes result in having to specify a lot of options. Configuring s2p settings in a property file (default ~/.config/s2p.properties) can simplify a setup and avoids long command lines. A single property shall be set with the new -c KEY=VALUE option. Command line settings shall override the respective properties file settings.

The remote interface shall be extended to return the effective property settings at the time s2p was launched.

s2pctl shall display the startup properties with the new "-q" option and as part of the server settings ("-s").

>s2pctl -q
Property settings on s2p startup:
  image_folder=/home/us/hatari
  locale=en_US.UTF-8
  log_level=trace
  mode_page.0.SCSI2Pi=00:ff:04:02:03:04:ff
  mode_page.3.SCSI2Pi:SCSI HD 1011 MiB=
  mode_page.40.SCSI2Pi=28:06:ff:04:02:03:04:ff
  port=6868
  property_file=
  reserved_ids=
  scan_depth=1
  device.0.block_size=1024
  device.0.params=test.hds
  device.1.type=SCLP
  device.3.params=test.mos
  device.4.params=test.iso
  device.5.params=zip.hds
  device.5.product_data=IOMEGA:ZIP 100:D.13
  device.5.type=SCRM
  device.6.params=daynaport
  device.6:2.params=services
  token_file=

See https://www.scsi2pi.net/en/properties.html for an up to date list of supported properties and their respective command line options. Also see #14.