Annotation of freem/src/fmadm.h, revision 1.8

1.1       snw         1: /*
1.8     ! snw         2:  *   $Id: fmadm.h,v 1.7 2025/04/02 02:16:27 snw Exp $
1.1       snw         3:  *    FreeM Administrative Tool
                      4:  *
                      5:  *  
1.2       snw         6:  *   Author: Serena Willis <snw@coherent-logic.com>
1.1       snw         7:  *    Copyright (C) 1998 MUG Deutschland
1.3       snw         8:  *    Copyright (C) 2020, 2025 Coherent Logic Development LLC
1.1       snw         9:  *
                     10:  *
                     11:  *   This file is part of FreeM.
                     12:  *
                     13:  *   FreeM is free software: you can redistribute it and/or modify
                     14:  *   it under the terms of the GNU Affero Public License as published by
                     15:  *   the Free Software Foundation, either version 3 of the License, or
                     16:  *   (at your option) any later version.
                     17:  *
                     18:  *   FreeM is distributed in the hope that it will be useful,
                     19:  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
                     20:  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
                     21:  *   GNU Affero Public License for more details.
                     22:  *
                     23:  *   You should have received a copy of the GNU Affero Public License
                     24:  *   along with FreeM.  If not, see <https://www.gnu.org/licenses/>.
                     25:  *
1.4       snw        26:  *   $Log: fmadm.h,v $
1.8     ! snw        27:  *   Revision 1.7  2025/04/02 02:16:27  snw
        !            28:  *   Add fmadm status environment command and move journals to a better location
        !            29:  *
1.7       snw        30:  *   Revision 1.6  2025/04/01 20:11:46  snw
                     31:  *   Further work on fmadm
                     32:  *
1.6       snw        33:  *   Revision 1.5  2025/03/22 18:43:54  snw
                     34:  *   Make STRLEN 255 chars and add BIGSTR macro for larger buffers
                     35:  *
1.5       snw        36:  *   Revision 1.4  2025/03/15 03:19:34  snw
                     37:  *   Fix broken build and update to 0.62.1
                     38:  *
1.4       snw        39:  *   Revision 1.3  2025/03/09 19:14:25  snw
                     40:  *   First phase of REUSE compliance and header reformat
                     41:  *
1.3       snw        42:  *
                     43:  * SPDX-FileCopyrightText:  (C) 2025 Coherent Logic Development LLC
                     44:  * SPDX-License-Identifier: AGPL-3.0-or-later 
1.1       snw        45:  **/
                     46: 
                     47: #if !defined(_FMADM_H)
                     48: #define _FMADM_H
                     49: 
                     50: #include "mpsdef0.h"
                     51: 
                     52: #include "fma_globals.h"
                     53: #include "fma_journals.h"
                     54: #include "fma_locks.h"
                     55: #include "fma_routines.h"
                     56: #include "fma_jobs.h"
                     57: 
                     58: #define FMA_MAXARGS 30
                     59: 
                     60: #define FMAC_SELECT 0
                     61: #define FMAC_LIST 1
                     62: #define FMAC_EXAMINE 2
                     63: #define FMAC_VERIFY 3
                     64: #define FMAC_COMPACT 4
                     65: #define FMAC_REPAIR 5
                     66: #define FMAC_CREATE 6
                     67: #define FMAC_REMOVE 7
                     68: #define FMAC_IMPORT 8
                     69: #define FMAC_EXPORT 9
                     70: #define FMAC_BACKUP 10
                     71: #define FMAC_RESTORE 11
                     72: #define FMAC_MIGRATE 12
                     73: #define FMAC_EDIT 13
                     74: #define FMAC_SET 14
                     75: #define FMAC_SHOW 15
                     76: #define FMAC_EXIT 100
                     77: #define FMAC_INVALID 255
                     78: 
                     79: #define ACT_LIST 0
                     80: #define ACT_EXAMINE 1
                     81: #define ACT_VERIFY 2
                     82: #define ACT_COMPACT 3
                     83: #define ACT_REPAIR 4
                     84: #define ACT_CREATE 5
                     85: #define ACT_REMOVE 6
                     86: #define ACT_IMPORT 7
                     87: #define ACT_EXPORT 8
                     88: #define ACT_BACKUP 9
                     89: #define ACT_RESTORE 10
                     90: #define ACT_MIGRATE 11
                     91: #define ACT_EDIT 12
1.6       snw        92: #define ACT_START 13
                     93: #define ACT_STOP 14
                     94: #define ACT_RESTART 15
1.7       snw        95: #define ACT_STATUS 16
1.1       snw        96: 
                     97: #define OBJ_LOCK 0
                     98: #define OBJ_JOURNAL 2
                     99: #define OBJ_NAMESPACE 3
                    100: #define OBJ_GLOBAL 4
                    101: #define OBJ_ROUTINE 5
                    102: #define OBJ_HARDCOPY 6
                    103: #define OBJ_RGAPROTOCOL 7
                    104: #define OBJ_JOB 8
1.6       snw       105: #define OBJ_DAEMON 9
1.1       snw       106: 
                    107: #define UNSIGN(A) ((A)&0377)
                    108: 
                    109: #if !defined(PATH_MAX)
                    110: # define PATH_MAX 1024
                    111: #endif
                    112: 
                    113: int fmadm_usage (void);
                    114: void fmadm_exit (int retval);
                    115: int fm_list (short object, int optc, char **options);
                    116: int fm_examine (short object, int optc, char **options);
                    117: int fm_verify (short object, int optc, char **options);
                    118: int fm_compact (short object, int optc, char **options);
                    119: int fm_repair (short object, int optc, char **options);
                    120: int fm_create (short object, int optc, char **options);
                    121: int fm_remove (short object, int optc, char **options);
                    122: int fm_import (short object, int optc, char **options);
                    123: int fm_export (short object, int optc, char **options);
                    124: int fm_backup (short object, int optc, char **options);
                    125: int fm_restore (short object, int optc, char **options);
                    126: int fm_migrate (short object, int optc, char **options);
                    127: int fm_edit (short object, int optc, char **options);
                    128: 
                    129: void fm_sig_attach (int sig, void *handler);
                    130: void fm_sig_init (void);
                    131: void fm_on_sigint (void);
                    132: void fm_on_sigterm (void);
                    133: 
1.5       snw       134: extern char fma_environment[STRLEN];
1.1       snw       135: extern char fma_namespace[STRLEN];
1.5       snw       136: extern char fma_routine_path[PATHLEN];
                    137: extern char fma_global_path[PATHLEN];
                    138: extern char fma_journal_path[PATHLEN];
                    139: extern char fma_pct_global_path[PATHLEN];
                    140: extern char fma_pct_routine_path[PATHLEN];
1.1       snw       141: extern char fma_journal_cut_threshold[STRLEN];
1.5       snw       142: extern char fma_locktab[PATHLEN];
1.1       snw       143: 
                    144: extern char gloplib[PATHLEN];
                    145: extern char glopath[PATHLEN];
                    146: 
                    147: extern pid_t pid;
                    148: 
                    149: extern short fma_base_opt;
                    150: extern short fma_min_args;
                    151: 
                    152: #endif

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>