This enables to add more definitions later and to also add functions prototypes there.
This change contains no functional changes. Signed-off-by: Denis 'GNUtoo' Carikli <gnu...@cyberdimension.org> --- tools/ipc-modem.c | 18 +----------------- tools/ipc-modem.h | 42 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+), 17 deletions(-) create mode 100644 tools/ipc-modem.h diff --git a/tools/ipc-modem.c b/tools/ipc-modem.c index 1fbc778..ae410e6 100644 --- a/tools/ipc-modem.c +++ b/tools/ipc-modem.c @@ -37,9 +37,7 @@ #include <samsung-ipc.h> -#define MODEM_STATE_LPM 0 -#define MODEM_STATE_NORMAL 2 -#define MODEM_STATE_SIM_OK 4 +#include "ipc-modem.h" int state = MODEM_STATE_LPM; int seq; @@ -50,20 +48,6 @@ int call_done; char call_number[14]; char sim_pin[8]; -enum command { - CMD_NONE, - CMD_START, - CMD_BOOT, - CMD_POWER_ON, - CMD_POWER_OFF, -}; - -struct cmdline_opts { - enum command command; - bool debug; - bool dry_run; -}; - int seq_get(void) { if (seq == 0xff) diff --git a/tools/ipc-modem.h b/tools/ipc-modem.h new file mode 100644 index 0000000..6d54375 --- /dev/null +++ b/tools/ipc-modem.h @@ -0,0 +1,42 @@ +/* + * This file is part of libsamsung-ipc. + * + * Copyright (C) 2011 Simon Busch <morp...@gravedo.de> + * Copyright (C) 2011 Paul Kocialkowsk <cont...@paulk.fr> + * Copyright (C) 2022 Denis 'GNUtoo' Carikli <gnu...@cyberdimension.org> + * + * libsamsung-ipc is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * libsamsung-ipc is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with libsamsung-ipc. If not, see <http://www.gnu.org/licenses/>. + */ +#ifndef IPC_MODEM_H +#define IPC_MODEM_H + +#define MODEM_STATE_LPM 0 +#define MODEM_STATE_NORMAL 2 +#define MODEM_STATE_SIM_OK 4 + +enum command { + CMD_NONE, + CMD_START, + CMD_BOOT, + CMD_POWER_ON, + CMD_POWER_OFF, +}; + +struct cmdline_opts { + enum command command; + bool debug; + bool dry_run; +}; + +#endif /* IPC_MODEM */ -- 2.35.1 _______________________________________________ Replicant mailing list Replicant@osuosl.org https://lists.osuosl.org/mailman/listinfo/replicant