| OLD | NEW |
| 1 /* Copyright (c) 2011 The Chromium OS Authors. All rights reserved. | 1 /* Copyright (c) 2011 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 * Chrome OS firmware/system interface utility | 5 * Chrome OS firmware/system interface utility |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 #include <stdio.h> | 8 #include <stdio.h> |
| 9 #include <stdlib.h> | 9 #include <stdlib.h> |
| 10 #include <string.h> | 10 #include <string.h> |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 {"devsw_boot", 0, 0, "Developer switch position at boot"}, | 25 {"devsw_boot", 0, 0, "Developer switch position at boot"}, |
| 26 {"recoverysw_cur", 0, 0, "Recovery switch current position"}, | 26 {"recoverysw_cur", 0, 0, "Recovery switch current position"}, |
| 27 {"recoverysw_boot", 0, 0, "Recovery switch position at boot"}, | 27 {"recoverysw_boot", 0, 0, "Recovery switch position at boot"}, |
| 28 {"recoverysw_ec_boot", 0, 0, "Recovery switch position at EC boot"}, | 28 {"recoverysw_ec_boot", 0, 0, "Recovery switch position at EC boot"}, |
| 29 {"wpsw_cur", 0, 0, "Firmware write protect switch current position"}, | 29 {"wpsw_cur", 0, 0, "Firmware write protect switch current position"}, |
| 30 {"wpsw_boot", 0, 0, "Firmware write protect switch position at boot"}, | 30 {"wpsw_boot", 0, 0, "Firmware write protect switch position at boot"}, |
| 31 /* Read-only strings */ | 31 /* Read-only strings */ |
| 32 {"hwid", 1, 0, "Hardware ID"}, | 32 {"hwid", 1, 0, "Hardware ID"}, |
| 33 {"fwid", 1, 0, "Active firmware ID"}, | 33 {"fwid", 1, 0, "Active firmware ID"}, |
| 34 {"ro_fwid", 1, 0, "Read-only firmware ID"}, | 34 {"ro_fwid", 1, 0, "Read-only firmware ID"}, |
| 35 /* Writable integers */ |
| 36 {"recovery_request", 0, 1, "Recovery mode request (writable)"}, |
| 37 {"dbg_reset", 0, 1, "Debug reset mode request (writable)"}, |
| 38 {"fwb_tries", 0, 1, "Try firmware B count (writable)"}, |
| 39 |
| 35 /* Terminate with null name */ | 40 /* Terminate with null name */ |
| 36 {NULL, 0, 0, NULL} | 41 {NULL, 0, 0, NULL} |
| 37 }; | 42 }; |
| 38 | 43 |
| 39 | 44 |
| 40 /* Print help */ | 45 /* Print help */ |
| 41 void PrintHelp(const char *progname) { | 46 void PrintHelp(const char *progname) { |
| 42 const Param *p; | 47 const Param *p; |
| 43 | 48 |
| 44 printf("\nUsage:\n" | 49 printf("\nUsage:\n" |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 169 if (i > 1) | 174 if (i > 1) |
| 170 printf(" "); /* Output params space-delimited */ | 175 printf(" "); /* Output params space-delimited */ |
| 171 if (value) | 176 if (value) |
| 172 retval = SetParam(p, value); | 177 retval = SetParam(p, value); |
| 173 else | 178 else |
| 174 retval = PrintParam(p); | 179 retval = PrintParam(p); |
| 175 } | 180 } |
| 176 | 181 |
| 177 return retval; | 182 return retval; |
| 178 } | 183 } |
| OLD | NEW |