Hi Stefan,
On 19.04.2015 17:11, Stefan Tatschner wrote:
This commit fixes two obsolete filepaths in the can documentation
due to the big UAPI shuffle. I already submitted commit
67c47cfcc710 (can-doc: Fixed a wrong filepath in can.txt)
to fix it but I missed those lines…
Fixed:
* include/linux/can.h -> include/uapi/linux/can.h
* include/linux/can/netlink.h -> include/uapi/linux/can/netlink.h
Signed-off-by: Stefan Tatschner <stefan@xxxxxxxxxxxxx>
Assuming this documentation is intended for application programmers I would
suggest to leave the documentation as-is.
The stuff in <linux-tree-root>/include/uapi/linux/... is converted at your
Linux system to /usr/include/linux/...
So when a programmer wants to access
#include <linux/can.h>
from /use/include/...
he usually does not implement
#include <uapi/linux/can.h>
right?
If we want to clean this up we should proper distinguish the path in the Linux
source tree
e.g. <linux-tree-root>/include/uapi/linux/can/raw.h
and the path the programmer has to include
e.g. <linux/can/raw.h>
I would tend to reference only the latter in the documentation and state at
one place that the stuff can be found in the Linux source tree under
<linux-tree-root>/include/uapi
Referencing include/uapi/linux/can/raw.h smells fishy.
Regards,
Oliver
---
Documentation/networking/can.txt | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/Documentation/networking/can.txt b/Documentation/networking/can.txt
index 5abad1e..134274d 100644
--- a/Documentation/networking/can.txt
+++ b/Documentation/networking/can.txt
@@ -263,7 +263,7 @@ solution for a couple of reasons:
described below.
The basic CAN frame structure and the sockaddr structure are defined
- in include/linux/can.h:
+ in include/uapi/linux/can.h:
struct can_frame {
canid_t can_id; /* 32 bit CAN_ID + EFF/RTR/ERR flags */
@@ -381,7 +381,7 @@ solution for a couple of reasons:
switches the socket into a mode that allows the handling of CAN FD frames
and (legacy) CAN frames simultaneously (see section 4.1.5).
- The struct canfd_frame is defined in include/linux/can.h:
+ The struct canfd_frame is defined in include/uapi/linux/can.h:
struct canfd_frame {
canid_t can_id; /* 32 bit CAN_ID + EFF/RTR/ERR flags */
@@ -409,7 +409,7 @@ solution for a couple of reasons:
The length of the two CAN(FD) frame structures define the maximum transfer
unit (MTU) of the CAN(FD) network interface and skbuff data length. Two
- definitions are specified for CAN specific MTUs in include/linux/can.h :
+ definitions are specified for CAN specific MTUs in include/uapi/linux/can.h :
#define CAN_MTU (sizeof(struct can_frame)) == 16 => 'legacy' CAN frame
#define CANFD_MTU (sizeof(struct canfd_frame)) == 72 => CAN FD frame
@@ -435,7 +435,7 @@ solution for a couple of reasons:
The reception of CAN frames using CAN_RAW sockets can be controlled
by defining 0 .. n filters with the CAN_RAW_FILTER socket option.
- The CAN filter structure is defined in include/linux/can.h:
+ The CAN filter structure is defined in include/uapi/linux/can.h:
struct can_filter {
canid_t can_id;
@@ -660,7 +660,7 @@ solution for a couple of reasons:
};
The aligned payload 'frames' uses the same basic CAN frame structure defined
- at the beginning of section 4 and in the include/linux/can.h include. All
+ at the beginning of section 4 and in the include/uapi/linux/can.h include. All
messages to the broadcast manager from user space have this structure.
Note a CAN_BCM socket must be connected instead of bound after socket
@@ -897,7 +897,7 @@ solution for a couple of reasons:
5.3 writing own CAN protocol modules
To implement a new protocol in the protocol family PF_CAN a new
- protocol has to be defined in include/linux/can.h .
+ protocol has to be defined in include/uapi/linux/can.h .
The prototypes and definitions to use the SocketCAN core can be
accessed by including include/linux/can/core.h .
In addition to functions that register the CAN protocol and the
@@ -1007,7 +1007,7 @@ solution for a couple of reasons:
The CAN device must be configured via netlink interface. The supported
netlink message types are defined and briefly described in
- "include/linux/can/netlink.h". CAN link support for the program "ip"
+ "include/uapi/linux/can/netlink.h". CAN link support for the program "ip"
of the IPROUTE2 utility suite is available and it can be used as shown
below:
--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html