Il 26/09/2013 14:44, Lei Li ha scritto: >> >> The basis of your code will still be the socket-based QEMUFile, but >> you'll need your own QEMUFile since you're adding Unix-specific >> functionality. For this it is not a problem to have two copies the >> QEMUFile code for sockets, one in savevm.c and one in migration-unix.c. > > Have two copies of the QEMUFile code for sockets, do you mean in my own > QEMUFile, say QEMUFilePipe, includes both the copy of QEMUFileSocket > code (like get_fd, get_buffer, writev_buffer..) and the Unix-specific > functionality code that override these three hooks like your suggestions > above?
Yes (the name could be either QEMUFilePipe or QEMUFileUnix, I guess). > I guess 'migration-unix.c' you typed is 'migration-local.c', right? I wasn't sure of the reason why 'migration-unix.c' and 'migration-local.c' were split, since now the choice is done with a capability rather than a different protocol. Thanks, Paolo