LLAPI_LAYOUT_COMP_USE(3)

NAME
llapi_layout_comp_use - change current component to relative position

SYNOPSIS
#include <lustre/lustreapi.h>

int llapi_layout_comp_use(struct llapi_layout *layout,
                          enum llapi_layout_comp_use *pos);

DESCRIPTION
Changes the currently active component of layout to the relative position given by pos. Possible values for pos are:

LLAPI_LAYOUT_COMP_USE_FIRST: The first component of the layout.

LLAPI_LAYOUT_COMP_USE_LAST: The last component of the layout.

LLAPI_LAYOUT_COMP_USE_NEXT: The next component after the current one.

LLAPI_LAYOUT_COMP_USE_PREV: The previous component before the current one.

RETURN VALUES
Return 0 on success, and 1 when there is no next or previous component. Otherwise, if an error occurred -1 is returned and errno is set appropriately.

ERRORS

EINVAL
    An invalid argument was specified.

ENOENT
    No such component ID exists.

AVAILABILITY
llapi_layout_comp_use() is part of the lustre(7) user application interface library since release 2.10.0

SEE ALSO
llapi_layout_alloc(3), llapi_layout_comp_del(3), llapi_layout_comp_use_id(3), llapi_layout_file_open(3), llapi_layout(7), lustreapi(7)