]> git.ipfire.org Git - thirdparty/systemd.git/blob - src/basic/missing_loop.h
Merge pull request #32464 from YHNdnzj/journal-object-invocation-id
[thirdparty/systemd.git] / src / basic / missing_loop.h
1 /* SPDX-License-Identifier: LGPL-2.1-or-later */
2 #pragma once
3
4 #include <linux/loop.h>
5
6 #include "macro.h"
7
8 #ifndef LOOP_CONFIGURE
9 struct loop_config {
10 __u32 fd;
11 __u32 block_size;
12 struct loop_info64 info;
13 __u64 __reserved[8];
14 };
15
16 # define LOOP_CONFIGURE 0x4C0A
17 #else
18 assert_cc(LOOP_CONFIGURE == 0x4C0A);
19 #endif
20
21 #ifndef LO_FLAGS_DIRECT_IO
22 # define LO_FLAGS_DIRECT_IO 16
23 # define LOOP_SET_DIRECT_IO 0x4C08
24 #else
25 assert_cc(LO_FLAGS_DIRECT_IO == 16);
26 assert_cc(LO_FLAGS_DIRECT_IO == 0x4C08);
27 #endif
28
29 #ifndef LOOP_SET_STATUS_SETTABLE_FLAGS
30 # define LOOP_SET_STATUS_SETTABLE_FLAGS (LO_FLAGS_AUTOCLEAR | LO_FLAGS_PARTSCAN | LO_FLAGS_DIRECT_IO)
31 #endif