From fa30fe147feb0d417c46b99b08fa7ab1f92e4a9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20G=C3=A2teau?= Date: Tue, 15 Jul 2014 17:32:55 +0200 Subject: [PATCH] Add PMUtils::isPartitionNew() --- src/modules/partition/PMUtils.cpp | 5 +++++ src/modules/partition/PMUtils.h | 2 ++ 2 files changed, 7 insertions(+) diff --git a/src/modules/partition/PMUtils.cpp b/src/modules/partition/PMUtils.cpp index 43c98be45..49433a9f0 100644 --- a/src/modules/partition/PMUtils.cpp +++ b/src/modules/partition/PMUtils.cpp @@ -30,4 +30,9 @@ bool isPartitionFreeSpace( Partition* partition ) return partition->roles().has( PartitionRole::Unallocated ); } +bool isPartitionNew( Partition* partition ) +{ + return partition->state() == Partition::StateNew; +} + } // namespace diff --git a/src/modules/partition/PMUtils.h b/src/modules/partition/PMUtils.h index 3c7d63dca..2b0f42237 100644 --- a/src/modules/partition/PMUtils.h +++ b/src/modules/partition/PMUtils.h @@ -25,6 +25,8 @@ namespace PMUtils bool isPartitionFreeSpace( Partition* ); +bool isPartitionNew( Partition* ); + } #endif /* PMUTILS_H */