Diff for /freem/src/fma_journals.c between versions 1.5 and 1.6

version 1.5, 2025/04/13 04:22:43 version 1.6, 2025/04/17 14:34:27
Line 24 Line 24
  *   along with FreeM.  If not, see <https://www.gnu.org/licenses/>.   *   along with FreeM.  If not, see <https://www.gnu.org/licenses/>.
  *   *
  *   $Log$   *   $Log$
    *   Revision 1.6  2025/04/17 14:34:27  snw
    *   Further logging improvements
    *
  *   Revision 1.5  2025/04/13 04:22:43  snw   *   Revision 1.5  2025/04/13 04:22:43  snw
  *   Fix snprintf calls   *   Fix snprintf calls
  *   *
Line 52 Line 55
   
 #include "fmadm.h"  #include "fmadm.h"
 #include "jnldefs.h"  #include "jnldefs.h"
   #include "log.h"
   
 void cvt_key (char *buf, char *key);  void cvt_key (char *buf, char *key);
 extern short ierr;  extern short ierr;
Line 74  int fma_journals_examine (int optc, char Line 78  int fma_journals_examine (int optc, char
     jnl_ent_t ent;      jnl_ent_t ent;
           
     if ((fd = open (fma_journal_path, O_RDONLY)) == -1) {      if ((fd = open (fma_journal_path, O_RDONLY)) == -1) {
         fprintf (stderr, "fmadm:  error %d opening journal file %s (%s)\n", errno, fma_journal_path, strerror (errno));          logprintf (FM_LOG_FATAL, "fmadm:  error opening journal file %s (error code %ld [%s])",fma_journal_path, errno, strerror (errno));
           
         exit (2);  
     }      }
           
     if (read (fd, &hdr, sizeof (jnl_hdr_t)) == -1) {      if (read (fd, &hdr, sizeof (jnl_hdr_t)) == -1) {
         fprintf (stderr, "fmadm:  error %d reading header from journal file %s (%s)\n", errno, fma_journal_path, strerror (errno));          logprintf (FM_LOG_FATAL, "fmadm:  error reading header from journal file %s (error code %ld [%s])", errno, fma_journal_path, strerror (errno));
           
         exit (3);  
     }      }
   
     printf ("\nFreeM Journal Dump\n");      printf ("\nFreeM Journal Dump\n");
Line 170  int fma_journals_restore (int optc, char Line 170  int fma_journals_restore (int optc, char
                   
     jnl_hdr_t hdr;      jnl_hdr_t hdr;
     jnl_ent_t ent;      jnl_ent_t ent;
       
     if ((fd = open (fma_journal_path, O_RDONLY)) == -1) {      if ((fd = open (fma_journal_path, O_RDONLY)) == -1) {
         fprintf (stderr, "error: error %d opening journal file %s\n", errno, fma_journal_path);          logprintf (FM_LOG_FATAL, "fmadm:  error opening journal file %s (error code %ld [%s])",fma_journal_path, errno, strerror (errno));
           
         exit (2);  
     }      }
           
     if (read (fd, &hdr, sizeof (jnl_hdr_t)) == -1) {      if (read (fd, &hdr, sizeof (jnl_hdr_t)) == -1) {
         fprintf (stderr, "error: error %d reading header from journal file %s\n", errno, fma_journal_path);          logprintf (FM_LOG_FATAL, "fmadm:  error reading header from journal file %s (error code %ld [%s])", errno, fma_journal_path, strerror (errno));
           
         exit (3);  
     }      }
   
     printf ("\nFreeM Journal Playback\n");      printf ("\nFreeM Journal Playback\n");

Removed from v.1.5  
changed lines
  Added in v.1.6


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