move NFS_PROGRAM constant here
This commit is contained in:
parent
b07fd54671
commit
4bd1621076
|
@ -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"));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue