Move part of isobusfs which can be reused by other applications to the
libj1939. By the way, reuse some of new libj1939 code in the j1939cat.
Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
Improve indentation according to the .editorconfig style.
Write commands in lowercase letters.
Break long lines.
Remove double keywords (PRIVATE).
Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
CMake versions prior to 3.5 are regarded as deprecated and will cause
an error on recent CMake versions.
Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
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>
Systems that lack a MMU cannot use fork() to create the child process.
The patch does not compile the affected programs on MMU-less systems.
Co-developed-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
asc2nibble() is already defined in lib.h. Include lib.h in slcnpty.c
so that asc2nibble() does not need to be redefined a second time and
adjust the Makefile accordingly.
Signed-off-by: Vincent Mailhol <mailhol.vincent@wanadoo.fr>
Acked-by: Oliver Hartkopp <socketcan@hartkopp.net>
Link: https://lore.kernel.org/all/20221114163848.3398-2-mailhol.vincent@wanadoo.fr
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
It works on dev coredump data generated by the mcp251xfd driver in
case of failures, as well as on regmap based register dumps.
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
The PTX flavour canutils have a useful utility for generating a sequence of CAN
frames with an incrementing payload and checking such a sequence for missed and
reordered frames.
Recently, it has helped finding a regression in the kernel pfifo_fast qdisc,
which led to reordered frames.
To bring the utility to a greater audience, import the current state, including
its history, into the linux-can set of utilities.
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
../asc2log.c:264:8: warning: implicit declaration of function 'strcasestr' is invalid in C99 [-Wimplicit-function-declaration]
ptr = strcasestr(buf, tmp1);
^
../asc2log.c:264:6: warning: incompatible integer to pointer conversion assigning to 'char *' from 'int' [-Wint-conversion]
ptr = strcasestr(buf, tmp1);
^ ~~~~~~~~~~~~~~~~~~~~~
../asc2log.c:328:6: warning: implicit declaration of function 'strcasestr' is invalid in C99 [-Wimplicit-function-declaration]
if (strcasestr(date, " pm ") != NULL) {
^
../asc2log.c:328:31: warning: comparison between pointer and integer ('int' and 'void *') [-Wpointer-integer-compare]
if (strcasestr(date, " pm ") != NULL) {
~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~
../asc2log.c:336:8: warning: implicit declaration of function 'strptime' is invalid in C99 [-Wimplicit-function-declaration]
if (!strptime(date, "%B %d %I:%M:%S %p %Y", &tms)) {
^
../asc2log.c:354:8: warning: implicit declaration of function 'strptime' is invalid in C99 [-Wimplicit-function-declaration]
if (!strptime(date, "%B %d %H:%M:%S %Y", &tms)) {
../slcanpty.c:476:7: warning: implicit declaration of function 'grantpt' is invalid in C99 [-Wimplicit-function-declaration]
if (grantpt(p) < 0) {
^
../slcanpty.c:481:7: warning: implicit declaration of function 'unlockpt' is invalid in C99 [-Wimplicit-function-declaration]
if (unlockpt(p) < 0) {
^
../slcanpty.c:486:14: warning: implicit declaration of function 'ptsname' is invalid in C99 [-Wimplicit-function-declaration]
name_pts = ptsname(p);
^
../slcanpty.c:486:12: warning: incompatible integer to pointer conversion assigning to 'char *' from 'int' [-Wint-conversion]
name_pts = ptsname(p);
^ ~~~~~~~~~~
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Using j*smthng* for j1939-related tools is not very good for 2 reasons:
1. j prefix is not very informative;
2. jcat name is used by journal cat tool from popular sleuthkit toolkit;
2`. jacd sounds very similar to jackd.
2``. Possible future name conflicts for new tools.
Thus I renamed j* to j1939\1 to deal with this issue.
Signed-off-by: Alexander GQ Gerasiov <gq@cs.msu.su>