You've already forked wine-staging
mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-04-13 14:42:51 -07:00
Compare commits
16 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
dc3b4e6589 | ||
|
75367a75f2 | ||
|
b2ca294530 | ||
|
dd067c0b0d | ||
|
aa9b8391c0 | ||
|
ef52b15ad6 | ||
|
ff18b9b26e | ||
|
40467ae481 | ||
|
2ec2518486 | ||
|
0525ea8268 | ||
|
5058934ac1 | ||
|
be51ecf5c2 | ||
|
bd28d7c328 | ||
|
c11c25e285 | ||
|
ddfbad3af6 | ||
|
71f018ba21 |
@@ -1,40 +0,0 @@
|
||||
From eb21fcc668da85977bc86b6105f3830cb26c93e6 Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Tue, 8 Jun 2021 08:56:40 +1000
|
||||
Subject: [PATCH] bcrypt: Stop compile error when HAVE_GNUTLS_CIPHER_INIT not
|
||||
defined
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
In file included from dlls/bcrypt/gnutls.c:1916:
|
||||
include/windef.h:112:24: error: unknown type name ‘va_list’
|
||||
112 | # define __ms_va_list va_list
|
||||
| ^~~~~~~
|
||||
include/winbase.h:2076:84: note: in expansion of macro ‘__ms_va_list’
|
||||
2076 | WINBASEAPI DWORD WINAPI FormatMessageA(DWORD,LPCVOID,DWORD,DWORD,LPSTR,DWORD,__ms_va_list*);
|
||||
|
||||
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
---
|
||||
dlls/bcrypt/gnutls.c | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/bcrypt/gnutls.c b/dlls/bcrypt/gnutls.c
|
||||
index d7b4499c692..11596d5f7ac 100644
|
||||
--- a/dlls/bcrypt/gnutls.c
|
||||
+++ b/dlls/bcrypt/gnutls.c
|
||||
@@ -24,9 +24,10 @@
|
||||
|
||||
#include "config.h"
|
||||
|
||||
+#include <stdarg.h>
|
||||
+
|
||||
#ifdef HAVE_GNUTLS_CIPHER_INIT
|
||||
|
||||
-#include <stdarg.h>
|
||||
#include <stdlib.h>
|
||||
#include <assert.h>
|
||||
#include <sys/types.h>
|
||||
--
|
||||
2.33.0
|
||||
|
@@ -1,375 +0,0 @@
|
||||
From 0ba05ea85f8f2de3c802083340eb3a9ee8df209e Mon Sep 17 00:00:00 2001
|
||||
From: Christian Costa <titan.costa@gmail.com>
|
||||
Date: Sat, 13 Feb 2016 15:29:37 +0100
|
||||
Subject: [PATCH] d3dx9_36: Implement D3DXDisassembleShader. (v2)
|
||||
|
||||
Changes in v2 (by Christian Costa):
|
||||
* More generic code for D3DXDisassembleShader.
|
||||
---
|
||||
dlls/d3dx9_36/shader.c | 335 ++++++++++++++++++++++++++++++++++++++++-
|
||||
1 file changed, 329 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/dlls/d3dx9_36/shader.c b/dlls/d3dx9_36/shader.c
|
||||
index 1aa75d64dc5..d98345e2288 100644
|
||||
--- a/dlls/d3dx9_36/shader.c
|
||||
+++ b/dlls/d3dx9_36/shader.c
|
||||
@@ -1,6 +1,7 @@
|
||||
/*
|
||||
* Copyright 2008 Luis Busquets
|
||||
* Copyright 2009 Matteo Bruni
|
||||
+ * Copyright 2010, 2013, 2016 Christian Costa
|
||||
* Copyright 2011 Travis Athougies
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
@@ -19,6 +20,7 @@
|
||||
*/
|
||||
|
||||
#include <assert.h>
|
||||
+#include <stdio.h>
|
||||
|
||||
#include "d3dx9_private.h"
|
||||
#include "d3dcommon.h"
|
||||
@@ -2347,13 +2349,334 @@ HRESULT WINAPI D3DXGetShaderSamplers(const DWORD *byte_code, const char **sample
|
||||
return D3D_OK;
|
||||
}
|
||||
|
||||
-HRESULT WINAPI D3DXDisassembleShader(const DWORD *shader, BOOL colorcode, const char *comments,
|
||||
- ID3DXBuffer **buffer)
|
||||
-{
|
||||
- TRACE("shader %p, colorcode %d, comments %s, buffer %p.\n", shader, colorcode, debugstr_a(comments), buffer);
|
||||
+static const char *decl_usage[] = { "position", "blendweight", "blendindices", "normal", "psize", "texcoord",
|
||||
+ "tangent", "binormal", "tessfactor", "positiont", "color" };
|
||||
|
||||
- return D3DDisassemble(shader, D3DXGetShaderSize(shader), colorcode ? D3D_DISASM_ENABLE_COLOR_CODE : 0,
|
||||
- comments, (ID3DBlob **)buffer);
|
||||
+static const char *tex_type[] = { "", "1d", "2d", "cube", "volume" };
|
||||
+
|
||||
+static int add_modifier(char *buffer, DWORD param)
|
||||
+{
|
||||
+ char *buf = buffer;
|
||||
+ DWORD dst_mod = param & D3DSP_DSTMOD_MASK;
|
||||
+
|
||||
+ if (dst_mod & D3DSPDM_SATURATE)
|
||||
+ buf += sprintf(buf, "_sat");
|
||||
+ if (dst_mod & D3DSPDM_PARTIALPRECISION)
|
||||
+ buf += sprintf(buf, "_pp");
|
||||
+ if (dst_mod & D3DSPDM_MSAMPCENTROID)
|
||||
+ buf += sprintf(buf, "_centroid");
|
||||
+
|
||||
+ return buf - buffer;
|
||||
+}
|
||||
+
|
||||
+static int add_register(char *buffer, DWORD param, BOOL dst, BOOL ps)
|
||||
+{
|
||||
+ char *buf = buffer;
|
||||
+ DWORD reg_type = ((param & D3DSP_REGTYPE_MASK2) >> D3DSP_REGTYPE_SHIFT2)
|
||||
+ | ((param & D3DSP_REGTYPE_MASK) >> D3DSP_REGTYPE_SHIFT);
|
||||
+ DWORD reg_num = param & D3DSP_REGNUM_MASK;
|
||||
+
|
||||
+ if (reg_type == D3DSPR_INPUT)
|
||||
+ buf += sprintf(buf, "v%d", reg_num);
|
||||
+ else if (reg_type == D3DSPR_CONST)
|
||||
+ buf += sprintf(buf, "c%d", reg_num);
|
||||
+ else if (reg_type == D3DSPR_TEMP)
|
||||
+ buf += sprintf(buf, "r%d", reg_num);
|
||||
+ else if (reg_type == D3DSPR_ADDR)
|
||||
+ buf += sprintf(buf, "%s%d", ps ? "t" : "a", reg_num);
|
||||
+ else if (reg_type == D3DSPR_SAMPLER)
|
||||
+ buf += sprintf(buf, "s%d", reg_num);
|
||||
+ else if (reg_type == D3DSPR_RASTOUT)
|
||||
+ buf += sprintf(buf, "oPos");
|
||||
+ else if (reg_type == D3DSPR_COLOROUT)
|
||||
+ buf += sprintf(buf, "oC%d", reg_num);
|
||||
+ else if (reg_type == D3DSPR_TEXCRDOUT)
|
||||
+ buf += sprintf(buf, "oT%d", reg_num);
|
||||
+ else if (reg_type == D3DSPR_ATTROUT)
|
||||
+ buf += sprintf(buf, "oD%d", reg_num);
|
||||
+ else
|
||||
+ buf += sprintf(buf, "? (%d)", reg_type);
|
||||
+
|
||||
+ if (dst)
|
||||
+ {
|
||||
+ if ((param & D3DSP_WRITEMASK_ALL) != D3DSP_WRITEMASK_ALL)
|
||||
+ {
|
||||
+ buf += sprintf(buf, ".%s%s%s%s", param & D3DSP_WRITEMASK_0 ? "x" : "",
|
||||
+ param & D3DSP_WRITEMASK_1 ? "y" : "",
|
||||
+ param & D3DSP_WRITEMASK_2 ? "z" : "",
|
||||
+ param & D3DSP_WRITEMASK_3 ? "w" : "");
|
||||
+ }
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ if ((param & D3DVS_SWIZZLE_MASK) != D3DVS_NOSWIZZLE)
|
||||
+ {
|
||||
+ if ( ((param & D3DSP_SWIZZLE_MASK) == (D3DVS_X_X | D3DVS_Y_X | D3DVS_Z_X | D3DVS_W_X)) ||
|
||||
+ ((param & D3DSP_SWIZZLE_MASK) == (D3DVS_X_Y | D3DVS_Y_Y | D3DVS_Z_Y | D3DVS_W_Y)) ||
|
||||
+ ((param & D3DSP_SWIZZLE_MASK) == (D3DVS_X_Z | D3DVS_Y_Z | D3DVS_Z_Z | D3DVS_W_Z)) ||
|
||||
+ ((param & D3DSP_SWIZZLE_MASK) == (D3DVS_X_W | D3DVS_Y_W | D3DVS_Z_W | D3DVS_W_W)) )
|
||||
+ buf += sprintf(buf, ".%c", 'w' + (((param >> D3DVS_SWIZZLE_SHIFT) + 1) & 0x3));
|
||||
+ else
|
||||
+ buf += sprintf(buf, ".%c%c%c%c", 'w' + (((param >> (D3DVS_SWIZZLE_SHIFT+0)) + 1) & 0x3),
|
||||
+ 'w' + (((param >> (D3DVS_SWIZZLE_SHIFT+2)) + 1) & 0x3),
|
||||
+ 'w' + (((param >> (D3DVS_SWIZZLE_SHIFT+4)) + 1) & 0x3),
|
||||
+ 'w' + (((param >> (D3DVS_SWIZZLE_SHIFT+6)) + 1) & 0x3));
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ return buf - buffer;
|
||||
+}
|
||||
+
|
||||
+struct instr_info
|
||||
+{
|
||||
+ DWORD opcode;
|
||||
+ const char *name;
|
||||
+ int length;
|
||||
+ int (*function)(const struct instr_info *info, DWORD **ptr, char *buffer, BOOL ps);
|
||||
+ WORD min_version;
|
||||
+ WORD max_version;
|
||||
+};
|
||||
+
|
||||
+static int instr_comment(const struct instr_info *info, DWORD **ptr, char *buffer, BOOL ps)
|
||||
+{
|
||||
+ *ptr += 1 + ((**ptr & D3DSI_COMMENTSIZE_MASK) >> D3DSI_COMMENTSIZE_SHIFT);
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int instr_def(const struct instr_info *info, DWORD **ptr, char *buffer, BOOL ps)
|
||||
+{
|
||||
+ int len = sprintf(buffer, " def c%d, %g, %g, %g, %g\n", *(*ptr+1) & D3DSP_REGNUM_MASK,
|
||||
+ (double)*(float*)(*ptr+2), (double)*(float*)(*ptr+3),
|
||||
+ (double)*(float*)(*ptr+4), (double)*(float*)(*ptr+5));
|
||||
+ *ptr += 6;
|
||||
+ return len;
|
||||
+}
|
||||
+
|
||||
+static int instr_dcl(const struct instr_info *info, DWORD **ptr, char *buffer, BOOL ps)
|
||||
+{
|
||||
+ DWORD param1 = *++*ptr;
|
||||
+ DWORD param2 = *++*ptr;
|
||||
+ DWORD usage = (param1 & D3DSP_DCL_USAGE_MASK) >> D3DSP_DCL_USAGE_SHIFT;
|
||||
+ DWORD usage_index = (param1 & D3DSP_DCL_USAGEINDEX_MASK) >> D3DSP_DCL_USAGEINDEX_SHIFT;
|
||||
+ char *buf = buffer;
|
||||
+
|
||||
+ buf += sprintf(buf, " dcl");
|
||||
+ if (ps)
|
||||
+ {
|
||||
+ if (param1 & D3DSP_TEXTURETYPE_MASK)
|
||||
+ buf += sprintf(buf, "_%s", (usage <= D3DSTT_VOLUME) ?
|
||||
+ tex_type[(param1 & D3DSP_TEXTURETYPE_MASK) >> D3DSP_TEXTURETYPE_SHIFT] : "???");
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ buf += sprintf(buf, "_%s", (usage <= D3DDECLUSAGE_COLOR) ? decl_usage[usage] : "???");
|
||||
+ if (usage_index)
|
||||
+ buf += sprintf(buf, "%d", usage_index);
|
||||
+ }
|
||||
+
|
||||
+ buf += add_modifier(buf, param2);
|
||||
+ buf += sprintf(buf, " ");
|
||||
+ buf += add_register(buf, param2, TRUE, TRUE);
|
||||
+ buf += sprintf(buf, "\n");
|
||||
+ (*ptr)++;
|
||||
+ return buf - buffer;
|
||||
+}
|
||||
+
|
||||
+static int instr_generic(const struct instr_info *info, DWORD **ptr, char *buffer, BOOL ps)
|
||||
+{
|
||||
+ char *buf = buffer;
|
||||
+ int j;
|
||||
+
|
||||
+ buf += sprintf(buf, " %s", info->name);
|
||||
+ (*ptr)++;
|
||||
+
|
||||
+ if (info->length)
|
||||
+ {
|
||||
+ buf += add_modifier(buf, **ptr);
|
||||
+
|
||||
+ for (j = 0; j < info->length; j++)
|
||||
+ {
|
||||
+ buf += sprintf(buf, "%s ", j ? "," : "");
|
||||
+
|
||||
+ if ((j != 0) && ((**ptr & D3DSP_SRCMOD_MASK) != D3DSPSM_NONE))
|
||||
+ {
|
||||
+ if ((**ptr & D3DSP_SRCMOD_MASK) == D3DSPSM_NEG)
|
||||
+ buf += sprintf(buf, "-");
|
||||
+ else
|
||||
+ buf += sprintf(buf, "*");
|
||||
+ }
|
||||
+
|
||||
+ buf += add_register(buf, **ptr, j == 0, ps);
|
||||
+
|
||||
+ if (*(*ptr)++ & D3DVS_ADDRESSMODE_MASK)
|
||||
+ {
|
||||
+ buf += sprintf(buf, "[");
|
||||
+ buf += add_register(buf, **ptr, FALSE, FALSE);
|
||||
+ buf += sprintf(buf, "]");
|
||||
+ (*ptr)++;
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ buf += sprintf(buf, "\n");
|
||||
+ return buf - buffer;
|
||||
+}
|
||||
+
|
||||
+const struct instr_info instructions[] =
|
||||
+{
|
||||
+ { D3DSIO_NOP, "nop", 0, instr_generic, 0x0100, 0xFFFF },
|
||||
+ { D3DSIO_MOV, "mov", 2, instr_generic, 0x0100, 0xFFFF },
|
||||
+ { D3DSIO_ADD, "add", 3, instr_generic, 0x0100, 0xFFFF },
|
||||
+ { D3DSIO_SUB, "sub", 3, instr_generic, 0x0100, 0xFFFF },
|
||||
+ { D3DSIO_MAD, "mad", 4, instr_generic, 0x0100, 0xFFFF },
|
||||
+ { D3DSIO_MUL, "mul", 3, instr_generic, 0x0100, 0xFFFF },
|
||||
+ { D3DSIO_RCP, "rcp", 2, instr_generic, 0x0100, 0xFFFF }, /* >= 2.0 for PS */
|
||||
+ { D3DSIO_RSQ, "rsq", 2, instr_generic, 0x0100, 0xFFFF }, /* >= 2.0 for PS */
|
||||
+ { D3DSIO_DP3, "dp3", 3, instr_generic, 0x0100, 0xFFFF },
|
||||
+ { D3DSIO_DP4, "dp4", 3, instr_generic, 0x0100, 0xFFFF }, /* >= 1.2 for PS */
|
||||
+ { D3DSIO_MIN, "min", 3, instr_generic, 0x0100, 0xFFFF }, /* >= 2.0 for PS */
|
||||
+ { D3DSIO_MAX, "max", 3, instr_generic, 0x0100, 0xFFFF }, /* >= 2.0 for PS */
|
||||
+ { D3DSIO_SLT, "slt", 3, instr_generic, 0x0100, 0xFFFF },
|
||||
+ { D3DSIO_SGE, "sge", 3, instr_generic, 0x0100, 0xFFFF }, /* VS only */
|
||||
+ { D3DSIO_EXP, "exp", 2, instr_generic, 0x0100, 0xFFFF }, /* >= 2.0 for PS */
|
||||
+ { D3DSIO_LOG, "log", 2, instr_generic, 0x0100, 0xFFFF }, /* >= 2.0 for PS */
|
||||
+ { D3DSIO_LIT, "lit", 2, instr_generic, 0x0100, 0xFFFF }, /* VS only */
|
||||
+ { D3DSIO_DST, "dst", 3, instr_generic, 0x0100, 0xFFFF }, /* VS only */
|
||||
+ { D3DSIO_LRP, "lrp", 4, instr_generic, 0x0100, 0xFFFF }, /* >= 2.0 for VS */
|
||||
+ { D3DSIO_FRC, "frc", 2, instr_generic, 0x0100, 0xFFFF }, /* >= 2.0 for PS */
|
||||
+ { D3DSIO_M4x4, "m4x4", 3, instr_generic, 0x0100, 0xFFFF }, /* >= 2.0 for PS */
|
||||
+ { D3DSIO_M4x3, "m4x3", 3, instr_generic, 0x0100, 0xFFFF }, /* >= 2.0 for PS */
|
||||
+ { D3DSIO_M3x4, "m3x4", 3, instr_generic, 0x0100, 0xFFFF }, /* >= 2.0 for PS */
|
||||
+ { D3DSIO_M3x3, "m3x3", 3, instr_generic, 0x0100, 0xFFFF }, /* >= 2.0 for PS */
|
||||
+ { D3DSIO_M3x2, "m3x2", 3, instr_generic, 0x0100, 0xFFFF }, /* >= 2.0 for PS */
|
||||
+ { D3DSIO_CALL, "call", 1, instr_generic, 0x0200, 0xFFFF }, /* >= 2.a for PS */
|
||||
+ { D3DSIO_CALLNZ, "callnz", 2, instr_generic, 0x0200, 0xFFFF }, /* >= 2.a for PS */
|
||||
+ { D3DSIO_LOOP, "loop", 2, instr_generic, 0x0200, 0xFFFF }, /* >= 3.0 for PS */
|
||||
+ { D3DSIO_RET, "ret", 0, instr_generic, 0x0200, 0xFFFF }, /* >= 2.a for PS */
|
||||
+ { D3DSIO_ENDLOOP, "endloop", 1, instr_generic, 0x0200, 0xFFFF }, /* >= 3.0 for PS */
|
||||
+ { D3DSIO_LABEL, "label", 1, instr_generic, 0x0200, 0xFFFF }, /* >= 2.a for PS */
|
||||
+ { D3DSIO_DCL, "dcl", 1, instr_dcl, 0x0100, 0xFFFF },
|
||||
+ { D3DSIO_POW, "pow", 3, instr_generic, 0x0200, 0xFFFF },
|
||||
+ { D3DSIO_CRS, "crs", 3, instr_generic, 0x0200, 0xFFFF },
|
||||
+ { D3DSIO_SGN, "sgn", 4, instr_generic, 0x0200, 0xFFFF }, /* VS only */
|
||||
+ { D3DSIO_ABS, "abs", 2, instr_generic, 0x0200, 0xFFFF },
|
||||
+ { D3DSIO_NRM, "nrm", 2, instr_generic, 0x0200, 0xFFFF },
|
||||
+ { D3DSIO_SINCOS, "sincos", 4, instr_generic, 0x0200, 0x02FF },
|
||||
+ { D3DSIO_SINCOS, "sincos", 2, instr_generic, 0x0300, 0xFFFF },
|
||||
+ { D3DSIO_REP, "rep", 1, instr_generic, 0x0200, 0xFFFF }, /* >= 2.a for PS */
|
||||
+ { D3DSIO_ENDREP, "endrep", 0, instr_generic, 0x0200, 0xFFFF }, /* >= 2.a for PS */
|
||||
+ { D3DSIO_IF, "if", 1, instr_generic, 0x0200, 0xFFFF }, /* >= 2.a for PS */
|
||||
+ { D3DSIO_IFC, "if_comp", 2, instr_generic, 0x0200, 0xFFFF },
|
||||
+ { D3DSIO_ELSE, "else", 0, instr_generic, 0x0200, 0xFFFF }, /* >= 2.a for PS */
|
||||
+ { D3DSIO_ENDIF, "endif", 0, instr_generic, 0x0200, 0xFFFF }, /* >= 2.a for PS */
|
||||
+ { D3DSIO_BREAK, "break", 0, instr_generic, 0x0201, 0xFFFF },
|
||||
+ { D3DSIO_BREAKC, "break_comp", 2, instr_generic, 0x0201, 0xFFFF },
|
||||
+ { D3DSIO_MOVA, "mova", 2, instr_generic, 0x0200, 0xFFFF }, /* VS only */
|
||||
+ { D3DSIO_DEFB, "defb", 2, instr_generic, 0x0100, 0xFFFF },
|
||||
+ { D3DSIO_DEFI, "defi", 2, instr_generic, 0x0100, 0xFFFF },
|
||||
+ { D3DSIO_TEXCOORD, "texcoord", 1, instr_generic, 0x0100, 0x0103 }, /* PS only */
|
||||
+ { D3DSIO_TEXCOORD, "texcrd", 2, instr_generic, 0x0104, 0x0104 }, /* PS only */
|
||||
+ { D3DSIO_TEXKILL, "texkill", 1, instr_generic, 0x0100, 0xFFFF }, /* PS only */
|
||||
+ { D3DSIO_TEX, "tex", 1, instr_generic, 0x0100, 0x0103 }, /* PS only */
|
||||
+ { D3DSIO_TEX, "texld", 2, instr_generic, 0x0104, 0x0104 }, /* PS only */
|
||||
+ { D3DSIO_TEX, "texld", 3, instr_generic, 0x0200, 0xFFFF }, /* PS only */
|
||||
+ { D3DSIO_TEXBEM, "texbem", 2, instr_generic, 0x0100, 0x0103 }, /* PS only */
|
||||
+ { D3DSIO_TEXBEML, "texbeml", 2, instr_generic, 0x0100, 0x0103 }, /* PS only */
|
||||
+ { D3DSIO_TEXREG2AR, "texreg2ar", 2, instr_generic, 0x0100, 0x0103 }, /* PS only */
|
||||
+ { D3DSIO_TEXREG2GB, "texreg2gb", 2, instr_generic, 0x0102, 0x0103 }, /* PS only */
|
||||
+ { D3DSIO_TEXM3x2PAD, "texm3x2pad", 2, instr_generic, 0x0100, 0x0103 }, /* PS only */
|
||||
+ { D3DSIO_TEXM3x2TEX, "texm3x2tex", 2, instr_generic, 0x0100, 0x0103 }, /* PS only */
|
||||
+ { D3DSIO_TEXM3x3PAD, "texm3x3pad", 2, instr_generic, 0x0100, 0x0103 }, /* PS only */
|
||||
+ { D3DSIO_TEXM3x3TEX, "texm3x3tex", 2, instr_generic, 0x0100, 0x0103 }, /* PS only */
|
||||
+ { D3DSIO_TEXM3x3DIFF, "texm3x3diff", 2, instr_generic, 0x0100, 0xFFFF }, /* PS only - Not documented */
|
||||
+ { D3DSIO_TEXM3x3SPEC, "texm3x3spec", 3, instr_generic, 0x0100, 0x0103 }, /* PS only */
|
||||
+ { D3DSIO_TEXM3x3VSPEC, "texm3x3vspec", 2, instr_generic, 0x0100, 0x0103 }, /* PS only */
|
||||
+ { D3DSIO_EXPP, "expp", 2, instr_generic, 0x0100, 0xFFFF }, /* VS only */
|
||||
+ { D3DSIO_LOGP, "logp", 2, instr_generic, 0x0100, 0xFFFF }, /* VS only */
|
||||
+ { D3DSIO_CND, "cnd", 4, instr_generic, 0x0100, 0x0104 }, /* PS only */
|
||||
+ { D3DSIO_DEF, "def", 5, instr_def, 0x0100, 0xFFFF },
|
||||
+ { D3DSIO_TEXREG2RGB, "texreg2rgb", 2, instr_generic, 0x0102, 0x0103 }, /* PS only */
|
||||
+ { D3DSIO_TEXDP3TEX, "texdp3tex", 2, instr_generic, 0x0102, 0x0103 }, /* PS only */
|
||||
+ { D3DSIO_TEXM3x2DEPTH, "texm3x2depth", 2, instr_generic, 0x0103, 0x0103 }, /* PS only */
|
||||
+ { D3DSIO_TEXDP3, "texdp3", 2, instr_generic, 0x0102, 0x0103 }, /* PS only */
|
||||
+ { D3DSIO_TEXM3x3, "texm3x3", 2, instr_generic, 0x0102, 0x0103 }, /* PS only */
|
||||
+ { D3DSIO_TEXDEPTH, "texdepth", 1, instr_generic, 0x0104, 0x0104 }, /* PS only */
|
||||
+ { D3DSIO_CMP, "cmp", 4, instr_generic, 0x0102, 0xFFFF }, /* PS only */
|
||||
+ { D3DSIO_BEM, "bem", 3, instr_generic, 0x0104, 0x0104 }, /* PS only */
|
||||
+ { D3DSIO_DP2ADD, "dp2add", 4, instr_generic, 0x0200, 0xFFFF }, /* PS only */
|
||||
+ { D3DSIO_DSX, "dsx", 2, instr_generic, 0x0201, 0xFFFF }, /* PS only */
|
||||
+ { D3DSIO_DSY, "dsy", 2, instr_generic, 0x0201, 0xFFFF }, /* PS only */
|
||||
+ { D3DSIO_TEXLDD, "texldd", 5, instr_generic, 0x0201, 0xFFFF }, /* PS only - not existing for 2.b */
|
||||
+ { D3DSIO_SETP, "setp_comp", 3, instr_generic, 0x0201, 0xFFFF },
|
||||
+ { D3DSIO_TEXLDL, "texldl", 3, instr_generic, 0x0300, 0xFFFF },
|
||||
+ { D3DSIO_BREAKP, "breakp", 1, instr_generic, 0x0201, 0xFFFF },
|
||||
+ { D3DSIO_PHASE, "phase", 0, instr_generic, 0x0104, 0x0104 }, /* PS only */
|
||||
+ { D3DSIO_COMMENT, "", 0, instr_comment, 0x0100, 0xFFFF }
|
||||
+};
|
||||
+
|
||||
+HRESULT WINAPI D3DXDisassembleShader(const DWORD *shader, BOOL colorcode, const char *comments,
|
||||
+ ID3DXBuffer **disassembly)
|
||||
+{
|
||||
+ DWORD *ptr = (DWORD *)shader;
|
||||
+ char *buffer, *buf;
|
||||
+ UINT capacity = 4096;
|
||||
+ BOOL ps;
|
||||
+ WORD version;
|
||||
+ HRESULT hr;
|
||||
+
|
||||
+ TRACE("%p %d %s %p\n", shader, colorcode, debugstr_a(comments), disassembly);
|
||||
+
|
||||
+ if (!shader || !disassembly)
|
||||
+ return D3DERR_INVALIDCALL;
|
||||
+
|
||||
+ buf = buffer = HeapAlloc(GetProcessHeap(), 0, capacity);
|
||||
+ if (!buffer)
|
||||
+ return E_OUTOFMEMORY;
|
||||
+
|
||||
+ ps = (*ptr >> 16) & 1;
|
||||
+ version = *ptr & 0xFFFF;
|
||||
+ buf += sprintf(buf, " %s_%d_%d\n", ps ? "ps" : "vs", D3DSHADER_VERSION_MAJOR(*ptr), D3DSHADER_VERSION_MINOR(*ptr));
|
||||
+ ptr++;
|
||||
+
|
||||
+ while (*ptr != D3DSIO_END)
|
||||
+ {
|
||||
+ DWORD index;
|
||||
+
|
||||
+ if ((buf - buffer + 128) > capacity)
|
||||
+ {
|
||||
+ UINT count = buf - buffer;
|
||||
+ char *new_buffer = HeapReAlloc(GetProcessHeap(), 0, buffer, capacity * 2);
|
||||
+ if (!new_buffer)
|
||||
+ {
|
||||
+ HeapFree(GetProcessHeap(), 0, buffer);
|
||||
+ return E_OUTOFMEMORY;
|
||||
+ }
|
||||
+ capacity *= 2;
|
||||
+ buffer = new_buffer;
|
||||
+ buf = buffer + count;
|
||||
+ }
|
||||
+
|
||||
+ for (index = 0; index < sizeof(instructions)/sizeof(instructions[0]); index++)
|
||||
+ if (((*ptr & D3DSI_OPCODE_MASK) == instructions[index].opcode) &&
|
||||
+ (version >= instructions[index].min_version) && (version <= instructions[index].max_version))
|
||||
+ break;
|
||||
+
|
||||
+ if (index != sizeof(instructions)/sizeof(instructions[0]))
|
||||
+ {
|
||||
+ buf += instructions[index].function(&(instructions[index]), &ptr, buf, ps);
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ buf += sprintf(buf, " ??? (Unknown opcode %x)\n", *ptr);
|
||||
+ while (*++ptr & (1u << 31));
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ hr = D3DXCreateBuffer(buf - buffer + 1 , disassembly);
|
||||
+ if (SUCCEEDED(hr))
|
||||
+ strcpy(ID3DXBuffer_GetBufferPointer(*disassembly), buffer);
|
||||
+ HeapFree(GetProcessHeap(), 0, buffer);
|
||||
+
|
||||
+ return hr;
|
||||
}
|
||||
|
||||
struct d3dx9_texture_shader
|
||||
--
|
||||
2.39.0
|
||||
|
@@ -1,74 +0,0 @@
|
||||
From 63a4b93d73acaa55a2246a1b0d825e7950af042b Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Mon, 15 Feb 2016 08:25:58 +0100
|
||||
Subject: [PATCH] d3dx9_36/tests: Add initial tests for D3DXDisassembleShader.
|
||||
|
||||
---
|
||||
dlls/d3dx9_36/tests/shader.c | 46 ++++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 46 insertions(+)
|
||||
|
||||
diff --git a/dlls/d3dx9_36/tests/shader.c b/dlls/d3dx9_36/tests/shader.c
|
||||
index e2925faad6..5edac61ae8 100644
|
||||
--- a/dlls/d3dx9_36/tests/shader.c
|
||||
+++ b/dlls/d3dx9_36/tests/shader.c
|
||||
@@ -6623,6 +6623,51 @@ static void test_fragment_linker(void)
|
||||
DestroyWindow(window);
|
||||
}
|
||||
|
||||
+static void test_disassemble_shader(void)
|
||||
+{
|
||||
+ static const char disasm_vs[] = " vs_1_1\n"
|
||||
+ " dcl_position v0\n"
|
||||
+ " dp4 oPos.x, v0, c0\n"
|
||||
+ " dp4 oPos.y, v0, c1\n"
|
||||
+ " dp4 oPos.z, v0, c2\n"
|
||||
+ " dp4 oPos.w, v0, c3\n";
|
||||
+ static const char disasm_ps[] = " ps_1_1\n"
|
||||
+ " def c1, 1, 0, 0, 0\n"
|
||||
+ " tex t0\n"
|
||||
+ " dp3 r0, c1, c0\n"
|
||||
+ " mul r0, v0, r0\n"
|
||||
+ " mul r0, t0, r0\n";
|
||||
+ ID3DXBuffer *disassembly;
|
||||
+ HRESULT ret;
|
||||
+ char *ptr;
|
||||
+
|
||||
+ /* Check wrong parameters */
|
||||
+ ret = D3DXDisassembleShader(NULL, FALSE, NULL, NULL);
|
||||
+ ok(ret == D3DERR_INVALIDCALL, "Returned %#x, expected %#x\n", ret, D3DERR_INVALIDCALL);
|
||||
+ ret = D3DXDisassembleShader(NULL, FALSE, NULL, &disassembly);
|
||||
+ ok(ret == D3DERR_INVALIDCALL, "Returned %#x, expected %#x\n", ret, D3DERR_INVALIDCALL);
|
||||
+ ret = D3DXDisassembleShader(simple_vs, FALSE, NULL, NULL);
|
||||
+ ok(ret == D3DERR_INVALIDCALL, "Returned %#x, expected %#x\n", ret, D3DERR_INVALIDCALL);
|
||||
+
|
||||
+ /* Test with vertex shader */
|
||||
+ disassembly = (void *)0xdeadbeef;
|
||||
+ ret = D3DXDisassembleShader(simple_vs, FALSE, NULL, &disassembly);
|
||||
+ ok(ret == D3D_OK, "Failed with %#x\n", ret);
|
||||
+ ptr = ID3DXBuffer_GetBufferPointer(disassembly);
|
||||
+ ok(!memcmp(ptr, disasm_vs, sizeof(disasm_vs) - 1), /* compare beginning */
|
||||
+ "Returned '%s', expected '%s'\n", ptr, disasm_vs);
|
||||
+ ID3DXBuffer_Release(disassembly);
|
||||
+
|
||||
+ /* Test with pixel shader */
|
||||
+ disassembly = (void *)0xdeadbeef;
|
||||
+ ret = D3DXDisassembleShader(simple_ps, FALSE, NULL, &disassembly);
|
||||
+ ok(ret == D3D_OK, "Failed with %#x\n", ret);
|
||||
+ ptr = ID3DXBuffer_GetBufferPointer(disassembly);
|
||||
+ ok(!memcmp(ptr, disasm_ps, sizeof(disasm_ps) - 1), /* compare beginning */
|
||||
+ "Returned '%s', expected '%s'\n", ptr, disasm_ps);
|
||||
+ ID3DXBuffer_Release(disassembly);
|
||||
+}
|
||||
+
|
||||
START_TEST(shader)
|
||||
{
|
||||
test_get_shader_size();
|
||||
@@ -6638,4 +6683,5 @@ START_TEST(shader)
|
||||
test_registerset_defaults();
|
||||
test_shader_semantics();
|
||||
test_fragment_linker();
|
||||
+ test_disassemble_shader();
|
||||
}
|
||||
--
|
||||
2.23.0
|
||||
|
@@ -1,200 +0,0 @@
|
||||
From ce7f2989a9fc4d4d6a307131f08f6ed5570de680 Mon Sep 17 00:00:00 2001
|
||||
From: Christian Costa <titan.costa@gmail.com>
|
||||
Date: Tue, 16 Feb 2016 12:11:45 +0100
|
||||
Subject: [PATCH] d3dx9_36/tests: Add additional tests for special cases.
|
||||
|
||||
---
|
||||
dlls/d3dx9_36/tests/shader.c | 163 +++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 163 insertions(+)
|
||||
|
||||
diff --git a/dlls/d3dx9_36/tests/shader.c b/dlls/d3dx9_36/tests/shader.c
|
||||
index 5edac61ae8..0ae8f27b03 100644
|
||||
--- a/dlls/d3dx9_36/tests/shader.c
|
||||
+++ b/dlls/d3dx9_36/tests/shader.c
|
||||
@@ -6623,6 +6623,60 @@ static void test_fragment_linker(void)
|
||||
DestroyWindow(window);
|
||||
}
|
||||
|
||||
+static const DWORD ps_tex[] = {
|
||||
+ 0xffff0103, /* ps_1_3 */
|
||||
+ 0x00000042, 0xb00f0000, /* tex t0 */
|
||||
+ 0x00000000, /* nop */
|
||||
+ 0x0000ffff};
|
||||
+
|
||||
+static const DWORD ps_texld_1_4[] = {
|
||||
+ 0xffff0104, /* ps_1_4 */
|
||||
+ 0x00000042, 0xb00f0000, 0xa0e40000, /* texld t0, c0 */
|
||||
+ 0x00000000, /* nop */
|
||||
+ 0x0000ffff};
|
||||
+
|
||||
+static const DWORD ps_texld_2_0[] = {
|
||||
+ 0xffff0200, /* ps_2_0 */
|
||||
+ 0x00000042, 0xb00f0000, 0xa0e40000, 0xa0e40001, /* texld t0, c0, c1 */
|
||||
+ 0x00000000, /* nop */
|
||||
+ 0x0000ffff};
|
||||
+
|
||||
+static const DWORD ps_texcoord[] = {
|
||||
+ 0xffff0103, /* ps_1_4 */
|
||||
+ 0x00000040, 0xb00f0000, /* texcoord t0 */
|
||||
+ 0x00000000, /* nop */
|
||||
+ 0x0000ffff};
|
||||
+
|
||||
+static const DWORD ps_texcrd[] = {
|
||||
+ 0xffff0104, /* ps_2_0 */
|
||||
+ 0x00000040, 0xb00f0000, 0xa0e40000, /* texcrd t0, c0 */
|
||||
+ 0x00000000, /* nop */
|
||||
+ 0x0000ffff};
|
||||
+
|
||||
+static const DWORD ps_sincos_2_0[] = {
|
||||
+ 0xffff0200, /* ps_2_0 */
|
||||
+ 0x00000025, 0xb00f0000, 0xa0e40000, 0xa0e40001, 0xa0e40002, /* sincos t0, c0, c1, c2 */
|
||||
+ 0x00000000, /* nop */
|
||||
+ 0x0000ffff};
|
||||
+
|
||||
+static const DWORD ps_sincos_3_0[] = {
|
||||
+ 0xffff0300, /* ps_3_0 */
|
||||
+ 0x00000025, 0xb00f0000, 0xa0e40000, /* sincos t0, c0 */
|
||||
+ 0x00000000, /* nop */
|
||||
+ 0x0000ffff};
|
||||
+
|
||||
+static const DWORD vs_sincos_2_0[] = {
|
||||
+ 0xfffe0200, /* vs_2_0 */
|
||||
+ 0x00000025, 0xb00f0000, 0xa0e40000, 0xa0e40001, 0xa0e40002, /* sincos a0, c0, c1, c2 */
|
||||
+ 0x00000000, /* nop */
|
||||
+ 0x0000ffff};
|
||||
+
|
||||
+static const DWORD vs_sincos_3_0[] = {
|
||||
+ 0xfffe0300, /* vs_3_0 */
|
||||
+ 0x00000025, 0xb00f0000, 0xa0e40000, /* sincos a0, c0 */
|
||||
+ 0x00000000, /* nop */
|
||||
+ 0x0000ffff};
|
||||
+
|
||||
static void test_disassemble_shader(void)
|
||||
{
|
||||
static const char disasm_vs[] = " vs_1_1\n"
|
||||
@@ -6637,6 +6691,33 @@ static void test_disassemble_shader(void)
|
||||
" dp3 r0, c1, c0\n"
|
||||
" mul r0, v0, r0\n"
|
||||
" mul r0, t0, r0\n";
|
||||
+ static const char disasm_ps_tex[] = " ps_1_3\n"
|
||||
+ " tex t0\n"
|
||||
+ " nop\n";
|
||||
+ static const char disasm_ps_texld_1_4[] = " ps_1_4\n"
|
||||
+ " texld t0, c0\n"
|
||||
+ " nop\n";
|
||||
+ static const char disasm_ps_texld_2_0[] = " ps_2_0\n"
|
||||
+ " texld t0, c0, c1\n"
|
||||
+ " nop\n";
|
||||
+ static const char disasm_ps_texcoord[] = " ps_1_3\n"
|
||||
+ " texcoord t0\n"
|
||||
+ " nop\n";
|
||||
+ static const char disasm_ps_texcrd[] = " ps_1_4\n"
|
||||
+ " texcrd t0, c0\n"
|
||||
+ " nop\n";
|
||||
+ static const char disasm_ps_sincos_2_0[] = " ps_2_0\n"
|
||||
+ " sincos t0, c0, c1, c2\n"
|
||||
+ " nop\n";
|
||||
+ static const char disasm_ps_sincos_3_0[] = " ps_3_0\n"
|
||||
+ " sincos t0, c0\n"
|
||||
+ " nop\n";
|
||||
+ static const char disasm_vs_sincos_2_0[] = " vs_2_0\n"
|
||||
+ " sincos a0, c0, c1, c2\n"
|
||||
+ " nop\n";
|
||||
+ static const char disasm_vs_sincos_3_0[] = " vs_3_0\n"
|
||||
+ " sincos a0, c0\n"
|
||||
+ " nop\n";
|
||||
ID3DXBuffer *disassembly;
|
||||
HRESULT ret;
|
||||
char *ptr;
|
||||
@@ -6666,6 +6747,88 @@ static void test_disassemble_shader(void)
|
||||
ok(!memcmp(ptr, disasm_ps, sizeof(disasm_ps) - 1), /* compare beginning */
|
||||
"Returned '%s', expected '%s'\n", ptr, disasm_ps);
|
||||
ID3DXBuffer_Release(disassembly);
|
||||
+
|
||||
+ /* Test tex instruction with pixel shader 1.3 */
|
||||
+ disassembly = (void *)0xdeadbeef;
|
||||
+ ret = D3DXDisassembleShader(ps_tex, FALSE, NULL, &disassembly);
|
||||
+ ok(ret == D3D_OK, "Failed with %#x\n", ret);
|
||||
+ ptr = ID3DXBuffer_GetBufferPointer(disassembly);
|
||||
+ ok(!memcmp(ptr, disasm_ps_tex, sizeof(disasm_ps_tex) - 1), /* compare beginning */
|
||||
+ "Returned '%s', expected '%s'\n", ptr, disasm_ps_tex);
|
||||
+ ID3DXBuffer_Release(disassembly);
|
||||
+
|
||||
+ /* Test texld instruction with pixel shader 1.4 */
|
||||
+ disassembly = (void *)0xdeadbeef;
|
||||
+ ret = D3DXDisassembleShader(ps_texld_1_4, FALSE, NULL, &disassembly);
|
||||
+ ok(ret == D3D_OK, "Failed with %#x\n", ret);
|
||||
+ ptr = ID3DXBuffer_GetBufferPointer(disassembly);
|
||||
+ ok(!memcmp(ptr, disasm_ps_texld_1_4, sizeof(disasm_ps_texld_1_4) - 1), /* compare beginning */
|
||||
+ "Returned '%s', expected '%s'\n", ptr, disasm_ps_texld_1_4);
|
||||
+ ID3DXBuffer_Release(disassembly);
|
||||
+
|
||||
+ /* Test texld instruction with pixel shader 2.0 */
|
||||
+ disassembly = (void *)0xdeadbeef;
|
||||
+ ret = D3DXDisassembleShader(ps_texld_2_0, FALSE, NULL, &disassembly);
|
||||
+ ok(ret == D3D_OK, "Failed with %#x\n", ret);
|
||||
+ ptr = ID3DXBuffer_GetBufferPointer(disassembly);
|
||||
+ ok(!memcmp(ptr, disasm_ps_texld_2_0, sizeof(disasm_ps_texld_2_0) - 1), /* compare beginning */
|
||||
+ "Returned '%s', expected '%s'\n", ptr, disasm_ps_texld_2_0);
|
||||
+ ID3DXBuffer_Release(disassembly);
|
||||
+
|
||||
+ /* Test texcoord instruction with pixel shader 1.3 */
|
||||
+ disassembly = (void *)0xdeadbeef;
|
||||
+ ret = D3DXDisassembleShader(ps_texcoord, FALSE, NULL, &disassembly);
|
||||
+ ok(ret == D3D_OK, "Failed with %#x\n", ret);
|
||||
+ ptr = ID3DXBuffer_GetBufferPointer(disassembly);
|
||||
+ ok(!memcmp(ptr, disasm_ps_texcoord, sizeof(disasm_ps_texcoord) - 1), /* compare beginning */
|
||||
+ "Returned '%s', expected '%s'\n", ptr, disasm_ps_texcoord);
|
||||
+ ID3DXBuffer_Release(disassembly);
|
||||
+
|
||||
+ /* Test texcrd instruction with pixel shader 1.4 */
|
||||
+ disassembly = (void *)0xdeadbeef;
|
||||
+ ret = D3DXDisassembleShader(ps_texcrd, FALSE, NULL, &disassembly);
|
||||
+ ok(ret == D3D_OK, "Failed with %#x\n", ret);
|
||||
+ ptr = ID3DXBuffer_GetBufferPointer(disassembly);
|
||||
+ ok(!memcmp(ptr, disasm_ps_texcrd, sizeof(disasm_ps_texcrd) - 1), /* compare beginning */
|
||||
+ "Returned '%s', expected '%s'\n", ptr, disasm_ps_texcrd);
|
||||
+ ID3DXBuffer_Release(disassembly);
|
||||
+
|
||||
+ /* Test sincos instruction pixel shader 2.0 */
|
||||
+ disassembly = (void *)0xdeadbeef;
|
||||
+ ret = D3DXDisassembleShader(ps_sincos_2_0, FALSE, NULL, &disassembly);
|
||||
+ ok(ret == D3D_OK, "Failed with %#x\n", ret);
|
||||
+ ptr = ID3DXBuffer_GetBufferPointer(disassembly);
|
||||
+ ok(!memcmp(ptr, disasm_ps_sincos_2_0, sizeof(disasm_ps_sincos_2_0) - 1), /* compare beginning */
|
||||
+ "Returned '%s', expected '%s'\n", ptr, disasm_ps_sincos_2_0);
|
||||
+ ID3DXBuffer_Release(disassembly);
|
||||
+
|
||||
+ /* Test sincos instruction with pixel shader 3.0 */
|
||||
+ disassembly = (void *)0xdeadbeef;
|
||||
+ ret = D3DXDisassembleShader(ps_sincos_3_0, FALSE, NULL, &disassembly);
|
||||
+ ok(ret == D3D_OK, "Failed with %#x\n", ret);
|
||||
+ ptr = ID3DXBuffer_GetBufferPointer(disassembly);
|
||||
+ ok(!memcmp(ptr, disasm_ps_sincos_3_0, sizeof(disasm_ps_sincos_3_0) - 1), /* compare beginning */
|
||||
+ "Returned '%s', expected '%s'\n", ptr, disasm_ps_sincos_3_0);
|
||||
+ ID3DXBuffer_Release(disassembly);
|
||||
+
|
||||
+ /* Test sincos instruction with pixel shader 2.0 */
|
||||
+ disassembly = (void *)0xdeadbeef;
|
||||
+ ret = D3DXDisassembleShader(vs_sincos_2_0, FALSE, NULL, &disassembly);
|
||||
+ ok(ret == D3D_OK, "Failed with %#x\n", ret);
|
||||
+ ptr = ID3DXBuffer_GetBufferPointer(disassembly);
|
||||
+ ok(!memcmp(ptr, disasm_vs_sincos_2_0, sizeof(disasm_vs_sincos_2_0) - 1), /* compare beginning */
|
||||
+ "Returned '%s', expected '%s'\n", ptr, disasm_vs_sincos_2_0);
|
||||
+ ID3DXBuffer_Release(disassembly);
|
||||
+
|
||||
+ /* Test sincos instruction with pixel shader 3.0 */
|
||||
+ disassembly = (void *)0xdeadbeef;
|
||||
+ ret = D3DXDisassembleShader(vs_sincos_3_0, FALSE, NULL, &disassembly);
|
||||
+ ok(ret == D3D_OK, "Failed with %#x\n", ret);
|
||||
+ ptr = ID3DXBuffer_GetBufferPointer(disassembly);
|
||||
+ ok(!memcmp(ptr, disasm_vs_sincos_3_0, sizeof(disasm_vs_sincos_3_0) - 1), /* compare beginning */
|
||||
+ "Returned '%s', expected '%s'\n", ptr, disasm_vs_sincos_3_0);
|
||||
+ ID3DXBuffer_Release(disassembly);
|
||||
+
|
||||
}
|
||||
|
||||
START_TEST(shader)
|
||||
--
|
||||
2.23.0
|
||||
|
@@ -1 +0,0 @@
|
||||
Fixes: [46649] Multiple applications need D3DXDisassembleShader() implementation (Tom Clancy's Rainbow Six: Vegas 2, The Void)
|
@@ -1,4 +1,4 @@
|
||||
From ca6a89f3bfb6aa5d7ac05bb0c469b527ae1a9d9d Mon Sep 17 00:00:00 2001
|
||||
From 1cf7540fcddc9fbaa7411f3293f115555a6dd0ab Mon Sep 17 00:00:00 2001
|
||||
From: Zebediah Figura <zfigura@codeweavers.com>
|
||||
Date: Mon, 6 Jul 2020 16:11:23 -0500
|
||||
Subject: [PATCH] server, ntdll: Implement message waits.
|
||||
@@ -10,10 +10,10 @@ Subject: [PATCH] server, ntdll: Implement message waits.
|
||||
3 files changed, 75 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/dlls/ntdll/unix/esync.c b/dlls/ntdll/unix/esync.c
|
||||
index 2ae334d8417..608c318c1c7 100644
|
||||
index 399930c444b..06d7d8babc6 100644
|
||||
--- a/dlls/ntdll/unix/esync.c
|
||||
+++ b/dlls/ntdll/unix/esync.c
|
||||
@@ -475,12 +475,13 @@ static void update_grabbed_object( struct esync *obj )
|
||||
@@ -474,12 +474,13 @@ static void update_grabbed_object( struct esync *obj )
|
||||
|
||||
/* A value of STATUS_NOT_IMPLEMENTED returned from this function means that we
|
||||
* need to delegate to server_select(). */
|
||||
@@ -28,7 +28,7 @@ index 2ae334d8417..608c318c1c7 100644
|
||||
LONGLONG timeleft;
|
||||
LARGE_INTEGER now;
|
||||
ULONGLONG end;
|
||||
@@ -508,6 +509,9 @@ NTSTATUS esync_wait_objects( DWORD count, const HANDLE *handles, BOOLEAN wait_an
|
||||
@@ -507,6 +508,9 @@ NTSTATUS esync_wait_objects( DWORD count, const HANDLE *handles, BOOLEAN wait_an
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@ index 2ae334d8417..608c318c1c7 100644
|
||||
if (has_esync && has_server)
|
||||
FIXME("Can't wait on esync and server objects at the same time!\n");
|
||||
else if (has_server)
|
||||
@@ -519,6 +523,9 @@ NTSTATUS esync_wait_objects( DWORD count, const HANDLE *handles, BOOLEAN wait_an
|
||||
@@ -518,6 +522,9 @@ NTSTATUS esync_wait_objects( DWORD count, const HANDLE *handles, BOOLEAN wait_an
|
||||
for (i = 0; i < count; i++)
|
||||
TRACE(" %p", handles[i]);
|
||||
|
||||
@@ -48,7 +48,7 @@ index 2ae334d8417..608c318c1c7 100644
|
||||
if (!timeout)
|
||||
TRACE(", timeout = INFINITE.\n");
|
||||
else
|
||||
@@ -558,7 +565,9 @@ NTSTATUS esync_wait_objects( DWORD count, const HANDLE *handles, BOOLEAN wait_an
|
||||
@@ -557,7 +564,9 @@ NTSTATUS esync_wait_objects( DWORD count, const HANDLE *handles, BOOLEAN wait_an
|
||||
int64_t value;
|
||||
ssize_t size;
|
||||
|
||||
@@ -59,7 +59,7 @@ index 2ae334d8417..608c318c1c7 100644
|
||||
{
|
||||
/* Don't grab the object, just check if it's signaled. */
|
||||
if (fds[i].revents & POLLIN)
|
||||
@@ -603,6 +612,44 @@ NTSTATUS esync_wait_objects( DWORD count, const HANDLE *handles, BOOLEAN wait_an
|
||||
@@ -602,6 +611,44 @@ NTSTATUS esync_wait_objects( DWORD count, const HANDLE *handles, BOOLEAN wait_an
|
||||
}
|
||||
}
|
||||
|
||||
@@ -105,10 +105,10 @@ index 2ae334d8417..608c318c1c7 100644
|
||||
{
|
||||
struct stat st;
|
||||
diff --git a/server/protocol.def b/server/protocol.def
|
||||
index 5cf63cbac21..f837944574e 100644
|
||||
index 915332ece6f..dd5e996cbc7 100644
|
||||
--- a/server/protocol.def
|
||||
+++ b/server/protocol.def
|
||||
@@ -3797,3 +3797,8 @@ enum esync_type
|
||||
@@ -3921,3 +3921,8 @@ enum esync_type
|
||||
int type;
|
||||
unsigned int shm_idx;
|
||||
@END
|
||||
@@ -118,10 +118,10 @@ index 5cf63cbac21..f837944574e 100644
|
||||
+ int in_msgwait; /* are we in a message wait? */
|
||||
+@END
|
||||
diff --git a/server/queue.c b/server/queue.c
|
||||
index 1702acb8480..9593ae532d4 100644
|
||||
index 3d5da326400..80731383401 100644
|
||||
--- a/server/queue.c
|
||||
+++ b/server/queue.c
|
||||
@@ -144,6 +144,7 @@ struct msg_queue
|
||||
@@ -146,6 +146,7 @@ struct msg_queue
|
||||
int keystate_lock; /* owns an input keystate lock */
|
||||
unsigned int ignore_post_msg; /* ignore post messages newer than this unique id */
|
||||
int esync_fd; /* esync file descriptor (signalled on message) */
|
||||
@@ -129,7 +129,7 @@ index 1702acb8480..9593ae532d4 100644
|
||||
};
|
||||
|
||||
struct hotkey
|
||||
@@ -317,6 +318,7 @@ static struct msg_queue *create_msg_queue( struct thread *thread, struct thread_
|
||||
@@ -319,6 +320,7 @@ static struct msg_queue *create_msg_queue( struct thread *thread, struct thread_
|
||||
queue->keystate_lock = 0;
|
||||
queue->ignore_post_msg = 0;
|
||||
queue->esync_fd = -1;
|
||||
@@ -137,7 +137,7 @@ index 1702acb8480..9593ae532d4 100644
|
||||
list_init( &queue->send_result );
|
||||
list_init( &queue->callback_result );
|
||||
list_init( &queue->pending_timers );
|
||||
@@ -1001,6 +1003,10 @@ static int is_queue_hung( struct msg_queue *queue )
|
||||
@@ -1106,6 +1108,10 @@ static int is_queue_hung( struct msg_queue *queue )
|
||||
if (get_wait_queue_thread(entry)->queue == queue)
|
||||
return 0; /* thread is waiting on queue -> not hung */
|
||||
}
|
||||
@@ -148,9 +148,9 @@ index 1702acb8480..9593ae532d4 100644
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -3456,3 +3462,18 @@ DECL_HANDLER(update_rawinput_devices)
|
||||
process->rawinput_mouse = find_rawinput_device( process, 1, 2 );
|
||||
process->rawinput_kbd = find_rawinput_device( process, 1, 6 );
|
||||
@@ -3568,3 +3574,18 @@ DECL_HANDLER(update_rawinput_devices)
|
||||
process->rawinput_mouse = find_rawinput_device( process, MAKELONG(HID_USAGE_GENERIC_MOUSE, HID_USAGE_PAGE_GENERIC) );
|
||||
process->rawinput_kbd = find_rawinput_device( process, MAKELONG(HID_USAGE_GENERIC_KEYBOARD, HID_USAGE_PAGE_GENERIC) );
|
||||
}
|
||||
+
|
||||
+DECL_HANDLER(esync_msgwait)
|
||||
@@ -168,5 +168,5 @@ index 1702acb8480..9593ae532d4 100644
|
||||
+ set_fd_events( queue->fd, req->in_msgwait ? POLLIN : 0 );
|
||||
+}
|
||||
--
|
||||
2.35.1
|
||||
2.43.0
|
||||
|
||||
|
@@ -0,0 +1,43 @@
|
||||
From 3121022dbf17c32503ed18be302c0cee219b394c Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Sat, 10 Feb 2024 13:06:22 +1100
|
||||
Subject: [PATCH 1/2] Revert "explorer: Set layered style on systray icons only
|
||||
when it's actually layered."
|
||||
|
||||
This reverts commit b5c57b9a62c396068d18237bd6e82b37c169fdc5.
|
||||
---
|
||||
programs/explorer/systray.c | 4 +---
|
||||
1 file changed, 1 insertion(+), 3 deletions(-)
|
||||
|
||||
diff --git a/programs/explorer/systray.c b/programs/explorer/systray.c
|
||||
index c76ebdd0c92..74e5c3b6b48 100644
|
||||
--- a/programs/explorer/systray.c
|
||||
+++ b/programs/explorer/systray.c
|
||||
@@ -624,7 +624,6 @@ static BOOL show_icon(struct icon *icon)
|
||||
{
|
||||
icon->display = ICON_DISPLAY_DOCKED;
|
||||
icon->layered = TRUE;
|
||||
- SetWindowLongW( icon->window, GWL_EXSTYLE, GetWindowLongW( icon->window, GWL_EXSTYLE ) | WS_EX_LAYERED );
|
||||
SendMessageW( icon->window, WM_SIZE, SIZE_RESTORED, MAKELONG( icon_cx, icon_cy ) );
|
||||
}
|
||||
systray_add_icon( icon );
|
||||
@@ -646,7 +645,6 @@ static BOOL hide_icon(struct icon *icon)
|
||||
{
|
||||
icon->display = ICON_DISPLAY_HIDDEN;
|
||||
icon->layered = FALSE;
|
||||
- SetWindowLongW( icon->window, GWL_EXSTYLE, GetWindowLongW( icon->window, GWL_EXSTYLE ) & ~WS_EX_LAYERED );
|
||||
}
|
||||
ShowWindow( icon->window, SW_HIDE );
|
||||
systray_remove_icon( icon );
|
||||
@@ -734,7 +732,7 @@ static BOOL add_icon(NOTIFYICONDATAW *nid)
|
||||
icon->owner = nid->hWnd;
|
||||
icon->display = ICON_DISPLAY_HIDDEN;
|
||||
|
||||
- CreateWindowExW( 0, tray_icon_class.lpszClassName, NULL, WS_CLIPSIBLINGS | WS_POPUP,
|
||||
+ CreateWindowExW( WS_EX_LAYERED, tray_icon_class.lpszClassName, NULL, WS_CLIPSIBLINGS | WS_POPUP,
|
||||
0, 0, icon_cx, icon_cy, 0, NULL, NULL, icon );
|
||||
if (!icon->window) ERR( "Failed to create systray icon window\n" );
|
||||
|
||||
--
|
||||
2.43.0
|
||||
|
@@ -0,0 +1,45 @@
|
||||
From 57bf893be6bae301dbc1099615096d2f3644119b Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Sat, 10 Feb 2024 13:06:23 +1100
|
||||
Subject: [PATCH 2/2] Revert "explorer: Don't activate the systray icon when
|
||||
showing it."
|
||||
|
||||
This reverts commit 5e7a8f4db045d456913f9bd7075191ad14053375.
|
||||
---
|
||||
programs/explorer/systray.c | 11 +----------
|
||||
1 file changed, 1 insertion(+), 10 deletions(-)
|
||||
|
||||
diff --git a/programs/explorer/systray.c b/programs/explorer/systray.c
|
||||
index 74e5c3b6b48..43187db30b5 100644
|
||||
--- a/programs/explorer/systray.c
|
||||
+++ b/programs/explorer/systray.c
|
||||
@@ -543,15 +543,6 @@ static LRESULT WINAPI tray_icon_wndproc( HWND hwnd, UINT msg, WPARAM wparam, LPA
|
||||
break;
|
||||
}
|
||||
|
||||
- case WM_WINDOWPOSCHANGING:
|
||||
- if (icon->display == ICON_DISPLAY_HIDDEN)
|
||||
- {
|
||||
- /* Changing the icon's parent via SetParent would activate it, stealing the focus. */
|
||||
- WINDOWPOS *wp = (WINDOWPOS*)lparam;
|
||||
- wp->flags |= SWP_NOACTIVATE;
|
||||
- }
|
||||
- break;
|
||||
-
|
||||
case WM_WINDOWPOSCHANGED:
|
||||
update_systray_balloon_position();
|
||||
break;
|
||||
@@ -575,9 +566,9 @@ static void systray_add_icon( struct icon *icon )
|
||||
|
||||
if (icon->display != ICON_DISPLAY_HIDDEN) return; /* already added */
|
||||
|
||||
+ icon->display = nb_displayed++;
|
||||
SetWindowLongW( icon->window, GWL_STYLE, GetWindowLongW( icon->window, GWL_STYLE ) | WS_CHILD );
|
||||
SetParent( icon->window, tray_window );
|
||||
- icon->display = nb_displayed++;
|
||||
pos = get_icon_pos( icon );
|
||||
SetWindowPos( icon->window, 0, pos.x, pos.y, 0, 0, SWP_NOSIZE | SWP_NOACTIVATE | SWP_NOZORDER | SWP_SHOWWINDOW );
|
||||
|
||||
--
|
||||
2.43.0
|
||||
|
4
patches/explorer-reverts/definition
Normal file
4
patches/explorer-reverts/definition
Normal file
@@ -0,0 +1,4 @@
|
||||
# These are causing a regression with Steam
|
||||
# Close stream to cause it to minimize as an icon, fails to show icon.
|
||||
|
||||
# Debian using XFCE
|
@@ -1,70 +0,0 @@
|
||||
From 190e36c5ea8047e42b10d8c626bb221b4f3d5b02 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Fri, 26 Feb 2016 21:35:52 +0100
|
||||
Subject: krnl386.exe16: Really translate all invalid console handles into
|
||||
usable DOS handles.
|
||||
|
||||
---
|
||||
dlls/krnl386.exe16/file.c | 33 ++++++++++++++++++++-------------
|
||||
1 file changed, 20 insertions(+), 13 deletions(-)
|
||||
|
||||
diff --git a/dlls/krnl386.exe16/file.c b/dlls/krnl386.exe16/file.c
|
||||
index b66b753..e6b1233 100644
|
||||
--- a/dlls/krnl386.exe16/file.c
|
||||
+++ b/dlls/krnl386.exe16/file.c
|
||||
@@ -45,6 +45,17 @@ WINE_DEFAULT_DEBUG_CHANNEL(file);
|
||||
|
||||
static HANDLE dos_handles[DOS_TABLE_SIZE];
|
||||
|
||||
+static void set_standard_handle(HANDLE *out, HANDLE null, HANDLE in)
|
||||
+{
|
||||
+ if (!in || in == INVALID_HANDLE_VALUE ||
|
||||
+ !DuplicateHandle(GetCurrentProcess(), in, GetCurrentProcess(),
|
||||
+ out, 0, TRUE, DUPLICATE_SAME_ACCESS))
|
||||
+ {
|
||||
+ DuplicateHandle(GetCurrentProcess(), null, GetCurrentProcess(),
|
||||
+ out, 0, TRUE, DUPLICATE_SAME_ACCESS);
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
/***********************************************************************
|
||||
* FILE_InitProcessDosHandles
|
||||
*
|
||||
@@ -53,25 +64,21 @@ static HANDLE dos_handles[DOS_TABLE_SIZE];
|
||||
*/
|
||||
static void FILE_InitProcessDosHandles( void )
|
||||
{
|
||||
- HANDLE hStdInput, hStdOutput, hStdError, hNull;
|
||||
+ HANDLE hNull;
|
||||
static BOOL init_done /* = FALSE */;
|
||||
- HANDLE cp = GetCurrentProcess();
|
||||
|
||||
if (init_done) return;
|
||||
init_done = TRUE;
|
||||
- hStdInput = GetStdHandle(STD_INPUT_HANDLE);
|
||||
- hStdOutput = GetStdHandle(STD_OUTPUT_HANDLE);
|
||||
- hStdError = GetStdHandle(STD_ERROR_HANDLE);
|
||||
+
|
||||
hNull = CreateFileA("NUL", GENERIC_READ|GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, 0);
|
||||
+
|
||||
/* Invalid console handles need to translate to real DOS handles in a new process */
|
||||
- if (!hStdInput) hStdInput = hNull;
|
||||
- if (!hStdOutput) hStdOutput = hNull;
|
||||
- if (!hStdError) hStdError = hNull;
|
||||
- DuplicateHandle(cp, hStdInput, cp, &dos_handles[0], 0, TRUE, DUPLICATE_SAME_ACCESS);
|
||||
- DuplicateHandle(cp, hStdOutput, cp, &dos_handles[1], 0, TRUE, DUPLICATE_SAME_ACCESS);
|
||||
- DuplicateHandle(cp, hStdError, cp, &dos_handles[2], 0, TRUE, DUPLICATE_SAME_ACCESS);
|
||||
- DuplicateHandle(cp, hStdError, cp, &dos_handles[3], 0, TRUE, DUPLICATE_SAME_ACCESS);
|
||||
- DuplicateHandle(cp, hStdError, cp, &dos_handles[4], 0, TRUE, DUPLICATE_SAME_ACCESS);
|
||||
+ set_standard_handle(&dos_handles[0], hNull, GetStdHandle(STD_INPUT_HANDLE));
|
||||
+ set_standard_handle(&dos_handles[1], hNull, GetStdHandle(STD_OUTPUT_HANDLE));
|
||||
+ set_standard_handle(&dos_handles[2], hNull, GetStdHandle(STD_ERROR_HANDLE));
|
||||
+ set_standard_handle(&dos_handles[3], hNull, GetStdHandle(STD_ERROR_HANDLE));
|
||||
+ set_standard_handle(&dos_handles[4], hNull, GetStdHandle(STD_ERROR_HANDLE));
|
||||
+
|
||||
CloseHandle(hNull);
|
||||
}
|
||||
|
||||
--
|
||||
2.7.1
|
||||
|
@@ -1 +0,0 @@
|
||||
Fixes: [7106] Translate all invalid console handles into usable DOS handles
|
@@ -1,4 +1,4 @@
|
||||
From 10df8c207e3e880bd578392e266a191e6b8ef9dd Mon Sep 17 00:00:00 2001
|
||||
From d4f9fa0c33b6a414fe3b6c604f3039e98d416263 Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Tue, 9 Jul 2019 14:13:28 +1000
|
||||
Subject: [PATCH] user32: Do not enumerate the registry in
|
||||
@@ -13,10 +13,10 @@ not the complete list from the registry.
|
||||
3 files changed, 36 insertions(+), 33 deletions(-)
|
||||
|
||||
diff --git a/dlls/user32/input.c b/dlls/user32/input.c
|
||||
index 8f3cd8acae7..072f1fab23a 100644
|
||||
index 1fff29c7f87..9bf65573d87 100644
|
||||
--- a/dlls/user32/input.c
|
||||
+++ b/dlls/user32/input.c
|
||||
@@ -499,7 +499,6 @@ BOOL WINAPI UnloadKeyboardLayout( HKL layout )
|
||||
@@ -486,7 +486,6 @@ BOOL WINAPI UnloadKeyboardLayout( HKL layout )
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -25,10 +25,10 @@ index 8f3cd8acae7..072f1fab23a 100644
|
||||
{
|
||||
SendMessageTimeoutW(handle, WM_DEVICECHANGE, flags, (LPARAM)header, SMTO_ABORTIFHUNG, 2000, NULL);
|
||||
diff --git a/dlls/user32/tests/input.c b/dlls/user32/tests/input.c
|
||||
index d48440a20be..3a5df122ff4 100644
|
||||
index 350baff600d..27066fc46f4 100644
|
||||
--- a/dlls/user32/tests/input.c
|
||||
+++ b/dlls/user32/tests/input.c
|
||||
@@ -5215,6 +5215,40 @@ static void test_keyboard_ll_hook_blocking(void)
|
||||
@@ -5542,6 +5542,40 @@ static void test_keyboard_ll_hook_blocking(void)
|
||||
ok_ret( 1, DestroyWindow( hwnd ) );
|
||||
}
|
||||
|
||||
@@ -69,19 +69,19 @@ index d48440a20be..3a5df122ff4 100644
|
||||
/* run the tests in a separate desktop to avoid interaction with other
|
||||
* tests, current desktop state, or user actions. */
|
||||
static void test_input_desktop( char **argv )
|
||||
@@ -5279,6 +5313,7 @@ START_TEST(input)
|
||||
test_GetRawInputBuffer();
|
||||
test_RegisterRawInputDevices();
|
||||
@@ -5633,6 +5667,7 @@ START_TEST(input)
|
||||
test_GetKeyState();
|
||||
test_OemKeyScan();
|
||||
test_rawinput(argv[0]);
|
||||
+ test_GetKeyboardLayoutList();
|
||||
test_DefRawInputProc();
|
||||
|
||||
if(pGetMouseMovePointsEx)
|
||||
diff --git a/dlls/win32u/input.c b/dlls/win32u/input.c
|
||||
index aaaac12ce36..85820a74aba 100644
|
||||
index ef8d564c264..9a7c58f359d 100644
|
||||
--- a/dlls/win32u/input.c
|
||||
+++ b/dlls/win32u/input.c
|
||||
@@ -1280,11 +1280,7 @@ HKL WINAPI NtUserActivateKeyboardLayout( HKL layout, UINT flags )
|
||||
@@ -1267,11 +1267,7 @@ HKL WINAPI NtUserActivateKeyboardLayout( HKL layout, UINT flags )
|
||||
*/
|
||||
UINT WINAPI NtUserGetKeyboardLayoutList( INT size, HKL *layouts )
|
||||
{
|
||||
@@ -94,7 +94,7 @@ index aaaac12ce36..85820a74aba 100644
|
||||
HKL layout;
|
||||
|
||||
TRACE_(keyboard)( "size %d, layouts %p.\n", size, layouts );
|
||||
@@ -1298,33 +1294,6 @@ UINT WINAPI NtUserGetKeyboardLayoutList( INT size, HKL *layouts )
|
||||
@@ -1285,33 +1281,6 @@ UINT WINAPI NtUserGetKeyboardLayoutList( INT size, HKL *layouts )
|
||||
if (size && layouts)
|
||||
{
|
||||
layouts[count - 1] = layout;
|
||||
|
@@ -1,90 +0,0 @@
|
||||
From efbadece6648c4164d5e24070cb8aa2cb2440cc4 Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Tue, 25 Oct 2022 11:26:04 +1100
|
||||
Subject: [PATCH] include: Add ntifs.h
|
||||
|
||||
Moved here since I forgot to add it during a rebase.
|
||||
---
|
||||
include/ntifs.h | 70 +++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 70 insertions(+)
|
||||
create mode 100644 include/ntifs.h
|
||||
|
||||
diff --git a/include/ntifs.h b/include/ntifs.h
|
||||
new file mode 100644
|
||||
index 00000000000..25af12a413a
|
||||
--- /dev/null
|
||||
+++ b/include/ntifs.h
|
||||
@@ -0,0 +1,70 @@
|
||||
+/*
|
||||
+ * Win32 definitions for Windows NT
|
||||
+ *
|
||||
+ * Copyright 2012 Erich E. Hoover
|
||||
+ *
|
||||
+ * This library is free software; you can redistribute it and/or
|
||||
+ * modify it under the terms of the GNU Lesser General Public
|
||||
+ * License as published by the Free Software Foundation; either
|
||||
+ * version 2.1 of the License, or (at your option) any later version.
|
||||
+ *
|
||||
+ * This library is distributed in the hope that it will be useful,
|
||||
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
+ * Lesser General Public License for more details.
|
||||
+ *
|
||||
+ * You should have received a copy of the GNU Lesser General Public
|
||||
+ * License along with this library; if not, write to the Free Software
|
||||
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
+ */
|
||||
+
|
||||
+#ifndef __WINE_NTIFS_H
|
||||
+#define __WINE_NTIFS_H
|
||||
+
|
||||
+#include <pshpack2.h>
|
||||
+typedef struct _REPARSE_DATA_BUFFER {
|
||||
+ ULONG ReparseTag;
|
||||
+ USHORT ReparseDataLength;
|
||||
+ USHORT Reserved;
|
||||
+ union {
|
||||
+ struct {
|
||||
+ USHORT SubstituteNameOffset;
|
||||
+ USHORT SubstituteNameLength;
|
||||
+ USHORT PrintNameOffset;
|
||||
+ USHORT PrintNameLength;
|
||||
+ ULONG Flags;
|
||||
+ WCHAR PathBuffer[1];
|
||||
+ } SymbolicLinkReparseBuffer;
|
||||
+ struct {
|
||||
+ USHORT SubstituteNameOffset;
|
||||
+ USHORT SubstituteNameLength;
|
||||
+ USHORT PrintNameOffset;
|
||||
+ USHORT PrintNameLength;
|
||||
+ WCHAR PathBuffer[1];
|
||||
+ } MountPointReparseBuffer;
|
||||
+ struct {
|
||||
+ ULONG Version;
|
||||
+ UCHAR PathBuffer[1];
|
||||
+ } LinuxSymbolicLinkReparseBuffer;
|
||||
+ struct {
|
||||
+ UCHAR DataBuffer[1];
|
||||
+ } GenericReparseBuffer;
|
||||
+ };
|
||||
+} REPARSE_DATA_BUFFER, *PREPARSE_DATA_BUFFER;
|
||||
+#include <poppack.h>
|
||||
+
|
||||
+typedef struct _REPARSE_GUID_DATA_BUFFER {
|
||||
+ DWORD ReparseTag;
|
||||
+ WORD ReparseDataLength;
|
||||
+ WORD Reserved;
|
||||
+ GUID ReparseGuid;
|
||||
+ struct {
|
||||
+ BYTE DataBuffer[1];
|
||||
+ } GenericReparseBuffer;
|
||||
+} REPARSE_GUID_DATA_BUFFER, *PREPARSE_GUID_DATA_BUFFER;
|
||||
+
|
||||
+#define REPARSE_GUID_DATA_BUFFER_HEADER_SIZE FIELD_OFFSET(REPARSE_GUID_DATA_BUFFER, GenericReparseBuffer)
|
||||
+
|
||||
+#define SYMLINK_FLAG_RELATIVE 0x00000001
|
||||
+
|
||||
+#endif /* __WINE_NTIFS_H */
|
||||
--
|
||||
2.37.2
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From dbd70302047bc3c592882cb6d93f6251f49e27c7 Mon Sep 17 00:00:00 2001
|
||||
From ed0b9682a8e134eeefa4186b930a92843383b8b1 Mon Sep 17 00:00:00 2001
|
||||
From: "Erich E. Hoover" <erich.e.hoover@gmail.com>
|
||||
Date: Thu, 16 Jan 2014 20:56:49 -0700
|
||||
Subject: [PATCH] ntdll: Add support for creating reparse points.
|
||||
@@ -9,14 +9,14 @@ Signed-off-by: Erich E. Hoover <erich.e.hoover@gmail.com>
|
||||
dlls/ntdll/Makefile.in | 2 +-
|
||||
dlls/ntdll/tests/file.c | 159 ++++++++++++++++++---
|
||||
dlls/ntdll/unix/file.c | 302 ++++++++++++++++++++++++++++++++++++++++
|
||||
include/Makefile.in | 1 +
|
||||
5 files changed, 447 insertions(+), 19 deletions(-)
|
||||
include/ddk/ntifs.h | 5 +
|
||||
5 files changed, 451 insertions(+), 19 deletions(-)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 0b57210400b..e2f8d2ddfe3 100644
|
||||
index 475743bc121..c82d6ec371b 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -2044,6 +2044,8 @@ AC_CHECK_FUNCS(\
|
||||
@@ -2089,6 +2089,8 @@ AC_CHECK_FUNCS(\
|
||||
prctl \
|
||||
proc_pidinfo \
|
||||
sched_yield \
|
||||
@@ -26,7 +26,7 @@ index 0b57210400b..e2f8d2ddfe3 100644
|
||||
setprogname \
|
||||
sigprocmask \
|
||||
diff --git a/dlls/ntdll/Makefile.in b/dlls/ntdll/Makefile.in
|
||||
index 2e862c68b7e..f8ca3e689ec 100644
|
||||
index d3f2a0e5523..74e6da5bb56 100644
|
||||
--- a/dlls/ntdll/Makefile.in
|
||||
+++ b/dlls/ntdll/Makefile.in
|
||||
@@ -4,7 +4,7 @@ UNIXLIB = ntdll.so
|
||||
@@ -39,18 +39,18 @@ index 2e862c68b7e..f8ca3e689ec 100644
|
||||
EXTRADLLFLAGS = -nodefaultlibs
|
||||
i386_EXTRADLLFLAGS = -Wl,--image-base,0x7bc00000
|
||||
diff --git a/dlls/ntdll/tests/file.c b/dlls/ntdll/tests/file.c
|
||||
index d4d80efe13b..592d7815026 100644
|
||||
index da3611f74f2..5889bebace4 100644
|
||||
--- a/dlls/ntdll/tests/file.c
|
||||
+++ b/dlls/ntdll/tests/file.c
|
||||
@@ -38,6 +38,7 @@
|
||||
#include "winuser.h"
|
||||
#include "winioctl.h"
|
||||
#include "winnls.h"
|
||||
+#include "ntifs.h"
|
||||
+#include "ddk/ntifs.h"
|
||||
|
||||
#ifndef IO_COMPLETION_ALL_ACCESS
|
||||
#define IO_COMPLETION_ALL_ACCESS 0x001F0003
|
||||
@@ -5574,32 +5575,154 @@ static void test_mailslot_name(void)
|
||||
@@ -5803,32 +5804,154 @@ static void test_mailslot_name(void)
|
||||
CloseHandle( device );
|
||||
}
|
||||
|
||||
@@ -222,7 +222,7 @@ index d4d80efe13b..592d7815026 100644
|
||||
}
|
||||
|
||||
START_TEST(file)
|
||||
@@ -5675,6 +5798,6 @@ START_TEST(file)
|
||||
@@ -5908,6 +6031,6 @@ START_TEST(file)
|
||||
test_ioctl();
|
||||
test_query_ea();
|
||||
test_flush_buffers_file();
|
||||
@@ -231,7 +231,7 @@ index d4d80efe13b..592d7815026 100644
|
||||
+ test_mailslot_name();
|
||||
}
|
||||
diff --git a/dlls/ntdll/unix/file.c b/dlls/ntdll/unix/file.c
|
||||
index eef21e12ceb..fbb33442460 100644
|
||||
index ee68e4dee9b..2b5ab4e232a 100644
|
||||
--- a/dlls/ntdll/unix/file.c
|
||||
+++ b/dlls/ntdll/unix/file.c
|
||||
@@ -36,6 +36,8 @@
|
||||
@@ -247,7 +247,7 @@ index eef21e12ceb..fbb33442460 100644
|
||||
#include "wine/list.h"
|
||||
#include "wine/debug.h"
|
||||
#include "unix_private.h"
|
||||
+#include "ntifs.h"
|
||||
+#include "ddk/ntifs.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(file);
|
||||
WINE_DECLARE_DEBUG_CHANNEL(winediag);
|
||||
@@ -389,7 +389,7 @@ index eef21e12ceb..fbb33442460 100644
|
||||
static BOOL fd_is_mount_point( int fd, const struct stat *st )
|
||||
{
|
||||
struct stat parent;
|
||||
@@ -3339,6 +3459,181 @@ done:
|
||||
@@ -3335,6 +3455,181 @@ done:
|
||||
}
|
||||
|
||||
|
||||
@@ -571,7 +571,7 @@ index eef21e12ceb..fbb33442460 100644
|
||||
/******************************************************************************
|
||||
* lookup_unix_name
|
||||
*
|
||||
@@ -6127,6 +6422,13 @@ NTSTATUS WINAPI NtFsControlFile( HANDLE handle, HANDLE event, PIO_APC_ROUTINE ap
|
||||
@@ -6153,6 +6448,13 @@ NTSTATUS WINAPI NtFsControlFile( HANDLE handle, HANDLE event, PIO_APC_ROUTINE ap
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -585,18 +585,22 @@ index eef21e12ceb..fbb33442460 100644
|
||||
case FSCTL_SET_SPARSE:
|
||||
TRACE("FSCTL_SET_SPARSE: Ignoring request\n");
|
||||
io->Information = 0;
|
||||
diff --git a/include/Makefile.in b/include/Makefile.in
|
||||
index 5fd20858aee..53561e66c3e 100644
|
||||
--- a/include/Makefile.in
|
||||
+++ b/include/Makefile.in
|
||||
@@ -576,6 +576,7 @@ SOURCES = \
|
||||
ntdef.h \
|
||||
ntdsapi.h \
|
||||
ntgdi.h \
|
||||
+ ntifs.h \
|
||||
ntioring_x.h \
|
||||
ntlsa.h \
|
||||
ntquery.h \
|
||||
diff --git a/include/ddk/ntifs.h b/include/ddk/ntifs.h
|
||||
index 980235abdc9..90248b4897c 100644
|
||||
--- a/include/ddk/ntifs.h
|
||||
+++ b/include/ddk/ntifs.h
|
||||
@@ -166,6 +166,11 @@ typedef struct _REPARSE_DATA_BUFFER
|
||||
WCHAR PathBuffer[1];
|
||||
} MountPointReparseBuffer;
|
||||
|
||||
+ struct {
|
||||
+ ULONG Version;
|
||||
+ UCHAR PathBuffer[1];
|
||||
+ } LinuxSymbolicLinkReparseBuffer;
|
||||
+
|
||||
struct
|
||||
{
|
||||
UCHAR DataBuffer[1];
|
||||
--
|
||||
2.40.1
|
||||
2.43.0
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From c58ac24e08827a2b5aac12f365197d1c5174db3a Mon Sep 17 00:00:00 2001
|
||||
From 5306b83f69d37bf99110fc1b662fccc89552be3d Mon Sep 17 00:00:00 2001
|
||||
From: "Erich E. Hoover" <erich.e.hoover@gmail.com>
|
||||
Date: Thu, 16 Jan 2014 21:02:11 -0700
|
||||
Subject: [PATCH] server: Implement FILE_OPEN_REPARSE_POINT option.
|
||||
@@ -6,11 +6,11 @@ Subject: [PATCH] server: Implement FILE_OPEN_REPARSE_POINT option.
|
||||
Signed-off-by: Erich E. Hoover <erich.e.hoover@gmail.com>
|
||||
---
|
||||
dlls/kernelbase/file.c | 2 +
|
||||
server/fd.c | 152 +++++++++++++++++++++++++++++++++++++++--
|
||||
2 files changed, 147 insertions(+), 7 deletions(-)
|
||||
server/fd.c | 147 +++++++++++++++++++++++++++++++++++++++--
|
||||
2 files changed, 142 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/dlls/kernelbase/file.c b/dlls/kernelbase/file.c
|
||||
index 7c2e132bdcb..2a8dc8df875 100644
|
||||
index e1ba92a6448..04cb6760872 100644
|
||||
--- a/dlls/kernelbase/file.c
|
||||
+++ b/dlls/kernelbase/file.c
|
||||
@@ -732,6 +732,8 @@ static UINT get_nt_file_options( DWORD attributes )
|
||||
@@ -23,7 +23,7 @@ index 7c2e132bdcb..2a8dc8df875 100644
|
||||
}
|
||||
|
||||
diff --git a/server/fd.c b/server/fd.c
|
||||
index 0b0e91ebfbb..233c9eb94ef 100644
|
||||
index 8576882aaa9..0d5964b2427 100644
|
||||
--- a/server/fd.c
|
||||
+++ b/server/fd.c
|
||||
@@ -31,6 +31,7 @@
|
||||
@@ -45,7 +45,48 @@ index 0b0e91ebfbb..233c9eb94ef 100644
|
||||
#if defined(HAVE_SYS_EPOLL_H) && defined(HAVE_EPOLL_CREATE)
|
||||
# include <sys/epoll.h>
|
||||
# define USE_EPOLL
|
||||
@@ -1152,6 +1157,59 @@ static void inode_dump( struct object *obj, int verbose )
|
||||
@@ -1066,6 +1071,9 @@ static void device_destroy( struct object *obj )
|
||||
list_remove( &device->entry ); /* remove it from the hash table */
|
||||
}
|
||||
|
||||
+static int is_reparse_dir( const char *path, int *is_dir );
|
||||
+static int rmdir_recursive( int dir_fd, const char *pathname );
|
||||
+
|
||||
/****************************************************************/
|
||||
/* inode functions */
|
||||
|
||||
@@ -1073,10 +1081,29 @@ static void unlink_closed_fd( struct inode *inode, struct closed_fd *fd )
|
||||
{
|
||||
/* make sure it is still the same file */
|
||||
struct stat st;
|
||||
- if (!stat( fd->unix_name, &st ) && st.st_dev == inode->device->dev && st.st_ino == inode->ino)
|
||||
+ if (!lstat( fd->unix_name, &st ) && st.st_dev == inode->device->dev && st.st_ino == inode->ino)
|
||||
{
|
||||
+ int is_reparse_point = (is_reparse_dir( fd->unix_name, NULL ) == 0);
|
||||
if (S_ISDIR(st.st_mode)) rmdir( fd->unix_name );
|
||||
else unlink( fd->unix_name );
|
||||
+ /* remove reparse point metadata (if applicable) */
|
||||
+ if (is_reparse_point)
|
||||
+ {
|
||||
+ char tmp[PATH_MAX], metadata_path[PATH_MAX], *p;
|
||||
+
|
||||
+ strcpy( tmp, fd->unix_name );
|
||||
+ p = dirname( tmp );
|
||||
+ if (p != tmp ) strcpy( tmp, p );
|
||||
+ strcpy( metadata_path, tmp );
|
||||
+ strcat( metadata_path, "/.REPARSE_POINT/" );
|
||||
+ strcpy( tmp, fd->unix_name );
|
||||
+ p = basename( tmp );
|
||||
+ if (p != tmp) strcpy( tmp, p );
|
||||
+ strcat( metadata_path, tmp );
|
||||
+
|
||||
+ rmdir_recursive( AT_FDCWD, metadata_path );
|
||||
+ rmdir( dirname( metadata_path ) );
|
||||
+ }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1115,6 +1142,59 @@ static void inode_dump( struct object *obj, int verbose )
|
||||
fprintf( stderr, "\n" );
|
||||
}
|
||||
|
||||
@@ -105,43 +146,7 @@ index 0b0e91ebfbb..233c9eb94ef 100644
|
||||
static void inode_destroy( struct object *obj )
|
||||
{
|
||||
struct inode *inode = (struct inode *)obj;
|
||||
@@ -1168,7 +1226,34 @@ static void inode_destroy( struct object *obj )
|
||||
list_remove( ptr );
|
||||
if (fd->unix_fd != -1) close( fd->unix_fd );
|
||||
if (fd->disp_flags & FILE_DISPOSITION_DELETE)
|
||||
- unlink_closed_fd( inode, fd );
|
||||
+ {
|
||||
+ /* make sure it is still the same file */
|
||||
+ struct stat st;
|
||||
+ if (!lstat( fd->unix_name, &st ) && st.st_dev == inode->device->dev && st.st_ino == inode->ino)
|
||||
+ {
|
||||
+ int is_reparse_point = (is_reparse_dir( fd->unix_name, NULL ) == 0);
|
||||
+ if (S_ISDIR(st.st_mode)) rmdir( fd->unix_name );
|
||||
+ else unlink_closed_fd( inode, fd );
|
||||
+ /* remove reparse point metadata (if applicable) */
|
||||
+ if (is_reparse_point)
|
||||
+ {
|
||||
+ char tmp[PATH_MAX], metadata_path[PATH_MAX], *p;
|
||||
+
|
||||
+ strcpy( tmp, fd->unix_name );
|
||||
+ p = dirname( tmp );
|
||||
+ if (p != tmp ) strcpy( tmp, p );
|
||||
+ strcpy( metadata_path, tmp );
|
||||
+ strcat( metadata_path, "/.REPARSE_POINT/" );
|
||||
+ strcpy( tmp, fd->unix_name );
|
||||
+ p = basename( tmp );
|
||||
+ if (p != tmp) strcpy( tmp, p );
|
||||
+ strcat( metadata_path, tmp );
|
||||
+
|
||||
+ rmdir_recursive( AT_FDCWD, metadata_path );
|
||||
+ rmdir( dirname( metadata_path ) );
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
free( fd->unix_name );
|
||||
free( fd );
|
||||
}
|
||||
@@ -1902,6 +1987,38 @@ void get_nt_name( struct fd *fd, struct unicode_str *name )
|
||||
@@ -1870,6 +1950,38 @@ void get_nt_name( struct fd *fd, struct unicode_str *name )
|
||||
name->len = fd->nt_namelen;
|
||||
}
|
||||
|
||||
@@ -180,7 +185,7 @@ index 0b0e91ebfbb..233c9eb94ef 100644
|
||||
/* open() wrapper that returns a struct fd with no fd user set */
|
||||
struct fd *open_fd( struct fd *root, const char *name, struct unicode_str nt_name,
|
||||
int flags, mode_t *mode, unsigned int access,
|
||||
@@ -1962,6 +2079,15 @@ struct fd *open_fd( struct fd *root, const char *name, struct unicode_str nt_nam
|
||||
@@ -1930,6 +2042,15 @@ struct fd *open_fd( struct fd *root, const char *name, struct unicode_str nt_nam
|
||||
}
|
||||
else rw_mode = O_RDONLY;
|
||||
|
||||
@@ -196,7 +201,7 @@ index 0b0e91ebfbb..233c9eb94ef 100644
|
||||
if ((fd->unix_fd = open( name, rw_mode | (flags & ~O_TRUNC), *mode )) == -1)
|
||||
{
|
||||
/* if we tried to open a directory for write access, retry read-only */
|
||||
@@ -1986,7 +2112,7 @@ struct fd *open_fd( struct fd *root, const char *name, struct unicode_str nt_nam
|
||||
@@ -1954,7 +2075,7 @@ struct fd *open_fd( struct fd *root, const char *name, struct unicode_str nt_nam
|
||||
fd->unix_name = NULL;
|
||||
if ((path = dup_fd_name( root, name )))
|
||||
{
|
||||
@@ -205,7 +210,7 @@ index 0b0e91ebfbb..233c9eb94ef 100644
|
||||
free( path );
|
||||
}
|
||||
|
||||
@@ -1997,10 +2123,11 @@ struct fd *open_fd( struct fd *root, const char *name, struct unicode_str nt_nam
|
||||
@@ -1965,10 +2086,11 @@ struct fd *open_fd( struct fd *root, const char *name, struct unicode_str nt_nam
|
||||
*mode = st.st_mode;
|
||||
|
||||
/* only bother with an inode for normal files and directories */
|
||||
@@ -218,7 +223,7 @@ index 0b0e91ebfbb..233c9eb94ef 100644
|
||||
|
||||
if (!inode)
|
||||
{
|
||||
@@ -2015,13 +2142,17 @@ struct fd *open_fd( struct fd *root, const char *name, struct unicode_str nt_nam
|
||||
@@ -1983,13 +2105,17 @@ struct fd *open_fd( struct fd *root, const char *name, struct unicode_str nt_nam
|
||||
list_add_head( &inode->open, &fd->inode_entry );
|
||||
closed_fd = NULL;
|
||||
|
||||
@@ -238,7 +243,7 @@ index 0b0e91ebfbb..233c9eb94ef 100644
|
||||
{
|
||||
set_error( STATUS_FILE_IS_A_DIRECTORY );
|
||||
goto error;
|
||||
@@ -2454,6 +2585,7 @@ static struct fd *get_handle_fd_obj( struct process *process, obj_handle_t handl
|
||||
@@ -2436,6 +2562,7 @@ static struct fd *get_handle_fd_obj( struct process *process, obj_handle_t handl
|
||||
|
||||
static int is_dir_empty( int fd )
|
||||
{
|
||||
@@ -246,7 +251,7 @@ index 0b0e91ebfbb..233c9eb94ef 100644
|
||||
DIR *dir;
|
||||
int empty;
|
||||
struct dirent *de;
|
||||
@@ -2461,8 +2593,13 @@ static int is_dir_empty( int fd )
|
||||
@@ -2443,8 +2570,13 @@ static int is_dir_empty( int fd )
|
||||
if ((fd = dup( fd )) == -1)
|
||||
return -1;
|
||||
|
||||
@@ -261,7 +266,7 @@ index 0b0e91ebfbb..233c9eb94ef 100644
|
||||
close( fd );
|
||||
return -1;
|
||||
}
|
||||
@@ -2474,6 +2611,7 @@ static int is_dir_empty( int fd )
|
||||
@@ -2456,6 +2588,7 @@ static int is_dir_empty( int fd )
|
||||
empty = 0;
|
||||
}
|
||||
closedir( dir );
|
||||
@@ -269,7 +274,7 @@ index 0b0e91ebfbb..233c9eb94ef 100644
|
||||
return empty;
|
||||
}
|
||||
|
||||
@@ -2512,7 +2650,7 @@ static void set_fd_disposition( struct fd *fd, unsigned int flags )
|
||||
@@ -2494,7 +2627,7 @@ static void set_fd_disposition( struct fd *fd, unsigned int flags )
|
||||
file_set_error();
|
||||
return;
|
||||
}
|
||||
@@ -279,5 +284,5 @@ index 0b0e91ebfbb..233c9eb94ef 100644
|
||||
if (!(flags & FILE_DISPOSITION_IGNORE_READONLY_ATTRIBUTE) &&
|
||||
!(st.st_mode & (S_IWUSR | S_IWGRP | S_IWOTH)))
|
||||
--
|
||||
2.40.1
|
||||
2.43.0
|
||||
|
||||
|
@@ -1,7 +1,8 @@
|
||||
From f3234130493d1d99545a46e262646c1486e9de86 Mon Sep 17 00:00:00 2001
|
||||
From 236c1c30f4cf4550a6fc50d3a5be050ec79bac53 Mon Sep 17 00:00:00 2001
|
||||
From: "Erich E. Hoover" <erich.e.hoover@wine-staging.com>
|
||||
Date: Sat, 6 Feb 2021 16:16:17 -0700
|
||||
Subject: ntdll: Add an intermediary prefix symlink in reparse point metadata.
|
||||
Subject: [PATCH] ntdll: Add an intermediary prefix symlink in reparse point
|
||||
metadata.
|
||||
|
||||
Signed-off-by: Erich E. Hoover <erich.e.hoover@gmail.com>
|
||||
---
|
||||
@@ -9,10 +10,10 @@ Signed-off-by: Erich E. Hoover <erich.e.hoover@gmail.com>
|
||||
1 file changed, 39 insertions(+)
|
||||
|
||||
diff --git a/dlls/ntdll/unix/file.c b/dlls/ntdll/unix/file.c
|
||||
index 980251b8bbf..f298b1f7a6c 100644
|
||||
index 5d7095086d9..6422bdc5ec1 100644
|
||||
--- a/dlls/ntdll/unix/file.c
|
||||
+++ b/dlls/ntdll/unix/file.c
|
||||
@@ -3545,6 +3545,18 @@ static NTSTATUS get_reparse_target( UNICODE_STRING *nt_target, REPARSE_DATA_BUFF
|
||||
@@ -3577,6 +3577,18 @@ static NTSTATUS get_reparse_target( UNICODE_STRING *nt_target, REPARSE_DATA_BUFF
|
||||
}
|
||||
|
||||
|
||||
@@ -31,7 +32,7 @@ index 980251b8bbf..f298b1f7a6c 100644
|
||||
/* add a symlink to the unix target at the last point of the reparse point metadata */
|
||||
NTSTATUS create_reparse_target( int dirfd, const char *unix_src, int depth, const char *link_path,
|
||||
REPARSE_DATA_BUFFER *buffer )
|
||||
@@ -3639,6 +3651,8 @@ NTSTATUS create_reparse_target( int dirfd, const char *unix_src, int depth, cons
|
||||
@@ -3671,6 +3683,8 @@ NTSTATUS create_reparse_target( int dirfd, const char *unix_src, int depth, cons
|
||||
/* create the symlink to the target at the last metadata location */
|
||||
if (status == STATUS_SUCCESS || status == STATUS_NO_SUCH_FILE)
|
||||
{
|
||||
@@ -40,20 +41,20 @@ index 980251b8bbf..f298b1f7a6c 100644
|
||||
int relative_offset;
|
||||
|
||||
target_path[0] = 0;
|
||||
@@ -3648,8 +3662,21 @@ NTSTATUS create_reparse_target( int dirfd, const char *unix_src, int depth, cons
|
||||
@@ -3680,8 +3694,21 @@ NTSTATUS create_reparse_target( int dirfd, const char *unix_src, int depth, cons
|
||||
relative_offset = 0;
|
||||
is_relative = FALSE;
|
||||
}
|
||||
+ else if (find_prefix_end( unix_target, &relative_offset ))
|
||||
+ {
|
||||
+ char prefix_link[MAX_PATH];
|
||||
+ char prefix_link[PATH_MAX];
|
||||
+
|
||||
+ append_prefix = TRUE;
|
||||
+ is_relative = FALSE;
|
||||
+ strcpy( prefix_link, link_path );
|
||||
+ prefix_link[strlen(prefix_link)-1] = 0;
|
||||
+ strcat( prefix_link, prefix_string );
|
||||
+ symlink( config_dir, prefix_link );
|
||||
+ symlinkat( config_dir, dirfd, prefix_link );
|
||||
+ }
|
||||
for (;is_relative && depth > 0; depth--)
|
||||
strcat( target_path, "../" );
|
||||
@@ -62,7 +63,7 @@ index 980251b8bbf..f298b1f7a6c 100644
|
||||
strcat( target_path, &unix_target[relative_offset] );
|
||||
TRACE( "adding reparse point target: %s\n", target_path );
|
||||
symlinkat( target_path, dirfd, link_path );
|
||||
@@ -3855,6 +3882,7 @@ cleanup:
|
||||
@@ -3887,6 +3914,7 @@ cleanup:
|
||||
NTSTATUS get_reparse_point_unix(const char *unix_name, REPARSE_DATA_BUFFER *buffer, ULONG *size)
|
||||
{
|
||||
char link_dir[PATH_MAX], link_path[PATH_MAX], *d;
|
||||
@@ -70,7 +71,7 @@ index 980251b8bbf..f298b1f7a6c 100644
|
||||
int link_path_len, buffer_len, encoded_len;
|
||||
REPARSE_DATA_BUFFER header;
|
||||
ULONG out_size = *size;
|
||||
@@ -3953,6 +3981,17 @@ NTSTATUS get_reparse_point_unix(const char *unix_name, REPARSE_DATA_BUFFER *buff
|
||||
@@ -3985,6 +4013,17 @@ NTSTATUS get_reparse_point_unix(const char *unix_name, REPARSE_DATA_BUFFER *buff
|
||||
link_dir_fd = fd;
|
||||
}
|
||||
|
||||
@@ -89,5 +90,5 @@ index 980251b8bbf..f298b1f7a6c 100644
|
||||
*size = decode_base64url( encoded, strlen(encoded), (char*)buffer );
|
||||
status = STATUS_SUCCESS;
|
||||
--
|
||||
2.17.1
|
||||
2.43.0
|
||||
|
||||
|
@@ -168,7 +168,7 @@ index 2c261e0f57d..562440f4f8b 100644
|
||||
#include "ddk/ntddk.h"
|
||||
#include "ddk/ntddser.h"
|
||||
#include "ioringapi.h"
|
||||
+#include "ntifs.h"
|
||||
+#include "ddk/ntifs.h"
|
||||
|
||||
#include "kernelbase.h"
|
||||
#include "wine/exception.h"
|
||||
|
@@ -17,7 +17,7 @@ index a849807c76e..5b0a19b442d 100644
|
||||
#include "wcmd.h"
|
||||
#include "wine/debug.h"
|
||||
+#include "winioctl.h"
|
||||
+#include "ntifs.h"
|
||||
+#include "ddk/ntifs.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(cmd);
|
||||
|
||||
|
@@ -18,7 +18,7 @@ index dd3ae5b509b..53734b1e940 100644
|
||||
#include "wine/debug.h"
|
||||
+#include "winternl.h"
|
||||
+#include "winioctl.h"
|
||||
+#include "ntifs.h"
|
||||
+#include "ddk/ntifs.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(cmd);
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From cff2c9da12bb4fa89def37d69a6a0cd84af03139 Mon Sep 17 00:00:00 2001
|
||||
From 265b5cb7e6f676562e077181f681c40387c4d0c5 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Sun, 17 Jan 2016 00:50:50 +0100
|
||||
Subject: [PATCH] ntdll/tests: Add basic tests for RtlQueryPackageIdentity.
|
||||
@@ -20,7 +20,7 @@ index 3ca77a03053..7508e1ad796 100644
|
||||
SOURCES = \
|
||||
atom.c \
|
||||
diff --git a/dlls/ntdll/tests/rtl.c b/dlls/ntdll/tests/rtl.c
|
||||
index 442ad729540..dcdac2a936a 100644
|
||||
index 4a4370d5903..e5b74c6bfc7 100644
|
||||
--- a/dlls/ntdll/tests/rtl.c
|
||||
+++ b/dlls/ntdll/tests/rtl.c
|
||||
@@ -29,6 +29,9 @@
|
||||
@@ -42,8 +42,8 @@ index 442ad729540..dcdac2a936a 100644
|
||||
+static NTSTATUS (WINAPI *pRtlAbsoluteToSelfRelativeSD)(PSECURITY_DESCRIPTOR,PSECURITY_DESCRIPTOR,PULONG);
|
||||
static NTSTATUS (WINAPI *pLdrRegisterDllNotification)(ULONG, PLDR_DLL_NOTIFICATION_FUNCTION, void *, void **);
|
||||
static NTSTATUS (WINAPI *pLdrUnregisterDllNotification)(void *);
|
||||
|
||||
@@ -140,6 +146,9 @@ static void InitFunctionPtrs(void)
|
||||
static VOID (WINAPI *pRtlGetDeviceFamilyInfoEnum)(ULONGLONG *,DWORD *,DWORD *);
|
||||
@@ -141,6 +147,9 @@ static void InitFunctionPtrs(void)
|
||||
pRtlInitializeCriticalSectionEx = (void *)GetProcAddress(hntdll, "RtlInitializeCriticalSectionEx");
|
||||
pRtlFindExportedRoutineByName = (void *)GetProcAddress(hntdll, "RtlFindExportedRoutineByName");
|
||||
pLdrEnumerateLoadedModules = (void *)GetProcAddress(hntdll, "LdrEnumerateLoadedModules");
|
||||
@@ -52,8 +52,8 @@ index 442ad729540..dcdac2a936a 100644
|
||||
+ pRtlAbsoluteToSelfRelativeSD = (void *)GetProcAddress(hntdll, "RtlAbsoluteToSelfRelativeSD");
|
||||
pLdrRegisterDllNotification = (void *)GetProcAddress(hntdll, "LdrRegisterDllNotification");
|
||||
pLdrUnregisterDllNotification = (void *)GetProcAddress(hntdll, "LdrUnregisterDllNotification");
|
||||
}
|
||||
@@ -3613,6 +3622,76 @@ static void test_RtlFirstFreeAce(void)
|
||||
pRtlGetDeviceFamilyInfoEnum = (void *)GetProcAddress(hntdll, "RtlGetDeviceFamilyInfoEnum");
|
||||
@@ -3701,6 +3710,76 @@ static void test_RtlFirstFreeAce(void)
|
||||
HeapFree(GetProcessHeap(), 0, acl);
|
||||
}
|
||||
|
||||
@@ -130,7 +130,7 @@ index 442ad729540..dcdac2a936a 100644
|
||||
static void test_RtlInitializeSid(void)
|
||||
{
|
||||
SID_IDENTIFIER_AUTHORITY sid_ident = { SECURITY_NT_AUTHORITY };
|
||||
@@ -3707,6 +3786,7 @@ START_TEST(rtl)
|
||||
@@ -3816,6 +3895,7 @@ START_TEST(rtl)
|
||||
test_RtlInitializeCriticalSectionEx();
|
||||
test_RtlLeaveCriticalSection();
|
||||
test_LdrEnumerateLoadedModules();
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user