Re: [PATCH 3/3] Add btrfs ioctl support.

2016-03-31 Thread Dmitry V. Levin
On Thu, Mar 31, 2016 at 12:34:18AM -0400, Jeff Mahoney wrote: > + case BTRFS_IOC_DEV_REPLACE: { /* RW */ > + struct btrfs_ioctl_dev_replace_args args; > + > + if (entering(tcp)) > + tprints(", "); > + > + if (umove_or_printaddr(tcp, arg, &

Re: [PATCH 3/3] Add btrfs ioctl support.

2016-03-31 Thread Dmitry V. Levin
On Thu, Mar 31, 2016 at 09:49:38AM -0400, Jeff Mahoney wrote: > 1/ Define the macros in multiple places Please don't. :) > 2/ Teach xlat/gen.sh to produce two .h files. One contains the xlat > structures, the other contains the defines. This is OK. > 3/ Teach xlat/gen.sh to wrap the structure

Re: [PATCH 2/3] defs: define PRI__[uxs]64 to print __[su]64 values

2016-03-31 Thread Dmitry V. Levin
On Thu, Mar 31, 2016 at 12:34:17AM -0400, Jeff Mahoney wrote: > Rather than cast every __u64 or __s64 before printing, we can > define printing helpers for those types directly. Applied with minor adjustments. -- ldv pgpkj6fYzWVM_.pgp Description: PGP signature ---

Re: [PATCH 1/3] util: change type of struct xlat.val to uint64_t

2016-03-31 Thread Dmitry V. Levin
On Thu, Mar 31, 2016 at 12:34:16AM -0400, Jeff Mahoney wrote: > -extern const char *xlookup(const struct xlat *, const unsigned int); > -extern const char *xlat_search(const struct xlat *, const size_t, const > unsigned int); > +extern const char *xlookup(const struct xlat *, const uint64_t); > +e

Re: [PATCH 3/3] Add btrfs ioctl support.

2016-03-31 Thread Jeff Mahoney
On 3/31/16 12:34 AM, Jeff Mahoney wrote: > +#include "xlat/btrfs_dev_replace_args.h" This file was renamed and doesn't exist in a clean build, so I'll at least have to clean that up. I'm also working up test cases for it. One hiccup is that I've used the functionality in the xlat/*.in files to

[PATCH 1/4] tests: add sethostname.test

2016-03-31 Thread Fei Jie
* tests/sethostname.c: New file. * tests/sethostname.test: New test. * tests/.gitignore: Add sethostname. * tests/Makefile.am (check_PROGRAMS): Likewise. (DECODER_TESTS): Add sethostname.test. --- tests/.gitignore | 1 + tests/Makefile.am | 2 ++ tests/sethostname.c| 38 ++

[PATCH 4/4] tests: add chroot.test

2016-03-31 Thread Fei Jie
* tests/chroot.c: New file. * tests/chroot.test: New test. * tests/.gitignore: Add chroot. * tests/Makefile.am (check_PROGRAMS): Likewise. (DECODER_TESTS): Add chroot.test. --- tests/.gitignore | 1 + tests/Makefile.am | 2 ++ tests/chroot.c| 37 + tests/

[PATCH 3/4] tests: add fdatasync.test

2016-03-31 Thread Fei Jie
* tests/fdatasync.c: New file. * tests/fdatasync.test: New test. * tests/.gitignore: Add fdatasync. * tests/Makefile.am (check_PROGRAMS): Likewise. (DECODER_TESTS): Add fdatasync.test. --- tests/.gitignore | 1 + tests/Makefile.am| 2 ++ tests/fdatasync.c| 27

[PATCH 2/4] tests: add fsync.test

2016-03-31 Thread Fei Jie
* tests/fsync.c: New file. * tests/fsync.test: New test. * tests/.gitignore: Add fsync. * tests/Makefile.am (check_PROGRAMS): Likewise. (DECODER_TESTS): Add fsync.test. --- tests/.gitignore | 1 + tests/Makefile.am | 2 ++ tests/fsync.c | 27 +++ tests/fsync.test |