Changeset 58115ae in mainline for uspace/lib/posix/unistd.c


Ignore:
Timestamp:
2011-07-27T23:05:15Z (13 years ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
75406dc
Parents:
fd4b636
Message:

Make remove() future-proof and add rmdir() wrapper.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/posix/unistd.c

    rfd4b636 r58115ae  
    176176                return rc;
    177177        }
     178}
     179
     180/**
     181 * Remove a directory.
     182 *
     183 * @param path Directory pathname.
     184 * @return Zero on success, -1 otherwise.
     185 */
     186int posix_rmdir(const char *path)
     187{
     188        int rc = rmdir(path);
     189        if (rc != EOK) {
     190                errno = -rc;
     191                return -1;
     192        }
     193        return 0;
    178194}
    179195
Note: See TracChangeset for help on using the changeset viewer.