Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

List @ filesystems in root directory listing #21959

Merged
merged 1 commit into from
Feb 26, 2024

Conversation

peterbarker
Copy link
Contributor

  • dirlist now works
  • Callisto model (which relies on a file in ROMFS) still works
  • can still fetch a file using ftp get

@tridge
Copy link
Contributor

tridge commented Oct 14, 2022

I wonder if we should add the @ filesystems that support directory listing to root of / ?

Copy link
Collaborator

@andyp1per andyp1per left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure that the final logic is that clear

@peterbarker
Copy link
Contributor Author

I tested this in SITL, both MAVProxy and MissionPlanner, and on CUAVv5, both MAVProxy and MissionPlanner.

Adds virtual directory entries for these virtual filesystems in /

RTL> ftp list
RTL> Listing /
 D @mission
 D @param
 D @RomfS
 D @sys
 D APM
 D log
   V5_BT.dfu	10541
   bootlog.txt	297
   dataman	350216
   message-intervals-chan0.txt	7
Total size 352.60 kByte
ftp list @mission
RTL> Listing @mission
LIST: OP seq:7 sess:2 opcode:129 req_opcode:3 size:2 bc:0 ofs:0 plen=2 [2]
ftp list @RomfS
RTL> Listing @RomfS
   bootloader.bin	16448
   hwdef.dat	5743
   io_firmware.bin	40880
Total size 61.59 kByte

This PR also makes us *much* more lenient in what we accept for looking at virtual filesystems, so

ftp list @sys
ftp list /@sys
ftp list @SYS/
ftp list /@SYS/

should all work
@peterbarker peterbarker changed the title fix ROMFS dirlist List @ filesystems in root directory listing Feb 21, 2024
@IamPete1
Copy link
Member

IamPete1 commented Feb 26, 2024

Just tested on mission planner, this means we can remove the @SYS special case it uses.

image

To work fully we would also need to patch @MISSION and @PARAM to list files, currently they just appear empty.

@tridge
Copy link
Contributor

tridge commented Feb 26, 2024

we should have a bool supports_dirlist() method on the backend, false for MISSION and PARAM until we add those

@peterbarker peterbarker merged commit ac76901 into ArduPilot:master Feb 26, 2024
92 checks passed
@peterbarker peterbarker deleted the pr/dirlist-romfs-fix branch February 26, 2024 23:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants