File tree Expand file tree Collapse file tree 1 file changed +8
-7
lines changed
modules/dcache/src/main/java/org/dcache/chimera/nfsv41/door Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Original file line number Diff line number Diff line change 3
3
*/
4
4
package org .dcache .chimera .nfsv41 .door ;
5
5
6
+ import com .google .common .base .Joiner ;
6
7
import org .glassfish .grizzly .Buffer ;
7
8
import org .slf4j .Logger ;
8
9
import org .slf4j .LoggerFactory ;
@@ -487,14 +488,14 @@ public String ac_exports_reload(Args args) throws IOException {
487
488
_exportFile .rescan ();
488
489
return "Done" ;
489
490
}
490
- public static final String fh_exports_ls = " # dump nfs exports" ;
491
- public String ac_exports_ls (Args args ) {
492
- StringBuilder sb = new StringBuilder ();
493
- for (FsExport export : _exportFile .getExports ()) {
494
- sb .append (export ).append ("\n " );
491
+ public static final String fh_exports_ls = " [host] # dump nfs exports" ;
492
+ public String ac_exports_ls_$_0_1 (Args args ) throws UnknownHostException {
493
+ InetAddress address = InetAddress .getByName (args .argv (0 ));
494
+ if (args .argc () > 0 ) {
495
+ return Joiner .on ('\n' ).join (_exportFile .exportsFor (address ));
496
+ } else {
497
+ return Joiner .on ('\n' ).join (_exportFile .getExports ());
495
498
}
496
-
497
- return sb .toString ();
498
499
}
499
500
500
501
private static deviceid4 deviceidOf (int id ) {
You can’t perform that action at this time.
0 commit comments