mirror of
https://github.com/X11Libre/xserver.git
synced 2026-04-14 17:18:09 +00:00
xfree86: dga: ProcXDGAOpenFramebuffer() use x_rpcbuf_t
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
committed by
Enrico Weigelt
parent
f8ad69698a
commit
a389034c2d
@@ -1184,7 +1184,6 @@ static int
|
||||
ProcXDGAOpenFramebuffer(ClientPtr client)
|
||||
{
|
||||
REQUEST(xXDGAOpenFramebufferReq);
|
||||
xXDGAOpenFramebufferReply rep;
|
||||
char *deviceName;
|
||||
int nameSize;
|
||||
|
||||
@@ -1196,9 +1195,7 @@ ProcXDGAOpenFramebuffer(ClientPtr client)
|
||||
if (!DGAAvailable(stuff->screen))
|
||||
return DGAErrorBase + XF86DGANoDirectVideoMode;
|
||||
|
||||
rep.type = X_Reply;
|
||||
rep.length = 0;
|
||||
rep.sequenceNumber = client->sequence;
|
||||
xXDGAOpenFramebufferReply rep = { 0 };
|
||||
|
||||
if (!DGAOpenFramebuffer(stuff->screen, &deviceName,
|
||||
(unsigned char **) (&rep.mem1),
|
||||
@@ -1208,13 +1205,11 @@ ProcXDGAOpenFramebuffer(ClientPtr client)
|
||||
}
|
||||
|
||||
nameSize = deviceName ? (strlen(deviceName) + 1) : 0;
|
||||
rep.length = bytes_to_int32(nameSize);
|
||||
|
||||
WriteToClient(client, sizeof(xXDGAOpenFramebufferReply), (char *) &rep);
|
||||
if (rep.length)
|
||||
WriteToClient(client, nameSize, deviceName);
|
||||
x_rpcbuf_t rpcbuf = { .swapped = client->swapped, .err_clear = TRUE };
|
||||
x_rpcbuf_write_CARD8s(&rpcbuf, (CARD8*)deviceName, nameSize);
|
||||
|
||||
return Success;
|
||||
return X_SEND_REPLY_WITH_RPCBUF(client, rep, rpcbuf);
|
||||
}
|
||||
|
||||
static int
|
||||
|
||||
Reference in New Issue
Block a user