Changeset 2b3dd78 in mainline for uspace/app


Ignore:
Timestamp:
2018-01-31T12:02:00Z (8 years ago)
Author:
Jenda <jenda.jzqk73@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
5595841
Parents:
a0a9cc2 (diff), 14d789c (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 remote-tracking branch 'upstream/master' into forwardport

change tmon includes because of new stdlib

Location:
uspace/app
Files:
1 deleted
56 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/bdsh/cmds/builtins/batch/batch.c

    ra0a9cc2 r2b3dd78  
    3232#include <stddef.h>
    3333#include <errno.h>
     34#include <str.h>
    3435#include "config.h"
    3536#include "util.h"
  • uspace/app/bdsh/cmds/modules/cat/cat.c

    ra0a9cc2 r2b3dd78  
    215215
    216216        if (tail != CAT_FULL_FILE) {
    217                 struct stat st;
     217                vfs_stat_t st;
    218218
    219219                if (vfs_stat(fd, &st) != EOK) {
  • uspace/app/bdsh/cmds/modules/cp/cp.c

    ra0a9cc2 r2b3dd78  
    8080static dentry_type_t get_type(const char *path)
    8181{
    82         struct stat s;
     82        vfs_stat_t s;
    8383
    8484        errno_t r = vfs_stat_path(path, &s);
     
    340340                 */
    341341                while ((dp = readdir(dir))) {
    342                         struct stat src_s;
    343                         struct stat dest_s;
     342                        vfs_stat_t src_s;
     343                        vfs_stat_t dest_s;
    344344
    345345                        char src_dent[PATH_MAX];
     
    392392        char *buff = NULL;
    393393        aoff64_t posr = 0, posw = 0;
    394         struct stat st;
     394        vfs_stat_t st;
    395395
    396396        if (vb)
  • uspace/app/bdsh/cmds/modules/ls/ls.h

    ra0a9cc2 r2b3dd78  
    2323struct dir_elem_t {
    2424        char *name;
    25         struct stat s;
     25        vfs_stat_t s;
    2626};
    2727
  • uspace/app/bdsh/cmds/modules/mount/mount.c

    ra0a9cc2 r2b3dd78  
    3737#include <getopt.h>
    3838#include <inttypes.h>
     39#include <str.h>
    3940#include "config.h"
    4041#include "util.h"
  • uspace/app/bdsh/cmds/modules/sleep/sleep.c

    ra0a9cc2 r2b3dd78  
    3131#include <stdio.h>
    3232#include <stdlib.h>
     33#include <str.h>
    3334#include "config.h"
    3435#include "util.h"
  • uspace/app/bdsh/cmds/modules/touch/touch.c

    ra0a9cc2 r2b3dd78  
    8282        int longind;
    8383        bool no_create = false;
    84         struct stat file_stat;
     84        vfs_stat_t file_stat;
    8585        int fd = -1;
    8686        char *buff = NULL;
  • uspace/app/bdsh/compl.c

    ra0a9cc2 r2b3dd78  
    3434#include <stdlib.h>
    3535#include <vfs/vfs.h>
     36#include <str.h>
    3637
    3738#include "cmds/cmds.h"
     
    6869
    6970        /** Pointer inside list of directories */
    70         const char **path;
     71        const char *const *path;
    7172        /** If not @c NULL, should be freed in the end. */
    72         const char **path_list;
     73        char **path_list;
    7374        /** Current open directory */
    7475        DIR *dir;
     
    218219                cs->path_list[0] = dirname;
    219220                cs->path_list[1] = NULL;
    220                 cs->path = cs->path_list;
     221                /* The second const ensures that we can't assign a const
     222                 * string to the non-const array. */
     223                cs->path = (const char *const *) cs->path_list;
    221224
    222225        } else if (cs->is_command) {
     
    359362                                char *ent_path;
    360363                                asprintf(&ent_path, "%s/%s", *cs->path, dent->d_name);
    361                                 struct stat ent_stat;
     364                                vfs_stat_t ent_stat;
    362365                                if (vfs_stat_path(ent_path, &ent_stat) != EOK) {
    363366                                        /* Error */
  • uspace/app/bdsh/errors.h

    ra0a9cc2 r2b3dd78  
    4949
    5050extern void cli_error(int, const char *, ...)
    51     PRINTF_ATTRIBUTE(2, 3);
     51    _HELENOS_PRINTF_ATTRIBUTE(2, 3);
    5252
    5353#endif
  • uspace/app/bdsh/tok.h

    ra0a9cc2 r2b3dd78  
    4242        size_t byte_length;
    4343        size_t char_length;
    44         token_type_t type;
     44        token_type_t type;
    4545} token_t;
    4646
  • uspace/app/blkdump/blkdump.c

    ra0a9cc2 r2b3dd78  
    4949#include <inttypes.h>
    5050#include <errno.h>
     51#include <str.h>
    5152
    5253#define NAME    "blkdump"
  • uspace/app/bnchmark/bnchmark.c

    ra0a9cc2 r2b3dd78  
    4949#include <time.h>
    5050#include <dirent.h>
     51#include <str.h>
    5152
    5253#define NAME    "bnchmark"
  • uspace/app/corecfg/corecfg.c

    ra0a9cc2 r2b3dd78  
    3636#include <errno.h>
    3737#include <stdio.h>
     38#include <str.h>
    3839
    3940#define NAME "corecfg"
  • uspace/app/date/date.c

    ra0a9cc2 r2b3dd78  
    3636#include <getopt.h>
    3737#include <ctype.h>
     38#include <str.h>
    3839
    3940#define NAME   "date"
  • uspace/app/devctl/devctl.c

    ra0a9cc2 r2b3dd78  
    3939#include <stdio.h>
    4040#include <stdlib.h>
     41#include <str.h>
    4142#include <str_error.h>
    4243
  • uspace/app/df/df.c

    ra0a9cc2 r2b3dd78  
    5858static errno_t size_to_human_readable(uint64_t, size_t, char **);
    5959static void print_header(void);
    60 static errno_t print_statfs(struct statfs *, char *, char *);
     60static errno_t print_statfs(vfs_statfs_t *, char *, char *);
    6161static void print_usage(void);
    6262
     
    6464{
    6565        int optres, errflg = 0;
    66         struct statfs st;
     66        vfs_statfs_t st;
    6767        errno_t rc;
    6868
     
    147147}
    148148
    149 static errno_t print_statfs(struct statfs *st, char *name, char *mountpoint)
     149static errno_t print_statfs(vfs_statfs_t *st, char *name, char *mountpoint)
    150150{
    151151        uint64_t const used_blocks = st->f_blocks - st->f_bfree;
  • uspace/app/dltest/dltest.c

    ra0a9cc2 r2b3dd78  
    4141#include <stdio.h>
    4242#include <stdlib.h>
     43#include <str.h>
    4344
    4445/** libdltest library handle */
  • uspace/app/dnscfg/dnscfg.c

    ra0a9cc2 r2b3dd78  
    4343#include <stdlib.h>
    4444#include <stdint.h>
     45#include <str.h>
    4546#include <str_error.h>
    4647
  • uspace/app/dnsres/dnsres.c

    ra0a9cc2 r2b3dd78  
    3838#include <stdio.h>
    3939#include <stdlib.h>
     40#include <str.h>
    4041
    4142#define NAME  "dnsres"
  • uspace/app/edit/search_impl.h

    ra0a9cc2 r2b3dd78  
    4343        /* Note: This structure is opaque for the user. */
    4444
    45         const wchar_t *pattern;
     45        wchar_t *pattern;
    4646        size_t pattern_length;
    4747        ssize_t *back_table;
  • uspace/app/fdisk/fdisk.c

    ra0a9cc2 r2b3dd78  
    4242#include <stdlib.h>
    4343#include <fdisk.h>
     44#include <str.h>
    4445
    4546#define NO_LABEL_CAPTION "(No name)"
  • uspace/app/fontviewer/fontviewer.c

    ra0a9cc2 r2b3dd78  
    139139
    140140static int text(drawctx_t *, font_t *, source_t *, surface_coord_t x,
    141     surface_coord_t , const char *, ...) PRINTF_ATTRIBUTE(6, 7);
     141    surface_coord_t , const char *, ...) _HELENOS_PRINTF_ATTRIBUTE(6, 7);
    142142static int text(drawctx_t *drawctx, font_t *font, source_t *source,
    143143    surface_coord_t x, surface_coord_t y, const char *fmt, ...)
  • uspace/app/getterm/getterm.c

    ra0a9cc2 r2b3dd78  
    4242#include <loc.h>
    4343#include <vfs/vfs.h>
     44#include <str.h>
    4445#include "version.h"
    4546#include "welcome.h"
  • uspace/app/inet/inet.c

    ra0a9cc2 r2b3dd78  
    4343#include <stdlib.h>
    4444#include <stdint.h>
     45#include <str.h>
    4546#include <str_error.h>
    4647
  • uspace/app/init/init.c

    ra0a9cc2 r2b3dd78  
    152152static errno_t srv_startl(const char *path, ...)
    153153{
    154         struct stat s;
     154        vfs_stat_t s;
    155155        if (vfs_stat_path(path, &s) != EOK) {
    156156                printf("%s: Unable to stat %s\n", NAME, path);
  • uspace/app/kill/kill.c

    ra0a9cc2 r2b3dd78  
    3737#include <stdio.h>
    3838#include <task.h>
     39#include <str.h>
    3940#include <str_error.h>
    4041
  • uspace/app/killall/killall.c

    ra0a9cc2 r2b3dd78  
    4040#include <str_error.h>
    4141#include <stdlib.h>
     42#include <str.h>
    4243
    4344#define NAME  "killall"
  • uspace/app/mixerctl/mixerctl.c

    ra0a9cc2 r2b3dd78  
    4949static void print_levels(async_exch_t *exch)
    5050{
    51         const char* name = NULL;
     51        char* name = NULL;
    5252        unsigned count = 0;
    5353        errno_t ret = audio_mixer_get_info(exch, &name, &count);
     
    5959
    6060        for (unsigned i = 0; i < count; ++i) {
    61                 const char *name = NULL;
     61                char *name = NULL;
    6262                unsigned levels = 0, current = 0;
    6363                errno_t ret =
  • uspace/app/mkfat/mkfat.c

    ra0a9cc2 r2b3dd78  
    4848#include <inttypes.h>
    4949#include <errno.h>
     50#include <str.h>
    5051#include "fat.h"
    5152#include "fat_dentry.h"
  • uspace/app/netecho/comm.c

    ra0a9cc2 r2b3dd78  
    4444#include <stdlib.h>
    4545#include <stdint.h>
     46#include <str.h>
    4647#include <str_error.h>
    4748
  • uspace/app/nic/nic.c

    ra0a9cc2 r2b3dd78  
    4040#include <stdlib.h>
    4141#include <stddef.h>
     42#include <str.h>
    4243#include <str_error.h>
    4344
  • uspace/app/nterm/nterm.c

    ra0a9cc2 r2b3dd78  
    3737#include <io/console.h>
    3838#include <stdio.h>
     39#include <str.h>
    3940
    4041#include "conn.h"
  • uspace/app/pkg/pkg.c

    ra0a9cc2 r2b3dd78  
    3939#include <stdio.h>
    4040#include <stdlib.h>
     41#include <str.h>
    4142#include <str_error.h>
    4243#include <task.h>
  • uspace/app/rcubench/rcubench.c

    ra0a9cc2 r2b3dd78  
    4747#include <compiler/barrier.h>
    4848#include <futex.h>
     49#include <str.h>
    4950
    5051#include <rcu.h>
  • uspace/app/rcutest/rcutest.c

    ra0a9cc2 r2b3dd78  
    4848#include <compiler/barrier.h>
    4949#include <futex.h>
     50#include <str.h>
    5051
    5152#include <rcu.h>
  • uspace/app/sportdmp/sportdmp.c

    ra0a9cc2 r2b3dd78  
    3333#include <stdio.h>
    3434#include <stdlib.h>
     35#include <str.h>
    3536
    3637#define BUF_SIZE 1
  • uspace/app/sysinfo/sysinfo.c

    ra0a9cc2 r2b3dd78  
    4040#include <sysinfo.h>
    4141#include <stdlib.h>
     42#include <str.h>
    4243
    4344static void dump_bytes_hex(char *data, size_t size)
  • uspace/app/sysinst/futil.c

    ra0a9cc2 r2b3dd78  
    108108        DIR *dir;
    109109        struct dirent *de;
    110         struct stat s;
     110        vfs_stat_t s;
    111111        char *srcp, *destp;
    112112        errno_t rc;
     
    165165        size_t fsize;
    166166        char *data;
    167         struct stat st;
     167        vfs_stat_t st;
    168168
    169169        rc = vfs_lookup_open(srcp, WALK_REGULAR, MODE_READ, &sf);
  • uspace/app/sysinst/sysinst.c

    ra0a9cc2 r2b3dd78  
    4747#include <task.h>
    4848#include <vfs/vfs.h>
     49#include <str.h>
    4950
    5051#include "futil.h"
  • uspace/app/taskdump/elf_core.c

    ra0a9cc2 r2b3dd78  
    6262#include <libarch/istate.h>
    6363#include <vfs/vfs.h>
     64#include <str.h>
    6465
    6566#include "elf_core.h"
  • uspace/app/taskdump/symtab.c

    ra0a9cc2 r2b3dd78  
    4141#include <stddef.h>
    4242#include <errno.h>
     43#include <str.h>
    4344#include <str_error.h>
    4445#include <vfs/vfs.h>
  • uspace/app/taskdump/taskdump.c

    ra0a9cc2 r2b3dd78  
    4848#include <macros.h>
    4949#include <assert.h>
     50#include <str.h>
    5051
    5152#include <symtab.h>
  • uspace/app/tester/print/print5.c

    ra0a9cc2 r2b3dd78  
    3737 *
    3838 */
    39 #define NVERIFY_PRINTF
     39#define _HELENOS_NVERIFY_PRINTF
    4040
    4141#include <stdio.h>
  • uspace/app/testread/testread.c

    ra0a9cc2 r2b3dd78  
    5858#include <time.h>
    5959#include <offset.h>
     60#include <str.h>
    6061
    6162#define NAME    "testread"
  • uspace/app/testwrit/testwrit.c

    ra0a9cc2 r2b3dd78  
    3333#include <stdio.h>
    3434#include <stddef.h>
     35#include <str.h>
    3536
    3637#define BUF_SIZE  1024
  • uspace/app/tetris/tetris.c

    ra0a9cc2 r2b3dd78  
    156156const struct shape *randshape(void)
    157157{
    158         const struct shape *tmp = &shapes[random() % 7];
     158        const struct shape *tmp = &shapes[rand() % 7];
    159159        int i;
    160         int j = random() % 4;
     160        int j = rand() % 4;
    161161       
    162162        for (i = 0; i < j; i++)
     
    171171       
    172172        gettimeofday(&tv, NULL);
    173         srandom(tv.tv_sec + tv.tv_usec / 100000);
     173        srand(tv.tv_sec + tv.tv_usec / 100000);
    174174}
    175175
  • uspace/app/tmon/burst_tests.c

    ra0a9cc2 r2b3dd78  
    3737#include <stdio.h>
    3838#include <errno.h>
     39#include <str.h>
    3940#include <str_error.h>
    4041#include <getopt.h>
  • uspace/app/tmon/main.c

    ra0a9cc2 r2b3dd78  
    3636
    3737#include <stdio.h>
     38#include <stddef.h>
     39#include <str.h>
    3840#include <macros.h>
    3941#include "commands.h"
  • uspace/app/top/screen.c

    ra0a9cc2 r2b3dd78  
    4545#include <inttypes.h>
    4646#include <macros.h>
     47#include <str.h>
    4748#include "screen.h"
    4849#include "top.h"
  • uspace/app/top/screen.h

    ra0a9cc2 r2b3dd78  
    4545extern void print_data(data_t *);
    4646extern void show_warning(const char *, ...)
    47     PRINTF_ATTRIBUTE(1, 2);
     47    _HELENOS_PRINTF_ATTRIBUTE(1, 2);
    4848
    4949extern int tgetchar(unsigned int);
  • uspace/app/top/top.c

    ra0a9cc2 r2b3dd78  
    4343#include <errno.h>
    4444#include <gsort.h>
     45#include <str.h>
    4546#include "screen.h"
    4647#include "top.h"
  • uspace/app/usbinfo/list.c

    ra0a9cc2 r2b3dd78  
    4545#include <loc.h>
    4646#include <usb_iface.h>
     47#include <str.h>
    4748
    4849#include "usbinfo.h"
  • uspace/app/viewer/viewer.c

    ra0a9cc2 r2b3dd78  
    4444#include <codec/tga.h>
    4545#include <task.h>
     46#include <str.h>
    4647
    4748#define NAME  "viewer"
     
    114115                return false;
    115116       
    116         struct stat stat;
     117        vfs_stat_t stat;
    117118        rc = vfs_stat(fd, &stat);
    118119        if (rc != EOK) {
  • uspace/app/wavplay/dplay.c

    ra0a9cc2 r2b3dd78  
    353353        }
    354354
    355         const char* info = NULL;
     355        char* info = NULL;
    356356        ret = audio_pcm_get_info_str(session, &info);
    357357        if (ret != EOK) {
  • uspace/app/wavplay/drec.c

    ra0a9cc2 r2b3dd78  
    4242#include <as.h>
    4343#include <inttypes.h>
     44#include <str.h>
    4445
    4546#include "wave.h"
     
    194195        }
    195196
    196         const char* info = NULL;
     197        char* info = NULL;
    197198        ret = audio_pcm_get_info_str(session, &info);
    198199        if (ret != EOK) {
  • uspace/app/wifi_supplicant/wifi_supplicant.c

    ra0a9cc2 r2b3dd78  
    4141#include <stdio.h>
    4242#include <stdlib.h>
     43#include <str.h>
    4344#include <str_error.h>
    4445#include <loc.h>
Note: See TracChangeset for help on using the changeset viewer.