Loading updater/updater_runtime.cpp +18 −22 Original line number Diff line number Diff line Loading @@ -44,10 +44,8 @@ std::string UpdaterRuntime::FindBlockDeviceName(const std::string_view name) con return std::string(name); } static struct { const char* name; unsigned flag; } mount_flags_list[] = { static bool setMountFlag(const std::string& flag, unsigned* mount_flags) { static constexpr std::pair<const char*, unsigned> mount_flags_list[] = { { "noatime", MS_NOATIME }, { "noexec", MS_NOEXEC }, { "nosuid", MS_NOSUID }, Loading @@ -63,10 +61,8 @@ static struct { { "slave", MS_SLAVE }, { "shared", MS_SHARED }, { "defaults", 0 }, { 0, 0 }, }; static bool setMountFlag(const std::string& flag, unsigned* mount_flags) { for (const auto& [name, value] : mount_flags_list) { if (flag == name) { *mount_flags |= value; Loading Loading
updater/updater_runtime.cpp +18 −22 Original line number Diff line number Diff line Loading @@ -44,10 +44,8 @@ std::string UpdaterRuntime::FindBlockDeviceName(const std::string_view name) con return std::string(name); } static struct { const char* name; unsigned flag; } mount_flags_list[] = { static bool setMountFlag(const std::string& flag, unsigned* mount_flags) { static constexpr std::pair<const char*, unsigned> mount_flags_list[] = { { "noatime", MS_NOATIME }, { "noexec", MS_NOEXEC }, { "nosuid", MS_NOSUID }, Loading @@ -63,10 +61,8 @@ static struct { { "slave", MS_SLAVE }, { "shared", MS_SHARED }, { "defaults", 0 }, { 0, 0 }, }; static bool setMountFlag(const std::string& flag, unsigned* mount_flags) { for (const auto& [name, value] : mount_flags_list) { if (flag == name) { *mount_flags |= value; Loading