Package org.jnode.driver.block

Examples of org.jnode.driver.block.Geometry


    private FloppyDriveParameters createFloppyDriveParameters() {
        int cmosType = 1; // non-zero value for a drive that is present
        FloppyParameters[] fp = {
            //new FloppyParameters(new Geometry(16, 16, 16),  0,  0, 0, "16x16x16")
            new FloppyParameters(new Geometry(2, 2, 2), 0, 0, 0, "2x2x2")
        };

        return new FloppyDriveParameters(cmosType, 0, 0, 0, 0, "StubFloppyParam", fp);
    }
View Full Code Here


    public GeometryTest(String arg0) {
        super(arg0);
    }

    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

        final byte[] buf = new byte[512];
        for (int i = 0; i < fpList.length; i++) {
            final FloppyParameters fp = fpList[i];
            log.debug("Trying format " + fp);

            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();
View Full Code Here

     */
    public void setGeometry(String geometryString) {
        try {
            log("Setting bootdisk geometry to " + geometryString, Project.MSG_VERBOSE);
            StringTokenizer tokenizer = new StringTokenizer(geometryString, "/");
            geom = new Geometry(Integer.parseInt(tokenizer.nextToken()),
                Integer.parseInt(tokenizer.nextToken()), Integer
                .parseInt(tokenizer.nextToken()));
        } catch (Exception e) {
            throw new IllegalArgumentException(
                "Invalid geometry "
View Full Code Here

TOP

Related Classes of org.jnode.driver.block.Geometry

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.