Changeset 1ef0fc3 in mainline for uspace/app/sbi/src/os/posix.c


Ignore:
Timestamp:
2010-04-10T11:19:18Z (14 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
d7e45c8
Parents:
2721a75 (diff), 074444f (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 from lp:~jsvoboda/helenos/sysel.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/sbi/src/os/posix.c

    r2721a75 r1ef0fc3  
    2929/** @file POSIX-specific code. */
    3030
     31#include <libgen.h>
    3132#include <stdio.h>
    3233#include <stdlib.h>
     
    3940
    4041#include "os.h"
     42
     43/** Path to executable file via which we have been invoked. */
     44static char *ef_path;
    4145
    4246/*
     
    7175{
    7276        return strcmp(a, b);
     77}
     78
     79/** Return number of characters in string. */
     80size_t os_str_length(const char *str)
     81{
     82        return strlen(str);
    7383}
    7484
     
    146156        return EOK;
    147157}
     158
     159/** Store the executable file path via which we were executed. */
     160void os_store_ef_path(char *path)
     161{
     162        ef_path = path;
     163}
     164
     165/** Return path to the Sysel library
     166 *
     167 * @return New string. Caller should deallocate it using @c free().
     168 */
     169char *os_get_lib_path(void)
     170{
     171        return os_str_acat(dirname(ef_path), "/lib");
     172}
Note: See TracChangeset for help on using the changeset viewer.