Changeset 1a3b953 in mainline for uspace/lib/bithenge/failure.h


Ignore:
Timestamp:
2012-08-20T00:22:19Z (13 years ago)
Author:
Sean Bartell <wingedtachikoma@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
0784869
Parents:
5e514c0
Message:

Bithenge: better error injection

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/bithenge/failure.h

    r5e514c0 r1a3b953  
    3838#define BITHENGE_FAILURE_H_
    3939
     40#include <fcntl.h>
     41#include <stdio.h>
    4042#include <stdlib.h>
     43#include <sys/stat.h>
    4144#include <sys/types.h>
    4245#include <unistd.h>
     46#include "os.h"
    4347
     48int bithenge_should_fail(void);
    4449void *bithenge_failure_malloc(size_t);
    4550void *bithenge_failure_realloc(void *, size_t);
    4651ssize_t bithenge_failure_read(int, void *, size_t);
    4752off_t bithenge_failure_lseek(int, off_t, int);
     53int bithenge_failure_ferror(FILE *);
     54char *bithenge_failure_str_ndup(const char *, size_t);
     55int bithenge_failure_open(const char *, int);
     56int bithenge_failure_fstat(int, struct stat *);
    4857
    4958#ifndef BITHENGE_FAILURE_DECLS_ONLY
     
    5261#define read bithenge_failure_read
    5362#define lseek bithenge_failure_lseek
     63#define ferror bithenge_failure_ferror
     64#define str_ndup bithenge_failure_str_ndup
     65#define open bithenge_failure_open
     66#define fstat bithenge_failure_fstat
    5467#endif
    5568
Note: See TracChangeset for help on using the changeset viewer.