]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/blob - db/echo.c
xfsprogs: Release v6.10.1
[thirdparty/xfsprogs-dev.git] / db / echo.c
1 // SPDX-License-Identifier: GPL-2.0
2 /*
3 * Copyright (c) 2000-2001,2005 Silicon Graphics, Inc.
4 * All Rights Reserved.
5 */
6
7 #include "libxfs.h"
8 #include "command.h"
9 #include "echo.h"
10 #include "output.h"
11
12 static int echo_f(int argc, char **argv);
13
14 static const cmdinfo_t echo_cmd =
15 { "echo", NULL, echo_f, 0, -1, 0, N_("[args]..."),
16 N_("echo arguments"), NULL };
17
18 /*ARGSUSED*/
19 static int
20 echo_f(
21 int argc,
22 char **argv)
23 {
24 char *c;
25
26 for (c = *(++argv); c; c = *(++argv))
27 dbprintf("%s ", c);
28 dbprintf("\n");
29 return 0;
30 }
31
32 void
33 echo_init(void)
34 {
35 add_command(&echo_cmd);
36 }