Examples of CHS


Examples of org.jnode.driver.block.CHS

    public void testLogSec2CHS() throws GeometryException {
        Geometry geom = new Geometry(64, 8, 40);
        long max = geom.getTotalSectors();
        for (long logSec = 0; logSec < max; logSec++) {
            CHS chs = geom.getCHS(logSec);
            //System.out.println("logSec=" + logSec + ", chs=" + chs);
            assertEquals("logSec=" + logSec, logSec, geom.getLogicalSector(chs));
        }
    }
View Full Code Here

Examples of org.jnode.driver.block.CHS

        int v2 = LittleEndian.getUInt8(bs, ofs + 2);
        int v3 = LittleEndian.getUInt8(bs, ofs + 3);
        /*
         * h = byte1; s = byte2 & 0x3f; c = ((byte2 & 0xc0) << 2) + byte3;
         */
        return new CHS(((v2 & 0xc0) << 2) + v3, v1, v2 & 0x3f);
    }
View Full Code Here

Examples of org.jnode.driver.block.CHS

        int v2 = LittleEndian.getUInt8(bs, ofs + 6);
        int v3 = LittleEndian.getUInt8(bs, ofs + 7);
        /*
         * h = byte1; s = byte2 & 0x3f; c = ((byte2 & 0xc0) << 2) + byte3;
         */
        return new CHS(((v2 & 0xc0) << 2) + v3, v1, v2 & 0x3f);
    }
View Full Code Here

Examples of org.jnode.driver.block.CHS

        synchronized (controller) {
            testDiskChange();
            BlockDeviceAPIHelper.checkBounds(this, devOffset, length);
            final int sectorLength = SECTOR_LENGTH[currentSectorSize];
            testAlignment(sectorLength, devOffset, length);
            CHS chs = fp.getGeometry().getCHS(devOffset / sectorLength);
            FloppyDeviceFactory factory;
            try {
                factory = FloppyDriverUtils.getFloppyDeviceFactory();
            } catch (NamingException ex) {
                throw (IOException) new IOException().initCause(ex);
View Full Code Here

Examples of org.jnode.driver.block.CHS

        synchronized (controller) {
            testDiskChange();
            BlockDeviceAPIHelper.checkBounds(this, devOffset, length);
            final int sectorLength = SECTOR_LENGTH[currentSectorSize];
            testAlignment(sectorLength, devOffset, length);
            CHS chs = fp.getGeometry().getCHS(devOffset / sectorLength);
            FloppyDeviceFactory factory;
            try {
                factory = FloppyDriverUtils.getFloppyDeviceFactory();
            } catch (NamingException ex) {
                throw (IOException) new IOException().initCause(ex);
View Full Code Here

Examples of org.jnode.driver.block.CHS

            final Geometry geom = fp.getGeometry();
            final int cyl = geom.getCylinders() - 1;
            final int sect = geom.getSectors();
            final int head = geom.getHeads() - 1;
            final CHS chs0 = new CHS(cyl, head, sect);
            specify(fp);
            seek(cyl);
            readID();

            try {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.