Agent can send VDAgentFileXferStatusMessage with result VD_AGENT_FILE_XFER_STATUS_NOT_ENOUGH_SPACE to indicate lack of free space. This enables more detailed error reporting, so the user knows why the file transfer has failed. --- spice/vd_agent.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/spice/vd_agent.h b/spice/vd_agent.h index 3b1f183..3c4de05 100644 --- a/spice/vd_agent.h +++ b/spice/vd_agent.h @@ -99,11 +99,16 @@ enum { VD_AGENT_FILE_XFER_STATUS_CANCELLED, VD_AGENT_FILE_XFER_STATUS_ERROR, VD_AGENT_FILE_XFER_STATUS_SUCCESS, + VD_AGENT_FILE_XFER_STATUS_NOT_ENOUGH_SPACE, }; typedef struct SPICE_ATTR_PACKED VDAgentFileXferStatusMessage { uint32_t id; uint32_t result; + /* Used when result is VD_AGENT_FILE_XFER_STATUS_NOT_ENOUGH_SPACE + * to send available space on remote machine (bytes) + */ + uint64_t data[0]; } VDAgentFileXferStatusMessage; typedef struct SPICE_ATTR_PACKED VDAgentFileXferStartMessage { @@ -248,6 +253,7 @@ enum { VD_AGENT_CAP_AUDIO_VOLUME_SYNC, VD_AGENT_CAP_MONITORS_CONFIG_POSITION, VD_AGENT_CAP_FILE_XFER_DISABLED, + VD_AGENT_CAP_FILE_XFER_FREE_SPACE, VD_AGENT_END_CAP, }; -- 2.12.2 _______________________________________________ Spice-devel mailing list Spice-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/spice-devel