*/
#include "defs.h"
-#ifdef LINUX
-#include <stdint.h>
-#include <inttypes.h>
#include <linux/blkpg.h>
#include <linux/fs.h>
#include <linux/hdreg.h>
#ifndef BLKTRACESTART
#define BLKTRACESTART _IO(0x12,116)
#endif
-#ifndef BLKTRACESTART
+#ifndef BLKTRACESTOP
#define BLKTRACESTOP _IO(0x12,117)
#endif
#ifndef BLKTRACETEARDOWN
{
struct blkpg_partition p;
- tprintf("{");
+ tprints("{");
printxval(blkpg_ops, blkpg->op, "BLKPG_???");
tprintf(", flags=%d, datalen=%d, ",
if (syserror(tcp) || umove(tcp, arg, &val) < 0)
tprintf(", %#lx", arg);
else
- tprintf(", %hu", val);
+ tprintf(", %u", (unsigned)val);
}
break;
}
break;
+#ifdef HAVE_BLKGETSIZE64
/* return an uint64_t */
case BLKGETSIZE64:
if (exiting(tcp)) {
tprintf(", %" PRIu64, val);
}
break;
+#endif
/* More complex types */
case BLKDISCARD:
if (syserror(tcp) || umove(tcp, arg, &geo) < 0)
tprintf(", %#lx", arg);
else
- tprintf(", {heads=%hhu, sectors=%hhu, "
- "cylinders=%hu, start=%lu}",
- geo.heads, geo.sectors,
- geo.cylinders, geo.start);
+ tprintf(", {heads=%u, sectors=%u, "
+ "cylinders=%u, start=%lu}",
+ (unsigned)geo.heads,
+ (unsigned)geo.sectors,
+ (unsigned)geo.cylinders,
+ geo.start);
}
break;
if (umove(tcp, arg, &blkpg) < 0)
tprintf(", %#lx", arg);
else {
- tprintf(", ");
+ tprints(", ");
print_blkpg_req(tcp, &blkpg);
}
}
if (umove(tcp, arg, &buts) < 0)
tprintf(", %#lx", arg);
else
- tprintf(", {act_mask=%hu, buf_size=%u, "
+ tprintf(", {act_mask=%u, buf_size=%u, "
"buf_nr=%u, start_lba=%" PRIu64 ", "
"end_lba=%" PRIu64 ", pid=%u}",
- buts.act_mask, buts.buf_size,
+ (unsigned)buts.act_mask, buts.buf_size,
buts.buf_nr, buts.start_lba,
buts.end_lba, buts.pid);
}
};
return 1;
}
-#endif /* LINUX */