Welcome to NYCU CSIT Mirror site

Iterator: libmount Reference Manual

Iterator

Iterator — unified iterator

Functions

Types and Values

struct libmnt_iter

Description

The iterator keeps the direction and the last position for access to the internal library tables/lists.

Functions

mnt_free_iter ()

void
mnt_free_iter (struct libmnt_iter *itr);

Deallocates the iterator.

Parameters

itr

iterator pointer

 

mnt_iter_get_direction ()

int
mnt_iter_get_direction (struct libmnt_iter *itr);

Parameters

itr

iterator pointer

 

Returns

MNT_INTER_{FOR,BACK}WARD


mnt_new_iter ()

struct libmnt_iter *
mnt_new_iter (int direction);

Parameters

direction

MNT_INTER_{FOR,BACK}WARD direction

 

Returns

newly allocated generic libmount iterator.


mnt_reset_iter ()

void
mnt_reset_iter (struct libmnt_iter *itr,
                int direction);

Resets the iterator.

Parameters

itr

iterator pointer

 

direction

MNT_INTER_{FOR,BACK}WARD or -1 to keep the direction unchanged

 

Types and Values

struct libmnt_iter

struct libmnt_iter;

Generic iterator (stores state about lists)