Changeset 84876aa4 in mainline for uspace/lib/c


Ignore:
Timestamp:
2019-11-15T13:46:34Z (6 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
ecb7828
Parents:
b093a62 (diff), d548fc0 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge master into gfx

Mainly to get XCW fixes

Location:
uspace/lib/c
Files:
7 edited
3 moved

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/generic/capa.c

    rb093a62 r84876aa4  
    3434 */
    3535
    36 #include <cap.h>
     36#include <capa.h>
    3737#include <errno.h>
    3838#include <imath.h>
     
    4343enum {
    4444        /** Simplified capacity maximum integer digits */
    45         scap_max_idig = 3,
     45        scapa_max_idig = 3,
    4646        /** Simplified capacity maximum significant digits */
    47         scap_max_sdig = 4
     47        scapa_max_sdig = 4
    4848};
    4949
     
    6060};
    6161
    62 void cap_from_blocks(uint64_t nblocks, size_t block_size, cap_spec_t *cap)
     62void capa_from_blocks(uint64_t nblocks, size_t block_size, capa_spec_t *capa)
    6363{
    6464        uint64_t tsize;
    6565
    6666        tsize = nblocks * block_size;
    67         cap->m = tsize;
    68         cap->dp = 0;
    69         cap->cunit = cu_byte;
     67        capa->m = tsize;
     68        capa->dp = 0;
     69        capa->cunit = cu_byte;
    7070}
    7171
     
    8181 * and @c cv_max gives the maximum value.
    8282 */
    83 errno_t cap_to_blocks(cap_spec_t *cap, cap_vsel_t cvsel, size_t block_size,
     83errno_t capa_to_blocks(capa_spec_t *capa, capa_vsel_t cvsel, size_t block_size,
    8484    uint64_t *rblocks)
    8585{
     
    9292        errno_t rc;
    9393
    94         exp = cap->cunit * 3 - cap->dp;
     94        exp = capa->cunit * 3 - capa->dp;
    9595        if (exp < 0) {
    9696                rc = ipow10_u64(-exp, &f);
    9797                if (rc != EOK)
    9898                        return ERANGE;
    99                 bytes = (cap->m + (f / 2)) / f;
    100                 if (bytes * f - (f / 2) != cap->m)
     99                bytes = (capa->m + (f / 2)) / f;
     100                if (bytes * f - (f / 2) != capa->m)
    101101                        return ERANGE;
    102102        } else {
     
    118118                }
    119119
    120                 bytes = cap->m * f + adj;
    121                 if ((bytes - adj) / f != cap->m)
     120                bytes = capa->m * f + adj;
     121                if ((bytes - adj) / f != capa->m)
    122122                        return ERANGE;
    123123        }
     
    138138 * digits and at most two fractional digits, e.g abc.xy <unit>.
    139139 */
    140 void cap_simplify(cap_spec_t *cap)
     140void capa_simplify(capa_spec_t *capa)
    141141{
    142142        uint64_t div;
     
    146146        errno_t rc;
    147147
    148         /* Change units so that we have at most @c scap_max_idig integer digits */
    149         rc = ipow10_u64(scap_max_idig, &maxv);
     148        /* Change units so that we have at most @c scapa_max_idig integer digits */
     149        rc = ipow10_u64(scapa_max_idig, &maxv);
    150150        assert(rc == EOK);
    151151
    152         rc = ipow10_u64(cap->dp, &div);
     152        rc = ipow10_u64(capa->dp, &div);
    153153        assert(rc == EOK);
    154154
    155         while (cap->m / div >= maxv) {
    156                 ++cap->cunit;
    157                 cap->dp += 3;
     155        /* Change units until we have no more than scapa_max_idig integer digits */
     156        while (capa->m / div >= maxv) {
     157                ++capa->cunit;
     158                capa->dp += 3;
    158159                div = div * 1000;
    159160        }
    160161
    161         /* Round the number so that we have at most @c scap_max_sdig significant digits */
    162         sdig = 1 + ilog10_u64(cap->m); /* number of significant digits */
    163         if (sdig > scap_max_sdig) {
     162        /* Round the number so that we have at most @c scapa_max_sdig significant digits */
     163        sdig = 1 + ilog10_u64(capa->m); /* number of significant digits */
     164        if (sdig > scapa_max_sdig) {
    164165                /* Number of digits to remove */
    165                 rdig = sdig - scap_max_sdig;
    166                 if (rdig > cap->dp)
    167                         rdig = cap->dp;
     166                rdig = sdig - scapa_max_sdig;
     167                if (rdig > capa->dp)
     168                        rdig = capa->dp;
    168169
    169170                rc = ipow10_u64(rdig, &div);
    170171                assert(rc == EOK);
    171172
    172                 cap->m = (cap->m + (div / 2)) / div;
    173                 cap->dp -= rdig;
    174         }
    175 }
    176 
    177 errno_t cap_format(cap_spec_t *cap, char **rstr)
     173                /* Division with rounding */
     174                capa->m = (capa->m + (div / 2)) / div;
     175                capa->dp -= rdig;
     176        }
     177
     178        /*
     179         * If we rounded up from something like 999.95 to 1000.0,, we still
     180         * have more than scapa_max_idig integer digits and need to change
     181         * units once more.
     182         */
     183        rc = ipow10_u64(capa->dp, &div);
     184        assert(rc == EOK);
     185
     186        if (capa->m / div >= 1000) {
     187                ++capa->cunit;
     188                capa->dp += 3;
     189
     190                /*
     191                 * We now have one more significant digit than we want
     192                 * so round to one less digits
     193                 */
     194                capa->m = (capa->m + 5) / 10;
     195                --capa->dp;
     196        }
     197}
     198
     199errno_t capa_format(capa_spec_t *capa, char **rstr)
    178200{
    179201        errno_t rc;
     
    186208        sunit = NULL;
    187209
    188         assert(cap->cunit < CU_LIMIT);
    189 
    190         rc = ipow10_u64(cap->dp, &div);
     210        assert(capa->cunit < CU_LIMIT);
     211
     212        rc = ipow10_u64(capa->dp, &div);
    191213        if (rc != EOK)
    192214                return rc;
    193215
    194         ipart = cap->m / div;
    195         fpart = cap->m % div;
    196 
    197         sunit = cu_str[cap->cunit];
    198         if (cap->dp > 0) {
     216        ipart = capa->m / div;
     217        fpart = capa->m % div;
     218
     219        sunit = cu_str[capa->cunit];
     220        if (capa->dp > 0) {
    199221                ret = asprintf(rstr, "%" PRIu64 ".%0*" PRIu64 " %s", ipart,
    200                     (int)cap->dp, fpart, sunit);
     222                    (int)capa->dp, fpart, sunit);
    201223        } else {
    202224                ret = asprintf(rstr, "%" PRIu64 " %s", ipart, sunit);
    203225        }
     226
    204227        if (ret < 0)
    205228                return ENOMEM;
     
    208231}
    209232
    210 static errno_t cap_digit_val(char c, int *val)
     233static errno_t capa_digit_val(char c, int *val)
    211234{
    212235        switch (c) {
     
    248271}
    249272
    250 errno_t cap_parse(const char *str, cap_spec_t *cap)
     273errno_t capa_parse(const char *str, capa_spec_t *capa)
    251274{
    252275        const char *eptr;
     
    260283
    261284        eptr = str;
    262         while (cap_digit_val(*eptr, &d) == EOK) {
     285        while (capa_digit_val(*eptr, &d) == EOK) {
    263286                m = m * 10 + d;
    264287                ++eptr;
     
    268291                ++eptr;
    269292                dp = 0;
    270                 while (cap_digit_val(*eptr, &d) == EOK) {
     293                while (capa_digit_val(*eptr, &d) == EOK) {
    271294                        m = m * 10 + d;
    272295                        ++dp;
     
    281304
    282305        if (*eptr == '\0') {
    283                 cap->cunit = cu_byte;
     306                capa->cunit = cu_byte;
    284307        } else {
    285308                for (i = 0; i < CU_LIMIT; i++) {
     
    296319                return EINVAL;
    297320        found:
    298                 cap->cunit = i;
    299         }
    300 
    301         cap->m = m;
    302         cap->dp = dp;
     321                capa->cunit = i;
     322        }
     323
     324        capa->m = m;
     325        capa->dp = dp;
    303326        return EOK;
    304327}
  • uspace/lib/c/generic/loader.c

    rb093a62 r84876aa4  
    345345}
    346346
     347/** Instruct loader to execute the program and do not wait for reply.
     348 *
     349 * This function does not block even if the loaded task is stopped
     350 * for debugging.
     351 *
     352 * After using this function, no further operations can be performed
     353 * on the loader structure and it is deallocated.
     354 *
     355 * @param ldr Loader connection structure.
     356 *
     357 * @return Zero on success or an error code.
     358 *
     359 */
     360void loader_run_nowait(loader_t *ldr)
     361{
     362        async_exch_t *exch = async_exchange_begin(ldr->sess);
     363        async_msg_0(exch, LOADER_RUN);
     364        async_exchange_end(exch);
     365
     366        async_hangup(ldr->sess);
     367        free(ldr);
     368}
     369
    347370/** Cancel the loader session.
    348371 *
  • uspace/lib/c/generic/task.c

    rb093a62 r84876aa4  
    3535 */
    3636
     37#include <async.h>
    3738#include <task.h>
    3839#include <loader/loader.h>
     
    4647#include <ns.h>
    4748#include <stdlib.h>
     49#include <udebug.h>
    4850#include <libc.h>
    4951#include "private/ns.h"
     
    9496 * This is really just a convenience wrapper over the more complicated
    9597 * loader API. Arguments are passed as a null-terminated array of strings.
     98 * A debug session is created optionally.
    9699 *
    97100 * @param id   If not NULL, the ID of the task is stored here on success.
     
    100103 * @param path Pathname of the binary to execute.
    101104 * @param argv Command-line arguments.
    102  *
    103  * @return Zero on success or an error code.
    104  *
    105  */
    106 errno_t task_spawnv(task_id_t *id, task_wait_t *wait, const char *path,
    107     const char *const args[])
     105 * @param rsess   Place to store pointer to debug session or @c NULL
     106 *                not to start a debug session
     107 *
     108 * @return Zero on success or an error code.
     109 *
     110 */
     111errno_t task_spawnv_debug(task_id_t *id, task_wait_t *wait, const char *path,
     112    const char *const args[], async_sess_t **rsess)
    108113{
    109114        /* Send default files */
     
    125130        }
    126131
    127         return task_spawnvf(id, wait, path, args, fd_stdin, fd_stdout,
    128             fd_stderr);
     132        return task_spawnvf_debug(id, wait, path, args, fd_stdin, fd_stdout,
     133            fd_stderr, rsess);
    129134}
    130135
    131136/** Create a new task by running an executable from the filesystem.
     137 *
     138 * This is really just a convenience wrapper over the more complicated
     139 * loader API. Arguments are passed as a null-terminated array of strings.
     140 *
     141 * @param id   If not NULL, the ID of the task is stored here on success.
     142 * @param wait If not NULL, setup waiting for task's return value and store
     143 *             the information necessary for waiting here on success.
     144 * @param path Pathname of the binary to execute.
     145 * @param argv Command-line arguments.
     146 *
     147 * @return Zero on success or an error code.
     148 *
     149 */
     150errno_t task_spawnv(task_id_t *id, task_wait_t *wait, const char *path,
     151    const char *const args[])
     152{
     153        return task_spawnv_debug(id, wait, path, args, NULL);
     154}
     155
     156/** Create a new task by loading an executable from the filesystem.
    132157 *
    133158 * This is really just a convenience wrapper over the more complicated
    134159 * loader API. Arguments are passed as a null-terminated array of strings.
    135160 * Files are passed as null-terminated array of pointers to fdi_node_t.
     161 * A debug session is created optionally.
    136162 *
    137163 * @param id      If not NULL, the ID of the task is stored here on success.
    138  * @param wait    If not NULL, setup waiting for task's return value and store
     164 * @param wait    If not NULL, setup waiting for task's return value and store.
    139165 * @param path    Pathname of the binary to execute.
    140  * @param argv    Command-line arguments.
    141  * @param std_in  File to use as stdin.
    142  * @param std_out File to use as stdout.
    143  * @param std_err File to use as stderr.
    144  *
    145  * @return Zero on success or an error code.
    146  *
    147  */
    148 errno_t task_spawnvf(task_id_t *id, task_wait_t *wait, const char *path,
    149     const char *const args[], int fd_stdin, int fd_stdout, int fd_stderr)
    150 {
     166 * @param argv    Command-line arguments
     167 * @param std_in  File to use as stdin
     168 * @param std_out File to use as stdout
     169 * @param std_err File to use as stderr
     170 * @param rsess   Place to store pointer to debug session or @c NULL
     171 *                not to start a debug session
     172 *
     173 * @return Zero on success or an error code
     174 *
     175 */
     176errno_t task_spawnvf_debug(task_id_t *id, task_wait_t *wait,
     177    const char *path, const char *const args[], int fd_stdin, int fd_stdout,
     178    int fd_stderr, async_sess_t **rsess)
     179{
     180        async_sess_t *ksess = NULL;
     181
    151182        /* Connect to a program loader. */
    152183        loader_t *ldr = loader_connect();
     
    217248        }
    218249
    219         /* Run it. */
    220         rc = loader_run(ldr);
    221         if (rc != EOK)
    222                 goto error;
     250        /* Start a debug session if requested */
     251        if (rsess != NULL) {
     252                ksess = async_connect_kbox(task_id);
     253                if (ksess == NULL) {
     254                        /* Most likely debugging support is not compiled in */
     255                        rc = ENOTSUP;
     256                        goto error;
     257                }
     258
     259                rc = udebug_begin(ksess);
     260                if (rc != EOK)
     261                        goto error;
     262
     263                /*
     264                 * Run it, not waiting for response. It would never come
     265                 * as the loader is stopped.
     266                 */
     267                loader_run_nowait(ldr);
     268        } else {
     269                /* Run it. */
     270                rc = loader_run(ldr);
     271                if (rc != EOK)
     272                        goto error;
     273        }
    223274
    224275        /* Success */
    225276        if (id != NULL)
    226277                *id = task_id;
    227 
     278        if (rsess != NULL)
     279                *rsess = ksess;
    228280        return EOK;
    229281
    230282error:
     283        if (ksess != NULL)
     284                async_hangup(ksess);
    231285        if (wait_initialized)
    232286                task_cancel_wait(wait);
     
    235289        loader_abort(ldr);
    236290        return rc;
     291}
     292
     293/** Create a new task by running an executable from the filesystem.
     294 *
     295 * Arguments are passed as a null-terminated array of strings.
     296 * Files are passed as null-terminated array of pointers to fdi_node_t.
     297 *
     298 * @param id      If not NULL, the ID of the task is stored here on success.
     299 * @param wait    If not NULL, setup waiting for task's return value and store.
     300 * @param path    Pathname of the binary to execute
     301 * @param argv    Command-line arguments
     302 * @param std_in  File to use as stdin
     303 * @param std_out File to use as stdout
     304 * @param std_err File to use as stderr
     305 *
     306 * @return Zero on success or an error code.
     307 *
     308 */
     309errno_t task_spawnvf(task_id_t *id, task_wait_t *wait, const char *path,
     310    const char *const args[], int fd_stdin, int fd_stdout, int fd_stderr)
     311{
     312        return task_spawnvf_debug(id, wait, path, args, fd_stdin, fd_stdout,
     313            fd_stderr, NULL);
    237314}
    238315
  • uspace/lib/c/include/capa.h

    rb093a62 r84876aa4  
    3434 */
    3535
    36 #ifndef _LIBC_CAP_H_
    37 #define _LIBC_CAP_H_
     36#ifndef _LIBC_CAPA_H_
     37#define _LIBC_CAPA_H_
    3838
    3939#include <adt/list.h>
     
    5555        cu_zbyte,
    5656        cu_ybyte
    57 } cap_unit_t;
     57} capa_unit_t;
    5858
    5959/** Which of values within the precision of the capacity */
     
    6565        /** The maximum value */
    6666        cv_max
    67 } cap_vsel_t;
     67} capa_vsel_t;
    6868
    6969#define CU_LIMIT (cu_ybyte + 1)
     
    8787        unsigned dp;
    8888        /** Capacity unit */
    89         cap_unit_t cunit;
    90 } cap_spec_t;
     89        capa_unit_t cunit;
     90} capa_spec_t;
    9191
    92 extern errno_t cap_format(cap_spec_t *, char **);
    93 extern errno_t cap_parse(const char *, cap_spec_t *);
    94 extern void cap_simplify(cap_spec_t *);
    95 extern void cap_from_blocks(uint64_t, size_t, cap_spec_t *);
    96 extern errno_t cap_to_blocks(cap_spec_t *, cap_vsel_t, size_t, uint64_t *);
     92extern errno_t capa_format(capa_spec_t *, char **);
     93extern errno_t capa_parse(const char *, capa_spec_t *);
     94extern void capa_simplify(capa_spec_t *);
     95extern void capa_from_blocks(uint64_t, size_t, capa_spec_t *);
     96extern errno_t capa_to_blocks(capa_spec_t *, capa_vsel_t, size_t, uint64_t *);
    9797
    9898#endif
  • uspace/lib/c/include/loader/loader.h

    rb093a62 r84876aa4  
    5353extern errno_t loader_load_program(loader_t *);
    5454extern errno_t loader_run(loader_t *);
     55extern void loader_run_nowait(loader_t *);
    5556extern void loader_abort(loader_t *);
    5657
  • uspace/lib/c/include/task.h

    rb093a62 r84876aa4  
    3636#define _LIBC_TASK_H_
    3737
     38#include <async.h>
    3839#include <stdint.h>
    3940#include <stdarg.h>
     
    5657extern errno_t task_spawnv(task_id_t *, task_wait_t *, const char *path,
    5758    const char *const []);
     59extern errno_t task_spawnv_debug(task_id_t *, task_wait_t *, const char *path,
     60    const char *const [], async_sess_t **);
    5861extern errno_t task_spawnvf(task_id_t *, task_wait_t *, const char *path,
    5962    const char *const [], int, int, int);
     63extern errno_t task_spawnvf_debug(task_id_t *, task_wait_t *, const char *path,
     64    const char *const [], int, int, int, async_sess_t **);
    6065extern errno_t task_spawn(task_id_t *, task_wait_t *, const char *path, int,
    6166    va_list ap);
  • uspace/lib/c/meson.build

    rb093a62 r84876aa4  
    6565        'generic/bd_srv.c',
    6666        'generic/perm.c',
    67         'generic/cap.c',
     67        'generic/capa.c',
    6868        'generic/clipboard.c',
    6969        'generic/config.c',
     
    204204        'test/adt/circ_buf.c',
    205205        'test/adt/odict.c',
    206         'test/cap.c',
     206        'test/capa.c',
    207207        'test/casting.c',
    208208        'test/double_to_str.c',
  • uspace/lib/c/test/capa.c

    rb093a62 r84876aa4  
    2828
    2929#include <pcut/pcut.h>
    30 #include <cap.h>
     30#include <capa.h>
    3131
    3232PCUT_INIT;
    3333
    34 PCUT_TEST_SUITE(cap);
    35 
    36 PCUT_TEST(cap_format)
     34PCUT_TEST_SUITE(capa);
     35
     36PCUT_TEST(capa_format)
    3737{
    3838        int block_size = 4;
     
    8686        };
    8787
    88         cap_spec_t cap;
     88        capa_spec_t capa;
    8989        char *str;
    9090        errno_t rc;
     
    9393        for (i = 0; i < input_size; i++) {
    9494                for (x = 0; x < block_size; x++) {
    95                         cap_from_blocks(input[i], block[x], &cap);
    96                         cap_simplify(&cap);
    97 
    98                         rc = cap_format(&cap, &str);
     95                        capa_from_blocks(input[i], block[x], &capa);
     96                        capa_simplify(&capa);
     97
     98                        rc = capa_format(&capa, &str);
    9999
    100100                        PCUT_ASSERT_ERRNO_VAL(EOK, rc);
     
    102102                        free(str);
    103103
    104                         cap_from_blocks(block[x], input[i], &cap);
    105                         cap_simplify(&cap);
    106 
    107                         rc = cap_format(&cap, &str);
     104                        capa_from_blocks(block[x], input[i], &capa);
     105                        capa_simplify(&capa);
     106
     107                        rc = capa_format(&capa, &str);
    108108
    109109                        PCUT_ASSERT_ERRNO_VAL(EOK, rc);
     
    114114}
    115115
    116 PCUT_TEST(cap_format_rounding)
     116PCUT_TEST(capa_format_rounding)
    117117{
    118118        int input_size = 8;
     
    139139        };
    140140
    141         cap_spec_t cap;
     141        capa_spec_t capa;
    142142        char *str;
    143143        errno_t rc;
     
    145145        int i;
    146146        for (i = 0; i < input_size; i++) {
    147                 cap_from_blocks(input[i], 1, &cap);
    148                 cap_simplify(&cap);
    149 
    150                 rc = cap_format(&cap, &str);
     147                capa_from_blocks(input[i], 1, &capa);
     148                capa_simplify(&capa);
     149
     150                rc = capa_format(&capa, &str);
    151151
    152152                PCUT_ASSERT_ERRNO_VAL(EOK, rc);
     
    154154                free(str);
    155155
    156                 cap_from_blocks(1, input[i], &cap);
    157                 cap_simplify(&cap);
    158 
    159                 rc = cap_format(&cap, &str);
     156                capa_from_blocks(1, input[i], &capa);
     157                capa_simplify(&capa);
     158
     159                rc = capa_format(&capa, &str);
    160160
    161161                PCUT_ASSERT_ERRNO_VAL(EOK, rc);
     
    165165}
    166166
    167 PCUT_TEST(cap_parse)
     167PCUT_TEST(capa_parse)
    168168{
    169169        int input_size = 4;
     
    196196        };
    197197
    198         cap_spec_t cap;
     198        capa_spec_t capa;
    199199        errno_t rc;
    200200        int i;
    201201
    202202        for (i = 0; i < input_size; i++) {
    203                 rc = cap_parse(input[i], &cap);
    204 
    205                 PCUT_ASSERT_ERRNO_VAL(EOK, rc);
    206                 PCUT_ASSERT_INT_EQUALS(out_cunit[i], cap.cunit);
    207                 PCUT_ASSERT_INT_EQUALS(out_dp[i], cap.dp);
    208                 PCUT_ASSERT_INT_EQUALS(out_m[i], cap.m);
    209         }
    210 }
    211 
    212 PCUT_TEST(cap_to_blocks)
     203                rc = capa_parse(input[i], &capa);
     204
     205                PCUT_ASSERT_ERRNO_VAL(EOK, rc);
     206                PCUT_ASSERT_INT_EQUALS(out_cunit[i], capa.cunit);
     207                PCUT_ASSERT_INT_EQUALS(out_dp[i], capa.dp);
     208                PCUT_ASSERT_INT_EQUALS(out_m[i], capa.m);
     209        }
     210}
     211
     212PCUT_TEST(capa_to_blocks)
    213213{
    214214        int input_size = 0;
     
    261261        };
    262262
    263         cap_spec_t cap;
     263        capa_spec_t capa;
    264264        errno_t rc;
    265265        int i;
     
    267267
    268268        for (i = 0; i < input_size; i++) {
    269                 cap.m = input_m[i];
    270                 cap.dp = input_dp[i];
    271                 cap.cunit = cu_kbyte;
    272 
    273                 rc = cap_to_blocks(&cap, cv_nom, block[i], &ret);
     269                capa.m = input_m[i];
     270                capa.dp = input_dp[i];
     271                capa.cunit = cu_kbyte;
     272
     273                rc = capa_to_blocks(&capa, cv_nom, block[i], &ret);
    274274                PCUT_ASSERT_ERRNO_VAL(EOK, rc);
    275275                PCUT_ASSERT_INT_EQUALS(out_nom[i], ret);
    276276
    277                 rc = cap_to_blocks(&cap, cv_min, block[i], &ret);
     277                rc = capa_to_blocks(&capa, cv_min, block[i], &ret);
    278278                PCUT_ASSERT_ERRNO_VAL(EOK, rc);
    279279                PCUT_ASSERT_INT_EQUALS(out_min[i], ret);
    280280
    281                 rc = cap_to_blocks(&cap, cv_max, block[i], &ret);
     281                rc = capa_to_blocks(&capa, cv_max, block[i], &ret);
    282282                PCUT_ASSERT_ERRNO_VAL(EOK, rc);
    283283                PCUT_ASSERT_INT_EQUALS(out_max[i], ret);
     
    285285}
    286286
    287 PCUT_EXPORT(cap);
     287PCUT_EXPORT(capa);
  • uspace/lib/c/test/getopt.c

    rb093a62 r84876aa4  
    278278                "get_opt_test",
    279279                "-f",
    280                 "-p",
    281                 "param"
     280                "-pparam"
    282281        };
    283282
  • uspace/lib/c/test/main.c

    rb093a62 r84876aa4  
    3232PCUT_INIT;
    3333
    34 PCUT_IMPORT(cap);
     34PCUT_IMPORT(capa);
    3535PCUT_IMPORT(casting);
    3636PCUT_IMPORT(circ_buf);
Note: See TracChangeset for help on using the changeset viewer.