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.
This commit is contained in:
parent
b72e4c4e19
commit
fb3a539c92
3
Makefile
3
Makefile
|
@ -77,6 +77,9 @@ quick-test: $(objects) quick-test.o
|
|||
convert: $(objects) convert.o
|
||||
gcc $(CFLAGS) -o btrfs-convert $(objects) convert.o -lext2fs $(LDFLAGS) $(LIBS)
|
||||
|
||||
ioctl-test: $(objects) ioctl-test.o
|
||||
gcc $(CFLAGS) -o ioctl-test $(objects) ioctl-test.o $(LDFLAGS) $(LIBS)
|
||||
|
||||
manpages:
|
||||
cd man; make
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue