• Pavel Emelyanov's avatar
    crtools: R/W API rewrite · 164ccc09
    Pavel Emelyanov authored
    Kill all the macros for reading/writing image parts. New API looks like
    
    * write_img_buf/write_img
      Write an object into an image. Reports 0 for OK, -1 for error. The _buf
      version accepts object size as an argument, the other one uses sizeof()
    
    * read_img_buf/read_img
      Reads an object from image. Reports 0 for OK, -1 for error or EOF.
    
    * read_img_buf_eof/read_img
      Reads an object from image. Reports 1 for OK, 0 for EOF and -1 for error.
      This is not symmetrical with the previous one, but it was done deliberately
      to make it possible to write code like
    
      ret = read_img_bug_eof();
      if (ret <= 0)
    	return ret; /* 0 means OK, all is done, -1 means error was met */.
    
      ... /* 1 means object was read, can proceed */
    Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
    Signed-off-by: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
    164ccc09
Name
Last commit
Last update
..
atomic.h Loading commit data...
bitops.h Loading commit data...
compiler.h Loading commit data...
crtools.h Loading commit data...
files.h Loading commit data...
image.h Loading commit data...
inet_diag.h Loading commit data...
libnetlink.h Loading commit data...
list.h Loading commit data...
lock.h Loading commit data...
log.h Loading commit data...
parasite-syscall.h Loading commit data...
parasite.h Loading commit data...
proc_parse.h Loading commit data...
ptrace.h Loading commit data...
restorer-log.h Loading commit data...
restorer.h Loading commit data...
sockets.h Loading commit data...
syscall-codes.h Loading commit data...
syscall.h Loading commit data...
types.h Loading commit data...
unix_diag.h Loading commit data...
util.h Loading commit data...