version 1.1, 2025/01/19 02:04:04
|
version 1.5, 2025/04/03 20:48:14
|
Line 1
|
Line 1
|
/* |
/* |
* * |
* $Id$ |
* * * |
|
* * * |
|
* *************** |
|
* * * * * |
|
* * MUMPS * |
|
* * * * * |
|
* *************** |
|
* * * |
|
* * * |
|
* * |
|
* |
|
* journal.c |
|
* Implementation of FreeM journaling |
* Implementation of FreeM journaling |
* |
* |
* |
* |
* Author: Serena Willis <jpw@coherent-logic.com> |
* Author: Serena Willis <snw@coherent-logic.com> |
* Copyright (C) 1998 MUG Deutschland |
* Copyright (C) 1998 MUG Deutschland |
* Copyright (C) 2020 Coherent Logic Development LLC |
* Copyright (C) 2020, 2025 Coherent Logic Development LLC |
* |
* |
* |
* |
* This file is part of FreeM. |
* This file is part of FreeM. |
Line 35
|
Line 23
|
* You should have received a copy of the GNU Affero Public License |
* You should have received a copy of the GNU Affero Public License |
* along with FreeM. If not, see <https://www.gnu.org/licenses/>. |
* along with FreeM. If not, see <https://www.gnu.org/licenses/>. |
* |
* |
|
* $Log$ |
|
* Revision 1.5 2025/04/03 20:48:14 snw |
|
* Improve daemon error diagnostics and bump to 0.63.0-rc3 |
|
* |
|
* Revision 1.4 2025/03/09 19:14:25 snw |
|
* First phase of REUSE compliance and header reformat |
|
* |
|
* |
|
* SPDX-FileCopyrightText: (C) 2025 Coherent Logic Development LLC |
|
* SPDX-License-Identifier: AGPL-3.0-or-later |
**/ |
**/ |
|
|
#include <stdio.h> |
#include <stdio.h> |
Line 93 short jnl_init(char *jnlfile, char *host
|
Line 91 short jnl_init(char *jnlfile, char *host
|
|
|
jnl_desc = open (jnl_file_path, O_CREAT | O_APPEND | O_RDWR, S_IRWXU | S_IRWXG | S_IRWXO); |
jnl_desc = open (jnl_file_path, O_CREAT | O_APPEND | O_RDWR, S_IRWXU | S_IRWXG | S_IRWXO); |
|
|
if (jnl_desc == -1) jnl_panic ("error creating new journal file"); |
snprintf (tmsg, 255, "error creating new journal file '%s' [errno %d: '%s']", jnl_file_path, errno, strerror (errno)); |
|
if (jnl_desc == -1) jnl_panic (tmsg); |
|
|
jnl_lock (); |
jnl_lock (); |
|
|
Line 230 short jnl_ent_write(short action, char *
|
Line 229 short jnl_ent_write(short action, char *
|
break; |
break; |
|
|
default: |
default: |
snprintf (msg, 255, strerror (errno)); |
snprintf (msg, 255, "%s", strerror (errno)); |
break; |
break; |
|
|
} |
} |