Project

General

Profile

Revision 5e03b78d

ID5e03b78d5aacaf06e74917ba3dc386df46646e03
Parent 5e8f735d
Child cc7646f9

Added by Thomas Mullins almost 11 years ago

Added new logging functions which inject timestamps

View differences:

mainbox/util.c
1 1
#include "util.h"
2
#include "log.h"
2 3
#include <stdlib.h>
3 4
#include <stdio.h>
4 5
#include <unistd.h>
......
12 13
  
13 14
  fd = open(filename, O_RDONLY);
14 15
  if (fd < 0) {
15
    perror("open");
16
    log_perror("open");
16 17
    return NULL;
17 18
  }
18 19

  
......
38 39
      close(fd);
39 40
      return str;
40 41
    } else if (nread < 0) {
41
      perror("read");
42
      log_perror("read");
42 43
      free(str);
43 44
      close(fd);
44 45
      return NULL;

Also available in: Unified diff