From: <cr...@us...> - 2008-03-24 07:52:41
|
Revision: 3868 http://jnode.svn.sourceforge.net/jnode/?rev=3868&view=rev Author: crawley Date: 2008-03-24 00:52:38 -0700 (Mon, 24 Mar 2008) Log Message: ----------- Converted cpuid command to new syntax Modified Paths: -------------- trunk/shell/descriptors/org.jnode.shell.command.system.xml trunk/shell/src/shell/org/jnode/shell/command/system/CpuIDCommand.java Modified: trunk/shell/descriptors/org.jnode.shell.command.system.xml =================================================================== --- trunk/shell/descriptors/org.jnode.shell.command.system.xml 2008-03-24 07:51:28 UTC (rev 3867) +++ trunk/shell/descriptors/org.jnode.shell.command.system.xml 2008-03-24 07:52:38 UTC (rev 3868) @@ -23,5 +23,9 @@ <alias name="lsirq" class="org.jnode.shell.command.system.LsIRQ"/> <alias name="vminfo" class="org.jnode.vm.Vm"/> </extension> + + <extension point="org.jnode.shell.syntaxes"> + <syntax alias="cpuid"/> + </extension> </plugin> Modified: trunk/shell/src/shell/org/jnode/shell/command/system/CpuIDCommand.java =================================================================== --- trunk/shell/src/shell/org/jnode/shell/command/system/CpuIDCommand.java 2008-03-24 07:51:28 UTC (rev 3867) +++ trunk/shell/src/shell/org/jnode/shell/command/system/CpuIDCommand.java 2008-03-24 07:52:38 UTC (rev 3868) @@ -26,7 +26,6 @@ import org.jnode.shell.AbstractCommand; import org.jnode.shell.CommandLine; -import org.jnode.shell.help.Help; import org.jnode.vm.scheduler.VmProcessor; /** @@ -34,17 +33,18 @@ */ public class CpuIDCommand extends AbstractCommand { - public static Help.Info HELP_INFO = new Help.Info("cpuid", "Show the identification of the current CPU"); + public CpuIDCommand() { + super("Show the identification of the current CPU"); + } public static void main(String[] args) throws Exception { - new CpuIDCommand().execute(args); + new CpuIDCommand().execute(args); } /** * Execute this command */ public void execute(CommandLine cmdLine, InputStream in, PrintStream out, PrintStream err) { - final VmProcessor cpu = VmProcessor.current(); out.println(cpu.getCPUID()); out.println(cpu.getPerformanceCounters()); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |