.argtype = ARG_INT,
.argval = -1,
.help = N_("get read-only")
+ },{
+ IOCTL_ENTRY(BLKDISCARDZEROES),
+ .name = "--getdiscardzeroes",
+ .argtype = ARG_UINT,
+ .argval = -1,
+ .help = N_("get discard zeroes support status")
},{
IOCTL_ENTRY(BLKSSZGET),
.name = "--getss",
#endif /* BLKROSET && __linux__ */
+
#ifdef APPLE_DARWIN
#define BLKGETSIZE DKIOCGETBLOCKCOUNT32
#endif
#define BLKPBSZGET _IO(0x12,123)
#endif
+/* discard zeroes support, introduced in 2.6.33 (commait 98262f27) */
+#ifndef BLKDISCARDZEROES
+#define BLKDISCARDZEROES _IO(0x12,124)
+#endif
+
#ifndef FIFREEZE
#define FIFREEZE _IOWR('X', 119, int) /* Freeze */
#define FITHAW _IOWR('X', 120, int) /* Thaw */