Merge branch 'nfs4'

Conflicts:
	build/jam/HaikuImage
This commit is contained in:
Pawel Dziepak
2013-03-11 13:00:55 +01:00
90 changed files with 17325 additions and 11 deletions
+8
View File
@@ -242,6 +242,14 @@ struct fs_vnode_ops {
fs_vnode* _superVnode, ino_t* _nodeID);
status_t (*get_super_vnode)(fs_volume* volume, fs_vnode* vnode,
fs_volume* superVolume, fs_vnode* superVnode);
/* lock operations */
status_t (*test_lock)(fs_volume* volume, fs_vnode* vnode, void* cookie,
struct flock* lock);
status_t (*acquire_lock)(fs_volume* volume, fs_vnode* vnode, void* cookie,
const struct flock* lock, bool wait);
status_t (*release_lock)(fs_volume* volume, fs_vnode* vnode, void* cookie,
const struct flock* lock);
};
struct file_system_module_info {
+1
View File
@@ -269,6 +269,7 @@ _AVL_TREE_MAP_CLASS_NAME::MakeEmpty()
{
AVLTreeNode* root = fTree.Root();
_FreeTree(root);
fTree.MakeEmpty();
}
+58
View File
@@ -0,0 +1,58 @@
/*
* Copyright 2012 Haiku, Inc. All rights reserved.
* Distributed under the terms of the MIT License.
*
* Authors:
* Paweł Dziepak, pdziepak@quarnos.org
*/
#ifndef DNS_RESOLVER_H
#define DNS_RESOLVER_H
#include <netdb.h>
#include <stdlib.h>
#include <module.h>
#define DNS_RESOLVER_MODULE_NAME "network/dns_resolver/v1"
struct dns_resolver_module {
module_info module;
status_t (*getaddrinfo)(const char* node, const char* service,
const struct addrinfo* hints, struct addrinfo** res);
};
static inline int
kgetaddrinfo(const char* node, const char* service,
const struct addrinfo* hints, struct addrinfo** res)
{
dns_resolver_module* dns;
status_t result = get_module(DNS_RESOLVER_MODULE_NAME,
reinterpret_cast<module_info**>(&dns));
if (result != B_OK)
return result;
result = dns->getaddrinfo(node, service, hints, res);
put_module(DNS_RESOLVER_MODULE_NAME);
return result;
}
static inline void
kfreeaddrinfo(struct addrinfo* res)
{
free(res);
}
#define getaddrinfo kgetaddrinfo
#define freeaddrinfo kfreeaddrinfo
#endif // DNS_RESOLVER_H