Package org.jnode.partitions.ibm

Examples of org.jnode.partitions.ibm.IBMPartitionTable


        if (ideDev != null) {
            out.println("IDE Disk : " + ideDev.getId() + ": " +
                descriptor.getSectorsAddressable() * 512 + " bytes");
        }
        out.println("Device Boot    Start       End    Blocks   System");
        IBMPartitionTable partitionTable = helper.getPartitionTable();
        int i = 0;
        for (IBMPartitionTableEntry entry : partitionTable) {
            IBMPartitionTypes si = entry.getSystemIndicator();
            if (!entry.isEmpty()) {
                long sectors = entry.getNrSectors();

                out.println("ID " + i + " " + (entry.getBootIndicator() ? "Boot" : "No") + "    " +
                    entry.getStartLba() + "    " + (entry.getStartLba() + sectors) + "    " +
                    entry.getNbrBlocks(sectorSize) + (entry.isOdd() ? "" : "+") + "    " + si);
            }
            if (entry.isExtended()) {
                final List<IBMPartitionTableEntry> exPartitions =
                    partitionTable.getExtendedPartitions();
                int j = 0;
                for (IBMPartitionTableEntry exEntry : exPartitions) {
                    si = exEntry.getSystemIndicator();
                    // FIXME ... this needs work
                    out.println("ID " + i + " " + (exEntry.getBootIndicator() ? "Boot" : "No") +
View Full Code Here


     * (non-Javadoc)
     *
     * @see org.jnode.driver.bus.ide.IDEDeviceFactory#createIBMPartitionTable(byte[], org.jnode.driver.Device)
     */
    public IBMPartitionTable createIBMPartitionTable(byte[] bs, Device dev) {
        return new IBMPartitionTable(new IBMPartitionTableType(), bs, dev);
    }
View Full Code Here

        if (!MBR.containsPartitionTable())
            throw new IOException("This device doesn't contain a valid partition table.");
    }

    public IBMPartitionTable getPartitionTable() {
        return new IBMPartitionTable(new IBMPartitionTableType(), MBR.array(), current);
    }
View Full Code Here

        throws DriverException, IOException, NameNotFoundException {
        // Read the bootsector
        final byte[] bs = new byte[IDEConstants.SECTOR_SIZE];
        read(0, ByteBuffer.wrap(bs));

        return new IBMPartitionTable(new IBMPartitionTableType(), bs, this);
    }
View Full Code Here

TOP

Related Classes of org.jnode.partitions.ibm.IBMPartitionTable

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.