The mighty GoogleFS builds again for Haiku \o/

Still lotsa warning and panics on mount though...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36053 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
François Revol 2010-04-06 19:43:27 +00:00
parent 393127df0f
commit 8c3082077f
6 changed files with 334 additions and 380 deletions

View File

@ -197,7 +197,7 @@ status_t google_request_close(struct google_request *req)
return B_OK; return B_OK;
} }
status_t google_request_open(const char *query_string, struct fs_nspace *ns, struct fs_node *query_node, struct google_request **req) status_t google_request_open(const char *query_string, struct fs_volume *volume, struct fs_node *query_node, struct google_request **req)
{ {
struct google_request *r; struct google_request *r;
if (!req) if (!req)
@ -207,7 +207,7 @@ status_t google_request_open(const char *query_string, struct fs_nspace *ns, str
return ENOMEM; return ENOMEM;
memset(r, 0, sizeof(struct google_request)); memset(r, 0, sizeof(struct google_request));
r->query_string = strdup(query_string); r->query_string = strdup(query_string);
r->ns = ns; r->volume = volume;
r->query_node = query_node; r->query_node = query_node;
*req = r; *req = r;
return B_OK; return B_OK;

View File

@ -7,7 +7,7 @@
struct google_request { struct google_request {
struct google_request *next; struct google_request *next;
struct fs_nspace *ns; struct fs_volume *volume;
struct fs_node *query_node; /* root folder for that query */ struct fs_node *query_node; /* root folder for that query */
char *query_string; char *query_string;
struct http_cnx *cnx; struct http_cnx *cnx;
@ -35,7 +35,7 @@ extern status_t google_request_uninit(void);
extern status_t google_request_process(struct google_request *req); extern status_t google_request_process(struct google_request *req);
extern status_t google_request_process_async(struct google_request *req); extern status_t google_request_process_async(struct google_request *req);
extern status_t google_request_close(struct google_request *req); extern status_t google_request_close(struct google_request *req);
extern status_t google_request_open(const char *query_string, struct fs_nspace *ns, struct fs_node *query_node, struct google_request **req); extern status_t google_request_open(const char *query_string, struct fs_volume *volume, struct fs_node *query_node, struct google_request **req);
extern status_t google_request_free(struct google_request *req); extern status_t google_request_free(struct google_request *req);
#endif /* _GOOGLE_REQUEST_H */ #endif /* _GOOGLE_REQUEST_H */

File diff suppressed because it is too large Load Diff

View File

@ -124,7 +124,7 @@ typedef struct fs_file_cookie fs_file_cookie;
#define fs_query_cookie fs_file_cookie #define fs_query_cookie fs_file_cookie
ino_t new_vnid(fs_nspace *ns); ino_t new_vnid(fs_nspace *ns);
int googlefs_free_vnode(fs_nspace *ns, fs_node *node); int googlefs_free_vnode(fs_volume *_volume, fs_node *node);
int googlefs_event(fs_nspace *ns, fs_node *node, int flags); int googlefs_event(fs_nspace *ns, fs_node *node, int flags);

View File

@ -5,6 +5,8 @@
#ifndef _HTTP_CNX_H #ifndef _HTTP_CNX_H
#define _HTTP_CNX_H #define _HTTP_CNX_H
#include <OS.h>
struct http_cnx { struct http_cnx {
int sock; int sock;
status_t err; /* 404, ... */ status_t err; /* 404, ... */

View File

@ -28,10 +28,7 @@ status_t vnidpool_alloc(struct vnidpool **pool, size_t size)
p = malloc(sizeof(struct vnidpool) + size / sizeof(BMT)); p = malloc(sizeof(struct vnidpool) + size / sizeof(BMT));
if (!p) if (!p)
return B_NO_MEMORY; return B_NO_MEMORY;
if (new_lock(&p->lock, "vnidpool lock") < B_OK) { new_lock(&p->lock, "vnidpool lock");
free(p);
return B_NO_MEMORY;
}
p->nextvnid = 1LL; p->nextvnid = 1LL;
p->bitmap = (BMT *)(p + 1); p->bitmap = (BMT *)(p + 1);
p->bmsize = size; p->bmsize = size;