OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2012 Google, Inc. | 2 * Copyright (c) 2012 Google, Inc. |
3 * | 3 * |
4 * Permission is hereby granted, free of charge, to any person obtaining | 4 * Permission is hereby granted, free of charge, to any person obtaining |
5 * a copy of this software and associated documentation files | 5 * a copy of this software and associated documentation files |
6 * (the "Software"), to deal in the Software without restriction, | 6 * (the "Software"), to deal in the Software without restriction, |
7 * including without limitation the rights to use, copy, modify, merge, | 7 * including without limitation the rights to use, copy, modify, merge, |
8 * publish, distribute, sublicense, and/or sell copies of the Software, | 8 * publish, distribute, sublicense, and/or sell copies of the Software, |
9 * and to permit persons to whom the Software is furnished to do so, | 9 * and to permit persons to whom the Software is furnished to do so, |
10 * subject to the following conditions: | 10 * subject to the following conditions: |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 } | 50 } |
51 | 51 |
52 static int cmd_poweroff(int argc, const cmd_args *argv) | 52 static int cmd_poweroff(int argc, const cmd_args *argv) |
53 { | 53 { |
54 platform_halt(HALT_ACTION_SHUTDOWN, HALT_REASON_SW_RESET); | 54 platform_halt(HALT_ACTION_SHUTDOWN, HALT_REASON_SW_RESET); |
55 return 0; | 55 return 0; |
56 } | 56 } |
57 | 57 |
58 STATIC_COMMAND_START | 58 STATIC_COMMAND_START |
59 #if LK_DEBUGLEVEL > 1 | 59 #if LK_DEBUGLEVEL > 1 |
60 { "reboot", "soft reset", &cmd_reboot }, | 60 STATIC_COMMAND("reboot", "soft reset", &cmd_reboot) |
61 { "poweroff", "powerdown", &cmd_poweroff }, | 61 STATIC_COMMAND("poweroff", "powerdown", &cmd_poweroff) |
62 #endif | 62 #endif |
63 STATIC_COMMAND_END(platform_power); | 63 STATIC_COMMAND_END(platform_power); |
64 | 64 |
65 #endif | 65 #endif |
66 | 66 |
OLD | NEW |