Changeset 8973acd in buchla-68k for libcio/open.c


Ignore:
Timestamp:
07/15/2017 03:12:10 PM (7 years ago)
Author:
Thomas Lopatic <thomas@…>
Branches:
master
Children:
ea232f9
Parents:
7d0d347
Message:

No more warnings in libcio.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcio/open.c

    r7d0d347 r8973acd  
    1919static struct devtabl devtabl[] = {
    2020
    21         { "con:", &condev,  &devtabl[0] },      /* console device */
    22         { "CON:", &condev,  &devtabl[1] },
    23 
    24         {      0, &filedev,      NULL  }       /* this MUST be the last entry */
     21        { "con:", &condev,  &devtabl[0], CON_DEV },     /* console device */
     22        { "CON:", &condev,  &devtabl[1], CON_DEV },
     23
     24        {      0, &filedev,        NULL,      -1 }      /* this MUST be the last entry */
    2525};
    2626
     
    3434*/
    3535
    36 int16_t open(int8_t *name, int16_t flag, int16_t mode)
     36int16_t open(int8_t *name, uint16_t flag)
    3737{
    3838        register struct devtabl *dp;
    3939        register struct channel *chp;
    4040        register struct device  *dev;
    41         int16_t fd, mdmask;
     41        int16_t fd;
     42        uint16_t mdmask;
    4243
    4344        /* search for a free channel */
     
    8485        chp->c_close = _nopc;
    8586
    86         if ((*dev->d_open)(name, flag, mode, chp, dp) < 0) {    /* open */
     87        if ((*dev->d_open)(name, flag, chp, dp) < 0) {  /* open */
    8788
    8889                chp->c_close = _badfc;  /* couldn't open for some reason */
     
    102103*/
    103104
    104 int16_t opena(int8_t *name, int16_t flag, int16_t mode)
    105 {
    106         return(open(name, flag, mode));
     105int16_t opena(int8_t *name, uint16_t flag)
     106{
     107        return(open(name, flag));
    107108}
    108109
     
    116117*/
    117118
    118 int16_t openb(int8_t *name, int16_t flag, int16_t mode)
    119 {
    120         return(open(name, flag|O_RAW, mode));
     119int16_t openb(int8_t *name, uint16_t flag)
     120{
     121        return(open(name, flag|O_RAW));
    121122}
    122123
     
    131132*/
    132133
    133 int16_t creat(int8_t *name, int16_t mode)
    134 {
    135         return(open(name, O_WRONLY|O_TRUNC|O_CREAT, mode));
     134int16_t creat(int8_t *name)
     135{
     136        return(open(name, O_WRONLY|O_TRUNC|O_CREAT));
    136137}
    137138
     
    146147*/
    147148
    148 int16_t creata(int8_t *name, int16_t mode)
    149 {
    150         return(open(name, O_WRONLY|O_TRUNC|O_CREAT, mode));
     149int16_t creata(int8_t *name)
     150{
     151        return(open(name, O_WRONLY|O_TRUNC|O_CREAT));
    151152}
    152153
     
    161162*/
    162163
    163 int16_t creatb(int8_t *name, int16_t mode)
    164 {
    165         return(open(name, O_WRONLY|O_TRUNC|O_CREAT|O_RAW, mode));
     164int16_t creatb(int8_t *name)
     165{
     166        return(open(name, O_WRONLY|O_TRUNC|O_CREAT|O_RAW));
    166167}
    167168
     
    174175*/
    175176
    176 int16_t _fileop(int8_t *name, int16_t flag, int16_t mode, struct channel *chp, struct devtabl *dp)
     177int16_t _fileop(int8_t *name, uint16_t flag, struct channel *chp, struct devtabl *dp)
    177178{
    178179        register struct fcb *fp;
    179180        int8_t  tmpname[9], tmpext[4];
    180181
    181         (void)mode;
    182182        (void)dp;
    183183
Note: See TracChangeset for help on using the changeset viewer.