Changeset a7e8996 in rtems for cpukit


Ignore:
Timestamp:
Dec 21, 2018, 8:09:53 PM (6 months ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
956d76cc
Parents:
6073c71d
git-author:
Sebastian Huber <sebastian.huber@…> (12/21/18 20:09:53)
git-committer:
Sebastian Huber <sebastian.huber@…> (12/27/18 08:00:59)
Message:

drvmgr: Improve LP64 compatibility

Location:
cpukit
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • cpukit/include/drvmgr/drvmgr.h

    r6073c71d ra7e8996  
    513513#define DRVMGR_FED_BF 1         /* Breadth-first search */
    514514#define DRVMGR_FED_DF 0         /* Depth first search */
    515 extern int drvmgr_for_each_dev(
    516         int (*func)(struct drvmgr_dev *dev, void *arg),
     515extern intptr_t drvmgr_for_each_dev(
     516        intptr_t (*func)(struct drvmgr_dev *dev, void *arg),
    517517        void *arg,
    518518        int options);
  • cpukit/libdrvmgr/drvmgr_dev_by_name.c

    r6073c71d ra7e8996  
    1313#include "drvmgr_internal.h"
    1414
    15 static int dev_name_compare(struct drvmgr_dev *dev, void *arg)
     15static intptr_t dev_name_compare(struct drvmgr_dev *dev, void *arg)
    1616{
    1717        const char *name = arg;
    1818
    1919        if (dev->name && (strcmp(dev->name, name) == 0))
    20                 return (int)dev;
     20                return (intptr_t)dev;
    2121        else
    2222                return 0;
  • cpukit/libdrvmgr/drvmgr_for_each_dev.c

    r6073c71d ra7e8996  
    1414
    1515/* Traverse device tree breadth-first. Supports up to 31 buses */
    16 static int drvmgr_for_each_dev_breadth(
    17         int (*func)(struct drvmgr_dev *dev, void *arg),
     16static intptr_t drvmgr_for_each_dev_breadth(
     17        intptr_t (*func)(struct drvmgr_dev *dev, void *arg),
    1818        void *arg
    1919        )
     
    4444
    4545/* Traverse device tree depth-first. */
    46 static int drvmgr_for_each_dev_depth(
    47         int (*func)(struct drvmgr_dev *dev, void *arg),
     46static intptr_t drvmgr_for_each_dev_depth(
     47        intptr_t (*func)(struct drvmgr_dev *dev, void *arg),
    4848        void *arg
    4949        )
     
    7979
    8080/* Traverse device tree depth-first or breadth-first */
    81 int drvmgr_for_each_dev(
    82         int (*func)(struct drvmgr_dev *dev, void *arg),
     81intptr_t drvmgr_for_each_dev(
     82        intptr_t (*func)(struct drvmgr_dev *dev, void *arg),
    8383        void *arg,
    8484        int options
    8585        )
    8686{
    87         int ret;
     87        intptr_t ret;
    8888
    8989        DRVMGR_LOCK_READ();
  • cpukit/libdrvmgr/drvmgr_print.c

    r6073c71d ra7e8996  
    1414 */
    1515
     16#include <inttypes.h>
    1617#include <stdio.h>
    1718#include <stdlib.h>
     
    7980}
    8081
    81 static int drvmgr_topo_func(struct drvmgr_dev *dev, void *arg)
     82static intptr_t drvmgr_topo_func(struct drvmgr_dev *dev, void *arg)
    8283{
    8384        char prefix[32];
     
    342343        /* Print Driver */
    343344        printf(" -- DRIVER %p --\n", drv);
    344         printf("  DRIVER ID:   0x%llx\n", drv->drv_id);
     345        printf("  DRIVER ID:   0x%" PRIx64 "\n", drv->drv_id);
    345346        printf("  NAME:        %s\n", drv->name ? drv->name : "NO_NAME");
    346347        printf("  BUS TYPE:    %d\n", drv->bus_type);
  • cpukit/libmisc/shell/main_drvmgr.c

    r6073c71d ra7e8996  
    1414#endif
    1515
     16#include <inttypes.h>
    1617#include <limits.h>
    1718#include <stdlib.h>
     
    197198    else
    198199      drv_name = "UNKNOWN";
    199     printf(" RESOURCES FOR DEVICE[%02d] DRIVER[0x%llx (%s)]\n",
     200    printf(" RESOURCES FOR DEVICE[%02d] DRIVER[0x%" PRIu64 " (%s)]\n",
    200201            res->minor_bus, res->drv_id, drv_name);
    201202    shell_drvmgr_print_key_array(res->keys);
Note: See TracChangeset for help on using the changeset viewer.