Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(114)

Side by Side Diff: utility/tpmc.c

Issue 3167004: Add clear command. (Closed) Base URL: ssh://git@chromiumos-git/vboot_reference.git
Patch Set: . Created 10 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* Copyright (c) 2010 The Chromium OS Authors. All rights reserved. 1 /* Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
2 * Use of this source code is governed by a BSD-style license that can be 2 * Use of this source code is governed by a BSD-style license that can be
3 * found in the LICENSE file. 3 * found in the LICENSE file.
4 * 4 *
5 * TPM command utility. Runs simple TPM commands. Mostly useful when physical 5 * TPM command utility. Runs simple TPM commands. Mostly useful when physical
6 * presence has not been locked. 6 * presence has not been locked.
7 */ 7 */
8 8
9 #include <stdio.h> 9 #include <stdio.h>
10 #include <string.h> 10 #include <string.h>
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 { "continueselftest", "ctest", "issue a ContinueSelfTest command", 53 { "continueselftest", "ctest", "issue a ContinueSelfTest command",
54 TlclContinueSelfTest }, 54 TlclContinueSelfTest },
55 { "assertphysicalpresence", "ppon", "assert Physical Presence", 55 { "assertphysicalpresence", "ppon", "assert Physical Presence",
56 TlclAssertPhysicalPresence }, 56 TlclAssertPhysicalPresence },
57 { "enable", "ena", "enable the TPM (needs PP)", TlclSetEnable }, 57 { "enable", "ena", "enable the TPM (needs PP)", TlclSetEnable },
58 { "disable", "dis", "disable the TPM (needs PP)", TlclClearEnable }, 58 { "disable", "dis", "disable the TPM (needs PP)", TlclClearEnable },
59 { "activate", "act", "activate the TPM (needs PP, maybe reboot)", 59 { "activate", "act", "activate the TPM (needs PP, maybe reboot)",
60 HandlerActivate }, 60 HandlerActivate },
61 { "deactivate", "deact", "deactivate the TPM (needs PP, maybe reboot)", 61 { "deactivate", "deact", "deactivate the TPM (needs PP, maybe reboot)",
62 HandlerDeactivate }, 62 HandlerDeactivate },
63 { "clear", "clr", "clear the TPM owner (needs PP)", TlclForceClear },
63 }; 64 };
64 65
65 static int n_commands = sizeof(command_table) / sizeof(command_table[0]); 66 static int n_commands = sizeof(command_table) / sizeof(command_table[0]);
66 67
67 int main(int argc, char* argv[]) { 68 int main(int argc, char* argv[]) {
68 if (argc < 2) { 69 if (argc < 2) {
69 fprintf(stderr, "usage: %s <TPM command>\n or: %s help\n", 70 fprintf(stderr, "usage: %s <TPM command>\n or: %s help\n",
70 argv[0], argv[0]); 71 argv[0], argv[0]);
71 exit(1); 72 exit(1);
72 } else { 73 } else {
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 return 1; 106 return 1;
106 } 107 }
107 } 108 }
108 } 109 }
109 110
110 /* No command matched. */ 111 /* No command matched. */
111 fprintf(stderr, "%s: unknown command: %s\n", argv[0], cmd); 112 fprintf(stderr, "%s: unknown command: %s\n", argv[0], cmd);
112 return 1; 113 return 1;
113 } 114 }
114 } 115 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698