Revision: 5970
http://jnode.svn.sourceforge.net/jnode/?rev=5970&view=rev
Author: galatnm
Date: 2013-02-21 07:28:53 +0000 (Thu, 21 Feb 2013)
Log Message:
-----------
Expose GPT block size. (Luke Quinane)
Modified Paths:
--------------
trunk/fs/src/fs/org/jnode/partitions/gpt/GptPartitionTable.java
Modified: trunk/fs/src/fs/org/jnode/partitions/gpt/GptPartitionTable.java
===================================================================
--- trunk/fs/src/fs/org/jnode/partitions/gpt/GptPartitionTable.java 2013-02-21 07:28:22 UTC (rev 5969)
+++ trunk/fs/src/fs/org/jnode/partitions/gpt/GptPartitionTable.java 2013-02-21 07:28:53 UTC (rev 5970)
@@ -41,6 +41,9 @@
/** The type of partition table */
private final GptPartitionTableType tableType;
+ /** The detected block size. */
+ private final int blockSize;
+
/** The partition entries */
private final List<GptPartitionTableEntry> partitions = new ArrayList<GptPartitionTableEntry>();
@@ -57,7 +60,7 @@
public GptPartitionTable(GptPartitionTableType tableType, byte[] first16KiB, Device device) {
this.tableType = tableType;
- int blockSize = detectBlockSize(first16KiB);
+ blockSize = detectBlockSize(first16KiB);
if (blockSize != -1) {
long entries = LittleEndian.getUInt32(first16KiB, blockSize + 0x50);
@@ -120,6 +123,15 @@
}
/**
+ * Gets the block size.
+ *
+ * @return the block size.
+ */
+ public int getBlockSize() {
+ return blockSize;
+ }
+
+ /**
* @see org.jnode.partitions.PartitionTable#getType()
*/
@Override
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|