Changeset 3dbe4ca2 in mainline for uspace


Ignore:
Timestamp:
2011-04-29T11:10:24Z (14 years ago)
Author:
Oleg Romanenko <romanenko.oleg@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
ce8f4f4
Parents:
d260a95 (diff), 933cadf (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge mainline changes.

Location:
uspace
Files:
3 added
41 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/klog/klog.c

    rd260a95 r3dbe4ca2  
    118118        }
    119119       
    120         /*
    121          * Mode "a" would be definitively much better here, but it is
    122          * not well supported by the FAT driver.
    123          */
    124         log = fopen(LOG_FNAME, "w");
     120        log = fopen(LOG_FNAME, "a");
    125121        if (log == NULL)
    126122                printf("%s: Unable to create log file %s (%s)\n", NAME, LOG_FNAME,
  • uspace/app/stats/stats.c

    rd260a95 r3dbe4ca2  
    6969        size_t i;
    7070        for (i = 0; i < count; i++) {
    71                 uint64_t resmem, virtmem, ucycles, kcycles;
    72                 char resmem_suffix, virtmem_suffix, usuffix, ksuffix;
    73                
    74                 order_suffix(stats_tasks[i].resmem, &resmem, &resmem_suffix);
    75                 order_suffix(stats_tasks[i].virtmem, &virtmem, &virtmem_suffix);
     71                uint64_t resmem;
     72                uint64_t virtmem;
     73                uint64_t ucycles;
     74                uint64_t kcycles;
     75                const char *resmem_suffix;
     76                const char *virtmem_suffix;
     77                char usuffix;
     78                char ksuffix;
     79               
     80                bin_order_suffix(stats_tasks[i].resmem, &resmem, &resmem_suffix, true);
     81                bin_order_suffix(stats_tasks[i].virtmem, &virtmem, &virtmem_suffix, true);
    7682                order_suffix(stats_tasks[i].ucycles, &ucycles, &usuffix);
    7783                order_suffix(stats_tasks[i].kcycles, &kcycles, &ksuffix);
    7884               
    79                 printf("%-8" PRIu64 " %7zu %9" PRIu64 "%c %8" PRIu64 "%c"
     85                printf("%-8" PRIu64 " %7zu %7" PRIu64 "%s %6" PRIu64 "%s"
    8086                    " %8" PRIu64 "%c %8" PRIu64 "%c %s\n",
    8187                    stats_tasks[i].task_id, stats_tasks[i].threads,
  • uspace/app/tester/Makefile

    rd260a95 r3dbe4ca2  
    4949        loop/loop1.c \
    5050        mm/malloc1.c \
     51        mm/malloc2.c \
    5152        devs/devman1.c \
    5253        hw/misc/virtchar1.c \
  • uspace/app/tester/tester.c

    rd260a95 r3dbe4ca2  
    6262#include "loop/loop1.def"
    6363#include "mm/malloc1.def"
     64#include "mm/malloc2.def"
    6465#include "hw/serial/serial1.def"
    6566#include "hw/misc/virtchar1.def"
  • uspace/app/tester/tester.h

    rd260a95 r3dbe4ca2  
    7878extern const char *test_loop1(void);
    7979extern const char *test_malloc1(void);
     80extern const char *test_malloc2(void);
    8081extern const char *test_serial1(void);
    8182extern const char *test_virtchar1(void);
  • uspace/app/top/screen.c

    rd260a95 r3dbe4ca2  
    254254        uint64_t used;
    255255        uint64_t free;
    256         char total_suffix;
    257         char unavail_suffix;
    258         char used_suffix;
    259         char free_suffix;
    260        
    261         order_suffix(data->physmem->total, &total, &total_suffix);
    262         order_suffix(data->physmem->unavail, &unavail, &unavail_suffix);
    263         order_suffix(data->physmem->used, &used, &used_suffix);
    264         order_suffix(data->physmem->free, &free, &free_suffix);
    265        
    266         printf("memory: %" PRIu64 "%c total, %" PRIu64 "%c unavail, %"
    267             PRIu64 "%c used, %" PRIu64 "%c free", total, total_suffix,
     256        const char *total_suffix;
     257        const char *unavail_suffix;
     258        const char *used_suffix;
     259        const char *free_suffix;
     260       
     261        bin_order_suffix(data->physmem->total, &total, &total_suffix, false);
     262        bin_order_suffix(data->physmem->unavail, &unavail, &unavail_suffix, false);
     263        bin_order_suffix(data->physmem->used, &used, &used_suffix, false);
     264        bin_order_suffix(data->physmem->free, &free, &free_suffix, false);
     265       
     266        printf("memory: %" PRIu64 "%s total, %" PRIu64 "%s unavail, %"
     267            PRIu64 "%s used, %" PRIu64 "%s free", total, total_suffix,
    268268            unavail, unavail_suffix, used, used_suffix, free, free_suffix);
    269269        screen_newline();
     
    295295               
    296296                uint64_t resmem;
    297                 char resmem_suffix;
    298                 order_suffix(task->resmem, &resmem, &resmem_suffix);
     297                const char *resmem_suffix;
     298                bin_order_suffix(task->resmem, &resmem, &resmem_suffix, true);
    299299               
    300300                uint64_t virtmem;
    301                 char virtmem_suffix;
    302                 order_suffix(task->virtmem, &virtmem, &virtmem_suffix);
    303                
    304                 printf("%-8" PRIu64 " %7zu %9" PRIu64 "%c ",
     301                const char *virtmem_suffix;
     302                bin_order_suffix(task->virtmem, &virtmem, &virtmem_suffix, true);
     303               
     304                printf("%-8" PRIu64 " %7zu %7" PRIu64 "%s ",
    305305                    task->task_id, task->threads, resmem, resmem_suffix);
    306306                print_percent(perc->resmem, 2);
    307                 printf(" %8" PRIu64 "%c ", virtmem, virtmem_suffix);
     307                printf(" %6" PRIu64 "%s ", virtmem, virtmem_suffix);
    308308                print_percent(perc->virtmem, 2);
    309309                puts(" ");
  • uspace/lib/block/libblock.c

    rd260a95 r3dbe4ca2  
    5151#include <macros.h>
    5252#include <mem.h>
     53#include <malloc.h>
     54#include <stdio.h>
    5355#include <sys/typefmt.h>
    5456#include <stacktrace.h>
  • uspace/lib/c/Makefile

    rd260a95 r3dbe4ca2  
    113113        generic/arg_parse.c \
    114114        generic/sort.c \
    115         generic/stats.c
     115        generic/stats.c \
     116        generic/assert.c \
    116117
    117118SOURCES = \
  • uspace/lib/c/arch/ia32/include/config.h

    rd260a95 r3dbe4ca2  
    3636#define LIBC_ia32_CONFIG_H_
    3737
    38 #define PAGE_WIDTH      12
    39 #define PAGE_SIZE       (1 << PAGE_WIDTH)
     38#define PAGE_WIDTH  12
     39#define PAGE_SIZE   (1 << PAGE_WIDTH)
     40
     41#define USER_ADDRESS_SPACE_START_ARCH  UINT32_C(0x00000000)
     42#define USER_ADDRESS_SPACE_END_ARCH    UINT32_C(0x7fffffff)
    4043
    4144#endif
  • uspace/lib/c/arch/ia32/include/ddi.h

    rd260a95 r3dbe4ca2  
    3737#include <libarch/types.h>
    3838
    39 #define IO_SPACE_BOUNDARY       ((void *) (64 * 1024))
     39#define IO_SPACE_BOUNDARY  ((void *) (64 * 1024))
    4040
    4141static inline uint8_t pio_read_8(ioport8_t *port)
  • uspace/lib/c/arch/ia32/include/faddr.h

    rd260a95 r3dbe4ca2  
    3838#include <libarch/types.h>
    3939
    40 #define FADDR(fptr)             ((uintptr_t) (fptr))
     40#define FADDR(fptr)  ((uintptr_t) (fptr))
    4141
    4242#endif
  • uspace/lib/c/arch/ia32/include/fibril.h

    rd260a95 r3dbe4ca2  
    4242 * panic sooner or later
    4343 */
    44 #define SP_DELTA     (12)
     44#define SP_DELTA  12
    4545
    4646#define context_set(c, _pc, stack, size, ptls) \
     
    5151                (c)->ebp = 0; \
    5252        } while (0)
    53        
    54 /* We include only registers that must be preserved
     53
     54/*
     55 * We include only registers that must be preserved
    5556 * during function call
    5657 */
  • uspace/lib/c/arch/ia32/src/stacktrace.c

    rd260a95 r3dbe4ca2  
    3535 */
    3636
     37#include <libarch/config.h>
    3738#include <sys/types.h>
    3839#include <bool.h>
    39 
    4040#include <stacktrace.h>
    4141
    42 #define FRAME_OFFSET_FP_PREV    0
    43 #define FRAME_OFFSET_RA         4
     42#define FRAME_OFFSET_FP_PREV  0
     43#define FRAME_OFFSET_RA       4
    4444
    4545bool stacktrace_fp_valid(stacktrace_t *st, uintptr_t fp)
    4646{
    4747        (void) st;
    48         return fp != 0;
     48        return (fp != 0) && (fp <= USER_ADDRESS_SPACE_END_ARCH);
    4949}
    5050
  • uspace/lib/c/arch/ia64/_link.ld.in

    rd260a95 r3dbe4ca2  
    2222       
    2323        .got : {
    24                 _gp = .;
     24                /* Tell the linker where we expect GP to point. */
     25                __gp = .;
    2526                *(.got .got.*);
    2627        } :data
  • uspace/lib/c/arch/ia64/src/entry.s

    rd260a95 r3dbe4ca2  
    3939__entry:
    4040        alloc loc0 = ar.pfs, 0, 1, 2, 0
    41         movl gp = _gp
     41        movl gp = __gp
    4242       
    4343        # Pass PCB pointer as the first argument to __main
  • uspace/lib/c/arch/ia64/src/thread_entry.s

    rd260a95 r3dbe4ca2  
    3737        alloc loc0 = ar.pfs, 0, 1, 1, 0
    3838
    39         movl gp = _gp
     39        movl gp = __gp
    4040       
    4141        #
  • uspace/lib/c/generic/async.c

    rd260a95 r3dbe4ca2  
    102102#include <arch/barrier.h>
    103103#include <bool.h>
     104#include <stdlib.h>
     105#include <malloc.h>
    104106#include "private/async.h"
    105107
  • uspace/lib/c/generic/async_sess.c

    rd260a95 r3dbe4ca2  
    105105#include <errno.h>
    106106#include <assert.h>
     107#include <async.h>
    107108#include "private/async_sess.h"
    108109
  • uspace/lib/c/generic/errno.c

    rd260a95 r3dbe4ca2  
    3636#include <fibril.h>
    3737
    38 int _errno;
     38static fibril_local int fibril_errno;
     39
     40int *__errno(void)
     41{
     42        return &fibril_errno;
     43}
    3944
    4045/** @}
  • uspace/lib/c/generic/fibril_synch.c

    rd260a95 r3dbe4ca2  
    4343#include <stacktrace.h>
    4444#include <stdlib.h>
     45#include <stdio.h>
    4546#include "private/async.h"
    4647
  • uspace/lib/c/generic/io/io.c

    rd260a95 r3dbe4ca2  
    173173                }
    174174                *flags = (O_APPEND | O_CREAT) | (plus ? O_RDWR : O_WRONLY);
     175                break;
    175176        default:
    176177                errno = EINVAL;
  • uspace/lib/c/generic/malloc.c

    rd260a95 r3dbe4ca2  
    4444#include <mem.h>
    4545#include <futex.h>
     46#include <stdlib.h>
    4647#include <adt/gcdlcm.h>
    4748#include "private/malloc.h"
  • uspace/lib/c/generic/stacktrace.c

    rd260a95 r3dbe4ca2  
    6161        stacktrace_prepare();
    6262        stacktrace_print_fp_pc(stacktrace_fp_get(), stacktrace_pc_get());
     63       
    6364        /*
    6465         * Prevent the tail call optimization of the previous call by
    6566         * making it a non-tail call.
    6667         */
    67         (void) stacktrace_fp_get();
     68       
     69        printf("-- end of stack trace --\n");
    6870}
    6971
  • uspace/lib/c/generic/str.c

    rd260a95 r3dbe4ca2  
    12151215void order_suffix(const uint64_t val, uint64_t *rv, char *suffix)
    12161216{
    1217         if (val > 10000000000000000000ULL) {
    1218                 *rv = val / 1000000000000000000ULL;
     1217        if (val > UINT64_C(10000000000000000000)) {
     1218                *rv = val / UINT64_C(1000000000000000000);
    12191219                *suffix = 'Z';
    1220         } else if (val > 1000000000000000000ULL) {
    1221                 *rv = val / 1000000000000000ULL;
     1220        } else if (val > UINT64_C(1000000000000000000)) {
     1221                *rv = val / UINT64_C(1000000000000000);
    12221222                *suffix = 'E';
    1223         } else if (val > 1000000000000000ULL) {
    1224                 *rv = val / 1000000000000ULL;
     1223        } else if (val > UINT64_C(1000000000000000)) {
     1224                *rv = val / UINT64_C(1000000000000);
    12251225                *suffix = 'T';
    1226         } else if (val > 1000000000000ULL) {
    1227                 *rv = val / 1000000000ULL;
     1226        } else if (val > UINT64_C(1000000000000)) {
     1227                *rv = val / UINT64_C(1000000000);
    12281228                *suffix = 'G';
    1229         } else if (val > 1000000000ULL) {
    1230                 *rv = val / 1000000ULL;
     1229        } else if (val > UINT64_C(1000000000)) {
     1230                *rv = val / UINT64_C(1000000);
    12311231                *suffix = 'M';
    1232         } else if (val > 1000000ULL) {
    1233                 *rv = val / 1000ULL;
     1232        } else if (val > UINT64_C(1000000)) {
     1233                *rv = val / UINT64_C(1000);
    12341234                *suffix = 'k';
    12351235        } else {
     
    12391239}
    12401240
     1241void bin_order_suffix(const uint64_t val, uint64_t *rv, const char **suffix,
     1242    bool fixed)
     1243{
     1244        if (val > UINT64_C(1152921504606846976)) {
     1245                *rv = val / UINT64_C(1125899906842624);
     1246                *suffix = "EiB";
     1247        } else if (val > UINT64_C(1125899906842624)) {
     1248                *rv = val / UINT64_C(1099511627776);
     1249                *suffix = "TiB";
     1250        } else if (val > UINT64_C(1099511627776)) {
     1251                *rv = val / UINT64_C(1073741824);
     1252                *suffix = "GiB";
     1253        } else if (val > UINT64_C(1073741824)) {
     1254                *rv = val / UINT64_C(1048576);
     1255                *suffix = "MiB";
     1256        } else if (val > UINT64_C(1048576)) {
     1257                *rv = val / UINT64_C(1024);
     1258                *suffix = "KiB";
     1259        } else {
     1260                *rv = val;
     1261                if (fixed)
     1262                        *suffix = "B  ";
     1263                else
     1264                        *suffix = "B";
     1265        }
     1266}
     1267
    12411268/** @}
    12421269 */
  • uspace/lib/c/include/assert.h

    rd260a95 r3dbe4ca2  
    4040 *
    4141 * If NDEBUG is not set, the assert() macro
    42  * evaluates expr and if it is false prints 
     42 * evaluates expr and if it is false prints
    4343 * error message and terminate program.
    4444 *
     
    4747 */
    4848
    49 #include <stdio.h>
    50 #include <stdlib.h>
    51 
    5249#ifndef NDEBUG
    5350
    5451#define assert(expr) \
    5552        do { \
    56                 if (!(expr)) { \
    57                         printf("Assertion failed (%s) at file '%s', " \
    58                             "line %d.\n", #expr, __FILE__, __LINE__); \
    59                         abort(); \
    60                 } \
     53                if (!(expr)) \
     54                        assert_abort(#expr, __FILE__, __LINE__); \
    6155        } while (0)
    6256
     
    6761#endif /* NDEBUG */
    6862
     63extern void assert_abort(const char *, const char *, unsigned int)
     64    __attribute__((noreturn));
     65
    6966#endif
    7067
  • uspace/lib/c/include/errno.h

    rd260a95 r3dbe4ca2  
    3939#include <fibril.h>
    4040
    41 #define errno _errno
     41#define errno  (*(__errno()))
    4242
    43 extern int _errno;
     43extern int *__errno(void) __attribute__((const));
    4444
    4545#define EMFILE        (-18)
  • uspace/lib/c/include/fibril_synch.h

    rd260a95 r3dbe4ca2  
    3636#define LIBC_FIBRIL_SYNCH_H_
    3737
    38 #include <async.h>
    3938#include <fibril.h>
    4039#include <adt/list.h>
    4140#include <libarch/tls.h>
    4241#include <sys/time.h>
     42#include <bool.h>
    4343
    4444typedef struct {
    45         fibril_owner_info_t oi;         /* Keep this the first thing. */
     45        fibril_owner_info_t oi;  /**< Keep this the first thing. */
    4646        int counter;
    4747        link_t waiters;
     
    6464
    6565typedef struct {
    66         fibril_owner_info_t oi; /* Keep this the first thing. */
     66        fibril_owner_info_t oi;  /**< Keep this the first thing. */
    6767        unsigned writers;
    6868        unsigned readers;
  • uspace/lib/c/include/macros.h

    rd260a95 r3dbe4ca2  
    3939#define max(a, b)  ((a) > (b) ? (a) : (b))
    4040
    41 #define SIZE2KB(size)  ((size) >> 10)
    42 #define SIZE2MB(size)  ((size) >> 20)
    43 
    44 #define KB2SIZE(kb)  ((kb) << 10)
    45 #define MB2SIZE(mb)  ((mb) << 20)
     41#define KiB2SIZE(kb)  ((kb) << 10)
     42#define MiB2SIZE(mb)  ((mb) << 20)
    4643
    4744#define STRING(arg)      STRING_ARG(arg)
  • uspace/lib/c/include/str.h

    rd260a95 r3dbe4ca2  
    8989extern int str_size_t(const char *, char **, unsigned int, bool, size_t *);
    9090
    91 extern void order_suffix(const uint64_t val, uint64_t *rv, char *suffix);
     91extern void order_suffix(const uint64_t, uint64_t *, char *);
     92extern void bin_order_suffix(const uint64_t, uint64_t *, const char **, bool);
    9293
    9394/*
  • uspace/lib/drv/generic/driver.c

    rd260a95 r3dbe4ca2  
    4747#include <stdlib.h>
    4848#include <str.h>
     49#include <str_error.h>
    4950#include <ctype.h>
    5051#include <errno.h>
     
    655656int ddf_driver_main(driver_t *drv)
    656657{
     658        int rc;
     659
    657660        /*
    658661         * Remember the driver structure - driver_ops will be called by generic
     
    668671       
    669672        /*
    670          * Register driver by device manager with generic handler for incoming
    671          * connections.
     673         * Register driver with device manager using generic handler for
     674         * incoming connections.
    672675         */
    673         devman_driver_register(driver->name, driver_connection);
    674        
     676        rc = devman_driver_register(driver->name, driver_connection);
     677        if (rc != EOK) {
     678                printf("Error: Failed to register driver with device manager "
     679                    "(%s).\n", (rc == EEXISTS) ? "driver already started" :
     680                    str_error(rc));
     681               
     682                return 1;
     683        }
     684       
     685        /* Return success from the task since server has started. */
     686        rc = task_retval(0);
     687        if (rc != EOK)
     688                return 1;
     689
    675690        async_manager();
    676691       
  • uspace/srv/devman/devman.c

    rd260a95 r3dbe4ca2  
    3939#include <devmap.h>
    4040#include <str_error.h>
     41#include <stdio.h>
    4142
    4243#include "devman.h"
     
    555556}
    556557
    557 /** Remember the driver's phone.
    558  *
    559  * @param driver        The driver.
    560  * @param phone         The phone to the driver.
    561  */
    562 void set_driver_phone(driver_t *driver, sysarg_t phone)
    563 {
    564         fibril_mutex_lock(&driver->driver_mutex);
    565         assert(driver->state == DRIVER_STARTING);
    566         driver->phone = phone;
    567         fibril_mutex_unlock(&driver->driver_mutex);
    568 }
    569 
    570558/** Notify driver about the devices to which it was assigned.
    571559 *
     
    685673        list_initialize(&drv->devices);
    686674        fibril_mutex_initialize(&drv->driver_mutex);
     675        drv->phone = -1;
    687676}
    688677
  • uspace/srv/devman/devman.h

    rd260a95 r3dbe4ca2  
    8888       
    8989        /** Phone asociated with this driver. */
    90         sysarg_t phone;
     90        int phone;
    9191        /** Name of the device driver. */
    9292        char *name;
     
    316316
    317317extern driver_t *find_driver(driver_list_t *, const char *);
    318 extern void set_driver_phone(driver_t *, sysarg_t);
    319318extern void initialize_running_driver(driver_t *, dev_tree_t *);
    320319
  • uspace/srv/devman/main.c

    rd260a95 r3dbe4ca2  
    9595        /* Find driver structure. */
    9696        driver = find_driver(&drivers_list, drv_name);
    97        
    9897        if (driver == NULL) {
    9998                log_msg(LVL_ERROR, "No driver named `%s' was found.", drv_name);
     
    107106        drv_name = NULL;
    108107       
     108        fibril_mutex_lock(&driver->driver_mutex);
     109       
     110        if (driver->phone >= 0) {
     111                /* We already have a connection to the driver. */
     112                log_msg(LVL_ERROR, "Driver '%s' already started.\n",
     113                    driver->name);
     114                fibril_mutex_unlock(&driver->driver_mutex);
     115                async_answer_0(iid, EEXISTS);
     116                return NULL;
     117        }
     118       
     119        switch (driver->state) {
     120        case DRIVER_NOT_STARTED:
     121                /* Somebody started the driver manually. */
     122                log_msg(LVL_NOTE, "Driver '%s' started manually.\n",
     123                    driver->name);
     124                driver->state = DRIVER_STARTING;
     125                break;
     126        case DRIVER_STARTING:
     127                /* The expected case */
     128                break;
     129        case DRIVER_RUNNING:
     130                /* Should not happen since we do not have a connected phone */
     131                assert(false);
     132        }
     133       
    109134        /* Create connection to the driver. */
    110135        log_msg(LVL_DEBUG, "Creating connection to the `%s' driver.",
     
    113138        ipc_callid_t callid = async_get_call(&call);
    114139        if (IPC_GET_IMETHOD(call) != IPC_M_CONNECT_TO_ME) {
     140                fibril_mutex_unlock(&driver->driver_mutex);
    115141                async_answer_0(callid, ENOTSUP);
    116142                async_answer_0(iid, ENOTSUP);
     
    119145       
    120146        /* Remember driver's phone. */
    121         set_driver_phone(driver, IPC_GET_ARG5(call));
     147        driver->phone = IPC_GET_ARG5(call);
     148       
     149        fibril_mutex_unlock(&driver->driver_mutex);
    122150       
    123151        log_msg(LVL_NOTE,
     
    578606                method = DRIVER_CLIENT;
    579607       
    580         if (driver->phone <= 0) {
     608        if (driver->phone < 0) {
    581609                log_msg(LVL_ERROR,
    582610                    "Could not forward to driver `%s' (phone is %d).",
     
    618646        dev = fun->dev;
    619647       
    620         if (dev->state != DEVICE_USABLE || dev->drv->phone <= 0) {
     648        if (dev->state != DEVICE_USABLE || dev->drv->phone < 0) {
    621649                async_answer_0(iid, EINVAL);
    622650                return;
  • uspace/srv/fs/fat/fat_fat.c

    rd260a95 r3dbe4ca2  
    4747#include <assert.h>
    4848#include <fibril_synch.h>
     49#include <malloc.h>
    4950#include <mem.h>
    5051
  • uspace/srv/fs/fat/fat_idx.c

    rd260a95 r3dbe4ca2  
    4444#include <assert.h>
    4545#include <fibril_synch.h>
     46#include <malloc.h>
    4647
    4748/** Each instance of this type describes one interval of freed VFS indices. */
  • uspace/srv/fs/fat/fat_ops.c

    rd260a95 r3dbe4ca2  
    5555#include <sys/mman.h>
    5656#include <align.h>
     57#include <malloc.h>
    5758
    5859#define FAT_NODE(node)  ((node) ? (fat_node_t *) (node)->data : NULL)
     
    724725                    (str_cmp((char *) d->name, FAT_NAME_DOT)) == 0) {
    725726                        memset(d, 0, sizeof(fat_dentry_t));
    726                         str_cpy((char *) d->name, 8, FAT_NAME_DOT);
    727                         str_cpy((char *) d->ext, 3, FAT_EXT_PAD);
     727                        memcpy(d->name, FAT_NAME_DOT, FAT_NAME_LEN);
     728                        memcpy(d->ext, FAT_EXT_PAD, FAT_EXT_LEN);
    728729                        d->attr = FAT_ATTR_SUBDIR;
    729730                        d->firstc = host2uint16_t_le(childp->firstc);
     
    734735                    (str_cmp((char *) d->name, FAT_NAME_DOT_DOT) == 0)) {
    735736                        memset(d, 0, sizeof(fat_dentry_t));
    736                         str_cpy((char *) d->name, 8, FAT_NAME_DOT_DOT);
    737                         str_cpy((char *) d->ext, 3, FAT_EXT_PAD);
     737                        memcpy(d->name, FAT_NAME_DOT_DOT, FAT_NAME_LEN);
     738                        memcpy(d->ext, FAT_EXT_PAD, FAT_EXT_LEN);
    738739                        d->attr = FAT_ATTR_SUBDIR;
    739740                        d->firstc = (parentp->firstc == FAT_CLST_ROOT) ?
     
    10021003        }
    10031004
    1004         /* Determining type of FAT  */
    1005         if (FAT_IS_FAT12(bs)) {
    1006                 printf("Found FAT12 filesystem\n");
    1007         } else if (FAT_IS_FAT16(bs)) {
    1008                 printf("Found FAT16 filesystem\n");
    1009         } else {
    1010                 printf("FAT32 filesystem is not supported by FAT server.\n");
     1005        /* Return NOT SUPPORTED if try to mount FAT32  */
     1006        if (!FAT_IS_FAT12(bs) && !FAT_IS_FAT16(bs)) {
    10111007                block_fini(devmap_handle);
    10121008                async_answer_0(rid, ENOTSUP);
     
    10171013        rc = fat_sanity_check(bs, devmap_handle);
    10181014        if (rc != EOK) {
    1019                 printf("Sanity check failed\n");
    10201015                (void) block_cache_fini(devmap_handle);
    10211016                block_fini(devmap_handle);
  • uspace/srv/hw/netif/ne2000/dp8390.c

    rd260a95 r3dbe4ca2  
    5353#include <byteorder.h>
    5454#include <errno.h>
     55#include <stdio.h>
    5556#include <libarch/ddi.h>
    5657#include <net/packet.h>
  • uspace/srv/loader/arch/ia64/_link.ld.in

    rd260a95 r3dbe4ca2  
    2828       
    2929        .got : {
    30                 _gp = .;
     30                /* Tell the linker where we expect GP to point. */
     31                __gp = .;
    3132                *(.got .got.*);
    3233        } :data
  • uspace/srv/ns/clonable.c

    rd260a95 r3dbe4ca2  
    7878        if (list_empty(&cs_req)) {
    7979                /* There was no pending connection request. */
    80                 printf(NAME ": Unexpected clonable server.\n");
     80                printf("%s: Unexpected clonable server.\n", NAME);
    8181                ipc_answer_0(callid, EBUSY);
    8282                return;
  • uspace/srv/ns/service.c

    rd260a95 r3dbe4ca2  
    3535#include <assert.h>
    3636#include <errno.h>
     37#include <stdio.h>
     38#include <malloc.h>
    3739#include "service.h"
    3840#include "ns.h"
  • uspace/srv/ns/task.c

    rd260a95 r3dbe4ca2  
    3939#include <stdio.h>
    4040#include <macros.h>
     41#include <malloc.h>
    4142#include "task.h"
    4243#include "ns.h"
Note: See TracChangeset for help on using the changeset viewer.