Skip to content
Snippets Groups Projects
Select Git revision
  • master default protected
  • early-display
  • variant-emmc-nvme-boot
  • 2023-01-25
  • v3
  • variant-emmc-nvme-boot
  • 2020-06-01
7 results

libfdt.h

Blame
  • Forked from Reform / reform-boundary-uboot
    Source project has a limited visibility.
    • David Gibson's avatar
      0219399a
      libfdt: Implement fdt_get_property_namelen() and fdt_getprop_namelen() · 0219399a
      David Gibson authored
      
      As well as fdt_subnode_offset(), libfdt includes an
      fdt_subnode_offset_namelen() function that takes the subnode name to
      look up not as a NUL-terminated string, but as a string with an
      explicit length.  This can be useful when the caller has the name as
      part of a longer string, such as a full path.
      
      However, we don't have corresponding 'namelen' versions for
      fdt_get_property() and fdt_getprop().  There are less obvious use
      cases for these variants on property names, but there are
      circumstances where they can be useful e.g. looking up property names
      which need to be parsed from a longer string buffer such as user input
      or a configuration file, or looking up an alias in a path with
      IEEE1275 style aliases.
      
      So, since it's very easy to implement such variants, this patch does
      so.  The original NUL-terminated variants are, of course, implemented
      in terms of the namelen versions.
      
      Signed-off-by: default avatarDavid Gibson <david@gibson.dropbear.id.au>
      0219399a
      History
      libfdt: Implement fdt_get_property_namelen() and fdt_getprop_namelen()
      David Gibson authored
      
      As well as fdt_subnode_offset(), libfdt includes an
      fdt_subnode_offset_namelen() function that takes the subnode name to
      look up not as a NUL-terminated string, but as a string with an
      explicit length.  This can be useful when the caller has the name as
      part of a longer string, such as a full path.
      
      However, we don't have corresponding 'namelen' versions for
      fdt_get_property() and fdt_getprop().  There are less obvious use
      cases for these variants on property names, but there are
      circumstances where they can be useful e.g. looking up property names
      which need to be parsed from a longer string buffer such as user input
      or a configuration file, or looking up an alias in a path with
      IEEE1275 style aliases.
      
      So, since it's very easy to implement such variants, this patch does
      so.  The original NUL-terminated variants are, of course, implemented
      in terms of the namelen versions.
      
      Signed-off-by: default avatarDavid Gibson <david@gibson.dropbear.id.au>