libmount Reference Manual | ||||
---|---|---|---|---|
Top | Description |
Monitor mountinfo changesMonitor mountinfo changes — monitor changes in the list of the mounted filesystems |
struct libmnt_tabdiff; struct libmnt_tabdiff * mnt_new_tabdiff (void
); void mnt_free_tabdiff (struct libmnt_tabdiff *df
); int mnt_tabdiff_next_change (struct libmnt_tabdiff *df
,struct libmnt_iter *itr
,struct libmnt_fs **old_fs
,struct libmnt_fs **new_fs
,int *oper
); int mnt_diff_tables (struct libmnt_tabdiff *df
,struct libmnt_table *old_tab
,struct libmnt_table *new_tab
);
struct libmnt_tabdiff * mnt_new_tabdiff (void
);
Allocates a new table diff struct.
Returns : |
new diff handler or NULL. |
void mnt_free_tabdiff (struct libmnt_tabdiff *df
);
Deallocates tab diff struct and all entries.
|
tab diff |
int mnt_tabdiff_next_change (struct libmnt_tabdiff *df
,struct libmnt_iter *itr
,struct libmnt_fs **old_fs
,struct libmnt_fs **new_fs
,int *oper
);
The options old_fs
, new_fs
and oper
are optional.
|
tabdiff pointer |
|
iterator |
|
returns the old entry or NULL if new entry added |
|
returns the new entry or NULL if old entry removed |
|
MNT_TABDIFF_{MOVE,UMOUNT,REMOUNT,MOUNT} flags |
Returns : |
0 on success, negative number in case of error or 1 at the end of list. |
int mnt_diff_tables (struct libmnt_tabdiff *df
,struct libmnt_table *old_tab
,struct libmnt_table *new_tab
);
Compares old_tab
and new_tab
, the result is stored in df
and accessible by
mnt_tabdiff_next_change()
.
|
diff handler |
|
old table |
|
new table |
Returns : |
number of changes, negative number in case of error. |