You can subscribe to this list here.
2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(97) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2007 |
Jan
(127) |
Feb
(34) |
Mar
(16) |
Apr
(26) |
May
(55) |
Jun
(107) |
Jul
(36) |
Aug
(72) |
Sep
(90) |
Oct
(41) |
Nov
(27) |
Dec
(13) |
2008 |
Jan
(37) |
Feb
(39) |
Mar
(98) |
Apr
(115) |
May
(134) |
Jun
(120) |
Jul
(86) |
Aug
(149) |
Sep
(68) |
Oct
(66) |
Nov
(104) |
Dec
(49) |
2009 |
Jan
(131) |
Feb
(132) |
Mar
(125) |
Apr
(172) |
May
(161) |
Jun
(43) |
Jul
(47) |
Aug
(38) |
Sep
(18) |
Oct
(6) |
Nov
(1) |
Dec
(15) |
2010 |
Jan
(21) |
Feb
(8) |
Mar
(10) |
Apr
(4) |
May
(9) |
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
(2) |
Nov
|
Dec
(4) |
2011 |
Jan
(23) |
Feb
(10) |
Mar
(13) |
Apr
(3) |
May
|
Jun
(19) |
Jul
(11) |
Aug
(22) |
Sep
|
Oct
(4) |
Nov
(2) |
Dec
(12) |
2012 |
Jan
(3) |
Feb
(4) |
Mar
(7) |
Apr
(3) |
May
|
Jun
(1) |
Jul
(1) |
Aug
(30) |
Sep
(3) |
Oct
(2) |
Nov
|
Dec
(8) |
2013 |
Jan
(3) |
Feb
(40) |
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(12) |
Dec
|
2021 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(2) |
Oct
|
Nov
|
Dec
|
From: <ga...@us...> - 2012-08-09 11:04:54
|
Revision: 5901 http://jnode.svn.sourceforge.net/jnode/?rev=5901&view=rev Author: galatnm Date: 2012-08-09 11:04:47 +0000 (Thu, 09 Aug 2012) Log Message: ----------- Add initial support for HFSX file systems (patch from L. Quinane) Modified Paths: -------------- trunk/fs/src/fs/org/jnode/fs/hfsplus/HfsPlusFileSystemType.java trunk/fs/src/fs/org/jnode/fs/hfsplus/SuperBlock.java trunk/fs/src/fs/org/jnode/fs/hfsplus/extent/ExtentDescriptor.java Modified: trunk/fs/src/fs/org/jnode/fs/hfsplus/HfsPlusFileSystemType.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/hfsplus/HfsPlusFileSystemType.java 2012-07-09 08:15:39 UTC (rev 5900) +++ trunk/fs/src/fs/org/jnode/fs/hfsplus/HfsPlusFileSystemType.java 2012-08-09 11:04:47 UTC (rev 5901) @@ -22,14 +22,11 @@ import java.io.IOException; import java.nio.ByteBuffer; - import org.jnode.driver.Device; import org.jnode.driver.block.FSBlockDeviceAPI; import org.jnode.fs.BlockDeviceFileSystemType; import org.jnode.fs.FileSystemException; import org.jnode.partitions.PartitionTableEntry; -import org.jnode.partitions.ibm.IBMPartitionTableEntry; -import org.jnode.partitions.ibm.IBMPartitionTypes; import org.jnode.util.BigEndian; public class HfsPlusFileSystemType implements BlockDeviceFileSystemType<HfsPlusFileSystem> { @@ -48,13 +45,13 @@ public final boolean supports(final PartitionTableEntry pte, final byte[] firstSector, final FSBlockDeviceAPI devApi) { - if (pte != null) { + /*if (pte != null) { if (pte instanceof IBMPartitionTableEntry) { if (((IBMPartitionTableEntry) pte).getSystemIndicator() != IBMPartitionTypes.PARTTYPE_LINUXNATIVE) { return false; } } - } + } */ // need to check the magic ByteBuffer magic = ByteBuffer.allocate(2); try { @@ -63,7 +60,7 @@ return false; } int magicNumber = BigEndian.getInt16(magic.array(), 0); - return (magicNumber == SuperBlock.HFSPLUS_SUPER_MAGIC); + return (magicNumber == SuperBlock.HFSPLUS_SUPER_MAGIC || magicNumber == SuperBlock.HFSX_SUPER_MAGIC); } } Modified: trunk/fs/src/fs/org/jnode/fs/hfsplus/SuperBlock.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/hfsplus/SuperBlock.java 2012-07-09 08:15:39 UTC (rev 5900) +++ trunk/fs/src/fs/org/jnode/fs/hfsplus/SuperBlock.java 2012-08-09 11:04:47 UTC (rev 5901) @@ -41,7 +41,8 @@ */ public class SuperBlock extends HfsPlusObject { - public static final int HFSPLUS_SUPER_MAGIC = 0x482b; + public static final int HFSPLUS_SUPER_MAGIC = 0x482b; // H+ + public static final int HFSX_SUPER_MAGIC = 0x4858; // HX public static final int HFSPLUS_MIN_VERSION = 0x0004; /* HFS+ */ public static final int HFSPLUS_CURRENT_VERSION = 5; /* HFSX */ @@ -85,7 +86,7 @@ fs.getApi().read(1024, b); data = new byte[SUPERBLOCK_LENGTH]; System.arraycopy(b.array(), 0, data, 0, SUPERBLOCK_LENGTH); - if (getMagic() != HFSPLUS_SUPER_MAGIC) { + if (getMagic() != HFSPLUS_SUPER_MAGIC && getMagic() != HFSX_SUPER_MAGIC) { throw new FileSystemException("Not hfs+ volume header (" + getMagic() + ": bad magic)"); } @@ -151,7 +152,7 @@ forkdata.addDescriptor(0, desc); forkdata.write(data, 112); // Journal creation - int nextBlock = 0; + long nextBlock = 0; if (params.isJournaled()) { this.setFileCount(2); this.setAttribute(HFSPLUS_VOL_JOURNALED_BIT); @@ -248,8 +249,8 @@ return BigEndian.getInt32(data, 12); } - public final void setJournalInfoBlock(final int value) { - BigEndian.setInt32(data, 12, value); + public final void setJournalInfoBlock(final long value) { + BigEndian.setInt32(data, 12, (int) value); } // Modified: trunk/fs/src/fs/org/jnode/fs/hfsplus/extent/ExtentDescriptor.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/hfsplus/extent/ExtentDescriptor.java 2012-07-09 08:15:39 UTC (rev 5900) +++ trunk/fs/src/fs/org/jnode/fs/hfsplus/extent/ExtentDescriptor.java 2012-08-09 11:04:47 UTC (rev 5901) @@ -27,10 +27,10 @@ public static final int EXTENT_DESCRIPTOR_LENGTH = 8; /** The first allocation block. */ - private int startBlock; + private long startBlock; /** The length in allocation blocks of the extent. */ - private int blockCount; + private long blockCount; public ExtentDescriptor() { this.startBlock = 0; @@ -43,7 +43,7 @@ * @param startBlock first allocation block. * @param blockCount number of blocks in the extent. */ - public ExtentDescriptor(int startBlock, int blockCount) { + public ExtentDescriptor(long startBlock, long blockCount) { this.startBlock = startBlock; this.blockCount = blockCount; } @@ -57,8 +57,8 @@ public ExtentDescriptor(final byte[] src, final int offset) { byte[] data = new byte[EXTENT_DESCRIPTOR_LENGTH]; System.arraycopy(src, offset, data, 0, EXTENT_DESCRIPTOR_LENGTH); - startBlock = BigEndian.getInt32(data, 0); - blockCount = BigEndian.getInt32(data, 4); + startBlock = BigEndian.getUInt32(data, 0); + blockCount = BigEndian.getUInt32(data, 4); } /** @@ -66,15 +66,15 @@ */ public final byte[] getBytes() { byte[] data = new byte[EXTENT_DESCRIPTOR_LENGTH]; - BigEndian.setInt32(data, 0, startBlock); - BigEndian.setInt32(data, 4, blockCount); + BigEndian.setInt32(data, 0, (int) startBlock); + BigEndian.setInt32(data, 4, (int) blockCount); return data; } public byte[] write(byte[] dest, int destOffSet) { byte[] data = new byte[EXTENT_DESCRIPTOR_LENGTH]; - BigEndian.setInt32(data, 0, startBlock); - BigEndian.setInt32(data, 4, blockCount); + BigEndian.setInt32(data, 0, (int) startBlock); + BigEndian.setInt32(data, 4, (int) blockCount); System.arraycopy(data, 0, dest, destOffSet, EXTENT_DESCRIPTOR_LENGTH); return dest; } @@ -90,7 +90,7 @@ * @return offset of the extent. */ public long getStartOffset(int nodeSize) { - return (long)startBlock * nodeSize; + return startBlock * nodeSize; } /** @@ -98,7 +98,7 @@ * * @return block number of the next extent. */ - public int getNext() { + public long getNext() { return startBlock + blockCount; } @@ -109,7 +109,7 @@ * @return size of the extent. */ public long getSize(int nodeSize) { - return (long)blockCount * nodeSize; + return blockCount * nodeSize; } /** This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ls...@us...> - 2012-07-09 08:15:51
|
Revision: 5900 http://jnode.svn.sourceforge.net/jnode/?rev=5900&view=rev Author: lsantha Date: 2012-07-09 08:15:39 +0000 (Mon, 09 Jul 2012) Log Message: ----------- Applied patch by Francisco Rafael Del Roio: license files related to libraries used by JNode. They are included in the CD too. Modified Paths: -------------- trunk/all/build-x86.xml Added Paths: ----------- trunk/licenses/ trunk/licenses/Apache-1.1 trunk/licenses/Apache-2.0 trunk/licenses/BSD trunk/licenses/GPL-2 trunk/licenses/GPL-3 trunk/licenses/JSCH-0.1-License trunk/licenses/LGPL-2.1 trunk/licenses/LGPL-3 Modified: trunk/all/build-x86.xml =================================================================== --- trunk/all/build-x86.xml 2012-06-04 09:05:31 UTC (rev 5899) +++ trunk/all/build-x86.xml 2012-07-09 08:15:39 UTC (rev 5900) @@ -267,12 +267,16 @@ <attribute name="destfile" /> <sequential> <mkdir dir="@{dir}/boot/grub" /> + <mkdir dir="@{dir}/licenses" /> <copy todir="@{dir}"> <fileset dir="${jnode.kernel.dir}" includes="jnode*.gz"/> </copy> <copy todir="@{dir}"> <fileset dir="${initjars.dir}" /> </copy> + <copy todir="@{dir}/licenses"> + <fileset dir="${root.dir}/licenses"/> + </copy> <copy file="${my-lib.dir}/eltorito.s2" todir="@{dir}/boot/grub" /> <copy file="${my-lib.dir}/fat.s15" todir="@{dir}/boot/grub" /> <copy file="${my-lib.dir}/grub.s1" todir="@{dir}/boot/grub" /> Added: trunk/licenses/Apache-1.1 =================================================================== --- trunk/licenses/Apache-1.1 (rev 0) +++ trunk/licenses/Apache-1.1 2012-07-09 08:15:39 UTC (rev 5900) @@ -0,0 +1,55 @@ + + +/* ==================================================================== + * The Apache Software License, Version 1.1 + * + * Copyright (c) 2001 The Apache Software Foundation. All rights + * reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * 3. The end-user documentation included with the redistribution, + * if any, must include the following acknowledgment: + * "This product includes software developed by the + * Apache Software Foundation (http://www.apache.org/)." + * Alternately, this acknowledgment may appear in the software itself, + * if and wherever such third-party acknowledgments normally appear. + * + * 4. The names "Apache" and "Apache Software Foundation" and + * "Apache Commons" must not be used to endorse or promote products + * derived from this software without prior written permission. For + * written permission, please contact ap...@ap.... + * + * 5. Products derived from this software may not be called "Apache", + * nor may "Apache" appear in their name, without + * prior written permission of the Apache Software Foundation. + * + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR + * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF + * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT + * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * ==================================================================== + * + * This software consists of voluntary contributions made by many + * individuals on behalf of the Apache Software Foundation. For more + * information on the Apache Software Foundation, please see + * <http://www.apache.org/>. + */ Added: trunk/licenses/Apache-2.0 =================================================================== --- trunk/licenses/Apache-2.0 (rev 0) +++ trunk/licenses/Apache-2.0 2012-07-09 08:15:39 UTC (rev 5900) @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. Added: trunk/licenses/BSD =================================================================== --- trunk/licenses/BSD (rev 0) +++ trunk/licenses/BSD 2012-07-09 08:15:39 UTC (rev 5900) @@ -0,0 +1,27 @@ +BSD License + +Copyright (c) 2000-2006, www.hamcrest.org +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +Redistributions of source code must retain the above copyright notice, this list of +conditions and the following disclaimer. Redistributions in binary form must reproduce +the above copyright notice, this list of conditions and the following disclaimer in +the documentation and/or other materials provided with the distribution. + +Neither the name of Hamcrest nor the names of its contributors may be used to endorse +or promote products derived from this software without specific prior written +permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT +SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY +WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH +DAMAGE. Added: trunk/licenses/GPL-2 =================================================================== --- trunk/licenses/GPL-2 (rev 0) +++ trunk/licenses/GPL-2 2012-07-09 08:15:39 UTC (rev 5900) @@ -0,0 +1,339 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Lesser General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + <one line to give the program's name and a brief idea of what it does.> + Copyright (C) <year> <name of author> + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + <signature of Ty Coon>, 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. Added: trunk/licenses/GPL-3 =================================================================== --- trunk/licenses/GPL-3 (rev 0) +++ trunk/licenses/GPL-3 2012-07-09 08:15:39 UTC (rev 5900) @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/> + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferrin... [truncated message content] |
From: <ga...@us...> - 2012-06-04 09:06:11
|
Revision: 5899 http://jnode.svn.sourceforge.net/jnode/?rev=5899&view=rev Author: galatnm Date: 2012-06-04 09:05:31 +0000 (Mon, 04 Jun 2012) Log Message: ----------- Update headers. Modified Paths: -------------- trunk/all/template/header.txt trunk/builder/src/builder/org/jnode/ant/taskdefs/AnnotateTask.java trunk/builder/src/builder/org/jnode/ant/taskdefs/Asm.java trunk/builder/src/builder/org/jnode/ant/taskdefs/FileSetTask.java trunk/builder/src/builder/org/jnode/ant/taskdefs/HeaderTask.java trunk/builder/src/builder/org/jnode/ant/taskdefs/Hotswap.java trunk/builder/src/builder/org/jnode/ant/taskdefs/Native2AsciiTask.java trunk/builder/src/builder/org/jnode/ant/taskdefs/NativeCheckTask.java trunk/builder/src/builder/org/jnode/ant/taskdefs/TemplateTask.java trunk/builder/src/builder/org/jnode/ant/taskdefs/classpath/BaseDirs.java trunk/builder/src/builder/org/jnode/ant/taskdefs/classpath/CompareTask.java trunk/builder/src/builder/org/jnode/ant/taskdefs/classpath/Flags.java trunk/builder/src/builder/org/jnode/ant/taskdefs/classpath/PackageDirectory.java trunk/builder/src/builder/org/jnode/ant/taskdefs/classpath/SourceFile.java trunk/builder/src/builder/org/jnode/ant/taskdefs/classpath/TargetedFileSet.java trunk/builder/src/builder/org/jnode/build/AbstractAsmConstBuilder.java trunk/builder/src/builder/org/jnode/build/AbstractBootImageBuilder.java trunk/builder/src/builder/org/jnode/build/AbstractPluginTask.java trunk/builder/src/builder/org/jnode/build/AbstractPluginsTask.java trunk/builder/src/builder/org/jnode/build/AddressFinder.java trunk/builder/src/builder/org/jnode/build/AsmSourceInfo.java trunk/builder/src/builder/org/jnode/build/BootDiskBuilder.java trunk/builder/src/builder/org/jnode/build/BootFloppyBuilder.java trunk/builder/src/builder/org/jnode/build/BuildException.java trunk/builder/src/builder/org/jnode/build/BuildObjectResolver.java trunk/builder/src/builder/org/jnode/build/FieldInfo.java trunk/builder/src/builder/org/jnode/build/InitJarBuilder.java trunk/builder/src/builder/org/jnode/build/InitJarsBuilder.java trunk/builder/src/builder/org/jnode/build/JNodeClassNotFoundException.java trunk/builder/src/builder/org/jnode/build/ObjectEmitter.java trunk/builder/src/builder/org/jnode/build/PluginList.java trunk/builder/src/builder/org/jnode/build/PluginTask.java trunk/builder/src/builder/org/jnode/build/VMwareBuilderTask.java trunk/builder/src/builder/org/jnode/build/dependencies/BCELDependencyChecker.java trunk/builder/src/builder/org/jnode/build/documentation/DotBuilder.java trunk/builder/src/builder/org/jnode/build/documentation/LicenseEntry.java trunk/builder/src/builder/org/jnode/build/documentation/PackageData.java trunk/builder/src/builder/org/jnode/build/documentation/PluginData.java trunk/builder/src/builder/org/jnode/build/documentation/PluginDocumentationTask.java trunk/builder/src/builder/org/jnode/build/documentation/ToolbarEntry.java trunk/builder/src/builder/org/jnode/build/natives/NativeStubGenerator.java trunk/builder/src/builder/org/jnode/build/packager/MainFinder.java trunk/builder/src/builder/org/jnode/build/packager/PackagerTask.java trunk/builder/src/builder/org/jnode/build/packager/PluginBuilder.java trunk/builder/src/builder/org/jnode/build/packager/PluginListInsertor.java trunk/builder/src/builder/org/jnode/build/packager/ScriptBuilder.java trunk/builder/src/builder/org/jnode/build/x86/AsmConstBuilder.java trunk/builder/src/builder/org/jnode/build/x86/BootImageBuilder.java trunk/builder/src/builder/org/jnode/build/x86/Disasm.java trunk/builder/src/builder/org/jnode/jnasm/JNAsm.java trunk/builder/src/builder/org/jnode/jnasm/assembler/Address.java trunk/builder/src/builder/org/jnode/jnasm/assembler/Assembler.java trunk/builder/src/builder/org/jnode/jnasm/assembler/AssemblerModule.java trunk/builder/src/builder/org/jnode/jnasm/assembler/HardwareSupport.java trunk/builder/src/builder/org/jnode/jnasm/assembler/Identifier.java trunk/builder/src/builder/org/jnode/jnasm/assembler/Instruction.java trunk/builder/src/builder/org/jnode/jnasm/assembler/InstructionUtils.java trunk/builder/src/builder/org/jnode/jnasm/assembler/PseudoInstructions.java trunk/builder/src/builder/org/jnode/jnasm/assembler/Register.java trunk/builder/src/builder/org/jnode/jnasm/assembler/x86/AbstractX86Module.java trunk/builder/src/builder/org/jnode/jnasm/assembler/x86/MMX.java trunk/builder/src/builder/org/jnode/jnasm/assembler/x86/X86Core.java trunk/builder/src/builder/org/jnode/jnasm/assembler/x86/X86Support.java trunk/builder/src/builder/org/jnode/jnasm/preprocessor/FileResolver.java trunk/builder/src/builder/org/jnode/jnasm/preprocessor/Macro.java trunk/builder/src/builder/org/jnode/jnasm/preprocessor/Preprocessor.java trunk/builder/src/builder/org/jnode/linker/Elf.java trunk/builder/src/builder/org/jnode/linker/ElfLinker.java trunk/builder/src/builder/org/jnode/linker/LoadUtil.java trunk/builder/src/builder/org/jnode/linker/Reloc.java trunk/builder/src/builder/org/jnode/linker/Reloca.java trunk/builder/src/builder/org/jnode/linker/Section.java trunk/builder/src/builder/org/jnode/linker/StoreUtil.java trunk/builder/src/builder/org/jnode/linker/StrTab.java trunk/builder/src/builder/org/jnode/linker/Symbol.java trunk/builder/src/builder/org/jnode/pluginlist/Main.java trunk/builder/src/builder/org/jnode/pluginlist/Plugin.java trunk/builder/src/builder/org/jnode/pluginlist/PluginList.java trunk/builder/src/builder/org/jnode/pluginlist/PluginListEditor.java trunk/builder/src/builder/org/jnode/pluginlist/PluginListModel.java trunk/builder/src/builder/org/jnode/pluginlist/PluginNode.java trunk/builder/src/builder/org/jnode/pluginlist/PluginRepository.java trunk/builder/src/builder/org/jnode/pluginlist/PluginTreePane.java trunk/builder/src/builder/org/jnode/pluginlist/Project.java trunk/builder/src/builder/org/jnode/pluginlist/ProjectNode.java trunk/builder/src/builder/org/jnode/pluginlist/RootNode.java trunk/builder/src/builder/org/jnode/pluginlist/Syncable.java trunk/cli/src/commands/org/jnode/command/archive/ArchiveCommand.java trunk/cli/src/commands/org/jnode/command/archive/BUnzipCommand.java trunk/cli/src/commands/org/jnode/command/archive/BZCatCommand.java trunk/cli/src/commands/org/jnode/command/archive/BZip.java trunk/cli/src/commands/org/jnode/command/archive/BZipCommand.java trunk/cli/src/commands/org/jnode/command/archive/GUnzipCommand.java trunk/cli/src/commands/org/jnode/command/archive/GZip.java trunk/cli/src/commands/org/jnode/command/archive/GZipCommand.java trunk/cli/src/commands/org/jnode/command/archive/TarCommand.java trunk/cli/src/commands/org/jnode/command/archive/UnzipCommand.java trunk/cli/src/commands/org/jnode/command/archive/ZCatCommand.java trunk/cli/src/commands/org/jnode/command/archive/Zip.java trunk/cli/src/commands/org/jnode/command/archive/ZipCommand.java trunk/cli/src/commands/org/jnode/command/argument/NumberListArgument.java trunk/cli/src/commands/org/jnode/command/common/BasenameCommand.java trunk/cli/src/commands/org/jnode/command/common/DateCommand.java trunk/cli/src/commands/org/jnode/command/common/DirnameCommand.java trunk/cli/src/commands/org/jnode/command/common/EchoCommand.java trunk/cli/src/commands/org/jnode/command/common/EnvCommand.java trunk/cli/src/commands/org/jnode/command/common/ExitCommand.java trunk/cli/src/commands/org/jnode/command/common/ExprCommand.java trunk/cli/src/commands/org/jnode/command/common/FalseCommand.java trunk/cli/src/commands/org/jnode/command/common/HelpCommand.java trunk/cli/src/commands/org/jnode/command/common/HistoryCommand.java trunk/cli/src/commands/org/jnode/command/common/SleepCommand.java trunk/cli/src/commands/org/jnode/command/common/TimeCommand.java trunk/cli/src/commands/org/jnode/command/common/TrueCommand.java trunk/cli/src/commands/org/jnode/command/common/UnixTestCommand.java trunk/cli/src/commands/org/jnode/command/common/UptimeCommand.java trunk/cli/src/commands/org/jnode/command/dev/CompileCommand.java trunk/cli/src/commands/org/jnode/command/dev/DebugCommand.java trunk/cli/src/commands/org/jnode/command/dev/DisassembleCommand.java trunk/cli/src/commands/org/jnode/command/dev/RemoteOutputCommand.java trunk/cli/src/commands/org/jnode/command/dev/ant/AntCommand.java trunk/cli/src/commands/org/jnode/command/file/CatCommand.java trunk/cli/src/commands/org/jnode/command/file/CdCommand.java trunk/cli/src/commands/org/jnode/command/file/CmpCommand.java trunk/cli/src/commands/org/jnode/command/file/CpCommand.java trunk/cli/src/commands/org/jnode/command/file/CutCommand.java trunk/cli/src/commands/org/jnode/command/file/DFCommand.java trunk/cli/src/commands/org/jnode/command/file/DeleteCommand.java trunk/cli/src/commands/org/jnode/command/file/DirCommand.java trunk/cli/src/commands/org/jnode/command/file/DuCommand.java trunk/cli/src/commands/org/jnode/command/file/FindCommand.java trunk/cli/src/commands/org/jnode/command/file/GrepCommand.java trunk/cli/src/commands/org/jnode/command/file/HeadCommand.java trunk/cli/src/commands/org/jnode/command/file/HexdumpCommand.java trunk/cli/src/commands/org/jnode/command/file/Md5SumCommand.java trunk/cli/src/commands/org/jnode/command/file/MkdirCommand.java trunk/cli/src/commands/org/jnode/command/file/PasteCommand.java trunk/cli/src/commands/org/jnode/command/file/PwdCommand.java trunk/cli/src/commands/org/jnode/command/file/SortCommand.java trunk/cli/src/commands/org/jnode/command/file/TailCommand.java trunk/cli/src/commands/org/jnode/command/file/TeeCommand.java trunk/cli/src/commands/org/jnode/command/file/TouchCommand.java trunk/cli/src/commands/org/jnode/command/file/WcCommand.java trunk/cli/src/commands/org/jnode/command/net/ArpCommand.java trunk/cli/src/commands/org/jnode/command/net/BootpCommand.java trunk/cli/src/commands/org/jnode/command/net/DhcpCommand.java trunk/cli/src/commands/org/jnode/command/net/IfconfigCommand.java trunk/cli/src/commands/org/jnode/command/net/NetstatCommand.java trunk/cli/src/commands/org/jnode/command/net/PingCommand.java trunk/cli/src/commands/org/jnode/command/net/ResolverCommand.java trunk/cli/src/commands/org/jnode/command/net/RouteCommand.java trunk/cli/src/commands/org/jnode/command/net/RpcInfoCommand.java trunk/cli/src/commands/org/jnode/command/net/TcpInoutCommand.java trunk/cli/src/commands/org/jnode/command/net/TftpCommand.java trunk/cli/src/commands/org/jnode/command/net/WLanCtlCommand.java trunk/cli/src/commands/org/jnode/command/net/WgetCommand.java trunk/cli/src/commands/org/jnode/command/system/AliasCommand.java trunk/cli/src/commands/org/jnode/command/system/BindKeysCommand.java trunk/cli/src/commands/org/jnode/command/system/ClassCommand.java trunk/cli/src/commands/org/jnode/command/system/ClasspathCommand.java trunk/cli/src/commands/org/jnode/command/system/CpuIDCommand.java trunk/cli/src/commands/org/jnode/command/system/GcCommand.java trunk/cli/src/commands/org/jnode/command/system/HaltCommand.java trunk/cli/src/commands/org/jnode/command/system/IsolateCommand.java trunk/cli/src/commands/org/jnode/command/system/JavaCommand.java trunk/cli/src/commands/org/jnode/command/system/KdbCommand.java trunk/cli/src/commands/org/jnode/command/system/KillCommand.java trunk/cli/src/commands/org/jnode/command/system/LoadkeysCommand.java trunk/cli/src/commands/org/jnode/command/system/LocaleCommand.java trunk/cli/src/commands/org/jnode/command/system/Log4jCommand.java trunk/cli/src/commands/org/jnode/command/system/LsIRQCommand.java trunk/cli/src/commands/org/jnode/command/system/MemoryCommand.java trunk/cli/src/commands/org/jnode/command/system/NamespaceCommand.java trunk/cli/src/commands/org/jnode/command/system/OnHeapCommand.java trunk/cli/src/commands/org/jnode/command/system/PageCommand.java trunk/cli/src/commands/org/jnode/command/system/PluginCommand.java trunk/cli/src/commands/org/jnode/command/system/PrintEnvCommand.java trunk/cli/src/commands/org/jnode/command/system/RebootCommand.java trunk/cli/src/commands/org/jnode/command/system/RunCommand.java trunk/cli/src/commands/org/jnode/command/system/SetCommand.java trunk/cli/src/commands/org/jnode/command/system/SyntaxCommand.java trunk/cli/src/commands/org/jnode/command/system/TerminateCommand.java trunk/cli/src/commands/org/jnode/command/system/ThreadCommand.java trunk/cli/src/commands/org/jnode/command/system/VmInfoCommand.java trunk/cli/src/commands/org/jnode/command/util/AbstractDirectoryWalker.java trunk/cli/src/commands/org/jnode/command/util/IOUtils.java trunk/cli/src/commands/org/jnode/command/util/NumberRange.java trunk/core/src/classpath/ext/java/nio/channels/LinkChannel.java trunk/core/src/classpath/ext/java/util/prefs/TransientPreferences.java trunk/core/src/classpath/ext/javax/cache/Cache.java trunk/core/src/classpath/ext/javax/cache/CacheEntry.java trunk/core/src/classpath/ext/javax/cache/CacheException.java trunk/core/src/classpath/ext/javax/cache/CacheFactory.java trunk/core/src/classpath/ext/javax/cache/CacheListener.java trunk/core/src/classpath/ext/javax/cache/CacheLoader.java trunk/core/src/classpath/ext/javax/cache/CacheManager.java trunk/core/src/classpath/ext/javax/cache/CacheStatistics.java trunk/core/src/classpath/ext/javax/cache/EvictionStrategy.java trunk/core/src/classpath/ext/javax/isolate/AbstractLinkMessageHandler.java trunk/core/src/classpath/ext/javax/isolate/ClosedLinkException.java trunk/core/src/classpath/ext/javax/isolate/Isolate.java trunk/core/src/classpath/ext/javax/isolate/IsolatePermission.java trunk/core/src/classpath/ext/javax/isolate/IsolateStartupException.java trunk/core/src/classpath/ext/javax/isolate/IsolateStatus.java trunk/core/src/classpath/ext/javax/isolate/Link.java trunk/core/src/classpath/ext/javax/isolate/LinkMessage.java trunk/core/src/classpath/ext/javax/isolate/LinkMessageDispatcher.java trunk/core/src/classpath/ext/javax/isolate/LinkMessageHandler.java trunk/core/src/classpath/ext/javax/isolate/StreamBindings.java trunk/core/src/classpath/vm/gnu/classpath/NativeSystemProperties.java trunk/core/src/classpath/vm/gnu/classpath/NativeVMStackWalker.java trunk/core/src/classpath/vm/gnu/classpath/jdwp/JDIVirtualMachine.java trunk/core/src/classpath/vm/gnu/classpath/jdwp/NativeVMFrame.java trunk/core/src/classpath/vm/gnu/classpath/jdwp/NativeVMMethod.java trunk/core/src/classpath/vm/gnu/classpath/jdwp/NativeVMVirtualMachine.java trunk/core/src/classpath/vm/gnu/classpath/jdwp/transport/JNodeSocketTransport.java trunk/core/src/classpath/vm/gnu/classpath/jdwp/transport/NativeTransportFactory.java trunk/core/src/classpath/vm/gnu/java/security/action/GetEnvAction.java trunk/core/src/classpath/vm/gnu/java/security/action/GetPolicyAction.java trunk/core/src/classpath/vm/gnu/java/security/action/GetPropertiesAction.java trunk/core/src/classpath/vm/gnu/java/security/action/InvokeAction.java trunk/core/src/classpath/vm/gnu/java/security/action/SetPropertyAction.java trunk/core/src/classpath/vm/gnu/java/security/util/SimplePermissionCollection.java trunk/core/src/classpath/vm/java/awt/VMAwtAPI.java trunk/core/src/classpath/vm/java/awt/image/VMImageAPI.java trunk/core/src/classpath/vm/java/awt/image/VMImageUtils.java trunk/core/src/classpath/vm/java/lang/NativeClassLoader.java trunk/core/src/classpath/vm/java/lang/NativeSecurityManager.java trunk/core/src/classpath/vm/java/lang/NativeThread.java trunk/core/src/classpath/vm/java/lang/NativeVMClassLoader.java trunk/core/src/classpath/vm/java/lang/ThreadHelper.java trunk/core/src/classpath/vm/java/lang/VMRuntime.java trunk/core/src/classpath/vm/java/lang/VMSecurityManager.java trunk/core/src/classpath/vm/java/net/ExSocketOptions.java trunk/core/src/classpath/vm/java/net/VMInetAddress.java trunk/core/src/classpath/vm/java/net/VMNetAPI.java trunk/core/src/classpath/vm/java/net/VMNetDevice.java trunk/core/src/classpath/vm/java/net/VMNetUtils.java trunk/core/src/classpath/vm/java/net/VMNetworkInterface.java trunk/core/src/classpath/vm/java/nio/MemoryRawData.java trunk/core/src/classpath/vm/java/nio/NativeVMDirectByteBuffer.java trunk/core/src/classpath/vm/java/nio/channels/NativeVMChannels.java trunk/core/src/classpath/vm/java/security/NativeAccessControlContext.java trunk/core/src/classpath/vm/java/security/NativeAccessController.java trunk/core/src/classpath/vm/java/security/VMSecureRandom.java trunk/core/src/classpath/vm/javax/imageio/spi/NativeIIORegistry.java trunk/core/src/core/org/jnode/assembler/BootImageNativeStream.java trunk/core/src/core/org/jnode/assembler/Label.java trunk/core/src/core/org/jnode/assembler/NativeStream.java trunk/core/src/core/org/jnode/assembler/ObjectResolver.java trunk/core/src/core/org/jnode/assembler/UnresolvedObjectRefException.java trunk/core/src/core/org/jnode/assembler/x86/InvalidOpcodeException.java trunk/core/src/core/org/jnode/assembler/x86/X86Assembler.java trunk/core/src/core/org/jnode/assembler/x86/X86BinaryAssembler.java trunk/core/src/core/org/jnode/assembler/x86/X86Constants.java trunk/core/src/core/org/jnode/assembler/x86/X86Operation.java trunk/core/src/core/org/jnode/assembler/x86/X86Register.java trunk/core/src/core/org/jnode/assembler/x86/X86TextAssembler.java trunk/core/src/core/org/jnode/assembler/x86/X86Utils.java trunk/core/src/core/org/jnode/boot/InitJarProcessor.java trunk/core/src/core/org/jnode/boot/Main.java trunk/core/src/core/org/jnode/boot/MemoryResourceInputStream.java trunk/core/src/core/org/jnode/boot/NoCloseInputStream.java trunk/core/src/core/org/jnode/bootlog/BootLog.java trunk/core/src/core/org/jnode/bootlog/BootLogInstance.java trunk/core/src/core/org/jnode/debug/RemoteAppender.java trunk/core/src/core/org/jnode/debug/RemoteReceiver.java trunk/core/src/core/org/jnode/debug/UDPOutputStream.java trunk/core/src/core/org/jnode/debugger/DebugState.java trunk/core/src/core/org/jnode/debugger/Debugger.java trunk/core/src/core/org/jnode/debugger/DebuggerPlugin.java trunk/core/src/core/org/jnode/debugger/DebuggerUtils.java trunk/core/src/core/org/jnode/debugger/RootState.java trunk/core/src/core/org/jnode/debugger/ThreadListState.java trunk/core/src/core/org/jnode/debugger/ThreadState.java trunk/core/src/core/org/jnode/imageio/jpeg/JPEGDecoder.java trunk/core/src/core/org/jnode/imageio/jpeg/JPEGDecoderAdapter.java trunk/core/src/core/org/jnode/imageio/jpeg/JPEGException.java trunk/core/src/core/org/jnode/imageio/jpeg/JPEGImageReader.java trunk/core/src/core/org/jnode/imageio/jpeg/JPEGImageReaderSpi.java trunk/core/src/core/org/jnode/log4j/config/JNodeSystemAppender.java trunk/core/src/core/org/jnode/log4j/config/Log4jConfigurePlugin.java trunk/core/src/core/org/jnode/log4j/config/UnsafeDebugAppender.java trunk/core/src/core/org/jnode/log4j/config/VirtualConsoleAppender.java trunk/core/src/core/org/jnode/naming/AbstractNameSpace.java trunk/core/src/core/org/jnode/naming/InitialNaming.java trunk/core/src/core/org/jnode/naming/NameSpace.java trunk/core/src/core/org/jnode/naming/NameSpaceListener.java trunk/core/src/core/org/jnode/permission/JNodePermission.java trunk/core/src/core/org/jnode/plugin/AutoUnzipPlugin.java trunk/core/src/core/org/jnode/plugin/ConfigurationElement.java trunk/core/src/core/org/jnode/plugin/Extension.java trunk/core/src/core/org/jnode/plugin/ExtensionPoint.java trunk/core/src/core/org/jnode/plugin/ExtensionPointListener.java trunk/core/src/core/org/jnode/plugin/FragmentDescriptor.java trunk/core/src/core/org/jnode/plugin/Library.java trunk/core/src/core/org/jnode/plugin/Plugin.java trunk/core/src/core/org/jnode/plugin/PluginClassLoader.java trunk/core/src/core/org/jnode/plugin/PluginDescriptor.java trunk/core/src/core/org/jnode/plugin/PluginDescriptorListener.java trunk/core/src/core/org/jnode/plugin/PluginException.java trunk/core/src/core/org/jnode/plugin/PluginLoader.java trunk/core/src/core/org/jnode/plugin/PluginLoaderManager.java trunk/core/src/core/org/jnode/plugin/PluginManager.java trunk/core/src/core/org/jnode/plugin/PluginPrerequisite.java trunk/core/src/core/org/jnode/plugin/PluginReference.java trunk/core/src/core/org/jnode/plugin/PluginRegistry.java trunk/core/src/core/org/jnode/plugin/PluginSecurityConstants.java trunk/core/src/core/org/jnode/plugin/PluginUtils.java trunk/core/src/core/org/jnode/plugin/Runtime.java trunk/core/src/core/org/jnode/plugin/URLPluginLoader.java trunk/core/src/core/org/jnode/plugin/manager/DefaultPluginLoaderManager.java trunk/core/src/core/org/jnode/plugin/manager/DefaultPluginManager.java trunk/core/src/core/org/jnode/plugin/model/AbstractModelObject.java trunk/core/src/core/org/jnode/plugin/model/AttributeModel.java trunk/core/src/core/org/jnode/plugin/model/ConfigurationElementModel.java trunk/core/src/core/org/jnode/plugin/model/EmptyPlugin.java trunk/core/src/core/org/jnode/plugin/model/ExtensionModel.java trunk/core/src/core/org/jnode/plugin/model/ExtensionPointModel.java trunk/core/src/core/org/jnode/plugin/model/Factory.java trunk/core/src/core/org/jnode/plugin/model/FragmentDescriptorModel.java trunk/core/src/core/org/jnode/plugin/model/LibraryModel.java trunk/core/src/core/org/jnode/plugin/model/PluginClassLoaderImpl.java trunk/core/src/core/org/jnode/plugin/model/PluginDescriptorModel.java trunk/core/src/core/org/jnode/plugin/model/PluginJar.java trunk/core/src/core/org/jnode/plugin/model/PluginModelObject.java trunk/core/src/core/org/jnode/plugin/model/PluginPrerequisiteModel.java trunk/core/src/core/org/jnode/plugin/model/PluginRegistryModel.java trunk/core/src/core/org/jnode/plugin/model/PluginsClassLoader.java trunk/core/src/core/org/jnode/plugin/model/RuntimeModel.java trunk/core/src/core/org/jnode/protocol/ProtocolHandlerFactoryPlugin.java trunk/core/src/core/org/jnode/protocol/plugin/Handler.java trunk/core/src/core/org/jnode/protocol/plugin/PluginURLConnection.java trunk/core/src/core/org/jnode/protocol/system/Handler.java trunk/core/src/core/org/jnode/protocol/system/SystemURLConnection.java trunk/core/src/core/org/jnode/security/JNodePolicy.java trunk/core/src/core/org/jnode/security/JNodeSecurityManager.java trunk/core/src/core/org/jnode/security/SecurityPlugin.java trunk/core/src/core/org/jnode/system/event/FocusEvent.java trunk/core/src/core/org/jnode/system/event/FocusListener.java trunk/core/src/core/org/jnode/system/event/SystemEvent.java trunk/core/src/core/org/jnode/system/repository/Repository.java trunk/core/src/core/org/jnode/system/repository/RepositoryPlugin.java trunk/core/src/core/org/jnode/system/repository/RepositoryPluginLoader.java trunk/core/src/core/org/jnode/system/repository/SystemRepository.java trunk/core/src/core/org/jnode/system/repository/SystemRepositoryPlugin.java trunk/core/src/core/org/jnode/system/repository/plugins/PluginLoaderPlugin.java trunk/core/src/core/org/jnode/system/repository/spi/SystemRepositoryProvider.java trunk/core/src/core/org/jnode/system/resource/DMAException.java trunk/core/src/core/org/jnode/system/resource/DMAManager.java trunk/core/src/core/org/jnode/system/resource/DMAResource.java trunk/core/src/core/org/jnode/system/resource/IOResource.java trunk/core/src/core/org/jnode/system/resource/IRQHandler.java trunk/core/src/core/org/jnode/system/resource/IRQResource.java trunk/core/src/core/org/jnode/system/resource/MemoryResource.java trunk/core/src/core/org/jnode/system/resource/MemoryScanner.java trunk/core/src/core/org/jnode/system/resource/MultiMediaMemoryResource.java trunk/core/src/core/org/jnode/system/resource/Resource.java trunk/core/src/core/org/jnode/system/resource/ResourceManager.java trunk/core/src/core/org/jnode/system/resource/ResourceNotFreeException.java trunk/core/src/core/org/jnode/system/resource/ResourceOwner.java trunk/core/src/core/org/jnode/system/resource/ResourcePermission.java trunk/core/src/core/org/jnode/system/resource/SimpleResourceOwner.java trunk/core/src/core/org/jnode/system/x86/DMA.java trunk/core/src/core/org/jnode/system/x86/DMAConstants.java trunk/core/src/core/org/jnode/system/x86/DMAPlugin.java trunk/core/src/core/org/jnode/system/x86/X86DMAChannel.java trunk/core/src/core/org/jnode/util/AccessControllerUtils.java trunk/core/src/core/org/jnode/util/BCDUtils.java trunk/core/src/core/org/jnode/util/BeanUtils.java trunk/core/src/core/org/jnode/util/BigEndian.java trunk/core/src/core/org/jnode/util/BinaryScaleFactor.java trunk/core/src/core/org/jnode/util/BooleanUtils.java trunk/core/src/core/org/jnode/util/ByteBufferInputStream.java trunk/core/src/core/org/jnode/util/ByteBufferUtils.java trunk/core/src/core/org/jnode/util/ByteQueue.java trunk/core/src/core/org/jnode/util/ByteQueueProcessor.java trunk/core/src/core/org/jnode/util/ByteQueueProcessorThread.java trunk/core/src/core/org/jnode/util/ChannelInputStream.java trunk/core/src/core/org/jnode/util/ChannelOutputStream.java trunk/core/src/core/org/jnode/util/Command.java trunk/core/src/core/org/jnode/util/ConsoleStream.java trunk/core/src/core/org/jnode/util/DecimalScaleFactor.java trunk/core/src/core/org/jnode/util/EmptyInputStream.java trunk/core/src/core/org/jnode/util/FileUtils.java trunk/core/src/core/org/jnode/util/IOUtils.java trunk/core/src/core/org/jnode/util/JarBuffer.java trunk/core/src/core/org/jnode/util/JarConstants.java trunk/core/src/core/org/jnode/util/LittleEndian.java trunk/core/src/core/org/jnode/util/NumberUtils.java trunk/core/src/core/org/jnode/util/ObjectArrayIterator.java trunk/core/src/core/org/jnode/util/ObjectUtils.java trunk/core/src/core/org/jnode/util/OsUtils.java trunk/core/src/core/org/jnode/util/PipeStream.java trunk/core/src/core/org/jnode/util/ProxyStream.java trunk/core/src/core/org/jnode/util/ProxyStreamException.java trunk/core/src/core/org/jnode/util/Queue.java trunk/core/src/core/org/jnode/util/QueueProcessor.java trunk/core/src/core/org/jnode/util/QueueProcessorThread.java trunk/core/src/core/org/jnode/util/ReaderInputStream.java trunk/core/src/core/org/jnode/util/ScaleFactor.java trunk/core/src/core/org/jnode/util/SizeUnit.java trunk/core/src/core/org/jnode/util/StopWatch.java trunk/core/src/core/org/jnode/util/SystemInputStream.java trunk/core/src/core/org/jnode/util/TimeUtils.java trunk/core/src/core/org/jnode/util/TimeoutException.java trunk/core/src/core/org/jnode/util/Token.java trunk/core/src/core/org/jnode/util/WriterOutputStream.java trunk/core/src/core/org/jnode/vm/AllocationBitmap.java trunk/core/src/core/org/jnode/vm/BaseVmArchitecture.java trunk/core/src/core/org/jnode/vm/BootLogImpl.java trunk/core/src/core/org/jnode/vm/CpuID.java trunk/core/src/core/org/jnode/vm/DefaultNameSpace.java trunk/core/src/core/org/jnode/vm/HeapHelperImpl.java trunk/core/src/core/org/jnode/vm/IOContext.java trunk/core/src/core/org/jnode/vm/IOResourceImpl.java trunk/core/src/core/org/jnode/vm/InternString.java trunk/core/src/core/org/jnode/vm/JvmType.java trunk/core/src/core/org/jnode/vm/LoadCompileService.java trunk/core/src/core/org/jnode/vm/LoadCompileThread.java trunk/core/src/core/org/jnode/vm/MathSupport.java trunk/core/src/core/org/jnode/vm/MemoryBlockManager.java trunk/core/src/core/org/jnode/vm/MemoryResourceImpl.java trunk/core/src/core/org/jnode/vm/MemoryScannerImpl.java trunk/core/src/core/org/jnode/vm/MultiMediaMemoryResourceImpl.java trunk/core/src/core/org/jnode/vm/RTCService.java trunk/core/src/core/org/jnode/vm/Region.java trunk/core/src/core/org/jnode/vm/ResourceLoader.java trunk/core/src/core/org/jnode/vm/ResourceManagerImpl.java trunk/core/src/core/org/jnode/vm/SoftByteCodes.java trunk/core/src/core/org/jnode/vm/Unsafe.java trunk/core/src/core/org/jnode/vm/VirtualMemoryRegion.java trunk/core/src/core/org/jnode/vm/VmAbstractClassLoader.java trunk/core/src/core/org/jnode/vm/VmAccessControlContext.java trunk/core/src/core/org/jnode/vm/VmAccessController.java trunk/core/src/core/org/jnode/vm/VmAddress.java trunk/core/src/core/org/jnode/vm/VmExit.java trunk/core/src/core/org/jnode/vm/VmIOContext.java trunk/core/src/core/org/jnode/vm/VmImpl.java trunk/core/src/core/org/jnode/vm/VmJavaClassLoader.java trunk/core/src/core/org/jnode/vm/VmJavaMultiMediaSupport.java trunk/core/src/core/org/jnode/vm/VmMagic.java trunk/core/src/core/org/jnode/vm/VmMultiMediaSupport.java trunk/core/src/core/org/jnode/vm/VmProcess.java trunk/core/src/core/org/jnode/vm/VmProcessClassLoader.java trunk/core/src/core/org/jnode/vm/VmReflection.java trunk/core/src/core/org/jnode/vm/VmStackFrame.java trunk/core/src/core/org/jnode/vm/VmStackFrameEnumerator.java trunk/core/src/core/org/jnode/vm/VmStackReader.java trunk/core/src/core/org/jnode/vm/VmSystem.java trunk/core/src/core/org/jnode/vm/VmSystemClassLoader.java trunk/core/src/core/org/jnode/vm/bytecode/BasicBlock.java trunk/core/src/core/org/jnode/vm/bytecode/BasicBlockFinder.java trunk/core/src/core/org/jnode/vm/bytecode/BytecodeFlags.java trunk/core/src/core/org/jnode/vm/bytecode/BytecodeParser.java trunk/core/src/core/org/jnode/vm/bytecode/BytecodeViewer.java trunk/core/src/core/org/jnode/vm/bytecode/BytecodeVisitor.java trunk/core/src/core/org/jnode/vm/bytecode/BytecodeVisitorSupport.java trunk/core/src/core/org/jnode/vm/bytecode/BytecodeWriter.java trunk/core/src/core/org/jnode/vm/bytecode/ControlFlowGraph.java trunk/core/src/core/org/jnode/vm/bytecode/DeadBlockFinder.java trunk/core/src/core/org/jnode/vm/bytecode/DelegatingBytecodeVisitor.java trunk/core/src/core/org/jnode/vm/bytecode/StackException.java trunk/core/src/core/org/jnode/vm/bytecode/TypeStack.java trunk/core/src/core/org/jnode/vm/classmgr/AbstractCode.java trunk/core/src/core/org/jnode/vm/classmgr/AbstractExceptionHandler.java trunk/core/src/core/org/jnode/vm/classmgr/ClassDecoder.java trunk/core/src/core/org/jnode/vm/classmgr/CompiledCodeList.java trunk/core/src/core/org/jnode/vm/classmgr/IMTBuilder.java trunk/core/src/core/org/jnode/vm/classmgr/Mangler.java trunk/core/src/core/org/jnode/vm/classmgr/MethodPragmaFlags.java trunk/core/src/core/org/jnode/vm/classmgr/Modifier.java trunk/core/src/core/org/jnode/vm/classmgr/NotResolvedYetException.java trunk/core/src/core/org/jnode/vm/classmgr/ObjectFlags.java trunk/core/src/core/org/jnode/vm/classmgr/ObjectLayout.java trunk/core/src/core/org/jnode/vm/classmgr/SelectorMap.java trunk/core/src/core/org/jnode/vm/classmgr/Signature.java trunk/core/src/core/org/jnode/vm/classmgr/TIBBuilder.java trunk/core/src/core/org/jnode/vm/classmgr/TIBLayout.java trunk/core/src/core/org/jnode/vm/classmgr/TypePragmaFlags.java trunk/core/src/core/org/jnode/vm/classmgr/VmAddressMap.java trunk/core/src/core/org/jnode/vm/classmgr/VmAnnotatedElement.java trunk/core/src/core/org/jnode/vm/classmgr/VmAnnotation.java trunk/core/src/core/org/jnode/vm/classmgr/VmArray.java trunk/core/src/core/org/jnode/vm/classmgr/VmArrayClass.java trunk/core/src/core/org/jnode/vm/classmgr/VmByteCode.java trunk/core/src/core/org/jnode/vm/classmgr/VmCP.java trunk/core/src/core/org/jnode/vm/classmgr/VmClassLoader.java trunk/core/src/core/org/jnode/vm/classmgr/VmClassType.java trunk/core/src/core/org/jnode/vm/classmgr/VmCompiledCode.java trunk/core/src/core/org/jnode/vm/classmgr/VmCompiledExceptionHandler.java trunk/core/src/core/org/jnode/vm/classmgr/VmConstClass.java trunk/core/src/core/org/jnode/vm/classmgr/VmConstDouble.java trunk/core/src/core/org/jnode/vm/classmgr/VmConstFieldRef.java trunk/core/src/core/org/jnode/vm/classmgr/VmConstFloat.java trunk/core/src/core/org/jnode/vm/classmgr/VmConstIMethodRef.java trunk/core/src/core/org/jnode/vm/classmgr/VmConstInt.java trunk/core/src/core/org/jnode/vm/classmgr/VmConstLong.java trunk/core/src/core/org/jnode/vm/classmgr/VmConstMemberRef.java trunk/core/src/core/org/jnode/vm/classmgr/VmConstMethodRef.java trunk/core/src/core/org/jnode/vm/classmgr/VmConstObject.java trunk/core/src/core/org/jnode/vm/classmgr/VmConstString.java trunk/core/src/core/org/jnode/vm/classmgr/VmConstantPool.java trunk/core/src/core/org/jnode/vm/classmgr/VmExceptions.java trunk/core/src/core/org/jnode/vm/classmgr/VmField.java trunk/core/src/core/org/jnode/vm/classmgr/VmImplementedInterface.java trunk/core/src/core/org/jnode/vm/classmgr/VmInstanceField.java trunk/core/src/core/org/jnode/vm/classmgr/VmInstanceMethod.java trunk/core/src/core/org/jnode/vm/classmgr/VmInterfaceClass.java trunk/core/src/core/org/jnode/vm/classmgr/VmInterpretedExceptionHandler.java trunk/core/src/core/org/jnode/vm/classmgr/VmIsolatedStatics.java trunk/core/src/core/org/jnode/vm/classmgr/VmIsolatedStaticsEntry.java trunk/core/src/core/org/jnode/vm/classmgr/VmLineNumberMap.java trunk/core/src/core/org/jnode/vm/classmgr/VmLocalVariable.java trunk/core/src/core/org/jnode/vm/classmgr/VmLocalVariableTable.java trunk/core/src/core/org/jnode/vm/classmgr/VmMember.java trunk/core/src/core/org/jnode/vm/classmgr/VmMethod.java trunk/core/src/core/org/jnode/vm/classmgr/VmMethodCode.java trunk/core/src/core/org/jnode/vm/classmgr/VmNormalClass.java trunk/core/src/core/org/jnode/vm/classmgr/VmObject.java trunk/core/src/core/org/jnode/vm/classmgr/VmPrimitiveClass.java trunk/core/src/core/org/jnode/vm/classmgr/VmResolvableConstObject.java trunk/core/src/core/org/jnode/vm/classmgr/VmSharedStatics.java trunk/core/src/core/org/jnode/vm/classmgr/VmSharedStaticsEntry.java trunk/core/src/core/org/jnode/vm/classmgr/VmSpecialMethod.java trunk/core/src/core/org/jnode/vm/classmgr/VmStaticField.java trunk/core/src/core/org/jnode/vm/classmgr/VmStaticMethod.java trunk/core/src/core/org/jnode/vm/classmgr/VmStatics.java trunk/core/src/core/org/jnode/vm/classmgr/VmStaticsAllocator.java trunk/core/src/core/org/jnode/vm/classmgr/VmStaticsBase.java trunk/core/src/core/org/jnode/vm/classmgr/VmStaticsIterator.java trunk/core/src/core/org/jnode/vm/classmgr/VmType.java trunk/core/src/core/org/jnode/vm/classmgr/VmTypeState.java trunk/core/src/core/org/jnode/vm/classmgr/VmUTF8Convert.java trunk/core/src/core/org/jnode/vm/compiler/BaseMagicHelper.java trunk/core/src/core/org/jnode/vm/compiler/CompileError.java trunk/core/src/core/org/jnode/vm/compiler/CompiledExceptionHandler.java trunk/core/src/core/org/jnode/vm/compiler/CompiledIMT.java trunk/core/src/core/org/jnode/vm/compiler/CompiledMethod.java trunk/core/src/core/org/jnode/vm/compiler/CompilerBytecodeParser.java trunk/core/src/core/org/jnode/vm/compiler/CompilerBytecodeViewer.java trunk/core/src/core/org/jnode/vm/compiler/CompilerBytecodeVisitor.java trunk/core/src/core/org/jnode/vm/compiler/DelegatingCompilerBytecodeVisitor.java trunk/core/src/core/org/jnode/vm/compiler/EntryPoints.java trunk/core/src/core/org/jnode/vm/compiler/GCMapIterator.java trunk/core/src/core/org/jnode/vm/compiler/IMTCompiler.java trunk/core/src/core/org/jnode/vm/compiler/IllegalModeException.java trunk/core/src/core/org/jnode/vm/compiler/InlineBytecodeVisitor.java trunk/core/src/core/org/jnode/vm/compiler/NativeCodeCompiler.java trunk/core/src/core/org/jnode/vm/compiler/OptimizingBytecodeVisitor.java trunk/core/src/core/org/jnode/vm/compiler/VerifyingCompilerBytecodeVisitor.java trunk/core/src/core/org/jnode/vm/compiler/ir/AddressingMode.java trunk/core/src/core/org/jnode/vm/compiler/ir/CodeGenerator.java trunk/core/src/core/org/jnode/vm/compiler/ir/Constant.java trunk/core/src/core/org/jnode/vm/compiler/ir/DoubleConstant.java trunk/core/src/core/org/jnode/vm/compiler/ir/FloatConstant.java trunk/core/src/core/org/jnode/vm/compiler/ir/IRBasicBlock.java trunk/core/src/core/org/jnode/vm/compiler/ir/IRBasicBlockFinder.java trunk/core/src/core/org/jnode/vm/compiler/ir/IRControlFlowGraph.java trunk/core/src/core/org/jnode/vm/compiler/ir/IRGenerator.java trunk/core/src/core/org/jnode/vm/compiler/ir/IRTest.java trunk/core/src/core/org/jnode/vm/compiler/ir/IntConstant.java trunk/core/src/core/org/jnode/vm/compiler/ir/LinearScanAllocator.java trunk/core/src/core/org/jnode/vm/compiler/ir/LiveRange.java trunk/core/src/core/org/jnode/vm/compiler/ir/LocalVariable.java trunk/core/src/core/org/jnode/vm/compiler/ir/Location.java trunk/core/src/core/org/jnode/vm/compiler/ir/LongConstant.java trunk/core/src/core/org/jnode/vm/compiler/ir/MethodArgument.java trunk/core/src/core/org/jnode/vm/compiler/ir/NativeTest.java trunk/core/src/core/org/jnode/vm/compiler/ir/Operand.java trunk/core/src/core/org/jnode/vm/compiler/ir/PhiOperand.java trunk/core/src/core/org/jnode/vm/compiler/ir/PrimitiveTest.java trunk/core/src/core/org/jnode/vm/compiler/ir/ReferenceConstant.java trunk/core/src/core/org/jnode/vm/compiler/ir/RegisterLocation.java trunk/core/src/core/org/jnode/vm/compiler/ir/RegisterPool.java trunk/core/src/core/org/jnode/vm/compiler/ir/SSAStack.java trunk/core/src/core/org/jnode/vm/compiler/ir/StackLocation.java trunk/core/src/core/org/jnode/vm/compiler/ir/StackVariable.java trunk/core/src/core/org/jnode/vm/compiler/ir/Variable.java trunk/core/src/core/org/jnode/vm/compiler/ir/quad/AssignQuad.java trunk/core/src/core/org/jnode/vm/compiler/ir/quad/BinaryOperation.java trunk/core/src/core/org/jnode/vm/compiler/ir/quad/BinaryQuad.java trunk/core/src/core/org/jnode/vm/compiler/ir/quad/BranchCondition.java trunk/core/src/core/org/jnode/vm/compiler/ir/quad/BranchQuad.java trunk/core/src/core/org/jnode/vm/compiler/ir/quad/ConditionalBranchQuad.java trunk/core/src/core/org/jnode/vm/compiler/ir/quad/ConstantRefAssignQuad.java trunk/core/src/core/org/jnode/vm/compiler/ir/quad/PhiAssignQuad.java trunk/core/src/core/org/jnode/vm/compiler/ir/quad/Quad.java trunk/core/src/core/org/jnode/vm/compiler/ir/quad/UnaryOperation.java trunk/core/src/core/org/jnode/vm/compiler/ir/quad/UnaryQuad.java trunk/core/src/core/org/jnode/vm/compiler/ir/quad/UnconditionalBranchQuad.java trunk/core/src/core/org/jnode/vm/compiler/ir/quad/VarReturnQuad.java trunk/core/src/core/org/jnode/vm/compiler/ir/quad/VariableRefAssignQuad.java trunk/core/src/core/org/jnode/vm/compiler/ir/quad/VoidReturnQuad.java trunk/core/src/core/org/jnode/vm/facade/GCStatistics.java trunk/core/src/core/org/jnode/vm/facade/HeapStatistics.java trunk/core/src/core/org/jnode/vm/facade/MemoryMapEntry.java trunk/core/src/core/org/jnode/vm/facade/NoObjectFilter.java trunk/core/src/core/org/jnode/vm/facade/ObjectFilter.java trunk/core/src/core/org/jnode/vm/facade/ObjectVisitor.java trunk/core/src/core/org/jnode/vm/facade/SimpleObjectFilter.java trunk/core/src/core/org/jnode/vm/facade/TypeSizeInfo.java trunk/core/src/core/org/jnode/vm/facade/Vm.java trunk/core/src/core/org/jnode/vm/facade/VmArchitecture.java trunk/core/src/core/org/jnode/vm/facade/VmHeapManager.java trunk/core/src/core/org/jnode/vm/facade/VmProcessor.java trunk/core/src/core/org/jnode/vm/facade/VmThread.java trunk/core/src/core/org/jnode/vm/facade/VmThreadVisitor.java trunk/core/src/core/org/jnode/vm/facade/VmUtils.java trunk/core/src/core/org/jnode/vm/facade/VmWriteBarrier.java trunk/core/src/core/org/jnode/vm/isolate/DataLinkMessage.java trunk/core/src/core/org/jnode/vm/isolate/IsolateLinkMessage.java trunk/core/src/core/org/jnode/vm/isolate/IsolateStatusImpl.java trunk/core/src/core/org/jnode/vm/isolate/IsolateThread.java trunk/core/src/core/org/jnode/vm/isolate/IsolateThreadFactory.java trunk/core/src/core/org/jnode/vm/isolate/LinkImpl.java trunk/core/src/core/org/jnode/vm/isolate/LinkLinkMessage.java trunk/core/src/core/org/jnode/vm/isolate/LinkMessageFactory.java trunk/core/src/core/org/jnode/vm/isolate/LinkMessageImpl.java trunk/core/src/core/org/jnode/vm/isolate/ObjectLinkMessage.java trunk/core/src/core/org/jnode/vm/isolate/StatusLinkMessage.java trunk/core/src/core/org/jnode/vm/isolate/StringLinkMessage.java trunk/core/src/core/org/jnode/vm/isolate/VmIsolate.java trunk/core/src/core/org/jnode/vm/isolate/VmIsolateLocal.java trunk/core/src/core/org/jnode/vm/isolate/VmLink.java trunk/core/src/core/org/jnode/vm/isolate/VmStreamBindings.java trunk/core/src/core/org/jnode/vm/memmgr/HeapHelper.java trunk/core/src/core/org/jnode/vm/memmgr/VmHeapManager.java trunk/core/src/core/org/jnode/vm/memmgr/def/DefGCStatistics.java trunk/core/src/core/org/jnode/vm/memmgr/def/DefHeapStatistics.java trunk/core/src/core/org/jnode/vm/memmgr/def/DefaultHeapManager.java trunk/core/src/core/org/jnode/vm/memmgr/def/DefaultWriteBarrier.java trunk/core/src/core/org/jnode/vm/memmgr/def/FinalizerThread.java trunk/core/src/core/org/jnode/vm/memmgr/def/FinalizerVisitor.java trunk/core/src/core/org/jnode/vm/memmgr/def/GCManager.java trunk/core/src/core/org/jnode/vm/memmgr/def/GCMarkVisitor.java trunk/core/src/core/org/jnode/vm/memmgr/def/GCSetWhiteVisitor.java trunk/core/src/core/org/jnode/vm/memmgr/def/GCStack.java trunk/core/src/core/org/jnode/vm/memmgr/def/GCSweepVisitor.java trunk/core/src/core/org/jnode/vm/memmgr/def/GCThread.java trunk/core/src/core/org/jnode/vm/memmgr/def/GCVerifyVisitor.java trunk/core/src/core/org/jnode/vm/memmgr/def/HeapStatisticsVisitor.java trunk/core/src/core/org/jnode/vm/memmgr/def/VmAbstractHeap.java trunk/core/src/core/org/jnode/vm/memmgr/def/VmBootHeap.java trunk/core/src/core/org/jnode/vm/memmgr/def/VmDefaultHeap.java trunk/core/src/core/org/jnode/vm/objects/BootableArrayList.java trunk/core/src/core/org/jnode/vm/objects/BootableHashMap.java trunk/core/src/core/org/jnode/vm/objects/BootableObject.java trunk/core/src/core/org/jnode/vm/objects/Counter.java trunk/core/src/core/org/jnode/vm/objects/CounterGroup.java trunk/core/src/core/org/jnode/vm/objects/Statistic.java trunk/core/src/core/org/jnode/vm/objects/Statistics.java trunk/core/src/core/org/jnode/vm/objects/SynchronizedCounter.java trunk/core/src/core/org/jnode/vm/objects/VmSystemObject.java trunk/core/src/core/org/jnode/vm/performance/PerformanceCounterEvent.java trunk/core/src/core/org/jnode/vm/performance/PerformanceCounters.java trunk/core/src/core/org/jnode/vm/performance/PresetEvent.java trunk/core/src/core/org/jnode/vm/scheduler/IRQManager.java trunk/core/src/core/org/jnode/vm/scheduler/IRQThread.java trunk/core/src/core/org/jnode/vm/scheduler/IdleThread.java trunk/core/src/core/org/jnode/vm/scheduler/KernelDebugger.java trunk/core/src/core/org/jnode/vm/scheduler/Monitor.java trunk/core/src/core/org/jnode/vm/scheduler/MonitorManager.java trunk/core/src/core/org/jnode/vm/scheduler/ProcessorLock.java trunk/core/src/core/org/jnode/vm/scheduler/SpinLock.java trunk/core/src/core/org/jnode/vm/scheduler/SystemThread.java trunk/core/src/core/org/jnode/vm/scheduler/VmProcessor.java trunk/core/src/core/org/jnode/vm/scheduler/VmScheduler.java trunk/core/src/core/org/jnode/vm/scheduler/VmThread.java trunk/core/src/core/org/jnode/vm/scheduler/VmThreadQueue.java trunk/core/src/core/org/jnode/vm/scheduler/VmThreadQueueEntry.java trunk/core/src/core/org/jnode/vm/x86/GDT.java trunk/core/src/core/org/jnode/vm/x86/IOAPIC.java trunk/core/src/core/org/jnode/vm/x86/IOAPICRedirectionEntry.java trunk/core/src/core/org/jnode/vm/x86/LocalAPIC.java trunk/core/src/core/org/jnode/vm/x86/MMXMultiMediaSupport.java trunk/core/src/core/org/jnode/vm/x86/MPBusEntry.java trunk/core/src/core/org/jnode/vm/x86/MPConfigTable.java trunk/core/src/core/org/jnode/vm/x86/MPEntry.java trunk/core/src/core/org/jnode/vm/x86/MPFloatingPointerStructure.java trunk/core/src/core/org/jnode/vm/x86/MPIOAPICEntry.java trunk/core/src/core/org/jnode/vm/x86/MPIOInterruptAssignmentEntry.java trunk/core/src/core/org/jnode/vm/x86/MPInterruptAssignmentEntry.java trunk/core/src/core/org/jnode/vm/x86/MPLocalInterruptAssignmentEntry.java trunk/core/src/core/org/jnode/vm/x86/MPProcessorEntry.java trunk/core/src/core/org/jnode/vm/x86/MSR.java trunk/core/src/core/org/jnode/vm/x86/PIC8259A.java trunk/core/src/core/org/jnode/vm/x86/TSS32.java trunk/core/src/core/org/jnode/vm/x86/UnsafeX86.java trunk/core/src/core/org/jnode/vm/x86/VmX86Architecture.java trunk/core/src/core/org/jnode/vm/x86/VmX86Architecture32.java trunk/core/src/core/org/jnode/vm/x86/VmX86Architecture64.java trunk/core/src/core/org/jnode/vm/x86/VmX86Processor.java trunk/core/src/core/org/jnode/vm/x86/VmX86Processor32.java trunk/core/src/core/org/jnode/vm/x86/VmX86Processor64.java trunk/core/src/core/org/jnode/vm/x86/VmX86StackReader.java trunk/core/src/core/org/jnode/vm/x86/VmX86Thread.java trunk/core/src/core/org/jnode/vm/x86/VmX86Thread32.java trunk/core/src/core/org/jnode/vm/x86/VmX86Thread64.java trunk/core/src/core/org/jnode/vm/x86/X86Cpu.java trunk/core/src/core/org/jnode/vm/x86/X86CpuID.java trunk/core/src/core/org/jnode/vm/x86/X86IRQManager.java trunk/core/src/core/org/jnode/vm/x86/X86MemoryMapEntry.java trunk/core/src/core/org/jnode/vm/x86/X86Vendor.java trunk/core/src/core/org/jnode/vm/x86/compiler/AbstractX86Compiler.java trunk/core/src/core/org/jnode/vm/x86/compiler/AbstractX86StackManager.java trunk/core/src/core/org/jnode/vm/x86/compiler/BaseX86MagicHelper.java trunk/core/src/core/org/jnode/vm/x86/compiler/X86CompiledIMT.java trunk/core/src/core/org/jnode/vm/x86/compiler/X86CompilerConstants.java trunk/core/src/core/org/jnode/vm/x86/compiler/X86CompilerHelper.java trunk/core/src/core/org/jnode/vm/x86/compiler/X86IMTCompiler32.java trunk/core/src/core/org/jnode/vm/x86/compiler/X86IMTCompiler64.java trunk/core/src/core/org/jnode/vm/x86/compiler/X86JumpTable.java trunk/core/src/core/org/jnode/vm/x86/compiler/l1a/DoubleItem.java trunk/core/src/core/org/jnode/vm/x86/compiler/l1a/DoubleWordItem.java trunk/core/src/core/org/jnode/vm/x86/compiler/l1a/EmitterContext.java trunk/core/src/core/org/jnode/vm/x86/compiler/l1a/FPCompiler.java trunk/core/src/core/org/jnode/vm/x86/compiler/l1a/FPCompilerFPU.java trunk/core/src/core/org/jnode/vm/x86/compiler/l1a/FPCompilerSSE.java trunk/core/src/core/org/jnode/vm/x86/compiler/l1a/FPUHelper.java trunk/core/src/core/org/jnode/vm/x86/compiler/l1a/FPUStack.java trunk/core/src/core/org/jnode/vm/x86/compiler/l1a/FloatItem.java trunk/core/src/core/org/jnode/vm/x86/compiler/l1a/InlinedMethodInfo.java trunk/core/src/core/org/jnode/vm/x86/compiler/l1a/IntItem.java trunk/core/src/core/org/jnode/vm/x86/compiler/l1a/Item.java trunk/core/src/core/org/jnode/vm/x86/compiler/l1a/ItemFactory.java trunk/core/src/core/org/jnode/vm/x86/compiler/l1a/ItemStack.java trunk/core/src/core/org/jnode/vm/x86/compiler/l1a/ItemVisitor.java trunk/core/src/core/org/jnode/vm/x86/compiler/l1a/L1AHelper.java trunk/core/src/core/org/jnode/vm/x86/compiler/l1a/LongItem.java trunk/core/src/core/org/jnode/vm/x86/compiler/l1a/MagicHelper.java trunk/core/src/core/org/jnode/vm/x86/compiler/l1a/RefItem.java trunk/core/src/core/org/jnode/vm/x86/compiler/l1a/RegisterVisitor.java trunk/core/src/core/org/jnode/vm/x86/compiler/l1a/VirtualStack.java trunk/core/src/core/org/jnode/vm/x86/compiler/l1a/WordItem.java trunk/core/src/core/org/jnode/vm/x86/compiler/l1a/X86BytecodeVisitor.java trunk/core/src/core/org/jnode/vm/x86/compiler/l1a/X86GCMapIterator.java trunk/core/src/core/org/jnode/vm/x86/compiler/l1a/X86Level1ACompiler.java trunk/core/src/core/org/jnode/vm/x86/compiler/l1a/X86RegisterPool.java trunk/core/src/core/org/jnode/vm/x86/compiler/l1a/X86StackFrame.java trunk/core/src/core/org/jnode/vm/x86/compiler/l1b/DoubleItem.java trunk/core/src/core/org/jnode/vm/x86/compiler/l1b/DoubleWordItem.java trunk/core/src/core/org/jnode/vm/x86/compiler/l1b/EmitterContext.java trunk/core/src/core/org/jnode/vm/x86/compiler/l1b/FPCompiler.java trunk/core/src/core/org/jnode/vm/x86/compiler/l1b/FPCompilerFPU.java trunk/core/src/core/org/jnode/vm/x86/compiler/l1b/FPCompilerSSE.java trunk/core/src/core/org/jnode/vm/x86/compiler/l1b/FPUHelper.java trunk/core/src/core/org/jnode/vm/x86/compiler/l1b/FPUStack.java trunk/core/src/core/org/jnode/vm/x86/compiler/l1b/FloatItem.java trunk/core/src/core/org/jnode/vm/x86/compiler/l1b/InlinedMethodInfo.java trunk/core/src/core/org/jnode/vm/x86/compiler/l1b/IntItem.java trunk/core/src/core/org/jnode/vm/x86/compiler/l1b/Item.java trunk/core/src/core/org/jnode/vm/x86/compiler/l1b/ItemFactory.java trunk/core/src/core/org/jnode/vm/x86/compiler/l1b/ItemStack.java trunk/core/src/core/org/jnode/vm/x86/compiler/l1b/ItemVisitor.java trunk/core/src/core/org/jnode/vm/x86/compiler/l1b/L1AHelper.java trunk/core/src/core/org/jnode/vm/x86/compiler/l1b/LongItem.java trunk/core/src/core/org/jnode/vm/x86/compiler/l1b/MagicHelper.java trunk/core/src/core/org/jnode/vm/x86/compiler/l1b/RefItem.java trunk/core/src/core/org/jnode/vm/x86/compiler/l1b/RegisterVisitor.java trunk/core/src/core/org/jnode/vm/x86/compiler/l1b/VirtualStack.java trunk/core/src/core/org/jnode/vm/x86/compiler/l1b/WordItem.java trunk/core/src/core/org/jnode/vm/x86/compiler/l1b/X86BytecodeVisitor.java trunk/core/src/core/org/jnode/vm/x86/compiler/l1b/X86GCMapIterator.java trunk/core/src/core/org/jnode/vm/x86/compiler/l1b/X86Level1BCompiler.java trunk/core/src/core/org/jnode/vm/x86/compiler/l1b/X86RegisterPool.java trunk/core/src/core/org/jnode/vm/x86/compiler/l1b/X86StackFrame.java trunk/core/src/core/org/jnode/vm/x86/compiler/l2/GenericX86CodeGenerator.java trunk/core/src/core/org/jnode/vm/x86/compiler/l2/X86CodeGenerator.java trunk/core/src/core/org/jnode/vm/x86/compiler/l2/X86RegisterPool.java trunk/core/src/core/org/jnode/vm/x86/compiler/stub/EmptyGCMapIterator.java trunk/core/src/core/org/jnode/vm/x86/compiler/stub/X86StubCompiler.java trunk/core/src/core/org/jnode/vm/x86/performance/Athlon64PerformanceCounters.java trunk/core/src/core/org/jnode/vm/x86/performance/DualMSRPerformanceCounters.java trunk/core/src/core/org/jnode/vm/x86/performance/P4FamilyPerformanceCounters.java trunk/core/src/core/org/jnode/vm/x86/performance/P6PerformanceCouters.java trunk/core/src/core/org/jnode/vm/x86/performance/Pentium4PerformanceCounters.java trunk/core/src/core/org/jnode/vm/x86/performance/X86PerformanceCounters.java trunk/core/src/core/org/jnode/work/Work.java trunk/core/src/core/org/jnode/work/WorkManager.java trunk/core/src/core/org/jnode/work/WorkPlugin.java trunk/core/src/core/org/jnode/work/WorkUtils.java trunk/core/src/driver/org/jnode/driver/AbstractDeviceManager.java trunk/core/src/driver/org/jnode/driver/ApiNotFoundException.java trunk/core/src/driver/org/jnode/driver/Bus.java trunk/core/src/driver/org/jnode/driver/DefaultDeviceManager.java trunk/core/src/driver/org/jnode/driver/Device.java trunk/core/src/driver/org/jnode/driver/DeviceAPI.java trunk/core/src/driver/org/jnode/driver/DeviceAlreadyConnectedException.java trunk/core/src/driver/org/jnode/driver/DeviceAlreadyRegisteredException.java trunk/core/src/driver/org/jnode/driver/DeviceException.java trunk/core/src/driver/org/jnode/driver/DeviceFinder.java trunk/core/src/driver/org/jnode/driver/DeviceFinderPlugin.java trunk/core/src/driver/org/jnode/driver/DeviceInfoAPI.java trunk/core/src/driver/org/jnode/driver/DeviceListener.java trunk/core/src/driver/org/jnode/driver/DeviceManager.java trunk/core/src/driver/org/jnode/driver/DeviceManagerListener.java trunk/core/src/driver/org/jnode/driver/DeviceNotFoundException.java trunk/core/src/driver/org/jnode/driver/DeviceToDriverMapper.java trunk/core/src/driver/org/jnode/driver/DeviceUtils.java trunk/core/src/driver/org/jnode/driver/Driver.java trunk/core/src/driver/org/jnode/driver/DriverException.java trunk/core/src/driver/org/jnode/driver/DriverPermission.java trunk/core/src/driver/org/jnode/driver/DriverPlugin.java trunk/core/src/driver/org/jnode/driver/InvalidDriverException.java trunk/core/src/driver/org/jnode/driver/RemovableDeviceAPI.java trunk/core/src/driver/org/jnode/driver/bus/firewire/FireWireBus.java trunk/core/src/driver/org/jnode/driver/bus/firewire/FireWireDevice.java trunk/core/src/driver/org/jnode/driver/bus/firewire/FireWireDriver.java trunk/core/src/driver/org/jnode/driver/bus/pci/AGPCapability.java trunk/core/src/driver/org/jnode/driver/bus/pci/AbstractPCIDeviceToDriverMapper.java trunk/core/src/driver/org/jnode/driver/bus/pci/Capability.java trunk/core/src/driver/org/jnode/driver/bus/pci/CompactHotSwapCapability.java trunk/core/src/driver/org/jnode/driver/bus/pci/DeviceDescriptor.java trunk/core/src/driver/org/jnode/driver/bus/pci/MSICapability.java trunk/core/src/driver/org/jnode/driver/bus/pci/PCIBaseAddress.java trunk/core/src/driver/org/jnode/driver/bus/pci/PCIBus.java trunk/core/src/driver/org/jnode/driver/bus/pci/PCIBusAPI.java trunk/core/src/driver/org/jnode/driver/bus/pci/PCIClassToDriverMapper.java trunk/core/src/driver/org/jnode/driver/bus/pci/PCIConstants.java trunk/core/src/driver/org/jnode/driver/bus/pci/PCIDescriptors.java trunk/core/src/driver/org/jnode/driver/bus/pci/PCIDevice.java trunk/core/src/driver/org/jnode/driver/bus/pci/PCIDeviceConfig.java trunk/core/src/driver/org/jnode/driver/bus/pci/PCIDeviceToDriverMapper.java trunk/core/src/driver/org/jnode/driver/bus/pci/PCIDriver.java trunk/core/src/driver/org/jnode/driver/bus/pci/PCIException.java trunk/core/src/driver/org/jnode/driver/bus/pci/PCIFinder.java trunk/core/src/driver/org/jnode/driver/bus/pci/PCIHeaderType0.java trunk/core/src/driver/org/jnode/driver/bus/pci/PCIHeaderType1.java trunk/core/src/driver/org/jnode/driver/bus/pci/PCIHeaderType2.java trunk/core/src/driver/org/jnode/driver/bus/pci/PCIRomAddress.java trunk/core/src/driver/org/jnode/driver/bus/pci/PCI_IDs.java trunk/core/src/driver/org/jnode/driver/bus/pci/PMCapability.java trunk/core/src/driver/org/jnode/driver/bus/pci/SlotIDCapability.java trunk/core/src/driver/org/jnode/driver/bus/pci/VPDCapability.java trunk/core/src/driver/org/jnode/driver/bus/pci/VendorDescriptor.java trunk/core/src/driver/org/jnode/driver/bus/pcmcia/CardBusBus.java trunk/core/src/driver/org/jnode/driver/bus/pcmcia/CardBusDevice.java trunk/core/src/driver/org/jnode/driver/bus/pcmcia/CardBusDriver.java trunk/core/src/driver/org/jnode/driver/bus/smbus/DIMM.java trunk/core/src/driver/org/jnode/driver/bus/smbus/DIMMDriver.java trunk/core/src/driver/org/jnode/driver/bus/smbus/SMBus.java trunk/core/src/driver/org/jnode/driver/bus/smbus/SMBusControler.java trunk/core/src/driver/org/jnode/driver/bus/smbus/SMBusDevice.java trunk/core/src/driver/org/jnode/driver/bus/usb/AbstractDescriptor.java trunk/core/src/driver/org/jnode/driver/bus/usb/AbstractDeviceItem.java trunk/core/src/driver/org/jnode/driver/bus/usb/AbstractHostControllerDriver.java trunk/core/src/driver/org/jnode/driver/bus/usb/ConfigurationDescriptor.java trunk/core/src/driver/org/jnode/driver/bus/usb/DeviceDescriptor.java trunk/core/src/driver/org/jnode/driver/bus/usb/EndPointDescriptor.java trunk/core/src/driver/org/jnode/driver/bus/usb/InterfaceDescriptor.java trunk/core/src/driver/org/jnode/driver/bus/usb/SetupPacket.java trunk/core/src/driver/org/jnode/driver/bus/usb/StringDescriptor.java trunk/core/src/driver/org/jnode/driver/bus/usb/StringDescriptorZero.java trunk/core/src/driver/org/jnode/driver/bus/usb/USBBus.java trunk/core/src/driver/org/jnode/driver/bus/usb/USBConfiguration.java trunk/core/src/driver/org/jnode/driver/bus/usb/USBConstants.java trunk/core/src/driver/org/jnode/driver/bus/usb/USBControlPipe.java trunk/core/src/driver/org/jnode/driver/bus/usb/USBDataPipe.java trunk/core/src/driver/org/jnode/driver/bus/usb/USBDevice.java trunk/core/src/driver/org/jnode/driver/bus/usb/USBEndPoint.java trunk/core/src/driver/org/jnode/driver/bus/usb/USBException.java trunk/core/src/driver/org/jnode/driver/bus/usb/USBHostControllerAPI.java trunk/core/src/driver/org/jnode/driver/bus/usb/USBHubAPI.java trunk/core/src/driver/org/jnode/driver/bus/usb/USBHubMonitor.java trunk/core/src/driver/org/jnode/driver/bus/usb/USBInterface.java trunk/core/src/driver/org/jnode/driver/bus/usb/USBPacket.java trunk/core/src/driver/org/jnode/driver/bus/usb/USBPipe.java trunk/core/src/driver/org/jnode/driver/bus/usb/USBPipeListener.java trunk/core/src/driver/org/jnode/driver/bus/usb/USBRequest.java trunk/core/src/driver/org/jnode/driver/bus/usb/hub/HubDescriptor.java trunk/core/src/driver/org/jnode/driver/bus/usb/hub/PortStatus.java trunk/core/src/driver/org/jnode/driver/bus/usb/hub/USBHubConstants.java trunk/core/src/driver/org/jnode/driver/bus/usb/hub/USBHubDeviceToDriverMapper.java trunk/core/src/driver/org/jnode/driver/bus/usb/hub/USBHubDriver.java trunk/core/src/driver/org/jnode/driver/bus/usb/spi/AbstractUSBControlRequest.java trunk/core/src/driver/org/jnode/driver/bus/usb/spi/AbstractUSBDataRequest.java trunk/core/src/driver/org/jnode/driver/bus/usb/spi/AbstractUSBRequest.java trunk/core/src/driver/org/jnode/driver/bus/usb/uhci/AbstractStructure.java trunk/core/src/driver/org/jnode/driver/bus/usb/uhci/AbstractTreeStructure.java trunk/core/src/driver/org/jnode/driver/bus/usb/uhci/FrameList.java trunk/core/src/driver/org/jnode/driver/bus/usb/uhci/QueueHead.java trunk/core/src/driver/org/jnode/driver/bus/usb/uhci/Schedule.java trunk/core/src/driver/org/jnode/driver/bus/usb/uhci/TransferDescriptor.java trunk/core/src/driver/org/jnode/driver/bus/usb/uhci/UHCIConstants.java trunk/core/src/driver/org/jnode/driver/bus/usb/uhci/UHCIControlPipe.java trunk/core/src/driver/org/jnode/driver/bus/usb/uhci/UHCIControlRequest.java trunk/core/src/driver/org/jnode/driver/bus/usb/uhci/UHCICore.java trunk/core/src/driver/org/jnode/driver/bus/usb/uhci/UHCIDataPipe.java trunk/core/src/driver/org/jnode/driver/bus/usb/uhci/UHCIDataRequest.java trunk/core/src/driver/org/jnode/driver/bus/usb/uhci/UHCIDriver.java trunk/core/src/driver/org/jnode/driver/bus/usb/uhci/UHCIIO.java trunk/core/src/driver/org/jnode/driver/bus/usb/uhci/UHCIPipe.java trunk/core/src/driver/org/jnode/driver/bus/usb/uhci/UHCIPipeManager.java trunk/core/src/driver/org/jnode/driver/bus/usb/uhci/UHCIRequest.java trunk/core/src/driver/org/jnode/driver/bus/usb/uhci/UHCIRootHub.java trunk/core/src/driver/org/jnode/driver/character/ChannelAlreadyOwnedException.java trunk/core/src/... [truncated message content] |
From: <ga...@us...> - 2012-04-27 06:53:45
|
Revision: 5898 http://jnode.svn.sourceforge.net/jnode/?rev=5898&view=rev Author: galatnm Date: 2012-04-27 06:53:38 +0000 (Fri, 27 Apr 2012) Log Message: ----------- Add basic unit tests for FileSystemManager. Modified Paths: -------------- trunk/JNode.ipr trunk/fs/.classpath Added Paths: ----------- trunk/fs/src/test/org/jnode/fs/service/ trunk/fs/src/test/org/jnode/fs/service/def/ trunk/fs/src/test/org/jnode/fs/service/def/FileSystemManagerTest.java Modified: trunk/JNode.ipr =================================================================== --- trunk/JNode.ipr 2012-04-19 15:52:49 UTC (rev 5897) +++ trunk/JNode.ipr 2012-04-27 06:53:38 UTC (rev 5898) @@ -186,6 +186,7 @@ <component name="CopyrightManager" default=""> <module2copyright /> </component> + <component name="CppTools.Loader" reportImplicitCastToBool="false" reportNameReferencedOnce="false" warnedAboutFileOutOfSourceRoot="true" version="3" compilerSelect="AUTO" /> <component name="DependenciesAnalyzeManager"> <option name="myForwardDirection" value="false" /> </component> @@ -364,6 +365,99 @@ </item> </group> </component> + <component name="ProjectCodeStyleSettingsManager"> + <option name="PER_PROJECT_SETTINGS"> + <value> + <option name="JAVA_INDENT_OPTIONS"> + <value> + <option name="INDENT_SIZE" value="4" /> + <option name="CONTINUATION_INDENT_SIZE" value="4" /> + <option name="TAB_SIZE" value="4" /> + <option name="USE_TAB_CHARACTER" value="false" /> + <option name="SMART_TABS" value="false" /> + <option name="LABEL_INDENT_SIZE" value="-4" /> + <option name="LABEL_INDENT_ABSOLUTE" value="false" /> + <option name="USE_RELATIVE_INDENTS" value="false" /> + </value> + </option> + <option name="CLASS_COUNT_TO_USE_IMPORT_ON_DEMAND" value="100" /> + <option name="NAMES_COUNT_TO_USE_IMPORT_ON_DEMAND" value="100" /> + <option name="PACKAGES_TO_USE_IMPORT_ON_DEMAND"> + <value /> + </option> + <option name="IMPORT_LAYOUT_TABLE"> + <value> + <package name="" withSubpackages="true" static="false" /> + <emptyLine /> + <package name="javax" withSubpackages="false" static="false" /> + <package name="java" withSubpackages="false" static="false" /> + <emptyLine /> + <package name="" withSubpackages="true" static="true" /> + </value> + </option> + <option name="CALL_PARAMETERS_WRAP" value="1" /> + <option name="METHOD_PARAMETERS_WRAP" value="1" /> + <option name="THROWS_LIST_WRAP" value="1" /> + <option name="EXTENDS_KEYWORD_WRAP" value="1" /> + <option name="THROWS_KEYWORD_WRAP" value="1" /> + <option name="METHOD_CALL_CHAIN_WRAP" value="1" /> + <option name="BINARY_OPERATION_WRAP" value="1" /> + <option name="TERNARY_OPERATION_WRAP" value="1" /> + <option name="ARRAY_INITIALIZER_WRAP" value="1" /> + <option name="ASSIGNMENT_WRAP" value="1" /> + <XML> + <option name="XML_LEGACY_SETTINGS_IMPORTED" value="true" /> + </XML> + <ADDITIONAL_INDENT_OPTIONS fileType="gsp"> + <option name="INDENT_SIZE" value="2" /> + </ADDITIONAL_INDENT_OPTIONS> + <ADDITIONAL_INDENT_OPTIONS fileType="scala"> + <option name="INDENT_SIZE" value="2" /> + <option name="TAB_SIZE" value="2" /> + </ADDITIONAL_INDENT_OPTIONS> + <ADDITIONAL_INDENT_OPTIONS fileType="sql"> + <option name="INDENT_SIZE" value="2" /> + </ADDITIONAL_INDENT_OPTIONS> + <ADDITIONAL_INDENT_OPTIONS fileType="yml"> + <option name="INDENT_SIZE" value="2" /> + </ADDITIONAL_INDENT_OPTIONS> + <codeStyleSettings language="Groovy"> + <option name="CALL_PARAMETERS_WRAP" value="1" /> + <option name="METHOD_PARAMETERS_WRAP" value="1" /> + <option name="THROWS_LIST_WRAP" value="1" /> + <option name="EXTENDS_KEYWORD_WRAP" value="1" /> + <option name="THROWS_KEYWORD_WRAP" value="1" /> + <option name="METHOD_CALL_CHAIN_WRAP" value="1" /> + <option name="BINARY_OPERATION_WRAP" value="1" /> + <option name="TERNARY_OPERATION_WRAP" value="1" /> + <option name="ARRAY_INITIALIZER_WRAP" value="1" /> + <option name="ASSIGNMENT_WRAP" value="1" /> + <option name="PARENT_SETTINGS_INSTALLED" value="true" /> + <indentOptions> + <option name="INDENT_SIZE" value="2" /> + </indentOptions> + </codeStyleSettings> + <codeStyleSettings language="JAVA"> + <option name="CALL_PARAMETERS_WRAP" value="1" /> + <option name="METHOD_PARAMETERS_WRAP" value="1" /> + <option name="THROWS_LIST_WRAP" value="1" /> + <option name="EXTENDS_KEYWORD_WRAP" value="1" /> + <option name="THROWS_KEYWORD_WRAP" value="1" /> + <option name="METHOD_CALL_CHAIN_WRAP" value="1" /> + <option name="BINARY_OPERATION_WRAP" value="1" /> + <option name="TERNARY_OPERATION_WRAP" value="1" /> + <option name="ARRAY_INITIALIZER_WRAP" value="1" /> + <option name="ASSIGNMENT_WRAP" value="1" /> + <option name="PARENT_SETTINGS_INSTALLED" value="true" /> + <indentOptions> + <option name="CONTINUATION_INDENT_SIZE" value="4" /> + <option name="LABEL_INDENT_SIZE" value="-4" /> + </indentOptions> + </codeStyleSettings> + </value> + </option> + <option name="USE_PER_PROJECT_SETTINGS" value="true" /> + </component> <component name="ProjectDetails"> <option name="projectName" value="JNode" /> </component> @@ -389,7 +483,7 @@ <component name="ProjectResources"> <default-html-doctype>http://www.w3.org/1999/xhtml</default-html-doctype> </component> - <component name="ProjectRootManager" version="2" languageLevel="JDK_1_6" assert-keyword="true" jdk-15="true" project-jdk-name="1.6 - jnode" project-jdk-type="JavaSDK" /> + <component name="ProjectRootManager" version="2" languageLevel="JDK_1_6" assert-keyword="true" jdk-15="true" project-jdk-name="1.6" project-jdk-type="JavaSDK" /> <component name="ResourceManagerContainer"> <option name="myResourceBundles"> <value> @@ -403,20 +497,6 @@ <entry key="$PROJECT_DIR$"> <value> <SvnBranchConfiguration> - <option name="branchMap"> - <map> - <entry key="https://jnode.svn.sourceforge.net/svnroot/jnode/branches"> - <value> - <list /> - </value> - </entry> - <entry key="https://jnode.svn.sourceforge.net/svnroot/jnode/tags"> - <value> - <list /> - </value> - </entry> - </map> - </option> <option name="branchUrls"> <list> <option value="https://jnode.svn.sourceforge.net/svnroot/jnode/branches" /> @@ -430,25 +510,6 @@ <entry key="$PROJECT_DIR$/distr"> <value> <SvnBranchConfiguration> - <option name="branchMap"> - <map> - <entry key="https://jnode.svn.sourceforge.net/svnroot/jnode/branches"> - <value> - <list /> - </value> - </entry> - <entry key="https://jnode.svn.sourceforge.net/svnroot/jnode/classlib6"> - <value> - <list /> - </value> - </entry> - <entry key="https://jnode.svn.sourceforge.net/svnroot/jnode/tags"> - <value> - <list /> - </value> - </entry> - </map> - </option> <option name="branchUrls"> <list> <option value="https://jnode.svn.sourceforge.net/svnroot/jnode/branches" /> @@ -463,25 +524,6 @@ <entry key="$PROJECT_DIR$/gui"> <value> <SvnBranchConfiguration> - <option name="branchMap"> - <map> - <entry key="https://jnode.svn.sourceforge.net/svnroot/jnode/branches"> - <value> - <list /> - </value> - </entry> - <entry key="https://jnode.svn.sourceforge.net/svnroot/jnode/classlib6"> - <value> - <list /> - </value> - </entry> - <entry key="https://jnode.svn.sourceforge.net/svnroot/jnode/tags"> - <value> - <list /> - </value> - </entry> - </map> - </option> <option name="branchUrls"> <list> <option value="https://jnode.svn.sourceforge.net/svnroot/jnode/branches" /> @@ -496,25 +538,6 @@ <entry key="$PROJECT_DIR$/net"> <value> <SvnBranchConfiguration> - <option name="branchMap"> - <map> - <entry key="https://jnode.svn.sourceforge.net/svnroot/jnode/branches"> - <value> - <list /> - </value> - </entry> - <entry key="https://jnode.svn.sourceforge.net/svnroot/jnode/classlib6"> - <value> - <list /> - </value> - </entry> - <entry key="https://jnode.svn.sourceforge.net/svnroot/jnode/tags"> - <value> - <list /> - </value> - </entry> - </map> - </option> <option name="branchUrls"> <list> <option value="https://jnode.svn.sourceforge.net/svnroot/jnode/branches" /> Modified: trunk/fs/.classpath =================================================================== --- trunk/fs/.classpath 2012-04-19 15:52:49 UTC (rev 5897) +++ trunk/fs/.classpath 2012-04-27 06:53:38 UTC (rev 5898) @@ -17,5 +17,6 @@ <classpathentry kind="lib" path="/core/lib/log4j-1.2.8.jar"/> <classpathentry kind="lib" path="/core/lib/junit-4.5.jar"/> <classpathentry kind="lib" path="/all/lib/classlib.jar" sourcepath="/all/lib/classlib-src.jar"/> + <classpathentry kind="lib" path="/core/lib/mockito-all-1.8.5.jar"/> <classpathentry kind="output" path="build/classes"/> </classpath> Added: trunk/fs/src/test/org/jnode/fs/service/def/FileSystemManagerTest.java =================================================================== --- trunk/fs/src/test/org/jnode/fs/service/def/FileSystemManagerTest.java (rev 0) +++ trunk/fs/src/test/org/jnode/fs/service/def/FileSystemManagerTest.java 2012-04-27 06:53:38 UTC (rev 5898) @@ -0,0 +1,58 @@ +package org.jnode.fs.service.def; + +import static junit.framework.Assert.assertEquals; +import static junit.framework.Assert.assertNotNull; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.when; + +import java.util.Collection; + +import org.jnode.driver.Device; +import org.jnode.fs.FileSystem; +import org.junit.Before; +import org.junit.Test; + +public class FileSystemManagerTest { + + private FileSystemManager fsm; + private FileSystem<?> fs; + private Device device; + + @Before + public void setUp() throws Exception { + fsm = new FileSystemManager(); + device = mock(Device.class); + fs = mock(FileSystem.class); + when(fs.getDevice()).thenReturn(device); + } + + @Test + public void testUnregisterFileSystem() throws Exception { + fsm.registerFileSystem(fs); + FileSystem<?> result = fsm.unregisterFileSystem(device); + assertNotNull(result); + } + + @Test + public void testGetFileSystem() throws Exception { + fsm.registerFileSystem(fs); + FileSystem<?> result = fsm.getFileSystem(device); + assertNotNull(result); + } + + @Test + public void testFileSystems() throws Exception { + fsm.registerFileSystem(fs); + Collection<FileSystem<?>> result = fsm.fileSystems(); + assertNotNull(result); + assertEquals(1,result.size()); + + fsm.unregisterFileSystem(device); + + result = fsm.fileSystems(); + assertNotNull(result); + assertEquals(0,result.size()); + } + + +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ga...@us...> - 2012-04-19 15:53:00
|
Revision: 5897 http://jnode.svn.sourceforge.net/jnode/?rev=5897&view=rev Author: galatnm Date: 2012-04-19 15:52:49 +0000 (Thu, 19 Apr 2012) Log Message: ----------- Filesystem code cleanup. Modified Paths: -------------- trunk/fs/src/fs/org/jnode/fs/command/MountCommand.java trunk/fs/src/fs/org/jnode/fs/fat/FatLfnDirectory.java trunk/fs/src/fs/org/jnode/fs/hfsplus/catalog/Catalog.java trunk/fs/src/fs/org/jnode/fs/ntfs/CompressedDataRun.java trunk/fs/src/fs/org/jnode/fs/service/def/FileSystemManager.java trunk/fs/src/fs/org/jnode/fs/service/def/FileSystemPlugin.java Modified: trunk/fs/src/fs/org/jnode/fs/command/MountCommand.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/command/MountCommand.java 2012-04-19 12:57:10 UTC (rev 5896) +++ trunk/fs/src/fs/org/jnode/fs/command/MountCommand.java 2012-04-19 15:52:49 UTC (rev 5897) @@ -23,7 +23,6 @@ import java.io.File; import java.io.PrintWriter; import java.util.Map; - import org.jnode.driver.Device; import org.jnode.driver.block.BlockDeviceAPI; import org.jnode.fs.FileSystem; @@ -68,12 +67,12 @@ if (!argDevice.isSet()) { // List all mounted file systems Map<String, FileSystem<?>> filesystems = fss.getMountPoints(); - for (String mountPoint : filesystems.keySet()) { - FileSystem<?> fs = filesystems.get(mountPoint); + for (Map.Entry<String, FileSystem<?>> stringFileSystemEntry : filesystems.entrySet()) { + FileSystem<?> fs = stringFileSystemEntry.getValue(); Device device = fs.getDevice(); String mode = fs.isReadOnly() ? "ro" : "rw"; String type = fs.getType().getName(); - out.format(fmt_mount, device.getId(), mountPoint, type, mode); + out.format(fmt_mount, device.getId(), stringFileSystemEntry.getKey(), type, mode); } } else { // Get the parameters Modified: trunk/fs/src/fs/org/jnode/fs/fat/FatLfnDirectory.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/fat/FatLfnDirectory.java 2012-04-19 12:57:10 UTC (rev 5896) +++ trunk/fs/src/fs/org/jnode/fs/fat/FatLfnDirectory.java 2012-04-19 15:52:49 UTC (rev 5897) @@ -23,10 +23,10 @@ import java.io.FileNotFoundException; import java.io.IOException; import java.nio.ByteBuffer; +import java.util.Collections; import java.util.HashMap; import java.util.Iterator; import java.util.Vector; - import org.jnode.fs.FSEntry; import org.jnode.fs.ReadOnlyFileSystemException; @@ -171,9 +171,7 @@ for (LfnEntry currentEntry : shortNameIndex.values()) { FatBasicDirEntry[] encoded = currentEntry.compactForm(); - for (int i = 0; i < encoded.length; i++) { - destination.add(encoded[i]); - } + Collections.addAll(destination, encoded); } final int size = destination.size(); Modified: trunk/fs/src/fs/org/jnode/fs/hfsplus/catalog/Catalog.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/hfsplus/catalog/Catalog.java 2012-04-19 12:57:10 UTC (rev 5896) +++ trunk/fs/src/fs/org/jnode/fs/hfsplus/catalog/Catalog.java 2012-04-19 15:52:49 UTC (rev 5897) @@ -22,6 +22,7 @@ import java.io.IOException; import java.nio.ByteBuffer; +import java.util.Collections; import java.util.LinkedList; import java.util.List; import org.apache.log4j.Logger; @@ -273,9 +274,7 @@ List<LeafRecord> lfList = new LinkedList<LeafRecord>(); for (IndexRecord rec : records) { LeafRecord[] lfr = getRecords(parentID, rec.getIndex()); - for (LeafRecord lr : lfr) { - lfList.add(lr); - } + Collections.addAll(lfList, lfr); } return lfList.toArray(new LeafRecord[lfList.size()]); } else if (nd.isLeafNode()) { Modified: trunk/fs/src/fs/org/jnode/fs/ntfs/CompressedDataRun.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/ntfs/CompressedDataRun.java 2012-04-19 12:57:10 UTC (rev 5896) +++ trunk/fs/src/fs/org/jnode/fs/ntfs/CompressedDataRun.java 2012-04-19 15:52:49 UTC (rev 5897) @@ -22,7 +22,6 @@ import java.io.IOException; import java.util.Arrays; - import org.apache.log4j.Logger; import org.jnode.util.LittleEndian; @@ -311,9 +310,7 @@ (realSrcOffset < realDestOffset && realSrcOffset + length > realDestOffset || realDestOffset < realSrcOffset && realDestOffset + length > realSrcOffset)) { - for (int i = 0; i < length; i++) { - destArray[realDestOffset + i] = srcArray[realSrcOffset + i]; - } + System.arraycopy(srcArray, realSrcOffset + 0, destArray, realDestOffset + 0, length); return; } Modified: trunk/fs/src/fs/org/jnode/fs/service/def/FileSystemManager.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/service/def/FileSystemManager.java 2012-04-19 12:57:10 UTC (rev 5896) +++ trunk/fs/src/fs/org/jnode/fs/service/def/FileSystemManager.java 2012-04-19 15:52:49 UTC (rev 5897) @@ -22,9 +22,9 @@ import java.util.ArrayList; import java.util.Collection; +import java.util.Collections; import java.util.HashMap; import java.util.Map; - import org.jnode.driver.Device; import org.jnode.fs.FileSystem; @@ -33,8 +33,9 @@ */ final class FileSystemManager { /** All registed filesystems (device, fs) */ - private final Map<Device, FileSystem<?>> filesystems = new HashMap<Device, FileSystem<?>>(); + private Map<Device, FileSystem<?>> filesystems = Collections.synchronizedMap(new HashMap<Device, FileSystem<?>>()); + /** * Register a mounted filesystem * @@ -42,9 +43,7 @@ */ public void registerFileSystem(FileSystem<?> fs) { final Device device = fs.getDevice(); - synchronized (this) { - filesystems.put(device, fs); - } + filesystems.put(device, fs); } /** @@ -52,7 +51,7 @@ * * @param device */ - public synchronized FileSystem<?> unregisterFileSystem(Device device) { + public FileSystem<?> unregisterFileSystem(Device device) { return filesystems.remove(device); } @@ -62,7 +61,7 @@ * @param device * @return null if no filesystem was found. */ - public synchronized FileSystem<?> getFileSystem(Device device) { + public FileSystem<?> getFileSystem(Device device) { return filesystems.get(device); } @@ -70,7 +69,7 @@ * Gets all registered filesystems. All instances of the returned collection * are instanceof FileSystem. */ - public synchronized Collection<FileSystem<?>> fileSystems() { + public Collection<FileSystem<?>> fileSystems() { return new ArrayList<FileSystem<?>>(filesystems.values()); } } Modified: trunk/fs/src/fs/org/jnode/fs/service/def/FileSystemPlugin.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/service/def/FileSystemPlugin.java 2012-04-19 12:57:10 UTC (rev 5896) +++ trunk/fs/src/fs/org/jnode/fs/service/def/FileSystemPlugin.java 2012-04-19 15:52:49 UTC (rev 5897) @@ -22,17 +22,14 @@ import java.io.IOException; import java.io.VMFile; -import org.jnode.java.io.VMFileSystemAPI; import java.io.VMIOUtils; import java.security.AccessController; import java.security.PrivilegedAction; import java.util.Collection; import java.util.Map; import java.util.TreeMap; - import javax.naming.NameNotFoundException; import javax.naming.NamingException; - import org.apache.log4j.Logger; import org.jnode.driver.Device; import org.jnode.driver.DeviceAlreadyRegisteredException; @@ -42,6 +39,7 @@ import org.jnode.fs.FileSystemException; import org.jnode.fs.FileSystemType; import org.jnode.fs.service.FileSystemService; +import org.jnode.java.io.VMFileSystemAPI; import org.jnode.naming.InitialNaming; import org.jnode.plugin.Plugin; import org.jnode.plugin.PluginDescriptor; @@ -160,9 +158,9 @@ public Map<String, String> getDeviceMountPoints() { Map<String, FileSystem<?>> mounts = api.getMountPoints(); Map<String, String> result = new TreeMap<String, String>(); - for (String path : mounts.keySet()) { - FileSystem<?> fs = (FileSystem<?>) mounts.get(path); - result.put(fs.getDevice().getId(), path); + for (Map.Entry<String, FileSystem<?>> stringFileSystemEntry : mounts.entrySet()) { + FileSystem<?> fs = (FileSystem<?>) stringFileSystemEntry.getValue(); + result.put(fs.getDevice().getId(), stringFileSystemEntry.getKey()); } return result; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ga...@us...> - 2012-04-19 12:57:22
|
Revision: 5896 http://jnode.svn.sourceforge.net/jnode/?rev=5896&view=rev Author: galatnm Date: 2012-04-19 12:57:10 +0000 (Thu, 19 Apr 2012) Log Message: ----------- Network code clean-up. Modified Paths: -------------- trunk/core/src/core/org/jnode/plugin/manager/DefaultPluginManager.java trunk/core/src/core/org/jnode/plugin/model/ConfigurationElementModel.java trunk/core/src/core/org/jnode/plugin/model/ExtensionModel.java trunk/core/src/core/org/jnode/plugin/model/LibraryModel.java trunk/core/src/core/org/jnode/plugin/model/PluginDescriptorModel.java trunk/core/src/core/org/jnode/plugin/model/PluginRegistryModel.java trunk/core/src/core/org/jnode/plugin/model/RuntimeModel.java trunk/core/src/core/org/jnode/vm/VmStackReader.java trunk/core/src/core/org/jnode/vm/bytecode/BasicBlockFinder.java trunk/core/src/core/org/jnode/vm/bytecode/DeadBlockFinder.java trunk/core/src/core/org/jnode/vm/classmgr/ClassDecoder.java trunk/core/src/core/org/jnode/vm/classmgr/SelectorMap.java trunk/core/src/core/org/jnode/vm/classmgr/Signature.java trunk/core/src/core/org/jnode/vm/classmgr/TIBBuilder.java trunk/core/src/core/org/jnode/vm/classmgr/VmAnnotation.java trunk/core/src/core/org/jnode/vm/compiler/ir/IRBasicBlockFinder.java trunk/core/src/core/org/jnode/vm/compiler/ir/IRControlFlowGraph.java trunk/core/src/core/org/jnode/vm/compiler/ir/IRTest.java trunk/core/src/core/org/jnode/vm/compiler/ir/NativeTest.java trunk/core/src/core/org/jnode/vm/facade/VmUtils.java trunk/core/src/core/org/jnode/vm/isolate/VmIsolate.java trunk/core/src/core/org/jnode/vm/x86/VmX86Architecture.java trunk/net/src/net/org/jnode/net/NetworkLayerHeader.java trunk/net/src/net/org/jnode/net/arp/ARPHeader.java trunk/net/src/net/org/jnode/net/ipv4/tcp/TCPHeader.java Modified: trunk/core/src/core/org/jnode/plugin/manager/DefaultPluginManager.java =================================================================== --- trunk/core/src/core/org/jnode/plugin/manager/DefaultPluginManager.java 2012-03-28 14:33:09 UTC (rev 5895) +++ trunk/core/src/core/org/jnode/plugin/manager/DefaultPluginManager.java 2012-04-19 12:57:10 UTC (rev 5896) @@ -21,7 +21,6 @@ package org.jnode.plugin.manager; import gnu.java.security.action.GetPropertyAction; - import java.security.AccessController; import java.util.ArrayList; import java.util.Collections; @@ -32,9 +31,7 @@ import java.util.List; import java.util.Map; import java.util.Set; - import javax.naming.NamingException; - import org.jnode.bootlog.BootLogInstance; import org.jnode.naming.InitialNaming; import org.jnode.permission.JNodePermission; @@ -294,8 +291,7 @@ } } final PluginPrerequisite[] prereq = descr.getPrerequisites(); - for (int i = 0; i < prereq.length; i++) { - final PluginPrerequisite pr = prereq[i]; + for (final PluginPrerequisite pr : prereq) { if (!nameSet.contains(pr.getPluginId())) { //Syslog.debug("Not in set: " + pr.getPluginId()); return false; @@ -312,8 +308,7 @@ */ private boolean prerequisitesExist(PluginDescriptor descr, Map<String, PluginDescriptor> all) { final PluginPrerequisite[] prereq = descr.getPrerequisites(); - for (int i = 0; i < prereq.length; i++) { - final PluginPrerequisite pr = prereq[i]; + for (final PluginPrerequisite pr : prereq) { if (!all.containsKey(pr.getPluginId())) { return false; } Modified: trunk/core/src/core/org/jnode/plugin/model/ConfigurationElementModel.java =================================================================== --- trunk/core/src/core/org/jnode/plugin/model/ConfigurationElementModel.java 2012-03-28 14:33:09 UTC (rev 5895) +++ trunk/core/src/core/org/jnode/plugin/model/ConfigurationElementModel.java 2012-04-19 12:57:10 UTC (rev 5896) @@ -22,7 +22,6 @@ import java.util.ArrayList; import java.util.HashSet; -import java.util.Iterator; import java.util.Set; import org.jnode.nanoxml.XMLElement; import org.jnode.plugin.ConfigurationElement; @@ -64,8 +63,7 @@ } final ArrayList<ConfigurationElementModel> list = new ArrayList<ConfigurationElementModel>(); - for (Iterator<?> i = e.getChildren().iterator(); i.hasNext();) { - final XMLElement ce = (XMLElement) i.next(); + for (final XMLElement ce : e.getChildren()) { list.add(new ConfigurationElementModel(plugin, ce)); } elements = (ConfigurationElement[]) list.toArray(new ConfigurationElement[list.size()]); Modified: trunk/core/src/core/org/jnode/plugin/model/ExtensionModel.java =================================================================== --- trunk/core/src/core/org/jnode/plugin/model/ExtensionModel.java 2012-03-28 14:33:09 UTC (rev 5895) +++ trunk/core/src/core/org/jnode/plugin/model/ExtensionModel.java 2012-04-19 12:57:10 UTC (rev 5896) @@ -21,7 +21,6 @@ package org.jnode.plugin.model; import java.util.ArrayList; -import java.util.Iterator; import org.jnode.nanoxml.XMLElement; import org.jnode.plugin.ConfigurationElement; import org.jnode.plugin.Extension; @@ -49,8 +48,7 @@ id = getAttribute(e, "id", false); final ArrayList<ConfigurationElementModel> list = new ArrayList<ConfigurationElementModel>(); - for (Iterator<?> i = e.getChildren().iterator(); i.hasNext();) { - final XMLElement ce = (XMLElement) i.next(); + for (final XMLElement ce : e.getChildren()) { list.add(new ConfigurationElementModel(plugin, ce)); } elements = (ConfigurationElement[]) list.toArray(new ConfigurationElement[list.size()]); Modified: trunk/core/src/core/org/jnode/plugin/model/LibraryModel.java =================================================================== --- trunk/core/src/core/org/jnode/plugin/model/LibraryModel.java 2012-03-28 14:33:09 UTC (rev 5895) +++ trunk/core/src/core/org/jnode/plugin/model/LibraryModel.java 2012-04-19 12:57:10 UTC (rev 5896) @@ -21,7 +21,6 @@ package org.jnode.plugin.model; import java.util.ArrayList; -import java.util.Iterator; import org.jnode.nanoxml.XMLElement; import org.jnode.plugin.Library; import org.jnode.plugin.PluginException; @@ -44,8 +43,7 @@ type = getAttribute(e, "type", false); final ArrayList<String> list = new ArrayList<String>(); - for (Iterator<?> i = e.getChildren().iterator(); i.hasNext();) { - final XMLElement exE = (XMLElement) i.next(); + for (final XMLElement exE : e.getChildren()) { if (exE.getName().equals("export")) { list.add(getAttribute(exE, "name", true)); } Modified: trunk/core/src/core/org/jnode/plugin/model/PluginDescriptorModel.java =================================================================== --- trunk/core/src/core/org/jnode/plugin/model/PluginDescriptorModel.java 2012-03-28 14:33:09 UTC (rev 5895) +++ trunk/core/src/core/org/jnode/plugin/model/PluginDescriptorModel.java 2012-04-19 12:57:10 UTC (rev 5896) @@ -27,7 +27,6 @@ import java.security.PrivilegedActionException; import java.security.PrivilegedExceptionAction; import java.util.ArrayList; -import java.util.Iterator; import java.util.List; import org.jnode.bootlog.BootLogInstance; import org.jnode.nanoxml.XMLElement; @@ -143,8 +142,7 @@ initializeRequiresList(reqList, e); - for (Iterator<?> ci = e.getChildren().iterator(); ci.hasNext();) { - final XMLElement childE = (XMLElement) ci.next(); + for (final XMLElement childE : e.getChildren()) { final String tag = childE.getName(); if (tag.equals("extension-point")) { final ExtensionPointModel ep = new ExtensionPointModel(this, @@ -154,9 +152,7 @@ // registry.registerExtensionPoint(ep); // } } else if (tag.equals("requires")) { - for (Iterator<?> i = childE.getChildren().iterator(); i - .hasNext();) { - final XMLElement impE = (XMLElement) i.next(); + for (final XMLElement impE : childE.getChildren()) { if (impE.getName().equals("import")) { reqList.add(new PluginPrerequisiteModel(this, impE)); } else { @@ -631,18 +627,18 @@ // BootLogInstance.get().info("Resolve " + id); this.registry = registry; registry.registerPlugin(this); - for (int i = 0; i < extensionPoints.length; i++) { - extensionPoints[i].resolve(registry); + for (ExtensionPointModel extensionPoint : extensionPoints) { + extensionPoint.resolve(registry); } - for (int i = 0; i < requires.length; i++) { - requires[i].resolve(registry); + for (PluginPrerequisiteModel require : requires) { + require.resolve(registry); } if (runtime != null) { runtime.resolve(registry); } resolved = true; - for (int i = 0; i < extensions.length; i++) { - extensions[i].resolve(registry); + for (ExtensionModel extension : extensions) { + extension.resolve(registry); } } } @@ -742,14 +738,14 @@ if (runtime != null) { runtime.unresolve(registry); } - for (int i = 0; i < requires.length; i++) { - requires[i].unresolve(registry); + for (PluginPrerequisiteModel require : requires) { + require.unresolve(registry); } - for (int i = 0; i < extensionPoints.length; i++) { - extensionPoints[i].unresolve(registry); + for (ExtensionPointModel extensionPoint : extensionPoints) { + extensionPoint.unresolve(registry); } - for (int i = 0; i < extensions.length; i++) { - extensions[i].unresolve(registry); + for (ExtensionModel extension : extensions) { + extension.unresolve(registry); } registry.unregisterPlugin(this); resolved = false; Modified: trunk/core/src/core/org/jnode/plugin/model/PluginRegistryModel.java =================================================================== --- trunk/core/src/core/org/jnode/plugin/model/PluginRegistryModel.java 2012-03-28 14:33:09 UTC (rev 5895) +++ trunk/core/src/core/org/jnode/plugin/model/PluginRegistryModel.java 2012-04-19 12:57:10 UTC (rev 5896) @@ -128,9 +128,8 @@ * Resolve all plugin descriptors. */ public void resolveDescriptors() throws PluginException { - for (Iterator<PluginDescriptor> i = descriptorMap.values().iterator(); i.hasNext();) { - final PluginDescriptorModel descr = (PluginDescriptorModel) i - .next(); + for (PluginDescriptor pluginDescriptor : descriptorMap.values()) { + final PluginDescriptorModel descr = (PluginDescriptorModel) pluginDescriptor; descr.resolve(this); } } Modified: trunk/core/src/core/org/jnode/plugin/model/RuntimeModel.java =================================================================== --- trunk/core/src/core/org/jnode/plugin/model/RuntimeModel.java 2012-03-28 14:33:09 UTC (rev 5895) +++ trunk/core/src/core/org/jnode/plugin/model/RuntimeModel.java 2012-04-19 12:57:10 UTC (rev 5896) @@ -21,7 +21,6 @@ package org.jnode.plugin.model; import java.util.ArrayList; -import java.util.Iterator; import org.jnode.nanoxml.XMLElement; import org.jnode.plugin.Library; import org.jnode.plugin.PluginException; @@ -41,8 +40,7 @@ super(plugin); final ArrayList<LibraryModel> list = new ArrayList<LibraryModel>(); - for (Iterator<?> i = e.getChildren().iterator(); i.hasNext();) { - final XMLElement lE = (XMLElement) i.next(); + for (final XMLElement lE : e.getChildren()) { if (lE.getName().equals("library")) { list.add(new LibraryModel(plugin, lE)); } @@ -65,8 +63,8 @@ * @throws PluginException */ protected void resolve(PluginRegistryModel registry) throws PluginException { - for (int i = 0; i < libraries.length; i++) { - libraries[i].resolve(registry); + for (LibraryModel library : libraries) { + library.resolve(registry); } } @@ -76,8 +74,8 @@ * @throws PluginException */ protected void unresolve(PluginRegistryModel registry) throws PluginException { - for (int i = 0; i < libraries.length; i++) { - libraries[i].unresolve(registry); + for (LibraryModel library : libraries) { + library.unresolve(registry); } } } Modified: trunk/core/src/core/org/jnode/vm/VmStackReader.java =================================================================== --- trunk/core/src/core/org/jnode/vm/VmStackReader.java 2012-03-28 14:33:09 UTC (rev 5895) +++ trunk/core/src/core/org/jnode/vm/VmStackReader.java 2012-04-19 12:57:10 UTC (rev 5896) @@ -238,8 +238,8 @@ Unsafe.debug("Debug stacktrace:<no stack trace>\n"); } else { Unsafe.debug("Debug stacktrace: "); - for (int i = 0; i < frames.length; i++) { - final VmStackFrame s = (VmStackFrame) frames[i]; + for (VmStackFrame frame : frames) { + final VmStackFrame s = (VmStackFrame) frame; Unsafe.debug(s.getMethod().getDeclaringClass().getName()); Unsafe.debug("::"); Unsafe.debug(s.getMethod().getName()); Modified: trunk/core/src/core/org/jnode/vm/bytecode/BasicBlockFinder.java =================================================================== --- trunk/core/src/core/org/jnode/vm/bytecode/BasicBlockFinder.java 2012-03-28 14:33:09 UTC (rev 5895) +++ trunk/core/src/core/org/jnode/vm/bytecode/BasicBlockFinder.java 2012-04-19 12:57:10 UTC (rev 5896) @@ -296,9 +296,9 @@ */ public void visit_tableswitch(int defValue, int lowValue, int highValue, int[] addresses) { tstack.pop(JvmType.INT); - for (int i = 0; i < addresses.length; i++) { - addBranch(addresses[i], true); - condYieldPoint(addresses[i]); + for (int address : addresses) { + addBranch(address, true); + condYieldPoint(address); } addBranch(defValue, false); condYieldPoint(defValue); @@ -312,9 +312,9 @@ */ public void visit_lookupswitch(int defValue, int[] matchValues, int[] addresses) { tstack.pop(JvmType.INT); - for (int i = 0; i < addresses.length; i++) { - addBranch(addresses[i], true); - condYieldPoint(addresses[i]); + for (int address : addresses) { + addBranch(address, true); + condYieldPoint(address); } addBranch(defValue, false); condYieldPoint(defValue); Modified: trunk/core/src/core/org/jnode/vm/bytecode/DeadBlockFinder.java =================================================================== --- trunk/core/src/core/org/jnode/vm/bytecode/DeadBlockFinder.java 2012-03-28 14:33:09 UTC (rev 5895) +++ trunk/core/src/core/org/jnode/vm/bytecode/DeadBlockFinder.java 2012-04-19 12:57:10 UTC (rev 5896) @@ -21,7 +21,6 @@ package org.jnode.vm.bytecode; import java.util.TreeMap; - import org.jnode.bootlog.BootLogInstance; import org.jnode.vm.JvmType; import org.jnode.vm.classmgr.VmByteCode; @@ -334,9 +333,9 @@ * @see BytecodeVisitor#visit_tableswitch(int, int, int, int[]) */ public void visit_tableswitch(int defValue, int lowValue, int highValue, int[] addresses) { - for (int i = 0; i < addresses.length; i++) { - addBranch(addresses[i], true); - condYieldPoint(addresses[i]); + for (int address : addresses) { + addBranch(address, true); + condYieldPoint(address); } addBranch(defValue, false); condYieldPoint(defValue); @@ -349,9 +348,9 @@ * @see BytecodeVisitor#visit_lookupswitch(int, int[], int[]) */ public void visit_lookupswitch(int defValue, int[] matchValues, int[] addresses) { - for (int i = 0; i < addresses.length; i++) { - addBranch(addresses[i], true); - condYieldPoint(addresses[i]); + for (int address : addresses) { + addBranch(address, true); + condYieldPoint(address); } addBranch(defValue, false); condYieldPoint(defValue); Modified: trunk/core/src/core/org/jnode/vm/classmgr/ClassDecoder.java =================================================================== --- trunk/core/src/core/org/jnode/vm/classmgr/ClassDecoder.java 2012-03-28 14:33:09 UTC (rev 5895) +++ trunk/core/src/core/org/jnode/vm/classmgr/ClassDecoder.java 2012-04-19 12:57:10 UTC (rev 5896) @@ -1271,9 +1271,9 @@ final int tag = data.get() & 0xFF; switch (tag) { case 'B': - return Byte.valueOf((byte) cp.getInt(data.getChar())); + return (byte) cp.getInt(data.getChar()); case 'C': - return Character.valueOf((char) cp.getInt(data.getChar())); + return (char) cp.getInt(data.getChar()); case 'D': return cp.getDouble(data.getChar()); case 'F': @@ -1283,9 +1283,9 @@ case 'J': return cp.getLong(data.getChar()); case 'S': - return Short.valueOf((short) cp.getInt(data.getChar())); + return (short) cp.getInt(data.getChar()); case 'Z': - return Boolean.valueOf(cp.getInt(data.getChar()) != 0); + return cp.getInt(data.getChar()) != 0; case 's': return cp.getAny(data.getChar()); case 'e': // enum Modified: trunk/core/src/core/org/jnode/vm/classmgr/SelectorMap.java =================================================================== --- trunk/core/src/core/org/jnode/vm/classmgr/SelectorMap.java 2012-03-28 14:33:09 UTC (rev 5895) +++ trunk/core/src/core/org/jnode/vm/classmgr/SelectorMap.java 2012-04-19 12:57:10 UTC (rev 5896) @@ -46,7 +46,7 @@ final String id = InternString.internString(name + '#' + signature); final Integer selector = (Integer) map.get(id); if (selector != null) { - return selector.intValue(); + return selector; } else { return getNew(id); } @@ -62,7 +62,7 @@ private synchronized int getNew(String id) { Integer selector = (Integer) map.get(id); if (selector != null) { - return selector.intValue(); + return selector; } else { final int sel = ++lastSelector; map.put(id, sel); Modified: trunk/core/src/core/org/jnode/vm/classmgr/Signature.java =================================================================== --- trunk/core/src/core/org/jnode/vm/classmgr/Signature.java 2012-03-28 14:33:09 UTC (rev 5895) +++ trunk/core/src/core/org/jnode/vm/classmgr/Signature.java 2012-04-19 12:57:10 UTC (rev 5896) @@ -330,8 +330,8 @@ StringBuilder b = new StringBuilder(); b.append('('); if (argTypes != null) { - for (int i = 0; i < argTypes.length; i++) { - b.append(toSignature(argTypes[i])); + for (Class argType : argTypes) { + b.append(toSignature(argType)); } } b.append(')'); @@ -393,8 +393,8 @@ StringBuilder b = new StringBuilder(); b.append('('); if (argTypes != null) { - for (int i = 0; i < argTypes.length; i++) { - b.append(toSignature(argTypes[i])); + for (VmType argType : argTypes) { + b.append(toSignature(argType)); } } b.append(')'); Modified: trunk/core/src/core/org/jnode/vm/classmgr/TIBBuilder.java =================================================================== --- trunk/core/src/core/org/jnode/vm/classmgr/TIBBuilder.java 2012-03-28 14:33:09 UTC (rev 5895) +++ trunk/core/src/core/org/jnode/vm/classmgr/TIBBuilder.java 2012-04-19 12:57:10 UTC (rev 5896) @@ -20,9 +20,9 @@ package org.jnode.vm.classmgr; +import gnu.java.lang.VMClassHelper; import java.util.ArrayList; import java.util.HashMap; -import gnu.java.lang.VMClassHelper; /** * @author epr @@ -137,7 +137,7 @@ // skip index 0 final Object idx = nameSignature2Index.get(getNameSignature(name, signature)); if (idx != null) { - return ((Integer) idx).intValue(); + return (Integer) idx; } else { return -1; } Modified: trunk/core/src/core/org/jnode/vm/classmgr/VmAnnotation.java =================================================================== --- trunk/core/src/core/org/jnode/vm/classmgr/VmAnnotation.java 2012-03-28 14:33:09 UTC (rev 5895) +++ trunk/core/src/core/org/jnode/vm/classmgr/VmAnnotation.java 2012-04-19 12:57:10 UTC (rev 5896) @@ -27,9 +27,7 @@ import java.util.HashMap; import java.util.Map; import java.util.Set; - import org.jnode.vm.objects.VmSystemObject; - import sun.reflect.annotation.AnnotationParser; /** @@ -114,8 +112,8 @@ } - for (int i = 0; i < values.length; i++) { - vmap.put(values[i].name, values[i].value); + for (ElementValue value1 : values) { + vmap.put(value1.name, value1.value); } Set<Map.Entry> set = vmap.entrySet(); Modified: trunk/core/src/core/org/jnode/vm/compiler/ir/IRBasicBlockFinder.java =================================================================== --- trunk/core/src/core/org/jnode/vm/compiler/ir/IRBasicBlockFinder.java 2012-03-28 14:33:09 UTC (rev 5895) +++ trunk/core/src/core/org/jnode/vm/compiler/ir/IRBasicBlockFinder.java 2012-04-19 12:57:10 UTC (rev 5896) @@ -25,7 +25,6 @@ import java.util.Comparator; import java.util.HashMap; import java.util.Map; - import org.jnode.vm.bytecode.BytecodeFlags; import org.jnode.vm.bytecode.BytecodeVisitorSupport; import org.jnode.vm.classmgr.VmByteCode; @@ -212,18 +211,18 @@ } public void visit_tableswitch(int defValue, int lowValue, int highValue, int[] addresses) { - for (int i = 0; i < addresses.length; i++) { + for (int address : addresses) { // Next block could be successor, e.g. switch could fall through - addBranch(addresses[i], CONDITIONAL_BRANCH); + addBranch(address, CONDITIONAL_BRANCH); } // Same for default case addBranch(defValue, CONDITIONAL_BRANCH); } public void visit_lookupswitch(int defValue, int[] matchValues, int[] addresses) { - for (int i = 0; i < addresses.length; i++) { + for (int address : addresses) { // Next block could be successor, e.g. switch could fall through - addBranch(addresses[i], CONDITIONAL_BRANCH); + addBranch(address, CONDITIONAL_BRANCH); } // Same for default case addBranch(defValue, CONDITIONAL_BRANCH); @@ -278,7 +277,7 @@ private final void addBranch(int target, byte flags) { IRBasicBlock pred = this.currentBlock; IRBasicBlock succ = startBB(target); - branchTargets.put(new Integer(getInstructionAddress()), new Integer(target)); + branchTargets.put(getInstructionAddress(), target); endBB(flags); } Modified: trunk/core/src/core/org/jnode/vm/compiler/ir/IRControlFlowGraph.java =================================================================== --- trunk/core/src/core/org/jnode/vm/compiler/ir/IRControlFlowGraph.java 2012-03-28 14:33:09 UTC (rev 5895) +++ trunk/core/src/core/org/jnode/vm/compiler/ir/IRControlFlowGraph.java 2012-04-19 12:57:10 UTC (rev 5896) @@ -250,8 +250,7 @@ public void deconstrucSSA() { final List<PhiAssignQuad<T>> phiQuads = new BootableArrayList<PhiAssignQuad<T>>(); - for (int i = 0; i < bblocks.length; i += 1) { - IRBasicBlock<T> b = bblocks[i]; + for (IRBasicBlock<T> b : bblocks) { for (Quad<T> q : b.getQuads()) { if (q instanceof PhiAssignQuad) { phiQuads.add((PhiAssignQuad<T>) q); @@ -261,8 +260,7 @@ } } int n = phiQuads.size(); - for (int i = 0; i < n; i += 1) { - PhiAssignQuad<T> paq = phiQuads.get(i); + for (PhiAssignQuad<T> paq : phiQuads) { Variable<T> lhs = paq.getLHS(); IRBasicBlock<T> firstBlock = null; VariableRefAssignQuad<T> firstPhiMove = null; @@ -411,9 +409,9 @@ sb.append(bb.toString()); sb.append(":\n predecessors:"); final List<IRBasicBlock<T>> pred = bb.getPredecessors(); - for (int i = 0; i < pred.size(); i += 1) { + for (IRBasicBlock<T> aPred : pred) { sb.append("\n "); - sb.append(pred.get(i).toString()); + sb.append(aPred.toString()); } sb.append("\n successors:"); for (IRBasicBlock<T> succ : bb.getSuccessors()) { Modified: trunk/core/src/core/org/jnode/vm/compiler/ir/IRTest.java =================================================================== --- trunk/core/src/core/org/jnode/vm/compiler/ir/IRTest.java 2012-03-28 14:33:09 UTC (rev 5895) +++ trunk/core/src/core/org/jnode/vm/compiler/ir/IRTest.java 2012-04-19 12:57:10 UTC (rev 5896) @@ -27,7 +27,6 @@ import java.net.MalformedURLException; import java.util.Collection; import java.util.Map; - import org.jnode.assembler.x86.X86Assembler; import org.jnode.assembler.x86.X86BinaryAssembler; import org.jnode.assembler.x86.X86Constants; @@ -263,8 +262,8 @@ System.out.print(" "); Variable[] vars = quad.getBasicBlock().getVariables(); System.out.print("["); - for (int j = 0; j < vars.length; j += 1) { - System.out.print(vars[j]); + for (Variable var : vars) { + System.out.print(var); System.out.print(","); } System.out.print("] "); Modified: trunk/core/src/core/org/jnode/vm/compiler/ir/NativeTest.java =================================================================== --- trunk/core/src/core/org/jnode/vm/compiler/ir/NativeTest.java 2012-03-28 14:33:09 UTC (rev 5895) +++ trunk/core/src/core/org/jnode/vm/compiler/ir/NativeTest.java 2012-04-19 12:57:10 UTC (rev 5896) @@ -243,8 +243,8 @@ System.out.print(" "); Variable[] vars = quad.getBasicBlock().getVariables(); System.out.print("["); - for (int j = 0; j < vars.length; j += 1) { - System.out.print(vars[j]); + for (Variable var : vars) { + System.out.print(var); System.out.print(","); } System.out.print("] "); Modified: trunk/core/src/core/org/jnode/vm/facade/VmUtils.java =================================================================== --- trunk/core/src/core/org/jnode/vm/facade/VmUtils.java 2012-03-28 14:33:09 UTC (rev 5895) +++ trunk/core/src/core/org/jnode/vm/facade/VmUtils.java 2012-04-19 12:57:10 UTC (rev 5896) @@ -21,9 +21,7 @@ package org.jnode.vm.facade; import gnu.java.lang.VMClassHelper; - import java.io.PrintWriter; - import org.jnode.annotation.Inline; import org.jnode.annotation.KernelSpace; import org.jnode.annotation.NoInline; @@ -69,7 +67,7 @@ allowNatives |= className.equals("org.jnode.vm." + architectureName + ".Unsafe" + architectureName.toUpperCase()); */ - allowNatives |= className.indexOf("org.jnode.vm.") > -1 && className.indexOf(".Unsafe") > -1; + allowNatives |= className.contains("org.jnode.vm.") && className.contains(".Unsafe"); return allowNatives; } @@ -188,8 +186,8 @@ */ public static void dumpStatistics(PrintWriter out) { final Statistic[] stats = VM_INSTANCE.getStatistics(); - for (int i = 0; i < stats.length; i++) { - out.println(stats[i]); + for (Statistic stat : stats) { + out.println(stat); } } @@ -198,8 +196,7 @@ */ public static void resetCounters() { final Statistic[] stats = VM_INSTANCE.getStatistics(); - for (int i = 0; i < stats.length; i++) { - final Statistic s = stats[i]; + for (final Statistic s : stats) { if (s instanceof Counter) { ((Counter) s).reset(); } Modified: trunk/core/src/core/org/jnode/vm/isolate/VmIsolate.java =================================================================== --- trunk/core/src/core/org/jnode/vm/isolate/VmIsolate.java 2012-03-28 14:33:09 UTC (rev 5895) +++ trunk/core/src/core/org/jnode/vm/isolate/VmIsolate.java 2012-04-19 12:57:10 UTC (rev 5896) @@ -508,7 +508,7 @@ this.exitCode = status; } - if (vmThread.getName().indexOf("-AWT-stopper") > -1) { + if (vmThread.getName().contains("-AWT-stopper")) { doExit(); } else { disposeAppContext(true); @@ -1008,8 +1008,7 @@ StackTraceElement[] trace = ex.getStackTrace(); if (trace != null) { Unsafe.debug("getStackTrace() != null\n"); - for (int i = 0; i < trace.length; i++) { - StackTraceElement element = trace[i]; + for (StackTraceElement element : trace) { Unsafe.debug(element.getClassName()); Unsafe.debug('#'); Unsafe.debug(element.getMethodName()); Modified: trunk/core/src/core/org/jnode/vm/x86/VmX86Architecture.java =================================================================== --- trunk/core/src/core/org/jnode/vm/x86/VmX86Architecture.java 2012-03-28 14:33:09 UTC (rev 5895) +++ trunk/core/src/core/org/jnode/vm/x86/VmX86Architecture.java 2012-04-19 12:57:10 UTC (rev 5896) @@ -22,7 +22,6 @@ import java.nio.ByteOrder; import java.util.HashMap; - import org.jnode.annotation.Internal; import org.jnode.annotation.MagicPermission; import org.jnode.assembler.x86.X86Constants; @@ -30,8 +29,8 @@ import org.jnode.system.resource.ResourceManager; import org.jnode.system.resource.ResourceNotFreeException; import org.jnode.system.resource.ResourceOwner; -import org.jnode.vm.Unsafe; import org.jnode.vm.BaseVmArchitecture; +import org.jnode.vm.Unsafe; import org.jnode.vm.VmMagic; import org.jnode.vm.VmMultiMediaSupport; import org.jnode.vm.VmSystem; @@ -247,7 +246,7 @@ bootCpu.setBootProcessor(true); final String cmdLine = VmSystem.getCmdLine(); - if (cmdLine.indexOf("mp=no") >= 0) { + if (cmdLine.contains("mp=no")) { return; } // Modified: trunk/net/src/net/org/jnode/net/NetworkLayerHeader.java =================================================================== --- trunk/net/src/net/org/jnode/net/NetworkLayerHeader.java 2012-03-28 14:33:09 UTC (rev 5895) +++ trunk/net/src/net/org/jnode/net/NetworkLayerHeader.java 2012-04-19 12:57:10 UTC (rev 5896) @@ -37,4 +37,6 @@ * Gets the source address of the packet described in this header */ public ProtocolAddress getDestinationAddress(); + + public int getDataLength(); } Modified: trunk/net/src/net/org/jnode/net/arp/ARPHeader.java =================================================================== --- trunk/net/src/net/org/jnode/net/arp/ARPHeader.java 2012-03-28 14:33:09 UTC (rev 5895) +++ trunk/net/src/net/org/jnode/net/arp/ARPHeader.java 2012-04-19 12:57:10 UTC (rev 5896) @@ -33,6 +33,8 @@ * @author epr */ public class ARPHeader implements NetworkLayerHeader { + + private final static int ARP_DATA_LENGTH = 28; private HardwareAddress srcHWAddress; private ProtocolAddress srcPAddress; @@ -143,6 +145,10 @@ return targetPAddress; } + public int getDataLength() { + return ARP_DATA_LENGTH; + } + /** * Gets the hardware type */ Modified: trunk/net/src/net/org/jnode/net/ipv4/tcp/TCPHeader.java =================================================================== --- trunk/net/src/net/org/jnode/net/ipv4/tcp/TCPHeader.java 2012-03-28 14:33:09 UTC (rev 5895) +++ trunk/net/src/net/org/jnode/net/ipv4/tcp/TCPHeader.java 2012-04-19 12:57:10 UTC (rev 5896) @@ -109,10 +109,6 @@ phdr.set16(10, tcpLength + headerLength); phdr.append(skbuf); - /* - * final int ccs1 = IPv4Utils.calcChecksum(phdr, 0, 12); final int - * ccs2 = IPv4Utils.calcChecksum(skbuf, 0, udpLength, ccs1); - */ final int ccs2 = IPv4Utils.calcChecksum(phdr, 0, headerLength + tcpLength + 12); this.checksumOk = (ccs2 == 0); if (!checksumOk) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ga...@us...> - 2012-03-28 14:33:18
|
Revision: 5895 http://jnode.svn.sourceforge.net/jnode/?rev=5895&view=rev Author: galatnm Date: 2012-03-28 14:33:09 +0000 (Wed, 28 Mar 2012) Log Message: ----------- Network code clean-up. Modified Paths: -------------- trunk/net/src/driver/org/jnode/driver/net/eepro100/EEPRO100Buffer.java trunk/net/src/driver/org/jnode/driver/net/eepro100/EEPRO100Core.java trunk/net/src/driver/org/jnode/driver/net/eepro100/EEPRO100TxFD.java Modified: trunk/net/src/driver/org/jnode/driver/net/eepro100/EEPRO100Buffer.java =================================================================== --- trunk/net/src/driver/org/jnode/driver/net/eepro100/EEPRO100Buffer.java 2012-03-28 14:03:32 UTC (rev 5894) +++ trunk/net/src/driver/org/jnode/driver/net/eepro100/EEPRO100Buffer.java 2012-03-28 14:33:09 UTC (rev 5895) @@ -30,11 +30,6 @@ * @author flesire */ public class EEPRO100Buffer implements EEPRO100Constants { - //--- Constants -// private static final int FRAME_SIZE = EthernetConstants.ETH_FRAME_LEN; -// private static final int PKT_BUF_SZ = 1536; -// private static final int DATA_BUFFER_SIZE = 1536; -// private static final int PacketReceived = 0xc000; //--- protected final Logger log = Logger.getLogger(getClass()); @@ -48,12 +43,6 @@ private int curRx; private int dirtyRx; public EEPRO100RxFD[] rxRing = new EEPRO100RxFD[RX_RING_SIZE]; -// private EEPRO100RxFD[] rxPackets = new EEPRO100RxFD[128]; -// private int rx_packets; -// private int rxErrors; -// private EEPRO100RxFD last_rxf; -// private int rxPacketIndex; -// private int lastRxTime; // --- Tx Variables private int txThreshold = 0x01200000; @@ -62,11 +51,7 @@ public EEPRO100TxFD[] txRing = new EEPRO100TxFD[TX_RING_SIZE]; @SuppressWarnings("unused") private EEPRO100TxFD lastCmd; -// private int lastCmdTime; - // --- Others variables -// private int jiffies; - public EEPRO100Buffer(EEPRO100Registers regs, ResourceManager rm) { this.regs = regs; this.rm = rm; Modified: trunk/net/src/driver/org/jnode/driver/net/eepro100/EEPRO100Core.java =================================================================== --- trunk/net/src/driver/org/jnode/driver/net/eepro100/EEPRO100Core.java 2012-03-28 14:03:32 UTC (rev 5894) +++ trunk/net/src/driver/org/jnode/driver/net/eepro100/EEPRO100Core.java 2012-03-28 14:33:09 UTC (rev 5895) @@ -392,10 +392,9 @@ regs.setReg16(SCBeeprom, EE_ENB | EE_SHIFT_CLK); eepromDelay(2); do { - // FIXME ... what is this craziness?? - short dataVal = - new Integer(((cmd & (1 << cmdLength)) == 0) ? EE_WRITE_0 : EE_WRITE_1) - .shortValue(); + int dataVal; + int test = cmd & 1 << cmdLength; + dataVal = (test == 0) ? EE_WRITE_0 : EE_WRITE_1; regs.setReg16(SCBeeprom, dataVal); eepromDelay(2); regs.setReg16(SCBeeprom, dataVal | EE_SHIFT_CLK); @@ -413,10 +412,8 @@ * @param delay */ final void systemDelay(int delay) { - // SystemResource.getTimer().udelay(4); int i = 100; - while (i-- > 0) - ; + while (i-- > 0); } // --- MD IO METHODS @@ -464,15 +461,14 @@ } public void setupInterrupt() { - int bogusCount = 20; - int status; if ((buffers.getCurRx() - buffers.getDirtyRx()) > 15) { log.debug("curRx > dirtyRx " + buffers.getCurRx() + ' ' + buffers.getDirtyRx()); } + int bogusCount = 20; do { - status = regs.getReg16(SCBStatus); + int status = regs.getReg16(SCBStatus); regs.setReg16(SCBStatus, status & IntrAllNormal); if ((status & IntrAllNormal) == 0) break; @@ -480,8 +476,7 @@ // buffers.rx(driver); if ((status & (IntrCmdDone | IntrCmdIdle | IntrDrvrIntr)) != 0) { - int dirtyTx0; - dirtyTx0 = buffers.getDirtyTx(); + int dirtyTx0 = buffers.getDirtyTx(); while ((buffers.getCurTx() - dirtyTx0) > 0) { int entry = dirtyTx0 & (TX_RING_SIZE - 1); status = buffers.txRing[entry].getStatus(); @@ -520,7 +515,6 @@ * The ring is no longer full, clear tbusy. */ txFull = false; - // netif_resume_tx_queue(dev); } } if ((status & IntrRxSuspend) != 0) { @@ -537,8 +531,6 @@ } while (true); log.debug(flags.getName() + " : End handleInterrupt"); - return; - } // --- Accessors --- Modified: trunk/net/src/driver/org/jnode/driver/net/eepro100/EEPRO100TxFD.java =================================================================== --- trunk/net/src/driver/org/jnode/driver/net/eepro100/EEPRO100TxFD.java 2012-03-28 14:03:32 UTC (rev 5894) +++ trunk/net/src/driver/org/jnode/driver/net/eepro100/EEPRO100TxFD.java 2012-03-28 14:33:09 UTC (rev 5895) @@ -64,17 +64,15 @@ this.mem = rm.asMemoryResource(data); final Address memAddr = mem.getAddress(); - // int addr = Address.as32bit(memAddr); - int offset = 0; - this.firstDPDOffset = offset; + this.firstDPDOffset = 0; this.firstDPDAddress = memAddr.add(firstDPDOffset); } /** * Initialize this ring to its default (empty) state */ - public void initialize(SocketBuffer src) throws IllegalArgumentException { + public void initialize(SocketBuffer src) { // Setup the DPD // Copy the data from the buffer This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ga...@us...> - 2012-03-28 14:03:45
|
Revision: 5894 http://jnode.svn.sourceforge.net/jnode/?rev=5894&view=rev Author: galatnm Date: 2012-03-28 14:03:32 +0000 (Wed, 28 Mar 2012) Log Message: ----------- Various clean up for performance. Modified Paths: -------------- trunk/cli/src/commands/org/jnode/command/archive/TarCommand.java trunk/cli/src/commands/org/jnode/command/archive/ZipCommand.java trunk/cli/src/commands/org/jnode/command/argument/NumberListArgument.java trunk/cli/src/commands/org/jnode/command/common/ExprCommand.java trunk/cli/src/commands/org/jnode/command/common/TimeCommand.java trunk/cli/src/commands/org/jnode/command/common/UnixTestCommand.java trunk/cli/src/commands/org/jnode/command/file/CpCommand.java trunk/cli/src/commands/org/jnode/command/file/CutCommand.java trunk/cli/src/commands/org/jnode/command/file/DirCommand.java trunk/cli/src/commands/org/jnode/command/file/DuCommand.java trunk/cli/src/commands/org/jnode/command/file/FindCommand.java trunk/cli/src/commands/org/jnode/command/file/GrepCommand.java trunk/cli/src/commands/org/jnode/command/file/HexdumpCommand.java trunk/cli/src/commands/org/jnode/command/file/SortCommand.java trunk/cli/src/commands/org/jnode/command/file/WcCommand.java trunk/cli/src/commands/org/jnode/command/net/NetstatCommand.java trunk/cli/src/commands/org/jnode/command/net/RpcInfoCommand.java trunk/cli/src/commands/org/jnode/command/system/BindKeysCommand.java trunk/cli/src/commands/org/jnode/command/system/ClasspathCommand.java trunk/cli/src/commands/org/jnode/command/system/IsolateCommand.java trunk/cli/src/commands/org/jnode/command/system/JavaCommand.java trunk/cli/src/commands/org/jnode/command/system/LocaleCommand.java trunk/cli/src/commands/org/jnode/command/system/Log4jCommand.java trunk/cli/src/commands/org/jnode/command/system/LsIRQCommand.java trunk/cli/src/commands/org/jnode/command/system/PluginCommand.java trunk/net/src/driver/org/jnode/driver/net/eepro100/EEPRO100Buffer.java trunk/net/src/driver/org/jnode/driver/net/eepro100/EEPRO100Core.java trunk/net/src/driver/org/jnode/driver/net/eepro100/EEPRO100Flags.java trunk/net/src/driver/org/jnode/driver/net/eepro100/EEPRO100Registers.java trunk/net/src/driver/org/jnode/driver/net/eepro100/EEPRO100Stats.java trunk/net/src/driver/org/jnode/driver/net/eepro100/EEPRO100TxFD.java trunk/net/src/driver/org/jnode/driver/net/prism2/Prism2Core.java trunk/net/src/driver/org/jnode/driver/net/spi/AbstractNetDriver.java trunk/net/src/driver/org/jnode/driver/net/usb/bluetooth/UsbBluetoothDriver.java trunk/net/src/driver/org/jnode/driver/net/via_rhine/ViaRhineCore.java trunk/net/src/net/org/jnode/net/SocketBuffer.java trunk/net/src/net/org/jnode/net/arp/ARPCacheEntry.java trunk/net/src/net/org/jnode/net/arp/ARPHeader.java trunk/net/src/net/org/jnode/net/arp/ARPNetworkLayer.java trunk/net/src/net/org/jnode/net/ipv4/IPv4ControlBlock.java trunk/net/src/net/org/jnode/net/ipv4/IPv4FragmentList.java trunk/net/src/net/org/jnode/net/ipv4/bootp/BOOTPServer.java trunk/net/src/net/org/jnode/net/ipv4/config/impl/Route.java trunk/net/src/net/org/jnode/net/ipv4/tcp/TCPControlBlock.java trunk/net/src/net/org/jnode/net/ipv4/tcp/TCPDataBuffer.java trunk/net/src/net/org/jnode/net/ipv4/tcp/TCPHeader.java trunk/net/src/net/org/jnode/net/ipv4/tcp/TCPOutChannel.java trunk/net/src/net/org/jnode/net/ipv4/tcp/TCPProtocol.java trunk/net/src/net/org/jnode/net/ipv4/tftp/TFTPClient.java trunk/net/src/net/org/jnode/net/ipv4/tftp/TFTPServer.java trunk/net/src/net/org/jnode/net/ipv4/udp/UDPProtocol.java trunk/net/src/net/org/jnode/net/nfs/nfs2/NFS2Client.java trunk/net/src/net/org/jnode/net/nfs/nfs2/mount/Mount1Client.java trunk/net/src/net/org/jnode/protocol/nfs/nfs2/NFS2OutputStream.java Removed Paths: ------------- trunk/net/src/driver/org/jnode/driver/net/eepro100/EEPRO100Utils.java Modified: trunk/cli/src/commands/org/jnode/command/archive/TarCommand.java =================================================================== --- trunk/cli/src/commands/org/jnode/command/archive/TarCommand.java 2012-03-27 15:16:35 UTC (rev 5893) +++ trunk/cli/src/commands/org/jnode/command/archive/TarCommand.java 2012-03-28 14:03:32 UTC (rev 5894) @@ -21,19 +21,19 @@ package org.jnode.command.archive; import java.io.File; +import java.io.IOException; import java.io.InputStream; -import java.io.IOException; import java.io.OutputStream; import java.util.ArrayList; import java.util.Collections; import java.util.TreeMap; import java.util.zip.GZIPInputStream; import java.util.zip.GZIPOutputStream; +import org.apache.tools.bzip2.CBZip2InputStream; +import org.apache.tools.bzip2.CBZip2OutputStream; import org.apache.tools.tar.TarEntry; import org.apache.tools.tar.TarInputStream; import org.apache.tools.tar.TarOutputStream; -import org.apache.tools.bzip2.CBZip2InputStream; -import org.apache.tools.bzip2.CBZip2OutputStream; import org.jnode.shell.syntax.Argument; import org.jnode.shell.syntax.FileArgument; import org.jnode.shell.syntax.FlagArgument; @@ -524,7 +524,7 @@ ArrayList<File> list = new ArrayList<File>(); for (File file : files) { if (entries.containsKey(file.getPath())) { - etime = entries.get(file.getPath()).longValue(); + etime = entries.get(file.getPath()); ftime = file.lastModified(); if (etime >= ftime) { continue; Modified: trunk/cli/src/commands/org/jnode/command/archive/ZipCommand.java =================================================================== --- trunk/cli/src/commands/org/jnode/command/archive/ZipCommand.java 2012-03-27 15:16:35 UTC (rev 5893) +++ trunk/cli/src/commands/org/jnode/command/archive/ZipCommand.java 2012-03-28 14:03:32 UTC (rev 5894) @@ -21,9 +21,10 @@ package org.jnode.command.archive; import java.util.ArrayList; +import java.util.Collections; import org.jnode.shell.syntax.Argument; -import org.jnode.shell.syntax.FlagArgument; import org.jnode.shell.syntax.FileArgument; +import org.jnode.shell.syntax.FlagArgument; import org.jnode.shell.syntax.StringArgument; /** @@ -104,15 +105,11 @@ } if (Exclude.isSet()) { excludes = new ArrayList<String>(Exclude.getValues().length); - for (String pattern : Exclude.getValues()) { - excludes.add(pattern); - } + Collections.addAll(excludes, Exclude.getValues()); } if (Include.isSet()) { includes = new ArrayList<String>(Include.getValues().length); - for (String pattern : Include.getValues()) { - includes.add(pattern); - } + Collections.addAll(includes, Include.getValues()); } super.execute("zip"); } Modified: trunk/cli/src/commands/org/jnode/command/argument/NumberListArgument.java =================================================================== --- trunk/cli/src/commands/org/jnode/command/argument/NumberListArgument.java 2012-03-27 15:16:35 UTC (rev 5893) +++ trunk/cli/src/commands/org/jnode/command/argument/NumberListArgument.java 2012-03-28 14:03:32 UTC (rev 5894) @@ -21,13 +21,13 @@ package org.jnode.command.argument; import java.util.Arrays; - import org.jnode.command.util.NumberRange; -//import org.jnode.driver.console.CompletionInfo; import org.jnode.shell.CommandLine.Token; -import org.jnode.shell.syntax.CommandSyntaxException; import org.jnode.shell.syntax.Argument; +import org.jnode.shell.syntax.CommandSyntaxException; +//import org.jnode.driver.console.CompletionInfo; + /** * Captures a list of multiple number ranges. * @@ -93,9 +93,7 @@ i++; } } - for (int i = 0; i < (ranges.length - 1); i++) { - values.add(ranges[i]); - } + values.addAll(Arrays.asList(ranges).subList(0, ranges.length - 1)); return ranges[ranges.length - 1]; } Modified: trunk/cli/src/commands/org/jnode/command/common/ExprCommand.java =================================================================== --- trunk/cli/src/commands/org/jnode/command/common/ExprCommand.java 2012-03-27 15:16:35 UTC (rev 5893) +++ trunk/cli/src/commands/org/jnode/command/common/ExprCommand.java 2012-03-28 14:03:32 UTC (rev 5894) @@ -24,7 +24,6 @@ import java.util.Arrays; import java.util.HashSet; import java.util.Set; - import org.jnode.shell.AbstractCommand; @@ -319,7 +318,7 @@ private int asInteger(Object obj) throws ExprException { if (obj instanceof Integer) { - return ((Integer) obj).intValue(); + return (Integer) obj; } else { try { return Integer.parseInt(obj.toString()); Modified: trunk/cli/src/commands/org/jnode/command/common/TimeCommand.java =================================================================== --- trunk/cli/src/commands/org/jnode/command/common/TimeCommand.java 2012-03-27 15:16:35 UTC (rev 5893) +++ trunk/cli/src/commands/org/jnode/command/common/TimeCommand.java 2012-03-28 14:03:32 UTC (rev 5894) @@ -63,7 +63,7 @@ StringBuilder sb = new StringBuilder(Alias.getValue()); for (String arg : Args.getValues()) { - sb.append(" "); + sb.append(' '); sb.append(arg); } Modified: trunk/cli/src/commands/org/jnode/command/common/UnixTestCommand.java =================================================================== --- trunk/cli/src/commands/org/jnode/command/common/UnixTestCommand.java 2012-03-27 15:16:35 UTC (rev 5893) +++ trunk/cli/src/commands/org/jnode/command/common/UnixTestCommand.java 2012-03-28 14:03:32 UTC (rev 5894) @@ -24,7 +24,6 @@ import java.io.PrintWriter; import java.util.HashMap; import java.util.Stack; - import org.jnode.shell.AbstractCommand; import org.jnode.shell.CommandLine; import org.jnode.shell.syntax.CommandSyntaxException; @@ -144,7 +143,7 @@ if (obj instanceof Boolean) { res = obj == Boolean.TRUE; } else if (obj instanceof Long) { - res = ((Long) obj).longValue() != 0; + res = (Long) obj != 0; } else { res = obj.toString().length() > 0; } @@ -329,7 +328,7 @@ } else if (option.equals("--version")) { err.println("JNode test 0.0"); } else { - throw new CommandSyntaxException("unknown option '" + option + "'"); + throw new CommandSyntaxException("unknown option '" + option + '\''); } } } @@ -343,7 +342,7 @@ } private void pushOperand(long value) { - operandStack.push(new Long(value)); + operandStack.push(value); } private Object popOperand() throws CommandSyntaxException { @@ -355,13 +354,13 @@ private long toNumber(Object obj) throws CommandSyntaxException { if (obj instanceof Long) { - return ((Long) obj).longValue(); + return (Long) obj; } else if (obj instanceof String) { try { return Long.parseLong((String) obj); } catch (NumberFormatException ex) { throw new CommandSyntaxException( - "operand is not a number: '" + obj.toString() + "'"); + "operand is not a number: '" + obj.toString() + '\''); } } else { throw new CommandSyntaxException("subexpression is not an INTEGER"); Modified: trunk/cli/src/commands/org/jnode/command/file/CpCommand.java =================================================================== --- trunk/cli/src/commands/org/jnode/command/file/CpCommand.java 2012-03-27 15:16:35 UTC (rev 5893) +++ trunk/cli/src/commands/org/jnode/command/file/CpCommand.java 2012-03-28 14:03:32 UTC (rev 5894) @@ -28,7 +28,6 @@ import java.io.InputStream; import java.io.OutputStream; import java.io.PrintWriter; - import org.jnode.shell.AbstractCommand; import org.jnode.shell.syntax.Argument; import org.jnode.shell.syntax.FileArgument; @@ -370,7 +369,7 @@ if (line.charAt(0) == 'y' || line.charAt(0) == 'Y') { return true; } else if (line.charAt(0) == 'n' || line.charAt(0) == 'N') { - return vskip("'" + target + "'"); + return vskip("'" + target + '\''); } } out.print(STR_ASK_AGAIN); Modified: trunk/cli/src/commands/org/jnode/command/file/CutCommand.java =================================================================== --- trunk/cli/src/commands/org/jnode/command/file/CutCommand.java 2012-03-27 15:16:35 UTC (rev 5893) +++ trunk/cli/src/commands/org/jnode/command/file/CutCommand.java 2012-03-28 14:03:32 UTC (rev 5894) @@ -26,7 +26,6 @@ import java.io.IOException; import java.io.PrintWriter; import java.util.List; - import org.jnode.command.argument.NumberListArgument; import org.jnode.command.util.IOUtils; import org.jnode.command.util.NumberRange; @@ -157,7 +156,7 @@ boolean first; int limit, start, end; for (String line : lines) { - if (line.indexOf(inDelim) == -1) { + if (!line.contains(inDelim)) { if (!suppress) { out.write(line); out.newLine(); Modified: trunk/cli/src/commands/org/jnode/command/file/DirCommand.java =================================================================== --- trunk/cli/src/commands/org/jnode/command/file/DirCommand.java 2012-03-27 15:16:35 UTC (rev 5893) +++ trunk/cli/src/commands/org/jnode/command/file/DirCommand.java 2012-03-28 14:03:32 UTC (rev 5894) @@ -28,7 +28,6 @@ import java.util.Arrays; import java.util.Comparator; import java.util.Date; - import org.jnode.shell.AbstractCommand; import org.jnode.shell.syntax.Argument; import org.jnode.shell.syntax.FileArgument; @@ -121,7 +120,7 @@ for (int j = 0; j < LEFT_MARGIN + SEPARATOR_SIZE; j++) sb.append(' '); sb.append(dateFormat.format(lastModified)); sb.append(SEPARATOR); - sb.append("["); + sb.append('['); sb.append(f.getName()); sb.append(']'); } Modified: trunk/cli/src/commands/org/jnode/command/file/DuCommand.java =================================================================== --- trunk/cli/src/commands/org/jnode/command/file/DuCommand.java 2012-03-27 15:16:35 UTC (rev 5893) +++ trunk/cli/src/commands/org/jnode/command/file/DuCommand.java 2012-03-28 14:03:32 UTC (rev 5894) @@ -24,9 +24,7 @@ import java.io.IOException; import java.io.PrintWriter; import java.util.Stack; - import javax.naming.NameNotFoundException; - import org.apache.log4j.Logger; import org.jnode.command.util.AbstractDirectoryWalker; import org.jnode.driver.Device; @@ -240,22 +238,22 @@ private void printFileSize(final File filename, final long size) { if (argAll.isSet()) { - out.println(sizeToString(size) + "\t" + filename); + out.println(sizeToString(size) + '\t' + filename); } } private void printDirSize(final File filename, final long dirSizeOnly, final long subDirSize) { if (!argSum.isSet()) { if (argSeperateDirs.isSet()) { - out.println(sizeToString(dirSizeOnly) + "\t" + filename); + out.println(sizeToString(dirSizeOnly) + '\t' + filename); } else { - out.println(sizeToString(dirSizeOnly + subDirSize) + "\t" + filename); + out.println(sizeToString(dirSizeOnly + subDirSize) + '\t' + filename); } } } private void printSize(final String filename, final long size) { - out.println(sizeToString(size) + "\t" + filename); + out.println(sizeToString(size) + '\t' + filename); } private void log(String message) { Modified: trunk/cli/src/commands/org/jnode/command/file/FindCommand.java =================================================================== --- trunk/cli/src/commands/org/jnode/command/file/FindCommand.java 2012-03-27 15:16:35 UTC (rev 5893) +++ trunk/cli/src/commands/org/jnode/command/file/FindCommand.java 2012-03-28 14:03:32 UTC (rev 5894) @@ -26,7 +26,6 @@ import java.io.PrintWriter; import java.util.regex.Matcher; import java.util.regex.Pattern; - import org.jnode.command.util.AbstractDirectoryWalker; import org.jnode.shell.AbstractCommand; import org.jnode.shell.syntax.Argument; @@ -47,7 +46,7 @@ @Override protected void handleRestrictedFile(File file) throws IOException { - err.println("Permission denied for \"" + file + "\""); + err.println("Permission denied for \"" + file + '"'); } @Override Modified: trunk/cli/src/commands/org/jnode/command/file/GrepCommand.java =================================================================== --- trunk/cli/src/commands/org/jnode/command/file/GrepCommand.java 2012-03-27 15:16:35 UTC (rev 5893) +++ trunk/cli/src/commands/org/jnode/command/file/GrepCommand.java 2012-03-28 14:03:32 UTC (rev 5894) @@ -21,22 +21,26 @@ package org.jnode.command.file; import java.io.BufferedReader; +import java.io.Closeable; import java.io.File; import java.io.FileFilter; -import java.io.InputStream; +import java.io.Flushable; import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; import java.io.LineNumberReader; import java.io.OutputStream; import java.io.PrintWriter; import java.io.Reader; - -import java.util.regex.Matcher; +import java.io.Writer; +import java.util.ArrayDeque; +import java.util.ArrayList; +import java.util.Deque; +import java.util.List; import java.util.regex.MatchResult; +import java.util.regex.Matcher; import java.util.regex.Pattern; import java.util.regex.PatternSyntaxException; -import java.util.ArrayList; -import java.util.List; - import org.apache.log4j.Logger; import org.jnode.command.util.AbstractDirectoryWalker; import org.jnode.command.util.AbstractDirectoryWalker.PathnamePatternFilter; @@ -48,13 +52,6 @@ import org.jnode.shell.syntax.IntegerArgument; import org.jnode.shell.syntax.StringArgument; -import java.io.Closeable; -import java.io.Flushable; -import java.io.Writer; -import java.io.InputStreamReader; -import java.util.ArrayDeque; -import java.util.Deque; - /** * TODO implement Fixed/Basic/Ext matchers * TODO implement --color (if/when possible) @@ -680,20 +677,20 @@ if ((prefix & PREFIX_FILE) != 0) { sb.append(name); if ((prefix & (PREFIX_LINE | PREFIX_BYTE)) == 0) { - sb.append("\t"); + sb.append('\t'); } sb.append(fieldSep); } if ((prefix & PREFIX_LINE) != 0) { sb.append(padNumber(lineCount, 4)); if ((prefix & PREFIX_BYTE) == 0) { - sb.append("\t"); + sb.append('\t'); } sb.append(fieldSep); } if ((prefix & PREFIX_BYTE) != 0) { sb.append(padNumber(byteCount, 9)); - sb.append("\t"); + sb.append('\t'); sb.append(fieldSep); } } else { @@ -756,7 +753,7 @@ } private String padNumber(int n, int size) { - return String.format("%" + size + "d", n); + return String.format("%" + size + 'd', n); } /** Modified: trunk/cli/src/commands/org/jnode/command/file/HexdumpCommand.java =================================================================== --- trunk/cli/src/commands/org/jnode/command/file/HexdumpCommand.java 2012-03-27 15:16:35 UTC (rev 5893) +++ trunk/cli/src/commands/org/jnode/command/file/HexdumpCommand.java 2012-03-28 14:03:32 UTC (rev 5894) @@ -27,7 +27,6 @@ import java.io.InputStream; import java.io.PrintWriter; import java.net.URL; - import org.jnode.shell.AbstractCommand; import org.jnode.shell.syntax.Argument; import org.jnode.shell.syntax.FileArgument; @@ -112,10 +111,10 @@ sb.append(" "); } if ((i + 1) < rowlen) { - sb.append(" "); + sb.append(' '); } if ((i + 1) == rowlen / 2) { - sb.append(" "); + sb.append(' '); } } @@ -127,14 +126,14 @@ if ((c >= ' ') && (c < (char) 0x7f)) { sb.append(c); } else { - sb.append("."); + sb.append('.'); } } else { - sb.append(" "); + sb.append(' '); } } - sb.append("|"); + sb.append('|'); left -= sz; ofs += sz; Modified: trunk/cli/src/commands/org/jnode/command/file/SortCommand.java =================================================================== --- trunk/cli/src/commands/org/jnode/command/file/SortCommand.java 2012-03-27 15:16:35 UTC (rev 5893) +++ trunk/cli/src/commands/org/jnode/command/file/SortCommand.java 2012-03-28 14:03:32 UTC (rev 5894) @@ -21,15 +21,14 @@ package org.jnode.command.file; import java.io.File; +import java.io.IOException; import java.io.PrintWriter; -import java.io.IOException; +import java.util.ArrayList; import java.util.Arrays; -import java.util.ArrayList; import java.util.Collections; import java.util.Comparator; +import java.util.LinkedList; import java.util.List; -import java.util.LinkedList; - import org.jnode.command.util.IOUtils; import org.jnode.shell.AbstractCommand; import org.jnode.shell.CommandLine; @@ -39,6 +38,7 @@ import org.jnode.shell.syntax.FlagArgument; import org.jnode.shell.syntax.IntegerArgument; import org.jnode.shell.syntax.StringArgument; + import static org.jnode.shell.syntax.Argument.EXISTING; import static org.jnode.shell.syntax.Argument.MULTIPLE; import static org.jnode.shell.syntax.Argument.NONEXISTENT; @@ -106,7 +106,7 @@ protected FieldRange doAccept(CommandLine.Token token, int flags) throws CommandSyntaxException { String text = token.text; FieldRange range = new FieldRange(); - int i = text.indexOf(","); + int i = text.indexOf(','); if (i == -1) { range.start = parseField(text, false); range.end = new Field(); @@ -165,7 +165,7 @@ i--; } text = text.substring(0, i + 1); - i = text.indexOf("."); + i = text.indexOf('.'); if (i == 0) { throw new CommandSyntaxException("Field offset cannot be empty"); } Modified: trunk/cli/src/commands/org/jnode/command/file/WcCommand.java =================================================================== --- trunk/cli/src/commands/org/jnode/command/file/WcCommand.java 2012-03-27 15:16:35 UTC (rev 5893) +++ trunk/cli/src/commands/org/jnode/command/file/WcCommand.java 2012-03-28 14:03:32 UTC (rev 5894) @@ -28,7 +28,6 @@ import java.io.PrintWriter; import java.util.ArrayList; import java.util.List; - import org.jnode.shell.AbstractCommand; import org.jnode.shell.syntax.Argument; import org.jnode.shell.syntax.FileArgument; @@ -126,13 +125,13 @@ private void checkFile(File file) { if (!file.exists()) { - getError().getPrintWriter().println(STR_ERROR_NOT_EXIST + " " + file.getAbsolutePath()); + getError().getPrintWriter().println(STR_ERROR_NOT_EXIST + ' ' + file.getAbsolutePath()); exit(1); } else if (file.isDirectory()) { - getError().getPrintWriter().println(STR_ERROR_DIR + " " + file.getAbsolutePath()); + getError().getPrintWriter().println(STR_ERROR_DIR + ' ' + file.getAbsolutePath()); exit(1); } else if (!file.canRead()) { - getError().getPrintWriter().println(STR_ERROR_CANT_READ + " " + file.getAbsolutePath()); + getError().getPrintWriter().println(STR_ERROR_CANT_READ + ' ' + file.getAbsolutePath()); exit(1); } } @@ -191,7 +190,7 @@ printLine(printWriter, paddingSize, wc.getLinesCount(), wc.getWordsCount(), wc.getCharsCount(), wc .getBytesRead(), wc.getMaxCharsInLine()); if (wc.getFileName() != null) { - printWriter.print(" " + wc.getFileName()); + printWriter.print(' ' + wc.getFileName()); } printWriter.println(); } @@ -199,7 +198,7 @@ if (listWc.size() > 1) { printLine(printWriter, paddingSize, totalLinesCount, totalWordsCount, totalCharsCount, totalBytesRead, maxCharsInLine); - printWriter.println(" " + STR_TOTAL); + printWriter.println(' ' + STR_TOTAL); } printWriter.flush(); } @@ -253,10 +252,10 @@ sValue.append(value); while (sValue.length() < paddingSize) { - sValue.insert(0, " "); + sValue.insert(0, ' '); } if (!first) { - sValue.insert(0, " "); + sValue.insert(0, ' '); } printWriter.print(sValue); } Modified: trunk/cli/src/commands/org/jnode/command/net/NetstatCommand.java =================================================================== --- trunk/cli/src/commands/org/jnode/command/net/NetstatCommand.java 2012-03-27 15:16:35 UTC (rev 5893) +++ trunk/cli/src/commands/org/jnode/command/net/NetstatCommand.java 2012-03-28 14:03:32 UTC (rev 5894) @@ -21,7 +21,6 @@ package org.jnode.command.net; import java.io.PrintWriter; - import org.jnode.driver.net.NetworkException; import org.jnode.net.NetworkLayer; import org.jnode.net.NetworkLayerManager; @@ -83,7 +82,7 @@ int width = 0; for (int i = 0; i < list.length; i++) { final Statistic st = list[i]; - String msg = st.getName() + " " + st.getValue(); + String msg = st.getName() + ' ' + st.getValue(); if (i + 1 < list.length) { msg = msg + ", "; } Modified: trunk/cli/src/commands/org/jnode/command/net/RpcInfoCommand.java =================================================================== --- trunk/cli/src/commands/org/jnode/command/net/RpcInfoCommand.java 2012-03-27 15:16:35 UTC (rev 5893) +++ trunk/cli/src/commands/org/jnode/command/net/RpcInfoCommand.java 2012-03-28 14:03:32 UTC (rev 5894) @@ -24,7 +24,6 @@ import java.io.PrintWriter; import java.net.InetAddress; import java.net.UnknownHostException; - import org.acplt.oncrpc.OncRpcException; import org.acplt.oncrpc.OncRpcPortmapClient; import org.acplt.oncrpc.OncRpcProtocols; @@ -87,11 +86,10 @@ out.printf(fmt_list_serv, str_program, str_version, str_protocol, str_port, str_name); out.println(); - for (int i = 0; i < servers.length; i++) { - OncRpcServerIdent server = servers[i]; - out.printf(fmt_list_serv, server.program, server.version, - server.protocol == 6 ? str_tcp : str_udp, - server.port, getName(server.program)); + for (OncRpcServerIdent server : servers) { + out.printf(fmt_list_serv, server.program, server.version, + server.protocol == 6 ? str_tcp : str_udp, + server.port, getName(server.program)); out.println(); } } catch (OncRpcException e) { Modified: trunk/cli/src/commands/org/jnode/command/system/BindKeysCommand.java =================================================================== --- trunk/cli/src/commands/org/jnode/command/system/BindKeysCommand.java 2012-03-27 15:16:35 UTC (rev 5893) +++ trunk/cli/src/commands/org/jnode/command/system/BindKeysCommand.java 2012-03-28 14:03:32 UTC (rev 5894) @@ -29,7 +29,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; - import org.jnode.driver.console.Console; import org.jnode.driver.console.KeyEventBindings; import org.jnode.driver.console.TextConsole; @@ -37,8 +36,8 @@ import org.jnode.driver.console.textscreen.ConsoleKeyEventBindings; import org.jnode.driver.console.textscreen.KeyboardReaderAction; import org.jnode.shell.AbstractCommand; +import org.jnode.shell.CommandLine.Token; import org.jnode.shell.ShellUtils; -import org.jnode.shell.CommandLine.Token; import org.jnode.shell.syntax.Argument; import org.jnode.shell.syntax.CommandSyntaxException; import org.jnode.shell.syntax.EnumArgument; @@ -84,7 +83,7 @@ field.getName().startsWith("VK_")) { try { Integer vk = (Integer) field.get(null); - String name = constCase(KeyEvent.getKeyText(vk.intValue())); + String name = constCase(KeyEvent.getKeyText(vk)); VK_NAME_MAP.put(name, vk); VK_MAP.put(vk, name); } catch (IllegalAccessException ex) { @@ -432,7 +431,11 @@ } else if (ch < '\177') { sb.append('\'').append(ch).append('\''); } else { - sb.append('\'').append(ch).append("' (0x" + Integer.toHexString(ch)).append(')'); + sb.append('\''); + sb.append(ch); + sb.append("' (0x"); + sb.append(Integer.toHexString(ch)); + sb.append(')'); } return sb.toString(); } Modified: trunk/cli/src/commands/org/jnode/command/system/ClasspathCommand.java =================================================================== --- trunk/cli/src/commands/org/jnode/command/system/ClasspathCommand.java 2012-03-27 15:16:35 UTC (rev 5893) +++ trunk/cli/src/commands/org/jnode/command/system/ClasspathCommand.java 2012-03-28 14:03:32 UTC (rev 5894) @@ -21,11 +21,12 @@ package org.jnode.command.system; import java.io.PrintWriter; +import java.net.URI; +import java.net.URISyntaxException; import java.net.URL; import java.net.URLClassLoader; import java.security.AccessController; import java.security.PrivilegedAction; - import org.jnode.shell.AbstractCommand; import org.jnode.shell.syntax.Argument; import org.jnode.shell.syntax.FlagArgument; @@ -77,16 +78,24 @@ clearClassPath(); if (urls != null) { for (URL url : urls) { - addToClassPath(url); + try { + addToClassPath(url); + } catch (URISyntaxException e) { + e.printStackTrace(); + } } } } - private void addToClassPath(URL url) { + private void addToClassPath(URL url) throws URISyntaxException { URL[] urls = getClassLoader().getURLs(); + if (urls != null) { + URI uri = url.toURI(); + URI classLoaderUri; for (URL u : urls) { - if (u.equals(url)) { + classLoaderUri = u.toURI(); + if (classLoaderUri.equals(uri)) { return; } } Modified: trunk/cli/src/commands/org/jnode/command/system/IsolateCommand.java =================================================================== --- trunk/cli/src/commands/org/jnode/command/system/IsolateCommand.java 2012-03-27 15:16:35 UTC (rev 5893) +++ trunk/cli/src/commands/org/jnode/command/system/IsolateCommand.java 2012-03-28 14:03:32 UTC (rev 5894) @@ -21,7 +21,6 @@ package org.jnode.command.system; import java.io.PrintWriter; - import org.jnode.shell.AbstractCommand; import org.jnode.vm.isolate.VmIsolate; @@ -38,14 +37,14 @@ out.println(str_header); VmIsolate root = VmIsolate.getRoot(); if (root != null) { - out.println(format(String.valueOf(root.getId()), 8, false) + " " + - format("0", 8, false) + " " + + out.println(format(String.valueOf(root.getId()), 8, false) + ' ' + + format("0", 8, false) + ' ' + format(String.valueOf(root.getState()), 8, true)); } for (VmIsolate iso : VmIsolate.getVmIsolates()) { - out.println(format(String.valueOf(iso.getId()), 8, false) + " " + - format(String.valueOf(iso.getCreator().getId()), 8, false) + " " + - format(String.valueOf(iso.getState()), 8, true) + " " + + out.println(format(String.valueOf(iso.getId()), 8, false) + ' ' + + format(String.valueOf(iso.getCreator().getId()), 8, false) + ' ' + + format(String.valueOf(iso.getState()), 8, true) + ' ' + iso.getMainClassName()); } } Modified: trunk/cli/src/commands/org/jnode/command/system/JavaCommand.java =================================================================== --- trunk/cli/src/commands/org/jnode/command/system/JavaCommand.java 2012-03-27 15:16:35 UTC (rev 5893) +++ trunk/cli/src/commands/org/jnode/command/system/JavaCommand.java 2012-03-28 14:03:32 UTC (rev 5894) @@ -162,8 +162,8 @@ private byte[] loadClassData(String name) throws ClassNotFoundException { String fn = name.replace('.', '/'); File f = null; - for (int i = 0; i < dirs.length; i++) { - f = new File(dirs[i] + fn + ".class"); + for (String dir : dirs) { + f = new File(dir + fn + ".class"); if (f.exists()) { break; } Modified: trunk/cli/src/commands/org/jnode/command/system/LocaleCommand.java =================================================================== --- trunk/cli/src/commands/org/jnode/command/system/LocaleCommand.java 2012-03-27 15:16:35 UTC (rev 5893) +++ trunk/cli/src/commands/org/jnode/command/system/LocaleCommand.java 2012-03-28 14:03:32 UTC (rev 5894) @@ -25,7 +25,6 @@ import java.util.Comparator; import java.util.Locale; import java.util.TreeSet; - import org.jnode.shell.AbstractCommand; import org.jnode.shell.syntax.Argument; import org.jnode.shell.syntax.CountryArgument; @@ -112,8 +111,8 @@ } private String formatLocale(Locale l) { - return (l.getDisplayName() + " : " + l.getLanguage() + - " " + l.getCountry() + " " + l.getVariant()); + return (l.getDisplayName() + " : " + l.getLanguage() + + ' ' + l.getCountry() + ' ' + l.getVariant()); } /** Modified: trunk/cli/src/commands/org/jnode/command/system/Log4jCommand.java =================================================================== --- trunk/cli/src/commands/org/jnode/command/system/Log4jCommand.java 2012-03-27 15:16:35 UTC (rev 5893) +++ trunk/cli/src/commands/org/jnode/command/system/Log4jCommand.java 2012-03-28 14:03:32 UTC (rev 5894) @@ -27,7 +27,6 @@ import java.net.URL; import java.util.Enumeration; import java.util.Properties; - import org.apache.log4j.Level; import org.apache.log4j.LogManager; import org.apache.log4j.Logger; @@ -111,7 +110,7 @@ while (en.hasMoreElements()) { Logger logger = (Logger) en.nextElement(); String level = (logger.getLevel() == null) ? - ("(" + logger.getEffectiveLevel().toString() + ")") : + ('(' + logger.getEffectiveLevel().toString() + ')') : logger.getLevel().toString(); getOutput().getPrintWriter().println(logger.getName() + ": " + level); } Modified: trunk/cli/src/commands/org/jnode/command/system/LsIRQCommand.java =================================================================== --- trunk/cli/src/commands/org/jnode/command/system/LsIRQCommand.java 2012-03-27 15:16:35 UTC (rev 5893) +++ trunk/cli/src/commands/org/jnode/command/system/LsIRQCommand.java 2012-03-28 14:03:32 UTC (rev 5894) @@ -45,7 +45,7 @@ final IRQManager irqMgr = proc.getIRQManager(); final int max = irqMgr.getNumIRQs(); for (int i = 0; i < max; i++) { - getOutput().getPrintWriter().println("IRQ" + i + "\t" + irqMgr.getIrqCount(i) + "\t" + getOutput().getPrintWriter().println("IRQ" + i + '\t' + irqMgr.getIrqCount(i) + '\t' + irqMgr.getHandlerInfo(i)); } } Modified: trunk/cli/src/commands/org/jnode/command/system/PluginCommand.java =================================================================== --- trunk/cli/src/commands/org/jnode/command/system/PluginCommand.java 2012-03-27 15:16:35 UTC (rev 5893) +++ trunk/cli/src/commands/org/jnode/command/system/PluginCommand.java 2012-03-28 14:03:32 UTC (rev 5894) @@ -29,9 +29,7 @@ import java.util.ArrayList; import java.util.Collections; import java.util.List; - import javax.naming.NameNotFoundException; - import org.jnode.naming.InitialNaming; import org.jnode.plugin.PluginDescriptor; import org.jnode.plugin.PluginException; @@ -140,7 +138,7 @@ private void addPluginLoader(URL url) throws PluginException, MalformedURLException { final String ext = url.toExternalForm(); if (!ext.endsWith("/")) { - url = new URL(ext + "/"); + url = new URL(ext + '/'); } mgr.getLoaderManager().addPluginLoader(new URLPluginLoader(url)); out.format(fmt_add_loader, url); @@ -171,7 +169,7 @@ } private void listPlugins() throws PluginException { - final ArrayList<String> rows = new ArrayList<String>(); + final List<String> rows = new ArrayList<String>(); for (PluginDescriptor descr : mgr.getRegistry()) { String row = String.format(fmt_list, descr.getId(), Modified: trunk/net/src/driver/org/jnode/driver/net/eepro100/EEPRO100Buffer.java =================================================================== --- trunk/net/src/driver/org/jnode/driver/net/eepro100/EEPRO100Buffer.java 2012-03-27 15:16:35 UTC (rev 5893) +++ trunk/net/src/driver/org/jnode/driver/net/eepro100/EEPRO100Buffer.java 2012-03-28 14:03:32 UTC (rev 5894) @@ -82,7 +82,7 @@ /* Base = 0 */ regs.setReg32(SCBPointer, 0); regs.setReg16(SCBCmd, SCBMaskAll | RxAddrLoad); - EEPRO100Utils.waitForCmdDone(regs); + regs.waitForCmdDone(); log.debug("Set RX base addr."); rxPacket = new EEPRO100RxFD(rm); rxPacket.setStatus(0x0001); @@ -96,7 +96,7 @@ rxPacket.initialize(); regs.setReg32(SCBPointer, rxPacket.getBufferAddress()); regs.setReg16(SCBCmd, SCBMaskAll | RxStart); - EEPRO100Utils.waitForCmdDone(regs); + regs.waitForCmdDone(); log.debug("Started rx process."); // Start the receiver. rxPacket.setStatus(0); @@ -111,7 +111,7 @@ * */ public final void initSingleTxRing() { - EEPRO100Utils.waitForCmdDone(regs); + regs.waitForCmdDone(); log.debug("Set TX base addr."); txFD = new EEPRO100TxFD(rm); txFD.setCommand(CmdIASetup); @@ -134,7 +134,7 @@ regs.setReg16(SCBStatus, status & IntrAllNormal); log.debug("transmitting status = " + NumberUtils.hex(status) + ", cmd=" + - NumberUtils.hex(regs.getReg16(SCBStatus)) + "\n"); + NumberUtils.hex(regs.getReg16(SCBStatus)) + '\n'); txFD.setStatus(0); txFD.setCommand(CmdSuspend | CmdTx | CmdTxFlex); @@ -146,7 +146,7 @@ regs.setReg16(SCBPointer, txFD.getBufferAddress()); regs.setReg16(SCBCmd, SCBMaskAll | CUStart); - EEPRO100Utils.waitForCmdDone(regs); + regs.waitForCmdDone(); s1 = regs.getReg16(SCBStatus); // TODO wait 10 ms for transmiting; @@ -173,7 +173,7 @@ regs.setReg16(SCBPointer, rxPacket.getStatus()); regs.setReg16(SCBCmd, SCBMaskAll | RxStart); - EEPRO100Utils.waitForCmdDone(regs); + regs.waitForCmdDone(); log.debug("Got a packet: Len=" + NumberUtils.hex(rxPacket.getCount())); @@ -204,7 +204,7 @@ txRing[txEntry].setCount(getTxThreshold()); // EEPRO100TxFD lastCmd0 = lastCmd; lastCmd = txRing[txEntry]; - EEPRO100Utils.waitForCmdDone(regs); + regs.waitForCmdDone(); regs.setReg8(SCBCmd, CUResume); } Modified: trunk/net/src/driver/org/jnode/driver/net/eepro100/EEPRO100Core.java =================================================================== --- trunk/net/src/driver/org/jnode/driver/net/eepro100/EEPRO100Core.java 2012-03-27 15:16:35 UTC (rev 5893) +++ trunk/net/src/driver/org/jnode/driver/net/eepro100/EEPRO100Core.java 2012-03-28 14:03:32 UTC (rev 5894) @@ -468,7 +468,7 @@ int status; if ((buffers.getCurRx() - buffers.getDirtyRx()) > 15) { - log.debug("curRx > dirtyRx " + buffers.getCurRx() + " " + buffers.getDirtyRx()); + log.debug("curRx > dirtyRx " + buffers.getCurRx() + ' ' + buffers.getDirtyRx()); } do { Modified: trunk/net/src/driver/org/jnode/driver/net/eepro100/EEPRO100Flags.java =================================================================== --- trunk/net/src/driver/org/jnode/driver/net/eepro100/EEPRO100Flags.java 2012-03-27 15:16:35 UTC (rev 5893) +++ trunk/net/src/driver/org/jnode/driver/net/eepro100/EEPRO100Flags.java 2012-03-28 14:03:32 UTC (rev 5894) @@ -45,6 +45,7 @@ /* (non-Javadoc) * @see org.jnode.driver.net.ethernet.Flags#getName() */ + @Override public String getName() { return this.name; } Modified: trunk/net/src/driver/org/jnode/driver/net/eepro100/EEPRO100Registers.java =================================================================== --- trunk/net/src/driver/org/jnode/driver/net/eepro100/EEPRO100Registers.java 2012-03-27 15:16:35 UTC (rev 5893) +++ trunk/net/src/driver/org/jnode/driver/net/eepro100/EEPRO100Registers.java 2012-03-28 14:03:32 UTC (rev 5894) @@ -20,13 +20,17 @@ package org.jnode.driver.net.eepro100; +import org.apache.log4j.Logger; import org.jnode.system.resource.IOResource; +import org.jnode.util.NumberUtils; /** * @author flesire */ -public class EEPRO100Registers { +public class EEPRO100Registers implements EEPRO100Constants { + protected static final Logger log = Logger.getLogger(EEPRO100Registers.class); + /** * Start of IO address space */ @@ -53,7 +57,7 @@ * @param value */ - public final void setReg8(int reg, int value) { + public void setReg8(int reg, int value) { io.outPortByte(iobase + reg, value); } @@ -64,7 +68,7 @@ * @param value */ - public final void setReg16(int reg, int value) { + public void setReg16(int reg, int value) { io.outPortWord(iobase + reg, value); } @@ -75,7 +79,7 @@ * @param value */ - public final void setReg32(int reg, int value) { + public void setReg32(int reg, int value) { io.outPortDword(iobase + reg, value); } @@ -84,7 +88,7 @@ * * @param reg */ - public final int getReg16(int reg) { + public int getReg16(int reg) { return io.inPortWord(iobase + reg); } @@ -107,4 +111,23 @@ return io.inPortByte(iobase + reg); } + /** + * Wait for the command unit to accept a command. + */ + public void waitForCmdDone() { + int wait = 0; + int delayed_cmd; + do { + if (getReg8(SCBCmd) == 0) + return; + } while (++wait <= 100); + delayed_cmd = getReg8(SCBCmd); + do { + if (getReg8(SCBCmd) == 0) + break; + } while (++wait <= 10000); + log.debug("Command " + NumberUtils.hex(delayed_cmd) + " was not immediately accepted, " + + wait + " ticks!"); + } + } Modified: trunk/net/src/driver/org/jnode/driver/net/eepro100/EEPRO100Stats.java =================================================================== --- trunk/net/src/driver/org/jnode/driver/net/eepro100/EEPRO100Stats.java 2012-03-27 15:16:35 UTC (rev 5893) +++ trunk/net/src/driver/org/jnode/driver/net/eepro100/EEPRO100Stats.java 2012-03-28 14:03:32 UTC (rev 5894) @@ -97,7 +97,7 @@ rx_fifo_errors += mem.getInt(52); rx_length_errors += mem.getInt(60); mem.setInt(64, 0); - EEPRO100Utils.waitForCmdDone(regs); + regs.waitForCmdDone(); regs.setReg8(SCBCmd, CUDumpStats); } } Modified: trunk/net/src/driver/org/jnode/driver/net/eepro100/EEPRO100TxFD.java =================================================================== --- trunk/net/src/driver/org/jnode/driver/net/eepro100/EEPRO100TxFD.java 2012-03-27 15:16:35 UTC (rev 5893) +++ trunk/net/src/driver/org/jnode/driver/net/eepro100/EEPRO100TxFD.java 2012-03-28 14:03:32 UTC (rev 5894) @@ -156,16 +156,16 @@ StringBuilder str = new StringBuilder(); str.append("Status : "); str.append(NumberUtils.hex(this.getStatus())); - str.append("\n"); + str.append('\n'); str.append("Command : "); str.append(NumberUtils.hex(this.getCommand())); - str.append("\n"); + str.append('\n'); str.append("Link : "); str.append(NumberUtils.hex(this.getLink())); - str.append("\n"); + str.append('\n'); str.append("Count : "); str.append(NumberUtils.hex(this.getCount())); - str.append("\n"); + str.append('\n'); return str.toString(); } } Deleted: trunk/net/src/driver/org/jnode/driver/net/eepro100/EEPRO100Utils.java =================================================================== --- trunk/net/src/driver/org/jnode/driver/net/eepro100/EEPRO100Utils.java 2012-03-27 15:16:35 UTC (rev 5893) +++ trunk/net/src/driver/org/jnode/driver/net/eepro100/EEPRO100Utils.java 2012-03-28 14:03:32 UTC (rev 5894) @@ -1,55 +0,0 @@ -/* - * $Id$ - * - * Copyright (C) 2003-2010 JNode.org - * - * This library is free software; you can redistribute it and/or modify it - * under the terms of the GNU Lesser General Public License as published - * by the Free Software Foundation; either version 2.1 of the License, or - * (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public - * License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this library; If not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ - -package org.jnode.driver.net.eepro100; - -import org.apache.log4j.Logger; -import org.jnode.util.NumberUtils; - -/** - * @author flesire - */ -public class EEPRO100Utils implements EEPRO100Constants { - /** - * Logger - */ - protected static final Logger log = Logger.getLogger(EEPRO100Utils.class); - - /** - * Wait for the command unit to accept a command. - * - * @param regs - */ - static final void waitForCmdDone(EEPRO100Registers regs) { - int wait = 0; - int delayed_cmd; - do { - if (regs.getReg8(SCBCmd) == 0) - return; - } while (++wait <= 100); - delayed_cmd = regs.getReg8(SCBCmd); - do { - if (regs.getReg8(SCBCmd) == 0) - break; - } while (++wait <= 10000); - log.debug("Command " + NumberUtils.hex(delayed_cmd) + " was not immediately accepted, " + - wait + " ticks!"); - } -} Modified: trunk/net/src/driver/org/jnode/driver/net/prism2/Prism2Core.java =================================================================== --- trunk/net/src/driver/org/jnode/driver/net/prism2/Prism2Core.java 2012-03-27 15:16:35 UTC (rev 5893) +++ trunk/net/src/driver/org/jnode/driver/net/prism2/Prism2Core.java 2012-03-28 14:03:32 UTC (rev 5894) @@ -20,30 +20,7 @@ package org.jnode.driver.net.prism2; -import static org.jnode.driver.net.prism2.Prism2Constants.Command.ACCESS; -import static org.jnode.driver.net.prism2.Prism2Constants.Command.ALLOC; -import static org.jnode.driver.net.prism2.Prism2Constants.Command.DISABLE; -import static org.jnode.driver.net.prism2.Prism2Constants.Command.ENABLE; -import static org.jnode.driver.net.prism2.Prism2Constants.Command.INIT; -import static org.jnode.driver.net.prism2.Prism2Constants.Command.TX; -import static org.jnode.driver.net.prism2.Prism2Constants.LinkStatus.CONNECTED; -import static org.jnode.driver.net.prism2.Prism2Constants.LinkStatus.NOTCONNECTED; -import static org.jnode.driver.net.prism2.Prism2Constants.RecordID.CNFAUTHENTICATION; -import static org.jnode.driver.net.prism2.Prism2Constants.RecordID.CNFMAXDATALEN; -import static org.jnode.driver.net.prism2.Prism2Constants.RecordID.CNFOWNMACADDR; -import static org.jnode.driver.net.prism2.Prism2Constants.RecordID.CNFPORTTYPE; -import static org.jnode.driver.net.prism2.Prism2Constants.RecordID.CURRENTBSSID; -import static org.jnode.driver.net.prism2.Prism2Constants.RecordID.CURRENTSSID; -import static org.jnode.driver.net.prism2.Prism2Constants.RecordID.TXRATECNTL; -import static org.jnode.driver.net.prism2.Prism2Constants.Register.ALLOCFID; -import static org.jnode.driver.net.prism2.Prism2Constants.Register.EVACK; -import static org.jnode.driver.net.prism2.Prism2Constants.Register.EVSTAT; -import static org.jnode.driver.net.prism2.Prism2Constants.Register.INFOFID; -import static org.jnode.driver.net.prism2.Prism2Constants.Register.INTEN; -import static org.jnode.driver.net.prism2.Prism2Constants.Register.RXFID; - import javax.naming.NameNotFoundException; - import org.jnode.driver.Device; import org.jnode.driver.DriverException; import org.jnode.driver.bus.pci.PCIBaseAddress; @@ -73,6 +50,28 @@ import org.vmmagic.unboxed.Extent; import org.vmmagic.unboxed.MagicUtils; +import static org.jnode.driver.net.prism2.Prism2Constants.Command.ACCESS; +import static org.jnode.driver.net.prism2.Prism2Constants.Command.ALLOC; +import static org.jnode.driver.net.prism2.Prism2Constants.Command.DISABLE; +import static org.jnode.driver.net.prism2.Prism2Constants.Command.ENABLE; +import static org.jnode.driver.net.prism2.Prism2Constants.Command.INIT; +import static org.jnode.driver.net.prism2.Prism2Constants.Command.TX; +import static org.jnode.driver.net.prism2.Prism2Constants.LinkStatus.CONNECTED; +import static org.jnode.driver.net.prism2.Prism2Constants.LinkStatus.NOTCONNECTED; +import static org.jnode.driver.net.prism2.Prism2Constants.RecordID.CNFAUTHENTICATION; +import static org.jnode.driver.net.prism2.Prism2Constants.RecordID.CNFMAXDATALEN; +import static org.jnode.driver.net.prism2.Prism2Constants.RecordID.CNFOWNMACADDR; +import static org.jnode.driver.net.prism2.Prism2Constants.RecordID.CNFPORTTYPE; +import static org.jnode.driver.net.prism2.Prism2Constants.RecordID.CURRENTBSSID; +import static org.jnode.driver.net.prism2.Prism2Constants.RecordID.CURRENTSSID; +import static org.jnode.driver.net.prism2.Prism2Constants.RecordID.TXRATECNTL; +import static org.jnode.driver.net.prism2.Prism2Constants.Register.ALLOCFID; +import static org.jnode.driver.net.prism2.Prism2Constants.Register.EVACK; +import static org.jnode.driver.net.prism2.Prism2Constants.Register.EVSTAT; +import static org.jnode.driver.net.prism2.Prism2Constants.Register.INFOFID; +import static org.jnode.driver.net.prism2.Prism2Constants.Register.INTEN; +import static org.jnode.driver.net.prism2.Prism2Constants.Register.RXFID; + /** * @author Ewout Prangsma (ep...@us...) */ @@ -317,7 +316,7 @@ // Validate the record length if ((Prism2Record.getRecordLength(hdr, 0) - 1) * 2 != len) { - throw new DriverException("Mismatch in record length. " + len + "/" + throw new DriverException("Mismatch in record length. " + len + '/' + Prism2Record.getRecordLength(hdr, 0)); } @@ -394,7 +393,7 @@ final byte[] macAddr = new byte[CNFOWNMACADDR.getRecordLength()]; getConfig(CNFOWNMACADDR, macAddr, 0, CNFOWNMACADDR.getRecordLength()); this.hwAddress = new EthernetAddress(macAddr, 0); - log.info("MAC-address for " + flags.getName() + " " + hwAddress); + log.info("MAC-address for " + flags.getName() + ' ' + hwAddress); // Set maximum data length setConfig16(CNFMAXDATALEN, WLAN_DATA_MAXLEN); Modified: trunk/net/src/driver/org/jnode/driver/net/spi/AbstractNetDriver.java =================================================================== --- trunk/net/src/driver/org/jnode/driver/net/spi/AbstractNetDriver.java 2012-03-27 15:16:35 UTC (rev 5893) +++ trunk/net/src/driver/org/jnode/driver/net/spi/AbstractNetDriver.java 2012-03-28 14:03:32 UTC (rev 5894) @@ -22,9 +22,7 @@ import java.io.PrintWriter; import java.util.HashMap; - import javax.naming.NameNotFoundException; - import org.apache.log4j.Logger; import org.jnode.driver.Device; import org.jnode.driver.DeviceAlreadyRegisteredException; @@ -101,9 +99,9 @@ if (renameToDevicePrefixOnly()) { dm.rename(device, getDevicePrefix(), true); } else { - final String prefix = getDevicePrefix() + "-"; + final String prefix = getDevicePrefix() + '-'; if (!device.getId().startsWith(prefix)) { - dm.rename(device, getDevicePrefix() + "-" + device.getId(), false); + dm.rename(device, getDevicePrefix() + '-' + device.getId(), false); } } } catch (DeviceAlreadyRegisteredException ex) { @@ -263,7 +261,7 @@ if (!protocolAddresses.isEmpty()) { out.println("Protocol addresses:"); for (int protId : protocolAddresses.keySet()) { - out.println(" 0x" + NumberUtils.hex(protId, 4) + " " + out.println(" 0x" + NumberUtils.hex(protId, 4) + ' ' + getProtocolAddressInfo(protId)); } } Modified: trunk/net/src/driver/org/jnode/driver/net/usb/bluetooth/UsbBluetoothDriver.java =================================================================== --- trunk/net/src/driver/org/jnode/driver/net/usb/bluetooth/UsbBluetoothDriver.java 2012-03-27 15:16:35 UTC (rev 5893) +++ trunk/net/src/driver/org/jnode/driver/net/usb/bluetooth/UsbBluetoothDriver.java 2012-03-28 14:03:32 UTC (rev 5894) @@ -130,7 +130,7 @@ StringBuilder buffer = new StringBuilder(); buffer.append("Data received : "); for (byte aData : data) { - buffer.append(NumberUtils.hex(data[0], 2)).append(" "); + buffer.append(NumberUtils.hex(data[0], 2)).append(' '); } log.debug(buffer.toString()); } Modified: trunk/net/src/driver/org/jnode/driver/net/via_rhine/ViaRhineCore.java =================================================================== --- trunk/net/src/driver/org/jnode/driver/net/via_rhine/ViaRhineCore.java 2012-03-27 15:16:35 UTC (rev 5893) +++ trunk/net/src/driver/org/jnode/driver/net/via_rhine/ViaRhineCore.java 2012-03-28 14:03:32 UTC (rev 5894) @@ -32,6 +32,19 @@ import org.jnode.driver.bus.pci.PCIHeaderType0; import org.jnode.driver.net.ethernet.spi.Flags; import org.jnode.driver.net.spi.AbstractDeviceCore; +import org.jnode.naming.InitialNaming; +import org.jnode.net.HardwareAddress; +import org.jnode.net.SocketBuffer; +import org.jnode.net.ethernet.EthernetAddress; +import org.jnode.system.resource.IOResource; +import org.jnode.system.resource.IRQHandler; +import org.jnode.system.resource.IRQResource; +import org.jnode.system.resource.ResourceManager; +import org.jnode.system.resource.ResourceNotFreeException; +import org.jnode.system.resource.ResourceOwner; +import org.jnode.util.NumberUtils; +import org.jnode.util.TimeoutException; + import static org.jnode.driver.net.via_rhine.ViaRhineConstants.CFGD_CFDX; import static org.jnode.driver.net.via_rhine.ViaRhineConstants.CR1_SFRST; import static org.jnode.driver.net.via_rhine.ViaRhineConstants.CR1_TDMD1; @@ -83,19 +96,7 @@ import static org.jnode.driver.net.via_rhine.ViaRhineConstants.dwCurrentRxDescAddr; import static org.jnode.driver.net.via_rhine.ViaRhineConstants.dwCurrentTxDescAddr; import static org.jnode.driver.net.via_rhine.ViaRhineConstants.wMIIDATA; -import org.jnode.naming.InitialNaming; -import org.jnode.net.HardwareAddress; -import org.jnode.net.SocketBuffer; -import org.jnode.net.ethernet.EthernetAddress; import static org.jnode.net.ethernet.EthernetConstants.ETH_ALEN; -import org.jnode.system.resource.IOResource; -import org.jnode.system.resource.IRQHandler; -import org.jnode.system.resource.IRQResource; -import org.jnode.system.resource.ResourceManager; -import org.jnode.system.resource.ResourceNotFreeException; -import org.jnode.system.resource.ResourceOwner; -import org.jnode.util.NumberUtils; -import org.jnode.util.TimeoutException; /** * @author Levente S\u00e1ntha @@ -225,7 +226,7 @@ log.debug("New packet"); log.debug(packet.getLinkLayerHeader().getSourceAddress()); log.debug(packet.getLinkLayerHeader().getDestinationAddress()); - log.debug("\n" + hexDump(packet.toByteArray()) + "\n"); + log.debug('\n' + hexDump(packet.toByteArray()) + '\n'); rxRing.currentDesc().setOwnBit(); rxRing.next(); } @@ -676,7 +677,7 @@ // hwAddress.writeTo(buf, 6); txRing.currentDesc().setOwnBit(); txRing.currentDesc().setPacket(buf); - log.debug("\n" + hexDump(buf.toByteArray()) + "\n"); + log.debug('\n' + hexDump(buf.toByteArray()) + '\n'); int CR1bak = getReg8(byCR1); @@ -763,9 +764,9 @@ else sb.append(" "); if ((i + 1) < rowlen) - sb.append(" "); + sb.append(' '); if ((i + 1) == rowlen / 2) - sb.append(" "); + sb.append(' '); } sb.append(" |"); @@ -776,12 +777,12 @@ if ((c >= ' ') && (c < (char) 0x7f)) sb.append(c); else - sb.append("."); + sb.append('.'); } else - sb.append(" "); + sb.append(' '); } - sb.append("|"); + sb.append('|'); left -= sz; ofs += sz; Modified: trunk/net/src/net/org/jnode/net/SocketBuffer.java =================================================================== --- trunk/net/src/net/org/jnode/net/SocketBuffer.java 2012-03-27 15:16:35 UTC (rev 5893) +++ trunk/net/src/net/org/jnode/net/SocketBuffer.java 2012-03-28 14:03:32 UTC (rev 5894) @@ -171,9 +171,7 @@ size += count; } else { setSize(size + count); - for (int i = size - 1; i >= count; i--) { - data[start + i] = data[start + i - count]; - } + System.arraycopy(data, start + count - count, data, start + count, size - 1 - count); } for (int i = 0; i < count; i++) { data[st... [truncated message content] |
From: <ga...@us...> - 2012-03-27 15:16:51
|
Revision: 5893 http://jnode.svn.sourceforge.net/jnode/?rev=5893&view=rev Author: galatnm Date: 2012-03-27 15:16:35 +0000 (Tue, 27 Mar 2012) Log Message: ----------- Various clean up for performance. Modified Paths: -------------- trunk/cli/src/commands/org/jnode/command/system/JavaCommand.java trunk/cli/src/commands/org/jnode/command/system/PageCommand.java trunk/core/src/core/org/jnode/assembler/x86/X86BinaryAssembler.java trunk/core/src/core/org/jnode/assembler/x86/X86TextAssembler.java trunk/core/src/core/org/jnode/debugger/ThreadState.java trunk/core/src/core/org/jnode/log4j/config/VirtualConsoleAppender.java trunk/core/src/core/org/jnode/plugin/AutoUnzipPlugin.java trunk/core/src/core/org/jnode/plugin/PluginLoader.java trunk/core/src/core/org/jnode/plugin/PluginUtils.java trunk/core/src/core/org/jnode/plugin/model/ExtensionModel.java trunk/core/src/core/org/jnode/plugin/model/ExtensionPointModel.java trunk/core/src/core/org/jnode/plugin/model/PluginClassLoaderImpl.java trunk/core/src/core/org/jnode/util/BinaryScaleFactor.java trunk/core/src/core/org/jnode/util/DecimalScaleFactor.java trunk/core/src/core/org/jnode/util/JarBuffer.java trunk/core/src/core/org/jnode/util/NumberUtils.java trunk/core/src/core/org/jnode/vm/IOResourceImpl.java trunk/core/src/core/org/jnode/vm/VmStackFrame.java trunk/core/src/core/org/jnode/vm/VmSystem.java trunk/core/src/core/org/jnode/vm/VmSystemClassLoader.java trunk/core/src/core/org/jnode/vm/bytecode/BasicBlockFinder.java trunk/core/src/core/org/jnode/vm/bytecode/BytecodeParser.java trunk/core/src/core/org/jnode/vm/bytecode/BytecodeViewer.java trunk/core/src/core/org/jnode/vm/classmgr/ClassDecoder.java trunk/core/src/core/org/jnode/vm/classmgr/Signature.java trunk/core/src/core/org/jnode/vm/classmgr/VmConstMemberRef.java trunk/core/src/core/org/jnode/vm/classmgr/VmField.java trunk/core/src/core/org/jnode/vm/classmgr/VmLocalVariableTable.java trunk/core/src/core/org/jnode/vm/classmgr/VmMethod.java trunk/core/src/core/org/jnode/vm/classmgr/VmType.java trunk/core/src/core/org/jnode/vm/compiler/CompilerBytecodeViewer.java trunk/core/src/core/org/jnode/vm/compiler/ir/IRBasicBlock.java trunk/core/src/core/org/jnode/vm/compiler/ir/IRControlFlowGraph.java trunk/core/src/core/org/jnode/vm/compiler/ir/LiveRange.java trunk/core/src/core/org/jnode/vm/compiler/ir/NativeTest.java trunk/core/src/core/org/jnode/vm/compiler/ir/PhiOperand.java trunk/core/src/core/org/jnode/vm/compiler/ir/quad/BinaryQuad.java trunk/core/src/core/org/jnode/vm/compiler/ir/quad/ConditionalBranchQuad.java trunk/core/src/core/org/jnode/vm/compiler/ir/quad/UnaryQuad.java trunk/core/src/core/org/jnode/vm/isolate/IsolateStatusImpl.java trunk/core/src/core/org/jnode/vm/isolate/VmIsolate.java trunk/core/src/core/org/jnode/vm/memmgr/VmHeapManager.java trunk/core/src/core/org/jnode/vm/memmgr/def/DefGCStatistics.java trunk/core/src/core/org/jnode/vm/objects/CounterGroup.java trunk/core/src/core/org/jnode/vm/objects/SynchronizedCounter.java trunk/core/src/core/org/jnode/vm/scheduler/VmThread.java trunk/core/src/core/org/jnode/vm/x86/GDT.java trunk/core/src/core/org/jnode/vm/x86/IOAPIC.java trunk/core/src/core/org/jnode/vm/x86/MPInterruptAssignmentEntry.java trunk/core/src/core/org/jnode/vm/x86/VmX86Processor.java trunk/core/src/core/org/jnode/vm/x86/compiler/X86CompilerHelper.java trunk/core/src/core/org/jnode/vm/x86/compiler/l1a/Item.java trunk/core/src/core/org/jnode/vm/x86/compiler/l1a/ItemStack.java trunk/core/src/core/org/jnode/vm/x86/compiler/l1a/X86BytecodeVisitor.java trunk/core/src/core/org/jnode/vm/x86/compiler/l1a/X86RegisterPool.java trunk/core/src/core/org/jnode/vm/x86/compiler/l1b/Item.java trunk/core/src/core/org/jnode/vm/x86/compiler/l1b/ItemStack.java trunk/core/src/core/org/jnode/vm/x86/compiler/l1b/X86BytecodeVisitor.java trunk/core/src/core/org/jnode/vm/x86/compiler/l1b/X86RegisterPool.java trunk/core/src/driver/org/jnode/driver/bus/firewire/FireWireDevice.java trunk/core/src/driver/org/jnode/driver/bus/pci/PCIBaseAddress.java trunk/core/src/driver/org/jnode/driver/bus/pci/PCIDescriptors.java trunk/core/src/driver/org/jnode/driver/bus/pci/PCIDevice.java trunk/core/src/driver/org/jnode/driver/bus/pci/PCIDriver.java trunk/core/src/driver/org/jnode/driver/bus/pci/PCIHeaderType0.java trunk/core/src/driver/org/jnode/driver/bus/pci/PCIRomAddress.java trunk/core/src/driver/org/jnode/driver/bus/pci/VendorDescriptor.java trunk/core/src/driver/org/jnode/driver/bus/pcmcia/CardBusDevice.java trunk/core/src/driver/org/jnode/driver/bus/smbus/DIMM.java trunk/core/src/driver/org/jnode/driver/bus/smbus/DIMMDriver.java trunk/core/src/driver/org/jnode/driver/bus/usb/ConfigurationDescriptor.java trunk/core/src/driver/org/jnode/driver/bus/usb/DeviceDescriptor.java trunk/core/src/driver/org/jnode/driver/bus/usb/EndPointDescriptor.java trunk/core/src/driver/org/jnode/driver/bus/usb/InterfaceDescriptor.java trunk/core/src/driver/org/jnode/driver/bus/usb/USBConfiguration.java trunk/core/src/driver/org/jnode/driver/bus/usb/USBInterface.java trunk/core/src/driver/org/jnode/driver/bus/usb/uhci/QueueHead.java trunk/core/src/driver/org/jnode/driver/bus/usb/uhci/Schedule.java trunk/core/src/driver/org/jnode/driver/bus/usb/uhci/TransferDescriptor.java trunk/core/src/driver/org/jnode/driver/bus/usb/uhci/UHCIControlRequest.java trunk/core/src/driver/org/jnode/driver/console/spi/AbstractConsoleManager.java trunk/core/src/driver/org/jnode/driver/input/Key.java trunk/core/src/driver/org/jnode/driver/input/KeyboardLayoutManager.java trunk/core/src/driver/org/jnode/driver/input/Keys.java trunk/core/src/driver/org/jnode/driver/input/PointerEvent.java trunk/core/src/driver/org/jnode/driver/system/acpi/AcpiDriver.java trunk/core/src/driver/org/jnode/driver/system/acpi/AcpiSystemTable.java trunk/core/src/driver/org/jnode/driver/system/acpi/AcpiTable.java trunk/core/src/driver/org/jnode/driver/system/acpi/GenericAddress.java trunk/core/src/driver/org/jnode/driver/system/acpi/aml/ParseNode.java trunk/core/src/driver/org/jnode/driver/system/acpi/aml/Parser.java trunk/core/src/driver/org/jnode/driver/system/acpi/vm/Device.java trunk/net/src/driver/org/jnode/driver/net/_3c90x/_3c90xCore.java trunk/net/src/driver/org/jnode/driver/net/via_rhine/ViaRhineRing.java Modified: trunk/cli/src/commands/org/jnode/command/system/JavaCommand.java =================================================================== --- trunk/cli/src/commands/org/jnode/command/system/JavaCommand.java 2012-03-26 12:56:18 UTC (rev 5892) +++ trunk/cli/src/commands/org/jnode/command/system/JavaCommand.java 2012-03-27 15:16:35 UTC (rev 5893) @@ -29,7 +29,6 @@ import java.lang.reflect.Modifier; import java.net.MalformedURLException; import java.net.URL; - import org.jnode.shell.AbstractCommand; import org.jnode.shell.syntax.Argument; import org.jnode.shell.syntax.ClassNameArgument; @@ -143,17 +142,21 @@ } } - private URL findResource(String name, String[] dirs) + private URL findResource(String name, String[] dirs) throws MalformedURLException { - for (int i = 0; i < dirs.length; i++) { - File d = new File(dirs[i]); - if (d.isDirectory()) { - return findResource(name, d.list()); - } else if (d.getName().equals(name)) { - return d.toURI().toURL(); + findResource: + while (true) { + for (int i = 0; i < dirs.length; i++) { + File d = new File(dirs[i]); + if (d.isDirectory()) { + dirs = d.list(); + continue findResource; + } else if (d.getName().equals(name)) { + return d.toURI().toURL(); + } } + return null; } - return null; } private byte[] loadClassData(String name) throws ClassNotFoundException { Modified: trunk/cli/src/commands/org/jnode/command/system/PageCommand.java =================================================================== --- trunk/cli/src/commands/org/jnode/command/system/PageCommand.java 2012-03-26 12:56:18 UTC (rev 5892) +++ trunk/cli/src/commands/org/jnode/command/system/PageCommand.java 2012-03-27 15:16:35 UTC (rev 5893) @@ -33,9 +33,7 @@ import java.util.regex.Matcher; import java.util.regex.Pattern; import java.util.regex.PatternSyntaxException; - import javax.naming.NameNotFoundException; - import org.jnode.driver.console.ConsoleManager; import org.jnode.driver.console.TextConsole; import org.jnode.driver.console.textscreen.TextScreenConsoleManager; @@ -498,25 +496,28 @@ /** * Prepare lines for output by painting them to our private buffer in the forward * direction starting at a given line number and (rendered) subline number. - * + * * @param startLineNo */ private ScreenBuffer prepare(int startLineNo, int startSublineNo) { - ScreenBuffer buffer = new ScreenBuffer(true); - int lineNo = startLineNo; - boolean more; - do { - String line = lineStore.getLine(lineNo); - if (line == null) { - break; + while (true) { + ScreenBuffer buffer = new ScreenBuffer(true); + int lineNo = startLineNo; + boolean more; + do { + String line = lineStore.getLine(lineNo); + if (line == null) { + break; + } + more = prepareLine(line, lineNo, buffer); + lineNo++; + } while (more); + if (buffer.adjust(startLineNo, startSublineNo) || startLineNo == 0) { + return buffer; + } else { + startLineNo -= 1; + startSublineNo = LAST_SUBLINE; } - more = prepareLine(line, lineNo, buffer); - lineNo++; - } while (more); - if (buffer.adjust(startLineNo, startSublineNo) || startLineNo == 0) { - return buffer; - } else { - return prepare(startLineNo - 1, LAST_SUBLINE); } } Modified: trunk/core/src/core/org/jnode/assembler/x86/X86BinaryAssembler.java =================================================================== --- trunk/core/src/core/org/jnode/assembler/x86/X86BinaryAssembler.java 2012-03-26 12:56:18 UTC (rev 5892) +++ trunk/core/src/core/org/jnode/assembler/x86/X86BinaryAssembler.java 2012-03-27 15:16:35 UTC (rev 5893) @@ -20,20 +20,12 @@ package org.jnode.assembler.x86; -import static org.jnode.assembler.x86.X86Register.CS; -import static org.jnode.assembler.x86.X86Register.DS; -import static org.jnode.assembler.x86.X86Register.ES; -import static org.jnode.assembler.x86.X86Register.FS; -import static org.jnode.assembler.x86.X86Register.GS; -import static org.jnode.assembler.x86.X86Register.SS; - import java.io.IOException; import java.io.OutputStream; import java.util.Collection; import java.util.HashMap; import java.util.LinkedList; import java.util.Map; - import org.jnode.assembler.BootImageNativeStream; import org.jnode.assembler.Label; import org.jnode.assembler.NativeStream; @@ -52,6 +44,13 @@ import org.jnode.vm.classmgr.VmType; import org.jnode.vm.x86.X86CpuID; +import static org.jnode.assembler.x86.X86Register.CS; +import static org.jnode.assembler.x86.X86Register.DS; +import static org.jnode.assembler.x86.X86Register.ES; +import static org.jnode.assembler.x86.X86Register.FS; +import static org.jnode.assembler.x86.X86Register.GS; +import static org.jnode.assembler.x86.X86Register.SS; + /** * Implementation of AbstractX86Stream. * @@ -247,12 +246,12 @@ */ public void setOffset(int offset) { if (this.dataOffset != -1) { - if ("".equals(getObject().toString())) { + if (getObject().toString().isEmpty()) { return; } throw new RuntimeException( "Offset is already set. Duplicate labels? (" - + getObject() + ")"); + + getObject() + ')'); } if (offset < 0) { throw new IllegalArgumentException("Offset: " + offset); @@ -292,7 +291,7 @@ // System.out.println("offset " + offset); final int distance = offset - addr - 1; //get8(addr); if (!X86Utils.isByte(distance)) { - throw new IllegalArgumentException("Jump out of byte-range (" + distance + ")"); + throw new IllegalArgumentException("Jump out of byte-range (" + distance + ')'); } if (isRelJump() && (distance == 0)) { // JMP @@ -2219,7 +2218,7 @@ write8(distance); } else { throw new UnresolvedObjectRefException("Label " + label - + " is out of range (distance " + distance + ")"); + + " is out of range (distance " + distance + ')'); } } catch (UnresolvedObjectRefException x) { throw new RuntimeException(x); @@ -2478,7 +2477,7 @@ write8(distance); } else { throw new UnresolvedObjectRefException("Label " + label - + " is out of range (distance " + distance + ")"); + + " is out of range (distance " + distance + ')'); } } else { throw new UnresolvedObjectRefException("Label " + label Modified: trunk/core/src/core/org/jnode/assembler/x86/X86TextAssembler.java =================================================================== --- trunk/core/src/core/org/jnode/assembler/x86/X86TextAssembler.java 2012-03-26 12:56:18 UTC (rev 5892) +++ trunk/core/src/core/org/jnode/assembler/x86/X86TextAssembler.java 2012-03-27 15:16:35 UTC (rev 5893) @@ -25,7 +25,6 @@ import java.io.PrintWriter; import java.io.Writer; import java.util.Collection; - import org.jnode.assembler.Label; import org.jnode.assembler.NativeStream; import org.jnode.assembler.ObjectResolver; @@ -308,7 +307,7 @@ } public ObjectRef setObjectRef(Object label) { - println(label(label) + ":"); + println(label(label) + ':'); return new ObjectRefImpl(label); } @@ -364,11 +363,11 @@ * @param imm32 */ public void writeADC(GPR dstReg, int imm32) { - println("\tadc " + dstReg + "," + imm32); + println("\tadc " + dstReg + ',' + imm32); } public void writeADC(int operandSize, GPR dstReg, int dstDisp, int imm32) { - println("\tadc " + size(operandSize) + "[" + dstReg + disp(dstDisp) + println("\tadc " + size(operandSize) + '[' + dstReg + disp(dstDisp) + "]," + imm32); } @@ -383,7 +382,7 @@ * @param srcReg */ public void writeADC(GPR dstReg, GPR srcReg) { - println("\tadc " + dstReg + "," + srcReg); + println("\tadc " + dstReg + ',' + srcReg); } /** @@ -394,7 +393,7 @@ * @param srcDisp */ public void writeADC(GPR dstReg, GPR srcReg, int srcDisp) { - println("\tadc " + dstReg + ",[" + srcReg + disp(srcDisp) + "]"); + println("\tadc " + dstReg + ",[" + srcReg + disp(srcDisp) + ']'); } // LS @@ -407,7 +406,7 @@ } public void writeADD(int operandSize, int dstDisp, int imm32) { - println("\tadd " + size(operandSize) + "[" + disp(dstDisp) + println("\tadd " + size(operandSize) + '[' + disp(dstDisp) + "],0x" + NumberUtils.hex(imm32)); } @@ -419,17 +418,17 @@ * @param imm32 */ public void writeADD(int operandSize, GPR dstReg, int dstDisp, int imm32) { - println("\tadd " + size(operandSize) + "[" + dstReg + disp(dstDisp) + println("\tadd " + size(operandSize) + '[' + dstReg + disp(dstDisp) + "],0x" + NumberUtils.hex(imm32)); } public void writeADD(int operandSize, SR dstReg, int dstDisp, int imm32) { - println("\tadd " + size(operandSize) + "[" + dstReg + ":0x" + println("\tadd " + size(operandSize) + '[' + dstReg + ":0x" + NumberUtils.hex(dstDisp) + "],0x" + NumberUtils.hex(imm32)); } public void writeADD_MEM(X86Register.GPR reg, int memPtr32) { - println("\tadd " + reg + ",[0x" + NumberUtils.hex(memPtr32) + "]"); + println("\tadd " + reg + ",[0x" + NumberUtils.hex(memPtr32) + ']'); } public void writeADD(GPR dstReg, int dstDisp, GPR srcReg) { @@ -437,7 +436,7 @@ } public void writeADD(GPR dstReg, GPR srcReg) { - println("\tadd " + dstReg + "," + srcReg); + println("\tadd " + dstReg + ',' + srcReg); } /** @@ -448,7 +447,7 @@ * @param srcDisp */ public void writeADD(GPR dstReg, GPR srcReg, int srcDisp) { - println("\tadd " + dstReg + ",[" + srcReg + disp(srcDisp) + "]"); + println("\tadd " + dstReg + ",[" + srcReg + disp(srcDisp) + ']'); } public void writeAND(GPR reg, int imm32) { @@ -456,7 +455,7 @@ } public void writeAND(int operandSize, int dstDisp, int imm32) { - println("\tand " + size(operandSize) + "[" + disp(dstDisp) + println("\tand " + size(operandSize) + '[' + disp(dstDisp) + "],0x" + NumberUtils.hex(imm32)); } @@ -466,7 +465,7 @@ * @param imm32 */ public void writeAND(int operandSize, GPR dstReg, int dstDisp, int imm32) { - println("\tand " + size(operandSize) + "[" + dstReg + disp(dstDisp) + println("\tand " + size(operandSize) + '[' + dstReg + disp(dstDisp) + "],0x" + NumberUtils.hex(imm32)); } @@ -481,12 +480,12 @@ * @param imm32 */ public void writeAND(int operandSize, X86Register.SR dstReg, int dstDisp, int imm32) { - println("\tand " + size(operandSize) + "[" + dstReg + ":0x" + NumberUtils.hex(dstDisp) + println("\tand " + size(operandSize) + '[' + dstReg + ":0x" + NumberUtils.hex(dstDisp) + "],0x" + NumberUtils.hex(imm32)); } public void writeAND(GPR dstReg, GPR srcReg) { - println("\tand " + dstReg + "," + srcReg); + println("\tand " + dstReg + ',' + srcReg); } /** @@ -495,31 +494,31 @@ * @param srcDisp */ public void writeAND(GPR dstReg, GPR srcReg, int srcDisp) { - println("\tand " + dstReg + ",[" + srcReg + disp(srcDisp) + "]"); + println("\tand " + dstReg + ",[" + srcReg + disp(srcDisp) + ']'); } public void writeArithSSEDOp(int operation, XMM dst, GPR src, int srcDisp) { final String op = getSSEOperationName(operation); - println("\t" + op + "D" + dst + ", qword [" + src + disp(srcDisp) + "]"); + println('\t' + op + 'D' + dst + ", qword [" + src + disp(srcDisp) + ']'); } public void writeArithSSEDOp(int operation, XMM dst, XMM src) { final String op = getSSEOperationName(operation); - println("\t" + op + "D" + dst + ", " + src); + println('\t' + op + 'D' + dst + ", " + src); } public void writeArithSSESOp(int operation, XMM dst, GPR src, int srcDisp) { final String op = getSSEOperationName(operation); - println("\t" + op + "S" + dst + ", dword [" + src + disp(srcDisp) + "]"); + println('\t' + op + 'S' + dst + ", dword [" + src + disp(srcDisp) + ']'); } public void writeArithSSESOp(int operation, XMM dst, XMM src) { final String op = getSSEOperationName(operation); - println("\t" + op + "S" + dst + ", " + src); + println('\t' + op + 'S' + dst + ", " + src); } public void writeBOUND(GPR lReg, GPR rReg, int rDisp) { - println("\tbound " + lReg + ",[" + rReg + disp(rDisp) + "]"); + println("\tbound " + lReg + ",[" + rReg + disp(rDisp) + ']'); } public void writeBreakPoint() { @@ -540,7 +539,7 @@ * @param rawAddress If true, tablePtr is a raw address */ public void writeCALL(Object tablePtr, int offset, boolean rawAddress) { - println("\tcall [" + tablePtr + disp(offset) + "]"); + println("\tcall [" + tablePtr + disp(offset) + ']'); } public void writeCALL(GPR reg) { @@ -554,16 +553,16 @@ * @param offset */ public void writeCALL(GPR reg, int offset) { - println("\tcall [" + reg + disp(offset) + "]"); + println("\tcall [" + reg + disp(offset) + ']'); } public void writeCALL(GPR regBase, GPR regIndex, int scale, int disp) { - println("\tcall [" + regBase + "+" + regIndex + "*" + scale - + disp(disp) + "]"); + println("\tcall [" + regBase + '+' + regIndex + '*' + scale + + disp(disp) + ']'); } public void writeCALL(GPR regIndex, int scale, int disp) { - println("\tcall [" + regIndex + "*" + scale + disp(disp) + "]"); + println("\tcall [" + regIndex + '*' + scale + disp(disp) + ']'); } public void writeCDQ(int operandSize) { @@ -611,7 +610,7 @@ * @param src */ public void writeCMOVcc(int ccOpcode, GPR dst, GPR src) { - println("\tCMOV" + ccName(ccOpcode) + " " + dst + "," + src); + println("\tCMOV" + ccName(ccOpcode) + ' ' + dst + ',' + src); } /** @@ -622,8 +621,8 @@ * @param srcDisp */ public void writeCMOVcc(int ccOpcode, GPR dst, GPR src, int srcDisp) { - println("\tCMOV" + ccName(ccOpcode) + " " + dst + ",[" + src - + disp(srcDisp) + "]"); + println("\tCMOV" + ccName(ccOpcode) + ' ' + dst + ",[" + src + + disp(srcDisp) + ']'); } /** @@ -638,7 +637,7 @@ } public void writeCMP(GPR reg1, GPR reg2) { - println("\tcmp " + reg1 + "," + reg2); + println("\tcmp " + reg1 + ',' + reg2); } /** @@ -649,7 +648,7 @@ * @param disp */ public void writeCMP(GPR reg1, SR reg2, int disp) { - println("\tcmp " + reg1 + ",[" + reg2 + ":0x" + NumberUtils.hex(disp) + "]"); + println("\tcmp " + reg1 + ",[" + reg2 + ":0x" + NumberUtils.hex(disp) + ']'); } /** @@ -660,7 +659,7 @@ * @param disp */ public void writeCMP(GPR reg1, GPR reg2, int disp) { - println("\tcmp " + reg1 + ",[" + reg2 + disp(disp) + "]"); + println("\tcmp " + reg1 + ",[" + reg2 + disp(disp) + ']'); } public void writeCMP_Const(GPR reg, int imm32) { @@ -675,7 +674,7 @@ * @param imm32 */ public void writeCMP_Const(int operandSize, GPR reg, int disp, int imm32) { - println("\tcmp " + size(operandSize) + "[" + reg + disp(disp) + "],0x" + println("\tcmp " + size(operandSize) + '[' + reg + disp(disp) + "],0x" + NumberUtils.hex(imm32)); } @@ -688,7 +687,7 @@ * @param imm32 */ public void writeCMP_Const(int operandSize, X86Register.SR dstReg, int dstDisp, int imm32) { - println("\tcmp " + size(operandSize) + "[" + dstReg + ":0x" + NumberUtils.hex(dstDisp) + "],0x" + println("\tcmp " + size(operandSize) + '[' + dstReg + ":0x" + NumberUtils.hex(dstDisp) + "],0x" + NumberUtils.hex(imm32)); } @@ -702,7 +701,7 @@ } public void writeCMP_MEM(int operandSize, int memPtr, int imm32) { - println("\tcmp " + size(operandSize) + "[" + memPtr + "],0x" + println("\tcmp " + size(operandSize) + '[' + memPtr + "],0x" + NumberUtils.hex(imm32)); } @@ -713,7 +712,7 @@ * @param memPtr */ public void writeCMP_MEM(GPR reg, int memPtr) { - println("\tcmp " + reg + ", [" + memPtr + "]"); + println("\tcmp " + reg + ", [" + memPtr + ']'); } public void writeCMPXCHG_EAX(GPR dstReg, int dstDisp, GPR srcReg, @@ -730,8 +729,8 @@ } public void writeDEC(int operandSize, GPR dstReg, int dstDisp) { - println("\tdec " + size(operandSize) + "[" + dstReg + disp(dstDisp) - + "]"); + println("\tdec " + size(operandSize) + '[' + dstReg + disp(dstDisp) + + ']'); } public void writeDIV_EAX(GPR srcReg) { @@ -744,11 +743,11 @@ } public void writeFADD32(GPR srcReg, int srcDisp) { - println("\tfadd dword [" + srcReg + disp(srcDisp) + "]"); + println("\tfadd dword [" + srcReg + disp(srcDisp) + ']'); } public void writeFADD64(GPR srcReg, int srcDisp) { - println("\tfadd qword [" + srcReg + disp(srcDisp) + "]"); + println("\tfadd qword [" + srcReg + disp(srcDisp) + ']'); } public void writeFADDP(X86Register fpuReg) { @@ -760,11 +759,11 @@ } public void writeFDIV32(GPR srcReg, int srcDisp) { - println("\tfdiv dword [" + srcReg + disp(srcDisp) + "]"); + println("\tfdiv dword [" + srcReg + disp(srcDisp) + ']'); } public void writeFDIV64(GPR srcReg, int srcDisp) { - println("\tfdiv qword [" + srcReg + disp(srcDisp) + "]"); + println("\tfdiv qword [" + srcReg + disp(srcDisp) + ']'); } public void writeFDIVP(X86Register fpuReg) { @@ -776,51 +775,51 @@ } public void writeFILD32(GPR dstReg, int dstDisp) { - println("\tfild dword [" + dstReg + disp(dstDisp) + "]"); + println("\tfild dword [" + dstReg + disp(dstDisp) + ']'); } public void writeFILD64(GPR dstReg, int dstDisp) { - println("\tfild qword [" + dstReg + disp(dstDisp) + "]"); + println("\tfild qword [" + dstReg + disp(dstDisp) + ']'); } public void writeFISTP32(GPR dstReg, int dstDisp) { - println("\tfistp dword [" + dstReg + disp(dstDisp) + "]"); + println("\tfistp dword [" + dstReg + disp(dstDisp) + ']'); } public void writeFISTP64(GPR dstReg, int dstDisp) { - println("\tfistp qword [" + dstReg + disp(dstDisp) + "]"); + println("\tfistp qword [" + dstReg + disp(dstDisp) + ']'); } public void writeFLD32(GPR srcReg, int srcDisp) { - println("\tfld dword [" + srcReg + disp(srcDisp) + "]"); + println("\tfld dword [" + srcReg + disp(srcDisp) + ']'); } public void writeFLD32(GPR srcBaseReg, GPR srcIndexReg, int srcScale, int srcDisp) { println("\tfld dword [" + srcBaseReg + '+' + srcIndexReg + '*' - + srcScale + disp(srcDisp) + "]"); + + srcScale + disp(srcDisp) + ']'); } public void writeFLD64(GPR srcReg, int srcDisp) { - println("\tfld qword [" + srcReg + disp(srcDisp) + "]"); + println("\tfld qword [" + srcReg + disp(srcDisp) + ']'); } public void writeFLD64(GPR srcBaseReg, GPR srcIndexReg, int srcScale, int srcDisp) { println("\tfld qword [" + srcBaseReg + '+' + srcIndexReg + '*' - + srcScale + disp(srcDisp) + "]"); + + srcScale + disp(srcDisp) + ']'); } public void writeFLDCW(GPR srcReg, int srcDisp) { - println("\tfldcw word [" + srcReg + disp(srcDisp) + "]"); + println("\tfldcw word [" + srcReg + disp(srcDisp) + ']'); } public void writeFMUL32(GPR srcReg, int srcDisp) { - println("\tfmul dword [" + srcReg + disp(srcDisp) + "]"); + println("\tfmul dword [" + srcReg + disp(srcDisp) + ']'); } public void writeFMUL64(GPR srcReg, int srcDisp) { - println("\tfmul qword [" + srcReg + disp(srcDisp) + "]"); + println("\tfmul qword [" + srcReg + disp(srcDisp) + ']'); } public void writeFMULP(X86Register fpuReg) { @@ -832,7 +831,7 @@ } public void writeFNSAVE(GPR srcReg, int srcDisp) { - println("\tfnsave [" + srcReg + disp(srcDisp) + "]"); + println("\tfnsave [" + srcReg + disp(srcDisp) + ']'); } public void writeFNSTSW_AX() { @@ -844,11 +843,11 @@ } public void writeFRSTOR(GPR srcReg, int srcDisp) { - println("\tfrstor [" + srcReg + disp(srcDisp) + "]"); + println("\tfrstor [" + srcReg + disp(srcDisp) + ']'); } public void writeFSTCW(GPR srcReg, int srcDisp) { - println("\tfstcw word [" + srcReg + disp(srcDisp) + "]"); + println("\tfstcw word [" + srcReg + disp(srcDisp) + ']'); } public void writeFSTP(X86Register fpuReg) { @@ -856,19 +855,19 @@ } public void writeFSTP32(GPR dstReg, int dstDisp) { - println("\tfstp dword [" + dstReg + disp(dstDisp) + "]"); + println("\tfstp dword [" + dstReg + disp(dstDisp) + ']'); } public void writeFSTP64(GPR dstReg, int dstDisp) { - println("\tfstp qword [" + dstReg + disp(dstDisp) + "]"); + println("\tfstp qword [" + dstReg + disp(dstDisp) + ']'); } public void writeFSUB32(GPR srcReg, int srcDisp) { - println("\tfsub32 dword [" + srcReg + disp(srcDisp) + "]"); + println("\tfsub32 dword [" + srcReg + disp(srcDisp) + ']'); } public void writeFSUB64(GPR srcReg, int srcDisp) { - println("\tfsub64 qword [" + srcReg + disp(srcDisp) + "]"); + println("\tfsub64 qword [" + srcReg + disp(srcDisp) + ']'); } public void writeFSUBP(X86Register fpuReg) { @@ -884,11 +883,11 @@ } public void writeFXRSTOR(GPR srcReg, int srcDisp) { - println("\tfxrstor [" + srcReg + disp(srcDisp) + "]"); + println("\tfxrstor [" + srcReg + disp(srcDisp) + ']'); } public void writeFXSAVE(GPR srcReg, int srcDisp) { - println("\tfxsave [" + srcReg + disp(srcDisp) + "]"); + println("\tfxsave [" + srcReg + disp(srcDisp) + ']'); } public void writeHLT() { @@ -900,12 +899,12 @@ } public void writeIDIV_EAX(int operandSize, GPR srcReg, int srcDisp) { - println("\tidiv " + size(operandSize) + "[" + srcReg + disp(srcDisp) - + "]"); + println("\tidiv " + size(operandSize) + '[' + srcReg + disp(srcDisp) + + ']'); } public void writeIMUL(GPR dstReg, GPR srcReg) { - println("\timul " + dstReg + "," + srcReg); + println("\timul " + dstReg + ',' + srcReg); } /** @@ -914,7 +913,7 @@ * @param srcDisp */ public void writeIMUL(GPR dstReg, GPR srcReg, int srcDisp) { - println("\timul " + dstReg + ",[" + srcReg + disp(srcDisp) + "]"); + println("\timul " + dstReg + ",[" + srcReg + disp(srcDisp) + ']'); } /** @@ -923,7 +922,7 @@ * @param imm32 */ public void writeIMUL_3(GPR dstReg, GPR srcReg, int imm32) { - println("\timul " + dstReg + "," + srcReg + ",0x" + println("\timul " + dstReg + ',' + srcReg + ",0x" + NumberUtils.hex(imm32)); } @@ -945,11 +944,11 @@ public void writeIN(int operandSize) { if (operandSize == X86Constants.BITS8) { - println("\tin " + X86Register.AL + "," + X86Register.DX); + println("\tin " + X86Register.AL + ',' + X86Register.DX); } else if (operandSize == X86Constants.BITS16) { - println("\tin " + X86Register.AX + "," + X86Register.DX); + println("\tin " + X86Register.AX + ',' + X86Register.DX); } else if (operandSize == X86Constants.BITS32) { - println("\tin " + X86Register.EAX + "," + X86Register.DX); + println("\tin " + X86Register.EAX + ',' + X86Register.DX); } else { throw new IllegalArgumentException("Invalid operand size for IN: " + operandSize); } @@ -957,11 +956,11 @@ public void writeIN(int operandSize, int imm8) { if (operandSize == X86Constants.BITS8) { - println("\tin " + X86Register.AL + "," + imm8); + println("\tin " + X86Register.AL + ',' + imm8); } else if (operandSize == X86Constants.BITS16) { - println("\tin " + X86Register.AX + "," + imm8); + println("\tin " + X86Register.AX + ',' + imm8); } else if (operandSize == X86Constants.BITS32) { - println("\tin " + X86Register.EAX + "," + imm8); + println("\tin " + X86Register.EAX + ',' + imm8); } else { throw new IllegalArgumentException("Invalid operand size for IN: " + operandSize); } @@ -972,7 +971,7 @@ } public void writeINC(int operandSize, X86Register.SR dstReg, int disp) { - println("\tinc " + size(operandSize) + "[" + dstReg + ":0x" + NumberUtils.hex(disp) + "]"); + println("\tinc " + size(operandSize) + '[' + dstReg + ":0x" + NumberUtils.hex(disp) + ']'); } /** @@ -981,11 +980,11 @@ * @param dstReg */ public void writeINC(int operandSize, GPR dstReg, int disp) { - println("\tinc " + size(operandSize) + "[" + dstReg + disp(disp) + "]"); + println("\tinc " + size(operandSize) + '[' + dstReg + disp(disp) + ']'); } public void writeINC(int operandSize, GPR dstReg, GPR dstIdxReg, int scale, int disp) { - println("\tinc [" + dstReg + disp(disp) + "+" + dstIdxReg + "*" + scale + "]"); + println("\tinc [" + dstReg + disp(disp) + '+' + dstIdxReg + '*' + scale + ']'); } /** @@ -994,7 +993,7 @@ * @param dstDisp */ public void writeINC(int operandSize, int dstDisp) { - println("\tinc " + size(operandSize) + "[" + dstDisp + "]"); + println("\tinc " + size(operandSize) + '[' + dstDisp + ']'); } public void writeINT(int vector) { @@ -1006,7 +1005,7 @@ } public void writeJCC(Label label, int jumpOpcode) { - println("\tj" + ccName(jumpOpcode) + " " + label(label)); + println("\tj" + ccName(jumpOpcode) + ' ' + label(label)); } public void writeJECXZ(Label label) { @@ -1048,7 +1047,7 @@ * @param offsetReg */ public void writeJMP(Object tablePtr, GPR offsetReg) { - println("\tjmp [" + tablePtr + "+" + offsetReg + "]"); + println("\tjmp [" + tablePtr + '+' + offsetReg + ']'); } public void writeJMP(GPR reg32) { @@ -1061,33 +1060,33 @@ * @param reg32 */ public final void writeJMP(GPR reg32, int disp) { - println("\tjmp [" + reg32 + disp(disp) + "]"); + println("\tjmp [" + reg32 + disp(disp) + ']'); } public void writeLDMXCSR(GPR srcReg, int disp) { - println("\tldmxcsr dword [" + srcReg + disp(disp) + "]"); + println("\tldmxcsr dword [" + srcReg + disp(disp) + ']'); } public void writeLEA(GPR dstReg, GPR srcReg, int disp) { - println("\tlea " + dstReg + ",[" + srcReg + disp(disp) + "]"); + println("\tlea " + dstReg + ",[" + srcReg + disp(disp) + ']'); } public void writeLEA(X86Register.GPR dstReg, X86Register.GPR srcIdxReg, int scale, int disp) { - println("\tlea " + dstReg + ",[" + srcIdxReg + "*" + scale + disp(disp) + "]"); + println("\tlea " + dstReg + ",[" + srcIdxReg + '*' + scale + disp(disp) + ']'); } public void writeLGDT(int disp) { - println("\tlgdt [" + disp(disp) + "]"); + println("\tlgdt [" + disp(disp) + ']'); } public void writeLIDT(int disp) { - println("\tlidt [" + disp(disp) + "]"); + println("\tlidt [" + disp(disp) + ']'); } public void writeLEA(GPR dstReg, GPR srcReg, GPR srcIdxReg, int scale, int disp) { - println("\tlea " + dstReg + ",[" + srcReg + disp(disp) + "+" - + srcIdxReg + "*" + scale + "]"); + println("\tlea " + dstReg + ",[" + srcReg + disp(disp) + '+' + + srcIdxReg + '*' + scale + ']'); } public void writeLMSW(GPR srcReg) { @@ -1111,7 +1110,7 @@ } public void writeMOV(int operandSize, GPR dstReg, int dstDisp, GPR srcReg) { - println("\tmov " + size(operandSize) + "[" + dstReg + disp(dstDisp) + println("\tmov " + size(operandSize) + '[' + dstReg + disp(dstDisp) + "]," + srcReg); } @@ -1121,44 +1120,44 @@ * @param srcReg */ public void writeMOV(X86Register.SR dstReg, int dstDisp, X86Register.GPR srcReg) { - println("\tmov " + "[" + dstReg + ":0x" + NumberUtils.hex(dstDisp) + "]," + srcReg); + println("\tmov " + '[' + dstReg + ":0x" + NumberUtils.hex(dstDisp) + "]," + srcReg); } public void writeMOV(CRX dstReg, GPR srcReg) { - println("\tmov " + dstReg + "," + size(BITS32) + " " + srcReg); + println("\tmov " + dstReg + ',' + size(BITS32) + ' ' + srcReg); } public void writeMOV(GPR dstReg, CRX srcReg) { - println("\tmov " + dstReg + "," + size(BITS32) + " " + srcReg); + println("\tmov " + dstReg + ',' + size(BITS32) + ' ' + srcReg); } public void writeMOV(SR dstReg, GPR srcReg) { - println("\tmov " + dstReg + "," + size(BITS16) + " " + srcReg); + println("\tmov " + dstReg + ',' + size(BITS16) + ' ' + srcReg); } public void writeMOV(GPR dstReg, SR srcReg) { - println("\tmov " + dstReg + "," + size(BITS16) + " " + srcReg); + println("\tmov " + dstReg + ',' + size(BITS16) + ' ' + srcReg); } public void writeMOV(int operandSize, GPR dstReg, GPR srcReg) { - println("\tmov " + dstReg + "," + size(operandSize) + " " + srcReg); + println("\tmov " + dstReg + ',' + size(operandSize) + ' ' + srcReg); } public void writeMOV(int operandSize, GPR dstReg, GPR srcReg, int srcDisp) { - println("\tmov " + dstReg + "," + size(operandSize) + "[" + srcReg - + disp(srcDisp) + "]"); + println("\tmov " + dstReg + ',' + size(operandSize) + '[' + srcReg + + disp(srcDisp) + ']'); } public void writeMOV(int operandSize, GPR dstReg, GPR dstIdxReg, int scale, int dstDisp, GPR srcReg) { - println("\tmov " + size(operandSize) + "[" + dstReg + disp(dstDisp) - + "+" + dstIdxReg + "*" + scale + "]," + srcReg); + println("\tmov " + size(operandSize) + '[' + dstReg + disp(dstDisp) + + '+' + dstIdxReg + '*' + scale + "]," + srcReg); } public void writeMOV(int operandSize, GPR dstReg, GPR srcReg, GPR srcIdxReg, int scale, int srcDisp) { - println("\tmov " + dstReg + "," + size(operandSize) + "[" + srcReg - + disp(srcDisp) + "+" + srcIdxReg + "*" + scale + "]"); + println("\tmov " + dstReg + ',' + size(operandSize) + '[' + srcReg + + disp(srcDisp) + '+' + srcIdxReg + '*' + scale + ']'); } /** @@ -1169,11 +1168,11 @@ * @param srcDisp */ public void writeMOV(X86Register.GPR dstReg, X86Register.SR srcReg, int srcDisp) { - println("\tmov " + dstReg + ",[" + srcReg + ":0x" + NumberUtils.hex(srcDisp) + "]"); + println("\tmov " + dstReg + ",[" + srcReg + ":0x" + NumberUtils.hex(srcDisp) + ']'); } public void writeMOV(GPR dstReg, int srcDisp) { - println("\tmov " + dstReg + ",[" + disp(srcDisp) + "]"); + println("\tmov " + dstReg + ",[" + disp(srcDisp) + ']'); } public void writeMOV(int dstDisp, X86Register.GPR srcReg) { @@ -1181,7 +1180,7 @@ } public void writeMOV_Const(int operandSize, int dstDisp, int imm32) { - println("\tmov " + size(operandSize) + "[" + disp(dstDisp) + println("\tmov " + size(operandSize) + '[' + disp(dstDisp) + "],0x" + NumberUtils.hex(imm32)); } @@ -1205,7 +1204,7 @@ * @param imm32 */ public void writeMOV_Const(int operandSize, X86Register.SR dstReg, int dstDisp, int imm32) { - println("\tmov " + size(operandSize) + "[" + dstReg + ":0x" + NumberUtils.hex(dstDisp) + println("\tmov " + size(operandSize) + '[' + dstReg + ":0x" + NumberUtils.hex(dstDisp) + "],0x" + NumberUtils.hex(imm32)); } @@ -1218,12 +1217,12 @@ */ public void writeMOV_Const(int operandSize, GPR dstReg, int dstDisp, int imm32) { - println("\tmov " + size(operandSize) + "[" + dstReg + disp(dstDisp) + println("\tmov " + size(operandSize) + '[' + dstReg + disp(dstDisp) + "],0x" + NumberUtils.hex(imm32)); } public void writeMOV_Const(GPR dstReg, Object label) { - println("\tmov " + dstReg + "," + label); + println("\tmov " + dstReg + ',' + label); } /** @@ -1235,28 +1234,28 @@ */ public void writeMOV_Const(int operandSize, GPR dstReg, GPR dstIdxReg, int scale, int dstDisp, int imm32) { - println("\tmov " + size(operandSize) + "[" + dstReg + "+" + dstIdxReg - + "*" + scale + disp(dstDisp) + "],0x" + NumberUtils.hex(imm32)); + println("\tmov " + size(operandSize) + '[' + dstReg + '+' + dstIdxReg + + '*' + scale + disp(dstDisp) + "],0x" + NumberUtils.hex(imm32)); } public void writeMOVD(int operandSize, X86Register.MMX mmx, X86Register.GPR reg, int disp) { - println("\tmovd " + mmx + "," + size(operandSize) + "[" + reg + disp(disp) + "]"); + println("\tmovd " + mmx + ',' + size(operandSize) + '[' + reg + disp(disp) + ']'); } public void writeMOVD(int operandSize, X86Register.GPR dstReg, int dstDisp, X86Register.MMX srcMmx) { - println("\tmovd " + size(operandSize) + "[" + dstReg + disp(dstDisp) + "]," + srcMmx); + println("\tmovd " + size(operandSize) + '[' + dstReg + disp(dstDisp) + "]," + srcMmx); } public void writeMOVQ(X86Register.MMX dstMmx, X86Register.MMX srcMmx) { - println("\tmovd " + dstMmx + "," + srcMmx); + println("\tmovd " + dstMmx + ',' + srcMmx); } public void writeMOVQ(int operandSize, X86Register.MMX dstMmx, X86Register.GPR srcGpr, int srcDisp) { - println("\tmovq " + dstMmx + "," + size(operandSize) + "[" + srcGpr + disp(srcDisp) + "]"); + println("\tmovq " + dstMmx + ',' + size(operandSize) + '[' + srcGpr + disp(srcDisp) + ']'); } public void writeMOVQ(int operandSize, X86Register.MMX dstMmx, int srcDisp) { - println("\tmovq " + dstMmx + "," + size(operandSize) + "[" + disp(srcDisp) + "]"); + println("\tmovq " + dstMmx + ',' + size(operandSize) + '[' + disp(srcDisp) + ']'); } public void writeMOVSB() { @@ -1272,11 +1271,11 @@ } public void writeMOVSD(XMM dst, GPR src, int srcDisp) { - println("\tmovsd " + dst + ",qword [" + src + disp(srcDisp) + "]"); + println("\tmovsd " + dst + ",qword [" + src + disp(srcDisp) + ']'); } public void writeMOVSD(XMM dst, XMM src) { - println("\tmovsd " + dst + "," + src); + println("\tmovsd " + dst + ',' + src); } public void writeMOVSS(GPR dst, int dstDisp, XMM src) { @@ -1284,20 +1283,20 @@ } public void writeMOVSS(XMM dst, GPR src, int srcDisp) { - println("\tmovss " + dst + ",dword [" + src + disp(srcDisp) + "]"); + println("\tmovss " + dst + ",dword [" + src + disp(srcDisp) + ']'); } public void writeMOVSS(XMM dst, XMM src) { - println("\tmovss " + dst + "," + src); + println("\tmovss " + dst + ',' + src); } public void writeMOVSX(GPR dstReg, GPR srcReg, int srcSize) { - println("\tmovsx " + dstReg + "," + size(srcSize) + " " + srcReg); + println("\tmovsx " + dstReg + ',' + size(srcSize) + ' ' + srcReg); } public void writeMOVSX(GPR dstReg, GPR srcReg, int srcDisp, int srcSize) { - println("\tmovsx " + dstReg + "," + size(srcSize) + " " + "[" + srcReg - + disp(srcDisp) + "]"); + println("\tmovsx " + dstReg + ',' + size(srcSize) + ' ' + '[' + srcReg + + disp(srcDisp) + ']'); } /** @@ -1312,7 +1311,7 @@ if (!code64) { throw new InvalidOpcodeException(); } - println("\tmovsxd " + dstReg + "," + srcReg); + println("\tmovsxd " + dstReg + ',' + srcReg); } public void writeMOVSW() { @@ -1320,12 +1319,12 @@ } public void writeMOVZX(GPR dstReg, GPR srcReg, int srcSize) { - println("\tmovzx " + dstReg + "," + size(srcSize) + " " + srcReg); + println("\tmovzx " + dstReg + ',' + size(srcSize) + ' ' + srcReg); } public void writeMOVZX(GPR dstReg, GPR srcReg, int srcDisp, int srcSize) { - println("\tmovzx " + dstReg + "," + size(srcSize) + " " + "[" + srcReg - + disp(srcDisp) + "]"); + println("\tmovzx " + dstReg + ',' + size(srcSize) + ' ' + '[' + srcReg + + disp(srcDisp) + ']'); } public void writeMUL_EAX(GPR srcReg) { @@ -1337,8 +1336,8 @@ } public void writeNEG(int operandSize, GPR dstReg, int dstDisp) { - println("\tneg " + size(operandSize) + "[" + dstReg + disp(dstDisp) - + "]"); + println("\tneg " + size(operandSize) + '[' + dstReg + disp(dstDisp) + + ']'); } public void writeNOP() { @@ -1350,8 +1349,8 @@ } public void writeNOT(int operandSize, GPR dstReg, int dstDisp) { - println("\tnot " + size(operandSize) + "[" + dstReg + disp(dstDisp) - + "]"); + println("\tnot " + size(operandSize) + '[' + dstReg + disp(dstDisp) + + ']'); } // LS @@ -1369,7 +1368,7 @@ * @param imm32 */ public void writeOR(int operandSize, GPR dstReg, int dstDisp, int imm32) { - println("\tor " + size(operandSize) + "[" + dstReg + disp(dstDisp) + println("\tor " + size(operandSize) + '[' + dstReg + disp(dstDisp) + "],0x" + NumberUtils.hex(imm32)); } @@ -1384,7 +1383,7 @@ * @param imm32 */ public void writeOR(int operandSize, X86Register.SR dstReg, int dstDisp, int imm32) { - println("\tor " + size(operandSize) + "[" + dstReg + ":0x" + NumberUtils.hex(dstDisp) + println("\tor " + size(operandSize) + '[' + dstReg + ":0x" + NumberUtils.hex(dstDisp) + "],0x" + NumberUtils.hex(imm32)); } @@ -1394,12 +1393,12 @@ * @param imm32 */ public void writeOR(int operandSize, int dstDisp, int imm32) { - println("\tor " + size(operandSize) + "[" + disp(dstDisp) + println("\tor " + size(operandSize) + '[' + disp(dstDisp) + "],0x" + NumberUtils.hex(imm32)); } public void writeOR(GPR dstReg, GPR srcReg) { - println("\tor " + dstReg + "," + srcReg); + println("\tor " + dstReg + ',' + srcReg); } /** @@ -1408,16 +1407,16 @@ * @param srcDisp */ public void writeOR(GPR dstReg, GPR srcReg, int srcDisp) { - println("\tor " + dstReg + ",[" + srcReg + disp(srcDisp) + "]"); + println("\tor " + dstReg + ",[" + srcReg + disp(srcDisp) + ']'); } public void writeOUT(int operandSize) { if (operandSize == X86Constants.BITS8) { - println("\tout " + X86Register.DX + "," + X86Register.AL); + println("\tout " + X86Register.DX + ',' + X86Register.AL); } else if (operandSize == X86Constants.BITS16) { - println("\tout " + X86Register.DX + "," + X86Register.AX); + println("\tout " + X86Register.DX + ',' + X86Register.AX); } else if (operandSize == X86Constants.BITS32) { - println("\tout " + X86Register.DX + "," + X86Register.EAX); + println("\tout " + X86Register.DX + ',' + X86Register.EAX); } else { throw new IllegalArgumentException("Invalid operand size for OUT: " + operandSize); } @@ -1425,34 +1424,34 @@ public void writeOUT(int operandSize, int imm8) { if (operandSize == X86Constants.BITS8) { - println("\tout " + imm8 + "," + X86Register.AL); + println("\tout " + imm8 + ',' + X86Register.AL); } else if (operandSize == X86Constants.BITS16) { - println("\tout " + imm8 + "," + X86Register.AX); + println("\tout " + imm8 + ',' + X86Register.AX); } else if (operandSize == X86Constants.BITS32) { - println("\tout " + imm8 + "," + X86Register.EAX); + println("\tout " + imm8 + ',' + X86Register.EAX); } else { throw new IllegalArgumentException("Invalid operand size for OUT: " + operandSize); } } public void writePACKUSWB(X86Register.MMX dstMmx, X86Register.MMX srcMmx) { - println("\tpackuswb " + dstMmx + "," + srcMmx); + println("\tpackuswb " + dstMmx + ',' + srcMmx); } public void writePADDW(X86Register.MMX dstMmx, X86Register.MMX srcMmx) { - println("\tpaddw " + dstMmx + "," + srcMmx); + println("\tpaddw " + dstMmx + ',' + srcMmx); } public void writePAND(X86Register.MMX dstMmx, X86Register.MMX srcMmx) { - println("\tpand " + dstMmx + "," + srcMmx); + println("\tpand " + dstMmx + ',' + srcMmx); } public void writePCMPGTW(X86Register.MMX dstMmx, X86Register.MMX srcMmx) { - println("\tpcmpgtw " + dstMmx + "," + srcMmx); + println("\tpcmpgtw " + dstMmx + ',' + srcMmx); } public void writePMULLW(X86Register.MMX dstMmx, X86Register.MMX srcMmx) { - println("\tpmullw " + dstMmx + "," + srcMmx); + println("\tpmullw " + dstMmx + ',' + srcMmx); } public void writePOP(GPR dstReg) { @@ -1464,7 +1463,7 @@ } public void writePOP(GPR dstReg, int dstDisp) { - println("\tpop [" + dstReg + disp(dstDisp) + "]"); + println("\tpop [" + dstReg + disp(dstDisp) + ']'); } public void writePOPA() { @@ -1494,7 +1493,7 @@ } public void writePSHUFW(X86Register.MMX dstMmx, X86Register.MMX srcMmx, int imm8) { - println("\tpshufw " + dstMmx + "," + srcMmx + ",0x" + NumberUtils.hex(imm8)); + println("\tpshufw " + dstMmx + ',' + srcMmx + ",0x" + NumberUtils.hex(imm8)); } public void writePSRLW(X86Register.MMX mmx, int imm8) { @@ -1502,11 +1501,11 @@ } public void writePSUBW(X86Register.MMX dstMmx, X86Register.MMX srcMmx) { - println("\tpsubw " + dstMmx + "," + srcMmx); + println("\tpsubw " + dstMmx + ',' + srcMmx); } public void writePUNPCKLBW(X86Register.MMX dstMmx, X86Register.MMX srcMmx) { - println("\tpsunpcklbw " + dstMmx + "," + srcMmx); + println("\tpsunpcklbw " + dstMmx + ',' + srcMmx); } /** @@ -1534,14 +1533,14 @@ * @return The offset of the start of the instruction. */ public int writePUSH(GPR srcReg, int srcDisp) { - return println("\tpush [" + srcReg + disp(srcDisp) + "]"); + return println("\tpush [" + srcReg + disp(srcDisp) + ']'); } /** * @return The offset of the start of the instruction. */ public int writePUSH(SR srcReg, int srcDisp) { - return println("\tpush [" + srcReg + ":" + srcDisp + "]"); + return println("\tpush [" + srcReg + ':' + srcDisp + ']'); } /** @@ -1549,8 +1548,8 @@ */ public int writePUSH(GPR srcBaseReg, GPR srcIndexReg, int srcScale, int srcDisp) { - return println("\tpush [" + srcBaseReg + disp(srcDisp) + "+" - + srcIndexReg + "*" + srcScale + "]"); + return println("\tpush [" + srcBaseReg + disp(srcDisp) + '+' + + srcIndexReg + '*' + srcScale + ']'); } // PR @@ -1570,7 +1569,7 @@ } public void writePXOR(X86Register.MMX dstMmx, X86Register.MMX srcMmx) { - println("\tpxor " + dstMmx + "," + srcMmx); + println("\tpxor " + dstMmx + ',' + srcMmx); } public void writeRDTSC() { @@ -1599,7 +1598,7 @@ } public void writeSAL(GPR dstReg, int imm8) { - println("\tsal " + dstReg + "," + imm8); + println("\tsal " + dstReg + ',' + imm8); } /** @@ -1608,7 +1607,7 @@ * @param imm8 */ public void writeSAL(int operandSize, GPR srcReg, int srcDisp, int imm8) { - println("\tsal " + size(operandSize) + "[" + srcReg + disp(srcDisp) + println("\tsal " + size(operandSize) + '[' + srcReg + disp(srcDisp) + "]," + imm8); } @@ -1621,12 +1620,12 @@ * @param srcDisp */ public void writeSAL_CL(int operandSize, GPR srcReg, int srcDisp) { - println("\tsal " + size(operandSize) + "[" + srcReg + disp(srcDisp) + println("\tsal " + size(operandSize) + '[' + srcReg + disp(srcDisp) + "],cl"); } public void writeSAR(GPR dstReg, int imm8) { - println("\tsar " + dstReg + "," + imm8); + println("\tsar " + dstReg + ',' + imm8); } /** @@ -1635,7 +1634,7 @@ * @param imm8 */ public void writeSAR(int operandSize, GPR srcReg, int srcDisp, int imm8) { - println("\tsar " + size(operandSize) + "[" + srcReg + disp(srcDisp) + println("\tsar " + size(operandSize) + '[' + srcReg + disp(srcDisp) + "]," + imm8); } @@ -1648,7 +1647,7 @@ * @param srcDisp */ public void writeSAR_CL(int operandSize, GPR srcReg, int srcDisp) { - println("\tsar " + size(operandSize) + "[" + srcReg + disp(srcDisp) + println("\tsar " + size(operandSize) + '[' + srcReg + disp(srcDisp) + "],cl"); } @@ -1663,7 +1662,7 @@ } public void writeSBB(int operandSize, GPR dstReg, int dstDisp, int imm32) { - println("\tsbb " + size(operandSize) + "[" + dstReg + disp(dstDisp) + println("\tsbb " + size(operandSize) + '[' + dstReg + disp(dstDisp) + "],0x" + NumberUtils.hex(imm32)); } @@ -1672,7 +1671,7 @@ } public void writeSBB(GPR dstReg, GPR srcReg) { - println("\tsbb " + dstReg + "," + srcReg); + println("\tsbb " + dstReg + ',' + srcReg); } /** @@ -1681,7 +1680,7 @@ * @param srcDisp */ public void writeSBB(GPR dstReg, GPR srcReg, int srcDisp) { - println("\tsbb " + dstReg + ",[" + srcReg + disp(srcDisp) + "]"); + println("\tsbb " + dstReg + ",[" + srcReg + disp(srcDisp) + ']'); } /** @@ -1691,15 +1690,15 @@ * @param cc */ public void writeSETCC(GPR dstReg, int cc) { - println("\tset" + ccName(cc) + " " + dstReg); + println("\tset" + ccName(cc) + ' ' + dstReg); } public void writeSHL(GPR dstReg, int imm8) { - println("\tshl " + dstReg + "," + imm8); + println("\tshl " + dstReg + ',' + imm8); } public void writeSHL(int operandSize, GPR dstReg, int dstDisp, int imm8) { - println("\tshl " + size(operandSize) + "[" + dstReg + disp(dstDisp) + println("\tshl " + size(operandSize) + '[' + dstReg + disp(dstDisp) + "]," + imm8); } @@ -1708,16 +1707,16 @@ } public void writeSHL_CL(int operandSize, GPR dstReg, int dstDisp) { - println("\tshl " + size(operandSize) + "[" + dstReg + disp(dstDisp) + println("\tshl " + size(operandSize) + '[' + dstReg + disp(dstDisp) + "],CL"); } public void writeSHLD_CL(GPR dstReg, GPR srcReg) { - println("\tshld " + dstReg + "," + srcReg + ",cl"); + println("\tshld " + dstReg + ',' + srcReg + ",cl"); } public void writeSHR(GPR dstReg, int imm8) { - println("\tshr " + dstReg + "," + imm8); + println("\tshr " + dstReg + ',' + imm8); } /** @@ -1726,7 +1725,7 @@ * @param imm8 */ public void writeSHR(int operandSize, GPR srcReg, int srcDisp, int imm8) { - println("\tshr " + size(operandSize) + "[" + srcReg + disp(srcDisp) + println("\tshr " + size(operandSize) + '[' + srcReg + disp(srcDisp) + "]," + imm8); } @@ -1739,12 +1738,12 @@ * @param srcDisp */ public void writeSHR_CL(int operandSize, GPR srcReg, int srcDisp) { - println("\tshr " + size(operandSize) + "[" + srcReg + disp(srcDisp) + println("\tshr " + size(operandSize) + '[' + srcReg + disp(srcDisp) + "],cl"); } public void writeSHRD_CL(GPR dstReg, GPR srcReg) { - println("\tshrd " + dstReg + "," + srcReg + ",cl"); + println("\tshrd " + dstReg + ',' + srcReg + ",cl"); } public void writeSTD() { @@ -1756,7 +1755,7 @@ } public void writeSTMXCSR(GPR srcReg, int disp) { - println("\tstmxcsr dword [" + srcReg + disp(disp) + "]"); + println("\tstmxcsr dword [" + srcReg + disp(disp) + ']'); } public void writeSTOSB() { @@ -1778,7 +1777,7 @@ * @param imm32 */ public final void writeSUB(GPR reg, int imm32) { - println("\tsub " + reg + "," + imm32); + println("\tsub " + reg + ',' + imm32); } /** @@ -1795,7 +1794,7 @@ * @param imm32 */ public void writeSUB(int operandSize, GPR dstReg, int dstDisp, int imm32) { - println("\tsub " + size(operandSize) + "[" + dstReg + disp(dstDisp) + println("\tsub " + size(operandSize) + '[' + dstReg + disp(dstDisp) + "],0x" + NumberUtils.hex(imm32)); } @@ -1804,7 +1803,7 @@ } public void writeSUB(GPR dstReg, GPR srcReg) { - println("\tsub " + dstReg + "," + srcReg); + println("\tsub " + dstReg + ',' + srcReg); } @@ -1814,7 +1813,7 @@ * @param srcDisp */ public void writeSUB(GPR dstReg, GPR srcReg, int srcDisp) { - println("\tsub " + dstReg + ", [" + srcReg + disp(srcDisp) + "]"); + println("\tsub " + dstReg + ", [" + srcReg + disp(srcDisp) + ']'); } public void writeTEST(GPR reg, int imm32) { @@ -1829,7 +1828,7 @@ * @param imm32 */ public void writeTEST(int operandSize, GPR reg, int disp, int imm32) { - println("\ttest " + size(operandSize) + "[" + reg + disp(disp) + "],0x" + println("\ttest " + size(operandSize) + '[' + reg + disp(disp) + "],0x" + NumberUtils.hex(imm32)); } @@ -1840,7 +1839,7 @@ * @param imm32 */ public void writeTEST(int operandSize, SR reg, int disp, int imm32) { - println("\ttest " + size(operandSize) + "[" + reg + ":0x" + println("\ttest " + size(operandSize) + '[' + reg + ":0x" + NumberUtils.hex(disp) + "],0x" + NumberUtils.hex(imm32)); } @@ -1851,7 +1850,7 @@ * @param reg2 */ public void writeTEST(GPR reg1, GPR reg2) { - println("\ttest " + reg1 + "," + reg2); + println("\ttest " + reg1 + ',' + reg2); } public void writeTEST_AL(int value) { @@ -1868,7 +1867,7 @@ } public void writeTEST(int operandSize, int destDisp, int imm32) { - println("\ttest " + size(operandSize) + "[" + disp(destDisp) + "],0x" + NumberUtils.hex(imm32)); + println("\ttest " + size(operandSize) + '[' + disp(destDisp) + "],0x" + NumberUtils.hex(imm32)); } public void writeTo(OutputStream os) throws IOException { @@ -1913,7 +1912,7 @@ * @param imm32 */ public void writeXOR(int operandSize, GPR dstReg, int dstDisp, int imm32) { - println("\txor " + size(operandSize) + "[" + dstReg + disp(dstDisp) + println("\txor " + size(operandSize) + '[' + dstReg + disp(dstDisp) + "],0x" + NumberUtils.hex(imm32)); } @@ -1922,7 +1921,7 @@ } public void writeXOR(GPR dstReg, GPR srcReg) { - println("\txor " + dstReg + "," + srcReg); + println("\txor " + dstReg + ',' + srcReg); } /** @@ -1931,7 +1930,7 @@ * @param srcDisp */ public void writeXOR(GPR dstReg, GPR srcReg, int srcDisp) { - println("\txor " + dstReg + ", [" + srcReg + disp(srcDisp) + "]"); + println("\txor " + dstReg + ", [" + srcReg + disp(srcDisp) + ']'); } public void writeObjectRef(Object object) { Modified: trunk/core/src/core/org/jnode/debugger/ThreadState.java =================================================================== --- trunk/core/src/core/org/jnode/debugger/ThreadState.java 2012-03-26 12:56:18 UTC (rev 5892) +++ trunk/core/src/core/org/jnode/debugger/ThreadState.java 2012-03-27 15:16:35 UTC (rev 5893) @@ -22,7 +22,6 @@ import java.io.PrintStream; import java.util.Map; - import org.jnode.driver.input.KeyboardEvent; impor... [truncated message content] |
From: <ga...@us...> - 2012-03-26 12:56:29
|
Revision: 5892 http://jnode.svn.sourceforge.net/jnode/?rev=5892&view=rev Author: galatnm Date: 2012-03-26 12:56:18 +0000 (Mon, 26 Mar 2012) Log Message: ----------- Network code clean-up, fix compilation error. Modified Paths: -------------- trunk/net/src/net/org/jnode/net/ipv4/IPv4Address.java Modified: trunk/net/src/net/org/jnode/net/ipv4/IPv4Address.java =================================================================== --- trunk/net/src/net/org/jnode/net/ipv4/IPv4Address.java 2012-03-26 12:28:08 UTC (rev 5891) +++ trunk/net/src/net/org/jnode/net/ipv4/IPv4Address.java 2012-03-26 12:56:18 UTC (rev 5892) @@ -212,8 +212,8 @@ * @see java.lang.Object#toString() */ public String toString() { - return String.valueOf(address[0] & 0xFF) + '.' + address[1] & 0xFF + '.' + address[2] & - 0xFF + '.' + address[3] & 0xFF; + return "" + (address[0] & 0xFF) + '.' + (address[1] & 0xFF) + '.' + (address[2] & 0xFF) + + '.' + (address[3] & 0xFF); } /** This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ga...@us...> - 2012-03-26 12:28:18
|
Revision: 5891 http://jnode.svn.sourceforge.net/jnode/?rev=5891&view=rev Author: galatnm Date: 2012-03-26 12:28:08 +0000 (Mon, 26 Mar 2012) Log Message: ----------- Network code clean-up. Modified Paths: -------------- trunk/net/src/driver/org/jnode/driver/net/eepro100/EEPRO100Core.java trunk/net/src/driver/org/jnode/driver/net/eepro100/EEPRO100TxFD.java trunk/net/src/driver/org/jnode/driver/net/lance/LanceCore.java trunk/net/src/driver/org/jnode/driver/net/usb/bluetooth/UsbBluetoothDriver.java trunk/net/src/net/org/jnode/net/ipv4/IPv4Address.java trunk/net/src/net/org/jnode/net/ipv4/bootp/BOOTPServer.java trunk/net/src/net/org/jnode/net/ipv4/dhcp/DHCPMessage.java trunk/net/src/net/org/jnode/net/ipv4/tcp/TCPControlBlockList.java trunk/net/src/net/org/jnode/net/ipv4/tcp/TCPOutChannel.java trunk/net/src/net/org/jnode/net/ipv4/udp/UDPProtocol.java trunk/net/src/net/org/jnode/net/nfs/nfs2/FileSystemAttribute.java trunk/net/src/net/org/jnode/net/nfs/nfs2/NFS2Client.java trunk/net/src/net/org/jnode/net/nfs/nfs2/mount/Mount1Client.java trunk/net/src/net/org/jnode/net/service/DefaultNetworkLayerManager.java trunk/net/src/net/org/jnode/net/util/AbstractDatagramSocketImpl.java trunk/net/src/net/org/jnode/protocol/nfs/Handler.java trunk/net/src/net/org/jnode/protocol/nfs/nfs2/NFS2InputStream.java trunk/net/src/net/org/jnode/protocol/nfs/nfs2/NFS2OutputStream.java trunk/net/src/test/org/jnode/test/net/URLTest.java Modified: trunk/net/src/driver/org/jnode/driver/net/eepro100/EEPRO100Core.java =================================================================== --- trunk/net/src/driver/org/jnode/driver/net/eepro100/EEPRO100Core.java 2012-03-09 13:06:29 UTC (rev 5890) +++ trunk/net/src/driver/org/jnode/driver/net/eepro100/EEPRO100Core.java 2012-03-26 12:28:08 UTC (rev 5891) @@ -21,9 +21,7 @@ package org.jnode.driver.net.eepro100; import java.security.PrivilegedExceptionAction; - import javax.naming.NameNotFoundException; - import org.jnode.driver.Device; import org.jnode.driver.DriverException; import org.jnode.driver.bus.pci.PCIBaseAddress; @@ -248,7 +246,7 @@ // disable regs.setReg32(SCBPort, 2); Counter count = new Counter("chrono"); - while (((Integer) count.getValue()).intValue() <= 20) + while ((Integer) count.getValue() <= 20) count.inc(); regs.setReg16(SCBCmd, SCBMaskAll); int intr_status = regs.getReg16(SCBStatus); Modified: trunk/net/src/driver/org/jnode/driver/net/eepro100/EEPRO100TxFD.java =================================================================== --- trunk/net/src/driver/org/jnode/driver/net/eepro100/EEPRO100TxFD.java 2012-03-09 13:06:29 UTC (rev 5890) +++ trunk/net/src/driver/org/jnode/driver/net/eepro100/EEPRO100TxFD.java 2012-03-26 12:28:08 UTC (rev 5891) @@ -153,7 +153,7 @@ } public String toString() { - StringBuffer str = new StringBuffer(); + StringBuilder str = new StringBuilder(); str.append("Status : "); str.append(NumberUtils.hex(this.getStatus())); str.append("\n"); Modified: trunk/net/src/driver/org/jnode/driver/net/lance/LanceCore.java =================================================================== --- trunk/net/src/driver/org/jnode/driver/net/lance/LanceCore.java 2012-03-09 13:06:29 UTC (rev 5890) +++ trunk/net/src/driver/org/jnode/driver/net/lance/LanceCore.java 2012-03-26 12:28:08 UTC (rev 5891) @@ -21,9 +21,7 @@ package org.jnode.driver.net.lance; import java.security.PrivilegedExceptionAction; - import javax.naming.NameNotFoundException; - import org.jnode.driver.DriverException; import org.jnode.driver.bus.pci.PCIBaseAddress; import org.jnode.driver.bus.pci.PCIConstants; @@ -441,25 +439,12 @@ 0, 1, 2, 3, 4, 5, 8, 9, 10, 11, 12, 13, 14, 15, 24, 25, 30, 31, 58, 76, 77, 80, 82, 88, 89, 112, 124}; - for (int i = 0; i < validVMWareLanceRegs.length; i++) { - int csr_val = io.getCSR(validVMWareLanceRegs[i]); - log.debug("CSR" + validVMWareLanceRegs[i] + " : " + NumberUtils.hex(csr_val, 4)); + for (int validVMWareLanceReg : validVMWareLanceRegs) { + int csr_val = io.getCSR(validVMWareLanceReg); + log.debug("CSR" + validVMWareLanceReg + " : " + NumberUtils.hex(csr_val, 4)); } // try to start again, not sure if this works? io.setCSR(0, CSR0_STRT); - - /* - for (int k = 0; k <= 22; k++) { - int bcr_val = io.getBCR(k); - log.debug("BCR" + k + " : " + NumberUtils.hex(bcr_val)); - } - - for (int j = 0; j <= 0x3F; j++) { - int pci_val = device.readConfigByte(j); - log.debug( - "PCI" + NumberUtils.hex(j) + " : " + NumberUtils.hex(pci_val)); - } - */ } } Modified: trunk/net/src/driver/org/jnode/driver/net/usb/bluetooth/UsbBluetoothDriver.java =================================================================== --- trunk/net/src/driver/org/jnode/driver/net/usb/bluetooth/UsbBluetoothDriver.java 2012-03-09 13:06:29 UTC (rev 5890) +++ trunk/net/src/driver/org/jnode/driver/net/usb/bluetooth/UsbBluetoothDriver.java 2012-03-26 12:28:08 UTC (rev 5891) @@ -127,9 +127,9 @@ public void requestCompleted(USBRequest request) { // log.debug("Bluetooth Completed"); final byte[] data = intData.getData(); - StringBuffer buffer = new StringBuffer(); + StringBuilder buffer = new StringBuilder(); buffer.append("Data received : "); - for (int i = 0; i < data.length; i++) { + for (byte aData : data) { buffer.append(NumberUtils.hex(data[0], 2)).append(" "); } log.debug(buffer.toString()); Modified: trunk/net/src/net/org/jnode/net/ipv4/IPv4Address.java =================================================================== --- trunk/net/src/net/org/jnode/net/ipv4/IPv4Address.java 2012-03-09 13:06:29 UTC (rev 5890) +++ trunk/net/src/net/org/jnode/net/ipv4/IPv4Address.java 2012-03-26 12:28:08 UTC (rev 5891) @@ -21,11 +21,10 @@ package org.jnode.net.ipv4; import java.io.Serializable; -import java.net.InetAddress; import java.net.Inet4Address; +import java.net.InetAddress; import java.net.UnknownHostException; import java.util.StringTokenizer; - import org.jnode.net.ProtocolAddress; import org.jnode.net.SocketBuffer; import org.jnode.net.ethernet.EthernetConstants; @@ -213,8 +212,8 @@ * @see java.lang.Object#toString() */ public String toString() { - return "" + (address[0] & 0xFF) + '.' + (address[1] & 0xFF) + '.' + (address[2] & 0xFF) + - '.' + (address[3] & 0xFF); + return String.valueOf(address[0] & 0xFF) + '.' + address[1] & 0xFF + '.' + address[2] & + 0xFF + '.' + address[3] & 0xFF; } /** Modified: trunk/net/src/net/org/jnode/net/ipv4/bootp/BOOTPServer.java =================================================================== --- trunk/net/src/net/org/jnode/net/ipv4/bootp/BOOTPServer.java 2012-03-09 13:06:29 UTC (rev 5890) +++ trunk/net/src/net/org/jnode/net/ipv4/bootp/BOOTPServer.java 2012-03-26 12:28:08 UTC (rev 5891) @@ -31,10 +31,8 @@ import java.util.HashMap; import java.util.List; import java.util.Map; - -import org.jnode.nanoxml.XMLElement; - import org.apache.log4j.Logger; +import org.jnode.nanoxml.XMLElement; import org.jnode.net.ipv4.IPv4Address; /** @@ -83,11 +81,11 @@ XMLElement xml = new XMLElement(); xml.parseFromReader(reader); List<XMLElement> children = xml.getChildren(); - for (int i = 0; i < children.size(); i++) { - XMLElement child = (XMLElement) children.get(i); + for (XMLElement aChildren : children) { + XMLElement child = (XMLElement) aChildren; try { table.put(child.getStringAttribute("ethernetAddress").toUpperCase(), - new TableEntry(child)); + new TableEntry(child)); } catch (IllegalArgumentException ex) { log.debug("Invalid IP address", ex); } Modified: trunk/net/src/net/org/jnode/net/ipv4/dhcp/DHCPMessage.java =================================================================== --- trunk/net/src/net/org/jnode/net/ipv4/dhcp/DHCPMessage.java 2012-03-09 13:06:29 UTC (rev 5890) +++ trunk/net/src/net/org/jnode/net/ipv4/dhcp/DHCPMessage.java 2012-03-26 12:28:08 UTC (rev 5891) @@ -25,7 +25,6 @@ import java.net.Inet4Address; import java.util.HashMap; import java.util.Map; - import org.jnode.net.SocketBuffer; import org.jnode.net.ipv4.bootp.BOOTPHeader; @@ -217,7 +216,7 @@ if (code == MESSAGE_TYPE_OPTION) { messageType = value[0]; } else { - options.put(Integer.valueOf(code), value); + options.put(code, value); } } @@ -254,7 +253,7 @@ if (code == MESSAGE_TYPE_OPTION) return new byte[] {(byte) messageType}; else - return (byte[]) options.get(Integer.valueOf(code)); + return (byte[]) options.get(code); } /** Modified: trunk/net/src/net/org/jnode/net/ipv4/tcp/TCPControlBlockList.java =================================================================== --- trunk/net/src/net/org/jnode/net/ipv4/tcp/TCPControlBlockList.java 2012-03-09 13:06:29 UTC (rev 5890) +++ trunk/net/src/net/org/jnode/net/ipv4/tcp/TCPControlBlockList.java 2012-03-26 12:28:08 UTC (rev 5891) @@ -55,8 +55,7 @@ */ public void timeout() { // allocation free looping - for (int i = 0; i < list.size(); i++) { - IPv4ControlBlock aList = list.get(i); + for (IPv4ControlBlock aList : list) { final TCPControlBlock cb = (TCPControlBlock) aList; cb.timeout(); } Modified: trunk/net/src/net/org/jnode/net/ipv4/tcp/TCPOutChannel.java =================================================================== --- trunk/net/src/net/org/jnode/net/ipv4/tcp/TCPOutChannel.java 2012-03-09 13:06:29 UTC (rev 5890) +++ trunk/net/src/net/org/jnode/net/ipv4/tcp/TCPOutChannel.java 2012-03-26 12:28:08 UTC (rev 5891) @@ -143,8 +143,7 @@ */ public void timeout() throws SocketException { //allocation free looping - for (int i = 0; i < unackedSegments.size(); i++) { - TCPOutSegment seg = unackedSegments.get(i); + for (TCPOutSegment seg : unackedSegments) { seg.timeout(tcp); } } Modified: trunk/net/src/net/org/jnode/net/ipv4/udp/UDPProtocol.java =================================================================== --- trunk/net/src/net/org/jnode/net/ipv4/udp/UDPProtocol.java 2012-03-09 13:06:29 UTC (rev 5890) +++ trunk/net/src/net/org/jnode/net/ipv4/udp/UDPProtocol.java 2012-03-26 12:28:08 UTC (rev 5891) @@ -21,7 +21,6 @@ package org.jnode.net.ipv4.udp; import gnu.java.net.PlainDatagramSocketImpl; - import java.io.IOException; import java.net.DatagramSocket; import java.net.DatagramSocketImplFactory; @@ -33,7 +32,6 @@ import java.security.PrivilegedExceptionAction; import java.util.HashMap; import java.util.Random; - import org.apache.log4j.Logger; import org.jnode.driver.net.NetworkException; import org.jnode.net.SocketBuffer; @@ -84,7 +82,7 @@ /** * for random listener ports */ - private final Integer zero = Integer.valueOf(0); + private final Integer zero = 0; private final Random random = new Random(); private final int startRandom = 1024; @@ -199,7 +197,7 @@ * @param skbuf */ private synchronized void deliver(UDPHeader hdr, SocketBuffer skbuf) throws SocketException { - final Integer lport = Integer.valueOf(hdr.getDstPort()); + final Integer lport = hdr.getDstPort(); final IPv4Header ipHdr = (IPv4Header) skbuf.getNetworkLayerHeader(); final UDPDatagramSocketImpl socket = (UDPDatagramSocketImpl) sockets.get(lport); if (socket != null) { @@ -224,7 +222,7 @@ * @param socket */ protected synchronized void bind(UDPDatagramSocketImpl socket) throws SocketException { - Integer lport = new Integer(socket.getLocalPort()); + Integer lport = socket.getLocalPort(); if (lport.compareTo(zero) != 0 && sockets.containsKey(lport)) { throw new SocketException("Port already bound (" + lport + ")"); @@ -232,12 +230,12 @@ Integer ran; while (lport.compareTo(zero) == 0) { - ran = Integer.valueOf(random.nextInt(stopRandom) + startRandom); + ran = random.nextInt(stopRandom) + startRandom; if (!sockets.containsKey(ran)) { // Should we have one stop condition more?? lport = ran; - socket.setLocalPort(lport.intValue()); + socket.setLocalPort(lport); } } @@ -251,7 +249,7 @@ * @param socket */ protected synchronized void unbind(UDPDatagramSocketImpl socket) { - final Integer lport = Integer.valueOf(socket.getLocalPort()); + final Integer lport = socket.getLocalPort(); if (sockets.get(lport) == socket) { sockets.remove(lport); } Modified: trunk/net/src/net/org/jnode/net/nfs/nfs2/FileSystemAttribute.java =================================================================== --- trunk/net/src/net/org/jnode/net/nfs/nfs2/FileSystemAttribute.java 2012-03-09 13:06:29 UTC (rev 5890) +++ trunk/net/src/net/org/jnode/net/nfs/nfs2/FileSystemAttribute.java 2012-03-26 12:28:08 UTC (rev 5891) @@ -75,7 +75,7 @@ @Override public String toString() { - StringBuffer buffer = new StringBuffer(); + StringBuilder buffer = new StringBuilder(); buffer.append("FileSystemAttribute "); buffer.append("transferSize:"); buffer.append(transferSize); Modified: trunk/net/src/net/org/jnode/net/nfs/nfs2/NFS2Client.java =================================================================== --- trunk/net/src/net/org/jnode/net/nfs/nfs2/NFS2Client.java 2012-03-09 13:06:29 UTC (rev 5890) +++ trunk/net/src/net/org/jnode/net/nfs/nfs2/NFS2Client.java 2012-03-26 12:28:08 UTC (rev 5891) @@ -25,7 +25,6 @@ import java.util.ArrayList; import java.util.LinkedList; import java.util.List; - import org.acplt.oncrpc.OncRpcClient; import org.acplt.oncrpc.OncRpcClientAuthUnix; import org.acplt.oncrpc.OncRpcException; @@ -242,8 +241,7 @@ public synchronized void close() throws IOException { closed = true; List<OncRpcException> exceptionList = new ArrayList<OncRpcException>(); - for (int i = 0; i < rpcClientPool.size(); i++) { - OncRpcClient client = rpcClientPool.get(i); + for (OncRpcClient client : rpcClientPool) { try { client.close(); } catch (OncRpcException e) { @@ -253,8 +251,8 @@ if (exceptionList.size() != 0) { StringBuilder builder = new StringBuilder(); builder.append("An error occurs when the mount client close connections. Reason:"); - for (int i = 0; i < exceptionList.size(); i++) { - builder.append(exceptionList.get(i).getMessage()); + for (OncRpcException anExceptionList : exceptionList) { + builder.append(anExceptionList.getMessage()); builder.append("."); } throw new IOException(builder.toString()); Modified: trunk/net/src/net/org/jnode/net/nfs/nfs2/mount/Mount1Client.java =================================================================== --- trunk/net/src/net/org/jnode/net/nfs/nfs2/mount/Mount1Client.java 2012-03-09 13:06:29 UTC (rev 5890) +++ trunk/net/src/net/org/jnode/net/nfs/nfs2/mount/Mount1Client.java 2012-03-26 12:28:08 UTC (rev 5891) @@ -25,7 +25,6 @@ import java.util.ArrayList; import java.util.LinkedList; import java.util.List; - import org.acplt.oncrpc.OncRpcClient; import org.acplt.oncrpc.OncRpcClientAuthUnix; import org.acplt.oncrpc.OncRpcException; @@ -326,8 +325,7 @@ public synchronized void close() throws IOException { closed = true; List<OncRpcException> exceptionList = new ArrayList<OncRpcException>(); - for (int i = 0; i < rpcClientPool.size(); i++) { - OncRpcClient client = rpcClientPool.get(i); + for (OncRpcClient client : rpcClientPool) { try { client.close(); } catch (OncRpcException e) { @@ -338,8 +336,8 @@ if (exceptionList.size() != 0) { StringBuilder builder = new StringBuilder(); builder.append("An error occurs when the mount client close connections. Reason:"); - for (int i = 0; i < exceptionList.size(); i++) { - builder.append(exceptionList.get(i).getMessage()); + for (OncRpcException anExceptionList : exceptionList) { + builder.append(anExceptionList.getMessage()); builder.append("."); } throw new IOException(builder.toString()); Modified: trunk/net/src/net/org/jnode/net/service/DefaultNetworkLayerManager.java =================================================================== --- trunk/net/src/net/org/jnode/net/service/DefaultNetworkLayerManager.java 2012-03-09 13:06:29 UTC (rev 5890) +++ trunk/net/src/net/org/jnode/net/service/DefaultNetworkLayerManager.java 2012-03-26 12:28:08 UTC (rev 5891) @@ -25,7 +25,6 @@ import java.util.Collection; import java.util.HashMap; import java.util.Map; - import org.apache.log4j.Logger; import org.jnode.driver.ApiNotFoundException; import org.jnode.driver.Device; @@ -175,11 +174,10 @@ if (networkLayersEP != null) { layers.clear(); final Extension[] extensions = networkLayersEP.getExtensions(); - for (int i = 0; i < extensions.length; i++) { - final Extension ext = extensions[i]; + for (final Extension ext : extensions) { final ConfigurationElement[] elements = ext.getConfigurationElements(); - for (int j = 0; j < elements.length; j++) { - configureLayer(layers, elements[j]); + for (ConfigurationElement element : elements) { + configureLayer(layers, element); } } } Modified: trunk/net/src/net/org/jnode/net/util/AbstractDatagramSocketImpl.java =================================================================== --- trunk/net/src/net/org/jnode/net/util/AbstractDatagramSocketImpl.java 2012-03-09 13:06:29 UTC (rev 5890) +++ trunk/net/src/net/org/jnode/net/util/AbstractDatagramSocketImpl.java 2012-03-26 12:28:08 UTC (rev 5891) @@ -29,7 +29,6 @@ import java.net.SocketAddress; import java.net.SocketException; import java.net.SocketTimeoutException; - import org.jnode.bootlog.BootLogInstance; import org.jnode.driver.Device; import org.jnode.driver.DeviceNotFoundException; @@ -115,19 +114,19 @@ } switch (option_id) { case IP_TOS: - return Integer.valueOf(tos); + return tos; case SO_BINDADDR: return laddr; case SO_BROADCAST: - return Boolean.valueOf(broadcast); + return broadcast; case SO_RCVBUF: - return Integer.valueOf(EthernetConstants.ETH_FRAME_LEN); + return EthernetConstants.ETH_FRAME_LEN; case SO_SNDBUF: - return Integer.valueOf(EthernetConstants.ETH_FRAME_LEN); + return EthernetConstants.ETH_FRAME_LEN; case SO_TRANSMIT_IF: return (device == null) ? null : NetworkInterface.getByName(device.getId()); case SO_TIMEOUT: - return Integer.valueOf(timeout); + return timeout; default: return doGetOption(option_id); } @@ -147,12 +146,12 @@ try { switch (option_id) { case IP_TOS: - tos = ((Integer) val).intValue(); + tos = (Integer) val; break; case SO_BINDADDR: throw new SocketException("Get only option: SO_BINDADDR"); case SO_BROADCAST: - broadcast = ((Boolean) val).booleanValue(); + broadcast = (Boolean) val; break; case SO_RCVBUF: /* ignore */ break; @@ -171,7 +170,7 @@ } break; case SO_TIMEOUT: - timeout = ((Integer) val).intValue(); + timeout = (Integer) val; break; case SO_REUSEADDR: // Ignored for now Modified: trunk/net/src/net/org/jnode/protocol/nfs/Handler.java =================================================================== --- trunk/net/src/net/org/jnode/protocol/nfs/Handler.java 2012-03-09 13:06:29 UTC (rev 5890) +++ trunk/net/src/net/org/jnode/protocol/nfs/Handler.java 2012-03-26 12:28:08 UTC (rev 5891) @@ -25,7 +25,6 @@ import java.net.URL; import java.net.URLConnection; import java.net.URLStreamHandler; - import org.acplt.oncrpc.OncRpcException; import org.acplt.oncrpc.OncRpcPortmapClient; import org.acplt.oncrpc.OncRpcProtocols; @@ -47,8 +46,7 @@ client = new OncRpcPortmapClient( InetAddress.getByName(url.getHost()), OncRpcProtocols.ONCRPC_TCP); OncRpcServerIdent[] servers = client.listServers(); - for (int i = 0; i < servers.length; i++) { - OncRpcServerIdent server = servers[i]; + for (OncRpcServerIdent server : servers) { if (server.program == 100003 && server.version > version) { version = server.version; } Modified: trunk/net/src/net/org/jnode/protocol/nfs/nfs2/NFS2InputStream.java =================================================================== --- trunk/net/src/net/org/jnode/protocol/nfs/nfs2/NFS2InputStream.java 2012-03-09 13:06:29 UTC (rev 5890) +++ trunk/net/src/net/org/jnode/protocol/nfs/nfs2/NFS2InputStream.java 2012-03-26 12:28:08 UTC (rev 5891) @@ -26,7 +26,6 @@ import java.net.URL; import java.util.List; import java.util.StringTokenizer; - import org.jnode.net.nfs.Protocol; import org.jnode.net.nfs.nfs2.FileAttribute; import org.jnode.net.nfs.nfs2.LookupResult; @@ -85,8 +84,7 @@ } ExportEntry exportEntry = null; - for (int i = 0; i < exportList.size(); i++) { - ExportEntry e = exportList.get(i); + for (ExportEntry e : exportList) { if (path.startsWith(e.getDirectory())) { if (exportEntry == null) { exportEntry = e; Modified: trunk/net/src/net/org/jnode/protocol/nfs/nfs2/NFS2OutputStream.java =================================================================== --- trunk/net/src/net/org/jnode/protocol/nfs/nfs2/NFS2OutputStream.java 2012-03-09 13:06:29 UTC (rev 5890) +++ trunk/net/src/net/org/jnode/protocol/nfs/nfs2/NFS2OutputStream.java 2012-03-26 12:28:08 UTC (rev 5891) @@ -27,7 +27,6 @@ import java.util.ArrayList; import java.util.List; import java.util.StringTokenizer; - import org.jnode.net.nfs.Protocol; import org.jnode.net.nfs.nfs2.CreateFileResult; import org.jnode.net.nfs.nfs2.FileAttribute; @@ -82,8 +81,7 @@ } ExportEntry exportEntry = null; - for (int i = 0; i < exportList.size(); i++) { - ExportEntry e = exportList.get(i); + for (ExportEntry e : exportList) { if (path.startsWith(e.getDirectory())) { if (exportEntry == null) { exportEntry = e; Modified: trunk/net/src/test/org/jnode/test/net/URLTest.java =================================================================== --- trunk/net/src/test/org/jnode/test/net/URLTest.java 2012-03-09 13:06:29 UTC (rev 5890) +++ trunk/net/src/test/org/jnode/test/net/URLTest.java 2012-03-26 12:28:08 UTC (rev 5891) @@ -34,7 +34,7 @@ final InputStream is = url.openConnection().getInputStream(); try { int ch; - final StringBuffer buf = new StringBuffer(); + final StringBuilder buf = new StringBuilder(); while ((ch = is.read()) >= 0) { buf.append((char) ch); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ga...@us...> - 2012-03-09 13:06:40
|
Revision: 5890 http://jnode.svn.sourceforge.net/jnode/?rev=5890&view=rev Author: galatnm Date: 2012-03-09 13:06:29 +0000 (Fri, 09 Mar 2012) Log Message: ----------- Add gpt partition support from Luke. Added Paths: ----------- trunk/fs/descriptors/org.jnode.partitions.gpt.xml trunk/fs/src/fs/org/jnode/partitions/gpt/ trunk/fs/src/fs/org/jnode/partitions/gpt/GptPartitionTable.java trunk/fs/src/fs/org/jnode/partitions/gpt/GptPartitionTableEntry.java trunk/fs/src/fs/org/jnode/partitions/gpt/GptPartitionTableType.java trunk/fs/src/fs/org/jnode/partitions/gpt/GptPartitionTypes.java Added: trunk/fs/descriptors/org.jnode.partitions.gpt.xml =================================================================== --- trunk/fs/descriptors/org.jnode.partitions.gpt.xml (rev 0) +++ trunk/fs/descriptors/org.jnode.partitions.gpt.xml 2012-03-09 13:06:29 UTC (rev 5890) @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plugin SYSTEM "jnode.dtd"> + +<plugin id="org.jnode.partitions.gpt" + name="JNode GPT partition table classes" + version="0.2.9-dev" + license-name="lgpl" + provider-name="JNode.org"> + + <requires> + <import plugin="org.jnode.partitions"/> + </requires> + + <runtime> + <library name="jnode-fs.jar"> + <export name="org.jnode.partitions.gpt.*"/> + </library> + </runtime> + + <extension point="org.jnode.partitions.types"> + <type class="org.jnode.partitions.gpt.GptPartitionTableType"/> + </extension> + +</plugin> \ No newline at end of file Added: trunk/fs/src/fs/org/jnode/partitions/gpt/GptPartitionTable.java =================================================================== --- trunk/fs/src/fs/org/jnode/partitions/gpt/GptPartitionTable.java (rev 0) +++ trunk/fs/src/fs/org/jnode/partitions/gpt/GptPartitionTable.java 2012-03-09 13:06:29 UTC (rev 5890) @@ -0,0 +1,128 @@ +/* + * $Id: $ + * + * Copyright (C) 2003-2010 JNode.org + * + * This library is free software; you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as published + * by the Free Software Foundation; either version 2.1 of the License, or + * (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + * License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library; If not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + +package org.jnode.partitions.gpt; + +import java.nio.charset.Charset; +import java.util.ArrayList; +import java.util.Collections; +import java.util.Iterator; +import java.util.List; +import org.apache.log4j.Logger; +import org.jnode.driver.Device; +import org.jnode.partitions.PartitionTable; +import org.jnode.partitions.PartitionTableType; +import org.jnode.util.LittleEndian; + +/** + * The main GPT partition table class. + * + * @author Luke Quinane + */ +public class GptPartitionTable implements PartitionTable<GptPartitionTableEntry> { + + /** The type of partition table */ + private final GptPartitionTableType tableType; + + /** The partition entries */ + private final List<GptPartitionTableEntry> partitions = new ArrayList<GptPartitionTableEntry>(); + + /** My logger */ + private static final Logger log = Logger.getLogger(GptPartitionTable.class); + + /** + * Create a new instance + * + * @param tableType the partition table type. + * @param first16KiB the first 16,384 bytes of the disk. + * @param device the drive device. + */ + public GptPartitionTable(GptPartitionTableType tableType, byte[] first16KiB, Device device) { + this.tableType = tableType; + + int blockSize = detectBlockSize(first16KiB); + + if (blockSize != -1) { + long entries = LittleEndian.getUInt32(first16KiB, blockSize + 0x50); + int entrySize = (int) LittleEndian.getUInt32(first16KiB, blockSize + 0x54); + + for (int partitionNumber = 0; partitionNumber < entries; partitionNumber++) { + log.debug("try part " + partitionNumber); + + int offset = blockSize * 2 + (partitionNumber * entrySize); + + GptPartitionTableEntry entry = new GptPartitionTableEntry(this, first16KiB, offset, blockSize); + + if (entry.isValid()) + { + partitions.add(entry); + } + } + } + } + + /** + * Detects the block size of the GPT partition. + * + * @param first16KiB the start of the disk to search for the GPT partition in. + * @return the detected block size or {@code -1} if no GPT partition is found. + */ + private static int detectBlockSize(byte[] first16KiB) { + int[] detectionSizes = new int[] { 0x200, 0x1000 }; + + for (int blockSize : detectionSizes) { + if (first16KiB.length < blockSize + 8) { + // Not enough data to check for a valid partition table + return -1; + } + + byte[] signatureBytes = new byte[8]; + System.arraycopy(first16KiB, blockSize, signatureBytes, 0, signatureBytes.length); + String signature = new String(signatureBytes, Charset.forName("US-ASCII")); + + if ("EFI PART".equals(signature)) { + return blockSize; + } + } + + return -1; + } + + /** + * Checks if the given boot sector contain a GPT partition table. + * + * @param first16KiB the first 16,384 bytes of the disk. + * @return {@code true} if the boot sector contains a GPT partition table. + */ + public static boolean containsPartitionTable(byte[] first16KiB) { + return detectBlockSize(first16KiB) != -1; + } + + public Iterator<GptPartitionTableEntry> iterator() { + return Collections.unmodifiableList(partitions).iterator(); + } + + /** + * @see org.jnode.partitions.PartitionTable#getType() + */ + public PartitionTableType getType() { + return tableType; + } +} \ No newline at end of file Added: trunk/fs/src/fs/org/jnode/partitions/gpt/GptPartitionTableEntry.java =================================================================== --- trunk/fs/src/fs/org/jnode/partitions/gpt/GptPartitionTableEntry.java (rev 0) +++ trunk/fs/src/fs/org/jnode/partitions/gpt/GptPartitionTableEntry.java 2012-03-09 13:06:29 UTC (rev 5890) @@ -0,0 +1,132 @@ +/* + * $Id: $ + * + * Copyright (C) 2003-2010 JNode.org + * + * This library is free software; you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as published + * by the Free Software Foundation; either version 2.1 of the License, or + * (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + * License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library; If not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + +package org.jnode.partitions.gpt; + +import java.nio.charset.Charset; +import org.jnode.partitions.PartitionTableEntry; +import org.jnode.partitions.ibm.IBMPartitionTable; +import org.jnode.util.LittleEndian; +import org.jnode.util.NumberUtils; + +/** + * A GPT partition table entry. + * + * @author Luke Quinane + */ +public class GptPartitionTableEntry implements PartitionTableEntry { + + /** The first 16KiB of the drive. */ + private final byte[] first16KiB; + + /** The block size. */ + private int blockSize; + + /** The offset to this partition table entry. */ + private final int offset; + + /** + * Creates a new entry. + * + * @param parent the parent table. + * @param first16KiB the first 16,384 bytes of the disk. + * @param offset the offset of this entry in the table. + * @param blockSize the block size. + */ + public GptPartitionTableEntry(GptPartitionTable parent, byte[] first16KiB, int offset, int blockSize) { + this.first16KiB = first16KiB; + this.blockSize = blockSize; + this.offset = offset; + } + + public boolean isValid() { + return first16KiB.length > offset + 128 && !isEmpty(); + } + + /** + * @see org.jnode.partitions.PartitionTableEntry#getChildPartitionTable() + */ + public IBMPartitionTable getChildPartitionTable() { + throw new UnsupportedOperationException("No child partitions."); + } + + /** + * @see org.jnode.partitions.PartitionTableEntry#hasChildPartitionTable() + */ + public boolean hasChildPartitionTable() { + return false; + } + + public boolean isEmpty() { + return GptPartitionTypes.lookUp(getPartitionTypeGuid()) == GptPartitionTypes.UNUSED_ENTRY; + } + + public byte[] getPartitionTypeGuid() { + byte[] guid = new byte[16]; + System.arraycopy(first16KiB, offset, guid, 0, guid.length); + return guid; + } + + public byte[] getPartitionGuid() { + byte[] guid = new byte[16]; + System.arraycopy(first16KiB, offset + 0x10, guid, 0, guid.length); + return guid; + } + + public long getStartOffset() { + return LittleEndian.getInt64(first16KiB, offset + 0x20) * blockSize; + } + + public long getEndOffset() { + return (LittleEndian.getInt64(first16KiB, offset + 0x28) + 1) * blockSize; + } + + public long getFlags() { + return LittleEndian.getInt64(first16KiB, offset + 0x30); + } + + public String getName() { + byte[] nameBytes = new byte[72]; + System.arraycopy(first16KiB, offset + 0x38, nameBytes, 0, nameBytes.length); + return new String(nameBytes, Charset.forName("UTF-16LE")).replace("\u0000", ""); + } + + public String dump() { + StringBuilder b = new StringBuilder(); + for (int i = 0; i < 128; i++) { + b.append(NumberUtils.hex(LittleEndian.getUInt8(first16KiB, offset + i), 2)); + b.append(' '); + } + return b.toString(); + } + + /** + * @see java.lang.Object#toString() + */ + public String toString() { + StringBuilder builder = new StringBuilder(32); + builder.append('[').append(getName()).append(' '); + builder.append(NumberUtils.hex(getPartitionTypeGuid())).append(' '); + builder.append(NumberUtils.hex(getPartitionGuid())).append(' '); + builder.append("s:").append(getStartOffset()).append(' '); + builder.append("e:").append(getEndOffset()).append(']'); + return builder.toString(); + } +} Added: trunk/fs/src/fs/org/jnode/partitions/gpt/GptPartitionTableType.java =================================================================== --- trunk/fs/src/fs/org/jnode/partitions/gpt/GptPartitionTableType.java (rev 0) +++ trunk/fs/src/fs/org/jnode/partitions/gpt/GptPartitionTableType.java 2012-03-09 13:06:29 UTC (rev 5890) @@ -0,0 +1,47 @@ +/* + * $Id: $ + * + * Copyright (C) 2003-2010 JNode.org + * + * This library is free software; you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as published + * by the Free Software Foundation; either version 2.1 of the License, or + * (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + * License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library; If not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + +package org.jnode.partitions.gpt; + +import org.jnode.driver.Device; +import org.jnode.driver.block.BlockDeviceAPI; +import org.jnode.partitions.PartitionTable; +import org.jnode.partitions.PartitionTableException; +import org.jnode.partitions.PartitionTableType; + +/** + * GPT partition table type. + * + * @author Luke Quinane + */ +public class GptPartitionTableType implements PartitionTableType { + + public PartitionTable<?> create(byte[] firstSector, Device device) throws PartitionTableException { + return new GptPartitionTable(this, firstSector, device); + } + + public String getName() { + return "EFI PART"; + } + + public boolean supports(byte[] first16KiB, BlockDeviceAPI devApi) { + return GptPartitionTable.containsPartitionTable(first16KiB); + } +} \ No newline at end of file Added: trunk/fs/src/fs/org/jnode/partitions/gpt/GptPartitionTypes.java =================================================================== --- trunk/fs/src/fs/org/jnode/partitions/gpt/GptPartitionTypes.java (rev 0) +++ trunk/fs/src/fs/org/jnode/partitions/gpt/GptPartitionTypes.java 2012-03-09 13:06:29 UTC (rev 5890) @@ -0,0 +1,165 @@ +/* + * $Id: $ + * + * Copyright (C) 2003-2010 JNode.org + * + * This library is free software; you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as published + * by the Free Software Foundation; either version 2.1 of the License, or + * (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + * License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library; If not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + +package org.jnode.partitions.gpt; + +import java.util.UUID; +import org.apache.log4j.Logger; +import org.jnode.util.NumberUtils; + +/** + * Known GPT partition types. + * + * @author Luke Quinane + */ +public enum GptPartitionTypes { + + // General + UNKNOWN(), + UNUSED_ENTRY("00000000-0000-0000-0000-000000000000"), + MBR_PARTITION_SCHEME("024DEE41-33E7-11D3-9D69-0008C781F39F"), + EFI_SYSTEM_PARTITION("C12A7328-F81F-11D2-BA4B-00A0C93EC93B"), + BIOS_BOOT_PARTITION("21686148-6449-6E6F-744E-656564454649"), + + // Windows + MICROSOFT_RESERVED_PARTITION("E3C9E316-0B5C-4DB8-817D-F92DF00215AE"), + MICROSOFT_BASIC_DATA_PARTITION("EBD0A0A2-B9E5-4433-87C0-68B6B72699C7"), + MICROSOFT_LOGICAL_DISK_MANAGER_METADATA_PARTITION("5808C8AA-7E8F-42E0-85D2-E1E90434CFB3"), + MICROSOFT_LOGICAL_DISK_MANAGER_DATA_PARTITION("AF9B60A0-1431-4F62-BC68-3311714A69AD"), + WINDOWS_RECOVERY_ENVIRONMENT("DE94BBA4-06D1-4D40-A16A-BFD50179D6AC"), + IBM_GENERAL_PARALLEL_FILE_SYSTEM_PARTITION("37AFFC90-EF7D-4E96-91C3-2D7AE055B174"), + + // HP-UX + HP_UX_DATA_PARTITION("75894C1E-3AEB-11D3-B7C1-7B03A0000000"), + HP_UX_SERVICE_PARTITION("E2A1E728-32E3-11D6-A682-7B03A0000000"), + + // Linux + LINUX_FILESYSTEM_DATA("0FC63DAF-8483-4772-8E79-3D69D8477DE4"), + LINUX_RAID_PARTITION("A19D880F-05FC-4D3B-A006-743F0F84911E"), + LINUX_SWAP_PARTITION("0657FD6D-A4AB-43C4-84E5-0933C84B4F4F"), + LINUX_LOGICAL_VOLUME_MANAGER_PARTITION("E6D6D379-F507-44C2-A23C-238F2A3DF928"), + LINUX_RESERVED("8DA63339-0007-60C0-C436-083AC8230908"), + + // FreeBSD + FREEBSD_BOOT_PARTITION("83BD6B9D-7F41-11DC-BE0B-001560B84F0F"), + FREEBSD_DATA_PARTITION("516E7CB4-6ECF-11D6-8FF8-00022D09712B"), + FREEBSD_SWAP_PARTITION("516E7CB5-6ECF-11D6-8FF8-00022D09712B"), + FREEBSD_UNIX_FILE_SYSTEM_PARTITION("516E7CB6-6ECF-11D6-8FF8-00022D09712B"), + FREEBSD_VINUM_VOLUME_MANAGER_PARTITION("516E7CB8-6ECF-11D6-8FF8-00022D09712B"), + FREEBSD_ZFS_PARITION("516E7CBA-6ECF-11D6-8FF8-00022D09712B"), + + // Apple + HFS_PLUS_PARTITION("48465300-0000-11AA-AA11-00306543ECAC"), + APPLE_UFS("55465300-0000-11AA-AA11-00306543ECAC"), + APPLE_ZFS("6A898CC3-1DD2-11B2-99A6-080020736631"), // This is the same GUID as SOLARIS_USR_PARTITION + APPLE_RAID_PARTITION("52414944-0000-11AA-AA11-00306543ECAC"), + APPLE_RAID_PARTITION_OFFLINE("52414944-5F4F-11AA-AA11-00306543ECAC"), + APPLE_BOOT_PARTITION("426F6F74-0000-11AA-AA11-00306543ECAC"), + APPLE_lABEL("4C616265-6C00-11AA-AA11-00306543ECAC"), + APPLE_TV_RECOVERY_PARTITION("5265636F-7665-11AA-AA11-00306543ECAC"), + APPLE_CORE_STORAGE_PARTITION("53746F72-6167-11AA-AA11-00306543ECAC"), + + // Solaris + SOLARIS_BOOT_PARTITION("6A82CB45-1DD2-11B2-99A6-080020736631"), + SOLARIS_ROOT_PARTITION("6A85CF4D-1DD2-11B2-99A6-080020736631"), + SOLARIS_SWAP_PARTITION("6A87C46F-1DD2-11B2-99A6-080020736631"), + SOLARIS_BACKUP_PARTITION("6A8B642B-1DD2-11B2-99A6-080020736631"), + SOLARIS_USR_PARTITION("6A898CC3-1DD2-11B2-99A6-080020736631"), // This is the same GUID as APPLE_ZFS + SOLARIS_VAR_PARTITION("6A8EF2E9-1DD2-11B2-99A6-080020736631"), + SOLARIS_HOME_PARTITION("6A90BA39-1DD2-11B2-99A6-080020736631"), + SOLARIS_ALTERNATE_SECTOR("6A9283A5-1DD2-11B2-99A6-080020736631"), + SOLARIS_RESERVED_PARTITION_1("6A945A3B-1DD2-11B2-99A6-080020736631"), + SOLARIS_RESERVED_PARTITION_2("6A9630D1-1DD2-11B2-99A6-080020736631"), + SOLARIS_RESERVED_PARTITION_3("6A980767-1DD2-11B2-99A6-080020736631"), + SOLARIS_RESERVED_PARTITION_4("6A96237F-1DD2-11B2-99A6-080020736631"), + SOLARIS_RESERVED_PARTITION_5("6A8D2AC7-1DD2-11B2-99A6-080020736631"), + + // NetBSD + NETBSD_SWAP_PARTITION("49F48D32-B10E-11DC-B99B-0019D1879648"), + NETBSD_FFS_PARTITION("49F48D5A-B10E-11DC-B99B-0019D1879648"), + NETBSD_LFS_PARTITION("49F48D82-B10E-11DC-B99B-0019D1879648"), + NETBSD_RAID_PARTITION("49F48DAA-B10E-11DC-B99B-0019D1879648"), + NETBSD_CONCATENATED_PARTITION("2DB519C4-B10F-11DC-B99B-0019D1879648"), + NETBSD_ENCRYPTED_PARTITION("2DB519EC-B10F-11DC-B99B-0019D1879648"), + + // ChromeOS + CHROMEOS_KERNEL("FE3A2A5D-4F32-41A7-B725-ACCC3285A309"), + CHROMEOS_ROOTFS("3CB8E202-3B7E-47DD-8A3C-7FF2A13CFCEC"), + CHROMEOS_FUTURE_USE("2E0A753D-9E48-43B0-8337-B15192CB1B5E"); + + /** Logger */ + private static final Logger log = Logger.getLogger(GptPartitionTypes.class); + + private UUID uuid; + + private GptPartitionTypes() { + } + + private GptPartitionTypes(String guid) { + this.uuid = UUID.fromString(guid); + } + + /** + * Looks up a partition type from its GUID. + * + * @param partitionTypeGuid the GUID to lookup. + * @return the type or {@link #UNKNOWN} if no match is found. + */ + public static GptPartitionTypes lookUp(byte[] partitionTypeGuid) { + + StringBuilder uuidBuilder = new StringBuilder(); + + uuidBuilder.append(NumberUtils.hex(partitionTypeGuid[3], 2)); + uuidBuilder.append(NumberUtils.hex(partitionTypeGuid[2], 2)); + uuidBuilder.append(NumberUtils.hex(partitionTypeGuid[1], 2)); + uuidBuilder.append(NumberUtils.hex(partitionTypeGuid[0], 2)); + uuidBuilder.append("-"); + uuidBuilder.append(NumberUtils.hex(partitionTypeGuid[5], 2)); + uuidBuilder.append(NumberUtils.hex(partitionTypeGuid[4], 2)); + uuidBuilder.append("-"); + uuidBuilder.append(NumberUtils.hex(partitionTypeGuid[7], 2)); + uuidBuilder.append(NumberUtils.hex(partitionTypeGuid[6], 2)); + uuidBuilder.append("-"); + uuidBuilder.append(NumberUtils.hex(partitionTypeGuid[8], 2)); + uuidBuilder.append(NumberUtils.hex(partitionTypeGuid[9], 2)); + uuidBuilder.append("-"); + uuidBuilder.append(NumberUtils.hex(partitionTypeGuid[10], 2)); + uuidBuilder.append(NumberUtils.hex(partitionTypeGuid[11], 2)); + uuidBuilder.append(NumberUtils.hex(partitionTypeGuid[12], 2)); + uuidBuilder.append(NumberUtils.hex(partitionTypeGuid[13], 2)); + uuidBuilder.append(NumberUtils.hex(partitionTypeGuid[14], 2)); + uuidBuilder.append(NumberUtils.hex(partitionTypeGuid[15], 2)); + + try { + UUID uuidToMatch = UUID.fromString(uuidBuilder.toString()); + + for (GptPartitionTypes type : GptPartitionTypes.values()) { + if (uuidToMatch.equals(type.uuid)) { + return type; + } + } + } + catch (Exception e) { + log.warn("Exception checking uuid: " + uuidBuilder.toString()); + } + + return UNKNOWN; + } +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ga...@us...> - 2012-03-01 21:31:50
|
Revision: 5889 http://jnode.svn.sourceforge.net/jnode/?rev=5889&view=rev Author: galatnm Date: 2012-03-01 21:31:44 +0000 (Thu, 01 Mar 2012) Log Message: ----------- Fix broken build. Modified Paths: -------------- trunk/core/descriptors/org.jnode.test.xml Added Paths: ----------- trunk/core/src/test/org/jnode/test/util/ trunk/core/src/test/org/jnode/test/util/NumberUtilsTest.java Removed Paths: ------------- trunk/core/src/test/org/jnode/util/NumberUtilsTest.java Modified: trunk/core/descriptors/org.jnode.test.xml =================================================================== --- trunk/core/descriptors/org.jnode.test.xml 2012-02-29 12:16:57 UTC (rev 5888) +++ trunk/core/descriptors/org.jnode.test.xml 2012-03-01 21:31:44 UTC (rev 5889) @@ -17,6 +17,7 @@ <export name="org.jnode.test.bugs.*"/> <export name="org.jnode.test.security.*"/> <export name="org.jnode.test.threads.*"/> + <export name="org.jnode.test.util.*"/> </library> </runtime> Copied: trunk/core/src/test/org/jnode/test/util/NumberUtilsTest.java (from rev 5888, trunk/core/src/test/org/jnode/util/NumberUtilsTest.java) =================================================================== --- trunk/core/src/test/org/jnode/test/util/NumberUtilsTest.java (rev 0) +++ trunk/core/src/test/org/jnode/test/util/NumberUtilsTest.java 2012-03-01 21:31:44 UTC (rev 5889) @@ -0,0 +1,86 @@ +package org.jnode.test.util; + +import org.jnode.util.NumberUtils; +import org.junit.Test; + +import static org.junit.Assert.assertEquals; + + +public class NumberUtilsTest { + @Test + public void testToString() throws Exception { + String result = NumberUtils.toString(15.2365f,2); + assertEquals("15.23",result); + } + + @Test + public void testToStringNeg() throws Exception { + String result = NumberUtils.toString(-15.2365f,2); + assertEquals("-15.23",result); + } + + @Test + public void testHexInt(){ + String result = NumberUtils.hex(255); + assertEquals("000000ff",result.toLowerCase()); + } + + @Test + public void testHexIntNeg(){ + String result = NumberUtils.hex(-1); + assertEquals("ffffffff",result.toLowerCase()); + } + + @Test + public void testHexIntMax(){ + String result = NumberUtils.hex(Integer.MAX_VALUE); + assertEquals("7fffffff",result.toLowerCase()); + } + + @Test + public void testHexLong(){ + String result = NumberUtils.hex(255L); + assertEquals("00000000000000ff",result.toLowerCase()); + } + + @Test + public void testHexLongNeg(){ + String result = NumberUtils.hex(-1L); + assertEquals("ffffffffffffffff",result.toLowerCase()); + } + + @Test + public void testHexLongMax(){ + String result = NumberUtils.hex(Long.MAX_VALUE); + assertEquals("7fffffffffffffff",result.toLowerCase()); + } + + @Test + public void testHexWithLength(){ + String result = NumberUtils.hex(255,2); + assertEquals("ff",result.toLowerCase()); + } + + @Test + public void testToDecimalByte(){ + String result = NumberUtils.toDecimalByte(65536); + assertEquals("65.53 kb",result.toLowerCase()); + } + + @Test + public void testToBinaryByte(){ + String result = NumberUtils.toBinaryByte(65536); + assertEquals("64.0 kb",result.toLowerCase()); + } + + @Test + public void testGetSizeUnit(){ + assertEquals(1024,NumberUtils.getSizeUnit("1K").getMultiplier()); + assertEquals("K",NumberUtils.getSizeUnit("1K").getUnit()); + } + + @Test + public void testGetSize(){ + assertEquals(1024,NumberUtils.getSize("1K")); + } +} Deleted: trunk/core/src/test/org/jnode/util/NumberUtilsTest.java =================================================================== --- trunk/core/src/test/org/jnode/util/NumberUtilsTest.java 2012-02-29 12:16:57 UTC (rev 5888) +++ trunk/core/src/test/org/jnode/util/NumberUtilsTest.java 2012-03-01 21:31:44 UTC (rev 5889) @@ -1,85 +0,0 @@ -package org.jnode.util; - -import org.junit.Test; - -import static org.junit.Assert.assertEquals; - - -public class NumberUtilsTest { - @Test - public void testToString() throws Exception { - String result = NumberUtils.toString(15.2365f,2); - assertEquals("15.23",result); - } - - @Test - public void testToStringNeg() throws Exception { - String result = NumberUtils.toString(-15.2365f,2); - assertEquals("-15.23",result); - } - - @Test - public void testHexInt(){ - String result = NumberUtils.hex(255); - assertEquals("000000ff",result.toLowerCase()); - } - - @Test - public void testHexIntNeg(){ - String result = NumberUtils.hex(-1); - assertEquals("ffffffff",result.toLowerCase()); - } - - @Test - public void testHexIntMax(){ - String result = NumberUtils.hex(Integer.MAX_VALUE); - assertEquals("7fffffff",result.toLowerCase()); - } - - @Test - public void testHexLong(){ - String result = NumberUtils.hex(255L); - assertEquals("00000000000000ff",result.toLowerCase()); - } - - @Test - public void testHexLongNeg(){ - String result = NumberUtils.hex(-1L); - assertEquals("ffffffffffffffff",result.toLowerCase()); - } - - @Test - public void testHexLongMax(){ - String result = NumberUtils.hex(Long.MAX_VALUE); - assertEquals("7fffffffffffffff",result.toLowerCase()); - } - - @Test - public void testHexWithLength(){ - String result = NumberUtils.hex(255,2); - assertEquals("ff",result.toLowerCase()); - } - - @Test - public void testToDecimalByte(){ - String result = NumberUtils.toDecimalByte(65536); - assertEquals("65.53 kb",result.toLowerCase()); - } - - @Test - public void testToBinaryByte(){ - String result = NumberUtils.toBinaryByte(65536); - assertEquals("64.0 kb",result.toLowerCase()); - } - - @Test - public void testGetSizeUnit(){ - assertEquals(1024,NumberUtils.getSizeUnit("1K").getMultiplier()); - assertEquals("K",NumberUtils.getSizeUnit("1K").getUnit()); - } - - @Test - public void testGetSize(){ - assertEquals(1024,NumberUtils.getSize("1K")); - } -} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ga...@us...> - 2012-02-29 12:17:04
|
Revision: 5888 http://jnode.svn.sourceforge.net/jnode/?rev=5888&view=rev Author: galatnm Date: 2012-02-29 12:16:57 +0000 (Wed, 29 Feb 2012) Log Message: ----------- Add some unit tests. Added Paths: ----------- trunk/core/src/test/org/jnode/util/ trunk/core/src/test/org/jnode/util/NumberUtilsTest.java Added: trunk/core/src/test/org/jnode/util/NumberUtilsTest.java =================================================================== --- trunk/core/src/test/org/jnode/util/NumberUtilsTest.java (rev 0) +++ trunk/core/src/test/org/jnode/util/NumberUtilsTest.java 2012-02-29 12:16:57 UTC (rev 5888) @@ -0,0 +1,85 @@ +package org.jnode.util; + +import org.junit.Test; + +import static org.junit.Assert.assertEquals; + + +public class NumberUtilsTest { + @Test + public void testToString() throws Exception { + String result = NumberUtils.toString(15.2365f,2); + assertEquals("15.23",result); + } + + @Test + public void testToStringNeg() throws Exception { + String result = NumberUtils.toString(-15.2365f,2); + assertEquals("-15.23",result); + } + + @Test + public void testHexInt(){ + String result = NumberUtils.hex(255); + assertEquals("000000ff",result.toLowerCase()); + } + + @Test + public void testHexIntNeg(){ + String result = NumberUtils.hex(-1); + assertEquals("ffffffff",result.toLowerCase()); + } + + @Test + public void testHexIntMax(){ + String result = NumberUtils.hex(Integer.MAX_VALUE); + assertEquals("7fffffff",result.toLowerCase()); + } + + @Test + public void testHexLong(){ + String result = NumberUtils.hex(255L); + assertEquals("00000000000000ff",result.toLowerCase()); + } + + @Test + public void testHexLongNeg(){ + String result = NumberUtils.hex(-1L); + assertEquals("ffffffffffffffff",result.toLowerCase()); + } + + @Test + public void testHexLongMax(){ + String result = NumberUtils.hex(Long.MAX_VALUE); + assertEquals("7fffffffffffffff",result.toLowerCase()); + } + + @Test + public void testHexWithLength(){ + String result = NumberUtils.hex(255,2); + assertEquals("ff",result.toLowerCase()); + } + + @Test + public void testToDecimalByte(){ + String result = NumberUtils.toDecimalByte(65536); + assertEquals("65.53 kb",result.toLowerCase()); + } + + @Test + public void testToBinaryByte(){ + String result = NumberUtils.toBinaryByte(65536); + assertEquals("64.0 kb",result.toLowerCase()); + } + + @Test + public void testGetSizeUnit(){ + assertEquals(1024,NumberUtils.getSizeUnit("1K").getMultiplier()); + assertEquals("K",NumberUtils.getSizeUnit("1K").getUnit()); + } + + @Test + public void testGetSize(){ + assertEquals(1024,NumberUtils.getSize("1K")); + } +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ga...@us...> - 2012-02-15 16:36:28
|
Revision: 5887 http://jnode.svn.sourceforge.net/jnode/?rev=5887&view=rev Author: galatnm Date: 2012-02-15 16:36:17 +0000 (Wed, 15 Feb 2012) Log Message: ----------- HFS : Rewrite folder operations (in progress). Modified Paths: -------------- trunk/fs/src/fs/org/jnode/fs/hfsplus/HfsPlusDirectory.java trunk/fs/src/fs/org/jnode/fs/hfsplus/catalog/Catalog.java Modified: trunk/fs/src/fs/org/jnode/fs/hfsplus/HfsPlusDirectory.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/hfsplus/HfsPlusDirectory.java 2012-02-14 16:05:35 UTC (rev 5886) +++ trunk/fs/src/fs/org/jnode/fs/hfsplus/HfsPlusDirectory.java 2012-02-15 16:36:17 UTC (rev 5887) @@ -76,7 +76,6 @@ @Override public FSEntry addFile(String name) throws IOException { - log.debug("<<< BEGIN addFile " + name + " >>>"); if (getFileSystem().isReadOnly()) { throw new ReadOnlyFileSystemException(); } @@ -86,7 +85,6 @@ FSEntry newEntry = createFileEntry(name); setFreeEntry(newEntry); - log.debug("<<< END addFile " + name + " >>>"); return newEntry; } @@ -111,7 +109,6 @@ @Override public void flush() throws IOException { - log.debug("<<< BEGIN flush >>>"); if (getFileSystem().isReadOnly()) { throw new ReadOnlyFileSystemException(); } @@ -121,7 +118,7 @@ // entries.resetDirty(); entry.resetDirty(); } - log.debug("<<< END flush >>>"); + log.debug("Directory flushed."); } @Override @@ -181,7 +178,6 @@ entries = FSEntryTable.EMPTY_TABLE; } } - log.debug("<<< END checkEntriesLoaded >>>"); } /** Modified: trunk/fs/src/fs/org/jnode/fs/hfsplus/catalog/Catalog.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/hfsplus/catalog/Catalog.java 2012-02-14 16:05:35 UTC (rev 5886) +++ trunk/fs/src/fs/org/jnode/fs/hfsplus/catalog/Catalog.java 2012-02-15 16:36:17 UTC (rev 5887) @@ -110,11 +110,33 @@ BTHeaderRecord.BT_BIG_KEYS_MASK); log.debug(bthr.toString()); bufferLength += BTHeaderRecord.BT_HEADER_RECORD_LENGTH; + log.info("Create root node."); int rootNodePosition = bthr.getRootNode() * nodeSize; bufferLength += (rootNodePosition - bufferLength); - // Create node descriptor - NodeDescriptor nd = + CatalogLeafNode rootNode = createRootNode(params); + buffer = ByteBuffer.allocate(bufferLength + bthr.getNodeSize()); + buffer.put(btnd.getBytes()); + buffer.put(bthr.getBytes()); + buffer.position(rootNodePosition); + buffer.put(rootNode.getBytes()); + buffer.rewind(); + } + + /** + * Save catalog file to disk. + * + * @throws IOException + */ + public void update() throws IOException { + SuperBlock vh = fs.getVolumeHeader(); + long offset = vh.getCatalogFile().getExtent(0).getStartOffset(vh.getBlockSize()); + fs.getApi().write(offset, this.getBytes()); + } + + private CatalogLeafNode createRootNode(HFSPlusParams params){ + int nodeSize = params.getCatalogNodeSize(); + NodeDescriptor nd = new NodeDescriptor(0, 0, NodeDescriptor.BT_LEAF_NODE, 1, params.getInitializeNumRecords()); CatalogLeafNode rootNode = new CatalogLeafNode(nd, nodeSize); @@ -133,26 +155,10 @@ record = new LeafRecord(tck, ct.getBytes()); rootNode.addNodeRecord(record); log.debug(rootNode.toString()); - buffer = ByteBuffer.allocate(bufferLength + bthr.getNodeSize()); - buffer.put(btnd.getBytes()); - buffer.put(bthr.getBytes()); - buffer.position(rootNodePosition); - buffer.put(rootNode.getBytes()); - buffer.rewind(); + return rootNode; } /** - * Save catalog file to disk. - * - * @throws IOException - */ - public void update() throws IOException { - SuperBlock vh = fs.getVolumeHeader(); - long offset = vh.getCatalogFile().getExtent(0).getStartOffset(vh.getBlockSize()); - fs.getApi().write(offset, this.getBytes()); - } - - /** * Create a new node in the catalog B-Tree. * * @param filename @@ -165,6 +171,7 @@ int nodeType) throws IOException { CatalogLeafNode node; HfsUnicodeString name = new HfsUnicodeString(filename); + // find parent leaf record. LeafRecord record = this.getRecord(parentId, name); if (record == null) { NodeDescriptor nd = new NodeDescriptor(0, 0, NodeDescriptor.BT_LEAF_NODE, 1, 2); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ga...@us...> - 2012-02-14 16:05:46
|
Revision: 5886 http://jnode.svn.sourceforge.net/jnode/?rev=5886&view=rev Author: galatnm Date: 2012-02-14 16:05:35 +0000 (Tue, 14 Feb 2012) Log Message: ----------- HFS : Rewrite folder operations (in progress). Modified Paths: -------------- trunk/fs/src/fs/org/jnode/fs/hfsplus/HfsPlusDirectory.java trunk/fs/src/fs/org/jnode/fs/hfsplus/SuperBlock.java trunk/fs/src/fs/org/jnode/fs/hfsplus/catalog/Catalog.java trunk/fs/src/fs/org/jnode/fs/hfsplus/catalog/CatalogFolder.java trunk/fs/src/fs/org/jnode/fs/hfsplus/tree/LeafRecord.java trunk/fs/src/test/org/jnode/fs/hfsplus/HfsPlusFileSystemTest.java Added Paths: ----------- trunk/fs/src/test/org/jnode/fs/hfsplus/catalog/CatalogFolderTest.java Modified: trunk/fs/src/fs/org/jnode/fs/hfsplus/HfsPlusDirectory.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/hfsplus/HfsPlusDirectory.java 2012-02-08 11:49:43 UTC (rev 5885) +++ trunk/fs/src/fs/org/jnode/fs/hfsplus/HfsPlusDirectory.java 2012-02-14 16:05:35 UTC (rev 5886) @@ -35,6 +35,7 @@ import org.jnode.fs.hfsplus.catalog.CatalogFile; import org.jnode.fs.hfsplus.catalog.CatalogFolder; import org.jnode.fs.hfsplus.catalog.CatalogKey; +import org.jnode.fs.hfsplus.catalog.CatalogLeafNode; import org.jnode.fs.hfsplus.catalog.CatalogNodeId; import org.jnode.fs.hfsplus.tree.LeafRecord; import org.jnode.fs.spi.FSEntryTable; @@ -60,17 +61,16 @@ @Override public FSEntry addDirectory(String name) throws IOException { - log.debug("<<< BEGIN addDirectory " + name + " >>>"); if (getFileSystem().isReadOnly()) { throw new ReadOnlyFileSystemException(); } if (getEntry(name) != null) { - throw new IOException("File or Directory already exists" + name); + throw new IOException("File or Directory already exists : " + name); } FSEntry newEntry = createDirectoryEntry(name); setFreeEntry(newEntry); - log.debug("<<< END addDirectory " + name + " >>>"); + log.debug("Directory " + name + " added"); return newEntry; } @@ -231,16 +231,17 @@ } Catalog catalog = ((HfsPlusFileSystem) getFileSystem()).getCatalog(); SuperBlock volumeHeader = ((HfsPlusFileSystem) getFileSystem()).getVolumeHeader(); - LeafRecord folderRecord = + CatalogLeafNode node = catalog.createNode(name, this.folder.getFolderId(), new CatalogNodeId(volumeHeader.getNextCatalogId()), CatalogFolder.RECORD_TYPE_FOLDER_THREAD); - folder.setValence(folder.getValence() + 1); + folder.incrementValence(); - HfsPlusEntry newEntry = new HfsPlusEntry((HfsPlusFileSystem) getFileSystem(), this, name, folderRecord); + HfsPlusEntry newEntry = new HfsPlusEntry((HfsPlusFileSystem) getFileSystem(), this, name, node.getNodeRecord(0)); newEntry.setDirty(); - volumeHeader.setFolderCount(volumeHeader.getFolderCount() + 1); + volumeHeader.incrementFolderCount(); log.debug("New volume header :\n" + volumeHeader.toString()); + volumeHeader.update(); return newEntry; } Modified: trunk/fs/src/fs/org/jnode/fs/hfsplus/SuperBlock.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/hfsplus/SuperBlock.java 2012-02-08 11:49:43 UTC (rev 5885) +++ trunk/fs/src/fs/org/jnode/fs/hfsplus/SuperBlock.java 2012-02-14 16:05:35 UTC (rev 5886) @@ -426,6 +426,11 @@ public final boolean isAttribute(final int maskBit) { return (((getAttributes() >> maskBit) & 0x1) != 0); } + + public void incrementFolderCount(){ + this.setFolderCount(this.getFolderCount() + 1); + } + public byte[] getBytes() { return data; Modified: trunk/fs/src/fs/org/jnode/fs/hfsplus/catalog/Catalog.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/hfsplus/catalog/Catalog.java 2012-02-08 11:49:43 UTC (rev 5885) +++ trunk/fs/src/fs/org/jnode/fs/hfsplus/catalog/Catalog.java 2012-02-14 16:05:35 UTC (rev 5886) @@ -126,7 +126,7 @@ LeafRecord record = new LeafRecord(ck, folder.getBytes()); rootNode.addNodeRecord(record); // Second record (thread) - CatalogKey tck = new CatalogKey(CatalogNodeId.HFSPLUS_ROOT_CNID, name); + CatalogKey tck = new CatalogKey(CatalogNodeId.HFSPLUS_POR_CNID, name); CatalogThread ct = new CatalogThread(CatalogFolder.RECORD_TYPE_FOLDER_THREAD, CatalogNodeId.HFSPLUS_ROOT_CNID, new HfsUnicodeString("")); @@ -161,28 +161,40 @@ * @param nodeType * @return the new node instance */ - public LeafRecord createNode(String filename, CatalogNodeId parentId, CatalogNodeId nodeId, + public CatalogLeafNode createNode(String filename, CatalogNodeId parentId, CatalogNodeId nodeId, int nodeType) throws IOException { + CatalogLeafNode node; HfsUnicodeString name = new HfsUnicodeString(filename); LeafRecord record = this.getRecord(parentId, name); if (record == null) { NodeDescriptor nd = new NodeDescriptor(0, 0, NodeDescriptor.BT_LEAF_NODE, 1, 2); - CatalogLeafNode node = new CatalogLeafNode(nd, 8192); + node = new CatalogLeafNode(nd, 8192); + // Normal record CatalogKey key = new CatalogKey(parentId, name); - CatalogThread thread = new CatalogThread(nodeType, parentId, name); - record = new LeafRecord(key, thread.getBytes()); - node.addNodeRecord(record); if (nodeType == CatalogFolder.RECORD_TYPE_FOLDER) { - CatalogFolder folder = new CatalogFolder(0, nodeId); + CatalogFolder folder = new CatalogFolder(0, parentId); key = new CatalogKey(parentId, name); record = new LeafRecord(key, folder.getBytes()); + node.addNodeRecord(record); } else { - // TODO + // Catalog file } + // Thread record + key = new CatalogKey(parentId, name); + int threadType; + if (nodeType == CatalogFolder.RECORD_TYPE_FOLDER) { + threadType = CatalogFolder.RECORD_TYPE_FOLDER_THREAD; + } else { + threadType = CatalogFile.RECORD_TYPE_FILE_THREAD; + } + CatalogThread thread = new CatalogThread(threadType, nodeId, name); + record = new LeafRecord(key, thread.getBytes()); + node.addNodeRecord(record); + } else { - // TODO + throw new IOException("Leaf record for parent (" + parentId.getId() + ") doesn't exist."); } - return record; + return node; } /** Modified: trunk/fs/src/fs/org/jnode/fs/hfsplus/catalog/CatalogFolder.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/hfsplus/catalog/CatalogFolder.java 2012-02-08 11:49:43 UTC (rev 5885) +++ trunk/fs/src/fs/org/jnode/fs/hfsplus/catalog/CatalogFolder.java 2012-02-14 16:05:35 UTC (rev 5886) @@ -148,4 +148,8 @@ this.attrModDate = attrModDate; } + public void incrementValence(){ + this.setValence(this.getValence() + 1); + } + } Modified: trunk/fs/src/fs/org/jnode/fs/hfsplus/tree/LeafRecord.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/hfsplus/tree/LeafRecord.java 2012-02-08 11:49:43 UTC (rev 5885) +++ trunk/fs/src/fs/org/jnode/fs/hfsplus/tree/LeafRecord.java 2012-02-14 16:05:35 UTC (rev 5886) @@ -36,7 +36,7 @@ public LeafRecord(final Key key, final byte[] nodeData, final int offset, final int recordDataSize) { this.key = key; this.recordData = new byte[recordDataSize]; - System.arraycopy(nodeData, offset + key.getKeyLength(), this.recordData, 0, recordDataSize); + System.arraycopy(nodeData, offset + (key.getKeyLength()-2), this.recordData, 0, recordDataSize); type = BigEndian.getInt16(this.recordData, 0); } Modified: trunk/fs/src/test/org/jnode/fs/hfsplus/HfsPlusFileSystemTest.java =================================================================== --- trunk/fs/src/test/org/jnode/fs/hfsplus/HfsPlusFileSystemTest.java 2012-02-08 11:49:43 UTC (rev 5885) +++ trunk/fs/src/test/org/jnode/fs/hfsplus/HfsPlusFileSystemTest.java 2012-02-14 16:05:35 UTC (rev 5886) @@ -80,7 +80,16 @@ fs.read(); fs.createRootEntry(); FSDirectory root = fs.getRootEntry().getDirectory(); + assertFalse("Must be empty", root.iterator().hasNext()); root.addDirectory("test"); + fs.flush(); + fs.close(); + fs = new HfsPlusFileSystemType().create(device, false); + fs.read(); + assertEquals(1,fs.getVolumeHeader().getFolderCount()); + fs.createRootEntry(); + root = fs.getRootEntry().getDirectory(); + assertTrue("Must contains one directory", root.iterator().hasNext()); } private Device createTestDisk(boolean formatted) throws IOException { Added: trunk/fs/src/test/org/jnode/fs/hfsplus/catalog/CatalogFolderTest.java =================================================================== --- trunk/fs/src/test/org/jnode/fs/hfsplus/catalog/CatalogFolderTest.java (rev 0) +++ trunk/fs/src/test/org/jnode/fs/hfsplus/catalog/CatalogFolderTest.java 2012-02-14 16:05:35 UTC (rev 5886) @@ -0,0 +1,30 @@ +package org.jnode.fs.hfsplus.catalog; + +import static org.junit.Assert.*; + +import org.junit.Test; + +public class CatalogFolderTest { + + @Test + public void testCatalogFolderIntCatalogNodeId() { + CatalogFolder folder = new CatalogFolder(0,CatalogNodeId.HFSPLUS_ROOT_CNID); + assertNotNull(folder); + assertEquals(0, folder.getValence()); + assertEquals(2,folder.getFolderId().getId()); + folder = new CatalogFolder(folder.getBytes()); + assertNotNull(folder); + assertEquals(0, folder.getValence()); + assertEquals(2,folder.getFolderId().getId()); + + } + + @Test + public void testCatalogFolder(){ + CatalogFolder folder = new CatalogFolder(new byte[]{0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, -53, 96, 7, 78, -53, 96, 7, 78, -53, 96, 7, 78, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 26, 0, 0, 0, 2, 0, 9, 0, 116, 0, 101, 0, 115, 0, 116, 0, 100, 0, 114, 0, 105, 0, 118, 0, 101, 0, 3}); + assertNotNull(folder); + assertEquals(0, folder.getValence()); + assertEquals(2,folder.getFolderId().getId()); + } + +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ga...@us...> - 2012-02-08 11:49:54
|
Revision: 5885 http://jnode.svn.sourceforge.net/jnode/?rev=5885&view=rev Author: galatnm Date: 2012-02-08 11:49:43 +0000 (Wed, 08 Feb 2012) Log Message: ----------- Little documentation improvement based on the RFC. Modified Paths: -------------- trunk/net/src/net/org/jnode/net/ipv4/udp/UDPHeader.java Modified: trunk/net/src/net/org/jnode/net/ipv4/udp/UDPHeader.java =================================================================== --- trunk/net/src/net/org/jnode/net/ipv4/udp/UDPHeader.java 2012-01-27 08:17:35 UTC (rev 5884) +++ trunk/net/src/net/org/jnode/net/ipv4/udp/UDPHeader.java 2012-02-08 11:49:43 UTC (rev 5885) @@ -36,17 +36,21 @@ /** My logger */ private static final Logger log = Logger.getLogger(UDPHeader.class); + /** The port of the sending process or 0 if not used. */ private final int srcPort; + /** The destination port within the context of a particular internet address */ private final int dstPort; + /** The length in octet. It include the header and the data. Minimum value of the length is 8 */ private final int udpLength; + private final boolean checksumOk; /** * Create a new instance * - * @param srcPort - * @param dstPort - * @param dataLength + * @param srcPort The port of the sending process. + * @param dstPort The destination port. + * @param dataLength The length of the data. */ public UDPHeader(int srcPort, int dstPort, int dataLength) { this.srcPort = srcPort; @@ -58,7 +62,7 @@ /** * Create a new instance and read the contents from the given buffer * - * @param skbuf + * @param skbuf The socket buffer. */ public UDPHeader(SocketBuffer skbuf) { this.srcPort = skbuf.get16(0); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ga...@us...> - 2012-01-27 08:17:41
|
Revision: 5884 http://jnode.svn.sourceforge.net/jnode/?rev=5884&view=rev Author: galatnm Date: 2012-01-27 08:17:35 +0000 (Fri, 27 Jan 2012) Log Message: ----------- HFS : Fix unsigned byte in header record. Modified Paths: -------------- trunk/fs/src/fs/org/jnode/fs/hfsplus/tree/BTHeaderRecord.java Modified: trunk/fs/src/fs/org/jnode/fs/hfsplus/tree/BTHeaderRecord.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/hfsplus/tree/BTHeaderRecord.java 2012-01-25 23:18:03 UTC (rev 5883) +++ trunk/fs/src/fs/org/jnode/fs/hfsplus/tree/BTHeaderRecord.java 2012-01-27 08:17:35 UTC (rev 5884) @@ -96,8 +96,8 @@ totalNodes = BigEndian.getInt32(data, 22); freeNodes = BigEndian.getInt32(data, 26); clumpSize = BigEndian.getInt32(data, 32); - treeType = BigEndian.getInt8(data,36); - keyCompareType = BigEndian.getInt8(data,37); + treeType = BigEndian.getUInt8(data,36); + keyCompareType = BigEndian.getUInt8(data,37); attributes = BigEndian.getInt32(data, 38); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ga...@us...> - 2012-01-25 23:18:09
|
Revision: 5883 http://jnode.svn.sourceforge.net/jnode/?rev=5883&view=rev Author: galatnm Date: 2012-01-25 23:18:03 +0000 (Wed, 25 Jan 2012) Log Message: ----------- Fix typo. Modified Paths: -------------- trunk/fs/src/fs/org/jnode/fs/hfsplus/tree/BTHeaderRecord.java Modified: trunk/fs/src/fs/org/jnode/fs/hfsplus/tree/BTHeaderRecord.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/hfsplus/tree/BTHeaderRecord.java 2012-01-25 15:46:30 UTC (rev 5882) +++ trunk/fs/src/fs/org/jnode/fs/hfsplus/tree/BTHeaderRecord.java 2012-01-25 23:18:03 UTC (rev 5883) @@ -97,7 +97,7 @@ freeNodes = BigEndian.getInt32(data, 26); clumpSize = BigEndian.getInt32(data, 32); treeType = BigEndian.getInt8(data,36); - keyCompareType = BigEndian.getInt8(data,36); + keyCompareType = BigEndian.getInt8(data,37); attributes = BigEndian.getInt32(data, 38); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ga...@us...> - 2012-01-25 15:46:41
|
Revision: 5882 http://jnode.svn.sourceforge.net/jnode/?rev=5882&view=rev Author: galatnm Date: 2012-01-25 15:46:30 +0000 (Wed, 25 Jan 2012) Log Message: ----------- Fixes from luke concerning HFS+ extends management. Modified Paths: -------------- trunk/fs/src/fs/org/jnode/fs/hfsplus/HfsPlusFile.java trunk/fs/src/fs/org/jnode/fs/hfsplus/HfsPlusForkData.java trunk/fs/src/fs/org/jnode/fs/hfsplus/catalog/Catalog.java trunk/fs/src/fs/org/jnode/fs/hfsplus/extent/ExtentDescriptor.java trunk/fs/src/fs/org/jnode/fs/hfsplus/tree/BTHeaderRecord.java Modified: trunk/fs/src/fs/org/jnode/fs/hfsplus/HfsPlusFile.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/hfsplus/HfsPlusFile.java 2011-12-22 15:30:32 UTC (rev 5881) +++ trunk/fs/src/fs/org/jnode/fs/hfsplus/HfsPlusFile.java 2012-01-25 15:46:30 UTC (rev 5882) @@ -22,11 +22,9 @@ import java.io.IOException; import java.nio.ByteBuffer; - import org.jnode.fs.FSFile; import org.jnode.fs.FileSystem; import org.jnode.fs.hfsplus.catalog.CatalogFile; -import org.jnode.fs.hfsplus.extent.ExtentDescriptor; public class HfsPlusFile implements FSFile { @@ -57,12 +55,7 @@ @Override public final void read(final long fileOffset, final ByteBuffer dest) throws IOException { HfsPlusFileSystem fs = (HfsPlusFileSystem) getFileSystem(); - for (ExtentDescriptor d : file.getDatas().getExtents()) { - if (!d.isEmpty()) { - long firstOffset = (long) d.getStartOffset(fs.getVolumeHeader().getBlockSize()); - fs.getApi().read(firstOffset, dest); - } - } + file.getDatas().read(fs,fileOffset,dest); } @Override Modified: trunk/fs/src/fs/org/jnode/fs/hfsplus/HfsPlusForkData.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/hfsplus/HfsPlusForkData.java 2011-12-22 15:30:32 UTC (rev 5881) +++ trunk/fs/src/fs/org/jnode/fs/hfsplus/HfsPlusForkData.java 2012-01-25 15:46:30 UTC (rev 5882) @@ -20,6 +20,8 @@ package org.jnode.fs.hfsplus; +import java.io.IOException; +import java.nio.ByteBuffer; import org.jnode.fs.hfsplus.extent.ExtentDescriptor; import org.jnode.util.BigEndian; @@ -111,7 +113,32 @@ public ExtentDescriptor getExtent(int index) { return extents[index]; } + /** + * Read a block of data + * + * @param fileSystem the associated file system. + * @param offset the offset to read from. + * @param buffer the buffer to read into. + * @throws java.io.IOException if an error occurs. + */ + public void read(HfsPlusFileSystem fileSystem, long offset, ByteBuffer buffer) throws IOException { + for (ExtentDescriptor extentDescriptor : extents) { + if (buffer.remaining() > 0 && !extentDescriptor.isEmpty()) { + long length = extentDescriptor.getSize(fileSystem.getVolumeHeader().getBlockSize()); + if (offset != 0 && length < offset) { + offset -= length; + } else { + + long firstOffset = extentDescriptor.getStartOffset(fileSystem.getVolumeHeader().getBlockSize()); + fileSystem.getApi().read(firstOffset + offset, buffer); + + offset = 0; + } + } + } + } + /** * * @param index Modified: trunk/fs/src/fs/org/jnode/fs/hfsplus/catalog/Catalog.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/hfsplus/catalog/Catalog.java 2011-12-22 15:30:32 UTC (rev 5881) +++ trunk/fs/src/fs/org/jnode/fs/hfsplus/catalog/Catalog.java 2012-01-25 15:46:30 UTC (rev 5882) @@ -24,13 +24,12 @@ import java.nio.ByteBuffer; import java.util.LinkedList; import java.util.List; - import org.apache.log4j.Logger; import org.jnode.fs.hfsplus.HFSPlusParams; import org.jnode.fs.hfsplus.HfsPlusFileSystem; +import org.jnode.fs.hfsplus.HfsPlusForkData; import org.jnode.fs.hfsplus.HfsUnicodeString; import org.jnode.fs.hfsplus.SuperBlock; -import org.jnode.fs.hfsplus.extent.ExtentDescriptor; import org.jnode.fs.hfsplus.tree.BTHeaderRecord; import org.jnode.fs.hfsplus.tree.IndexRecord; import org.jnode.fs.hfsplus.tree.LeafRecord; @@ -52,7 +51,7 @@ */ private BTHeaderRecord bthr; - private int catalogHeaderNodeOffset; + private HfsPlusForkData catalogFile; private ByteBuffer buffer; @@ -66,13 +65,12 @@ log.info("Load B-Tree catalog file."); this.fs = fs; SuperBlock sb = fs.getVolumeHeader(); - ExtentDescriptor firstExtent = sb.getCatalogFile().getExtent(0); - catalogHeaderNodeOffset = firstExtent.getStartOffset(sb.getBlockSize()); - if (!firstExtent.isEmpty()) { - buffer = - ByteBuffer.allocate(NodeDescriptor.BT_NODE_DESCRIPTOR_LENGTH + + catalogFile = sb.getCatalogFile(); + + if(!catalogFile.getExtent(0).isEmpty()) { + buffer = ByteBuffer.allocate(NodeDescriptor.BT_NODE_DESCRIPTOR_LENGTH + BTHeaderRecord.BT_HEADER_RECORD_LENGTH); - fs.getApi().read(catalogHeaderNodeOffset, buffer); + catalogFile.read(fs, 0, buffer); buffer.rewind(); byte[] data = ByteBufferUtils.toArray(buffer); log.info("Load catalog node descriptor."); @@ -150,7 +148,7 @@ */ public void update() throws IOException { SuperBlock vh = fs.getVolumeHeader(); - int offset = vh.getCatalogFile().getExtent(0).getStartOffset(vh.getBlockSize()); + long offset = vh.getCatalogFile().getExtent(0).getStartOffset(vh.getBlockSize()); fs.getApi().write(offset, this.getBytes()); } @@ -197,8 +195,7 @@ LeafRecord lr = null; int nodeSize = bthr.getNodeSize(); ByteBuffer nodeData = ByteBuffer.allocate(nodeSize); - fs.getApi().read(catalogHeaderNodeOffset + (getBTHeaderRecord().getRootNode() * nodeSize), - nodeData); + catalogFile.read(fs, (bthr.getRootNode()*nodeSize), nodeData); nodeData.rewind(); byte[] data = ByteBufferUtils.toArray(nodeData); NodeDescriptor nd = new NodeDescriptor(nodeData.array(), 0); @@ -206,9 +203,9 @@ while (nd.isIndexNode()) { CatalogIndexNode node = new CatalogIndexNode(data, nodeSize); IndexRecord record = (IndexRecord) node.find(parentID); - currentOffset = catalogHeaderNodeOffset + (record.getIndex() * nodeSize); + currentOffset = record.getIndex() * nodeSize; nodeData = ByteBuffer.allocate(nodeSize); - fs.getApi().read(currentOffset, nodeData); + catalogFile.read(fs, currentOffset, nodeData); nodeData.rewind(); data = ByteBufferUtils.toArray(nodeData); nd = new NodeDescriptor(nodeData.array(), 0); @@ -248,7 +245,7 @@ int currentNodeNumber = nodeNumber; int nodeSize = getBTHeaderRecord().getNodeSize(); ByteBuffer nodeData = ByteBuffer.allocate(nodeSize); - fs.getApi().read(catalogHeaderNodeOffset + (currentNodeNumber * nodeSize), nodeData); + catalogFile.read(fs, (currentNodeNumber * nodeSize), nodeData); byte[] datas = nodeData.array(); NodeDescriptor nd = new NodeDescriptor(datas, 0); if (nd.isIndexNode()) { @@ -286,7 +283,7 @@ int currentNodeNumber = getBTHeaderRecord().getRootNode(); int nodeSize = getBTHeaderRecord().getNodeSize(); ByteBuffer nodeData = ByteBuffer.allocate(nodeSize); - fs.getApi().read(catalogHeaderNodeOffset + (currentNodeNumber * nodeSize), nodeData); + catalogFile.read(fs, (currentNodeNumber * nodeSize), nodeData); NodeDescriptor nd = new NodeDescriptor(nodeData.array(), 0); int currentOffset = 0; CatalogKey cKey = new CatalogKey(parentID, nodeName); @@ -294,9 +291,9 @@ CatalogIndexNode node = new CatalogIndexNode(nodeData.array(), nodeSize); IndexRecord record = node.find(cKey); currentNodeNumber = record.getIndex(); - currentOffset = catalogHeaderNodeOffset + record.getIndex() * nodeSize; + currentOffset = record.getIndex() * nodeSize; nodeData = ByteBuffer.allocate(nodeSize); - fs.getApi().read(currentOffset, buffer); + catalogFile.read(fs, currentOffset, buffer); node = new CatalogIndexNode(nodeData.array(), nodeSize); } LeafRecord lr = null; Modified: trunk/fs/src/fs/org/jnode/fs/hfsplus/extent/ExtentDescriptor.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/hfsplus/extent/ExtentDescriptor.java 2011-12-22 15:30:32 UTC (rev 5881) +++ trunk/fs/src/fs/org/jnode/fs/hfsplus/extent/ExtentDescriptor.java 2012-01-25 15:46:30 UTC (rev 5882) @@ -89,8 +89,8 @@ * @param nodeSize the size of a node. * @return offset of the extent. */ - public int getStartOffset(int nodeSize) { - return startBlock * nodeSize; + public long getStartOffset(int nodeSize) { + return (long)startBlock * nodeSize; } /** @@ -108,8 +108,8 @@ * @param nodeSize the size of a node. * @return size of the extent. */ - public int getSize(int nodeSize) { - return blockCount * nodeSize; + public long getSize(int nodeSize) { + return (long)blockCount * nodeSize; } /** Modified: trunk/fs/src/fs/org/jnode/fs/hfsplus/tree/BTHeaderRecord.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/hfsplus/tree/BTHeaderRecord.java 2011-12-22 15:30:32 UTC (rev 5881) +++ trunk/fs/src/fs/org/jnode/fs/hfsplus/tree/BTHeaderRecord.java 2012-01-25 15:46:30 UTC (rev 5882) @@ -93,12 +93,12 @@ lastLeafNode = BigEndian.getInt32(data, 14); nodeSize = BigEndian.getInt16(data, 18); maxKeyLength = BigEndian.getInt16(data, 20); - totalNodes = BigEndian.getInt16(data, 24); - freeNodes = BigEndian.getInt16(data, 28); - clumpSize = BigEndian.getInt16(data, 32); - treeType = BigEndian.getInt16(data, 36); - keyCompareType = BigEndian.getInt16(data, 37); - attributes = BigEndian.getInt32(data, 39); + totalNodes = BigEndian.getInt32(data, 22); + freeNodes = BigEndian.getInt32(data, 26); + clumpSize = BigEndian.getInt32(data, 32); + treeType = BigEndian.getInt8(data,36); + keyCompareType = BigEndian.getInt8(data,36); + attributes = BigEndian.getInt32(data, 38); } public byte[] getBytes() { @@ -114,8 +114,8 @@ BigEndian.setInt32(data, 26, freeNodes); BigEndian.setInt32(data, 32, clumpSize); BigEndian.setInt8(data, 36, treeType); - BigEndian.setInt8(data, 38, keyCompareType); - BigEndian.setInt32(data, 39, attributes); + BigEndian.setInt8(data, 37, keyCompareType); + BigEndian.setInt32(data, 38, attributes); return data; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ga...@us...> - 2011-12-22 15:30:45
|
Revision: 5881 http://jnode.svn.sourceforge.net/jnode/?rev=5881&view=rev Author: galatnm Date: 2011-12-22 15:30:32 +0000 (Thu, 22 Dec 2011) Log Message: ----------- build files clean up. Modified Paths: -------------- trunk/all/build.xml trunk/builder/build.xml Modified: trunk/all/build.xml =================================================================== --- trunk/all/build.xml 2011-12-15 21:22:44 UTC (rev 5880) +++ trunk/all/build.xml 2011-12-22 15:30:32 UTC (rev 5881) @@ -1,541 +1,540 @@ <project name="JNode" default="help" basedir="."> - <property name="root.dir" value="${basedir}/.."/> - + <property name="root.dir" value="${basedir}/.."/> + <!-- if task is used from this --> - <taskdef resource="net/sf/antcontrib/antcontrib.properties"/> + <taskdef resource="net/sf/antcontrib/antcontrib.properties"/> <!-- before including jnode.xml, we must set this property --> - <condition property="memoryMaximumSize" value="1512m" else="768m"> - <os arch="amd64"/> - </condition> - <echo message="Setting memoryMaximumSize to ${memoryMaximumSize}"/> - - <!-- Include antlib --> - <typedef file="${root.dir}/all/lib/jnode.xml"/> + <condition property="memoryMaximumSize" value="1512m" else="768m"> + <os arch="amd64"/> + </condition> + <echo message="Setting memoryMaximumSize to ${memoryMaximumSize}"/> - <!-- JNode version --> - <property name="jnode-ver" value="0.2.9-dev"/> + <!-- Include antlib --> + <typedef file="${root.dir}/all/lib/jnode.xml"/> - <!-- Java target and source version --> - <property name="java.target" value="1.6"/> - <property name="java.source" value="1.6"/> - <property name="java.encoding" value="US-ASCII"/> + <!-- JNode version --> + <property name="jnode-ver" value="0.2.9-dev"/> - <property name="build.dir" value="${basedir}/build"/> - <property name="reports.dir" value="${build.dir}/reports"/> - <property name="cdroms.dir" value="${build.dir}/cdroms"/> - <property name="descriptors.dir" value="${build.dir}/descriptors"/> - <property name="plugins.dir" value="${build.dir}/plugins"/> - <property name="initjars.dir" value="${build.dir}/initjars"/> - <property name="save.dir" value="${basedir}/save"/> - <property name="backup.dir" value="${build.dir}/backup"/> + <!-- Java target and source version --> + <property name="java.target" value="1.6"/> + <property name="java.source" value="1.6"/> + <property name="java.encoding" value="US-ASCII"/> - <property name="jnode-builder.jar" value="${build.dir}/descriptors/jnode-builder.jar"/> - <property name="jnode-configure.jar" value="${build.dir}/descriptors/jnode-configure.jar"/> - <property name="jnode-core.jar" value="${root.dir}/core/build/classes"/> - <property name="jnode-distr.jar" value="${root.dir}/distr/build/classes"/> - <property name="jnode-fs.jar" value="${root.dir}/fs/build/classes"/> - <property name="jnode-gui.jar" value="${root.dir}/gui/build/classes"/> - <property name="thinlet.jar" value="${root.dir}/gui/build/classes"/> - <property name="jnode-textui.jar" value="${root.dir}/textui/build/classes"/> - <property name="jnode-net.jar" value="${root.dir}/net/build/classes"/> - <property name="jnode-shell.jar" value="${root.dir}/shell/build/classes"/> - <property name="jnode-cli.jar" value="${root.dir}/cli/build/classes"/> - <property name="jnode-fonts.jar" value="${build.dir}/descriptors/jnode-fonts.jar"/> - <property name="jnode-images.jar" value="${build.dir}/descriptors/jnode-images.jar"/> + <property name="build.dir" value="${basedir}/build"/> + <property name="reports.dir" value="${build.dir}/reports"/> + <property name="cdroms.dir" value="${build.dir}/cdroms"/> + <property name="descriptors.dir" value="${build.dir}/descriptors"/> + <property name="plugins.dir" value="${build.dir}/plugins"/> + <property name="initjars.dir" value="${build.dir}/initjars"/> + <property name="save.dir" value="${basedir}/save"/> + <property name="backup.dir" value="${build.dir}/backup"/> - <property name="jnode-mmtk-genrc.jar" value="${root.dir}/core/build/classes-plan/org.jnode.vm.memmgr.mmtk.genrc"/> + <property name="jnode-builder.jar" value="${build.dir}/descriptors/jnode-builder.jar"/> + <property name="jnode-configure.jar" value="${build.dir}/descriptors/jnode-configure.jar"/> + <property name="jnode-core.jar" value="${root.dir}/core/build/classes"/> + <property name="jnode-distr.jar" value="${root.dir}/distr/build/classes"/> + <property name="jnode-fs.jar" value="${root.dir}/fs/build/classes"/> + <property name="jnode-gui.jar" value="${root.dir}/gui/build/classes"/> + <property name="thinlet.jar" value="${root.dir}/gui/build/classes"/> + <property name="jnode-textui.jar" value="${root.dir}/textui/build/classes"/> + <property name="jnode-net.jar" value="${root.dir}/net/build/classes"/> + <property name="jnode-shell.jar" value="${root.dir}/shell/build/classes"/> + <property name="jnode-cli.jar" value="${root.dir}/cli/build/classes"/> + <property name="jnode-fonts.jar" value="${build.dir}/descriptors/jnode-fonts.jar"/> + <property name="jnode-images.jar" value="${build.dir}/descriptors/jnode-images.jar"/> + + <property name="jnode-mmtk-genrc.jar" value="${root.dir}/core/build/classes-plan/org.jnode.vm.memmgr.mmtk.genrc"/> <property name="jnode-mmtk-ms.jar" value="${root.dir}/core/build/classes-plan/org.jnode.vm.memmgr.mmtk.ms"/> <property name="jnode-mmtk-nogc.jar" value="${root.dir}/core/build/classes-plan/org.jnode.vm.memmgr.mmtk.nogc"/> - <property name="classlib.jar" value="${root.dir}/all/lib/classlib.jar"/> - <property name="classlib-src.jar" value="${root.dir}/all/lib/classlib-src.jar"/> - <property name="ant.jar" value="${root.dir}/core/lib/ant.jar"/> - <property name="ant-launcher.jar" value="${root.dir}/core/lib/ant-launcher.jar"/> - <property name="commons-net.jar" value="${root.dir}/core/lib/commons-net-1.1.0.jar"/> - <property name="dnsjava.jar" value="${root.dir}/net/lib/dnsjava-1.6.6.jar"/> - <property name="jsch.jar" value="${root.dir}/net/lib/jsch-0.1.24.jar"/> - <property name="junit.jar" value="${root.dir}/core/lib/junit-4.5.jar"/> - <property name="mmtk.jar" value="${root.dir}/core/lib/mmtk/mmtk.jar"/> + <property name="classlib.jar" value="${root.dir}/all/lib/classlib.jar"/> + <property name="classlib-src.jar" value="${root.dir}/all/lib/classlib-src.jar"/> + <property name="ant.jar" value="${root.dir}/core/lib/ant.jar"/> + <property name="ant-launcher.jar" value="${root.dir}/core/lib/ant-launcher.jar"/> + <property name="commons-net.jar" value="${root.dir}/core/lib/commons-net-1.1.0.jar"/> + <property name="dnsjava.jar" value="${root.dir}/net/lib/dnsjava-1.6.6.jar"/> + <property name="jsch.jar" value="${root.dir}/net/lib/jsch-0.1.24.jar"/> + <property name="junit.jar" value="${root.dir}/core/lib/junit-4.5.jar"/> + <property name="mmtk.jar" value="${root.dir}/core/lib/mmtk/mmtk.jar"/> <property name="mauve.jar" value="${root.dir}/core/lib/mauve.jar"/> - <property name="edtftpj.jar" value="${root.dir}/fs/lib/edtftpj-1.5.2.jar"/> - <property name="jcifs.jar" value="${root.dir}/fs/lib/jcifs-1.2.6.jar"/> - <property name="ejc.jar" value="${root.dir}/core/lib/ejc-3.1.1.jar"/> + <property name="edtftpj.jar" value="${root.dir}/fs/lib/edtftpj-1.5.2.jar"/> + <property name="jcifs.jar" value="${root.dir}/fs/lib/jcifs-1.2.6.jar"/> + <property name="ejc.jar" value="${root.dir}/core/lib/ejc-3.1.1.jar"/> <property name="oncrpc.jar" value="${root.dir}/net/lib/oncrpc.jar"/> <property name="telnetd.jar" value="${root.dir}/distr/lib/telnetd.jar" /> <property name="commons-logging.jar" value="${root.dir}/distr/lib/commons-logging.jar" /> <property name="jawk.jar" value="${root.dir}/distr/lib/jawk-1.02.jar"/> <property name="jetty.jar" value="${root.dir}/distr/lib/jetty-6.1.5.jar" /> <property name="jetty-util.jar" value="${root.dir}/distr/lib/jetty-util-6.1.5.jar" /> - <property name="jsp.jar" value="${root.dir}/distr/lib/jsp-2.1.jar" /> - <property name="jsp-api.jar" value="${root.dir}/distr/lib/jsp-api-2.1.jar" /> - <property name="servlet.jar" value="${root.dir}/distr/lib/servlet-api-2.5-6.1.5.jar" /> - <property name="derby.jar" value="${root.dir}/distr/lib/derby.jar" /> - <property name="derbynet.jar" value="${root.dir}/distr/lib/derbynet.jar" /> - <property name="derbytools.jar" value="${root.dir}/distr/lib/derbytools.jar" /> - <property name="nanoxml-java.jar" value="${root.dir}/shell/lib/nanoxml-2.2.3.jar" /> + <property name="jsp.jar" value="${root.dir}/distr/lib/jsp-2.1.jar" /> + <property name="jsp-api.jar" value="${root.dir}/distr/lib/jsp-api-2.1.jar" /> + <property name="servlet.jar" value="${root.dir}/distr/lib/servlet-api-2.5-6.1.5.jar" /> + <property name="derby.jar" value="${root.dir}/distr/lib/derby.jar" /> + <property name="derbynet.jar" value="${root.dir}/distr/lib/derbynet.jar" /> + <property name="derbytools.jar" value="${root.dir}/distr/lib/derbytools.jar" /> + <property name="nanoxml-java.jar" value="${root.dir}/shell/lib/nanoxml-2.2.3.jar" /> - <property name="iso9660.jar" value="${root.dir}/builder/lib/iso9660.jar" /> - <property name="sabre.jar" value="${root.dir}/builder/lib/sabre.jar" /> + <property name="iso9660.jar" value="${root.dir}/builder/lib/iso9660.jar" /> + <property name="sabre.jar" value="${root.dir}/builder/lib/sabre.jar" /> - <!-- libraries needed to run tests --> - <property name="jmock-cglib.jar" value="${root.dir}/core/lib/jmock-cglib-1.0.1.jar"/> - <property name="jmock.jar" value="${root.dir}/core/lib/jmock-1.0.1.jar"/> - <property name="cglib.jar" value="${root.dir}/core/lib/cglib-2.1.jar"/> - <property name="asm.jar" value="${root.dir}/core/lib/asm-1.5.3.jar"/> + <!-- libraries needed to run tests --> + <property name="jmock-cglib.jar" value="${root.dir}/core/lib/jmock-cglib-1.0.1.jar"/> + <property name="jmock.jar" value="${root.dir}/core/lib/jmock-1.0.1.jar"/> + <property name="cglib.jar" value="${root.dir}/core/lib/cglib-2.1.jar"/> + <property name="asm.jar" value="${root.dir}/core/lib/asm-1.5.3.jar"/> <property name="asm-attrs.jar" value="${root.dir}/core/lib/asm-attrs-1.5.3.jar"/> <property name="asm-util.jar" value="${root.dir}/core/lib/asm-util-1.5.3.jar"/> - - <property name="log4j.jar" value="${root.dir}/core/lib/log4j-1.2.8.jar"/> - <property name="beanshell.jar" value="${root.dir}/shell/lib/bsh-2.0b5.jar"/> - <property name="js.jar" value="${root.dir}/shell/lib/rhino1.6r5-jsr223.jar"/> - <!-- libraries needed to check plugin dependencies --> - <property name="bcel-5.1.jar" value="${root.dir}/builder/lib/bcel-5.1.jar" /> + <property name="log4j.jar" value="${root.dir}/core/lib/log4j-1.2.8.jar"/> + <property name="beanshell.jar" value="${root.dir}/shell/lib/bsh-2.0b5.jar"/> + <property name="js.jar" value="${root.dir}/shell/lib/rhino1.6r5-jsr223.jar"/> - <!-- lists of plugins to use while booting --> - <property name="default-plugin-list" value="${root.dir}/all/conf/default-plugin-list.xml"/> - <property name="full-plugin-list" value="${root.dir}/all/conf/full-plugin-list.xml"/> - <property name="install-plugin-list" value="${root.dir}/all/conf/install-plugin-list.xml"/> - <property name="system-plugin-list" value="${root.dir}/all/conf/system-plugin-list.xml"/> - <property name="sources.dist.tar.gz" value="${build.dir}/jnodesources-${jnode-ver}.tar.gz"/> - <property name="jnode-x86.iso" value="${cdroms.dir}/jnode-x86.iso"/> - <property name="jnode-x86-lite.iso" value="${cdroms.dir}/jnode-x86-lite.iso"/> - <property name="jnode-x86_64-lite.iso" value="${cdroms.dir}/jnode-x86_64-lite.iso"/> - + <!-- libraries needed to check plugin dependencies --> + <property name="bcel-5.1.jar" value="${root.dir}/builder/lib/bcel-5.1.jar" /> + + <!-- lists of plugins to use while booting --> + <property name="default-plugin-list" value="${root.dir}/all/conf/default-plugin-list.xml"/> + <property name="full-plugin-list" value="${root.dir}/all/conf/full-plugin-list.xml"/> + <property name="install-plugin-list" value="${root.dir}/all/conf/install-plugin-list.xml"/> + <property name="system-plugin-list" value="${root.dir}/all/conf/system-plugin-list.xml"/> + <property name="sources.dist.tar.gz" value="${build.dir}/jnodesources-${jnode-ver}.tar.gz"/> + <property name="jnode-x86.iso" value="${cdroms.dir}/jnode-x86.iso"/> + <property name="jnode-x86-lite.iso" value="${cdroms.dir}/jnode-x86-lite.iso"/> + <property name="jnode-x86_64-lite.iso" value="${cdroms.dir}/jnode-x86_64-lite.iso"/> + <!-- list of classes and packages that should to be compiled to native code in the boot image. --> <property name="jnode-core-class-list" value="${root.dir}/all/conf/core-classes.txt"/> <property name="jnode-x86-class-list" value="${root.dir}/all/conf/x86-classes.txt"/> - <path id="cp"> - <pathelement location="${classlib.jar}"/> - <pathelement location="${mmtk.jar}"/> - <pathelement location="${ant.jar}"/> - <pathelement location="${junit.jar}"/> - <pathelement location="${jmock.jar}"/> - <pathelement location="${jmock-cglib.jar}"/> - <pathelement location="${asm.jar}"/> - <pathelement location="${asm-attrs.jar}"/> - <pathelement location="${asm-util.jar}"/> - <pathelement location="${cglib.jar}"/> - <pathelement location="${log4j.jar}"/> - <pathelement location="${root.dir}/all/conf"/> - <pathelement location="${beanshell.jar}"/> - <pathelement location="${js.jar}"/> - <pathelement location="${oncrpc.jar}"/> - <pathelement location="${edtftpj.jar}"/> - <pathelement location="${jcifs.jar}"/> - <pathelement location="${commons-net.jar}"/> - <pathelement location="${dnsjava.jar}"/> - <pathelement location="${mauve.jar}"/> - <pathelement location="${derby.jar}"/> - <pathelement location="${derbynet.jar}"/> - <pathelement location="${derbytools.jar}"/> - <pathelement location="${iso9660.jar}"/> - <pathelement location="${sabre.jar}"/> - </path> + <path id="cp"> + <pathelement location="${classlib.jar}"/> + <pathelement location="${mmtk.jar}"/> + <pathelement location="${ant.jar}"/> + <pathelement location="${junit.jar}"/> + <pathelement location="${jmock.jar}"/> + <pathelement location="${jmock-cglib.jar}"/> + <pathelement location="${asm.jar}"/> + <pathelement location="${asm-attrs.jar}"/> + <pathelement location="${asm-util.jar}"/> + <pathelement location="${cglib.jar}"/> + <pathelement location="${log4j.jar}"/> + <pathelement location="${root.dir}/all/conf"/> + <pathelement location="${beanshell.jar}"/> + <pathelement location="${js.jar}"/> + <pathelement location="${oncrpc.jar}"/> + <pathelement location="${edtftpj.jar}"/> + <pathelement location="${jcifs.jar}"/> + <pathelement location="${commons-net.jar}"/> + <pathelement location="${dnsjava.jar}"/> + <pathelement location="${mauve.jar}"/> + <pathelement location="${derby.jar}"/> + <pathelement location="${derbynet.jar}"/> + <pathelement location="${derbytools.jar}"/> + <pathelement location="${iso9660.jar}"/> + <pathelement location="${sabre.jar}"/> + </path> - <path id="cp-jnode"> - <pathelement location="${jnode-builder.jar}"/> - <pathelement location="${jnode-core.jar}"/> - <pathelement location="${jnode-distr.jar}"/> - <pathelement location="${jnode-fs.jar}"/> - <pathelement location="${jnode-shell.jar}"/> - <pathelement location="${jnode-net.jar}"/> - <pathelement location="${jnode-gui.jar}"/> - <pathelement location="${jnode-cli.jar}"/> - <pathelement location="${thinlet.jar}"/> - <pathelement location="${jnode-textui.jar}"/> - <pathelement location="${bcel-5.1.jar}"/> - <path refid="cp"/> - </path> - + <path id="cp-jnode"> + <pathelement location="${jnode-builder.jar}"/> + <pathelement location="${jnode-core.jar}"/> + <pathelement location="${jnode-distr.jar}"/> + <pathelement location="${jnode-fs.jar}"/> + <pathelement location="${jnode-shell.jar}"/> + <pathelement location="${jnode-net.jar}"/> + <pathelement location="${jnode-gui.jar}"/> + <pathelement location="${jnode-cli.jar}"/> + <pathelement location="${thinlet.jar}"/> + <pathelement location="${jnode-textui.jar}"/> + <pathelement location="${bcel-5.1.jar}"/> + <path refid="cp"/> + </path> + <path id="cp-test"> - <pathelement location="${root.dir}/core/build/classes"/> - <pathelement location="${root.dir}/distr/build/classes"/> - <pathelement location="${root.dir}/fs/build/classes"/> - <pathelement location="${root.dir}/shell/build/classes"/> - <pathelement location="${root.dir}/net/build/classes"/> - <pathelement location="${root.dir}/gui/build/classes"/> - <pathelement location="${root.dir}/cli/build/classes"/> - <pathelement location="${root.dir}/textui/build/classes"/> - <pathelement location="${root.dir}/shell/lib/nanoxml-2.2.3.jar"/> - <path refid="cp"/> - </path> + <pathelement location="${root.dir}/core/build/classes"/> + <pathelement location="${root.dir}/distr/build/classes"/> + <pathelement location="${root.dir}/fs/build/classes"/> + <pathelement location="${root.dir}/shell/build/classes"/> + <pathelement location="${root.dir}/net/build/classes"/> + <pathelement location="${root.dir}/gui/build/classes"/> + <pathelement location="${root.dir}/cli/build/classes"/> + <pathelement location="${root.dir}/textui/build/classes"/> + <pathelement location="${root.dir}/shell/lib/nanoxml-2.2.3.jar"/> + <path refid="cp"/> + </path> - <filterset id="descriptors-filter"> - <filter token="PROVIDER" value="JNode.org"/> - <filter token="VERSION" value="${jnode-ver}"/> - </filterset> + <filterset id="descriptors-filter"> + <filter token="PROVIDER" value="JNode.org"/> + <filter token="VERSION" value="${jnode-ver}"/> + </filterset> - <patternset id="exts"> - <include name="**/*.dat"/> - <include name="**/*.ids"/> - <include name="**/*.properties"/> - <include name="**/*.xml"/> - </patternset> + <patternset id="exts"> + <include name="**/*.dat"/> + <include name="**/*.ids"/> + <include name="**/*.properties"/> + <include name="**/*.xml"/> + </patternset> - <target name="prepare"> - <!-- Fail on a Windows platform if there are spaces in the root dir's pathname. It will + <target name="prepare"> + <!-- Fail on a Windows platform if there are spaces in the root dir's pathname. It will lead to mkisofs dying with a misleading error message. bluebit / crawley 2008-05-03 --> - <fail message="Cannot build JNode from a directory with spaces in the pathname."> - <condition> - <and> - <os family="windows"/> - <contains string="${root.dir}" substring=" " casesensitive="false" /> - </and> - </condition> - </fail> - - <fail message="Java Runtime version 1.6 needed. Your version is: ${java.runtime.version}"> - <condition> - <not> - <contains string="${java.runtime.version}" substring="1.6" casesensitive="false"/> - </not> - </condition> - </fail> + <fail message="Cannot build JNode from a directory with spaces in the pathname."> + <condition> + <and> + <os family="windows"/> + <contains string="${root.dir}" substring=" " casesensitive="false" /> + </and> + </condition> + </fail> - <!-- Initialize all project directories --> - <property file="${root.dir}/jnode.properties"/> - <!-- Set overwritable properties --> - <property name="jnode.memmgr.plugin.id" value="org.jnode.vm.memmgr.def"/> - <property name="compilerarg" value="-nowarn"/> + <fail message="Java Runtime version 1.6 needed. Your version is: ${java.runtime.version}"> + <condition> + <not> + <contains string="${java.runtime.version}" substring="1.6" casesensitive="false"/> + </not> + </condition> + </fail> - <!-- Derive properties --> - <property name="jnode-mmtk.jar" value="${root.dir}/core/build/classes-plan/${jnode.memmgr.plugin.id}"/> + <!-- Initialize all project directories --> + <property file="${root.dir}/jnode.properties"/> + <!-- Set overwritable properties --> + <property name="jnode.memmgr.plugin.id" value="org.jnode.vm.memmgr.def"/> + <property name="compilerarg" value="-nowarn"/> - <!-- Initialize timestamp --> - <tstamp/> - - <property name="hotswap.class.tstamp.pattern" value="MM/dd/yyyy kk:mm:ss.SSS"/> - <tstamp> - <format property="hotswap.class.tstamp" pattern="${hotswap.class.tstamp.pattern}" /> - </tstamp> + <!-- Derive properties --> + <property name="jnode-mmtk.jar" value="${root.dir}/core/build/classes-plan/${jnode.memmgr.plugin.id}"/> + <!-- Initialize timestamp --> + <tstamp/> - <!-- Update default excludes --> - <defaultexcludes add="**/_svn"/> - <defaultexcludes add="**/_svn/**"/> - - <!-- Create basic build directories --> - <mkdir dir="${build.dir}"/> - <mkdir dir="${reports.dir}"/> - <mkdir dir="${save.dir}"/> - <mkdir dir="${cdroms.dir}"/> - <mkdir dir="${descriptors.dir}"/> - <mkdir dir="${plugins.dir}"/> - <mkdir dir="${initjars.dir}"/> - <property file="${root.dir}/all/lib/ftp.properties"/> - <!-- check for classlib update --> - <if> - <or> - <not> - <uptodate srcfile="${root.dir}/all/lib/ftp.properties" targetfile="${root.dir}/all/lib/classlib.pack.gz"/> - </not> - <not> - <uptodate srcfile="${root.dir}/all/lib/ftp.properties" targetfile="${root.dir}/all/lib/classlib-src.jar.bz2"/> - </not> - </or> - <then> - <!-- check if classlib update should be done locally or from the FTP server --> - <if> - <isset property="jnode.local.classlib"/> - <then> - <fail message="classlib is out of date, run copy or quickdeploy in classlib project"> - <condition> - <or> - <not> - <uptodate srcfile="${root.dir}/all/lib/ftp.properties" + <property name="hotswap.class.tstamp.pattern" value="MM/dd/yyyy kk:mm:ss.SSS"/> + <tstamp> + <format property="hotswap.class.tstamp" pattern="${hotswap.class.tstamp.pattern}" /> + </tstamp> + + + <!-- Update default excludes --> + <defaultexcludes add="**/_svn"/> + <defaultexcludes add="**/_svn/**"/> + + <!-- Create basic build directories --> + <mkdir dir="${build.dir}"/> + <mkdir dir="${reports.dir}"/> + <mkdir dir="${save.dir}"/> + <mkdir dir="${cdroms.dir}"/> + <mkdir dir="${descriptors.dir}"/> + <mkdir dir="${plugins.dir}"/> + <mkdir dir="${initjars.dir}"/> + <property file="${root.dir}/all/lib/ftp.properties"/> + <!-- check for classlib update --> + <if> + <or> + <not> + <uptodate srcfile="${root.dir}/all/lib/ftp.properties" targetfile="${root.dir}/all/lib/classlib.pack.gz"/> + </not> + <not> + <uptodate srcfile="${root.dir}/all/lib/ftp.properties" targetfile="${root.dir}/all/lib/classlib-src.jar.bz2"/> + </not> + </or> + <then> + <!-- check if classlib update should be done locally or from the FTP server --> + <if> + <isset property="jnode.local.classlib"/> + <then> + <fail message="classlib is out of date, run copy or quickdeploy in classlib project"> + <condition> + <or> + <not> + <uptodate srcfile="${root.dir}/all/lib/ftp.properties" targetfile="${root.dir}/all/lib/classlib.jar"/> - </not> - <not> - <uptodate srcfile="${root.dir}/all/lib/ftp.properties" + </not> + <not> + <uptodate srcfile="${root.dir}/all/lib/ftp.properties" targetfile="${root.dir}/all/lib/classlib-src.jar"/> - </not> - </or> - </condition> - </fail> - </then> - <else> - <!-- classlib update from the FTP server --> - <delete file="${root.dir}/all/lib/classlib.pack.gz"/> - <delete file="${root.dir}/all/lib/classlib-src.jar.bz2"/> - <get src="${classlib.url}/classlib.pack.gz" dest="${root.dir}/all/lib/classlib.pack.gz"/> - <get src="${classlib.url}/classlib-src.jar.bz2" dest="${root.dir}/all/lib/classlib-src.jar.bz2"/> - <!-- verify checksum for downloaded files --> - <if> - <not> - <checksum algorithm="MD5" file="${root.dir}/all/lib/classlib.pack.gz" property="${classlib.md5}"/> - </not> - <then> - <delete file="${root.dir}/all/lib/classlib.pack.gz"/> - <fail message="checksum failed for classlib.pack.gz"/> - </then> - </if> - <if> - <not> - <checksum algorithm="MD5" file="${root.dir}/all/lib/classlib-src.jar.bz2" property="${classlib-src.md5}"/> - </not> - <then> - <delete file="${root.dir}/all/lib/classlib-src.jar.bz2"/> - <fail message="checksum failed for classlib-src.jar.bz2"/> - </then> - </if> - </else> - </if> - </then> - </if> - <if> - <or> - <not> - <available file="${classlib.jar}" /> - </not> - <uptodate srcfile="${classlib.jar}" targetfile="${root.dir}/all/lib/classlib.pack.gz"/> - </or> - <then> - <delete file="${classlib.jar}"/> - <echo message="Creating ${classlib.jar}"/> - <exec executable="${java.home}/bin/unpack200"> - <arg file="${root.dir}/all/lib/classlib.pack.gz"/> - <arg file="${classlib.jar}"/> - </exec> - </then> - </if> - <if> - <or> - <not> - <available file="${classlib-src.jar}" /> - </not> - <uptodate srcfile="${classlib-src.jar}" targetfile="${root.dir}/all/lib/classlib-src.jar.bz2"/> - </or> - <then> - <delete file="${classlib-src.jar}"/> - <echo message="Creating ${classlib-src.jar}"/> - <bunzip2 src="${root.dir}/all/lib/classlib-src.jar.bz2" dest="${classlib-src.jar}"/> - </then> - </if> - <property name="classlib.stamp" value="${root.dir}/all/build/classlib.stamp" /> - </target> + </not> + </or> + </condition> + </fail> + </then> + <else> + <!-- classlib update from the FTP server --> + <delete file="${root.dir}/all/lib/classlib.pack.gz"/> + <delete file="${root.dir}/all/lib/classlib-src.jar.bz2"/> + <get src="${classlib.url}/classlib.pack.gz" dest="${root.dir}/all/lib/classlib.pack.gz"/> + <get src="${classlib.url}/classlib-src.jar.bz2" dest="${root.dir}/all/lib/classlib-src.jar.bz2"/> + <!-- verify checksum for downloaded files --> + <if> + <not> + <checksum algorithm="MD5" file="${root.dir}/all/lib/classlib.pack.gz" property="${classlib.md5}"/> + </not> + <then> + <delete file="${root.dir}/all/lib/classlib.pack.gz"/> + <fail message="checksum failed for classlib.pack.gz"/> + </then> + </if> + <if> + <not> + <checksum algorithm="MD5" file="${root.dir}/all/lib/classlib-src.jar.bz2" property="${classlib-src.md5}"/> + </not> + <then> + <delete file="${root.dir}/all/lib/classlib-src.jar.bz2"/> + <fail message="checksum failed for classlib-src.jar.bz2"/> + </then> + </if> + </else> + </if> + </then> + </if> + <if> + <or> + <not> + <available file="${classlib.jar}" /> + </not> + <uptodate srcfile="${classlib.jar}" targetfile="${root.dir}/all/lib/classlib.pack.gz"/> + </or> + <then> + <delete file="${classlib.jar}"/> + <echo message="Creating ${classlib.jar}"/> + <exec executable="${java.home}/bin/unpack200"> + <arg file="${root.dir}/all/lib/classlib.pack.gz"/> + <arg file="${classlib.jar}"/> + </exec> + </then> + </if> + <if> + <or> + <not> + <available file="${classlib-src.jar}" /> + </not> + <uptodate srcfile="${classlib-src.jar}" targetfile="${root.dir}/all/lib/classlib-src.jar.bz2"/> + </or> + <then> + <delete file="${classlib-src.jar}"/> + <echo message="Creating ${classlib-src.jar}"/> + <bunzip2 src="${root.dir}/all/lib/classlib-src.jar.bz2" dest="${classlib-src.jar}"/> + </then> + </if> + <property name="classlib.stamp" value="${root.dir}/all/build/classlib.stamp" /> + </target> - <!-- Call the assemble target of all subprojects --> - <target name="assemble-projects" depends="prepare"> - <!-- pre compile tasks needed for compilation --> - <ant target="pre-compile" dir="${root.dir}/builder" inheritall="on" inheritrefs="on" /> - <jnode.antall target="assemble"/> - </target> + <!-- Call the assemble target of all subprojects --> + <target name="assemble-projects" depends="prepare"> + <!-- pre compile tasks needed for compilation --> + <ant target="pre-compile" dir="${root.dir}/builder" inheritall="on" inheritrefs="on" /> + <jnode.antall target="assemble"/> + </target> - <!-- Assemble all plugins --> - <target name="assemble-plugins" depends="assemble-projects,openjdk-annotate"> - <!-- Now assemble all plugins --> - <taskdef name="plugin" classname="org.jnode.build.PluginTask" classpathref="cp-jnode"/> - <if> - <or> - <not> - <available file="${classlib.stamp}" /> - </not> - <uptodate srcfile="${classlib.stamp}" targetfile="${classlib.jar}"/> - </or> - <then> - <!-- Now assemble all plugins --> - <plugin todir="${plugins.dir}" tmpdir="${build.dir}/tmp/plugins" pluginDir="${descriptors.dir}"> - <packager userApplicationsDir="${user.applications.dir}" pathRefId="cp"/> + <!-- Assemble all plugins --> + <target name="assemble-plugins" depends="assemble-projects,openjdk-annotate"> + <!-- Now assemble all plugins --> + <taskdef name="plugin" classname="org.jnode.build.PluginTask" classpathref="cp-jnode"/> + <if> + <or> + <not> + <available file="${classlib.stamp}" /> + </not> + <uptodate srcfile="${classlib.stamp}" targetfile="${classlib.jar}"/> + </or> + <then> + <!-- Now assemble all plugins --> + <plugin todir="${plugins.dir}" tmpdir="${build.dir}/tmp/plugins" pluginDir="${descriptors.dir}"> + <packager userApplicationsDir="${user.applications.dir}" pathRefId="cp"/> - <libalias name="jnode-core.jar" alias="${jnode-core.jar}"/> - <libalias name="jnode-distr.jar" alias="${jnode-distr.jar}"/> - <libalias name="jnode-fs.jar" alias="${jnode-fs.jar}"/> - <libalias name="jnode-gui.jar" alias="${jnode-gui.jar}"/> - <libalias name="jnode-textui.jar" alias="${jnode-textui.jar}"/> - <libalias name="jnode-net.jar" alias="${jnode-net.jar}"/> - <libalias name="jnode-shell.jar" alias="${jnode-shell.jar}"/> + <libalias name="jnode-core.jar" alias="${jnode-core.jar}"/> + <libalias name="jnode-distr.jar" alias="${jnode-distr.jar}"/> + <libalias name="jnode-fs.jar" alias="${jnode-fs.jar}"/> + <libalias name="jnode-gui.jar" alias="${jnode-gui.jar}"/> + <libalias name="jnode-textui.jar" alias="${jnode-textui.jar}"/> + <libalias name="jnode-net.jar" alias="${jnode-net.jar}"/> + <libalias name="jnode-shell.jar" alias="${jnode-shell.jar}"/> - <libalias name="jnode-mmtk-genrc.jar" alias="${jnode-mmtk-genrc.jar}"/> - <libalias name="jnode-mmtk-ms.jar" alias="${jnode-mmtk-ms.jar}"/> - <libalias name="jnode-mmtk-nogc.jar" alias="${jnode-mmtk-nogc.jar}"/> + <libalias name="jnode-mmtk-genrc.jar" alias="${jnode-mmtk-genrc.jar}"/> + <libalias name="jnode-mmtk-ms.jar" alias="${jnode-mmtk-ms.jar}"/> + <libalias name="jnode-mmtk-nogc.jar" alias="${jnode-mmtk-nogc.jar}"/> - <libalias name="mmtk.jar" alias="${mmtk.jar}"/> + <libalias name="mmtk.jar" alias="${mmtk.jar}"/> - <libalias name="commons-net-1.1.0.jar" alias="${commons-net.jar}"/> - <libalias name="dnsjava-1.6.6.jar" alias="${dnsjava.jar}"/> - <libalias name="jsch-0.1.24.jar" alias="${jsch.jar}"/> - <libalias name="log4j.jar" alias="${log4j.jar}"/> - <libalias name="beanshell.jar" alias="${beanshell.jar}"/> - <libalias name="nanoxml-java.jar" alias="${nanoxml-java.jar}"/> - <libalias name="js.jar" alias="${js.jar}"/> - <libalias name="thinlet.jar" alias="${thinlet.jar}"/> + <libalias name="commons-net-1.1.0.jar" alias="${commons-net.jar}"/> + <libalias name="dnsjava-1.6.6.jar" alias="${dnsjava.jar}"/> + <libalias name="jsch-0.1.24.jar" alias="${jsch.jar}"/> + <libalias name="log4j.jar" alias="${log4j.jar}"/> + <libalias name="beanshell.jar" alias="${beanshell.jar}"/> + <libalias name="nanoxml-java.jar" alias="${nanoxml-java.jar}"/> + <libalias name="js.jar" alias="${js.jar}"/> + <libalias name="thinlet.jar" alias="${thinlet.jar}"/> - <libalias name="junit.jar" alias="${junit.jar}"/> - <libalias name="jmock-1.0.1.jar" alias="${jmock.jar}"/> - <libalias name="jmock-cglib-1.0.1.jar" alias="${jmock-cglib.jar}"/> - <libalias name="asm.jar" alias="${asm.jar}"/> - <libalias name="asm-attrs.jar" alias="${asm-attrs.jar}"/> - <libalias name="asm-util.jar" alias="${asm-util.jar}"/> - <libalias name="cglib.jar" alias="${cglib.jar}"/> - <libalias name="mauve.jar" alias="${mauve.jar}"/> + <libalias name="junit.jar" alias="${junit.jar}"/> + <libalias name="jmock-1.0.1.jar" alias="${jmock.jar}"/> + <libalias name="jmock-cglib-1.0.1.jar" alias="${jmock-cglib.jar}"/> + <libalias name="asm.jar" alias="${asm.jar}"/> + <libalias name="asm-attrs.jar" alias="${asm-attrs.jar}"/> + <libalias name="asm-util.jar" alias="${asm-util.jar}"/> + <libalias name="cglib.jar" alias="${cglib.jar}"/> + <libalias name="mauve.jar" alias="${mauve.jar}"/> - <libalias name="ant.jar" alias="${ant.jar}"/> - <libalias name="ant-launcher.jar" alias="${ant-launcher.jar}"/> - <libalias name="edtftpj.jar" alias="${edtftpj.jar}"/> - <libalias name="jcifs.jar" alias="${jcifs.jar}"/> - <libalias name="ejc.jar" alias="${ejc.jar}"/> - <libalias name="oncrpc.jar" alias="${oncrpc.jar}"/> - <libalias name="telnetd.jar" alias="${telnetd.jar}"/> - <libalias name="commons-logging.jar" alias="${commons-logging.jar}"/> - <libalias name="jawk.jar" alias="${jawk.jar}"/> - <libalias name="jetty.jar" alias="${jetty.jar}"/> - <libalias name="jetty-util.jar" alias="${jetty-util.jar}"/> - <libalias name="jsp.jar" alias="${jsp.jar}"/> - <libalias name="jsp-api.jar" alias="${jsp-api.jar}"/> - <libalias name="servlet.jar" alias="${servlet.jar}"/> - <libalias name="derby.jar" alias="${derby.jar}"/> - <libalias name="derbynet.jar" alias="${derbynet.jar}"/> - <libalias name="derbytools.jar" alias="${derbytools.jar}"/> - <libalias name="classlib.jar" alias="${classlib.jar}"/> + <libalias name="ant.jar" alias="${ant.jar}"/> + <libalias name="ant-launcher.jar" alias="${ant-launcher.jar}"/> + <libalias name="edtftpj.jar" alias="${edtftpj.jar}"/> + <libalias name="jcifs.jar" alias="${jcifs.jar}"/> + <libalias name="ejc.jar" alias="${ejc.jar}"/> + <libalias name="oncrpc.jar" alias="${oncrpc.jar}"/> + <libalias name="telnetd.jar" alias="${telnetd.jar}"/> + <libalias name="commons-logging.jar" alias="${commons-logging.jar}"/> + <libalias name="jawk.jar" alias="${jawk.jar}"/> + <libalias name="jetty.jar" alias="${jetty.jar}"/> + <libalias name="jetty-util.jar" alias="${jetty-util.jar}"/> + <libalias name="jsp.jar" alias="${jsp.jar}"/> + <libalias name="jsp-api.jar" alias="${jsp-api.jar}"/> + <libalias name="servlet.jar" alias="${servlet.jar}"/> + <libalias name="derby.jar" alias="${derby.jar}"/> + <libalias name="derbynet.jar" alias="${derbynet.jar}"/> + <libalias name="derbytools.jar" alias="${derbytools.jar}"/> + <libalias name="classlib.jar" alias="${classlib.jar}"/> - <descriptors dir="${descriptors.dir}/"> - <include name="org.classpath.core.xml"/> - <include name="org.classpath.ext.awt.xml"/> - <include name="org.classpath.ext.corba.xml"/> - <include name="org.classpath.ext.core.xml"/> - <include name="org.classpath.ext.imageio.xml"/> - <include name="org.classpath.ext.management.xml"/> - <include name="org.classpath.ext.print.xml"/> - <include name="org.classpath.ext.security.xml"/> - <include name="org.classpath.ext.sql.xml"/> - <include name="org.classpath.ext.xml"/> - <include name="org.classpath.ext.xml.ws.tools.xml"/> - <include name="org.classpath.ext.xml.ws.xml"/> - <include name="org.classpath.ext.xml.xml"/> - <include name="org.classpath.tools.xml"/> - <include name="com.sun.tools.javac.xml"/> - <include name="com.sun.tools.jdi.xml"/> - <include name="javax.ext.tools.xml"/> - <include name="sun.tools.xml"/> - </descriptors> - </plugin> + <descriptors dir="${descriptors.dir}/"> + <include name="org.classpath.core.xml"/> + <include name="org.classpath.ext.awt.xml"/> + <include name="org.classpath.ext.corba.xml"/> + <include name="org.classpath.ext.core.xml"/> + <include name="org.classpath.ext.imageio.xml"/> + <include name="org.classpath.ext.management.xml"/> + <include name="org.classpath.ext.print.xml"/> + <include name="org.classpath.ext.security.xml"/> + <include name="org.classpath.ext.sql.xml"/> + <include name="org.classpath.ext.xml"/> + <include name="org.classpath.ext.xml.ws.tools.xml"/> + <include name="org.classpath.ext.xml.ws.xml"/> + <include name="org.classpath.ext.xml.xml"/> + <include name="org.classpath.tools.xml"/> + <include name="com.sun.tools.javac.xml"/> + <include name="com.sun.tools.jdi.xml"/> + <include name="javax.ext.tools.xml"/> + <include name="sun.tools.xml"/> + </descriptors> + </plugin> - <touch file="${classlib.stamp}"/> - </then> - </if> + <touch file="${classlib.stamp}"/> + </then> + </if> - <plugin todir="${plugins.dir}" tmpdir="${build.dir}/tmp/plugins" pluginDir="${descriptors.dir}"> - <packager userApplicationsDir="${user.applications.dir}" pathRefId="cp"/> - - <libalias name="jnode-core.jar" alias="${jnode-core.jar}"/> - <libalias name="jnode-distr.jar" alias="${jnode-distr.jar}"/> - <libalias name="jnode-fs.jar" alias="${jnode-fs.jar}"/> - <libalias name="jnode-gui.jar" alias="${jnode-gui.jar}"/> - <libalias name="jnode-textui.jar" alias="${jnode-textui.jar}"/> - <libalias name="jnode-net.jar" alias="${jnode-net.jar}"/> - <libalias name="jnode-shell.jar" alias="${jnode-shell.jar}"/> - <libalias name="jnode-cli.jar" alias="${jnode-cli.jar}"/> + <plugin todir="${plugins.dir}" tmpdir="${build.dir}/tmp/plugins" pluginDir="${descriptors.dir}"> + <packager userApplicationsDir="${user.applications.dir}" pathRefId="cp"/> - <libalias name="jnode-mmtk-genrc.jar" alias="${jnode-mmtk-genrc.jar}"/> - <libalias name="jnode-mmtk-ms.jar" alias="${jnode-mmtk-ms.jar}"/> - <libalias name="jnode-mmtk-nogc.jar" alias="${jnode-mmtk-nogc.jar}"/> + <libalias name="jnode-core.jar" alias="${jnode-core.jar}"/> + <libalias name="jnode-distr.jar" alias="${jnode-distr.jar}"/> + <libalias name="jnode-fs.jar" alias="${jnode-fs.jar}"/> + <libalias name="jnode-gui.jar" alias="${jnode-gui.jar}"/> + <libalias name="jnode-textui.jar" alias="${jnode-textui.jar}"/> + <libalias name="jnode-net.jar" alias="${jnode-net.jar}"/> + <libalias name="jnode-shell.jar" alias="${jnode-shell.jar}"/> + <libalias name="jnode-cli.jar" alias="${jnode-cli.jar}"/> - <libalias name="mmtk.jar" alias="${mmtk.jar}"/> + <libalias name="jnode-mmtk-genrc.jar" alias="${jnode-mmtk-genrc.jar}"/> + <libalias name="jnode-mmtk-ms.jar" alias="${jnode-mmtk-ms.jar}"/> + <libalias name="jnode-mmtk-nogc.jar" alias="${jnode-mmtk-nogc.jar}"/> - <libalias name="commons-net-1.1.0.jar" alias="${commons-net.jar}"/> - <libalias name="dnsjava-1.6.6.jar" alias="${dnsjava.jar}"/> - <libalias name="jsch-0.1.24.jar" alias="${jsch.jar}"/> - <libalias name="log4j.jar" alias="${log4j.jar}"/> - <libalias name="beanshell.jar" alias="${beanshell.jar}"/> - <libalias name="nanoxml-java.jar" alias="${nanoxml-java.jar}"/> - <libalias name="js.jar" alias="${js.jar}"/> - <libalias name="thinlet.jar" alias="${thinlet.jar}"/> + <libalias name="mmtk.jar" alias="${mmtk.jar}"/> - <libalias name="junit.jar" alias="${junit.jar}"/> - <libalias name="jmock-1.0.1.jar" alias="${jmock.jar}"/> - <libalias name="jmock-cglib-1.0.1.jar" alias="${jmock-cglib.jar}"/> - <libalias name="asm.jar" alias="${asm.jar}"/> - <libalias name="asm-attrs.jar" alias="${asm-attrs.jar}"/> - <libalias name="asm-util.jar" alias="${asm-util.jar}"/> - <libalias name="cglib.jar" alias="${cglib.jar}"/> - <libalias name="mauve.jar" alias="${mauve.jar}"/> + <libalias name="commons-net-1.1.0.jar" alias="${commons-net.jar}"/> + <libalias name="dnsjava-1.6.6.jar" alias="${dnsjava.jar}"/> + <libalias name="jsch-0.1.24.jar" alias="${jsch.jar}"/> + <libalias name="log4j.jar" alias="${log4j.jar}"/> + <libalias name="beanshell.jar" alias="${beanshell.jar}"/> + <libalias name="nanoxml-java.jar" alias="${nanoxml-java.jar}"/> + <libalias name="js.jar" alias="${js.jar}"/> + <libalias name="thinlet.jar" alias="${thinlet.jar}"/> - <libalias name="ant.jar" alias="${ant.jar}"/> - <libalias name="ant-launcher.jar" alias="${ant-launcher.jar}"/> - <libalias name="edtftpj.jar" alias="${edtftpj.jar}"/> - <libalias name="jcifs.jar" alias="${jcifs.jar}"/> - <libalias name="ejc.jar" alias="${ejc.jar}"/> - <libalias name="oncrpc.jar" alias="${oncrpc.jar}"/> - <libalias name="telnetd.jar" alias="${telnetd.jar}"/> - <libalias name="commons-logging.jar" alias="${commons-logging.jar}"/> - <libalias name="jawk.jar" alias="${jawk.jar}"/> - <libalias name="jetty.jar" alias="${jetty.jar}"/> - <libalias name="jetty-util.jar" alias="${jetty-util.jar}"/> - <libalias name="jsp.jar" alias="${jsp.jar}"/> - <libalias name="jsp-api.jar" alias="${jsp-api.jar}"/> - <libalias name="servlet.jar" alias="${servlet.jar}"/> - <libalias name="derby.jar" alias="${derby.jar}"/> - <libalias name="derbynet.jar" alias="${derbynet.jar}"/> - <libalias name="derbytools.jar" alias="${derbytools.jar}"/> + <libalias name="junit.jar" alias="${junit.jar}"/> + <libalias name="jmock-1.0.1.jar" alias="${jmock.jar}"/> + <libalias name="jmock-cglib-1.0.1.jar" alias="${jmock-cglib.jar}"/> + <libalias name="asm.jar" alias="${asm.jar}"/> + <libalias name="asm-attrs.jar" alias="${asm-attrs.jar}"/> + <libalias name="asm-util.jar" alias="${asm-util.jar}"/> + <libalias name="cglib.jar" alias="${cglib.jar}"/> + <libalias name="mauve.jar" alias="${mauve.jar}"/> - <descriptors dir="${descriptors.dir}/"> - <include name="*.xml"/> - <exclude name="*plugin-list.xml"/> - <exclude name="com.sun.tools.javac.xml"/> - <exclude name="com.sun.tools.jdi.xml"/> - <exclude name="javax.ext.tools.xml"/> - <exclude name="sun.tools.xml"/> - <exclude name="org.classpath.core.xml"/> - <exclude name="org.classpath.core.xml"/> - <exclude name="org.classpath.ext.awt.xml"/> - <exclude name="org.classpath.ext.corba.xml"/> - <exclude name="org.classpath.ext.core.xml"/> - <exclude name="org.classpath.ext.imageio.xml"/> - <exclude name="org.classpath.ext.management.xml"/> - <exclude name="org.classpath.ext.print.xml"/> - <exclude name="org.classpath.ext.security.xml"/> - <exclude name="org.classpath.ext.sql.xml"/> - <exclude name="org.classpath.ext.xml"/> - <exclude name="org.classpath.ext.xml.ws.tools.xml"/> - <exclude name="org.classpath.ext.xml.ws.xml"/> - <exclude name="org.classpath.ext.xml.xml"/> - <exclude name="org.classpath.tools.xml"/> - </descriptors> - </plugin> - </target> + <libalias name="ant.jar" alias="${ant.jar}"/> + <libalias name="ant-launcher.jar" alias="${ant-launcher.jar}"/> + <libalias name="edtftpj.jar" alias="${edtftpj.jar}"/> + <libalias name="jcifs.jar" alias="${jcifs.jar}"/> + <libalias name="ejc.jar" alias="${ejc.jar}"/> + <libalias name="oncrpc.jar" alias="${oncrpc.jar}"/> + <libalias name="telnetd.jar" alias="${telnetd.jar}"/> + <libalias name="commons-logging.jar" alias="${commons-logging.jar}"/> + <libalias name="jawk.jar" alias="${jawk.jar}"/> + <libalias name="jetty.jar" alias="${jetty.jar}"/> + <libalias name="jetty-util.jar" alias="${jetty-util.jar}"/> + <libalias name="jsp.jar" alias="${jsp.jar}"/> + <libalias name="jsp-api.jar" alias="${jsp-api.jar}"/> + <libalias name="servlet.jar" alias="${servlet.jar}"/> + <libalias name="derby.jar" alias="${derby.jar}"/> + <libalias name="derbynet.jar" alias="${derbynet.jar}"/> + <libalias name="derbytools.jar" alias="${derbytools.jar}"/> - <!-- Assemble all default initjars --> - <target name="assemble-default-initjars" depends="assemble-plugins" unless="no.default.initjars"> - <!-- Build all default initjar's --> - <taskdef name="initjars" classname="org.jnode.build.InitJarsBuilder" classpathref="cp-jnode"/> - <initjars destdir="${initjars.dir}" + <descriptors dir="${descriptors.dir}/"> + <include name="*.xml"/> + <exclude name="*plugin-list.xml"/> + <exclude name="com.sun.tools.javac.xml"/> + <exclude name="com.sun.tools.jdi.xml"/> + <exclude name="javax.ext.tools.xml"/> + <exclude name="sun.tools.xml"/> + <exclude name="org.classpath.core.xml"/> + <exclude name="org.classpath.core.xml"/> + <exclude name="org.classpath.ext.awt.xml"/> + <exclude name="org.classpath.ext.corba.xml"/> + <exclude name="org.classpath.ext.core.xml"/> + <exclude name="org.classpath.ext.imageio.xml"/> + <exclude name="org.classpath.ext.management.xml"/> + <exclude name="org.classpath.ext.print.xml"/> + <exclude name="org.classpath.ext.security.xml"/> + <exclude name="org.classpath.ext.sql.xml"/> + <exclude name="org.classpath.ext.xml"/> + <exclude name="org.classpath.ext.xml.ws.tools.xml"/> + <exclude name="org.classpath.ext.xml.ws.xml"/> + <exclude name="org.classpath.ext.xml.xml"/> + <exclude name="org.classpath.tools.xml"/> + </descriptors> + </plugin> + </target> + + <!-- Assemble all default initjars --> + <target name="assemble-default-initjars" depends="assemble-plugins" unless="no.default.initjars"> + <!-- Build all default initjar's --> + <taskdef name="initjars" classname="org.jnode.build.InitJarsBuilder" classpathref="cp-jnode"/> + <initjars destdir="${initjars.dir}" pluginDir="${plugins.dir}" systemPluginList="${root.dir}/all/conf/system-plugin-list.xml"> - <insert userApplicationsDir="${user.applications.dir}"/> + <insert userApplicationsDir="${user.applications.dir}"/> - <fileset dir="${root.dir}/all/conf"> - <exclude name="system-plugin-list.xml"/> - <include name="*plugin-list.xml"/> - </fileset> - </initjars> - </target> + <fileset dir="${root.dir}/all/conf"> + <exclude name="system-plugin-list.xml"/> + <include name="*plugin-list.xml"/> + </fileset> + </initjars> + </target> - <!-- Assemble all custom initjars --> - <target name="assemble-custom-initjars" depends="assemble-plugins" if="custom.plugin-list.dir"> - <!-- Build all custom initjar's --> - <taskdef name="initjars" classname="org.jnode.build.InitJarsBuilder" classpathref="cp-jnode"/> - <initjars destdir="${initjars.dir}" + <!-- Assemble all custom initjars --> + <target name="assemble-custom-initjars" depends="assemble-plugins" if="custom.plugin-list.dir"> + <!-- Build all custom initjar's --> + <taskdef name="initjars" classname="org.jnode.build.InitJarsBuilder" classpathref="cp-jnode"/> + <initjars destdir="${initjars.dir}" pluginDir="${plugins.dir}" systemPluginList="${root.dir}/all/conf/system-plugin-list.xml"> - <insert userApplicationsDir="${user.applications.dir}"/> - <fileset dir="${custom.plugin-list.dir}"> - <include name="*plugin-list.xml"/> - </fileset> - </initjars> - </target> + <insert userApplicationsDir="${user.applications.dir}"/> + <fileset dir="${custom.plugin-list.dir}"> + <include name="*plugin-list.xml"/> + </fileset> + </initjars> + </target> - <!-- Assemble all subprojects, plugins and initjars --> - <target name="assemble" depends="assemble-default-initjars, assemble-custom-initjars"> - </target> + <target name="assemble" depends="assemble-default-initjars, assemble-custom-initjars" description="Assemble all subprojects, plugins and initjars."> + </target> - <!-- Give help on possible targets --> - <target name="help" description="help on the important targets"> - <echo> + + <target name="help" description="Display detailed usage information."> + <echo> Welcome to the JNode build system. You can use this build system to perform various tasks, @@ -554,11 +553,7 @@ 32-bit architecture. cd-x86_64-lite Build the JNode bootable CD-ROM for the X86 64-bit architecture. -<!-- -create-patch Create a patch file containing the differences - between the local sources and the cvs HEAD - branch. ---> + boot-files-winNT Build the JNode boot files for windows NT/2K/XP used together with NTLDR @@ -574,77 +569,71 @@ clean Remove all intermediate build results. </echo> - </target> + </target> - <!-- Macro used to call the x86 build script --> - <macrodef name="x86-build"> - <attribute name="bits"/> - <attribute name="target" default="all"/> - <sequential> - <ant antfile="build-x86.xml" inheritall="on" inheritrefs="on" target="@{target}"> - <property name="jnode.bits" value="@{bits}"/> - </ant> - </sequential> - </macrodef> + <macrodef name="x86-build" description="Call the x86 build script."> + <attribute name="bits"/> + <attribute name="target" default="all"/> + <sequential> + <ant antfile="build-x86.xml" inheritall="on" inheritrefs="on" target="@{target}"> + <property name="jnode.bits" value="@{bits}"/> + </ant> + </sequential> + </macrodef> - <!-- Create the X86 32-bit boot image --> - <target name="x86" depends="assemble"> - <x86-build bits="32"/> - </target> + <target name="x86" depends="assemble" description="Create the X86 32-bit boot image"> + <x86-build bits="32"/> + </target> - <!-- Create the X86 64-bit boot image--> - <target name="x86_64" depends="assemble"> - <x86-build bits="64"/> - </target> + <target name="x86_64" depends="assemble" description="Create the X86 64-bit boot image"> + <x86-build bits="64"/> + </target> - <!-- Create the JOP boot image --> - <target name="jop" depends="assemble"> - <ant antfile="build-jop.xml" inheritall="on" inheritrefs="on"/> - </target> + <target name="jop" depends="assemble" description="Create the JOP boot image"> + <ant antfile="build-jop.xml" inheritall="on" inheritrefs="on"/> + </target> - <!-- Build the boot files for windows NT/2K/XP (with NTLDR) --> - <target name="boot-files-winNT" depends="assemble"> - <x86-build bits="32" target="boot-files-winNT"/> - </target> + <target name="boot-files-winNT" depends="assemble" description="Build the boot files for windows NT/2K/XP (with NTLDR)"> + <x86-build bits="32" target="boot-files-winNT"/> + </target> - <!-- Create a bootable CDROM image containing all x86 bootable images and the sources --> - <target name="cd-x86" depends="assemble" description="create a bootable JNode CD image with sources included"> - <tar destfile="${sources.dist.tar.gz}" compression="gzip" basedir="${root.dir}" excludes="*/build/**"/> - <x86-build bits="32" target="java-image"/> - <!-- TODO enable this when 64 bit support is working --> - <!--x86-build bits="64" target="java-image"/--> - <property name="jnode.bits" value="32" /> - <ant antfile="build-x86.xml" inheritall="true" inheritrefs="true" target="cdrom"/> - </target> + <!-- Create a bootable CDROM image containing all x86 bootable images and the sources --> + <target name="cd-x86" depends="assemble" description="Create a bootable JNode CD image with sources included"> + <tar destfile="${sources.dist.tar.gz}" compression="gzip" basedir="${root.dir}" excludes="*/build/**"/> + <x86-build bits="32" target="java-image"/> + <!-- TODO enable this when 64 bit support is working --> + <!--x86-build bits="64" target="java-image"/--> + <property name="jnode.bits" value="32" /> + <ant antfile="build-x86.xml" inheritall="true" inheritrefs="true" target="cdrom"/> + </target> - <!-- Create a bootable CDROM image for x86 32-bits --> - <target name="cd-x86-lite" depends="assemble" description="create a bootable JNode CD image"> - <x86-build bits="32" target="java-image"/> - <property name="jnode.bits" value="32" /> - <ant antfile="build-x86.xml" inheritall="true" inheritrefs="true" target="cdrom-lite"/> - </target> + <!-- Create a bootable CDROM image for x86 32-bits --> + <target name="cd-x86-lite" depends="assemble" description="Create a bootable JNode CD image"> + <x86-build bits="32" target="java-image"/> + <property name="jnode.bits" value="32" /> + <ant antfile="build-x86.xml" inheritall="true" inheritrefs="true" target="cdrom-lite"/> + </target> - <!-- Create a bootable CDROM image for x86 64-bits --> - <target name="cd-x86_64-lite" depends="assemble"> - <x86-build bits="64" target="java-image"/> - <property name="jnode.bits" value="64" /> - <ant antfile="build-x86.xml" inheritall="true" inheritrefs="true" target="cdrom_64-lite"/> - </target> + <target name="cd-x86_64-lite" depends="assemble" description="Create a bootable CDROM image for x86 64-bits"> + <x86-build bits="64" target="java-image"/> + <property name="jnode.bits" value="64" /> + <ant antfile="build-x86.xml" inheritall="true" inheritrefs="true" target="cdrom_64-lite"/> + </target> - <!-- Upload a distribution --> - <target name="upload"> - <property name="upload.dir" value="${build.dir}/upload"/> - <mkdir dir="${upload.dir}"/> - <gzip src="${jnode-x86.iso}" destfile="${upload.dir}/jnode-x86-${jnode-ver}.iso.gz"/> - <copy todir="${upload.dir}" file="${sources.dist.tar.gz}"/> - <checksum algorithm="MD5" forceoverwrite="true"> - <fileset dir="${upload.dir}"> - <include name="jnode-x86-${jnode-ver}.iso.gz" /> - <include name="jnodesources-${jnode-ver}.tar.gz" /> - </fileset> - </checksum> - <echo message="FTP upload disabled. Uploadables are in: ${upload.dir}"/> - <!-- + <!-- Upload a distribution --> + <target name="upload"> + <property name="upload.dir" value="${build.dir}/upload"/> + <mkdir dir="${upload.dir}"/> + <gzip src="${jnode-x86.iso}" destfile="${upload.dir}/jnode-x86-${jnode-ver}.iso.gz"/> + <copy todir="${upload.dir}" file="${sources.dist.tar.gz}"/> + <checksum algorithm="MD5" forceoverwrite="true"> + <fileset dir="${upload.dir}"> + <include name="jnode-x86-${jnode-ver}.iso.gz" /> + <include name="jnodesources-${jnode-ver}.tar.gz" /> + </fileset> + </checksum> + <echo message="FTP upload disabled. Uploadables are in: ${upload.dir}"/> + <!-- TODO find a way to automatically upload the files jsch based scp with sftp fails with an error to sourceforge FTP uploads are abandone by sourceforge @@ -652,108 +641,107 @@ <fileset dir="${upload.dir}"/> </ftp> --> - </target> - + </target> + <!-- Save virtualization etc state across 'clean' --> <target name="save"> - <copy file="${cdroms.dir}/JNode.nvram" todir="${save.dir}" failonerror="no"/> + <copy file="${cdroms.dir}/JNode.nvram" todir="${save.dir}" failonerror="no"/> </target> - <!-- Clean everything files --> - <target name="clean" depends="save" description="clean the complete build output"> - <jnode.antall target="clean"/> - <delete dir="${build.dir}" quiet="on"/> - </target> - + <!-- Clean everything files --> + <target name="clean" depends="save" description="clean the complete build output"> + <jnode.antall target="clean"/> + <delete dir="${build.dir}" quiet="on"/> + </target> + <path id="cp-javadoc"> - <path refid="cp"/> + <path refid="cp"/> <pathelement location="${bcel-5.1.jar}"/> <pathelement location="${nanoxml-java.jar}"/> </path> - <!-- Generate only the basic api javadoc files --> - <target name="javadoc-small" description="generate documentation of the basic JNode APIs"> - <jnode.javadoc destdir="${build.dir}/javadoc/small"> - <sourcepath> - <pathelement location="${root.dir}/core/src/classlib"/> - <pathelement location="${root.dir}/core/src/classpath/ext"/> - <pathelement location="${root.dir}/core/src/classpath/vm"/> - <pathelement location="${root.dir... [truncated message content] |
From: <ga...@us...> - 2011-12-15 21:22:50
|
Revision: 5880 http://jnode.svn.sourceforge.net/jnode/?rev=5880&view=rev Author: galatnm Date: 2011-12-15 21:22:44 +0000 (Thu, 15 Dec 2011) Log Message: ----------- HFS+ : Add entry assignement to file constructor to avoid NullPointerException. Modified Paths: -------------- trunk/fs/src/fs/org/jnode/fs/hfsplus/HfsPlusFile.java Modified: trunk/fs/src/fs/org/jnode/fs/hfsplus/HfsPlusFile.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/hfsplus/HfsPlusFile.java 2011-12-15 09:58:56 UTC (rev 5879) +++ trunk/fs/src/fs/org/jnode/fs/hfsplus/HfsPlusFile.java 2011-12-15 21:22:44 UTC (rev 5880) @@ -17,7 +17,7 @@ * along with this library; If not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ - + package org.jnode.fs.hfsplus; import java.io.IOException; @@ -35,6 +35,7 @@ private CatalogFile file; public HfsPlusFile(HfsPlusEntry entry) { + this.entry = entry; this.file = new CatalogFile(entry.getData()); } @@ -70,7 +71,6 @@ } - @Override public boolean isValid() { return entry.isValid(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ga...@us...> - 2011-12-15 09:59:07
|
Revision: 5879 http://jnode.svn.sourceforge.net/jnode/?rev=5879&view=rev Author: galatnm Date: 2011-12-15 09:58:56 +0000 (Thu, 15 Dec 2011) Log Message: ----------- FS : HFS+ catalog key temporary fix to avoid record data shift. Modified Paths: -------------- trunk/fs/src/test/org/jnode/fs/hfsplus/catalog/CatalogKeyTest.java Modified: trunk/fs/src/test/org/jnode/fs/hfsplus/catalog/CatalogKeyTest.java =================================================================== --- trunk/fs/src/test/org/jnode/fs/hfsplus/catalog/CatalogKeyTest.java 2011-12-15 09:58:16 UTC (rev 5878) +++ trunk/fs/src/test/org/jnode/fs/hfsplus/catalog/CatalogKeyTest.java 2011-12-15 09:58:56 UTC (rev 5879) @@ -13,7 +13,7 @@ public void testKeyFromBytesArray(){ CatalogKey key = new CatalogKey(KEY_AS_BYTES_ARRAY,0); assertEquals(NODE_NAME_AS_STRING,key.getNodeName().getUnicodeString()); - assertEquals(24,key.getKeyLength()); + assertEquals(26,key.getKeyLength()); assertEquals(7,key.getParentId().getId()); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ga...@us...> - 2011-12-15 09:58:27
|
Revision: 5878 http://jnode.svn.sourceforge.net/jnode/?rev=5878&view=rev Author: galatnm Date: 2011-12-15 09:58:16 +0000 (Thu, 15 Dec 2011) Log Message: ----------- FS : HFS+ catalog key temporary fix to avoid record data shift. Modified Paths: -------------- trunk/fs/src/fs/org/jnode/fs/hfsplus/catalog/CatalogKey.java Modified: trunk/fs/src/fs/org/jnode/fs/hfsplus/catalog/CatalogKey.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/hfsplus/catalog/CatalogKey.java 2011-12-14 12:19:38 UTC (rev 5877) +++ trunk/fs/src/fs/org/jnode/fs/hfsplus/catalog/CatalogKey.java 2011-12-15 09:58:16 UTC (rev 5878) @@ -60,7 +60,8 @@ int currentOffset = offset; byte[] ck = new byte[2]; System.arraycopy(src, currentOffset, ck, 0, 2); - keyLength = BigEndian.getInt16(ck, 0); + //TODO Understand why the +2 is necessary + keyLength = BigEndian.getInt16(ck, 0) + 2; currentOffset += 2; ck = new byte[4]; System.arraycopy(src, currentOffset, ck, 0, 4); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ga...@us...> - 2011-12-14 12:19:47
|
Revision: 5877 http://jnode.svn.sourceforge.net/jnode/?rev=5877&view=rev Author: galatnm Date: 2011-12-14 12:19:38 +0000 (Wed, 14 Dec 2011) Log Message: ----------- FS : Improve HFS catalog key javadocs. Modified Paths: -------------- trunk/fs/src/fs/org/jnode/fs/hfsplus/catalog/CatalogKey.java Modified: trunk/fs/src/fs/org/jnode/fs/hfsplus/catalog/CatalogKey.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/hfsplus/catalog/CatalogKey.java 2011-12-12 16:09:48 UTC (rev 5876) +++ trunk/fs/src/fs/org/jnode/fs/hfsplus/catalog/CatalogKey.java 2011-12-14 12:19:38 UTC (rev 5877) @@ -17,7 +17,7 @@ * along with this library; If not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ - + package org.jnode.fs.hfsplus.catalog; import org.jnode.fs.hfsplus.HfsUnicodeString; @@ -25,6 +25,17 @@ import org.jnode.fs.hfsplus.tree.Key; import org.jnode.util.BigEndian; +/** + * Implementation of catalog file key. The catalog file key is defined as following : + * <ul> + * <li>The length of the key</li> + * <li>The node identifier of the parent folder</li> + * <li>The name of the file or folder</li> + * </ul> + * + * The minimal length for a key is 6 bytes. 2 bytes for the length and 4 bytes for the catalog node id. + * + */ public class CatalogKey extends AbstractKey { public static final int MINIMUM_KEY_LENGTH = 6; @@ -44,7 +55,7 @@ * @param src * @param offset */ - + public CatalogKey(final byte[] src, final int offset) { int currentOffset = offset; byte[] ck = new byte[2]; @@ -96,8 +107,8 @@ res = this.getParentId().compareTo(ck.getParentId()); if (res == 0) { res = - this.getNodeName().getUnicodeString().compareTo( - ck.getNodeName().getUnicodeString()); + this.getNodeName().getUnicodeString() + .compareTo(ck.getNodeName().getUnicodeString()); } } return res; @@ -109,11 +120,11 @@ * @see org.jnode.fs.hfsplus.tree.AbstractKey#getBytes() */ public byte[] getBytes() { - int length = this.getKeyLength(); + int length = this.getKeyLength(); byte[] data = new byte[length]; BigEndian.setInt16(data, 0, length); System.arraycopy(parentId.getBytes(), 0, data, 2, 4); - System.arraycopy(nodeName.getBytes(), 0, data, 6, (nodeName.getLength() *2) + 2); + System.arraycopy(nodeName.getBytes(), 0, data, 6, (nodeName.getLength() * 2) + 2); return data; } @@ -124,9 +135,9 @@ */ public final String toString() { StringBuffer s = new StringBuffer(); - s.append("[length, Parent ID, Node name]:").append(getKeyLength()).append(",").append( - getParentId().getId()).append(",").append( - (getNodeName() != null) ? getNodeName().getUnicodeString() : ""); + s.append("[length, Parent ID, Node name]:").append(getKeyLength()).append(",") + .append(getParentId().getId()).append(",") + .append((getNodeName() != null) ? getNodeName().getUnicodeString() : ""); return s.toString(); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |