#include #include #include #include #include #include #include #include char* initrd; long initrd_size; void read(void* args) { serdes_state state; start_deserialize(args,&state); deserialize_ptr(&state); size_t size=deserialize_int(&state); int pos=deserialize_int(&state); rpc_deallocate_buf(args,state.sizeorpos); long max_data=initrd_size-pos; if (size>max_data) { size=max_data; } char* data=malloc(sizeof(char)*size); for (long i=0;i