Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/test/chardev-test/main.c

    rc1694b6b rb7fd2a0  
    3939#define NAME  "chardev-test"
    4040
    41 static int smallx_open(chardev_srvs_t *, chardev_srv_t *);
    42 static int smallx_close(chardev_srv_t *);
    43 static int smallx_write(chardev_srv_t *, const void *, size_t, size_t *);
    44 static int smallx_read(chardev_srv_t *, void *, size_t, size_t *);
    45 
    46 static int largex_open(chardev_srvs_t *, chardev_srv_t *);
    47 static int largex_close(chardev_srv_t *);
    48 static int largex_write(chardev_srv_t *, const void *, size_t, size_t *);
    49 static int largex_read(chardev_srv_t *, void *, size_t, size_t *);
    50 
    51 static int partialx_open(chardev_srvs_t *, chardev_srv_t *);
    52 static int partialx_close(chardev_srv_t *);
    53 static int partialx_write(chardev_srv_t *, const void *, size_t, size_t *);
    54 static int partialx_read(chardev_srv_t *, void *, size_t, size_t *);
     41static errno_t smallx_open(chardev_srvs_t *, chardev_srv_t *);
     42static errno_t smallx_close(chardev_srv_t *);
     43static errno_t smallx_write(chardev_srv_t *, const void *, size_t, size_t *);
     44static errno_t smallx_read(chardev_srv_t *, void *, size_t, size_t *);
     45
     46static errno_t largex_open(chardev_srvs_t *, chardev_srv_t *);
     47static errno_t largex_close(chardev_srv_t *);
     48static errno_t largex_write(chardev_srv_t *, const void *, size_t, size_t *);
     49static errno_t largex_read(chardev_srv_t *, void *, size_t, size_t *);
     50
     51static errno_t partialx_open(chardev_srvs_t *, chardev_srv_t *);
     52static errno_t partialx_close(chardev_srv_t *);
     53static errno_t partialx_write(chardev_srv_t *, const void *, size_t, size_t *);
     54static errno_t partialx_read(chardev_srv_t *, void *, size_t, size_t *);
    5555
    5656static service_id_t smallx_svc_id;
     
    106106int main(int argc, char *argv[])
    107107{
    108         int rc;
     108        errno_t rc;
    109109
    110110        printf("%s: Character device test service\n", NAME);
     
    156156}
    157157
    158 static int smallx_open(chardev_srvs_t *srvs, chardev_srv_t *srv)
    159 {
    160         return EOK;
    161 }
    162 
    163 static int smallx_close(chardev_srv_t *srv)
    164 {
    165         return EOK;
    166 }
    167 
    168 static int smallx_write(chardev_srv_t *srv, const void *data, size_t size,
     158static errno_t smallx_open(chardev_srvs_t *srvs, chardev_srv_t *srv)
     159{
     160        return EOK;
     161}
     162
     163static errno_t smallx_close(chardev_srv_t *srv)
     164{
     165        return EOK;
     166}
     167
     168static errno_t smallx_write(chardev_srv_t *srv, const void *data, size_t size,
    169169    size_t *nwritten)
    170170{
     
    178178}
    179179
    180 static int smallx_read(chardev_srv_t *srv, void *buf, size_t size,
     180static errno_t smallx_read(chardev_srv_t *srv, void *buf, size_t size,
    181181    size_t *nread)
    182182{
     
    191191}
    192192
    193 static int largex_open(chardev_srvs_t *srvs, chardev_srv_t *srv)
    194 {
    195         return EOK;
    196 }
    197 
    198 static int largex_close(chardev_srv_t *srv)
    199 {
    200         return EOK;
    201 }
    202 
    203 static int largex_write(chardev_srv_t *srv, const void *data, size_t size,
     193static errno_t largex_open(chardev_srvs_t *srvs, chardev_srv_t *srv)
     194{
     195        return EOK;
     196}
     197
     198static errno_t largex_close(chardev_srv_t *srv)
     199{
     200        return EOK;
     201}
     202
     203static errno_t largex_write(chardev_srv_t *srv, const void *data, size_t size,
    204204    size_t *nwritten)
    205205{
     
    213213}
    214214
    215 static int largex_read(chardev_srv_t *srv, void *buf, size_t size,
     215static errno_t largex_read(chardev_srv_t *srv, void *buf, size_t size,
    216216    size_t *nread)
    217217{
     
    226226}
    227227
    228 static int partialx_open(chardev_srvs_t *srvs, chardev_srv_t *srv)
    229 {
    230         return EOK;
    231 }
    232 
    233 static int partialx_close(chardev_srv_t *srv)
    234 {
    235         return EOK;
    236 }
    237 
    238 static int partialx_write(chardev_srv_t *srv, const void *data, size_t size,
     228static errno_t partialx_open(chardev_srvs_t *srvs, chardev_srv_t *srv)
     229{
     230        return EOK;
     231}
     232
     233static errno_t partialx_close(chardev_srv_t *srv)
     234{
     235        return EOK;
     236}
     237
     238static errno_t partialx_write(chardev_srv_t *srv, const void *data, size_t size,
    239239    size_t *nwritten)
    240240{
     
    248248}
    249249
    250 static int partialx_read(chardev_srv_t *srv, void *buf, size_t size,
     250static errno_t partialx_read(chardev_srv_t *srv, void *buf, size_t size,
    251251    size_t *nread)
    252252{
Note: See TracChangeset for help on using the changeset viewer.