flash/nor/efm32: fixed BG1x identification
[fw/openocd] / src / hello.c
index 903123c492588983a24dd3b1028935884fd1c936..9d078c0e776cbc2f455a5b4662edefcbdb223560 100644 (file)
@@ -12,9 +12,7 @@
  *   GNU General Public License for more details.                          *
  *                                                                         *
  *   You should have received a copy of the GNU General Public License     *
- *   along with this program; if not, write to the                         *
- *   Free Software Foundation, Inc.,                                       *
- *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
+ *   along with this program.  If not, see <http://www.gnu.org/licenses/>. *
  ***************************************************************************/
 
 #ifdef HAVE_CONFIG_H
@@ -90,8 +88,8 @@ COMMAND_HANDLER(handle_hello_command)
 {
        const char *sep, *name;
        int retval = CALL_COMMAND_HANDLER(handle_hello_args, &sep, &name);
-       if (ERROR_OK == retval)
-               command_print(CMD_CTX, "Greetings%s%s!", sep, name);
+       if (retval == ERROR_OK)
+               command_print(CMD, "Greetings%s%s!", sep, name);
        return retval;
 }
 
@@ -107,8 +105,8 @@ const struct command_registration hello_command_handlers[] = {
                .name = "foo",
                .mode = COMMAND_ANY,
                .help = "example command handler skeleton",
-
                .chain = foo_command_handlers,
+               .usage = "",
        },
        COMMAND_REGISTRATION_DONE
 };