Rather than cast every __u64 or __s64 before printing, we can
define printing helpers for those types directly.
* defs.h: define PRI__[uxs]64.
---
defs.h | 20
1 file changed, 20 insertions(+)
diff --git a/defs.h b/defs.h
index ead12dd..cc2a0d4 100644
--- a/defs.h
+++ b/defs
Hi all -
This short series adds support for the btrfs ioctls. Its structures
make heavy use of __u64 so rather than cast every single member, I added
new PRI* macros to print them properly. It also uses 64-bit flags and
defines values that are larger than can be described by a 32-bit
variable, s
Some ioctls have flags fields that are 64-bit. A 32-bit val means
these flags will never be matched or printed.
* util.c:
(xlookup) Use uint64_t for val.
(xlat_search) Likewise.
(printxvals) Likewise.
(addflags64) New function.
(printflags64) New function.
(sprintflags64) New function
* btrfs.c: New file.
* Makefile.am (strace_SOURCES): Add it.
* defs.h [LINUX] (btrfs_ioctl): New function.
* ioctls.c (ioctl_decode) [LINUX]: Use it to decode BTRFS_* ioctls.
* configure.ac: Add check for struct btrfs_ioctl_feature_flags.
Add check for struct btrfs_ioctl_fs_info_args.nodesize.
On 3/30/16 10:50 PM, Dmitry V. Levin wrote:
> On Wed, Mar 30, 2016 at 09:19:27PM -0400, Jeff Mahoney wrote:
> [...]
>> +#include "defs.h"
>> +#include
>> +#include
Again, thanks for the review.
> linux/btrfs.h was introduced by linux kernel commit v3.9-rc1~4^2~30^2~53,
> while strace supports b
On Wed, Mar 30, 2016 at 10:28:35PM -0400, Jeff Mahoney wrote:
> On 3/30/16 9:55 PM, Dmitry V. Levin wrote:
> > On Wed, Mar 30, 2016 at 09:19:26PM -0400, Jeff Mahoney wrote:
> > [...]
> >> +/*
> >> + * The kernel used to define 64-bit types on 64-bit systems on a per-arch
> >> + * basis. Some archi
On Wed, Mar 30, 2016 at 10:47:49PM -0400, Jeff Mahoney wrote:
> On 3/30/16 9:48 PM, Dmitry V. Levin wrote:
> > On Wed, Mar 30, 2016 at 09:19:25PM -0400, Jeff Mahoney wrote:
> >> Some ioctls have flags fields that are 64-bit. A 32-bit val means
> >> these flags will never be matched or printed.
[..
On Wed, Mar 30, 2016 at 09:19:27PM -0400, Jeff Mahoney wrote:
[...]
> +#include "defs.h"
> +#include
> +#include
linux/btrfs.h was introduced by linux kernel commit v3.9-rc1~4^2~30^2~53,
while strace supports build with much older kernel headers than v3.9-rc1,
so please add a check. I suppose m
On 3/30/16 9:48 PM, Dmitry V. Levin wrote:
> On Wed, Mar 30, 2016 at 09:19:25PM -0400, Jeff Mahoney wrote:
>> Some ioctls have flags fields that are 64-bit. A 32-bit val means
>> these flags will never be matched or printed.
Thanks for the review.
TBH, I expected there to be some discussion on t
On 3/30/16 9:55 PM, Dmitry V. Levin wrote:
> On Wed, Mar 30, 2016 at 09:19:26PM -0400, Jeff Mahoney wrote:
> [...]
>> +/*
>> + * The kernel used to define 64-bit types on 64-bit systems on a per-arch
>> + * basis. Some architectures would use unsigned long and others would u=
> se
>> + * unsigned
On Wed, Mar 30, 2016 at 09:19:26PM -0400, Jeff Mahoney wrote:
[...]
> +/*
> + * The kernel used to define 64-bit types on 64-bit systems on a per-arch
> + * basis. Some architectures would use unsigned long and others would use
> + * unsigned long long. These types were exported as part of the
>
On Wed, Mar 30, 2016 at 09:19:25PM -0400, Jeff Mahoney wrote:
> Some ioctls have flags fields that are 64-bit. A 32-bit val means
> these flags will never be matched or printed.
struct xlat is used for various kinds of thing all over the code,
and this tiny change of type might have unforeseen co
Some ioctls have flags fields that are 64-bit. A 32-bit val means
these flags will never be matched or printed.
* util.c:
(xlookup) Use uint64_t for val.
(xlat_search) Likewise.
(printxvals) Likewise.
(addflags) Use uint64_t for val and print with PRIx64 .
(printflags) Likewise.
(spri
Hi all -
This short series adds support for the btrfs ioctls. Its structures
make heavy use of __u64 so rather than cast every single member, I added
new PRI* macros to print them properly. It also uses 64-bit flags and
defines values that are larger than can be described by a 32-bit
variable, s
* btrfs.c: New file.
* Makefile.am (strace_SOURCES): Add it.
* defs.h [LINUX] (btrfs_ioctl): New function.
* ioctls.c (ioctl_decode) [LINUX]: Use it to decode BTRFS_* ioctls.
* configure.ac: Add check for struct btrfs_ioctl_feature_flags.
Add check for struct btrfs_ioctl_fs_info_args.nodesize.
Rather than cast every __u64 or __s64 before printing, we can
define printing helpers for those types directly.
* defs.h: define PRI__[uxs]64.
---
defs.h | 20
1 file changed, 20 insertions(+)
diff --git a/defs.h b/defs.h
index 0c60f1b..fe56de4 100644
--- a/defs.h
+++ b/defs
16 matches
Mail list logo