Files
systemd/src/basic
Yu Watanabe e6a25c2fc7 stat-util: make proc_mounted() not update errno
Typically, proc_mounted() is used in error handling. Hence, it is better
to make it not update the original errno.

Currently, there are two places that returns wrong error code:
- pidref_get_capability() in src/basic/capability-util.c
```c
        _cleanup_fclose_ FILE *f = fopen(path, "re");
        if (!f) {
                if (errno == ENOENT && proc_mounted() == 0)
                        return -ENOSYS;

                return -errno;
        }
```
- fdset_new_fill() in src/shared/fdset.c
```c
        d = opendir("/proc/self/fd");
        if (!d) {
                if (errno == ENOENT && proc_mounted() == 0)
                        return -ENOSYS;

                return -errno;
        }
```

Rather than fixing them, let's make proc_mounted() not update errno,
otherwise we may make a similar failure in a future.
2026-01-20 22:37:04 +09:00
..
2025-05-25 10:06:07 +02:00
2026-01-06 10:34:02 +01:00
2025-12-15 08:50:13 +09:00
2025-09-19 14:46:55 +02:00
2025-12-15 08:50:13 +09:00
2025-09-19 16:46:07 +02:00
2025-12-15 08:50:13 +09:00
2025-05-25 10:06:07 +02:00
2025-05-25 10:06:07 +02:00
2025-12-15 08:50:13 +09:00
2025-07-26 05:00:02 +09:00
2025-12-15 08:50:13 +09:00
2025-05-25 10:06:07 +02:00
2025-12-15 08:50:13 +09:00
…
2025-12-15 08:50:13 +09:00
2026-01-02 06:28:39 +09:00
2025-05-25 10:06:07 +02:00
2025-12-15 08:50:13 +09:00