Changed fd operations to take a struct fd instead of a struct object.
Removed get_file_info function from object operations.
Added get_device_id request to avoid abusing get_file_info.
diff --git a/server/registry.c b/server/registry.c
index 5b75b50..2262f59 100644
--- a/server/registry.c
+++ b/server/registry.c
@@ -169,7 +169,6 @@
NULL, /* signaled */
NULL, /* satisfied */
no_get_fd, /* get_fd */
- no_get_file_info, /* get_file_info */
key_destroy /* destroy */
};
@@ -1446,12 +1445,12 @@
/* load a part of the registry from a file */
static void load_registry( struct key *key, obj_handle_t handle )
{
- struct object *obj;
+ struct file *file;
int fd;
- if (!(obj = get_handle_obj( current->process, handle, GENERIC_READ, NULL ))) return;
- fd = dup( get_unix_fd( obj ) );
- release_object( obj );
+ if (!(file = get_file_obj( current->process, handle, GENERIC_READ ))) return;
+ fd = dup( get_file_unix_fd( file ) );
+ release_object( file );
if (fd != -1)
{
FILE *f = fdopen( fd, "r" );
@@ -1536,7 +1535,7 @@
/* save a registry branch to a file handle */
static void save_registry( struct key *key, obj_handle_t handle )
{
- struct object *obj;
+ struct file *file;
int fd;
if (key->flags & KEY_DELETED)
@@ -1544,9 +1543,9 @@
set_error( STATUS_KEY_DELETED );
return;
}
- if (!(obj = get_handle_obj( current->process, handle, GENERIC_WRITE, NULL ))) return;
- fd = dup( get_unix_fd( obj ) );
- release_object( obj );
+ if (!(file = get_file_obj( current->process, handle, GENERIC_WRITE ))) return;
+ fd = dup( get_file_unix_fd( file ) );
+ release_object( file );
if (fd != -1)
{
FILE *f = fdopen( fd, "w" );