diff options
Diffstat (limited to 'libmount/src/utils.c')
-rw-r--r-- | libmount/src/utils.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/libmount/src/utils.c b/libmount/src/utils.c index ca1eb88d8..e740d83d0 100644 --- a/libmount/src/utils.c +++ b/libmount/src/utils.c @@ -705,6 +705,17 @@ done: } /** + * mnt_get_swaps_path: + * + * Returns: path to /proc/swaps or $LIBMOUNT_SWAPS. + */ +const char *mnt_get_swaps_path(void) +{ + const char *p = safe_getenv("LIBMOUNT_SWAPS"); + return p ? : _PATH_PROC_SWAPS; +} + +/** * mnt_get_fstab_path: * * Returns: path to /etc/fstab or $LIBMOUNT_FSTAB. |