Rebase against c698682b3286d72cc7c4c4624b4d14b03dbe6908.

This commit is contained in:
Zebediah Figura
2018-08-18 11:37:45 -05:00
parent 93e4c328d7
commit c58c70e961
12 changed files with 223 additions and 2244 deletions

View File

@@ -1,4 +1,4 @@
From 1544a5022eee2874dcf492fc9c863ce21344a572 Mon Sep 17 00:00:00 2001
From 18631bae9b0750d47ce23a4164e49b7ae1f3fe31 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Fri, 4 Dec 2015 10:36:47 +0100
Subject: server: Introduce a new alloc_handle object callback. (v2)
@@ -42,7 +42,7 @@ Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
34 files changed, 75 insertions(+), 3 deletions(-)
diff --git a/server/async.c b/server/async.c
index cf7a434ebca..9c7b9943975 100644
index adbadc5..7f7b255 100644
--- a/server/async.c
+++ b/server/async.c
@@ -78,6 +78,7 @@ static const struct object_ops async_ops =
@@ -53,7 +53,7 @@ index cf7a434ebca..9c7b9943975 100644
no_close_handle, /* close_handle */
async_destroy /* destroy */
};
@@ -459,6 +460,7 @@ static const struct object_ops iosb_ops =
@@ -461,6 +462,7 @@ static const struct object_ops iosb_ops =
no_link_name, /* link_name */
NULL, /* unlink_name */
no_open_file, /* open_file */
@@ -62,7 +62,7 @@ index cf7a434ebca..9c7b9943975 100644
iosb_destroy /* destroy */
};
diff --git a/server/atom.c b/server/atom.c
index 3ff75407d9f..7bebf136a21 100644
index 3ff7540..7bebf13 100644
--- a/server/atom.c
+++ b/server/atom.c
@@ -90,6 +90,7 @@ static const struct object_ops atom_table_ops =
@@ -74,7 +74,7 @@ index 3ff75407d9f..7bebf136a21 100644
atom_table_destroy /* destroy */
};
diff --git a/server/change.c b/server/change.c
index c5c88da58dd..49d577a44de 100644
index 1f2f7c5..441c510 100644
--- a/server/change.c
+++ b/server/change.c
@@ -172,6 +172,7 @@ static const struct object_ops dir_ops =
@@ -86,7 +86,7 @@ index c5c88da58dd..49d577a44de 100644
dir_destroy /* destroy */
};
diff --git a/server/clipboard.c b/server/clipboard.c
index 160eb46959d..70b7e325380 100644
index 160eb46..70b7e32 100644
--- a/server/clipboard.c
+++ b/server/clipboard.c
@@ -87,6 +87,7 @@ static const struct object_ops clipboard_ops =
@@ -98,7 +98,7 @@ index 160eb46959d..70b7e325380 100644
clipboard_destroy /* destroy */
};
diff --git a/server/completion.c b/server/completion.c
index 8b8983a157f..72dbc5b821f 100644
index 8b8983a..72dbc5b 100644
--- a/server/completion.c
+++ b/server/completion.c
@@ -75,6 +75,7 @@ static const struct object_ops completion_ops =
@@ -110,7 +110,7 @@ index 8b8983a157f..72dbc5b821f 100644
completion_destroy /* destroy */
};
diff --git a/server/console.c b/server/console.c
index cb6410b7741..89909c3569a 100644
index e1ae086..d9c60f9 100644
--- a/server/console.c
+++ b/server/console.c
@@ -87,6 +87,7 @@ static const struct object_ops console_input_ops =
@@ -138,7 +138,7 @@ index cb6410b7741..89909c3569a 100644
screen_buffer_destroy /* destroy */
};
diff --git a/server/debugger.c b/server/debugger.c
index 79b7e527f33..d658fc0625f 100644
index 79b7e52..d658fc0 100644
--- a/server/debugger.c
+++ b/server/debugger.c
@@ -84,6 +84,7 @@ static const struct object_ops debug_event_ops =
@@ -158,7 +158,7 @@ index 79b7e527f33..d658fc0625f 100644
debug_ctx_destroy /* destroy */
};
diff --git a/server/device.c b/server/device.c
index 90a4b6e8eec..4bb29d897e5 100644
index dcc2946..47fe000 100644
--- a/server/device.c
+++ b/server/device.c
@@ -75,6 +75,7 @@ static const struct object_ops irp_call_ops =
@@ -194,7 +194,7 @@ index 90a4b6e8eec..4bb29d897e5 100644
device_file_destroy /* destroy */
};
diff --git a/server/directory.c b/server/directory.c
index 7ffaedc4623..d903ff283c0 100644
index 7ffaedc..d903ff2 100644
--- a/server/directory.c
+++ b/server/directory.c
@@ -67,6 +67,7 @@ static const struct object_ops object_type_ops =
@@ -214,7 +214,7 @@ index 7ffaedc4623..d903ff283c0 100644
directory_destroy /* destroy */
};
diff --git a/server/event.c b/server/event.c
index cfc0f6afc0d..608fafb94d7 100644
index cfc0f6a..608fafb 100644
--- a/server/event.c
+++ b/server/event.c
@@ -68,6 +68,7 @@ static const struct object_ops event_ops =
@@ -234,7 +234,7 @@ index cfc0f6afc0d..608fafb94d7 100644
no_destroy /* destroy */
};
diff --git a/server/fd.c b/server/fd.c
index fa2b18a46b1..9dbf481259c 100644
index 6118f52..9dc953f 100644
--- a/server/fd.c
+++ b/server/fd.c
@@ -217,6 +217,7 @@ static const struct object_ops fd_ops =
@@ -270,7 +270,7 @@ index fa2b18a46b1..9dbf481259c 100644
no_destroy /* destroy */
};
diff --git a/server/file.c b/server/file.c
index 6c036acb641..a7d8f95d972 100644
index 446621a..cbfc257 100644
--- a/server/file.c
+++ b/server/file.c
@@ -95,6 +95,7 @@ static const struct object_ops file_ops =
@@ -282,7 +282,7 @@ index 6c036acb641..a7d8f95d972 100644
file_destroy /* destroy */
};
diff --git a/server/handle.c b/server/handle.c
index 35ab8607c85..782baefaaa0 100644
index 35ab860..782baef 100644
--- a/server/handle.c
+++ b/server/handle.c
@@ -133,6 +133,7 @@ static const struct object_ops handle_table_ops =
@@ -327,7 +327,7 @@ index 35ab8607c85..782baefaaa0 100644
}
}
diff --git a/server/hook.c b/server/hook.c
index 3a0e4b4d1d3..dc653b8c42e 100644
index 3a0e4b4..dc653b8 100644
--- a/server/hook.c
+++ b/server/hook.c
@@ -91,6 +91,7 @@ static const struct object_ops hook_table_ops =
@@ -339,7 +339,7 @@ index 3a0e4b4d1d3..dc653b8c42e 100644
hook_table_destroy /* destroy */
};
diff --git a/server/mailslot.c b/server/mailslot.c
index 9fafedbd204..531c9928e2f 100644
index f4c7007..bc169dd 100644
--- a/server/mailslot.c
+++ b/server/mailslot.c
@@ -89,6 +89,7 @@ static const struct object_ops mailslot_ops =
@@ -350,7 +350,7 @@ index 9fafedbd204..531c9928e2f 100644
fd_close_handle, /* close_handle */
mailslot_destroy /* destroy */
};
@@ -144,6 +145,7 @@ static const struct object_ops mail_writer_ops =
@@ -145,6 +146,7 @@ static const struct object_ops mail_writer_ops =
no_link_name, /* link_name */
NULL, /* unlink_name */
no_open_file, /* open_file */
@@ -358,7 +358,7 @@ index 9fafedbd204..531c9928e2f 100644
fd_close_handle, /* close_handle */
mail_writer_destroy /* destroy */
};
@@ -200,6 +202,7 @@ static const struct object_ops mailslot_device_ops =
@@ -202,6 +204,7 @@ static const struct object_ops mailslot_device_ops =
directory_link_name, /* link_name */
default_unlink_name, /* unlink_name */
mailslot_device_open_file, /* open_file */
@@ -367,7 +367,7 @@ index 9fafedbd204..531c9928e2f 100644
mailslot_device_destroy /* destroy */
};
diff --git a/server/mapping.c b/server/mapping.c
index f9f50edfa60..095cb03d7fb 100644
index 1ed8c9d..8bfaa8e 100644
--- a/server/mapping.c
+++ b/server/mapping.c
@@ -77,6 +77,7 @@ static const struct object_ops ranges_ops =
@@ -386,7 +386,7 @@ index f9f50edfa60..095cb03d7fb 100644
no_close_handle, /* close_handle */
shared_map_destroy /* destroy */
};
@@ -167,6 +169,7 @@ static const struct object_ops mapping_ops =
@@ -166,6 +168,7 @@ static const struct object_ops mapping_ops =
directory_link_name, /* link_name */
default_unlink_name, /* unlink_name */
no_open_file, /* open_file */
@@ -395,7 +395,7 @@ index f9f50edfa60..095cb03d7fb 100644
mapping_destroy /* destroy */
};
diff --git a/server/mutex.c b/server/mutex.c
index d1887e4bc45..a2a0a24bdc3 100644
index d1887e4..a2a0a24 100644
--- a/server/mutex.c
+++ b/server/mutex.c
@@ -71,6 +71,7 @@ static const struct object_ops mutex_ops =
@@ -407,10 +407,10 @@ index d1887e4bc45..a2a0a24bdc3 100644
mutex_destroy /* destroy */
};
diff --git a/server/named_pipe.c b/server/named_pipe.c
index 6f5b3b0bbd5..d7f8a583c92 100644
index ba6f507..215c838 100644
--- a/server/named_pipe.c
+++ b/server/named_pipe.c
@@ -136,6 +136,7 @@ static const struct object_ops named_pipe_ops =
@@ -128,6 +128,7 @@ static const struct object_ops named_pipe_ops =
named_pipe_link_name, /* link_name */
default_unlink_name, /* unlink_name */
named_pipe_open_file, /* open_file */
@@ -418,7 +418,7 @@ index 6f5b3b0bbd5..d7f8a583c92 100644
no_close_handle, /* close_handle */
named_pipe_destroy /* destroy */
};
@@ -173,6 +174,7 @@ static const struct object_ops pipe_server_ops =
@@ -169,6 +170,7 @@ static const struct object_ops pipe_server_ops =
no_link_name, /* link_name */
NULL, /* unlink_name */
no_open_file, /* open_file */
@@ -426,15 +426,15 @@ index 6f5b3b0bbd5..d7f8a583c92 100644
fd_close_handle, /* close_handle */
pipe_server_destroy /* destroy */
};
@@ -216,6 +218,7 @@ static const struct object_ops pipe_client_ops =
@@ -210,6 +212,7 @@ static const struct object_ops pipe_client_ops =
no_link_name, /* link_name */
NULL, /* unlink_name */
no_open_file, /* open_file */
+ no_alloc_handle, /* alloc_handle */
fd_close_handle, /* close_handle */
pipe_client_destroy /* destroy */
pipe_end_destroy /* destroy */
};
@@ -263,6 +266,7 @@ static const struct object_ops named_pipe_device_ops =
@@ -258,6 +261,7 @@ static const struct object_ops named_pipe_device_ops =
directory_link_name, /* link_name */
default_unlink_name, /* unlink_name */
named_pipe_device_open_file, /* open_file */
@@ -443,7 +443,7 @@ index 6f5b3b0bbd5..d7f8a583c92 100644
named_pipe_device_destroy /* destroy */
};
diff --git a/server/object.c b/server/object.c
index 4455718aac3..14cd38e6f7e 100644
index 4455718..14cd38e 100644
--- a/server/object.c
+++ b/server/object.c
@@ -692,6 +692,10 @@ struct object *no_open_file( struct object *obj, unsigned int access, unsigned i
@@ -458,7 +458,7 @@ index 4455718aac3..14cd38e6f7e 100644
{
return 1; /* ok to close */
diff --git a/server/object.h b/server/object.h
index b5c50e1cee8..72ad8528c5a 100644
index b5c50e1..72ad852 100644
--- a/server/object.h
+++ b/server/object.h
@@ -89,8 +89,10 @@ struct object_ops
@@ -482,7 +482,7 @@ index b5c50e1cee8..72ad8528c5a 100644
extern void no_destroy( struct object *obj );
#ifdef DEBUG_OBJECTS
diff --git a/server/process.c b/server/process.c
index f8739d00b64..c269b50c313 100644
index f8739d0..c269b50 100644
--- a/server/process.c
+++ b/server/process.c
@@ -84,6 +84,7 @@ static const struct object_ops process_ops =
@@ -510,7 +510,7 @@ index f8739d00b64..c269b50c313 100644
job_destroy /* destroy */
};
diff --git a/server/queue.c b/server/queue.c
index c479b388bd6..382f14f12d1 100644
index c479b38..382f14f 100644
--- a/server/queue.c
+++ b/server/queue.c
@@ -181,6 +181,7 @@ static const struct object_ops msg_queue_ops =
@@ -530,7 +530,7 @@ index c479b388bd6..382f14f12d1 100644
thread_input_destroy /* destroy */
};
diff --git a/server/registry.c b/server/registry.c
index 734a1115b21..6294aa36f03 100644
index 8ad97d4..50b6a0b 100644
--- a/server/registry.c
+++ b/server/registry.c
@@ -170,6 +170,7 @@ static const struct object_ops key_ops =
@@ -542,7 +542,7 @@ index 734a1115b21..6294aa36f03 100644
key_destroy /* destroy */
};
diff --git a/server/request.c b/server/request.c
index 6120bc550ff..83e608917f8 100644
index 6120bc5..83e6089 100644
--- a/server/request.c
+++ b/server/request.c
@@ -107,6 +107,7 @@ static const struct object_ops master_socket_ops =
@@ -554,7 +554,7 @@ index 6120bc550ff..83e608917f8 100644
master_socket_destroy /* destroy */
};
diff --git a/server/semaphore.c b/server/semaphore.c
index 08ff1536cee..15e73925131 100644
index 08ff153..15e7392 100644
--- a/server/semaphore.c
+++ b/server/semaphore.c
@@ -68,6 +68,7 @@ static const struct object_ops semaphore_ops =
@@ -566,7 +566,7 @@ index 08ff1536cee..15e73925131 100644
no_destroy /* destroy */
};
diff --git a/server/serial.c b/server/serial.c
index f7aaebbaf69..94b29c4eef2 100644
index bb976a1..089f47c 100644
--- a/server/serial.c
+++ b/server/serial.c
@@ -102,6 +102,7 @@ static const struct object_ops serial_ops =
@@ -578,7 +578,7 @@ index f7aaebbaf69..94b29c4eef2 100644
serial_destroy /* destroy */
};
diff --git a/server/signal.c b/server/signal.c
index 74416fab7be..4b2b8c4a15e 100644
index 74416fa..4b2b8c4 100644
--- a/server/signal.c
+++ b/server/signal.c
@@ -77,6 +77,7 @@ static const struct object_ops handler_ops =
@@ -590,7 +590,7 @@ index 74416fab7be..4b2b8c4a15e 100644
handler_destroy /* destroy */
};
diff --git a/server/snapshot.c b/server/snapshot.c
index e35588a136c..6e788abde1c 100644
index e35588a..6e788ab 100644
--- a/server/snapshot.c
+++ b/server/snapshot.c
@@ -71,6 +71,7 @@ static const struct object_ops snapshot_ops =
@@ -602,7 +602,7 @@ index e35588a136c..6e788abde1c 100644
snapshot_destroy /* destroy */
};
diff --git a/server/sock.c b/server/sock.c
index 1e126182190..0707515be00 100644
index 84f54f6..43456f0 100644
--- a/server/sock.c
+++ b/server/sock.c
@@ -155,6 +155,7 @@ static const struct object_ops sock_ops =
@@ -613,7 +613,7 @@ index 1e126182190..0707515be00 100644
fd_close_handle, /* close_handle */
sock_destroy /* destroy */
};
@@ -979,6 +980,7 @@ static const struct object_ops ifchange_ops =
@@ -980,6 +981,7 @@ static const struct object_ops ifchange_ops =
no_link_name, /* link_name */
NULL, /* unlink_name */
no_open_file, /* open_file */
@@ -622,7 +622,7 @@ index 1e126182190..0707515be00 100644
ifchange_destroy /* destroy */
};
diff --git a/server/symlink.c b/server/symlink.c
index 9199bc559d7..ecc0e4300c4 100644
index 9199bc5..ecc0e43 100644
--- a/server/symlink.c
+++ b/server/symlink.c
@@ -70,6 +70,7 @@ static const struct object_ops symlink_ops =
@@ -634,7 +634,7 @@ index 9199bc559d7..ecc0e4300c4 100644
symlink_destroy /* destroy */
};
diff --git a/server/thread.c b/server/thread.c
index 2c864a607d0..a641509d601 100644
index 2cf5054..30ef3d2 100644
--- a/server/thread.c
+++ b/server/thread.c
@@ -120,6 +120,7 @@ static const struct object_ops thread_apc_ops =
@@ -654,7 +654,7 @@ index 2c864a607d0..a641509d601 100644
destroy_thread /* destroy */
};
diff --git a/server/timer.c b/server/timer.c
index c8b4fa8194c..23c613b3cbd 100644
index 3a786fb..95df28f 100644
--- a/server/timer.c
+++ b/server/timer.c
@@ -75,6 +75,7 @@ static const struct object_ops timer_ops =
@@ -666,10 +666,10 @@ index c8b4fa8194c..23c613b3cbd 100644
timer_destroy /* destroy */
};
diff --git a/server/token.c b/server/token.c
index 532d7b74059..63e9833fc88 100644
index 0810a61..e51dccc 100644
--- a/server/token.c
+++ b/server/token.c
@@ -163,6 +163,7 @@ static const struct object_ops token_ops =
@@ -155,6 +155,7 @@ static const struct object_ops token_ops =
no_link_name, /* link_name */
NULL, /* unlink_name */
no_open_file, /* open_file */
@@ -678,7 +678,7 @@ index 532d7b74059..63e9833fc88 100644
token_destroy /* destroy */
};
diff --git a/server/winstation.c b/server/winstation.c
index a0be0586523..5f96be8e13f 100644
index a0be058..5f96be8 100644
--- a/server/winstation.c
+++ b/server/winstation.c
@@ -75,6 +75,7 @@ static const struct object_ops winstation_ops =
@@ -698,5 +698,5 @@ index a0be0586523..5f96be8e13f 100644
desktop_destroy /* destroy */
};
--
2.14.1
2.7.4