VirtualBox

Changeset 86035 in vbox for trunk/src/VBox/Runtime


Ignore:
Timestamp:
Sep 6, 2020 8:31:16 PM (4 years ago)
Author:
vboxsync
Message:

Runtime/cpiovfs.cpp: A simple CPIO archive reader (WIP, writer comes next and then some cleanup)

Location:
trunk/src/VBox/Runtime
Files:
2 added
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/Makefile.kmk

    r85875 r86035  
    682682        common/vfs/vfsstdpipe.cpp \
    683683        common/vfs/vfsprintf.cpp \
     684        common/zip/cpiovfs.cpp \
    684685        common/zip/tar.cpp \
    685686        common/zip/tarcmd.cpp \
  • trunk/src/VBox/Runtime/common/zip/tarcmd.cpp

    r84761 r86035  
    7575    RTZIPTARCMDFORMAT_TAR,
    7676    /** XAR.  */
    77     RTZIPTARCMDFORMAT_XAR
     77    RTZIPTARCMDFORMAT_XAR,
     78    /** CPIO. */
     79    RTZIPTARCMDFORMAT_CPIO,
    7880} RTZIPTARCMDFORMAT;
    7981
     
    818820        rc = VERR_NOT_SUPPORTED;
    819821#endif
     822    else if (pOpts->enmFormat == RTZIPTARCMDFORMAT_CPIO)
     823        rc = RTZipCpioFsStreamFromIoStream(hVfsIos, 0/*fFlags*/, phVfsFss);
    820824    else /** @todo make RTZipTarFsStreamFromIoStream fail if not tar file! */
    821825        rc = RTZipTarFsStreamFromIoStream(hVfsIos, 0/*fFlags*/, phVfsFss);
     
    16061610             "                  pax (tar POSIX.1-2001),\n"
    16071611             "                  xar\n"
    1608              "        Note! Because XAR/TAR detection isn't implemented yet, it\n"
     1612             "                  cpio\n"
     1613             "        Note! Because XAR/TAR/CPIO detection isn't implemented yet, it\n"
    16091614             "              is necessary to specifcy --format=xar when reading a\n"
    1610              "              XAR file.  Otherwise this option is only for creation.\n"
     1615             "              XAR file or --format=cpio for a CPIO file.\n"
     1616             "              Otherwise this option is only for creation.\n"
    16111617             "\n");
    16121618    RTPrintf("IPRT Options:\n"
     
    18611867                else if (!strcmp(ValueUnion.psz, "xar"))
    18621868                    Opts.enmFormat    = RTZIPTARCMDFORMAT_XAR;
     1869                else if (!strcmp(ValueUnion.psz, "cpio"))
     1870                    Opts.enmFormat    = RTZIPTARCMDFORMAT_CPIO;
    18631871                else
    18641872                    return RTMsgErrorExit(RTEXITCODE_SYNTAX, "Unknown archive format: '%s'", ValueUnion.psz);
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