从scatterlist中检索字节

时间:2014-03-01 02:03:04

标签: c linux-kernel

鉴于

int * text =“string_test”;

我们知道

sg_set_buf(struct scatterlist *sg, const void *buf, unsigned int buflen)

在include / linux / scatterlist.h

如果我们这样做

  sg_set_buf(req.src, text, strlen(text));

我们如何从散点列表中检索text个字节?

1 个答案:

答案 0 :(得分:0)

        char *buf;
        buf = sg_virt (sg);