diff mbox series

[pseudo] ports/linux: add wrapper for statvfs64

Message ID 20240129162615.3724802-1-matt@madison.systems
State New
Headers show
Series [pseudo] ports/linux: add wrapper for statvfs64 | expand

Commit Message

Matt Madison Jan. 29, 2024, 4:26 p.m. UTC
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.

Signed-off-by: Matt Madison <matt@madison.systems>
---
 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

Comments

Khem Raj Jan. 29, 2024, 4:48 p.m. UTC | #1
On Mon, Jan 29, 2024 at 8:26 AM Matt Madison <matt@madison.systems> wrote:

> 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.
>
> Signed-off-by: Matt Madison <matt@madison.systems>
> ---
>  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
>
> diff --git a/ports/linux/statvfs/guts/statvfs64.c
> b/ports/linux/statvfs/guts/statvfs64.c
> new file mode 100644
> index 0000000..856d3db
> --- /dev/null
> +++ b/ports/linux/statvfs/guts/statvfs64.c
> @@ -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;
> + * }
> + */
> diff --git a/ports/linux/statvfs/wrapfuncs.in b/ports/linux/statvfs/
> wrapfuncs.in
> index 1afb64d..6a59660 100644
> --- a/ports/linux/statvfs/wrapfuncs.in
> +++ b/ports/linux/statvfs/wrapfuncs.in
> @@ -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

>
> --
> 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: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [
> raj.khem@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
>
Matt Madison Jan. 29, 2024, 6:03 p.m. UTC | #2
Should be covered by the same conditional - the guts are in the same
directory.

-M

On Mon, Jan 29, 2024 at 8:48 AM Khem Raj <raj.khem@gmail.com> wrote:

>
>
> On Mon, Jan 29, 2024 at 8:26 AM Matt Madison <matt@madison.systems> wrote:
>
>> 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.
>>
>> Signed-off-by: Matt Madison <matt@madison.systems>
>> ---
>>  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
>>
>> diff --git a/ports/linux/statvfs/guts/statvfs64.c
>> b/ports/linux/statvfs/guts/statvfs64.c
>> new file mode 100644
>> index 0000000..856d3db
>> --- /dev/null
>> +++ b/ports/linux/statvfs/guts/statvfs64.c
>> @@ -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;
>> + * }
>> + */
>> diff --git a/ports/linux/statvfs/wrapfuncs.in b/ports/linux/statvfs/
>> wrapfuncs.in
>> index 1afb64d..6a59660 100644
>> --- a/ports/linux/statvfs/wrapfuncs.in
>> +++ b/ports/linux/statvfs/wrapfuncs.in
>> @@ -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
>
>>
>> --
>> 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: openembedded-core+owner@lists.openembedded.org
>> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [
>> raj.khem@gmail.com]
>> -=-=-=-=-=-=-=-=-=-=-=-
>>
>>
Khem Raj Jan. 29, 2024, 6:16 p.m. UTC | #3
On Mon, Jan 29, 2024 at 10:03 AM Matt Madison <matt@madison.systems> wrote:
>
> Should be covered by the same conditional - the guts are in the same directory.
>

right seems so. Thanks it looks ok now

> -M
>
> On Mon, Jan 29, 2024 at 8:48 AM Khem Raj <raj.khem@gmail.com> wrote:
>>
>>
>>
>> On Mon, Jan 29, 2024 at 8:26 AM Matt Madison <matt@madison.systems> wrote:
>>>
>>> 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.
>>>
>>> Signed-off-by: Matt Madison <matt@madison.systems>
>>> ---
>>>  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
>>>
>>> diff --git a/ports/linux/statvfs/guts/statvfs64.c b/ports/linux/statvfs/guts/statvfs64.c
>>> new file mode 100644
>>> index 0000000..856d3db
>>> --- /dev/null
>>> +++ b/ports/linux/statvfs/guts/statvfs64.c
>>> @@ -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;
>>> + * }
>>> + */
>>> diff --git a/ports/linux/statvfs/wrapfuncs.in b/ports/linux/statvfs/wrapfuncs.in
>>> index 1afb64d..6a59660 100644
>>> --- a/ports/linux/statvfs/wrapfuncs.in
>>> +++ b/ports/linux/statvfs/wrapfuncs.in
>>> @@ -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
>>>
>>>
>>> --
>>> 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: openembedded-core+owner@lists.openembedded.org
>>> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [raj.khem@gmail.com]
>>> -=-=-=-=-=-=-=-=-=-=-=-
>>>
diff mbox series

Patch

diff --git a/ports/linux/statvfs/guts/statvfs64.c b/ports/linux/statvfs/guts/statvfs64.c
new file mode 100644
index 0000000..856d3db
--- /dev/null
+++ b/ports/linux/statvfs/guts/statvfs64.c
@@ -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;
+ * }
+ */
diff --git a/ports/linux/statvfs/wrapfuncs.in b/ports/linux/statvfs/wrapfuncs.in
index 1afb64d..6a59660 100644
--- a/ports/linux/statvfs/wrapfuncs.in
+++ b/ports/linux/statvfs/wrapfuncs.in
@@ -1 +1,2 @@ 
 int statvfs(const char *path, struct statvfs *buf);
+int statvfs64(const char *path, struct statvfs64 *buf);