1 /* SPDX-License-Identifier: LGPL-2.1-or-later */
2 #pragma once
3 
4 /***
5   Copyright © 2010 ProFUSION embedded systems
6 ***/
7 
8 #include "list.h"
9 
10 int umount_all(bool *changed, int umount_log_level);
11 
12 int swapoff_all(bool *changed);
13 
14 int loopback_detach_all(bool *changed, int umount_log_level);
15 
16 int dm_detach_all(bool *changed, int umount_log_level);
17 
18 int md_detach_all(bool *changed, int umount_log_level);
19 
20 /* This is exported just for testing */
21 typedef struct MountPoint {
22         char *path;
23         char *remount_options;
24         unsigned long remount_flags;
25         bool try_remount_ro;
26         dev_t devnum;
27         LIST_FIELDS(struct MountPoint, mount_point);
28 } MountPoint;
29 
30 int mount_points_list_get(const char *mountinfo, MountPoint **head);
31 void mount_points_list_free(MountPoint **head);
32 int swap_list_get(const char *swaps, MountPoint **head);
33