mirror of
https://github.com/linux-can/can-utils.git
synced 2026-09-23 00:21:14 +02:00
Implement ISOBUS File Server (FS) Interface as a Personal Project
Introduce the ISOBUS File Server (FS) interface, compatible with ISO 11783-13. The implementation utilizes the kernel's existing CAN J1939 socket support. For testing following setup can be used: ip link add type vcan ip l s dev vcan0 up j1939acd -r 64-95 -c /tmp/1122334455667788.jacd 1122334455667788 vcan0 & j1939acd -r 96-127 -c /tmp/1122334455667789.jacd 1122334455667789 vcan0 & sleep 1 isobusfs-srv -i vcan0 -n 1122334455667788 -v vol1:/path/to/export/ isobusfs-cli -i vcan0 -n 0x1122334455667789 -m 0x1122334455667788 -I Interactive mode currently support following commands: exit - exit interactive mode quit - exit interactive mode help - show this help dmesg - show log buffer selftest - run selftest ls - list directory ll - list directory with long listing format cd - change directory pwd - print name of current/working directory get - get file Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
This commit is contained in:
committed by
Oleksij Rempel
parent
6004c64f06
commit
42edaeaf52
Executable
+64
@@ -0,0 +1,64 @@
|
||||
#!/bin/bash
|
||||
|
||||
mkdir dir1
|
||||
mkdir dir1/dir2
|
||||
mkdir dir1/dir2/dir3
|
||||
mkdir dir1/dir2/dir3/dir4
|
||||
mkdir dir1/dir2/dir3/dir5
|
||||
mkdir MCMC0683
|
||||
mkdir MCMC0683/msd_dir1/msd_dir2
|
||||
mkdir MCMC0683/msd_dir1/msd_dir2/~
|
||||
mkdir MCMC0683/msd_dir1/msd_dir2/~/~tilde_dir
|
||||
mkdir dir1/~
|
||||
mkdir dir1/~/~
|
||||
|
||||
echo "hello" > dir1/dir2/file0
|
||||
|
||||
./isobusfs_create_test_file.sh dir1/dir2/file1k 1024
|
||||
./isobusfs_create_test_file.sh dir1/dir2/file1m 1048576
|
||||
|
||||
File and directory names testing
|
||||
mkdir 'dir1/dir2/special_chars_*?/'
|
||||
mkdir 'dir1/dir2/unicode_名字'
|
||||
|
||||
# Define the long suffix for the filenames
|
||||
long_suffix="abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnop"
|
||||
|
||||
# Loop to create 300 files with long names
|
||||
for count in {1..300}; do
|
||||
touch "long_name_${count}_${long_suffix}"
|
||||
done
|
||||
|
||||
touch dir1/dir2/hidden_file
|
||||
touch dir1/dir2/readonly_file
|
||||
touch dir1/dir2/executable_file
|
||||
touch dir1/dir2/no_read_permission_file
|
||||
|
||||
# Setting permissions
|
||||
chmod 444 dir1/dir2/readonly_file # Read-only file
|
||||
chmod +x dir1/dir2/executable_file # Executable file
|
||||
chmod 000 dir1/dir2/no_read_permission_file # No read permission for anyone
|
||||
|
||||
# Create directories for date problems
|
||||
mkdir "dir1/dir2/y2000_problem"
|
||||
mkdir "dir1/dir2/y2038_problem"
|
||||
mkdir "dir1/dir2/y1979_problem"
|
||||
mkdir "dir1/dir2/y1980_problem"
|
||||
mkdir "dir1/dir2/y2107_problem"
|
||||
mkdir "dir1/dir2/y2108_problem"
|
||||
|
||||
# Change timestamps to reflect specific years
|
||||
# Year 2000
|
||||
touch -d '2000-01-01 00:00:00' dir1/dir2/y2000_problem
|
||||
|
||||
# Year 2038 - beyond 19 January 2038, Unix timestamp issue
|
||||
touch -d '2038-01-20 00:00:00' dir1/dir2/y2038_problem
|
||||
|
||||
# Year 1980 - minimal year supported
|
||||
touch -d '1979-12-31 23:59:59' dir1/dir2/y1979_problem
|
||||
touch -d '1980-01-01 00:00:00' dir1/dir2/y1980_problem
|
||||
|
||||
# Year 2107 - max year 1980+127
|
||||
touch -d '2107-12-31 23:59:59' dir1/dir2/y2107_problem
|
||||
touch -d '2108-01-01 00:00:00' dir1/dir2/y2108_problem
|
||||
|
||||
Reference in New Issue
Block a user