Changeset d5a89a3 in mainline for uspace/app
- Timestamp:
- 2019-02-11T22:31:04Z (7 years ago)
- Children:
- aaf9789c
- Parents:
- e3272101 (diff), 4805495 (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. - Location:
- uspace/app
- Files:
-
- 17 added
- 12 deleted
- 16 edited
- 2 moved
-
bdsh/Makefile (modified) (2 diffs)
-
bdsh/cmds/builtins/builtin_aliases.c (added)
-
bdsh/cmds/builtins/builtin_aliases.h (modified) (1 diff)
-
bdsh/cmds/builtins/builtins.c (added)
-
bdsh/cmds/builtins/builtins.h (modified) (1 diff)
-
bdsh/cmds/mknewcmd (modified) (1 diff)
-
bdsh/cmds/modules/module_aliases.c (added)
-
bdsh/cmds/modules/module_aliases.h (modified) (1 diff)
-
bdsh/cmds/modules/modules.c (added)
-
bdsh/cmds/modules/modules.h (modified) (1 diff)
-
bdsh/cmds/modules/sleep/sleep.c (modified) (1 diff)
-
bnchmark/bnchmark.c (deleted)
-
bnchmark/doc/doxygroups.h (deleted)
-
dltest/dltest.c (modified) (4 diffs)
-
hbench/Makefile (moved) (moved from uspace/app/perf/Makefile ) (1 diff)
-
hbench/benchlist.c (moved) (moved from uspace/app/perf/perf.h ) (2 diffs)
-
hbench/csv.c (added)
-
hbench/doc/doxygroups.h (added)
-
hbench/env.c (added)
-
hbench/fs/dirread.c (added)
-
hbench/fs/fileread.c (added)
-
hbench/hbench.h (added)
-
hbench/ipc/ns_ping.c (added)
-
hbench/ipc/ping_pong.c (added)
-
hbench/main.c (added)
-
hbench/malloc/malloc1.c (added)
-
hbench/malloc/malloc2.c (added)
-
hbench/synch/fibril_mutex.c (added)
-
hbench/utils.c (added)
-
init/untar.c (modified) (1 diff)
-
mkbd/main.c (modified) (1 diff)
-
pci/Makefile (modified) (1 diff)
-
perf/doc/doxygroups.h (deleted)
-
perf/ipc/ns_ping.c (deleted)
-
perf/ipc/ns_ping.def (deleted)
-
perf/ipc/ping_pong.c (deleted)
-
perf/ipc/ping_pong.def (deleted)
-
perf/malloc/malloc1.c (deleted)
-
perf/malloc/malloc1.def (deleted)
-
perf/malloc/malloc2.c (deleted)
-
perf/malloc/malloc2.def (deleted)
-
perf/perf.c (deleted)
-
sbi/src/bigint.c (modified) (1 diff)
-
sysinst/rdimg.c (modified) (1 diff)
-
tester/stdio/logger2.c (modified) (1 diff)
-
tester/tester.c (modified) (3 diffs)
-
wavplay/drec.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/bdsh/Makefile
re3272101 rd5a89a3 34 34 35 35 SOURCES = \ 36 cmds/modules/module_aliases.c \ 37 cmds/modules/modules.c \ 36 38 cmds/modules/help/help.c \ 37 39 cmds/modules/mkdir/mkdir.c \ … … 51 53 cmds/modules/kcon/kcon.c \ 52 54 cmds/modules/cmp/cmp.c \ 55 cmds/builtins/builtin_aliases.c \ 56 cmds/builtins/builtins.c \ 53 57 cmds/builtins/batch/batch.c \ 54 58 cmds/builtins/exit/exit.c \ -
uspace/app/bdsh/cmds/builtins/builtin_aliases.h
re3272101 rd5a89a3 1 /* 2 * Copyright (c) 2008 Tim Post 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 9 * - Redistributions of source code must retain the above copyright 10 * notice, this list of conditions and the following disclaimer. 11 * - Redistributions in binary form must reproduce the above copyright 12 * notice, this list of conditions and the following disclaimer in the 13 * documentation and/or other materials provided with the distribution. 14 * - The name of the author may not be used to endorse or promote products 15 * derived from this software without specific prior written permission. 16 * 17 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 18 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 19 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 20 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 */ 28 1 29 #ifndef BUILTIN_ALIASES_H 2 30 #define BUILTIN_ALIASES_H 3 31 4 /* See modules/module_aliases.h for an explanation of this file */ 5 6 char *builtin_aliases[] = { 7 NULL, NULL 8 }; 32 extern char *builtin_aliases[]; 9 33 10 34 #endif -
uspace/app/bdsh/cmds/builtins/builtins.h
re3272101 rd5a89a3 1 /* 2 * Copyright (c) 2008 Tim Post 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 9 * - Redistributions of source code must retain the above copyright 10 * notice, this list of conditions and the following disclaimer. 11 * - Redistributions in binary form must reproduce the above copyright 12 * notice, this list of conditions and the following disclaimer in the 13 * documentation and/or other materials provided with the distribution. 14 * - The name of the author may not be used to endorse or promote products 15 * derived from this software without specific prior written permission. 16 * 17 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 18 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 19 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 20 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 */ 28 1 29 #ifndef BUILTINS_H 2 30 #define BUILTINS_H 3 31 4 #include " config.h"32 #include "../cmds.h" 5 33 6 #include "batch/entry.h" 7 #include "cd/entry.h" 8 #include "exit/entry.h" 9 10 builtin_t builtins[] = { 11 #include "batch/batch_def.inc" 12 #include "cd/cd_def.inc" 13 #include "exit/exit_def.inc" 14 { NULL, NULL, NULL, NULL, 0 } 15 }; 34 extern builtin_t builtins[]; 16 35 17 36 #endif -
uspace/app/bdsh/cmds/mknewcmd
re3272101 rd5a89a3 213 213 printf " to include your new command.\n" 214 214 [ -n "$CMDALIAS" ] && { 215 printf "\nYou should also modify %ss/%s_aliases. hand " \215 printf "\nYou should also modify %ss/%s_aliases.c and " \ 216 216 "${CMDTYPE}" "${CMDTYPE}" 217 217 printf "add %s as an alias for %s\n" \ -
uspace/app/bdsh/cmds/modules/module_aliases.h
re3272101 rd5a89a3 30 30 #define MODULE_ALIASES_H 31 31 32 /* 33 * Modules that declare multiple names for themselves but use the 34 * same entry functions are aliases. This array helps to determine if 35 * a module is an alias, as such it can be invoked differently. 36 * format is alias , real_name 37 */ 38 39 /* 40 * So far, this is only used in the help display but could be used to 41 * handle a module differently even prior to reaching its entry code. 42 * For instance, 'exit' could behave differently than 'quit', prior to 43 * the entry point being reached. 44 */ 45 46 const char *mod_aliases[] = { 47 "ren", "mv", 48 "umount", "unmount", 49 NULL, NULL 50 }; 32 extern const char *mod_aliases[]; 51 33 52 34 #endif -
uspace/app/bdsh/cmds/modules/modules.h
re3272101 rd5a89a3 30 30 #define MODULES_H 31 31 32 /* 33 * Each built in function has two files, one being an entry.h file which 34 * prototypes the run/help entry functions, the other being a .def file 35 * which fills the modules[] array according to the cmd_t structure 36 * defined in cmds.h. 37 * 38 * To add or remove a module, just make a new directory in cmds/modules 39 * for it and copy the 'show' example for basics, then include it here. 40 * (or reverse the process to remove one) 41 * 42 * NOTE: See module_ aliases.h as well, this is where aliases (commands that 43 * share an entry point with others) are indexed 44 */ 32 #include "../cmds.h" 33 #include "modules.h" 45 34 46 #include "config.h" 47 48 /* Prototypes for each module's entry (help/exec) points */ 49 50 #include "help/entry.h" 51 #include "mkdir/entry.h" 52 #include "mkfile/entry.h" 53 #include "rm/entry.h" 54 #include "cat/entry.h" 55 #include "touch/entry.h" 56 #include "ls/entry.h" 57 #include "pwd/entry.h" 58 #include "sleep/entry.h" 59 #include "cp/entry.h" 60 #include "mv/entry.h" 61 #include "mount/entry.h" 62 #include "unmount/entry.h" 63 #include "kcon/entry.h" 64 #include "printf/entry.h" 65 #include "echo/entry.h" 66 #include "cmp/entry.h" 67 68 /* 69 * Each .def function fills the module_t struct with the individual name, entry 70 * point, help entry point, etc. You can use config.h to control what modules 71 * are loaded based on what libraries exist on the system. 72 */ 73 74 module_t modules[] = { 75 #include "help/help_def.inc" 76 #include "mkdir/mkdir_def.inc" 77 #include "mkfile/mkfile_def.inc" 78 #include "rm/rm_def.inc" 79 #include "cat/cat_def.inc" 80 #include "touch/touch_def.inc" 81 #include "ls/ls_def.inc" 82 #include "pwd/pwd_def.inc" 83 #include "sleep/sleep_def.inc" 84 #include "cp/cp_def.inc" 85 #include "mv/mv_def.inc" 86 #include "mount/mount_def.inc" 87 #include "unmount/unmount_def.inc" 88 #include "kcon/kcon_def.inc" 89 #include "printf/printf_def.inc" 90 #include "echo/echo_def.inc" 91 #include "cmp/cmp_def.inc" 92 93 { NULL, NULL, NULL, NULL } 94 }; 35 extern module_t modules[]; 95 36 96 37 #endif -
uspace/app/bdsh/cmds/modules/sleep/sleep.c
re3272101 rd5a89a3 27 27 */ 28 28 29 #include <async.h>30 29 #include <errno.h> 30 #include <fibril.h> 31 31 #include <stdio.h> 32 32 #include <stdlib.h> -
uspace/app/dltest/dltest.c
re3272101 rd5a89a3 91 91 } 92 92 93 /** Test calling function that calls a function that returns a constant */ 94 static bool test_dlfcn_dl_get_constant_via_call(void) 95 { 96 int (*p_dl_get_constant)(void); 97 int val; 98 99 printf("Call dlsym/dl_get_constant_via_call...\n"); 100 101 p_dl_get_constant = dlsym(handle, "dl_get_constant_via_call"); 102 if (p_dl_get_constant == NULL) { 103 printf("FAILED\n"); 104 return false; 105 } 106 107 val = p_dl_get_constant(); 108 109 printf("Got %d, expected %d... ", val, dl_constant); 110 if (val != dl_constant) { 111 printf("FAILED\n"); 112 return false; 113 } 114 115 printf("Passed\n"); 116 return true; 117 } 118 93 119 /** Test calling a function that returns contents of a private initialized 94 120 * variable. … … 564 590 } 565 591 592 /** Test directly calling function that calls a function that returns a constant */ 593 static bool test_lnk_dl_get_constant_via_call(void) 594 { 595 int val; 596 597 printf("Call linked dl_get_constant_via_call...\n"); 598 599 val = dl_get_constant_via_call(); 600 601 printf("Got %d, expected %d... ", val, dl_constant); 602 if (val != dl_constant) { 603 printf("FAILED\n"); 604 return false; 605 } 606 607 printf("Passed\n"); 608 return true; 609 } 610 566 611 /** Test dircetly calling a function that returns contents of a private 567 612 * initialized variable. … … 853 898 return 1; 854 899 900 if (!test_dlfcn_dl_get_constant_via_call()) 901 return 1; 902 855 903 if (!test_dlfcn_dl_get_private_var()) 856 904 return 1; … … 905 953 { 906 954 if (!test_lnk_dl_get_constant()) 955 return 1; 956 957 if (!test_lnk_dl_get_constant_via_call()) 907 958 return 1; 908 959 -
uspace/app/hbench/Makefile
re3272101 rd5a89a3 31 31 LIBS = math 32 32 33 BINARY = perf33 BINARY = hbench 34 34 35 35 SOURCES = \ 36 perf.c \ 36 benchlist.c \ 37 csv.c \ 38 env.c \ 39 main.c \ 40 utils.c \ 41 fs/dirread.c \ 42 fs/fileread.c \ 37 43 ipc/ns_ping.c \ 38 44 ipc/ping_pong.c \ 39 45 malloc/malloc1.c \ 40 malloc/malloc2.c 46 malloc/malloc2.c \ 47 synch/fibril_mutex.c 41 48 42 49 include $(USPACE_PREFIX)/Makefile.common -
uspace/app/hbench/benchlist.c
re3272101 rd5a89a3 1 1 /* 2 2 * Copyright (c) 2018 Jiri Svoboda 3 * Copyright (c) 2018 Vojtech Horky 3 4 * All rights reserved. 4 5 * … … 27 28 */ 28 29 29 /** @addtogroup perf30 /** @addtogroup hbench 30 31 * @{ 31 32 */ 32 /** @file 33 /** 34 * @file 33 35 */ 34 36 35 #i fndef PERF_H_36 # define PERF_H_37 #include <stdlib.h> 38 #include "hbench.h" 37 39 38 #include <stdbool.h> 40 benchmark_t *benchmarks[] = { 41 &benchmark_dir_read, 42 &benchmark_fibril_mutex, 43 &benchmark_file_read, 44 &benchmark_malloc1, 45 &benchmark_malloc2, 46 &benchmark_ns_ping, 47 &benchmark_ping_pong 48 }; 39 49 40 typedef const char *(*benchmark_entry_t)(void); 41 42 typedef struct { 43 const char *name; 44 const char *desc; 45 benchmark_entry_t entry; 46 } benchmark_t; 47 48 extern const char *bench_malloc1(void); 49 extern const char *bench_malloc2(void); 50 extern const char *bench_ns_ping(void); 51 extern const char *bench_ping_pong(void); 52 53 extern benchmark_t benchmarks[]; 54 55 #endif 50 size_t benchmark_count = sizeof(benchmarks) / sizeof(benchmarks[0]); 56 51 57 52 /** @} -
uspace/app/init/untar.c
re3272101 rd5a89a3 45 45 typedef struct { 46 46 const char *dev; 47 47 48 48 service_id_t sid; 49 49 aoff64_t offset; -
uspace/app/mkbd/main.c
re3272101 rd5a89a3 39 39 #include <stdlib.h> 40 40 #include <errno.h> 41 #include <fibril.h> 41 42 #include <str_error.h> 42 43 #include <stdbool.h> -
uspace/app/pci/Makefile
re3272101 rd5a89a3 28 28 29 29 USPACE_PREFIX = ../.. 30 LIBS = ext4 fs block crypto31 30 BINARY = pci 32 31 -
uspace/app/sbi/src/bigint.c
re3272101 rd5a89a3 379 379 printf("Convert bigint to string.\n"); 380 380 #endif 381 static_assert(BIGINT_BASE >= 10 );381 static_assert(BIGINT_BASE >= 10, ""); 382 382 383 383 /* Compute number of characters. */ -
uspace/app/sysinst/rdimg.c
re3272101 rd5a89a3 34 34 35 35 #include <errno.h> 36 #include <fibril.h> 36 37 #include <stdio.h> 37 38 #include <stdlib.h> -
uspace/app/tester/stdio/logger2.c
re3272101 rd5a89a3 30 30 #include <stdlib.h> 31 31 #include <errno.h> 32 #include <fibril.h> 32 33 #include <io/log.h> 33 #include <async.h>34 34 #include "../tester.h" 35 35 -
uspace/app/tester/tester.c
re3272101 rd5a89a3 35 35 */ 36 36 37 #include <assert.h> 37 38 #include <stdio.h> 38 39 #include <stddef.h> … … 40 41 #include <str.h> 41 42 #include <io/log.h> 43 #include <types/casting.h> 42 44 #include "tester.h" 43 45 … … 144 146 } 145 147 146 unsigned int _len = (unsigned int) len; 147 if ((_len != len) || (((int) _len) < 0)) { 148 printf("Command length overflow\n"); 149 return; 150 } 148 assert(can_cast_size_t_to_int(len) && "test name length overflow"); 151 149 152 150 for (test = tests; test->name != NULL; test++) 153 printf("%-*s %s%s\n", _len, test->name, test->desc,151 printf("%-*s %s%s\n", (int) len, test->name, test->desc, 154 152 (test->safe ? "" : " (unsafe)")); 155 153 156 printf("%-*s Run all safe tests\n", _len, "*");154 printf("%-*s Run all safe tests\n", (int) len, "*"); 157 155 } 158 156 -
uspace/app/wavplay/drec.c
re3272101 rd5a89a3 36 36 #include <assert.h> 37 37 #include <errno.h> 38 #include <fibril.h> 38 39 #include <str_error.h> 39 40 #include <audio_pcm_iface.h>
Note:
See TracChangeset
for help on using the changeset viewer.
