Ignore:
File:
1 edited

Legend:

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

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