summaryrefslogtreecommitdiff
path: root/types
diff options
context:
space:
mode:
authorDmitry V. Levin <ldv@altlinux.org>2020-07-08 08:00:00 +0000
committerDmitry V. Levin <ldv@altlinux.org>2020-07-08 08:00:00 +0000
commit43bd136f1e0ab8b7e0a58339bf630dddb6735b61 (patch)
tree23a6ca7ef053437e1ec626a2297f7a77d2ed4424 /types
parent1253dbc1efb35238347ac16b58874b1514bb77ff (diff)
downloadstrace-43bd136f1e0ab8b7e0a58339bf630dddb6735b61.tar.gz
loop: implement decoding of LOOP_CONFIGURE ioctl command
* types/loop.h: New file. * loop.c: Include it instead of <linux/ioctl.h> and <linux/loop.h>. (ecode_loop_config): New function. (loop_ioctl): Use it to decode LOOP_CONFIGURE ioctl command. * NEWS: Mention this change. * tests/ioctl_loop.c: Check it.
Diffstat (limited to 'types')
-rw-r--r--types/loop.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/types/loop.h b/types/loop.h
new file mode 100644
index 000000000..f5127b21e
--- /dev/null
+++ b/types/loop.h
@@ -0,0 +1,21 @@
+/*
+ * Copyright (c) 2020 The strace developers.
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
+ */
+
+#ifndef STRACE_TYPES_LOOP_H
+# define STRACE_TYPES_LOOP_H
+
+# include <linux/ioctl.h>
+# include <linux/loop.h>
+
+typedef struct {
+ uint32_t fd;
+ uint32_t block_size;
+ struct loop_info64 info;
+ uint64_t __reserved[8];
+} struct_loop_config;
+
+#endif /* STRACE_TYPES_LOOP_H */