Changeset 3688


Ignore:
Timestamp:
Mar 15, 2011, 11:59:30 PM (14 years ago)
Author:
bird
Message:

libc: Reimplemented pathconf and fpathconf. References #44.

Location:
trunk/libc/include/klibc
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/libc/include/klibc/backend.h

    r2942 r3688  
    234234
    235235/**
     236 * Query filesystem configuration information by path.
     237 *
     238 * @returns 0 on success.
     239 * @returns Negative error code (errno.h) on failure.
     240 * @param   pszPath     Path to query info about.
     241 * @param   iName       Which path config variable to query.
     242 * @param   plValue     Where to return the value.
     243 * @sa      __libc_Back_ioPathConf, fpathconf, pathconf, sysconf.
     244 */
     245int __libc_Back_fsPathConf(const char *pszPath, int iName, long *plValue);
     246
     247/**
    236248 * Resolves the path into an canonicalized absolute path.
    237249 *
     
    689701 */
    690702int __libc_Back_ioFHToPath(int fh, char *pszPath, size_t cchPath);
     703
     704/**
     705 * Query filesystem configuration information by file handle.
     706 *
     707 * @returns 0 on success.
     708 * @returns Negative error code (errno.h) on failure.
     709 * @param   fh          The handle to query config info about.
     710 * @param   iName       Which path config variable to query.
     711 * @param   plValue     Where to return the configuration value.
     712 * @sa      __libc_Back_fsPathConf, fpathconf, pathconf, sysconf.
     713 */
     714int __libc_Back_ioPathConf(int fh, int iName, long *plValue);
    691715
    692716/** @} */
  • trunk/libc/include/klibc/io.h

    r2924 r3688  
    5151    /** Does the file system provide sufficient EA support for UNIX attributes? */
    5252    unsigned            fUnixEAs : 1;
     53    /** _PC_CHOWN_RESTRICTED - Is chown and chgrp restricted the typical unix way. */
     54    unsigned            fChOwnRestricted : 1;
     55    /** _PC_NO_TRUNC - Indicates whether too long names will cause errors or be truncated. */
     56    unsigned            fNoNameTrunc : 1;
     57    /** _PC_FILESIZEBITS - The bitsize of the type required to store the max file size. */
     58    unsigned            cFileSizeBits : 7;
     59    /** _PC_PATH_MAX - The maximum path length. */
     60    unsigned short      cchMaxPath;
     61    /** _PC_NAME_MAX - The maximum path length. */
     62    unsigned short      cchMaxName;
     63    /** _PC_SYMLINK_MAX - The maximum symlink length. */
     64    unsigned short      cchMaxSymlink;
     65    /** _PC_LINK_MAX - The maximum number of hard links per file. */
     66    unsigned short      cMaxLinks;
     67    /** _PC_MAX_CANON - The maximum number of bytes in a terminal canonical input queue. */
     68    unsigned short      cchMaxTermCanon;
     69    /** _PC_MAX_INPUT - The maximum number of bytes in a canonical input queue. */
     70    unsigned short      cchMaxTermInput;
     71    /** _PC_PIPE_BUF  - The maximum number of bytes that is guaranteed to be atomic when writing to a pipe. */
     72    unsigned            cbPipeBuf;
     73    /** _PC_ALLOC_SIZE_MIN - The (smallest) block allocation size of the file system.  */
     74    unsigned            cbBlock;
     75    /** _PC_REC_INCR_XFER_SIZE - The increments to walk between the min and max transfer sizes. */
     76    unsigned short      cbXferIncr;
     77    /** _PC_REC_MAX_XFER_SIZE  - The maximum recommended transfer size. */
     78    unsigned long       cbXferMax;
     79    /** _PC_REC_MIN_XFER_SIZE  - The minimum recommended transfer size. */
     80    unsigned long       cbXferMin;
     81    /** _PC_REC_XFER_ALIGN - The recommended buffer alignment for transfers. */
     82    unsigned short      uXferAlign;
     83
    5384    /** Device number of the device the filesystem resides on.
    5485     * On OS/2 the device number is derived from the driveletter. */
Note: See TracChangeset for help on using the changeset viewer.