52 Commits

Author SHA1 Message Date
9b2e25a669 Update copyright year. 2024-12-19 15:34:27 +00:00
351237ae1e Genera refactor and cleanup. 2024-04-30 15:44:33 +01:00
Daniel Collins
6186813988 Resolve device name symlinks on Linux. (#15)
This is useful for referencing a specific drive on systems with
multiple via /dev/disk/by-id/ or /dev/disk/by-path/ rather than
guessing which order the drives got initialised every reboot.
2023-10-16 20:39:44 +01:00
Daniel Collins
04970bc72a Fix parsing of /sys/block/XXX/device symlinks. (#14)
As of c810bd8d07, I'm not able to use
aaruremote on Linux (5.10). I've tried a few machines and they all have
device sylinks like the following example from my CD dumping machine
(has a mixture of SATA and IDE drives):

/sys/block/sr0/device -> ../../../0:0:0:0
/sys/block/sr1/device -> ../../../0:0:1:0
/sys/block/sr2/device -> ../../../4:0:0:0
/sys/block/sr3/device -> ../../../1:0:0:0
/sys/block/sr4/device -> ../../../3:0:0:0
/sys/block/sr5/device -> ../../../6:0:0:0

I'm not sure how many variants of this symlink exist in Linux, but from
reading the existing code I *think* the intent was to extract the
characters from the start the of last component of the filename up to
the delimeter character (`.` or `:`), so I've reworked the code to do
that without tripping up on the `..` parts of the path.
2023-10-16 20:39:17 +01:00
blitter
c810bd8d07 Find device host_no in Linux 2.6.26. 2022-12-04 15:05:17 -08:00
blitter
8f9eb4c064 Find devices when /sys/block contains directories. 2022-12-04 15:05:05 -08:00
blitter
743f909317 Pass a temporary DeviceContext to GetDeviceType. 2022-12-04 15:04:30 -08:00
bdd467547a Fix 48-bit ATA commands. 2021-07-29 00:46:47 +01:00
blitter
27b7e3ddb0 Bail if a device symlink target lacks both a colon and a period delimiter. 2021-07-25 22:17:40 -07:00
blitter
d0bbf0dc05 Find period delimiter when sysfs device symlink target lacks a colon. 2021-07-25 22:02:11 -07:00
9778904dba Update copyright year. 2020-12-31 23:12:05 +00:00
49706b9ea7 Implement OS read command for Linux. 2020-12-14 02:35:12 +00:00
daa549ae55 Implement reopen command for Linux. 2020-12-14 02:32:13 +00:00
b48ee89443 Implement multi SD/MMC command for Linux. 2020-12-14 02:26:05 +00:00
3c6906afe9 Code clean-up. 2020-10-24 04:23:01 +01:00
57425ecba4 Fix getting type for SCSI magneto-optical devices in Linux. 2020-10-17 02:34:21 +01:00
dfd56c83df Remove unneeded slim functions. 2020-03-01 19:47:15 +00:00
675872bbda Rename project files. 2020-03-01 06:00:35 +00:00
6b224c60a3 Rename more macros. 2020-03-01 05:50:46 +00:00
c384986506 Rename macros. 2020-03-01 05:48:20 +00:00
06944ade67 Rename include file. 2020-03-01 05:46:10 +00:00
e95ceac219 Rename comments. 2020-03-01 05:44:49 +00:00
4c30357650 Update copyright date. 2020-01-03 17:42:13 +00:00
56196330cc Use context for network functions. 2019-10-26 22:22:31 +01:00
adcd54d992 Use opaque packet for device context. 2019-10-26 16:11:19 +01:00
bcae241162 Add packet to close device. 2019-10-26 15:47:49 +01:00
a85efd0463 Don't name executable with architecture. 2019-10-26 14:29:51 +01:00
f79f61606d Copy Linux UAPI include for MMC, is missing someplaces where the ioctl still exists. 2019-10-22 18:56:05 +01:00
50f911acdc Fix Linux device type detection when there is no udev. 2019-10-21 22:57:39 +01:00
6c27f82420 Fix misplaced #endif. 2019-10-21 08:11:37 +01:00
65a8373d26 Separate network worker loop. 2019-10-20 21:50:25 +01:00
318b171262 Separate printing available IP addresses by platform. 2019-10-20 20:27:45 +01:00
77c8218564 Separate hello packet creation for platform. 2019-10-20 20:08:06 +01:00
4745be5668 Add targets for Wii using DevKitPPC. 2019-10-20 19:23:34 +01:00
3eedcac3ec Condition compilation of Linux SDHCI to be able to find the include files for UAPI. 2019-10-20 17:11:12 +01:00
beff90faa8 Add conditional for udev presence in Linux. 2019-10-20 16:34:38 +01:00
ea5faf2b3c Fix pointer dereference for ATA commands in Linux. 2019-10-19 18:39:47 +01:00
78d23fce19 General refactor. 2019-10-19 18:30:45 +01:00
b0c857b2f3 Implement SDHCI commands for Linux. 2019-10-19 17:18:58 +01:00
dae15d9009 Implement ATA commands for Linux. 2019-10-19 03:11:13 +01:00
eb4e3e3f32 Implement Get PCMCIA Data packet, and support for Linux. 2019-10-19 01:09:50 +01:00
fa4fa839a6 Implement Get FireWire Data packet, and support for Linux. 2019-10-19 00:09:03 +01:00
f161e88ecd Fix pointer comparison. 2019-10-18 23:41:41 +01:00
3b646d5d76 Implement get USB data in Linux. 2019-10-18 01:12:19 +01:00
62e90e0519 Implement Get SDHCI Registers packet. 2019-10-18 00:25:45 +01:00
0be95c5c70 Implement reading SDHCI registers from sysfs in Linux. 2019-10-17 23:19:06 +01:00
18f7dda4f8 Fix boolean operation in SCSI sense. 2019-10-17 22:01:47 +01:00
d170083f77 Implement SCSI commands in Linux. 2019-10-16 21:53:06 +01:00
71954fd9fa Implement get device type packet. 2019-10-16 20:18:08 +01:00
81f83b257c Implement open device for Linux. 2019-10-13 22:57:06 +01:00