/* SPDX-License-Identifier: LGPL-2.1+ */
#include "alloc-util.h"
+#include "errno-util.h"
#include "log.h"
#include "path-util.h"
#include "string-util.h"
_cleanup_(mount_points_list_free) LIST_HEAD(MountPoint, mp_list_head);
_cleanup_free_ char *testdata_fname = NULL;
MountPoint *m;
+ int r;
log_info("/* %s(\"%s\") */", __func__, fname ?: "/proc/swaps");
}
LIST_HEAD_INIT(mp_list_head);
- assert_se(swap_list_get(fname, &mp_list_head) >= 0);
+ r = swap_list_get(fname, &mp_list_head);
+ if (ERRNO_IS_PRIVILEGE(r))
+ return;
+ assert_se(r >= 0);
LIST_FOREACH(mount_point, m, mp_list_head)
log_debug("path=%s o=%s f=0x%lx try-ro=%s dev=%u:%u",