From 4b2ca6b38eef60d44713a8e25f8c0324d08b8f86 Mon Sep 17 00:00:00 2001 From: Zebediah Figura Date: Mon, 18 May 2020 19:02:34 -0500 Subject: [PATCH] server-Object_Types: Fix a copy-paste error. Introduced in b74293fbfee7e8b01965db5cf3a0312467dc4c6e. Thanks to Paul Gofman for finding this. --- ...server-Register-types-during-startup.patch | 88 +++++++++---------- 1 file changed, 44 insertions(+), 44 deletions(-) diff --git a/patches/server-Object_Types/0003-server-Register-types-during-startup.patch b/patches/server-Object_Types/0003-server-Register-types-during-startup.patch index e4d12f7b..1905f8f1 100644 --- a/patches/server-Object_Types/0003-server-Register-types-during-startup.patch +++ b/patches/server-Object_Types/0003-server-Register-types-during-startup.patch @@ -1,7 +1,7 @@ -From 8c50f607d19234b421ecc5278cb007b45b1d4df2 Mon Sep 17 00:00:00 2001 +From 276db2921f3643686de6360d882c344fe86e6d99 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20M=C3=BCller?= Date: Wed, 8 Mar 2017 03:32:43 +0100 -Subject: server: Register types during startup. +Subject: [PATCH] server: Register types during startup. --- server/completion.c | 3 +-- @@ -26,7 +26,7 @@ Subject: server: Register types during startup. 19 files changed, 81 insertions(+), 40 deletions(-) diff --git a/server/completion.c b/server/completion.c -index 8b8983a1..b4c97b01 100644 +index db04727b93b..f8561172b70 100644 --- a/server/completion.c +++ b/server/completion.c @@ -109,8 +109,7 @@ static void completion_dump( struct object *obj, int verbose ) @@ -40,10 +40,10 @@ index 8b8983a1..b4c97b01 100644 } diff --git a/server/directory.c b/server/directory.c -index 6e22a741..65a77a89 100644 +index 28aec30304a..0a591ed6d9a 100644 --- a/server/directory.c +++ b/server/directory.c -@@ -119,8 +119,7 @@ static void object_type_dump( struct object *obj, int verbose ) +@@ -121,8 +121,7 @@ static void object_type_dump( struct object *obj, int verbose ) static struct object_type *object_type_get_type( struct object *obj ) { @@ -53,7 +53,7 @@ index 6e22a741..65a77a89 100644 return get_object_type( &str ); } -@@ -131,8 +130,7 @@ static void directory_dump( struct object *obj, int verbose ) +@@ -133,8 +132,7 @@ static void directory_dump( struct object *obj, int verbose ) static struct object_type *directory_get_type( struct object *obj ) { @@ -64,10 +64,10 @@ index 6e22a741..65a77a89 100644 } diff --git a/server/event.c b/server/event.c -index cfc0f6af..f30faa9b 100644 +index d339d85aa45..511a705648d 100644 --- a/server/event.c +++ b/server/event.c -@@ -159,8 +159,7 @@ static void event_dump( struct object *obj, int verbose ) +@@ -164,8 +164,7 @@ static void event_dump( struct object *obj, int verbose ) static struct object_type *event_get_type( struct object *obj ) { @@ -77,7 +77,7 @@ index cfc0f6af..f30faa9b 100644 return get_object_type( &str ); } -@@ -229,8 +228,7 @@ static void keyed_event_dump( struct object *obj, int verbose ) +@@ -240,8 +239,7 @@ static void keyed_event_dump( struct object *obj, int verbose ) static struct object_type *keyed_event_get_type( struct object *obj ) { @@ -88,10 +88,10 @@ index cfc0f6af..f30faa9b 100644 } diff --git a/server/file.c b/server/file.c -index 7ca650f9..61bbd846 100644 +index bce202138e0..d419da0db8a 100644 --- a/server/file.c +++ b/server/file.c -@@ -270,8 +270,7 @@ static void file_dump( struct object *obj, int verbose ) +@@ -281,8 +281,7 @@ static void file_dump( struct object *obj, int verbose ) struct object_type *file_get_type( struct object *obj ) { @@ -102,10 +102,10 @@ index 7ca650f9..61bbd846 100644 } diff --git a/server/mailslot.c b/server/mailslot.c -index 75a397db..6c998656 100644 +index 781e6f3141a..42350048877 100644 --- a/server/mailslot.c +++ b/server/mailslot.c -@@ -350,8 +350,7 @@ static void mailslot_device_dump( struct object *obj, int verbose ) +@@ -352,8 +352,7 @@ static void mailslot_device_dump( struct object *obj, int verbose ) static struct object_type *mailslot_device_get_type( struct object *obj ) { @@ -116,7 +116,7 @@ index 75a397db..6c998656 100644 } diff --git a/server/main.c b/server/main.c -index f984bfc1..9739e3ac 100644 +index 43297a3e93d..0a628c30e2d 100644 --- a/server/main.c +++ b/server/main.c @@ -146,6 +146,7 @@ int main( int argc, char *argv[] ) @@ -128,10 +128,10 @@ index f984bfc1..9739e3ac 100644 return 0; } diff --git a/server/mapping.c b/server/mapping.c -index 2a9c45ad..c3e99c86 100644 +index 2a2803404cc..24ab0f63e48 100644 --- a/server/mapping.c +++ b/server/mapping.c -@@ -970,8 +970,7 @@ static void mapping_dump( struct object *obj, int verbose ) +@@ -979,8 +979,7 @@ static void mapping_dump( struct object *obj, int verbose ) static struct object_type *mapping_get_type( struct object *obj ) { @@ -142,10 +142,10 @@ index 2a9c45ad..c3e99c86 100644 } diff --git a/server/mutex.c b/server/mutex.c -index d1887e4b..d458dc6f 100644 +index 8a8f7248eae..a7ac1759c52 100644 --- a/server/mutex.c +++ b/server/mutex.c -@@ -141,8 +141,7 @@ static void mutex_dump( struct object *obj, int verbose ) +@@ -142,8 +142,7 @@ static void mutex_dump( struct object *obj, int verbose ) static struct object_type *mutex_get_type( struct object *obj ) { @@ -156,10 +156,10 @@ index d1887e4b..d458dc6f 100644 } diff --git a/server/named_pipe.c b/server/named_pipe.c -index 101ff632..ceb1a6cb 100644 +index f97b1416415..46e68e9f037 100644 --- a/server/named_pipe.c +++ b/server/named_pipe.c -@@ -449,8 +449,7 @@ static void named_pipe_device_dump( struct object *obj, int verbose ) +@@ -455,8 +455,7 @@ static void named_pipe_device_dump( struct object *obj, int verbose ) static struct object_type *named_pipe_device_get_type( struct object *obj ) { @@ -170,10 +170,10 @@ index 101ff632..ceb1a6cb 100644 } diff --git a/server/object.c b/server/object.c -index 4455718a..8b4a8429 100644 +index dacfe1d71a0..150ab3734f7 100644 --- a/server/object.c +++ b/server/object.c -@@ -700,3 +700,39 @@ int no_close_handle( struct object *obj, struct process *process, obj_handle_t h +@@ -702,3 +702,39 @@ int no_close_handle( struct object *obj, struct process *process, obj_handle_t h void no_destroy( struct object *obj ) { } @@ -214,10 +214,10 @@ index 4455718a..8b4a8429 100644 + } +} diff --git a/server/object.h b/server/object.h -index b5c50e1c..f75ccc0c 100644 +index 3144eb56678..5cc593f5c52 100644 --- a/server/object.h +++ b/server/object.h -@@ -233,6 +233,30 @@ extern struct object_type *get_object_type( const struct unicode_str *name ); +@@ -239,6 +239,30 @@ extern struct object_type *get_object_type( const struct unicode_str *name ); extern int directory_link_name( struct object *obj, struct object_name *name, struct object *parent ); extern void init_directories(void); @@ -249,10 +249,10 @@ index b5c50e1c..f75ccc0c 100644 extern struct object *create_obj_symlink( struct object *root, const struct unicode_str *name, diff --git a/server/process.c b/server/process.c -index e24ac30c..d0307022 100644 +index 6722addb091..aded1da8901 100644 --- a/server/process.c +++ b/server/process.c -@@ -211,8 +211,7 @@ static struct job *get_job_obj( struct process *process, obj_handle_t handle, un +@@ -215,8 +215,7 @@ static struct job *get_job_obj( struct process *process, obj_handle_t handle, un static struct object_type *job_get_type( struct object *obj ) { @@ -262,21 +262,21 @@ index e24ac30c..d0307022 100644 return get_object_type( &str ); }; -@@ -634,8 +633,7 @@ static void process_dump( struct object *obj, int verbose ) +@@ -645,8 +644,7 @@ static void process_dump( struct object *obj, int verbose ) static struct object_type *process_get_type( struct object *obj ) { - static const WCHAR name[] = {'P','r','o','c','e','s','s'}; - static const struct unicode_str str = { name, sizeof(name) }; -+ static const struct unicode_str str = { type_Job, sizeof(type_Job) }; ++ static const struct unicode_str str = { type_Process, sizeof(type_Process) }; return get_object_type( &str ); } diff --git a/server/registry.c b/server/registry.c -index dffa3acf..d3f252fc 100644 +index dcbb3f791e1..08cb6faa31b 100644 --- a/server/registry.c +++ b/server/registry.c -@@ -305,8 +305,7 @@ static void key_dump( struct object *obj, int verbose ) +@@ -304,8 +304,7 @@ static void key_dump( struct object *obj, int verbose ) static struct object_type *key_get_type( struct object *obj ) { @@ -287,10 +287,10 @@ index dffa3acf..d3f252fc 100644 } diff --git a/server/semaphore.c b/server/semaphore.c -index 08ff1536..07010434 100644 +index 6e2415fd79a..33615047ec5 100644 --- a/server/semaphore.c +++ b/server/semaphore.c -@@ -127,8 +127,7 @@ static void semaphore_dump( struct object *obj, int verbose ) +@@ -128,8 +128,7 @@ static void semaphore_dump( struct object *obj, int verbose ) static struct object_type *semaphore_get_type( struct object *obj ) { @@ -301,10 +301,10 @@ index 08ff1536..07010434 100644 } diff --git a/server/symlink.c b/server/symlink.c -index 9199bc55..eaceee77 100644 +index e5ee09f015a..287432f692e 100644 --- a/server/symlink.c +++ b/server/symlink.c -@@ -86,8 +86,7 @@ static void symlink_dump( struct object *obj, int verbose ) +@@ -87,8 +87,7 @@ static void symlink_dump( struct object *obj, int verbose ) static struct object_type *symlink_get_type( struct object *obj ) { @@ -315,10 +315,10 @@ index 9199bc55..eaceee77 100644 } diff --git a/server/thread.c b/server/thread.c -index 45c45c6d..aa714e25 100644 +index 0226e744d7b..7fb902c9648 100644 --- a/server/thread.c +++ b/server/thread.c -@@ -373,8 +373,7 @@ static void dump_thread( struct object *obj, int verbose ) +@@ -454,8 +454,7 @@ static void dump_thread( struct object *obj, int verbose ) static struct object_type *thread_get_type( struct object *obj ) { @@ -329,10 +329,10 @@ index 45c45c6d..aa714e25 100644 } diff --git a/server/timer.c b/server/timer.c -index 3a786fb4..c2a9728a 100644 +index 6460acbf519..89b8d9bba33 100644 --- a/server/timer.c +++ b/server/timer.c -@@ -189,8 +189,7 @@ static void timer_dump( struct object *obj, int verbose ) +@@ -192,8 +192,7 @@ static void timer_dump( struct object *obj, int verbose ) static struct object_type *timer_get_type( struct object *obj ) { @@ -343,10 +343,10 @@ index 3a786fb4..c2a9728a 100644 } diff --git a/server/token.c b/server/token.c -index f236084b..a6cec249 100644 +index 2fa95e17aaf..aff6b31ef58 100644 --- a/server/token.c +++ b/server/token.c -@@ -172,8 +172,7 @@ static void token_dump( struct object *obj, int verbose ) +@@ -171,8 +171,7 @@ static void token_dump( struct object *obj, int verbose ) static struct object_type *token_get_type( struct object *obj ) { @@ -357,10 +357,10 @@ index f236084b..a6cec249 100644 } diff --git a/server/winstation.c b/server/winstation.c -index a0be0586..dbd091e2 100644 +index 43d112334d4..a26b33d8327 100644 --- a/server/winstation.c +++ b/server/winstation.c -@@ -141,8 +141,7 @@ static void winstation_dump( struct object *obj, int verbose ) +@@ -142,8 +142,7 @@ static void winstation_dump( struct object *obj, int verbose ) static struct object_type *winstation_get_type( struct object *obj ) { @@ -370,7 +370,7 @@ index a0be0586..dbd091e2 100644 return get_object_type( &str ); } -@@ -246,8 +245,7 @@ static void desktop_dump( struct object *obj, int verbose ) +@@ -247,8 +246,7 @@ static void desktop_dump( struct object *obj, int verbose ) static struct object_type *desktop_get_type( struct object *obj ) { @@ -381,5 +381,5 @@ index a0be0586..dbd091e2 100644 } -- -2.20.1 +2.26.2