Changeset 8630748 in mainline for uspace/drv


Ignore:
Timestamp:
2020-06-24T22:43:00Z (5 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
78445be8
Parents:
62018a0
Message:

Handle attempt to launch second display server gracefully

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/fb/kfb/port.c

    r62018a0 r8630748  
    377377                assert(gc_id == 42);
    378378
     379                if (kfb->addr != AS_AREA_ANY) {
     380                        /* This means there already is a GC connection */
     381                        async_answer_0(icall, EBUSY);
     382                        return;
     383                }
     384
    379385                rc = physmem_map(kfb->paddr + kfb->offset,
    380386                    ALIGN_UP(kfb->size, PAGE_SIZE) >> PAGE_WIDTH,
     
    392398                rc = physmem_unmap(kfb->addr);
    393399                if (rc == EOK)
    394                         kfb->addr = NULL;
     400                        kfb->addr = AS_AREA_ANY;
    395401        }
    396402
    397403        return;
    398404error:
    399         if (kfb->addr != NULL) {
     405        if (kfb->addr != AS_AREA_ANY) {
    400406                if (physmem_unmap(kfb->addr) == EOK)
    401                         kfb->addr = NULL;
     407                        kfb->addr = AS_AREA_ANY;
    402408        }
    403409
Note: See TracChangeset for help on using the changeset viewer.