Changeset b5f305b in mainline for uspace/drv/bus/isa/isa.c


Ignore:
Timestamp:
2012-08-17T17:59:10Z (12 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
18ae0c8
Parents:
3d4ad475
Message:

isa: Add const qualifiers.

Prasing does not change the original string.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/bus/isa/isa.c

    r3d4ad475 rb5f305b  
    311311}
    312312
    313 static inline char *skip_spaces(char *line)
     313static inline const char *skip_spaces(const char *line)
    314314{
    315315        /* Skip leading spaces. */
     
    388388}
    389389
    390 static void fun_parse_irq(isa_fun_t *fun, char *val)
     390static void fun_parse_irq(isa_fun_t *fun, const char *val)
    391391{
    392392        int irq = 0;
     
    400400}
    401401
    402 static void fun_parse_dma(isa_fun_t *fun, char *val)
    403 {
    404         unsigned int dma = 0;
     402static void fun_parse_dma(isa_fun_t *fun, const char *val)
     403{
    405404        char *end = NULL;
    406405       
    407406        val = skip_spaces(val);
    408         dma = (unsigned int) strtol(val, &end, 10);
     407        int dma = strtol(val, &end, 10);
    409408       
    410409        if (val != end)
     
    412411}
    413412
    414 static void fun_parse_io_range(isa_fun_t *fun, char *val)
     413static void fun_parse_io_range(isa_fun_t *fun, const char *val)
    415414{
    416415        size_t addr, len;
     
    432431}
    433432
    434 static void get_match_id(char **id, char *val)
    435 {
    436         char *end = val;
     433static void get_match_id(char **id, const char *val)
     434{
     435        const char *end = val;
    437436
    438437        while (!isspace(*end))
     
    444443}
    445444
    446 static void fun_parse_match_id(isa_fun_t *fun, char *val)
     445static void fun_parse_match_id(isa_fun_t *fun, const char *val)
    447446{
    448447        char *id = NULL;
     
    480479}
    481480
    482 static bool prop_parse(isa_fun_t *fun, char *line, const char *prop,
    483     void (*read_fn)(isa_fun_t *, char *))
     481static bool prop_parse(isa_fun_t *fun, const char *line, const char *prop,
     482    void (*read_fn)(isa_fun_t *, const char *))
    484483{
    485484        size_t proplen = str_size(prop);
     
    496495}
    497496
    498 static void fun_prop_parse(isa_fun_t *fun, char *line)
     497static void fun_prop_parse(isa_fun_t *fun, const char *line)
    499498{
    500499        /* Skip leading spaces. */
Note: See TracChangeset for help on using the changeset viewer.