Changeset 1313ee9 in mainline for uspace/srv/console/console.c


Ignore:
Timestamp:
2009-12-13T15:17:08Z (14 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
963dd91
Parents:
fc6dd18
Message:

introduce device namespaces

  • add support for explicit open in libfs (needed by devfs, but also possibly for other filesystems which need to track some stateful information)
  • extend libfs to be more generic, make proper adjustments to libc, tmpfs and fat
  • various updates to make use of the device namespaces
  • code cleanup
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/console/console.c

    rfc6dd18 r1313ee9  
    5757#include "screenbuffer.h"
    5858
    59 #define NAME  "console"
    60 
    61 #define MAX_DEVICE_NAME  32
     59#define NAME       "console"
     60#define NAMESPACE  "term"
    6261
    6362/** Phone to the keyboard driver. */
     
    6968        ipcarg_t cols;  /**< Framebuffer columns */
    7069        ipcarg_t rows;  /**< Framebuffer rows */
    71         int color_cap;  /**< Color capabilities (FB_CCAP_xxx) */
     70        int color_cap;  /**< Color capabilities (FB_CCAP_xxx) */
    7271} fb_info;
    7372
     
    740739                        consoles[i].refcount = 0;
    741740                       
    742                         char vc[MAX_DEVICE_NAME];
    743                         snprintf(vc, MAX_DEVICE_NAME, "vc%u", i);
     741                        char vc[DEVMAP_NAME_MAXLEN + 1];
     742                        snprintf(vc, DEVMAP_NAME_MAXLEN, "%s/vc%u", NAMESPACE, i);
    744743                       
    745744                        if (devmap_device_register(vc, &consoles[i].dev_handle) != EOK) {
Note: See TracChangeset for help on using the changeset viewer.