* buse.h: Added extern "C" keyword.

This commit is contained in:
comatose 2012-12-07 15:13:43 +09:00
parent 18c7ede4fb
commit 9e9f31bf90
3 changed files with 10 additions and 13 deletions

3
buse.c
View File

@ -66,7 +66,8 @@ int buse_main(int argc, char *argv[], const struct buse_operations *aop, void *u
int sp[2];
int nbd, sk, err, tmp_fd;
u_int64_t from;
u_int32_t len, bytes_read;
u_int32_t len;
ssize_t bytes_read;
char *dev_file;
struct nbd_request request;
struct nbd_reply reply;

9
buse.h
View File

@ -1,8 +1,11 @@
#ifndef BUSE_H_INCLUDED
#define BUSE_H_INCLUDED
#ifdef __cplusplus
extern "C" {
#endif
/* Most of this file was copied from nbd.h in the nbd distribution. */
#include <linux/types.h>
#include <sys/types.h>
@ -73,4 +76,8 @@ struct buse_operations {
int buse_main(int argc, char *argv[], const struct buse_operations *bop,
void *userdata);
#ifdef __cplusplus
}
#endif
#endif /* BUSE_H_INCLUDED */

View File

@ -31,17 +31,6 @@ static int xmp_flush()
return 0;
}
static int xmp_trim(u_int64_t from, u_int32_t len)
{
fprintf(stderr, "T %lu %u\n", from, len);
return 0;
}
static int xmp_flush(){
fprintf(stderr, "F\n");
return 0;
}
static int xmp_trim(u_int64_t from, u_int32_t len){
fprintf(stderr, "T - %lu, %u\n", from, len);
return 0;