diff options
author | Jeff Sharkey <jsharkey@android.com> | 2015-07-22 11:11:46 -0700 |
---|---|---|
committer | Jeff Sharkey <jsharkey@android.com> | 2015-07-22 11:11:50 -0700 |
commit | 85ced632680642fce680d141ddd10299ff849233 (patch) | |
tree | 31f3658bafa45232a76cb99d520a6fbccf6e04d1 /cmds/sm | |
parent | 54d42be6eb149b3e43115e810e4a1b92e9865d05 (diff) | |
download | frameworks_base-85ced632680642fce680d141ddd10299ff849233.zip frameworks_base-85ced632680642fce680d141ddd10299ff849233.tar.gz frameworks_base-85ced632680642fce680d141ddd10299ff849233.tar.bz2 |
More info to support CTS, fix reconcile bug.
Surface more details and commands for storage volumes to support
CTS testing. Fix user reconciliation bug that skipped user setup on
empty volumes.
Bug: 22658804, 22633097
Change-Id: I4221312d1cce24d1f5a2c108095cf3cf471598ed
Diffstat (limited to 'cmds/sm')
-rw-r--r-- | cmds/sm/src/com/android/commands/sm/Sm.java | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/cmds/sm/src/com/android/commands/sm/Sm.java b/cmds/sm/src/com/android/commands/sm/Sm.java index 0dad4dc..0a1ba4d 100644 --- a/cmds/sm/src/com/android/commands/sm/Sm.java +++ b/cmds/sm/src/com/android/commands/sm/Sm.java @@ -81,6 +81,8 @@ public final class Sm { runUnmount(); } else if ("format".equals(op)) { runFormat(); + } else if ("benchmark".equals(op)) { + runBenchmark(); } else if ("forget".equals(op)) { runForget(); } else { @@ -89,9 +91,12 @@ public final class Sm { } public void runListDisks() throws RemoteException { + final boolean onlyAdoptable = "adoptable".equals(nextArg()); final DiskInfo[] disks = mSm.getDisks(); for (DiskInfo disk : disks) { - System.out.println(disk.getId()); + if (!onlyAdoptable || disk.isAdoptable()) { + System.out.println(disk.getId()); + } } } @@ -161,6 +166,11 @@ public final class Sm { mSm.format(volId); } + public void runBenchmark() throws RemoteException { + final String volId = nextArg(); + mSm.benchmark(volId); + } + public void runForget() throws RemoteException{ final String fsUuid = nextArg(); if ("all".equals(fsUuid)) { @@ -180,7 +190,7 @@ public final class Sm { } private static int showUsage() { - System.err.println("usage: sm list-disks"); + System.err.println("usage: sm list-disks [adoptable]"); System.err.println(" sm list-volumes [public|private|emulated|all]"); System.err.println(" sm has-adoptable"); System.err.println(" sm get-primary-storage-uuid"); @@ -190,6 +200,7 @@ public final class Sm { System.err.println(" sm mount VOLUME"); System.err.println(" sm unmount VOLUME"); System.err.println(" sm format VOLUME"); + System.err.println(" sm benchmark VOLUME"); System.err.println(""); System.err.println(" sm forget [UUID|all]"); System.err.println(""); |