[sheepdog] [PATCH] sheep: remove unnecessary extern keyword

Liu Yuan namei.unix at gmail.com
Thu Jan 24 06:08:40 CET 2013


From: Liu Yuan <tailai.ly at taobao.com>

Some prototype use extern but some are not, let's get a consistent nameing.

Signed-off-by: Liu Yuan <tailai.ly at taobao.com>
---
 collie/collie.h     |   26 +++++++--------
 include/logger.h    |   12 +++----
 include/rbtree.h    |   20 +++++------
 include/strbuf.h    |   34 +++++++++----------
 include/util.h      |   26 +++++++--------
 sheep/cluster.h     |    2 +-
 sheep/farm/farm.h   |   34 +++++++++----------
 sheep/sheep_priv.h  |   18 +++++-----
 sheep/trace/stabs.c |    8 ++---
 sheep/trace/trace.h |   34 +++++++++----------
 sheep/work.h        |    4 +--
 sheepfs/sheepfs.h   |   92 +++++++++++++++++++++++++--------------------------
 12 files changed, 155 insertions(+), 155 deletions(-)

diff --git a/collie/collie.h b/collie/collie.h
index 7e9b6be..7269f8e 100644
--- a/collie/collie.h
+++ b/collie/collie.h
@@ -48,16 +48,16 @@ struct subcommand {
 };
 void subcommand_usage(char *cmd, char *subcmd, int status);
 
-extern const char *sdhost;
-extern int sdport;
-extern bool highlight;
-extern bool raw_output;
+const char *sdhost;
+int sdport;
+bool highlight;
+bool raw_output;
 
-extern uint32_t sd_epoch;
-extern struct sd_node sd_nodes[SD_MAX_NODES];
-extern struct sd_vnode sd_vnodes[SD_MAX_VNODES];
-extern int sd_nodes_nr, sd_vnodes_nr;
-extern unsigned master_idx;
+uint32_t sd_epoch;
+struct sd_node sd_nodes[SD_MAX_NODES];
+struct sd_vnode sd_vnodes[SD_MAX_VNODES];
+int sd_nodes_nr, sd_vnodes_nr;
+unsigned master_idx;
 
 bool is_current(const struct sheepdog_inode *i);
 char *size_to_str(uint64_t _size, char *str, int str_size);
@@ -75,12 +75,12 @@ int send_light_req(struct sd_req *hdr, const char *host, int port);
 int send_light_req_get_response(struct sd_req *hdr, const char *host, int port);
 int collie_exec_req(int sockfd, struct sd_req *hdr, void *data);
 
-extern struct command vdi_command;
-extern struct command node_command;
-extern struct command cluster_command;
+struct command vdi_command;
+struct command node_command;
+struct command cluster_command;
 
 #ifdef ENABLE_TRACE
-  extern struct command debug_command;
+  struct command debug_command;
 #else
   #define debug_command {}
 #endif /* ENABLE_TRACE */
diff --git a/include/logger.h b/include/logger.h
index a2e8c3c..0922401 100644
--- a/include/logger.h
+++ b/include/logger.h
@@ -20,14 +20,14 @@
 #define LOG_SPACE_SIZE (32 * 1024 * 1024)
 #define MAX_MSG_SIZE 256
 
-extern int log_init(const char *progname, int size, bool to_stdout, int level,
+int log_init(const char *progname, int size, bool to_stdout, int level,
 		    char *outfile);
-extern void log_close(void);
-extern void dump_logmsg(void *);
-extern void log_write(int prio, const char *func, int line, const char *fmt, ...)
+void log_close(void);
+void dump_logmsg(void *);
+void log_write(int prio, const char *func, int line, const char *fmt, ...)
 	__attribute__ ((format (printf, 4, 5)));
-extern void set_thread_name(const char *name, int idx);
-extern void get_thread_name(char *name);
+void set_thread_name(const char *name, int idx);
+void get_thread_name(char *name);
 
 /*
 + * sheep log priorities, comliant with syslog spec
diff --git a/include/rbtree.h b/include/rbtree.h
index 83a29f0..27c511b 100644
--- a/include/rbtree.h
+++ b/include/rbtree.h
@@ -45,25 +45,25 @@ static inline void rb_init_node(struct rb_node *rb)
 	RB_CLEAR_NODE(rb);
 }
 
-extern void rb_insert_color(struct rb_node *, struct rb_root *);
-extern void rb_erase(struct rb_node *, struct rb_root *);
+void rb_insert_color(struct rb_node *, struct rb_root *);
+void rb_erase(struct rb_node *, struct rb_root *);
 
 typedef void (*rb_augment_f)(struct rb_node *node, void *data);
 
-extern void rb_augment_insert(struct rb_node *node,
+void rb_augment_insert(struct rb_node *node,
 		rb_augment_f func, void *data);
-extern struct rb_node *rb_augment_erase_begin(struct rb_node *node);
-extern void rb_augment_erase_end(struct rb_node *node,
+struct rb_node *rb_augment_erase_begin(struct rb_node *node);
+void rb_augment_erase_end(struct rb_node *node,
 		rb_augment_f func, void *data);
 
 /* Find logical next and previous nodes in a tree */
-extern struct rb_node *rb_next(const struct rb_node *);
-extern struct rb_node *rb_prev(const struct rb_node *);
-extern struct rb_node *rb_first(const struct rb_root *);
-extern struct rb_node *rb_last(const struct rb_root *);
+struct rb_node *rb_next(const struct rb_node *);
+struct rb_node *rb_prev(const struct rb_node *);
+struct rb_node *rb_first(const struct rb_root *);
+struct rb_node *rb_last(const struct rb_root *);
 
 /* Fast replacement of a single node without remove/rebalance/add/rebalance */
-extern void rb_replace_node(struct rb_node *victim, struct rb_node *new,
+void rb_replace_node(struct rb_node *victim, struct rb_node *new,
 		struct rb_root *root);
 
 static inline void rb_link_node(struct rb_node *node, struct rb_node *parent,
diff --git a/include/strbuf.h b/include/strbuf.h
index 3cca6b5..605e861 100644
--- a/include/strbuf.h
+++ b/include/strbuf.h
@@ -39,11 +39,11 @@ struct strbuf {
 #define STRBUF_INIT  { 0, 0, 0, NULL }
 
 /*----- strbuf life cycle -----*/
-extern void strbuf_init(struct strbuf *, size_t);
-extern void strbuf_release(struct strbuf *);
-extern void strbuf_reset(struct strbuf *);
-extern char *strbuf_detach(struct strbuf *);
-extern void strbuf_attach(struct strbuf *, void *, size_t, size_t);
+void strbuf_init(struct strbuf *, size_t);
+void strbuf_release(struct strbuf *);
+void strbuf_reset(struct strbuf *);
+char *strbuf_detach(struct strbuf *);
+void strbuf_attach(struct strbuf *, void *, size_t, size_t);
 
 /*----- strbuf size related -----*/
 static inline size_t strbuf_avail(struct strbuf *sb)
@@ -57,10 +57,10 @@ static inline void strbuf_setlen(struct strbuf *sb, size_t len)
 	sb->buf[len] = '\0';
 }
 
-extern void strbuf_grow(struct strbuf *, size_t);
+void strbuf_grow(struct strbuf *, size_t);
 
 /*----- content related -----*/
-extern void strbuf_rtrim(struct strbuf *);
+void strbuf_rtrim(struct strbuf *);
 
 /*----- add data in your buffer -----*/
 static inline void strbuf_addch(struct strbuf *sb, int c)
@@ -71,14 +71,14 @@ static inline void strbuf_addch(struct strbuf *sb, int c)
 }
 
 /* inserts after pos, or appends if pos >= sb->len */
-extern void strbuf_insert(struct strbuf *, size_t pos, const void *, size_t);
-extern void strbuf_remove(struct strbuf *, size_t pos, size_t len);
+void strbuf_insert(struct strbuf *, size_t pos, const void *, size_t);
+void strbuf_remove(struct strbuf *, size_t pos, size_t len);
 
 /* splice pos..pos+len with given data */
-extern void strbuf_splice(struct strbuf *, size_t pos, size_t len,
+void strbuf_splice(struct strbuf *, size_t pos, size_t len,
 		const void *, size_t);
 
-extern void strbuf_add(struct strbuf *, const void *, size_t);
+void strbuf_add(struct strbuf *, const void *, size_t);
 static inline void strbuf_addstr(struct strbuf *sb, const char *s)
 {
 	strbuf_add(sb, s, strlen(s));
@@ -89,13 +89,13 @@ static inline void strbuf_addbuf(struct strbuf *sb, struct strbuf *sb2)
 }
 
 __attribute__((format(printf, 2, 3)))
-extern void strbuf_addf(struct strbuf *sb, const char *fmt, ...);
+void strbuf_addf(struct strbuf *sb, const char *fmt, ...);
 
-extern size_t strbuf_fread(struct strbuf *, size_t, FILE *);
+size_t strbuf_fread(struct strbuf *, size_t, FILE *);
 /* XXX: if read fails, any partial read is undone */
-extern ssize_t strbuf_read(struct strbuf *, int fd, size_t hint);
-extern int strbuf_getline(struct strbuf *sb, FILE *fp, int term);
-extern int strbuf_copyout(struct strbuf *sb, void *buf, size_t len);
-extern int strbuf_stripout(struct strbuf *sb, void *buf, size_t len);
+ssize_t strbuf_read(struct strbuf *, int fd, size_t hint);
+int strbuf_getline(struct strbuf *sb, FILE *fp, int term);
+int strbuf_copyout(struct strbuf *sb, void *buf, size_t len);
+int strbuf_stripout(struct strbuf *sb, void *buf, size_t len);
 
 #endif
diff --git a/include/util.h b/include/util.h
index 01de542..fe1c9b8 100644
--- a/include/util.h
+++ b/include/util.h
@@ -70,19 +70,19 @@ static inline void *zalloc(size_t size)
 }
 
 typedef void (*try_to_free_t)(size_t);
-extern try_to_free_t set_try_to_free_routine(try_to_free_t);
-
-extern void *xmalloc(size_t size);
-extern void *xzalloc(size_t size);
-extern void *xrealloc(void *ptr, size_t size);
-extern void *xcalloc(size_t nmemb, size_t size);
-extern ssize_t xread(int fd, void *buf, size_t len);
-extern ssize_t xwrite(int fd, const void *buf, size_t len);
-extern ssize_t xpread(int fd, void *buf, size_t count, off_t offset);
-extern ssize_t xpwrite(int fd, const void *buf, size_t count, off_t offset);
-extern void pstrcpy(char *buf, int buf_size, const char *str);
-extern int rmdir_r(char *dir_path);
-extern bool is_numeric(const char *p);
+try_to_free_t set_try_to_free_routine(try_to_free_t);
+
+void *xmalloc(size_t size);
+void *xzalloc(size_t size);
+void *xrealloc(void *ptr, size_t size);
+void *xcalloc(size_t nmemb, size_t size);
+ssize_t xread(int fd, void *buf, size_t len);
+ssize_t xwrite(int fd, const void *buf, size_t len);
+ssize_t xpread(int fd, void *buf, size_t count, off_t offset);
+ssize_t xpwrite(int fd, const void *buf, size_t count, off_t offset);
+void pstrcpy(char *buf, int buf_size, const char *str);
+int rmdir_r(char *dir_path);
+bool is_numeric(const char *p);
 
 void trim_zero_sectors(void *buf, uint64_t *offset, uint32_t *len);
 void untrim_zero_sectors(void *buf, uint64_t offset, uint32_t len,
diff --git a/sheep/cluster.h b/sheep/cluster.h
index d078f48..c796d51 100644
--- a/sheep/cluster.h
+++ b/sheep/cluster.h
@@ -114,7 +114,7 @@ struct cluster_driver {
 	struct list_head list;
 };
 
-extern struct list_head cluster_drivers;
+struct list_head cluster_drivers;
 
 #define cdrv_register(driver)						\
 static void __attribute__((constructor)) regist_ ## driver(void) {	\
diff --git a/sheep/farm/farm.h b/sheep/farm/farm.h
index 1a0081e..6190644 100644
--- a/sheep/farm/farm.h
+++ b/sheep/farm/farm.h
@@ -40,28 +40,28 @@ struct trunk_entry {
 };
 
 /* farm.c */
-extern char farm_dir[PATH_MAX];
-extern char farm_obj_dir[PATH_MAX];
+char farm_dir[PATH_MAX];
+char farm_obj_dir[PATH_MAX];
 /* sha1_file.c */
-extern char *sha1_to_path(const unsigned char *sha1);
-extern int sha1_file_write(unsigned char *buf, unsigned len, unsigned char *);
-extern void *sha1_file_read(const unsigned char *sha1, struct sha1_file_hdr *);
-extern char *sha1_to_hex(const unsigned char *sha1);
-extern int get_sha1_hex(const char *hex, unsigned char *sha1);
-extern int sha1_file_try_delete(const unsigned char *sha1);
+char *sha1_to_path(const unsigned char *sha1);
+int sha1_file_write(unsigned char *buf, unsigned len, unsigned char *);
+void *sha1_file_read(const unsigned char *sha1, struct sha1_file_hdr *);
+char *sha1_to_hex(const unsigned char *sha1);
+int get_sha1_hex(const char *hex, unsigned char *sha1);
+int sha1_file_try_delete(const unsigned char *sha1);
 
 /* trunk.c */
-extern int trunk_init(void);
-extern int trunk_file_write(unsigned char *outsha1);
-extern void *trunk_file_read(unsigned char *sha1, struct sha1_file_hdr *);
+int trunk_init(void);
+int trunk_file_write(unsigned char *outsha1);
+void *trunk_file_read(unsigned char *sha1, struct sha1_file_hdr *);
 
 /* snap.c */
-extern int snap_init(void);
-extern void *snap_file_read(unsigned char *sha1, struct sha1_file_hdr *outhdr);
-extern int snap_file_write(uint32_t epoch, struct sd_node *nodes, int nr_nodes,
+int snap_init(void);
+void *snap_file_read(unsigned char *sha1, struct sha1_file_hdr *outhdr);
+int snap_file_write(uint32_t epoch, struct sd_node *nodes, int nr_nodes,
 		unsigned char *trunksha1, unsigned char *outsha1);
-extern int snap_log_truncate(void);
-extern void *snap_log_read(int *);
-extern int snap_log_write(uint32_t epoch, unsigned char *sha1);
+int snap_log_truncate(void);
+void *snap_log_read(int *);
+int snap_log_write(uint32_t epoch, unsigned char *sha1);
 
 #endif
diff --git a/sheep/sheep_priv.h b/sheep/sheep_priv.h
index b6a703f..76b0abc 100644
--- a/sheep/sheep_priv.h
+++ b/sheep/sheep_priv.h
@@ -186,7 +186,7 @@ int for_each_object_in_wd(int (*func)(uint64_t oid, void *arg), bool cleanup,
 			  void *arg);
 int err_to_sderr(uint64_t oid, int err);
 
-extern struct list_head store_drivers;
+struct list_head store_drivers;
 #define add_store_driver(driver)                                 \
 static void __attribute__((constructor)) add_ ## driver(void) {  \
 	list_add(&driver.list, &store_drivers);                  \
@@ -203,13 +203,13 @@ static inline struct store_driver *find_store_driver(const char *name)
 	return NULL;
 }
 
-extern struct cluster_info *sys;
-extern struct store_driver *sd_store;
-extern char *obj_path;
-extern char *jrnl_path;
-extern char *epoch_path;
-extern mode_t def_fmode;
-extern mode_t def_dmode;
+struct cluster_info *sys;
+struct store_driver *sd_store;
+char *obj_path;
+char *jrnl_path;
+char *epoch_path;
+mode_t def_fmode;
+mode_t def_dmode;
 
 /* One should call this function to get sys->epoch outside main thread */
 static inline uint32_t sys_epoch(void)
@@ -275,7 +275,7 @@ void queue_cluster_request(struct request *req);
 int update_epoch_log(uint32_t epoch, struct sd_node *nodes, size_t nr_nodes);
 int log_current_epoch(void);
 
-extern char *config_path;
+char *config_path;
 int set_cluster_copies(uint8_t copies);
 int get_cluster_copies(uint8_t *copies);
 int set_cluster_flags(uint16_t flags);
diff --git a/sheep/trace/stabs.c b/sheep/trace/stabs.c
index 4aa8a70..8e9d30e 100644
--- a/sheep/trace/stabs.c
+++ b/sheep/trace/stabs.c
@@ -28,10 +28,10 @@ struct stab {
 	uint32_t value;		/* value of symbol */
 };
 
-extern const struct stab __STAB_BEGIN__[];
-extern const struct stab __STAB_END__[];
-extern const char __STABSTR_BEGIN__[];
-extern const char __STABSTR_END__[];
+const struct stab __STAB_BEGIN__[];
+const struct stab __STAB_END__[];
+const char __STABSTR_BEGIN__[];
+const char __STABSTR_END__[];
 
 /*
    stab_bsearch(stabs, region_left, region_right, type, addr)
diff --git a/sheep/trace/trace.h b/sheep/trace/trace.h
index 730af97..2840646 100644
--- a/sheep/trace/trace.h
+++ b/sheep/trace/trace.h
@@ -36,29 +36,29 @@ typedef void (*trace_func_graph_ent_t)(struct trace_graph_item *);
 /* graph.c */
 
 /* stabs.c */
-extern int get_ipinfo(unsigned long ip, struct ipinfo *info);
+int get_ipinfo(unsigned long ip, struct ipinfo *info);
 
 /* mcount.S */
-extern void mcount(void);
-extern void mcount_call(void);
-extern void trace_caller(void);
-extern void trace_call(unsigned long, unsigned long *);
+void mcount(void);
+void mcount_call(void);
+void trace_caller(void);
+void trace_call(unsigned long, unsigned long *);
 extern const unsigned char NOP5[];
-extern void trace_return_caller(void);
-extern unsigned long trace_return_call(void);
+void trace_return_caller(void);
+unsigned long trace_return_call(void);
 
 /* trace.c */
 #ifdef ENABLE_TRACE
-  extern int trace_init_signal(void);
-  extern int trace_init(void);
-  extern int register_trace_function(trace_func_t func);
-  extern int trace_enable(void);
-  extern int trace_disable(void);
-  extern struct caller *trace_lookup_ip(unsigned long ip, bool create);
-  extern int trace_buffer_pop(void *buf, uint32_t len);
-  extern void trace_buffer_push(int cpuid, struct trace_graph_item *item);
-  extern void short_thread_begin(void);
-  extern void short_thread_end(void);
+  int trace_init_signal(void);
+  int trace_init(void);
+  int register_trace_function(trace_func_t func);
+  int trace_enable(void);
+  int trace_disable(void);
+  struct caller *trace_lookup_ip(unsigned long ip, bool create);
+  int trace_buffer_pop(void *buf, uint32_t len);
+  void trace_buffer_push(int cpuid, struct trace_graph_item *item);
+  void short_thread_begin(void);
+  void short_thread_end(void);
 #else
   static inline int trace_init_signal(void) { return 0; }
   static inline int trace_init(void) { return 0; }
diff --git a/sheep/work.h b/sheep/work.h
index 0d125dc..62b9bc5 100644
--- a/sheep/work.h
+++ b/sheep/work.h
@@ -41,8 +41,8 @@ struct worker_info {
 	pthread_t worker_thread; /* used for an ordered work queue */
 };
 
-extern struct list_head worker_info_list;
-extern int total_ordered_workers;
+struct list_head worker_info_list;
+int total_ordered_workers;
 
 /* if 'ordered' is true, the work queue are processes in order. */
 struct work_queue *init_work_queue(const char *name, bool ordered);
diff --git a/sheepfs/sheepfs.h b/sheepfs/sheepfs.h
index 1729665..fa641a5 100644
--- a/sheepfs/sheepfs.h
+++ b/sheepfs/sheepfs.h
@@ -20,18 +20,18 @@ enum sheepfs_opcode {
 #define COMMAND_LEN  512
 
 extern char sheepfs_shadow[];
-extern int sheepfs_page_cache;
-extern int sheepfs_object_cache;
+int sheepfs_page_cache;
+int sheepfs_object_cache;
 extern char sdhost[];
-extern int sdport;
+int sdport;
 
-extern struct strbuf *sheepfs_run_cmd(const char *command);
-extern int sheepfs_set_op(const char *path, unsigned opcode);
+struct strbuf *sheepfs_run_cmd(const char *command);
+int sheepfs_set_op(const char *path, unsigned opcode);
 
 typedef void (*printf_fn)(const char *func, int line, const char *, ...)
 __attribute__ ((format (__printf__, 3, 4)));
 
-extern printf_fn fs_printf;
+printf_fn fs_printf;
 
 #define sheepfs_pr(fmt, args...)			\
 ({							\
@@ -39,61 +39,61 @@ extern printf_fn fs_printf;
 })
 
 /* shadow_file.c */
-extern size_t shadow_file_write(const char *path, char *buf, size_t size);
-extern int shadow_file_read(const char *, char *buf, size_t size, off_t);
-extern int shadow_dir_create(const char *path);
-extern int shadow_file_create(const char *path);
-extern int shadow_file_setxattr(const char *path, const char *name,
+size_t shadow_file_write(const char *path, char *buf, size_t size);
+int shadow_file_read(const char *, char *buf, size_t size, off_t);
+int shadow_dir_create(const char *path);
+int shadow_file_create(const char *path);
+int shadow_file_setxattr(const char *path, const char *name,
 				const void *value, size_t size);
-extern int shadow_file_getxattr(const char *path, const char *name,
+int shadow_file_getxattr(const char *path, const char *name,
 				void *value, size_t size);
-extern int shadow_file_delete(const char *path);
-extern bool shadow_file_exsit(const char *path);
+int shadow_file_delete(const char *path);
+bool shadow_file_exsit(const char *path);
 
 /* volume.c */
-extern int create_volume_layout(void);
-extern int volume_read(const char *path, char *buf, size_t size, off_t offset);
-extern int volume_write(const char *, const char *buf, size_t size, off_t);
-extern size_t volume_get_size(const char *);
-extern int volume_create_entry(const char *entry);
-extern int volume_remove_entry(const char *entry);
-extern int volume_sync(const char *path);
-extern int volume_open(const char *path, struct fuse_file_info *);
-extern int reset_socket_pool(void);
+int create_volume_layout(void);
+int volume_read(const char *path, char *buf, size_t size, off_t offset);
+int volume_write(const char *, const char *buf, size_t size, off_t);
+size_t volume_get_size(const char *);
+int volume_create_entry(const char *entry);
+int volume_remove_entry(const char *entry);
+int volume_sync(const char *path);
+int volume_open(const char *path, struct fuse_file_info *);
+int reset_socket_pool(void);
 
 /* cluster.c */
-extern int cluster_info_read(const char *path, char *buf, size_t size, off_t);
-extern size_t cluster_info_get_size(const char *path);
-extern int create_cluster_layout(void);
+int cluster_info_read(const char *path, char *buf, size_t size, off_t);
+size_t cluster_info_get_size(const char *path);
+int create_cluster_layout(void);
 
 /* vdi.c */
-extern int create_vdi_layout(void);
-extern int vdi_list_read(const char *path, char *buf, size_t size, off_t);
-extern size_t vdi_list_get_size(const char *path);
+int create_vdi_layout(void);
+int vdi_list_read(const char *path, char *buf, size_t size, off_t);
+size_t vdi_list_get_size(const char *path);
 
-extern int vdi_mount_write(const char *, const char *buf, size_t size, off_t);
-extern int vdi_unmount_write(const char *, const char *buf, size_t, off_t);
+int vdi_mount_write(const char *, const char *buf, size_t size, off_t);
+int vdi_unmount_write(const char *, const char *buf, size_t, off_t);
 
 /* node.c */
-extern int node_list_read(const char *path, char *buf, size_t size, off_t);
-extern size_t node_list_get_size(const char *path);
-extern int node_info_read(const char *path, char *buf, size_t size, off_t);
-extern size_t node_info_get_size(const char *path);
-extern int create_node_layout(void);
+int node_list_read(const char *path, char *buf, size_t size, off_t);
+size_t node_list_get_size(const char *path);
+int node_info_read(const char *path, char *buf, size_t size, off_t);
+size_t node_info_get_size(const char *path);
+int create_node_layout(void);
 
 /* config.c */
-extern int create_config_layout(void);
+int create_config_layout(void);
 
-extern int config_pcache_read(const char *path, char *buf, size_t size, off_t);
-extern int config_pcache_write(const char *path, const char *, size_t, off_t);
-extern size_t config_pcache_get_size(const char *path);
+int config_pcache_read(const char *path, char *buf, size_t size, off_t);
+int config_pcache_write(const char *path, const char *, size_t, off_t);
+size_t config_pcache_get_size(const char *path);
 
-extern int config_ocache_read(const char *path, char *buf, size_t size, off_t);
-extern int config_ocache_write(const char *path, const char *, size_t, off_t);
-extern size_t config_ocache_get_size(const char *path);
+int config_ocache_read(const char *path, char *buf, size_t size, off_t);
+int config_ocache_write(const char *path, const char *, size_t, off_t);
+size_t config_ocache_get_size(const char *path);
 
-extern int config_sheep_info_read(const char *path, char *, size_t size, off_t);
-extern int config_sheep_info_write(const char *, const char *, size_t, off_t);
-extern size_t config_sheep_info_get_size(const char *path);
+int config_sheep_info_read(const char *path, char *, size_t size, off_t);
+int config_sheep_info_write(const char *, const char *, size_t, off_t);
+size_t config_sheep_info_get_size(const char *path);
 
 #endif
-- 
1.7.9.5




More information about the sheepdog mailing list