]> granicus.if.org Git - strace/blob - utimes.c
ioctl: print unrecognized ioctl codes in _IOC(dir,type,nr,size) format
[strace] / utimes.c
1 #include "defs.h"
2
3 static int
4 decode_utimes(struct tcb *tcp, int offset, int special)
5 {
6         if (entering(tcp)) {
7                 printpath(tcp, tcp->u_arg[offset]);
8                 tprints(", ");
9                 if (tcp->u_arg[offset + 1] == 0)
10                         tprints("NULL");
11                 else {
12                         tprints("{");
13                         printtv_bitness(tcp, tcp->u_arg[offset + 1],
14                                         BITNESS_CURRENT, special);
15                         tprints(", ");
16                         printtv_bitness(tcp, tcp->u_arg[offset + 1]
17                                         + sizeof(struct timeval),
18                                         BITNESS_CURRENT, special);
19                         tprints("}");
20                 }
21         }
22         return 0;
23 }
24
25 int
26 sys_utimes(struct tcb *tcp)
27 {
28         return decode_utimes(tcp, 0, 0);
29 }
30
31 int
32 sys_futimesat(struct tcb *tcp)
33 {
34         if (entering(tcp))
35                 print_dirfd(tcp, tcp->u_arg[0]);
36         return decode_utimes(tcp, 1, 0);
37 }
38
39 int
40 sys_utimensat(struct tcb *tcp)
41 {
42         if (entering(tcp)) {
43                 print_dirfd(tcp, tcp->u_arg[0]);
44                 decode_utimes(tcp, 1, 1);
45                 tprints(", ");
46                 printflags(at_flags, tcp->u_arg[3], "AT_???");
47         }
48         return 0;
49 }
50
51 #ifdef ALPHA
52 int
53 sys_osf_utimes(struct tcb *tcp)
54 {
55         if (entering(tcp)) {
56                 printpath(tcp, tcp->u_arg[0]);
57                 tprints(", ");
58                 printtv_bitness(tcp, tcp->u_arg[1], BITNESS_32,  0);
59         }
60         return 0;
61 }
62 #endif /* ALPHA */