aboutsummaryrefslogtreecommitdiffstats
path: root/ioctl-test.c
diff options
context:
space:
mode:
authorChris Mason <chris.mason@oracle.com>2010-03-15 11:24:20 -0400
committerChris Mason <chris.mason@oracle.com>2010-03-15 11:24:20 -0400
commitfb3a539c9224b9923acccc684bc1f2719d651004 (patch)
treeaf001ee9e26fbf9df2318daa857b160ffc1e1b43 /ioctl-test.c
parentb72e4c4e1923b908b7242c7d6646391eb4043a93 (diff)
downloadbtrfs-progs-fb3a539c9224b9923acccc684bc1f2719d651004.tar.gz
btrfs-progs-fb3a539c9224b9923acccc684bc1f2719d651004.tar.xz
btrfs-progs-fb3a539c9224b9923acccc684bc1f2719d651004.zip
Add ioctl-test.c which just prints all the ioctl numbers.
This is used to compare the output on 64 bit and 32 bit machines and make sure all of our ioctls are compat defined.
Diffstat (limited to 'ioctl-test.c')
-rw-r--r--ioctl-test.c36
1 files changed, 36 insertions, 0 deletions
diff --git a/ioctl-test.c b/ioctl-test.c
new file mode 100644
index 0000000..7cf3bc2
--- /dev/null
+++ b/ioctl-test.c
@@ -0,0 +1,36 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include "kerncompat.h"
+#include "ioctl.h"
+
+unsigned long ioctls[] = {
+ BTRFS_IOC_SNAP_CREATE,
+ BTRFS_IOC_DEFRAG,
+ BTRFS_IOC_RESIZE,
+ BTRFS_IOC_SCAN_DEV,
+ BTRFS_IOC_TRANS_START,
+ BTRFS_IOC_TRANS_END,
+ BTRFS_IOC_SYNC,
+ BTRFS_IOC_CLONE,
+ BTRFS_IOC_ADD_DEV,
+ BTRFS_IOC_RM_DEV,
+ BTRFS_IOC_BALANCE,
+ BTRFS_IOC_SUBVOL_CREATE,
+ BTRFS_IOC_SNAP_DESTROY,
+ BTRFS_IOC_DEFRAG_RANGE,
+ BTRFS_IOC_TREE_SEARCH,
+ BTRFS_IOC_INO_LOOKUP,
+ BTRFS_IOC_DEFAULT_SUBVOL,
+ BTRFS_IOC_SPACE_INFO,
+ 0 };
+
+int main(int ac, char **av)
+{
+ int i = 0;
+ while(ioctls[i]) {
+ printf("%lu\n" ,ioctls[i]);
+ i++;
+ }
+ return 0;
+}
+