Those fds never were, so it's not fair to say that they are in "bad state".
Let's use the shorter and more direct errno.
const char *fname, /* only used for logging */
...) {
- _cleanup_close_ int fd_ro = -EBADFD;
+ _cleanup_close_ int fd_ro = -EBADF;
_cleanup_fclose_ FILE *f = NULL;
va_list ap;
int r;
}
int path_is_read_only_fs(const char *path) {
- _cleanup_close_ int fd = -EBADFD;
+ _cleanup_close_ int fd = -EBADF;
assert(path);
}
int vconsole_read_data(Context *c, sd_bus_message *m) {
- _cleanup_close_ int fd = -EBADFD;
+ _cleanup_close_ int fd = -EBADF;
struct stat st;
/* Do not try to re-read the file within single bus operation. */
}
int x11_read_data(Context *c, sd_bus_message *m) {
- _cleanup_close_ int fd = -EBADFD, fd_ro = -EBADFD;
+ _cleanup_close_ int fd = -EBADF, fd_ro = -EBADF;
_cleanup_fclose_ FILE *f = NULL;
bool in_section = false;
struct stat st;
}
static int locale_context_load_conf(LocaleContext *c, LocaleLoadFlag flag) {
- _cleanup_close_ int fd = -EBADFD;
+ _cleanup_close_ int fd = -EBADF;
struct stat st;
int r;