Blame SOURCES/0128-Remove-tcb-parameter-of-read_int_from_file.patch

760e82
From 924f71a4296be54e109784dfdb487b732bfc9bbf Mon Sep 17 00:00:00 2001
760e82
From: =?UTF-8?q?=C3=81kos=20Uzonyi?= <uzonyi.akos@gmail.com>
760e82
Date: Fri, 17 Jul 2020 23:24:36 +0200
760e82
Subject: [PATCH 128/138] Remove tcb parameter of read_int_from_file
760e82
760e82
* defs.h (read_int_from_file): Remove tcb parameter.
760e82
* util.c (read_int_from_file): Likewise.
760e82
* msghdr.c (get_optmem_max): Remove tcb parameter of read_int_from_file.
760e82
---
760e82
 defs.h   | 2 +-
760e82
 msghdr.c | 2 +-
760e82
 util.c   | 2 +-
760e82
 3 files changed, 3 insertions(+), 3 deletions(-)
760e82
760e82
diff --git a/defs.h b/defs.h
760e82
index d8bd513..dae1cd9 100644
760e82
--- a/defs.h
760e82
+++ b/defs.h
760e82
@@ -498,7 +498,7 @@ extern unsigned os_release;
760e82
 # undef KERNEL_VERSION
760e82
 # define KERNEL_VERSION(a, b, c) (((a) << 16) + ((b) << 8) + (c))
760e82
 
760e82
-extern int read_int_from_file(struct tcb *, const char *, int *);
760e82
+extern int read_int_from_file(const char *, int *);
760e82
 
760e82
 extern void set_sortby(const char *);
760e82
 extern int set_overhead(const char *);
760e82
diff --git a/msghdr.c b/msghdr.c
760e82
index becbb51..1ab4c6e 100644
760e82
--- a/msghdr.c
760e82
+++ b/msghdr.c
760e82
@@ -293,7 +293,7 @@ get_optmem_max(struct tcb *tcp)
760e82
 	static int optmem_max;
760e82
 
760e82
 	if (!optmem_max) {
760e82
-		if (read_int_from_file(tcp, "/proc/sys/net/core/optmem_max",
760e82
+		if (read_int_from_file("/proc/sys/net/core/optmem_max",
760e82
 				       &optmem_max) || optmem_max <= 0) {
760e82
 			optmem_max = sizeof(long long) * (2 * IOV_MAX + 512);
760e82
 		} else {
760e82
diff --git a/util.c b/util.c
760e82
index cde76c1..286c690 100644
760e82
--- a/util.c
760e82
+++ b/util.c
760e82
@@ -1517,7 +1517,7 @@ print_abnormal_hi(const kernel_ulong_t val)
760e82
 }
760e82
 
760e82
 int
760e82
-read_int_from_file(struct tcb *tcp, const char *const fname, int *const pvalue)
760e82
+read_int_from_file(const char *const fname, int *const pvalue)
760e82
 {
760e82
 	const int fd = open_file(fname, O_RDONLY);
760e82
 	if (fd < 0)
760e82
-- 
760e82
2.1.4
760e82