diff --git a/bindings/java/src/org/hyperic/sigar/cmd/Df.java b/bindings/java/src/org/hyperic/sigar/cmd/Df.java index 763faf2f..99d6a953 100644 --- a/bindings/java/src/org/hyperic/sigar/cmd/Df.java +++ b/bindings/java/src/org/hyperic/sigar/cmd/Df.java @@ -48,8 +48,19 @@ public class Df extends SigarCommandBase { "Mounted on", "Type" }; + //df -i + private static final String[] IHEADER = new String[] { + "Filesystem", + "Inodes", + "IUsed", + "IFree", + "IUse%", + "Mounted on", + "Type" + }; private GetlineCompleter completer; + private boolean opt_i; public Df(Shell shell) { super(shell); @@ -67,7 +78,7 @@ public class Df extends SigarCommandBase { } protected boolean validateArgs(String[] args) { - return args.length <= 1; + return true; } public String getSyntaxArgs() { @@ -79,31 +90,42 @@ public class Df extends SigarCommandBase { } public void printHeader() { - printf(HEADER); + printf(this.opt_i ? IHEADER : HEADER); } public void output(String[] args) throws SigarException { - if (args.length == 1) { + this.opt_i = false; + ArrayList sys = new ArrayList(); + + if (args.length > 0) { FileSystemMap mounts = this.proxy.getFileSystemMap(); - String name = FileCompleter.expand(args[0]); - FileSystem fs = mounts.getMountPoint(name); + for (int i=0; i