• Pavel Emelyanov's avatar
    fdset: Introduce new fdsets · 1fb1d941
    Pavel Emelyanov authored
    Current fdsets are ugly, limited (bitmask will exhaust in several months) and
    suffer from unknown problems with fdsets reuse :(
    
    With new approach (this set) the images management is simple. The basic function
    is open_image, which gives you an fd for an image. If you want to pre-open several
    images at once instead of calling open_image every single time, you can use the
    new fdsets.
    
    Images CR_FD_ descriptors should be grouped like
    
    _CR_FD_FOO_FROM,
    CR_FD_FOO_ITEM1,
    CR_FD_FOO_ITEM2,
    ..
    CR_FD_FOO_ITEMN,
    _CR_FD_FOO_TO,
    
    After this you can call cr_fd_open() specifying ranges -- _FROM and _TO macros,
    it will give you an cr_fdset object. Then the fdset_fd(set, type) will give you
    the descriptor of the open "set" group corresponding to the "type" type.
    
    3 groups are introduced in this set -- tasks, ns and global.
    
    That's it.
    Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
    1fb1d941
Name
Last commit
Last update
Documentation Loading commit data...
include Loading commit data...
test Loading commit data...
tools Loading commit data...
.gitignore Loading commit data...
.mailmap Loading commit data...
COPYING Loading commit data...
Makefile Loading commit data...
Makefile.inc Loading commit data...
README Loading commit data...
cr-check.c Loading commit data...
cr-dump.c Loading commit data...
cr-restore.c Loading commit data...
cr-show.c Loading commit data...
crtools.c Loading commit data...
file-ids.c Loading commit data...
files.c Loading commit data...
gen-offsets.sh Loading commit data...
ipc_ns.c Loading commit data...
libnetlink.c Loading commit data...
log.c Loading commit data...
namespaces.c Loading commit data...
parasite-syscall.c Loading commit data...
parasite.c Loading commit data...
parasite.lds.S Loading commit data...
proc_parse.c Loading commit data...
ptrace.c Loading commit data...
rbtree.c Loading commit data...
restorer-log.c Loading commit data...
restorer.c Loading commit data...
restorer.lds.S Loading commit data...
sockets.c Loading commit data...
sysctl.c Loading commit data...
util-net.c Loading commit data...
util.c Loading commit data...
uts_ns.c Loading commit data...