Commit Graph

12 Commits (24de626f33ca6ff4227343c0a0438442c031645f)

Author SHA1 Message Date
Marc Kleine-Budde da642181a9 CMakeLists: unconditionally define _GNU_SOURCE
This fixes compilation on musl libc.

Link: https://github.com/linux-can/can-utils/pull/326
Reported-by: Rosen Penev <rosenp@gmail.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2021-12-30 12:57:12 +01:00
Marc Kleine-Budde 66de96d337 mcp251xfd-dump: add tool to decode chip and driver state of mcp251xfd
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>
2021-02-13 23:36:43 +01:00
Marc Kleine-Budde a726c2a57a Merge branch 'cansequence' of github.com:marckleinebudde/can-utils into master
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>
2020-10-19 13:44:16 +02:00
Marc Kleine-Budde 8e3c050b1c CMakeLists.txt: update test for _GNU_SOURCE to fix warnings
../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>
2020-06-29 18:20:18 +02:00
Alexander GQ Gerasiov 8106214b55 Rename j* to j1939\1
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>
2020-04-20 10:18:13 +03:00
Marc Kleine-Budde 6260263ef3 buildsystem: add SCM_TIMESTAMPING_OPT_STATS if not already defined 2019-05-09 14:40:16 +02:00
Tomasz Wasilczyk 4da344b2aa Don't build j1939 for Android
This library uses if_nameindex symbol, not available at this system.
2019-01-10 12:03:06 -08:00
Oleksij Rempel 23e5e227ac add jcat
jcat is kind of netcat for j1939
for example:
jcat can0:0x90 -r > /tmp/some_file

jcat -i some_file_to_send can0:0x80 :0x90,0x12300

Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
2019-01-04 13:01:11 +01:00
Marc Kleine-Budde 04c171c285 CMakeLists.txt: build proper static libraries
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2018-10-04 23:55:54 +02:00
Marc Kleine-Budde 572a66fb94 CMakeLists.txt: clean up a bit
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2018-10-04 23:55:54 +02:00
Marc Kleine-Budde a6954bdaae CMakeLists.txt: Add missing N_SLCAN define 2018-10-04 23:55:54 +02:00
Joel Winarske 8a3e0453aa CMake first pass (#90)
* CMake first pass

* canbusload dep fix

* Add Eclipse Debug, and Android Studio generation examples

* travis additions

* Update .travis.yml

CMAKE_BUILT_TYPE typo fix

* add android ndk variants(less mips)
2018-08-17 09:50:30 +02:00