diff options
Diffstat (limited to 'libglusterfs/src/graph-print.c')
| -rw-r--r-- | libglusterfs/src/graph-print.c | 16 | 
1 files changed, 9 insertions, 7 deletions
diff --git a/libglusterfs/src/graph-print.c b/libglusterfs/src/graph-print.c index d352cc798b8..676167b17d2 100644 --- a/libglusterfs/src/graph-print.c +++ b/libglusterfs/src/graph-print.c @@ -13,7 +13,7 @@  #include "common-utils.h"  #include "xlator.h"  #include "graph-utils.h" - +#include "libglusterfs-messages.h"  struct gf_printer { @@ -28,8 +28,8 @@ gp_write_file (struct gf_printer *gp, char *buf, size_t len)          FILE *f = gp->priv;          if (fwrite (buf, len, 1, f) != 1) { -                gf_log ("graph-print", GF_LOG_ERROR, "fwrite failed (%s)", -                        strerror (errno)); +                gf_msg ("graph-print", GF_LOG_ERROR, errno, +                        LG_MSG_FWRITE_FAILED, "fwrite failed");                  return -1;          } @@ -43,7 +43,8 @@ gp_write_buf (struct gf_printer *gp, char *buf, size_t len)          struct iovec *iov = gp->priv;          if (iov->iov_len < len) { -                gf_log ("graph-print", GF_LOG_ERROR, "buffer full"); +                gf_msg ("graph-print", GF_LOG_ERROR, 0, LG_MSG_BUFFER_FULL, +                        "buffer full");                  return -1;          } @@ -134,7 +135,8 @@ glusterfs_graph_print (struct gf_printer *gp, glusterfs_graph_t *graph)  out:          len = gp->len;          if (ret == -1) { -                gf_log ("graph-print", GF_LOG_ERROR, "printing failed"); +                gf_msg ("graph-print", GF_LOG_ERROR, 0, LG_MSG_PRINT_FAILED, +                        "printing failed");                  return -1;          } @@ -167,8 +169,8 @@ glusterfs_graph_print_buf (glusterfs_graph_t *graph)          f = fopen ("/dev/null", "a");          if (!f) { -                gf_log ("graph-print", GF_LOG_ERROR, -                        "cannot open /dev/null (%s)", strerror (errno)); +                gf_msg ("graph-print", GF_LOG_ERROR, errno, +                        LG_MSG_DIR_OP_FAILED, "cannot open /dev/null");                  return NULL;          }  | 
