Browse Source

utimes.c: make use of RVAL_DECODED

* utimes.c (decode_utimes): Change to return void.
Update for RVAL_DECODED.
(sys_utimes, sys_futimesat, sys_utimensat, sys_osf_utimes):
Update callers.  Update for RVAL_DECODED.
Dmitry V. Levin 4 years ago
parent
commit
c9a199278b
1 changed files with 31 additions and 33 deletions
  1. 31
    33
      utimes.c

+ 31
- 33
utimes.c View File

@@ -1,58 +1,56 @@
1 1
 #include "defs.h"
2 2
 
3
-static int
3
+static void
4 4
 decode_utimes(struct tcb *tcp, int offset, int special)
5 5
 {
6
-	if (entering(tcp)) {
7
-		printpath(tcp, tcp->u_arg[offset]);
6
+	printpath(tcp, tcp->u_arg[offset]);
7
+	tprints(", ");
8
+	if (tcp->u_arg[offset + 1] == 0)
9
+		tprints("NULL");
10
+	else {
11
+		tprints("[");
12
+		printtv_bitness(tcp, tcp->u_arg[offset + 1],
13
+				BITNESS_CURRENT, special);
8 14
 		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
-		}
15
+		printtv_bitness(tcp, tcp->u_arg[offset + 1]
16
+				+ sizeof(struct timeval),
17
+				BITNESS_CURRENT, special);
18
+		tprints("]");
21 19
 	}
22
-	return 0;
23 20
 }
24 21
 
25 22
 SYS_FUNC(utimes)
26 23
 {
27
-	return decode_utimes(tcp, 0, 0);
24
+	decode_utimes(tcp, 0, 0);
25
+
26
+	return RVAL_DECODED;
28 27
 }
29 28
 
30 29
 SYS_FUNC(futimesat)
31 30
 {
32
-	if (entering(tcp))
33
-		print_dirfd(tcp, tcp->u_arg[0]);
34
-	return decode_utimes(tcp, 1, 0);
31
+	print_dirfd(tcp, tcp->u_arg[0]);
32
+	decode_utimes(tcp, 1, 0);
33
+
34
+	return RVAL_DECODED;
35 35
 }
36 36
 
37 37
 SYS_FUNC(utimensat)
38 38
 {
39
-	if (entering(tcp)) {
40
-		print_dirfd(tcp, tcp->u_arg[0]);
41
-		decode_utimes(tcp, 1, 1);
42
-		tprints(", ");
43
-		printflags(at_flags, tcp->u_arg[3], "AT_???");
44
-	}
45
-	return 0;
39
+	print_dirfd(tcp, tcp->u_arg[0]);
40
+	decode_utimes(tcp, 1, 1);
41
+	tprints(", ");
42
+	printflags(at_flags, tcp->u_arg[3], "AT_???");
43
+
44
+	return RVAL_DECODED;
46 45
 }
47 46
 
48 47
 #ifdef ALPHA
49 48
 SYS_FUNC(osf_utimes)
50 49
 {
51
-	if (entering(tcp)) {
52
-		printpath(tcp, tcp->u_arg[0]);
53
-		tprints(", ");
54
-		printtv_bitness(tcp, tcp->u_arg[1], BITNESS_32,  0);
55
-	}
56
-	return 0;
50
+	printpath(tcp, tcp->u_arg[0]);
51
+	tprints(", ");
52
+	printtv_bitness(tcp, tcp->u_arg[1], BITNESS_32,  0);
53
+
54
+	return RVAL_DECODED;
57 55
 }
58 56
 #endif /* ALPHA */

Loading…
Cancel
Save