VirtualBox

Changeset 43207 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Sep 5, 2012 3:32:05 PM (12 years ago)
Author:
vboxsync
Message:

VBoxManage: minor cleanup of GPT handling code

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VBoxManage/VBoxInternalManage.cpp

    r42860 r43207  
    99
    1010/*
    11  * Copyright (C) 2006-2010 Oracle Corporation
     11 * Copyright (C) 2006-2012 Oracle Corporation
    1212 *
    1313 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    9292typedef struct HOSTPARTITION
    9393{
    94 
     94    /** partition number */
    9595    unsigned        uIndex;
    9696    /** partition type */
     
    752752    uint8_t partitionTableHeader[512];
    753753    uint32_t sector_size = 512;
    754     uint64_t lastUsableLBA =0;
     754    uint64_t lastUsableLBA = 0;
    755755    int rc;
    756756
     
    778778            const char* l_ppth = (char*)partitionTableHeader;
    779779            rc = strncmp(l_ppth, "EFI PART", 8);
    780             if(RT_FAILURE(rc))
     780            if (RT_FAILURE(rc))
    781781                return VERR_INVALID_PARAMETER;
    782782
     
    850850                pCP->uPartDataStart = 0;    /* will be filled out later properly. */
    851851                pCP->cPartDataSectors = 0;
    852                 if(start==0 || end==0)
     852                if (start==0 || end==0)
    853853                {
    854854                    pCP->uIndex = 0;
     
    856856                    break;
    857857                }
    858                 else{
     858                else
     859                {
    859860                    pCP->uStart = start;
    860861                    pCP->uSize = (end +1) - start;/*+1 LBA because the last address is included*/
    861                }
     862                }
    862863
    863864                ++currentEntry;
     
    10151016
    10161017    /* Fill out partitioning location info for backup GPT. */
    1017     if(partitioningType == GPT)
     1018    if (partitioningType == GPT)
    10181019    {
    10191020        pPart->aPartitions[pPart->cPartitions-1].uPartDataStart = lastUsableLBA+1;
Note: See TracChangeset for help on using the changeset viewer.

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