move NFS_PROGRAM constant here

This commit is contained in:
Doug MacEachern 2006-02-27 00:44:42 +00:00
parent b07fd54671
commit 4bd1621076
1 changed files with 4 additions and 2 deletions

View File

@ -5,6 +5,8 @@ import java.net.UnknownHostException;
public class NfsFileSystem extends FileSystem {
private static final int NFS_PROGRAM = 100003;
String hostname = null;
public String getHostname() {
@ -28,7 +30,7 @@ public class NfsFileSystem extends FileSystem {
}
public boolean ping() {
return RPC.ping(getHostname(), RPC.NFS);
return RPC.ping(getHostname(), NFS_PROGRAM);
}
public String getUnreachableMessage() {
@ -41,6 +43,6 @@ public class NfsFileSystem extends FileSystem {
public static void main(String[] args) throws Exception {
Sigar.load();
System.out.println(RPC.ping(args[0], RPC.NFS));
System.out.println(RPC.ping(args[0], "nfs"));
}
}