fs-back: build fixes
PATCH 1/1 fs-back: build fixes
Hi!
Compiling tools/fs-back/fs-ops.c fails. Build error messages are below. Attached patch fixes these by:
- using sys/statvfs.h
- renaming struct mount to struct fs_mount
- making functions w/o a prototype static
fs-ops.c:13:21: error: sys/vfs.h: No such file or directory In file included from fs-ops.c:16:
fs-backend.h:35: error: redefinition of 'struct mount'
cc1: warnings being treated as errorsfs-ops.c: In function 'get_request':
fs-ops.c:28: error: 'struct mount' has no member named 'freelist' fs-ops.c:31: error: 'struct mount' has no member named 'requests' fs-ops.c:32: error: 'struct mount' has no member named 'requests' fs-ops.c: In function 'get_fd':
fs-ops.c:42: error: 'struct mount' has no member named 'fds' fs-ops.c: In function 'dispatch_file_open':
fs-ops.c:59: error: 'struct mount' has no member named 'gnth' fs-ops.c:60: error: 'struct mount' has no member named 'dom_id' fs-ops.c:66: error: 'struct mount' has no member named 'export' fs-ops.c:69: error: 'struct mount' has no member named 'export' fs-ops.c:70: error: 'struct mount' has no member named 'gnth' fs-ops.c:79: error: 'struct mount' has no member named 'fds' fs-ops.c:85: error: 'struct mount' has no member named 'ring' fs-ops.c:89: error: 'struct mount' has no member named 'ring' fs-ops.c:91: error: 'struct mount' has no member named 'ring' fs-ops.c:91: error: 'struct mount' has no member named 'ring' fs-ops.c: In function 'dispatch_file_close':
fs-ops.c:107: error: 'struct mount' has no member named 'fds' fs-ops.c:109: error: 'struct mount' has no member named 'fds' fs-ops.c:115: error: 'struct mount' has no member named 'ring' fs-ops.c:119: error: 'struct mount' has no member named 'ring' fs-ops.c:121: error: 'struct mount' has no member named 'ring' fs-ops.c:121: error: 'struct mount' has no member named 'ring' fs-ops.c: In function 'dispatch_file_read':
fs-ops.c:134: error: 'struct mount' has no member named 'gnth' fs-ops.c:135: error: 'struct mount' has no member named 'dom_id' fs-ops.c:144: error: 'struct mount' has no member named 'fds' fs-ops.c:150: error: 'struct mount' has no member named 'requests'
Signature · 12 lines
AMD Saxony, Dresden, Germany Operating System Research Center Legal Information: AMD Saxony Limited Liability Company & Co. KG Sitz (Geschäftsanschrift): Wilschdorfer Landstr. 101, 01109 Dresden, Deutschland Registergericht Dresden: HRA 4896 vertretungsberechtigter Komplementär: AMD Saxony LLC (Sitz Wilmington, Delaware, USA) Geschäftsführer der AMD Saxony LLC: Dr. Hans-R. Deppe, Thomas McCoy
tools/fs-back/fs-backend.c +8 -8
@@ -16,7 +16,7 @@ static int export_id = 0;static int export_id =0 ;static int mount_id =0 ; -void dispatch_response (struct mount *mount,int priv_req_id) +static void dispatch_response (struct fs_mount *mount,int priv_req_id) {int i;struct fs_op *op;
@@ -41,7 +41,7 @@ void dispatch_response(struct mount *mouadd_id_to_freelist (priv_req_id, mount->freelist); } -static void handle_aio_events (struct mount *mount) +static void handle_aio_events (struct fs_mount *mount) {int fd, ret, count, i, notify;evtchn_port_t port;
@@ -103,7 +103,7 @@ read_event_channel: } -void allocate_request_array (struct mount *mount) +static void allocate_request_array (struct fs_mount *mount) {int i, nr_entries = mount->nr_entries;struct fs_request *requests;
@@ -123,10 +123,10 @@ void allocate_request_array(struct mount } -void *handle_mount (void *data) +static void *handle_mount (void *data) {int more, notify; -struct mount *mount = (struct mount *)data; +struct fs_mount *mount = (struct fs_mount *)data;printf ("Starting a thread for mount: %d\n" , mount->mount_id);allocate_request_array (mount);
@@ -193,7 +193,7 @@ moretodo:static void handle_connection (int frontend_dom_id,int export_id,char *frontend) { -struct mount *mount; +struct fs_mount *mount;struct fs_export *export;int evt_port;pthread_t handling_thread;
@@ -216,7 +216,7 @@ static void handle_connection(int frontereturn ; } - mount = (struct mount *)malloc (sizeof (struct mount )); + mount = (struct fs_mount *)malloc (sizeof (struct fs_mount )); mount->dom_id = frontend_dom_id; mount->export = export; mount->mount_id = mount_id++;
@@ -287,7 +287,7 @@ next_select: }while (1 ); } -struct fs_export *create_export (char *name,char *export_path) +static struct fs_export *create_export (char *name,char *export_path) {struct fs_export *curr_export, **last_export;
tools/fs-back/fs-backend.h +6 -6
@@ -31,7 +31,7 @@ struct fs_request }; -struct mount +struct fs_mount {struct fs_export *export;int dom_id;
@@ -56,17 +56,17 @@ bool xenbus_create_request_node(void);bool xenbus_create_request_node (void );int xenbus_register_export (struct fs_export *export);int xenbus_get_watch_fd (void ); -void xenbus_read_mount_request (struct mount *mount,char *frontend); -void xenbus_write_backend_node (struct mount *mount); -void xenbus_write_backend_ready (struct mount *mount); +void xenbus_read_mount_request (struct fs_mount *mount,char *frontend); +void xenbus_write_backend_node (struct fs_mount *mount); +void xenbus_write_backend_ready (struct fs_mount *mount);/* File operations, implemented in fs-ops.c */ struct fs_op {int type;/* Type of request (from fsif.h) this handlers are responsible for */ -void (*dispatch_handler)(struct mount *mount,struct fsif_request *req); -void (*response_handler)(struct mount *mount,struct fs_request *req); +void (*dispatch_handler)(struct fs_mount *mount,struct fsif_request *req); +void (*response_handler)(struct fs_mount *mount,struct fs_request *req); };/* This NULL terminated array of all file requests handlers */
tools/fs-back/fs-ops.c +23 -22
176 lines not on this page · raw message
tools/fs-back/fs-xenbus.c +3 -3
@@ -109,7 +109,7 @@ int xenbus_get_watch_fd(void)return xs_fileno (xsh); } -void xenbus_read_mount_request (struct mount *mount,char *frontend) +void xenbus_read_mount_request (struct fs_mount *mount,char *frontend) {char node[1024 ];char *s;
@@ -150,7 +150,7 @@ static int get_self_id(void) } -void xenbus_write_backend_node (struct mount *mount) +void xenbus_write_backend_node (struct fs_mount *mount) {char node[1024 ], backend_node[1024 ];int self_id;
@@ -167,7 +167,7 @@ void xenbus_write_backend_node(struct moxs_write (xsh,XBT_NULL , node,STATE_INITIALISED ,strlen (STATE_INITIALISED )); } -void xenbus_write_backend_ready (struct mount *mount) +void xenbus_write_backend_ready (struct fs_mount *mount) {char node[1024 ];int self_id;
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel