1 /*======================================================================*
2 * Copyright (C) 2008 Light Weight Event System *
3 * All rights reserved. *
5 * This program is free software; you can redistribute it and/or modify *
6 * it under the terms of the GNU General Public License as published by *
7 * the Free Software Foundation; either version 2 of the License, or *
8 * (at your option) any later version. *
10 * This program is distributed in the hope that it will be useful, *
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13 * GNU General Public License for more details. *
15 * You should have received a copy of the GNU General Public License *
16 * along with this program; if not, write to the Free Software *
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, *
18 * Boston, MA 02110-1301 USA. *
19 *======================================================================*/
32 int main(int argc
, const char* argv
[])
36 const char rotate_event
[] = ROTATE_COMMAND
"\0";
38 process_options(argc
, argv
);
39 arg_ttl
= 3 ; /* Command::Rotate should not be any other ... */
41 if ( (xport_factory(&xpt
) < 0) || (xpt
.vtbl
->open(&xpt
, O_RDONLY
) < 0) )
43 LOG_ER("Failed to create xport object.\n");
47 if ( (xpt_write_ret
= xpt
.vtbl
->write(&xpt
,
49 sizeof(rotate_event
))) < 0 )
51 LOG_ER("Xport Command::Rotate write error.");
52 xpt
.vtbl
->destructor(&xpt
);
56 xpt
.vtbl
->destructor(&xpt
);