--- /dev/null
+#!/bin/sh
+
+# Check non-verbose decoding of LOOP_* ioctls.
+
+. "${srcdir=.}/init.sh"
+
+run_prog > /dev/null
+run_strace -a22 -eioctl -e verbose=none $args > "$EXP"
+check_prog grep
+grep -v '^ioctl([012],' < "$LOG" > "$OUT"
+match_diff "$OUT" "$EXP"
+rm -f "$EXP" "$OUT"
#include <linux/loop.h>
#include "xlat/loop_cmds.h"
+#ifndef ABBREV
+# define ABBREV 0
+#endif
+
static void
print_loop_info(struct loop_info * const info, bool print_encrypt,
const char *encrypt_type, const char *encrypt_key,
const char *flags)
{
+#if ABBREV
+ printf("%p", info);
+#else
printf("{lo_number=%d", info->lo_number);
# if VERBOSE
printf(", lo_device=makedev(%u, %u), lo_inode=%lu, "
# else /* !VERBOSE */
printf(", ...}");
# endif /* VERBOSE */
+#endif /* !ABBREV */
}
static void
const char *encrypt_type, const char *encrypt_key,
const char *flags)
{
+#if ABBREV
+ printf("%p", info64);
+#else
# if VERBOSE
printf("{lo_device=makedev(%u, %u), lo_inode=%" PRIu64
", lo_rdevice=makedev(%u, %u), lo_offset=%#" PRIx64
# else /* !VERBOSE */
printf(", ...}");
# endif /* VERBOSE */
+#endif /* !ABBREV */
}
int