History

landlock: Add clang-format exceptions

In preparation to a following commit, add clang-format on and clang-format off stanzas around constant definitions. This enables to keep aligned values, which is much more readable than packed definitions.

Mickaël Salaün committed 4 years ago

Commit 6cc2df81 parent 672c0c53 files · +10 −0Browse files

Showing the changes to include/uapi (1 of 3 files). Show all

Unified · Split

include/uapi/linux/landlock.h+4−0
@@ -33,7 +33,9 @@ struct landlock_ruleset_attr { · 32 unmodified lines
3333 * - %LANDLOCK_CREATE_RULESET_VERSION: Get the highest supported Landlock ABI
3434 * version.
3535 */
36+/* clang-format off */
3637 #define LANDLOCK_CREATE_RULESET_VERSION (1U << 0)
38+/* clang-format on */
3739
3840 /**
3941 * enum landlock_rule_type - Landlock rule type
@@ -120,6 +122,7 @@ struct landlock_path_beneath_attr { · 80 unmodified lines
120122 * :manpage:`access(2)`.
121123 * Future Landlock evolutions will enable to restrict them.
122124 */
125+/* clang-format off */
123126 #define LANDLOCK_ACCESS_FS_EXECUTE (1ULL << 0)
124127 #define LANDLOCK_ACCESS_FS_WRITE_FILE (1ULL << 1)
125128 #define LANDLOCK_ACCESS_FS_READ_FILE (1ULL << 2)
@@ -133,5 +136,6 @@ struct landlock_path_beneath_attr { · 7 unmodified lines
133136 #define LANDLOCK_ACCESS_FS_MAKE_FIFO (1ULL << 10)
134137 #define LANDLOCK_ACCESS_FS_MAKE_BLOCK (1ULL << 11)
135138 #define LANDLOCK_ACCESS_FS_MAKE_SYM (1ULL << 12)
139+/* clang-format on */
136140
137141 #endif /* _UAPI_LINUX_LANDLOCK_H */

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t