VirtualBox

Changeset 71217 in vbox for trunk


Ignore:
Timestamp:
Mar 5, 2018 9:06:41 PM (7 years ago)
Author:
vboxsync
Message:

IPRT/RTPathRmCmd.cpp: Fixed running with "--machinereadable" / "--machine-readable" options.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/common/path/RTPathRmCmd.cpp

    r69753 r71217  
    11/* $Id$ */
    22/** @file
    3  * IPRT - TAR Command.
     3 * IPRT - RM Command.
    44 */
    55
    66/*
    7  * Copyright (C) 2013-2017 Oracle Corporation
     7 * Copyright (C) 2013-2018 Oracle Corporation
    88 *
    99 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    568568                break;
    569569
    570 
    571570            case RTPATHRMCMD_OPT_MACHINE_READABLE:
    572571                Opts.fMachineReadable = true;
     
    610609    if (Opts.fMachineReadable)
    611610    {
    612         rc = RTStrmSetMode(g_pStdOut, true /*fBinary*/, false /*fCurrentCodeSet*/);
    613         if (RT_FAILURE(rc))
    614             return RTMsgErrorExit(RTEXITCODE_FAILURE, "RTStrmSetMode failed: %Rrc.\n", rc);
     611        int rc2 = RTStrmSetMode(g_pStdOut, true /*fBinary*/, false /*fCurrentCodeSet*/);
     612        if (RT_FAILURE(rc2))
     613            return RTMsgErrorExit(RTEXITCODE_FAILURE, "RTStrmSetMode failed: %Rrc.\n", rc2);
    615614        static const char s_achHeader[] = "hdr_id=rm\0hdr_ver=1";
    616615        RTStrmWrite(g_pStdOut, s_achHeader, sizeof(s_achHeader));
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