diff options
| author | Peter Maydell | 2020-09-16 17:25:30 +0200 |
|---|---|---|
| committer | Peter Maydell | 2020-09-16 17:25:30 +0200 |
| commit | 525009d04fa49567b0eba43f9ff3c17e560dabb7 (patch) | |
| tree | 90efbde052569b8bbc71cdd5611ea9ba006d75e1 /include | |
| parent | Merge remote-tracking branch 'remotes/cschoenebeck/tags/pull-9p-20200915' int... (diff) | |
| parent | block/file: switch to use qemu_open/qemu_create for improved errors (diff) | |
| download | qemu-525009d04fa49567b0eba43f9ff3c17e560dabb7.tar.gz qemu-525009d04fa49567b0eba43f9ff3c17e560dabb7.tar.xz qemu-525009d04fa49567b0eba43f9ff3c17e560dabb7.zip | |
Merge remote-tracking branch 'remotes/berrange/tags/block-odirect-pull-request' into staging
block: improve error reporting for unsupported O_DIRECT
# gpg: Signature made Wed 16 Sep 2020 10:45:48 BST
# gpg: using RSA key DAF3A6FDB26B62912D0E8E3FBE86EBB415104FDF
# gpg: Good signature from "Daniel P. Berrange <dan@berrange.com>" [full]
# gpg: aka "Daniel P. Berrange <berrange@redhat.com>" [full]
# Primary key fingerprint: DAF3 A6FD B26B 6291 2D0E 8E3F BE86 EBB4 1510 4FDF
* remotes/berrange/tags/block-odirect-pull-request:
block/file: switch to use qemu_open/qemu_create for improved errors
util: give a specific error message when O_DIRECT doesn't work
util: introduce qemu_open and qemu_create with error reporting
util: add Error object for qemu_open_internal error reporting
util: refactor qemu_open_old to split off variadic args handling
util: rename qemu_open() to qemu_open_old()
util: split off a helper for dealing with O_CLOEXEC flag
monitor: simplify functions for getting a dup'd fdset entry
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'include')
| -rw-r--r-- | include/monitor/monitor.h | 3 | ||||
| -rw-r--r-- | include/qemu/osdep.h | 9 |
2 files changed, 9 insertions, 3 deletions
diff --git a/include/monitor/monitor.h b/include/monitor/monitor.h index 1018d754a6..c0170773d4 100644 --- a/include/monitor/monitor.h +++ b/include/monitor/monitor.h @@ -43,8 +43,7 @@ int monitor_read_password(MonitorHMP *mon, ReadLineFunc *readline_func, AddfdInfo *monitor_fdset_add_fd(int fd, bool has_fdset_id, int64_t fdset_id, bool has_opaque, const char *opaque, Error **errp); -int monitor_fdset_get_fd(int64_t fdset_id, int flags); -int monitor_fdset_dup_fd_add(int64_t fdset_id, int dup_fd); +int monitor_fdset_dup_fd_add(int64_t fdset_id, int flags); void monitor_fdset_dup_fd_remove(int dup_fd); int64_t monitor_fdset_dup_fd_find(int dup_fd); diff --git a/include/qemu/osdep.h b/include/qemu/osdep.h index 412962d91a..577d9e8315 100644 --- a/include/qemu/osdep.h +++ b/include/qemu/osdep.h @@ -497,10 +497,17 @@ int qemu_madvise(void *addr, size_t len, int advice); int qemu_mprotect_rwx(void *addr, size_t size); int qemu_mprotect_none(void *addr, size_t size); -int qemu_open(const char *name, int flags, ...); +/* + * Don't introduce new usage of this function, prefer the following + * qemu_open/qemu_create that take an "Error **errp" + */ +int qemu_open_old(const char *name, int flags, ...); +int qemu_open(const char *name, int flags, Error **errp); +int qemu_create(const char *name, int flags, mode_t mode, Error **errp); int qemu_close(int fd); int qemu_unlink(const char *name); #ifndef _WIN32 +int qemu_dup_flags(int fd, int flags); int qemu_dup(int fd); #endif int qemu_lock_fd(int fd, int64_t start, int64_t len, bool exclusive); |
