[gparted] Remove now unused return value from run_blkid_load_cache() (#131)
- From: Curtis Gedak <gedakc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gparted] Remove now unused return value from run_blkid_load_cache() (#131)
- Date: Wed, 10 Feb 2021 16:49:38 +0000 (UTC)
commit f3740c7ac931e45cb2000f5ffc9f803d4137c74e
Author: Mike Fleetwood <mike fleetwood googlemail com>
Date: Sun Jan 31 13:16:22 2021 +0000
Remove now unused return value from run_blkid_load_cache() (#131)
Closes #131 - GParted hangs when non-named device is hung
include/FS_Info.h | 2 +-
src/FS_Info.cc | 10 ++++------
2 files changed, 5 insertions(+), 7 deletions(-)
---
diff --git a/include/FS_Info.h b/include/FS_Info.h
index b3fb315e..5421ab87 100644
--- a/include/FS_Info.h
+++ b/include/FS_Info.h
@@ -49,7 +49,7 @@ private:
static bool not_initialised_then_error();
static void set_commands_found();
static const FS_Entry & get_cache_entry_by_path( const Glib::ustring & path );
- static bool run_blkid_load_cache(const std::vector<Glib::ustring>& paths);
+ static void run_blkid_load_cache(const std::vector<Glib::ustring>& paths);
static void update_fs_info_cache_all_labels();
static bool run_blkid_update_cache_one_label( FS_Entry & fs_entry );
diff --git a/src/FS_Info.cc b/src/FS_Info.cc
index 8e9b3625..c095db13 100644
--- a/src/FS_Info.cc
+++ b/src/FS_Info.cc
@@ -207,7 +207,7 @@ const FS_Entry & FS_Info::get_cache_entry_by_path( const Glib::ustring & path )
}
-bool FS_Info::run_blkid_load_cache(const std::vector<Glib::ustring>& paths)
+void FS_Info::run_blkid_load_cache(const std::vector<Glib::ustring>& paths)
{
// Parse blkid output line by line extracting mandatory field: path and optional
// fields: type, sec_type, uuid. Label is not extracted here because of blkid's
@@ -224,7 +224,7 @@ bool FS_Info::run_blkid_load_cache(const std::vector<Glib::ustring>& paths)
// /dev/sdb3: PARTUUID="bb8438e1-d9f1-45d3-9888-e990b598900d"
if (! blkid_found)
- return false;
+ return;
Glib::ustring cmd = "blkid";
for (unsigned int i = 0; i < paths.size(); i++)
@@ -233,9 +233,8 @@ bool FS_Info::run_blkid_load_cache(const std::vector<Glib::ustring>& paths)
Glib::ustring output;
Glib::ustring error;
if (Utils::execute_command(cmd, output, error, true) != 0)
- return false;
+ return;
- bool loaded_entries = false;
std::vector<Glib::ustring> lines;
Utils::split(output, lines, "\n");
for (unsigned int i = 0; i < lines.size(); i++)
@@ -249,11 +248,10 @@ bool FS_Info::run_blkid_load_cache(const std::vector<Glib::ustring>& paths)
fs_entry.sec_type = Utils::regexp_label(lines[i], " SEC_TYPE=\"([^\"]*)\"");
fs_entry.uuid = Utils::regexp_label(lines[i], " UUID=\"([^\"]*)\"");
fs_info_cache.push_back(fs_entry);
- loaded_entries = true;
}
}
- return loaded_entries;
+ return;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]