r = libmount_parse(mountinfo, NULL, &table, &iter);
if (r < 0)
- return log_error_errno(r, "Failed to parse %s: %m", mountinfo);
+ return log_error_errno(r, "Failed to parse %s: %m", mountinfo ?: "/proc/self/mountinfo");
for (;;) {
struct libmnt_fs *fs;
if (r == 1)
break;
if (r < 0)
- return log_error_errno(r, "Failed to get next entry from %s: %m", mountinfo);
+ return log_error_errno(r, "Failed to get next entry from %s: %m", mountinfo ?: "/proc/self/mountinfo");
path = mnt_fs_get_target(fs);
if (!path)
r = mnt_table_parse_swaps(t, swaps);
if (r < 0)
- return log_error_errno(r, "Failed to parse %s: %m", swaps);
+ return log_error_errno(r, "Failed to parse %s: %m", swaps ?: "/proc/swaps");
for (;;) {
struct libmnt_fs *fs;
if (r == 1)
break;
if (r < 0)
- return log_error_errno(r, "Failed to get next entry from %s: %m", swaps);
+ return log_error_errno(r, "Failed to get next entry from %s: %m", swaps ?: "/proc/swaps");
source = mnt_fs_get_source(fs);
if (!source)