summaryrefslogtreecommitdiffstats
path: root/libglusterfs/src/common-utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'libglusterfs/src/common-utils.c')
-rw-r--r--libglusterfs/src/common-utils.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/libglusterfs/src/common-utils.c b/libglusterfs/src/common-utils.c
index 061162f7..46fe6388 100644
--- a/libglusterfs/src/common-utils.c
+++ b/libglusterfs/src/common-utils.c
@@ -2940,3 +2940,19 @@ out:
fclose (file);
return running;
}
+
+int
+gf_skip_header_section (int fd, int header_len)
+{
+ int ret = -1;
+
+ ret = lseek (fd, header_len, SEEK_SET);
+ if (ret == (off_t) -1) {
+ gf_log ("", GF_LOG_ERROR, "Failed to skip header "
+ "section");
+ } else {
+ ret = 0;
+ }
+
+ return ret;
+}