From: <cr...@us...> - 2008-05-06 10:49:06
|
Revision: 4064 http://jnode.svn.sourceforge.net/jnode/?rev=4064&view=rev Author: crawley Date: 2008-05-06 03:48:39 -0700 (Tue, 06 May 2008) Log Message: ----------- Converted LsIRQCommand (was LsIRQ) Modified Paths: -------------- trunk/shell/descriptors/org.jnode.shell.command.system.xml Added Paths: ----------- trunk/shell/src/shell/org/jnode/shell/command/system/LsIRQCommand.java Removed Paths: ------------- trunk/shell/src/shell/org/jnode/shell/command/system/LsIRQ.java Modified: trunk/shell/descriptors/org.jnode.shell.command.system.xml =================================================================== --- trunk/shell/descriptors/org.jnode.shell.command.system.xml 2008-05-05 14:33:15 UTC (rev 4063) +++ trunk/shell/descriptors/org.jnode.shell.command.system.xml 2008-05-06 10:48:39 UTC (rev 4064) @@ -20,7 +20,7 @@ <extension point="org.jnode.shell.aliases"> <alias name="cpuid" class="org.jnode.shell.command.system.CpuIDCommand"/> <alias name="kdb" class="org.jnode.shell.command.system.KdbCommand"/> - <alias name="lsirq" class="org.jnode.shell.command.system.LsIRQ"/> + <alias name="lsirq" class="org.jnode.shell.command.system.LsIRQCommand"/> <alias name="vminfo" class="org.jnode.vm.Vm"/> </extension> @@ -31,6 +31,7 @@ <option argLabel="off" longName="off" description="Turn kernel debugging off"/> <option argLabel="on" longName="on" description="Turn kernel debugging on"/> </syntax> + <syntax alias="lsirq" description="dump IRQ handler information"/> </extension> </plugin> Deleted: trunk/shell/src/shell/org/jnode/shell/command/system/LsIRQ.java =================================================================== --- trunk/shell/src/shell/org/jnode/shell/command/system/LsIRQ.java 2008-05-05 14:33:15 UTC (rev 4063) +++ trunk/shell/src/shell/org/jnode/shell/command/system/LsIRQ.java 2008-05-06 10:48:39 UTC (rev 4064) @@ -1,41 +0,0 @@ -/* - * $Id$ - * - * JNode.org - * Copyright (C) 2003-2006 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.shell.command.system; - -import org.jnode.vm.scheduler.IRQManager; -import org.jnode.vm.scheduler.VmProcessor; - -/** - * @author Ewout Prangsma (ep...@us...) - */ -public class LsIRQ { - - public static void main(String[] args) { - final VmProcessor proc = VmProcessor.current(); - final IRQManager irqMgr = proc.getIRQManager(); - final int max = irqMgr.getNumIRQs(); - for (int i = 0; i < max; i++) { - System.out.println("IRQ" + i + "\t" + irqMgr.getIrqCount(i) + "\t" - + irqMgr.getHandlerInfo(i)); - } - } -} Added: trunk/shell/src/shell/org/jnode/shell/command/system/LsIRQCommand.java =================================================================== --- trunk/shell/src/shell/org/jnode/shell/command/system/LsIRQCommand.java (rev 0) +++ trunk/shell/src/shell/org/jnode/shell/command/system/LsIRQCommand.java 2008-05-06 10:48:39 UTC (rev 4064) @@ -0,0 +1,56 @@ +/* + * $Id: LsIRQ.java 2491 2006-04-23 11:31:22Z epr $ + * + * JNode.org + * Copyright (C) 2003-2006 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.shell.command.system; + +import java.io.InputStream; +import java.io.PrintStream; + +import org.jnode.shell.AbstractCommand; +import org.jnode.shell.CommandLine; +import org.jnode.vm.scheduler.IRQManager; +import org.jnode.vm.scheduler.VmProcessor; + +/** + * @author Ewout Prangsma (ep...@us...) + */ +public class LsIRQCommand extends AbstractCommand { + + public LsIRQCommand() { + super("prints IRQ handler info"); + } + + public static void main(String[] args) throws Exception { + new LsIRQCommand().execute(args); + } + + @Override + public void execute(CommandLine commandLine, InputStream in, + PrintStream out, PrintStream err) { + final VmProcessor proc = VmProcessor.current(); + final IRQManager irqMgr = proc.getIRQManager(); + final int max = irqMgr.getNumIRQs(); + for (int i = 0; i < max; i++) { + out.println("IRQ" + i + "\t" + irqMgr.getIrqCount(i) + "\t" + + irqMgr.getHandlerInfo(i)); + } + } +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |