[gparted] Add constants to aid in transition to support sector sizes > 512 bytes
- From: Curtis Gedak <gedakc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gparted] Add constants to aid in transition to support sector sizes > 512 bytes
- Date: Wed, 24 Mar 2010 20:37:46 +0000 (UTC)
commit 4d658a10a8eb8e1b0473667e8166a144f25260db
Author: Curtis Gedak <gedakc gmail com>
Date: Tue Mar 16 10:18:04 2010 -0600
Add constants to aid in transition to support sector sizes > 512 bytes
include/Utils.h | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/include/Utils.h b/include/Utils.h
index b4b94eb..7ef28c3 100644
--- a/include/Utils.h
+++ b/include/Utils.h
@@ -38,6 +38,7 @@ namespace GParted
{
typedef long long Sector;
+typedef long long Byte_Value;
//sizeunits defined in sectors of 512 bytes..
#define KIBIBYTE 2
@@ -45,6 +46,14 @@ typedef long long Sector;
#define GIBIBYTE 2097152
#define TEBIBYTE 2147483648U
+//Size units defined in bytes
+const Byte_Value KIBI_FACTOR=1024;
+const Byte_Value MEBI_FACTOR=(KIBI_FACTOR * KIBI_FACTOR);
+const Byte_Value GIBI_FACTOR=(MEBI_FACTOR * KIBI_FACTOR);
+const Byte_Value TEBI_FACTOR=(GIBI_FACTOR * KIBI_FACTOR);
+
+const Byte_Value DEFAULT_SECTOR_SIZE=512;
+
enum FILESYSTEM
{
FS_UNALLOCATED = 0,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]