Commit Graph

18 Commits

Author SHA1 Message Date
89636759d7 Automatically replace PRI_kr[dux] with PRI_kl[dux]
Remove temporary macros created for transition from long
to kernel_ulong_t.

Automatically replace PRI_kr[dux] with PRI_kl[dux] using
$ git grep -l 'PRI_kr[dux]' | xargs sed -ri 's/PRI_kr([dux])/PRI_kl\1/g'

* defs.h (PRI_krd, PRI_kru, PRI_krx): Remove.  All users updated.
2016-12-26 10:43:34 +00:00
7fa3d78319 Automatically replace kernel_(scno|ureg)_t with kernel_ulong_t
Remove temporary types created for transition from long
to kernel_ulong_t.

Automatically replace kernel_scno_t and kernel_ureg_t with
kernel_ulong_t using
$ git grep -El 'kernel_(scno|ureg)_t' |
  xargs sed -ri 's/kernel_(scno|ureg)_t/kernel_ulong_t/g'

* kernel_types.h (kernel_scno_t, kernel_ureg_t): Remove.
All users updated.
2016-12-26 10:43:34 +00:00
1d5bb61c49 Print kernel_ureg_t and kernel_scno_t using dedicated format strings
Prepare for the change of kernel_ureg_t and kernel_scno_t from
unsigned long to kernel_ulong_t.

* defs.h (PRI_krd, PRI_kru, PRI_krx): New temporary macros.
All users updated.
2016-12-26 10:43:04 +00:00
9ec1fb02ef xattr: change size arguments type from unsigned long to kernel_ureg_t
* xattr.c (print_xattr_val): Change type of insize and size arguments
from unsigned long to kernel_ureg_t.
(print_xattr_list): Change type of size argument from unsigned long
to kernel_ureg_t.
2016-12-25 11:32:45 +00:00
a940d1a60f printstr: rename to printstrn, add printstr as a thin wrapper
As about half of all printstr uses cases are invocations with the last
argument set to -1, create a dedicated function for this use case.

* defs.h (printstr): Rename to printstrn.  All callers updated.
(printstr): New static inline function.  All callers updated.
2016-12-25 11:32:45 +00:00
8dbcedef30 xattr: change address argument type from unsigned long to kernel_ureg_t
* xattr.c (print_xattr_val, print_xattr_list): Change address
argument type from unsigned long to kernel_ureg_t.
2016-12-23 19:26:58 +00:00
Gabriel Laskar
dd3548a691 xattr: use printstr_ex instead of print_quoted_string
This fixes the display when using `-s` to limit the string size
of the values displayed by {get,set}xattr.

* xattr.c (print_xattr_val): Remove static buffer.  Use printstr_ex
instead of print_quoted_string.

Reported-by: Марк Коренберг <socketpair@gmail.com>
Signed-off-by: Gabriel Laskar <gabriel@lse.epita.fr>
2016-12-22 23:11:02 +00:00
ec9c31705b Fix corner cases of xattr family syscalls decoding
* xattr.c (print_xattr_val): Do not take insize into account, print it
as unsigned long.
Do not decode xattr values of size larger than XATTR_SIZE_MAX.
Use static buffer for fetching xattr values.
(print_xattr_list): Do not decode string when size is zero.
2016-05-10 21:50:37 +00:00
38a34c9349 Add copyright headers to some files which lack them
Before this change, all files that exist since 20th century had
copyright headers, while most files that appeared later didn't.  This
change fixes the inconsistency by adding missing copyright headers.

It doesn't mean that copyright headers became maintained.  In my view,
git history provides much better information on this subject and is much
more accurate than copyright headers.
2015-12-17 17:56:48 +00:00
6156d81cef xattr.c: make use of RVAL_DECODED
* xattr.c (sys_setxattr, sys_fsetxattr, sys_removexattr,
sys_fremovexattr): Update for RVAL_DECODED.
2015-07-14 23:38:58 +00:00
105c35bb19 print_xattr_val: do not fetch data in case of !verbose || syserror
* xattr.c (print_xattr_val): Do not fetch data in case
of !verbose || syserror.   Use printaddr.
2015-07-14 23:34:06 +00:00
8ae9c0913e print_xattr_list: use printaddr
* xattr.c (print_xattr_list): Use printaddr.
2015-07-14 23:31:35 +00:00
d45548d82e print_xattr_val: remove unused argument
* xattr.c (print_xattr_val): Remove unused "failed" argument.
(sys_setxattr, sys_fsetxattr, sys_getxattr, sys_fgetxattr): Update
all callers.
2015-07-14 23:29:47 +00:00
7a9ec1273c print_xattr_list: remove redundant address check
* xattr.c (print_xattr_list): Do not check for NULL the address passed
to printstr.
2015-07-14 23:29:12 +00:00
0c5619538f xattr: move fallback definitions of xattr flags to xlat/
* xattr.c: Include <sys/xattr.h> insread of <linux/xattr.h>.
Move definitions of XATTR_* flags ...
* xlat/xattrflags.in: ... here.
2015-06-17 19:56:11 +00:00
a0bd3749fc Declare syscall parsers using SYS_FUNC macro
Introduce SYS_FUNC macro to declare and define all syscall parsers.

* Makefile.am (BUILT_SOURCES, CLEANFILES): Add sys_func.h.
(sys_func.h): New rule.
* defs.h (SYS_FUNC_NAME, SYS_FUNC): New macros.
* linux/syscall.h: Include "sys_func.h".
[NEED_UID16_PARSERS]: Use SYS_FUNC to declare uid16 syscall parsers.
Remove other declarations.
* linux/alpha/syscallent.h (160, 161): Add sys_ prefix to osf_statfs
and osf_fstatfs syscall parsers.
* *.c: Use SYS_FUNC to define syscall parsers.
2015-04-07 11:22:49 +00:00
73e98805dd xattr: quote using print_quoted_string
* xattr.c (print_xattr_val): Drop local quoting code, use
print_quoted_string.
2015-01-26 19:08:37 +00:00
769ffe9797 file.c: move *xattr parsers to a separate file
* xattr.c: New file.
* Makefile.am (strace_SOURCES): Add it.
* file.c: Move sys_setxattr, sys_fsetxattr, sys_getxattr, sys_fgetxattr,
sys_listxattr, sys_flistxattr, sys_removexattr, sys_fremovexattr,
and related code to xattr.c.
2014-12-11 21:38:51 +00:00