Dmitry V. Levin 8d3743868e Fix printing of mode_t, umode_t, and umask types
Print numeric umode_t type using %#03ho format.
Print return value of umask syscall using %#03lo format.
When printing symbolic mode_t type, always print lower 9 bits,
and print the numeric part using %#03o format.

* defs.h (sprintmode): Remove.
(print_symbolic_mode_t, print_numeric_umode_t,
print_numeric_long_umask): New prototypes.
* printmode.c (sprintmode): Remove.
(print_symbolic_mode_t, print_numeric_umode_t,
print_numeric_long_umask): New functions.
* chmod.c (decode_chmod): Use print_numeric_umode_t.
* ipc_msg.c (SYS_FUNC(msgget)): Likewise.
* ipc_msgctl.c (print_msqid_ds): Likewise.
* ipc_sem.c (SYS_FUNC(semget)): Likewise.
* ipc_shm.c (SYS_FUNC(shmget)): Likewise.
* ipc_shmctl.c (print_shmid_ds): Likewise.
* mq.c (SYS_FUNC(mq_open)): Likewise.
* open.c (decode_open, SYS_FUNC(creat)): Likewise.
* umask.c (SYS_FUNC(umask)): Likewise.
* mknod.c (decode_mknod): Use print_symbolic_mode_t.
* printstat.h (DO_PRINTSTAT): Likewise.
* syscall.c (trace_syscall_exiting): Use print_numeric_long_umask.
* tests/umode_t.c: New file.
* tests/Makefile.am (EXTRA_DIST): Add it.
* tests/creat.c: Rewrite as a thin wrapper around umode_t.c
* tests/mkdir.c: Likewise.
* tests/mkdirat.c: Likewise.
* tests/mknod.c: Extend test coverage of mknod syscall.
* tests/mknodat.c: Extend test coverage of mknodat syscall.
* tests/umask.c: Extend test coverage of umask syscall.
* tests/creat.test: Update the value specified for strace -a parameter.
* tests/mkdir.test: Likewise.
* tests/mkdirat.test: Likewise.
* tests/mknodat.test: Likewise.
2016-08-03 23:27:03 +00:00
..
2016-04-21 17:37:43 +00:00
2016-04-21 20:20:42 +00:00
2016-07-28 00:06:46 +00:00
2016-02-14 22:30:27 +00:00
2016-08-02 16:47:34 +00:00
2016-01-06 11:29:16 +00:00
2016-05-17 10:53:03 +00:00
2016-05-17 10:53:03 +00:00
2016-05-24 14:52:27 +00:00
2016-03-07 23:13:28 +00:00
2016-04-18 01:10:43 +00:00
2016-07-26 09:58:37 +00:00
2016-04-01 23:34:33 +00:00
2016-03-12 23:52:52 +00:00
2016-03-12 23:52:52 +00:00
2016-03-12 23:52:52 +00:00
2016-05-08 00:00:18 +00:00
2016-04-08 07:59:14 +00:00
2016-04-08 07:59:15 +00:00
2016-05-10 01:37:46 +00:00
2016-05-09 21:46:17 +00:00
2016-04-08 07:59:16 +00:00
2016-01-05 23:12:51 +00:00
2015-08-01 22:23:58 +00:00
2015-08-01 22:23:58 +00:00
2016-04-21 17:35:39 +00:00
2016-04-02 13:13:16 +00:00
2016-04-02 14:07:02 +00:00
2016-04-01 23:34:33 +00:00
2016-03-30 00:13:56 +00:00
2016-01-05 22:41:28 +00:00
2016-04-01 23:34:33 +00:00
2016-01-05 23:17:07 +00:00
2016-03-23 13:38:35 +00:00
2016-04-21 17:37:44 +00:00
2016-04-21 17:37:44 +00:00
2016-01-06 11:36:54 +00:00
2016-02-19 03:39:59 +00:00
2016-04-21 17:31:05 +00:00
2016-04-21 17:31:05 +00:00
2016-05-10 11:00:12 +00:00
2016-05-05 21:20:56 +00:00
2016-05-05 21:20:45 +00:00
2016-04-20 01:08:13 +00:00
2016-04-20 01:08:13 +00:00
2016-01-06 11:59:06 +00:00
2016-01-06 11:55:13 +00:00
2015-08-28 08:46:23 +00:00
2015-08-28 08:46:23 +00:00
2016-01-06 11:59:29 +00:00
2016-01-06 11:59:58 +00:00
2016-07-25 09:20:09 +00:00
2016-07-22 19:30:30 +00:00
2016-04-27 14:22:02 +00:00
2016-04-27 14:22:02 +00:00
2015-12-10 02:06:25 +00:00
2016-05-11 12:26:00 +00:00
2016-05-11 12:26:00 +00:00
2016-04-06 06:18:48 +00:00
2016-04-21 18:16:50 +00:00
2016-04-27 11:11:12 +00:00
2016-04-27 11:11:12 +00:00
2016-04-09 23:34:18 +00:00
2016-03-30 00:13:56 +00:00
2016-05-25 00:11:37 +00:00
2016-01-06 11:52:43 +00:00
2015-08-28 08:46:23 +00:00
2015-08-28 08:46:23 +00:00
2016-05-11 12:26:00 +00:00
2016-05-11 12:26:00 +00:00
2016-03-30 00:13:56 +00:00
2016-04-04 01:35:28 +00:00
2016-03-30 00:13:56 +00:00
2016-01-05 22:53:28 +00:00
2016-04-27 14:22:22 +00:00
2016-04-27 14:22:22 +00:00
2016-01-06 11:33:13 +00:00
2016-01-06 11:38:05 +00:00
2016-05-07 23:37:53 +00:00
2016-05-07 23:37:53 +00:00
2016-01-06 11:44:32 +00:00
2016-03-30 00:13:56 +00:00
2016-04-03 16:37:43 +00:00
2016-01-06 12:03:57 +00:00
2016-04-26 10:11:41 +00:00
2016-04-26 10:11:41 +00:00
2016-04-25 10:24:12 +00:00
2016-04-25 10:24:12 +00:00
2013-06-18 17:07:37 +00:00
2016-04-26 10:31:11 +00:00
2016-04-26 10:31:11 +00:00
2016-04-20 00:11:27 +00:00
2016-04-20 00:11:27 +00:00
2016-04-25 10:24:12 +00:00
2016-04-01 23:34:33 +00:00
2016-04-21 22:05:56 +00:00
2016-04-20 01:08:12 +00:00
2015-07-18 00:01:40 +00:00
2014-06-18 15:18:47 +00:00
2014-06-18 15:18:47 +00:00
2014-06-18 15:18:47 +00:00
2014-06-18 15:18:47 +00:00
2014-06-18 15:18:47 +00:00
2016-06-09 01:28:33 +00:00
2016-06-09 01:28:33 +00:00
2016-05-08 00:00:18 +00:00
2016-03-24 01:27:03 +00:00
2016-05-08 00:00:18 +00:00
2016-03-24 00:59:32 +00:00
2016-03-24 00:31:23 +00:00
2016-03-24 01:03:31 +00:00
2016-03-24 01:10:02 +00:00
2016-04-06 06:18:50 +00:00
2016-04-25 10:24:48 +00:00
2016-04-25 10:24:48 +00:00
2016-04-20 01:08:13 +00:00
2016-04-26 10:29:58 +00:00
2016-04-26 10:29:58 +00:00
2016-02-08 18:27:17 +00:00
2016-01-04 23:43:09 +00:00
2016-01-06 11:31:48 +00:00
2016-07-28 00:06:46 +00:00
2016-01-06 00:05:41 +00:00
2016-01-05 23:24:50 +00:00
2016-01-05 23:24:36 +00:00
2015-03-31 20:52:41 +00:00
2015-03-31 20:52:41 +00:00
2016-03-30 00:13:56 +00:00
2016-04-26 10:11:41 +00:00
2016-04-26 10:11:41 +00:00
2016-04-06 06:18:49 +00:00
2016-07-26 12:16:58 +00:00
2016-05-24 20:09:16 +00:00
2016-04-21 22:05:57 +00:00
2016-01-04 23:38:19 +00:00