summaryrefslogtreecommitdiff
path: root/mtd.c
diff options
context:
space:
mode:
authorDmitry V. Levin <ldv@altlinux.org>2016-05-28 18:46:39 +0000
committerDmitry V. Levin <ldv@altlinux.org>2016-05-28 19:16:32 +0000
commita0866bce3560aefe25a51bcdb659108172d5f926 (patch)
tree89dd3bf34db11238c761cb2f9eb2c33e5729926a /mtd.c
parent0a27c814b2d62cc8319bff729f8ae18cdaed9bb4 (diff)
downloadstrace-a0866bce3560aefe25a51bcdb659108172d5f926.tar.gz
Mpersify mtd.c
* defs.h (mtd_ioctl): Remove. * mtd.c: Mpersify struct mtd_oob_buf and ioctl numbers. (mtd_ioctl): Mpersify.
Diffstat (limited to 'mtd.c')
-rw-r--r--mtd.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/mtd.c b/mtd.c
index d9ce29229..52714ae3c 100644
--- a/mtd.c
+++ b/mtd.c
@@ -26,6 +26,8 @@
#include "defs.h"
+#include DEF_MPERS_TYPE(struct_mtd_oob_buf)
+
#include <linux/ioctl.h>
/* The mtd api changes quickly, so we have to keep a local copy */
@@ -36,6 +38,10 @@
# include <mtd/mtd-abi.h>
#endif
+typedef struct mtd_oob_buf struct_mtd_oob_buf;
+
+#include MPERS_DEFS
+
#include "xlat/mtd_mode_options.h"
#include "xlat/mtd_file_mode_options.h"
#include "xlat/mtd_type_options.h"
@@ -71,7 +77,7 @@ decode_erase_info_user64(struct tcb *tcp, const long addr)
static void
decode_mtd_oob_buf(struct tcb *tcp, const long addr)
{
- struct mtd_oob_buf mbuf;
+ struct_mtd_oob_buf mbuf;
tprints(", ");
if (umove_or_printaddr(tcp, addr, &mbuf))
@@ -235,8 +241,8 @@ decode_mtd_ecc_stats(struct tcb *tcp, const long addr)
es.corrected, es.failed, es.badblocks, es.bbtblocks);
}
-int
-mtd_ioctl(struct tcb *tcp, const unsigned int code, const long arg)
+MPERS_PRINTER_DECL(int, mtd_ioctl, struct tcb *tcp,
+ const unsigned int code, const long arg)
{
switch (code) {
case MEMERASE: