VirtualBox

Ignore:
Timestamp:
Apr 14, 2023 3:17:44 PM (2 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
156854
Message:

Devices/EFI/FirmwareNew: Update to edk2-stable202302 and make it build, bugref:4643

Location:
trunk/src/VBox/Devices/EFI/FirmwareNew
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/EFI/FirmwareNew

  • trunk/src/VBox/Devices/EFI/FirmwareNew/NetworkPkg/ArpDxe/ArpMain.c

    r85718 r99404  
    88
    99#include "ArpImpl.h"
    10 
    1110
    1211/**
     
    5453
    5554  if ((ConfigData != NULL) &&
    56     ((ConfigData->SwAddressLength == 0) ||
    57     (ConfigData->StationAddress == NULL) ||
    58     (ConfigData->SwAddressType <= 1500))) {
     55      ((ConfigData->SwAddressLength == 0) ||
     56       (ConfigData->StationAddress == NULL) ||
     57       (ConfigData->SwAddressType <= 1500)))
     58  {
    5959    return EFI_INVALID_PARAMETER;
    6060  }
     
    7373  return Status;
    7474}
    75 
    7675
    7776/**
     
    144143
    145144  if (((!DenyFlag) && ((TargetHwAddress == NULL) || (TargetSwAddress == NULL))) ||
    146     (DenyFlag && (TargetHwAddress != NULL) && (TargetSwAddress != NULL)) ||
    147     ((TargetHwAddress == NULL) && (TargetSwAddress == NULL))) {
     145      (DenyFlag && (TargetHwAddress != NULL) && (TargetSwAddress != NULL)) ||
     146      ((TargetHwAddress == NULL) && (TargetSwAddress == NULL)))
     147  {
    148148    return EFI_INVALID_PARAMETER;
    149149  }
     
    163163  //
    164164  MatchAddress[Hardware].Type       = SnpMode->IfType;
    165   MatchAddress[Hardware].Length     = (UINT8) SnpMode->HwAddressSize;
     165  MatchAddress[Hardware].Length     = (UINT8)SnpMode->HwAddressSize;
    166166  MatchAddress[Hardware].AddressPtr = TargetHwAddress;
    167167
     
    230230
    231231    if (CacheEntry == NULL) {
    232       DEBUG ((EFI_D_ERROR, "ArpAdd: Failed to allocate pool for CacheEntry.\n"));
     232      DEBUG ((DEBUG_ERROR, "ArpAdd: Failed to allocate pool for CacheEntry.\n"));
    233233      Status = EFI_OUT_OF_RESOURCES;
    234234      goto UNLOCK_EXIT;
     
    271271  return Status;
    272272}
    273 
    274273
    275274/**
     
    324323
    325324  if ((This == NULL) ||
    326     (!Refresh && (EntryCount == NULL) && (EntryLength == NULL)) ||
    327     ((Entries != NULL) && ((EntryLength == NULL) || (EntryCount == NULL)))) {
    328     return EFI_INVALID_PARAMETER;
    329   }
    330 
    331   Instance   = ARP_INSTANCE_DATA_FROM_THIS (This);
     325      (!Refresh && (EntryCount == NULL) && (EntryLength == NULL)) ||
     326      ((Entries != NULL) && ((EntryLength == NULL) || (EntryCount == NULL))))
     327  {
     328    return EFI_INVALID_PARAMETER;
     329  }
     330
     331  Instance = ARP_INSTANCE_DATA_FROM_THIS (This);
    332332
    333333  if (!Instance->Configured) {
     
    354354  return Status;
    355355}
    356 
    357356
    358357/**
     
    407406}
    408407
    409 
    410408/**
    411409  This function delete all dynamic entries from the ARP cache that match the specified
     
    451449  return (Count == 0) ? EFI_NOT_FOUND : EFI_SUCCESS;
    452450}
    453 
    454451
    455452/**
     
    509506
    510507  if ((TargetSwAddress == NULL) ||
    511     ((Instance->ConfigData.SwAddressType == IPV4_ETHER_PROTO_TYPE) &&
    512     IP4_IS_LOCAL_BROADCAST (*((UINT32 *)TargetSwAddress)))) {
     508      ((Instance->ConfigData.SwAddressType == IPV4_ETHER_PROTO_TYPE) &&
     509       IP4_IS_LOCAL_BROADCAST (*((UINT32 *)TargetSwAddress))))
     510  {
    513511    //
    514512    // Return the hardware broadcast address.
     
    520518
    521519  if ((Instance->ConfigData.SwAddressType == IPV4_ETHER_PROTO_TYPE) &&
    522     IP4_IS_MULTICAST (NTOHL (*((UINT32 *)TargetSwAddress)))) {
     520      IP4_IS_MULTICAST (NTOHL (*((UINT32 *)TargetSwAddress))))
     521  {
    523522    //
    524523    // If the software address is an IPv4 multicast address, invoke Mnp to
     
    589588  // Create a request context for this arp request.
    590589  //
    591   RequestContext = AllocatePool (sizeof(USER_REQUEST_CONTEXT));
     590  RequestContext = AllocatePool (sizeof (USER_REQUEST_CONTEXT));
    592591  if (RequestContext == NULL) {
    593     DEBUG ((EFI_D_ERROR, "ArpRequest: Allocate memory for RequestContext failed.\n"));
     592    DEBUG ((DEBUG_ERROR, "ArpRequest: Allocate memory for RequestContext failed.\n"));
    594593
    595594    Status = EFI_OUT_OF_RESOURCES;
     
    613612                 );
    614613  if (CacheEntry != NULL) {
    615 
    616614    CacheEntry->NextRetryTime = Instance->ConfigData.RetryTimeOut;
    617615    CacheEntry->RetryCount    = Instance->ConfigData.RetryCount;
     
    622620    CacheEntry = ArpAllocCacheEntry (Instance);
    623621    if (CacheEntry == NULL) {
    624       DEBUG ((EFI_D_ERROR, "ArpRequest: Allocate memory for CacheEntry failed.\n"));
     622      DEBUG ((DEBUG_ERROR, "ArpRequest: Allocate memory for CacheEntry failed.\n"));
    625623      FreePool (RequestContext);
    626624
     
    668666  return Status;
    669667}
    670 
    671668
    672669/**
     
    710707
    711708  if ((This == NULL) ||
    712     ((TargetSwAddress != NULL) && (ResolvedEvent == NULL)) ||
    713     ((TargetSwAddress == NULL) && (ResolvedEvent != NULL))) {
     709      ((TargetSwAddress != NULL) && (ResolvedEvent == NULL)) ||
     710      ((TargetSwAddress == NULL) && (ResolvedEvent != NULL)))
     711  {
    714712    return EFI_INVALID_PARAMETER;
    715713  }
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette