diff options
author | Kaleb S. KEITHLEY <kkeithle@redhat.com> | 2015-10-01 16:31:19 -0400 |
---|---|---|
committer | Jeff Darcy <jdarcy@redhat.com> | 2015-10-28 13:38:42 -0700 |
commit | 3066a21caafab6305527991de11c8eb43ec0044c (patch) | |
tree | 5efc91272ac76ff1613cee1e8a41aeb32aa92d73 /xlators/features/compress | |
parent | 063d4ead61ee47433793de81a1c77e0ba69e6e07 (diff) |
core: use syscall wrappers instead of direct syscalls - miscellaneous
various xlators and other components are invoking system calls
directly instead of using the libglusterfs/syscall.[ch] wrappers.
If not using the system call wrappers there should be a comment
in the source explaining why the wrapper isn't used.
Change-Id: I1f47820534c890a00b452fa61f7438eb2b3f667c
BUG: 1267967
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
Reviewed-on: http://review.gluster.org/12276
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
Diffstat (limited to 'xlators/features/compress')
-rw-r--r-- | xlators/features/compress/src/cdc-helper.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/xlators/features/compress/src/cdc-helper.c b/xlators/features/compress/src/cdc-helper.c index 21f529c2652..0a9a0e3d29c 100644 --- a/xlators/features/compress/src/cdc-helper.c +++ b/xlators/features/compress/src/cdc-helper.c @@ -10,6 +10,7 @@ #include "glusterfs.h" #include "logging.h" +#include "syscall.h" #include "cdc.h" #include "cdc-mem-types.h" @@ -166,17 +167,17 @@ cdc_dump_iovec_to_disk (xlator_t *this, cdc_info_t *ci, const char *file) return; } - written = write (fd, (char *) gzip_header, 10); + written = sys_write (fd, (char *) gzip_header, 10); total_written += written; for (i = 0; i < ci->ncount; i++) { - written = write (fd, (char *) ci->vec[i].iov_base, ci->vec[i].iov_len); + written = sys_write (fd, (char *) ci->vec[i].iov_base, ci->vec[i].iov_len); total_written += written; } gf_log (this->name, GF_LOG_DEBUG, "dump'd %zu bytes to %s", total_written, GF_CDC_DEBUG_DUMP_FILE ); - close (fd); + sys_close (fd); } static int32_t |