Commit graph

3 commits

Author SHA1 Message Date
Alberto Escolar Piedras 5382f827d6 drivers can_native_linux: Avoid using ssize
ssize is a POSIX.1-2001 extension, which may or may
not be provided by the C library, or may be defined
to a different size in the host and embedded C library.

Two internal functions were returning ssize, but
one of them was a trampoline into the same host API,
which is already provided by the native simulator
so let's just use that instead.

The other is only carrying data that fits into an
int and is anyhow being cast in/to ints, so let's just
avoid the trouble by defining it as returning int.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-01-15 21:59:56 +01:00
Henrik Brix Andersen 6d5d06689b drivers: can: native_linux: leave room for null termination of string
Only copy up to IFNAMSIZ - 1 number of characters of the interface name to
leave room for null termination of string.

Fixes: #66777

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2023-12-22 09:49:39 +01:00
Henrik Brix Andersen fe74ffe2d5 drivers: can: drop POSIX from the native Linux SocketCAN driver name
Rename the native Linux SocketCAN driver to reflect that it can can now be
used in both native_posix and native_sim (with or without an embedded
C-library).

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2023-12-12 14:28:26 +00:00
Renamed from drivers/can/can_native_posix_linux_socketcan.c (Browse further)