}
int block_device_new_from_path(const char *path, BlockDeviceLookupFlag flags, sd_device **ret) {
- _cleanup_close_ int fd = -1;
+ _cleanup_close_ int fd = -EBADF;
assert(path);
assert(ret);
}
int get_block_device(const char *path, dev_t *ret) {
- _cleanup_close_ int fd = -1;
+ _cleanup_close_ int fd = -EBADF;
assert(path);
assert(ret);
}
int get_block_device_harder(const char *path, dev_t *ret) {
- _cleanup_close_ int fd = -1;
+ _cleanup_close_ int fd = -EBADF;
assert(path);
assert(ret);
}
int lock_whole_block_device(dev_t devt, int operation) {
- _cleanup_close_ int lock_fd = -1;
+ _cleanup_close_ int lock_fd = -EBADF;
dev_t whole_devt;
int r;
}
int path_get_whole_disk(const char *path, bool backing, dev_t *ret) {
- _cleanup_close_ int fd = -1;
+ _cleanup_close_ int fd = -EBADF;
fd = open(path, O_CLOEXEC|O_PATH);
if (fd < 0)
int block_device_remove_all_partitions(sd_device *dev, int fd) {
_cleanup_(sd_device_enumerator_unrefp) sd_device_enumerator *e = NULL;
_cleanup_(sd_device_unrefp) sd_device *dev_unref = NULL;
- _cleanup_close_ int fd_close = -1;
+ _cleanup_close_ int fd_close = -EBADF;
bool has_partitions = false;
sd_device *part;
int r, k = 0;
}
int blockdev_reread_partition_table(sd_device *dev) {
- _cleanup_close_ int fd = -1;
+ _cleanup_close_ int fd = -EBADF;
assert(dev);