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

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