This error reports failure to create a temporary file, and
error_setg_file_open() would probably be too terse, so merely switch
to error_setg_errno() to add errno information.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-ID: <
20251121121438.
1249498-12-armbru@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
f = fopen(smb_conf, "w");
if (!f) {
+ int eno = errno;
+
slirp_smb_cleanup(s);
- error_setg(errp,
+ error_setg_errno(errp, eno,
"Could not create samba server configuration file '%s'",
smb_conf);
g_free(smb_conf);