Skip to contentSkip to conversation

ports/linux: add wrapper for statvfs64

PATCH In review Matt Madison 2 participants 4 messages Jan 29, 2024

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ports/linux: add wrapper for statvfs64

rpm 4.19 now builds with LFS64 support enabled by default, so it calls statvfs64() to get the space available on the filesystem it is installing packages into. Add a wrapper for this call so the right filesystem is used.

---
 ports/linux/statvfs/guts/statvfs64.c | 15 +++++++++++++++
 ports/linux/statvfs/wrapfuncs.in     |  1 +
 2 files changed, 16 insertions(+)
 create mode 100644 ports/linux/statvfs/guts/statvfs64.c
ports/linux/statvfs/guts/statvfs64.c new file +15 -0
new file mode 100644
index 0000000..856d3db
@@ -0,0 +1,15 @@
+/*
+ * Copyright (c) 2018 Wind River Systems; see
+ * guts/COPYRIGHT for information.
+ *
+ * SPDX-License-Identifier: LGPL-2.1-only
+ *
+ * int statvfs64(const char *path, struct statvfs64 *buf)
+ *	int rc = -1;
+ */
+
+	rc = real_statvfs64(path, buf);
+
+/*	return rc;
+ * }
+ */
ports/linux/statvfs/wrapfuncs.in +1 -0
index 1afb64d..6a59660 100644
@@ -1 +1,2 @@
 int statvfs(const char *path, struct statvfs *buf);
+int statvfs64(const char *path, struct statvfs64 *buf);
Signature · 1 line
2.34.1
#1 lore raw
Quoted 40 lines · Matt Madison

rpm 4.19 now builds with LFS64 support enabled by default, so it calls statvfs64() to get the space available on the filesystem it is installing packages into. Add a wrapper for this call so the right filesystem is used.

---
 ports/linux/statvfs/guts/statvfs64.c | 15 +++++++++++++++
 ports/linux/statvfs/wrapfuncs.in     |  1 +
 2 files changed, 16 insertions(+)
 create mode 100644 ports/linux/statvfs/guts/statvfs64.c
ports/linux/statvfs/guts/statvfs64.c new file +15 -0
new file mode 100644
index 0000000..856d3db
@@ -0,0 +1,15 @@
+/*
+ * Copyright (c) 2018 Wind River Systems; see
+ * guts/COPYRIGHT for information.
+ *
+ * SPDX-License-Identifier: LGPL-2.1-only
+ *
+ * int statvfs64(const char *path, struct statvfs64 *buf)
+ *     int rc = -1;
+ */
+
+       rc = real_statvfs64(path, buf);
+
+/*     return rc;
+ * }
+ */
ports/linux/statvfs/ renamed from ports/linux/statvfs/wrapfuncs.in +0 -0

wrapfuncs.in
index 1afb64d..6a59660 100644

ports/linux/statvfs/wrapfuncs.in line 2

Quoted 2 lines
ports/linux/statvfs/wrapfuncs.in +1 -0
@@ -1 +1,2 @@
 int statvfs(const char *path, struct statvfs *buf);
+int statvfs64(const char *path, struct statvfs64 *buf);

Statvfs is under a conditional I wonder if this should be too

Quoted 16 lines

--
2.34.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group. View/Reply Online (#194464):
https://lists.openembedded.org/g/openembedded-core/message/194464
Mute This Topic: https://lists.openembedded.org/mt/104034596/1997914
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [ [email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

#2 lore raw

Should be covered by the same conditional - the guts are in the same directory.

-M

Quoted 66 lines · Khem Raj
Quoted 40 lines · Matt Madison

rpm 4.19 now builds with LFS64 support enabled by default, so it calls statvfs64() to get the space available on the filesystem it is installing packages into. Add a wrapper for this call so the right filesystem is used.

---
 ports/linux/statvfs/guts/statvfs64.c | 15 +++++++++++++++
 ports/linux/statvfs/wrapfuncs.in     |  1 +
 2 files changed, 16 insertions(+)
 create mode 100644 ports/linux/statvfs/guts/statvfs64.c
ports/linux/statvfs/guts/statvfs64.c new file +15 -0
new file mode 100644
index 0000000..856d3db
@@ -0,0 +1,15 @@
+/*
+ * Copyright (c) 2018 Wind River Systems; see
+ * guts/COPYRIGHT for information.
+ *
+ * SPDX-License-Identifier: LGPL-2.1-only
+ *
+ * int statvfs64(const char *path, struct statvfs64 *buf)
+ *     int rc = -1;
+ */
+
+       rc = real_statvfs64(path, buf);
+
+/*     return rc;
+ * }
+ */
ports/linux/statvfs/ renamed from ports/linux/statvfs/wrapfuncs.in +0 -0

wrapfuncs.in
index 1afb64d..6a59660 100644

ports/linux/statvfs/wrapfuncs.in line 2

Quoted 2 lines
ports/linux/statvfs/wrapfuncs.in +1 -0
@@ -1 +1,2 @@
 int statvfs(const char *path, struct statvfs *buf);
+int statvfs64(const char *path, struct statvfs64 *buf);

Statvfs is under a conditional I wonder if this should be too

Quoted 16 lines

--
2.34.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group. View/Reply Online (#194464):
https://lists.openembedded.org/g/openembedded-core/message/194464
Mute This Topic: https://lists.openembedded.org/mt/104034596/1997914
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [ [email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

#3 lore raw
Quoted 3 lines · Matt Madison

Should be covered by the same conditional - the guts are in the same directory.

right seems so. Thanks it looks ok now

Quoted 65 lines

-M

Quoted 62 lines · Khem Raj
Quoted 39 lines · Matt Madison

rpm 4.19 now builds with LFS64 support enabled by default, so it calls statvfs64() to get the space available on the filesystem it is installing packages into. Add a wrapper for this call so the right filesystem is used.

---
 ports/linux/statvfs/guts/statvfs64.c | 15 +++++++++++++++
 ports/linux/statvfs/wrapfuncs.in     |  1 +
 2 files changed, 16 insertions(+)
 create mode 100644 ports/linux/statvfs/guts/statvfs64.c
ports/linux/statvfs/guts/statvfs64.c new file +15 -0
new file mode 100644
index 0000000..856d3db
@@ -0,0 +1,15 @@
+/*
+ * Copyright (c) 2018 Wind River Systems; see
+ * guts/COPYRIGHT for information.
+ *
+ * SPDX-License-Identifier: LGPL-2.1-only
+ *
+ * int statvfs64(const char *path, struct statvfs64 *buf)
+ *     int rc = -1;
+ */
+
+       rc = real_statvfs64(path, buf);
+
+/*     return rc;
+ * }
+ */
ports/linux/statvfs/wrapfuncs.in +0 -0
index 1afb64d..6a59660 100644

ports/linux/statvfs/wrapfuncs.in line 2

Quoted 2 lines
ports/linux/statvfs/wrapfuncs.in +1 -0
@@ -1 +1,2 @@
 int statvfs(const char *path, struct statvfs *buf);
+int statvfs64(const char *path, struct statvfs64 *buf);

Statvfs is under a conditional I wonder if this should be too

Quoted 14 lines

--
2.34.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#194464): https://lists.openembedded.org/g/openembedded-core/message/194464
Mute This Topic: https://lists.openembedded.org/mt/104034596/1997914
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-