Changed abuse to buse everywhere it appeared.

This commit is contained in:
Adam Cozzette 2011-10-09 23:20:39 -07:00
parent fa6dc0152c
commit 67c7f7c04a
4 changed files with 13 additions and 13 deletions

View File

@ -1,5 +1,5 @@
TARGET := abusexmp
OBJS := $(TARGET:=.o) abuse.o
TARGET := busexmp
OBJS := $(TARGET:=.o) buse.o
C := /usr/bin/gcc
CFLAGS := -g -pedantic -Wall -Wextra -std=c99 -I$(HOME)/local/include -I$(HOME)/src/nbd
@ -11,7 +11,7 @@ all: $(TARGET)
$(TARGET): $(OBJS)
$(CC) $(LDFLAGS) -o $@ $^
$(OBJS): %.o: %.c abuse.h
$(OBJS): %.o: %.c buse.h
$(CC) $(CFLAGS) -o $@ -c $<
clean:

View File

@ -11,7 +11,7 @@
#include <sys/stat.h>
#include <unistd.h>
#include "abuse.h"
#include "buse.h"
/*
* These helper functions were taken from cliserv.h in the nbd distribution.
@ -31,7 +31,7 @@ u_int64_t ntohll(u_int64_t a) {
#endif
#define htonll ntohll
int abuse_main(int argc, char *argv[], const struct abuse_operations *aop, void *userdata)
int buse_main(int argc, char *argv[], const struct buse_operations *aop, void *userdata)
{
int sp[2];
int nbd, sk, err, tmp_fd;

View File

@ -1,9 +1,9 @@
#ifndef ABUSE_H_INCLUDED
#define ABUSE_H_INCLUDED
#ifndef BUSE_H_INCLUDED
#define BUSE_H_INCLUDED
#include <sys/types.h>
struct abuse_operations {
struct buse_operations {
int (*read)(void *buf, u_int32_t len, u_int64_t offset);
int (*write)(const void *buf, u_int32_t len, u_int64_t offset);
int (*disc)();
@ -13,7 +13,7 @@ struct abuse_operations {
u_int64_t size;
};
int abuse_main(int argc, char *argv[], const struct abuse_operations *aop,
int buse_main(int argc, char *argv[], const struct buse_operations *aop,
void *userdata);
#endif /* ABUSE_H_INCLUDED */
#endif /* BUSE_H_INCLUDED */

View File

@ -1,7 +1,7 @@
#include <stdlib.h>
#include <string.h>
#include "abuse.h"
#include "buse.h"
static void *data;
@ -19,7 +19,7 @@ static int xmp_write(const void *buf, u_int32_t len, u_int64_t offset)
return 0;
}
static struct abuse_operations aop = {
static struct buse_operations aop = {
.read = xmp_read,
.write = xmp_write,
.size = 128 * 1024 * 1024,
@ -29,5 +29,5 @@ int main(int argc, char *argv[])
{
data = malloc(aop.size);
return abuse_main(argc, argv, &aop, NULL);
return buse_main(argc, argv, &aop, NULL);
}