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

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