Move the curly brackets to the start of the next line to follow the
common coding style in can-utils.
Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
The 'long' CAN frame representation does not really fit for CAN XL content.
Therefore just a cropped output is provided to be able to see the CAN XL
header information and up to 64 byte of data (without binary or swap
formating options). To get the full qualified CAN XL content use the log
file format.
Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
Build the CAN frame ASCII output inside a single (big) buffer as
preparation for CAN XL support.
This unifies different output modes (fprintf/sprintf/printf) at
the time of the CAN frame text generation.
Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
Replace maxdlen parameter and use CANFD_FDF flags instead.
Since the CANFD_FDF flag has been introduced in can.h the struct canfd_frame
can be used for CAN CC and CAN FD frames as a dual-use data structure.
Remove the extra maxdlen parameter in library calls and only use the
CANFD_FDF flag to differentiate the two CAN CC/FD frames.
Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
slcanpty.c: In function ‘pty2can’:
slcanpty.c:105:21: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
105 | buf[nbytes] = 0;
| ~~~~~~~~~~~~^~~
slcanpty.c:58:21: note: at offset [-2147483647, -1] into destination object ‘buf’ of size 200
58 | static char buf[200];
| ^~~
Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
Fixes the following warning:
| isobusfs/isobusfs_cmn.c: In function 'isobusfs_get_timeout_ms':
| isobusfs/isobusfs_cmn.c:140:51: warning: format '%ld' expects argument of type 'long int', but argument 2 has type 'int64_t' {aka 'long long int'} [-Wformat=]
| 140 | warn("timeout too long: %ld ms", time_diff);
| | ~~^ ~~~~~~~~~
| | | |
| | | int64_t {aka long long int}
| | long int
| | %lld
Before more contributions will come, change the license and make this
project usable as a library.
Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
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>