summaryrefslogtreecommitdiff
path: root/utils/ipc/generators/mojom_libcamera_generator.py
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2021-11-28 05:45:34 +0200
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2021-12-04 23:05:05 +0200
commit5c85e7024027c90b1b054782e510691b8b9c7419 (patch)
tree4fa3beff65de2a9a1236ad5c931b8e2495fd6eb2 /utils/ipc/generators/mojom_libcamera_generator.py
parent3dc3e2e61e548e4cd3e213b1b3022ed4d8e7ecee (diff)
libcamera: base: Rename FileDescriptor to SharedFD
Now that we have a UniqueFD class, the name FileDescriptor is ambiguous. Rename it to SharedFD. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Hirokazu Honda <hiroh@chromium.org> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Diffstat (limited to 'utils/ipc/generators/mojom_libcamera_generator.py')
-rw-r--r--utils/ipc/generators/mojom_libcamera_generator.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/utils/ipc/generators/mojom_libcamera_generator.py b/utils/ipc/generators/mojom_libcamera_generator.py
index c609f4e5..753bfc73 100644
--- a/utils/ipc/generators/mojom_libcamera_generator.py
+++ b/utils/ipc/generators/mojom_libcamera_generator.py
@@ -77,7 +77,7 @@ def GetDefaultValue(element):
if mojom.IsEnumKind(element.kind):
return f'static_cast<{element.kind.mojom_name}>(0)'
if isinstance(element.kind, mojom.Struct) and \
- element.kind.mojom_name == 'FileDescriptor':
+ element.kind.mojom_name == 'SharedFD':
return '-1'
return ''
@@ -140,7 +140,7 @@ def HasFd(element):
types = GetAllTypes(element)
else:
types = GetAllTypes(element.kind)
- return "FileDescriptor" in types or (attrs is not None and "hasFd" in attrs)
+ return "SharedFD" in types or (attrs is not None and "hasFd" in attrs)
def WithDefaultValues(element):
return [x for x in element if HasDefaultValue(x)]
@@ -221,7 +221,7 @@ def IsEnum(element):
return mojom.IsEnumKind(element.kind)
def IsFd(element):
- return mojom.IsStructKind(element.kind) and element.kind.mojom_name == "FileDescriptor"
+ return mojom.IsStructKind(element.kind) and element.kind.mojom_name == "SharedFD"
def IsMap(element):
return mojom.IsMapKind(element.kind)