|
From: | David Hildenbrand |
Subject: | Re: [PATCH v2 2/4] osdep: Make qemu_madvise() return ENOSYS on unsupported OSes |
Date: | Fri, 31 May 2024 09:53:35 +0200 |
User-agent: | Mozilla Thunderbird |
On 31.05.24 09:28, Michal Privoznik wrote:
Not every OS is capable of madvise() or posix_madvise() even. In that case, errno should be set to ENOSYS as it reflects the cause better. This also mimic what madvise()/posix_madvise() would return if kernel lacks corresponding syscall (e.g. due to configuration).
Yes and no. According to the man page " EINVAL advice is not a valid."if a particular MADV_* call is not implemented, we would get EINVAL, which is really unfortunate ... to detect what is actually supported :(
For the patch here ENOSYS makes sense: Reviewed-by: David Hildenbrand <david@redhat.com> -- Cheers, David / dhildenb
[Prev in Thread] | Current Thread | [Next in Thread] |