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