Welcome to little lamb

Code » limb » release » tree

[release] / src / liblimb / siovec.h / siov_seek_gather.c

/* This file is part of limb                           https://lila.oss/limb
 * Copyright (C) 2023 Olivier Brunel                          jjk@jjacky.com */
/* SPDX-License-Identifier: GPL-2.0-only */
#include <limb/siovec.h>

size_t
siov_seek_gather(char *dst, size_t dlen, const struct iovec *v, unsigned int n, size_t offset)
{
    struct iovec vv[n];

    for (unsigned int i = 0; i < n; ++i)
        vv[i] = v[i];

    siov_seek(vv, n, offset);
    return siov_gather(dst, dlen, vv, n);
}