~aleteoryx/muditaos

2a17ec9254c16a55cf2b664b19d1bbe95377bdc4 — Lucjan Bryndza 4 years ago 9c28350
[EGD-6075] Fix partition name typo

Fix partition name typo in the disk manager
M module-vfs/include/internal/purefs/blkdev/disk_handle.hpp => module-vfs/include/internal/purefs/blkdev/disk_handle.hpp +4 -4
@@ 1,4 1,4 @@
// Copyright (c) 2017-2020, Mudita Sp. z.o.o. All rights reserved.
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#pragma once


@@ 18,8 18,8 @@ namespace purefs::blkdev::internal
    class disk_handle
    {
      public:
        static constexpr auto no_parition = -1;
        explicit disk_handle(std::weak_ptr<blkdev::disk> disk, std::string_view name, short partition = no_parition)
        static constexpr auto no_partition = -1;
        explicit disk_handle(std::weak_ptr<blkdev::disk> disk, std::string_view name, short partition = no_partition)
            : m_disk(disk), m_partition(partition), m_name(name)
        {}
        auto disk() const noexcept


@@ 32,7 32,7 @@ namespace purefs::blkdev::internal
        }
        auto has_partition() const noexcept -> bool
        {
            return m_partition != no_parition;
            return m_partition != no_partition;
        }
        auto sectors() const noexcept -> sector_t;
        auto name() const noexcept

M module-vfs/src/purefs/blkdev/disk_manager.cpp => module-vfs/src/purefs/blkdev/disk_manager.cpp +2 -2
@@ 1,4 1,4 @@
// Copyright (c) 2017-2020, Mudita Sp. z.o.o. All rights reserved.
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#include <purefs/blkdev/disk_manager.hpp>


@@ 80,7 80,7 @@ namespace purefs::blkdev
            }
            else {
                ret = std::make_shared<internal::disk_handle>(it->second, device_name, part);
                if (part != internal::disk_handle::no_parition) {
                if (part != internal::disk_handle::no_partition) {
                    if (part >= int(partitions(ret).size())) {
                        LOG_ERROR("Partition %i doesn't exists", part);
                        ret = nullptr;