From 73d05ab3d436271628126a75ef08aade311b7ece Mon Sep 17 00:00:00 2001 From: libing_frank Date: Tue, 4 Jul 2023 11:39:35 +0800 Subject: [PATCH] del key Signed-off-by: libing_frank Change-Id: I6f4998e1d7049b9f6502481808168efb59308dc9 --- hardware/display/display_gralloc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hardware/display/display_gralloc.c b/hardware/display/display_gralloc.c index dad10a5..3a8dffd 100644 --- a/hardware/display/display_gralloc.c +++ b/hardware/display/display_gralloc.c @@ -153,7 +153,7 @@ static int32_t AllocShm(BufferHandle *buffer) return DISPLAY_FAILURE; } buffer->virAddr = pBase; - buffer->key = key; + buffer->fd = key; ((PriBufferHandle*)buffer)->shmid = shmid; key++; (void)memset_s(pBase, buffer->size, 0x0, buffer->size); @@ -342,7 +342,7 @@ static void *MmapShm(BufferHandle *buffer) { int32_t shmid; - shmid = shmget(buffer->key, buffer->size, IPC_EXCL | DEFAULT_READ_WRITE_PERMISSIONS); + shmid = shmget(buffer->fd, buffer->size, IPC_EXCL | DEFAULT_READ_WRITE_PERMISSIONS); if (shmid < 0) { HDF_LOGE("%s: Fail to mmap the shared memory, errno = %d", __func__, errno); return NULL; -- Gitee