The OpenNET Project / Index page

[ новости /+++ | форум | теги | ]

Интерактивная система просмотра системных руководств (man-ов)

 ТемаНаборКатегория 
 
 [Cписок руководств | Печать]

cpio.c (3)
  • >> cpio.c (3) ( Linux man: Библиотечные вызовы )
  •  

    NAME

    lib/cpio.c - Handle cpio payloads within rpm packages. 
     
    

    SYNOPSIS


    #include 'system.h'
    #include 'fsm.h'
    #include 'rpmerr.h'
    #include 'debug.h'
     

    Defines


    #define GET_NUM_FIELD(phys, log)

    #define SET_NUM_FIELD(phys, val, space)
     

    Functions


    int strntoul (const char *str, char **endptr, int base, int num)
    Convert string to unsigned integer (with buffer size check).
    int cpioTrailerWrite (FSM_t fsm)
    Write cpio trailer.
    int cpioHeaderWrite (FSM_t fsm, struct stat *st)
    Write cpio header.
    int cpioHeaderRead (FSM_t fsm, struct stat *st)
    Read cpio header.
    const char *const cpioStrerror (int rc)
     

    Variables


    int _fsm_debug
     

    DETAILED DESCRIPTION

    Handle cpio payloads within rpm packages.


      

    Warning: FIXME: We don't translate between cpio and system mode bits! These should both be the same, but really odd things are going to happen if that's not true!

    Definition in file cpio.c.  

    DEFINE DOCUMENTATION

     

    #define GET_NUM_FIELD(phys, log)

    Value:

    log = strntoul(phys, &end, 16, sizeof(phys));         if ( (end - phys) != sizeof(phys) ) return CPIOERR_BAD_HEADER;
    

    Definition at line 49 of file cpio.c.

    Referenced by cpioHeaderRead().  

    #define SET_NUM_FIELD(phys, val, space)

    Value:

    sprintf(space, '%8.8lx', (unsigned long) (val));         memcpy(phys, space, 8);
    

    Definition at line 52 of file cpio.c.

    Referenced by cpioHeaderWrite().  

    FUNCTION DOCUMENTATION

     

    int cpioHeaderRead (FSM_t fsm, struct stat * st)

    Read cpio header.

    Return values:

    fsm
    file path and stat info

    Returns: 0 on success

    Definition at line 118 of file cpio.c.

    References _free(), CPIO_CRC_MAGIC, CPIO_NEWC_MAGIC, CPIOERR_BAD_HEADER, CPIOERR_BAD_MAGIC, CPIOERR_READ_FAILED, cpioCrcPhysicalHeader::devMajor, cpioCrcPhysicalHeader::devMinor, cpioCrcPhysicalHeader::filesize, FSM_DREAD, fsmStage(), GET_NUM_FIELD, cpioCrcPhysicalHeader::gid, cpioCrcPhysicalHeader::inode, cpioCrcPhysicalHeader::magic, major, makedev, minor, cpioCrcPhysicalHeader::mode, cpioCrcPhysicalHeader::mtime, cpioCrcPhysicalHeader::namesize, cpioCrcPhysicalHeader::nlink, PHYS_HDR_SIZE, cpioCrcPhysicalHeader::rdevMajor, cpioCrcPhysicalHeader::rdevMinor, cpioCrcPhysicalHeader::uid, and xmalloc().

    Referenced by fsmStage().  

    int cpioHeaderWrite (FSM_t fsm, struct stat * st)

    Write cpio header.

    Return values:

    fsm
    file path and stat info

    Returns: 0 on success

    Definition at line 82 of file cpio.c.

    References cpioCrcPhysicalHeader::checksum, CPIO_NEWC_MAGIC, CPIOERR_WRITE_FAILED, cpioCrcPhysicalHeader::devMajor, cpioCrcPhysicalHeader::devMinor, cpioCrcPhysicalHeader::filesize, FSM_DWRITE, FSM_PAD, fsmStage(), cpioCrcPhysicalHeader::gid, cpioCrcPhysicalHeader::inode, cpioCrcPhysicalHeader::magic, major, minor, cpioCrcPhysicalHeader::mode, cpioCrcPhysicalHeader::mtime, cpioCrcPhysicalHeader::namesize, cpioCrcPhysicalHeader::nlink, PHYS_HDR_SIZE, cpioCrcPhysicalHeader::rdevMajor, cpioCrcPhysicalHeader::rdevMinor, SET_NUM_FIELD, and cpioCrcPhysicalHeader::uid.

    Referenced by fsmStage().  

    int cpioTrailerWrite (FSM_t fsm)

    Write cpio trailer.

    Return values:

    fsm
    file path and stat info

    Returns: 0 on success

    Definition at line 56 of file cpio.c.

    References CPIO_NEWC_MAGIC, CPIO_TRAILER, FSM_DWRITE, FSM_PAD, fsmStage(), cpioCrcPhysicalHeader::magic, cpioCrcPhysicalHeader::namesize, cpioCrcPhysicalHeader::nlink, and PHYS_HDR_SIZE.

    Referenced by fsmStage().  

    int strntoul (const char * str, char ** endptr, int base, int num) [static]

    Convert string to unsigned integer (with buffer size check).

    Parameters:

    input
    string

    Return values:

    address
    of 1st character not processed

    Parameters:

    base
    numerical conversion base
    num
    max no. of bytes to read

    Returns: converted integer

    Definition at line 30 of file cpio.c.

    References alloca().  

    VARIABLE DOCUMENTATION

     

    int _fsm_debug

    Definition at line 19 of file cpio.c.  

    AUTHOR

    Generated automatically by Doxygen for rpm from the source code.


     

    Index

    NAME
    SYNOPSIS
    Defines
    Functions
    Variables
    DETAILED DESCRIPTION
    DEFINE DOCUMENTATION
    #define GET_NUM_FIELD(phys, log)
    #define SET_NUM_FIELD(phys, val, space)
    FUNCTION DOCUMENTATION
    int cpioHeaderRead (FSM_t fsm, struct stat * st)
    int cpioHeaderWrite (FSM_t fsm, struct stat * st)
    int cpioTrailerWrite (FSM_t fsm)
    int strntoul (const char * str, char ** endptr, int base, int num) [static]
    VARIABLE DOCUMENTATION
    int _fsm_debug
    AUTHOR


    Поиск по тексту MAN-ов: 




    Партнёры:
    PostgresPro
    Inferno Solutions
    Hosting by Hoster.ru
    Хостинг:

    Закладки на сайте
    Проследить за страницей
    Created 1996-2024 by Maxim Chirkov
    Добавить, Поддержать, Вебмастеру