[gparted] Reorder parameters to add_mountpoint_entry()
- From: Curtis Gedak <gedakc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gparted] Reorder parameters to add_mountpoint_entry()
- Date: Sat, 14 Aug 2021 16:22:09 +0000 (UTC)
commit a7f9ec65cf01ca8d33f1d5b73ec2318af7e9ee54
Author: Mike Fleetwood <mike fleetwood googlemail com>
Date: Wed Aug 11 22:20:33 2021 +0100
Reorder parameters to add_mountpoint_entry()
To match the order of the members in struct MountEntry.
include/Mount_Info.h | 4 ++--
src/Mount_Info.cc | 8 ++++----
2 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/include/Mount_Info.h b/include/Mount_Info.h
index 1e8a169c..e9310ddc 100644
--- a/include/Mount_Info.h
+++ b/include/Mount_Info.h
@@ -59,8 +59,8 @@ private:
static void read_mountpoints_from_file( const Glib::ustring & filename, MountMapping & map );
static void add_mountpoint_entry( MountMapping & map,
Glib::ustring & node,
- Glib::ustring & mountpoint,
- bool readonly );
+ bool readonly,
+ Glib::ustring& mountpoint);
static bool parse_readonly_flag( const Glib::ustring & str );
static void read_mountpoints_from_file_swaps( const Glib::ustring & filename,
MountMapping & map );
diff --git a/src/Mount_Info.cc b/src/Mount_Info.cc
index 1609b8bc..ebb37ced 100644
--- a/src/Mount_Info.cc
+++ b/src/Mount_Info.cc
@@ -148,7 +148,7 @@ void Mount_Info::read_mountpoints_from_file( const Glib::ustring & filename, Mou
Glib::ustring mountpoint = p->mnt_dir;
- add_mountpoint_entry(map, node, mountpoint, parse_readonly_flag(p->mnt_opts));
+ add_mountpoint_entry(map, node, parse_readonly_flag(p->mnt_opts), mountpoint);
}
endmntent( fp );
@@ -157,8 +157,8 @@ void Mount_Info::read_mountpoints_from_file( const Glib::ustring & filename, Mou
void Mount_Info::add_mountpoint_entry( MountMapping & map,
Glib::ustring & node,
- Glib::ustring & mountpoint,
- bool readonly )
+ bool readonly,
+ Glib::ustring& mountpoint)
{
// Only add node path if mount point exists
if ( file_test( mountpoint, Glib::FILE_TEST_EXISTS ) )
@@ -236,7 +236,7 @@ void Mount_Info::read_mountpoints_from_mount_command( MountMapping & map )
Glib::ustring mountpoint = Utils::regexp_label( lines[ i ], "^[^[:blank:]]+ on
([^[:blank:]]+) " );
Glib::ustring mntopts = Utils::regexp_label( lines[i], " type [^[:blank:]]+
\\(([^\\)]*)\\)" );
if ( ! node.empty() )
- add_mountpoint_entry( map, node, mountpoint, parse_readonly_flag( mntopts ) );
+ add_mountpoint_entry(map, node, parse_readonly_flag(mntopts), mountpoint);
}
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]