diff options
| author | Marc-André Lureau <marcandre.lureau@redhat.com> | 2022-04-20 17:26:14 +0400 |
|---|---|---|
| committer | Marc-André Lureau <marcandre.lureau@redhat.com> | 2022-04-21 17:09:09 +0400 |
| commit | 548fb0da730072d8c96b40ce29b024dd16cbab92 (patch) | |
| tree | 97f39a8685323b6050c51d545299de81b1be1290 /qga/commands-common.h | |
| parent | 756a98dd701ec3a9127c700ba9e7e93254b05f28 (diff) | |
| download | focaccia-qemu-548fb0da730072d8c96b40ce29b024dd16cbab92.tar.gz focaccia-qemu-548fb0da730072d8c96b40ce29b024dd16cbab92.zip | |
qga: move qga_get_host_name()
The function is specific to qemu-ga, no need to share it in QEMU. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Reviewed-by: Konstantin Kostiuk <kkostiuk@redhat.com> Message-Id: <20220420132624.2439741-32-marcandre.lureau@redhat.com>
Diffstat (limited to 'qga/commands-common.h')
| -rw-r--r-- | qga/commands-common.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/qga/commands-common.h b/qga/commands-common.h index 90785ed4bb..d0e4a9696f 100644 --- a/qga/commands-common.h +++ b/qga/commands-common.h @@ -18,4 +18,15 @@ GuestFileHandle *guest_file_handle_find(int64_t id, Error **errp); GuestFileRead *guest_file_read_unsafe(GuestFileHandle *gfh, int64_t count, Error **errp); +/** + * qga_get_host_name: + * @errp: Error object + * + * Operating system agnostic way of querying host name. + * Compared to g_get_host_name(), it doesn't cache the result. + * + * Returns allocated hostname (caller should free), NULL on failure. + */ +char *qga_get_host_name(Error **errp); + #endif |