Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 4340 → Rev 4341

/branches/dynload/uspace/app/dltest/Makefile
27,7 → 27,7
#
 
include ../../../version
include ../../Makefile.config
-include ../../../Makefile.config
 
## Setup toolchain
#
/branches/dynload/uspace/app/bdsh/input.c
42,21 → 42,8
#include "errors.h"
#include "exec.h"
 
extern volatile unsigned int cli_interactive;
 
/* Not exposed in input.h */
static void cli_restricted(char *);
static void read_line(char *, int);
 
/* More than a macro than anything */
static void cli_restricted(char *cmd)
{
printf("%s is not available in %s mode\n", cmd,
cli_interactive ? "interactive" : "non-interactive");
 
return;
}
 
/* Tokenizes input from console, sees if the first word is a built-in, if so
* invokes the built-in entry point (a[0]) passing all arguments in a[] to
* the handler */
70,14 → 57,11
if (NULL == usr->line)
return CL_EFAIL;
 
tmp = cli_strdup(usr->line);
tmp = strdup(usr->line);
 
/* Break up what the user typed, space delimited */
 
/* TODO: Protect things in quotes / ticks, expand wildcards */
cmd[n] = cli_strtok(tmp, " ");
cmd[n] = strtok(tmp, " ");
while (cmd[n] && n < WORD_MAX) {
cmd[++n] = cli_strtok(NULL, " ");
cmd[++n] = strtok(NULL, " ");
}
 
/* We have rubbish */
86,39 → 70,19
goto finit;
}
 
/* Its a builtin command */
/* Its a builtin command ? */
if ((i = (is_builtin(cmd[0]))) > -1) {
/* Its not available in this mode, see what try_exec() thinks */
if (builtin_is_restricted(i)) {
rc = try_exec(cmd[0], cmd);
if (rc)
/* No external matching it could be found, tell the
* user that the command does exist, but is not
* available in this mode. */
cli_restricted(cmd[0]);
goto finit;
}
/* Its a builtin, its available, run it */
rc = run_builtin(i, cmd, usr);
goto finit;
/* We repeat the same dance for modules */
/* Its a module ? */
} else if ((i = (is_module(cmd[0]))) > -1) {
if (module_is_restricted(i)) {
rc = try_exec(cmd[0], cmd);
if (rc)
cli_restricted(cmd[0]);
goto finit;
}
rc = run_module(i, cmd);
goto finit;
} else {
/* Its not a module or builtin, restricted or otherwise.
* See what try_exec() thinks of it and just pass its return
* value back to the caller */
rc = try_exec(cmd[0], cmd);
goto finit;
}
 
/* See what try_exec thinks of it */
rc = try_exec(cmd[0], cmd);
 
finit:
if (NULL != usr->line) {
free(usr->line);
174,7 → 138,7
/* Make sure we don't have rubbish or a C/R happy user */
if (len == 0 || line[0] == '\n')
return;
usr->line = cli_strdup(line);
usr->line = strdup(line);
 
return;
}
/branches/dynload/uspace/app/bdsh/AUTHORS
8,9 → 8,6
 
* Based on the HelenOS testing sub-system written by Martin Decky
 
* cli_strtok() and cli_strtok_r() (util.c) were adapted from the FreeBSD
strtok() and strtok_r() functions written by Wes Peters.
 
* read_line() (input.c) was written by Jiri Svoboda
 
Individual author copyrights are listed in the headers of each file.
/branches/dynload/uspace/app/bdsh/cmds/mknewcmd
46,8 → 46,6
-e, --entry Entry function of the command (def: cmd_${def})
-h, --help-entry Entry function for command help (def: help_cmd_${def})
-a, --alias Alias (nickname) for this command (def: none)
-r, --restrict Restriction level (interactive, non-interactive, both)
(def: module is both, builtin is interactive only)
-t, --type Type of command (module or builtin) (def: module)
-H, --help This help summary
-V, --version Print $PROGNAME version and exit normally
67,8 → 65,7
$PROGNAME -n foo -d "Foo power" -a bar -r both -t module modules/foo
 
The example would generate a modular command named 'foo', which is also
reached by typing 'bar' and available in either interactive or noninteractive
mode.
reached by typing 'bar'.
 
Skeletal files do *not* depend on the autoconf generated "config.h" unless you
include it. This may or may not be desirable depending on your use.
97,7 → 94,6
"${CMDDESC}",
&${CMDENTRY},
&${HELPENTRY},
${CMDRESTRICT}
},
 
EOF
107,7 → 103,6
NULL,
&${CMDENTRY},
&${HELPENTRY},
${CMDRESTRICT}
},
 
EOF
167,7 → 162,7
#include "${CMDNAME}.h"
#include "cmds.h"
 
static char *cmdname = "${CMDNAME}";
static const char *cmdname = "${CMDNAME}";
 
/* Dispays help for ${CMDNAME} in various levels */
void ${HELPENTRY}(unsigned int level)
234,8 → 229,8
# We need at least one
[ $# = 0 ] && usage && exit 1;
 
TEMP=$(getopt -o n:d:e:h:a:r:t:HV \
--long name:,desc:,entry:,help-entry:,alias:,restrict:,type:,help,version \
TEMP=$(getopt -o n:d:e:h:a:t:HV \
--long name:,desc:,entry:,help-entry:,alias:,type:,help,version \
-- "$@") || {
echo "Try $PROGNAME --help for help"
}
269,11 → 264,6
shift 2
continue
;;
-r | --restrict)
CMDRESTRICT="$2"
shift 2
continue
;;
-t | --type)
CMDTYPE="$2"
shift 2
305,30 → 295,7
[ -n "$CMDTYPE" ] || CMDTYPE="module"
[ -n "$OUTDIR" ] || OUTDIR="${CMDTYPE}s/${CMDNAME}"
 
# Builtins typically only need to be available in interactive mode,
# set the default accordingly.
[ -n "$CMDRESTRICT" ] || {
[ "$CMDTYPE" = "module" ] && CMDRESTRICT="both"
[ "$CMDTYPE" = "builtin" ] && CMDRESTRICT="interactive"
}
 
# Set the restriction level as the structure expects to see it
case "$CMDRESTRICT" in
0 | both)
CMDRESTRICT="0"
;;
1 | non-interactive)
CMDRESTRICT="1"
;;
-1 | interactive)
CMDRESTRICT="-1"
;;
*)
usage
exit 1
;;
esac
 
# Do a little sanity
[ -d $OUTDIR ] && {
echo "$OUTDIR already exists, remove it to proceed."
/branches/dynload/uspace/app/bdsh/cmds/mod_cmds.c
53,26 → 53,6
 
extern volatile unsigned int cli_interactive;
 
int module_is_restricted(int pos)
{
/* Restriction Levels:
* -1 -> Available only in interactive mode
* 0 -> Available in any mode
* 1 -> Available only in non-interactive mode */
 
module_t *mod = modules;
mod += pos;
/* We're interactive, and the module is OK to run */
if (cli_interactive && mod->restricted <= 0)
return 0;
/* We're not interactive, and the module is OK to run */
if (!cli_interactive && mod->restricted >= 0)
return 0;
 
/* Anything else is just a big fat no :) */
return 1;
}
 
/* Checks if an entry function matching command exists in modules[], if so
* its position in the array is returned */
int is_module(const char *command)
/branches/dynload/uspace/app/bdsh/cmds/modules/quit/quit.c
File deleted
/branches/dynload/uspace/app/bdsh/cmds/modules/quit/quit_def.h
File deleted
/branches/dynload/uspace/app/bdsh/cmds/modules/quit/entry.h
File deleted
/branches/dynload/uspace/app/bdsh/cmds/modules/quit/quit.h
File deleted
/branches/dynload/uspace/app/bdsh/cmds/modules/cp/cp.c
34,7 → 34,6
#include <getopt.h>
#include <string.h>
#include <fcntl.h>
#include <assert.h>
#include "config.h"
#include "util.h"
#include "errors.h"
70,7 → 69,8
return (int) t1;
}
 
static int64_t copy_file(const char *src, const char *dest, size_t blen, int vb)
static int64_t copy_file(const char *src, const char *dest,
size_t blen, int vb)
{
int fd1, fd2, bytes = 0;
off_t total = 0;
124,12 → 124,19
goto err;
res -= bytes;
} while (res > 0);
assert(res == 0);
 
/* TODO: re-insert assert() once this is stand alone,
* removed as abort() exits the entire shell
*/
if (res != 0) {
printf("\n%d more bytes than actually exist were copied\n", res);
goto err;
}
}
 
if (bytes < 0) {
err:
printf("Error copying %s, (%d)\n", src, bytes);
printf("\nError copying %s, (%d)\n", src, bytes);
copied = bytes;
}
 
/branches/dynload/uspace/app/bdsh/cmds/modules/cp/cp_def.h
3,6 → 3,5
"Copy files and directories",
&cmd_cp,
&help_cmd_cp,
0
},
 
/branches/dynload/uspace/app/bdsh/cmds/modules/touch/touch.c
37,6 → 37,7
#include <fcntl.h>
#include <dirent.h>
#include <sys/types.h>
#include <string.h>
 
#include "config.h"
#include "errors.h"
79,7 → 80,7
}
 
for (i = 1; i < argc; i ++) {
buff = cli_strdup(argv[i]);
buff = strdup(argv[i]);
dirp = opendir(buff);
if (dirp) {
cli_error(CL_ENOTSUP, "%s is a directory", buff);
/branches/dynload/uspace/app/bdsh/cmds/modules/touch/touch_def.h
3,6 → 3,5
"Create files or update access times",
&cmd_touch,
&help_cmd_touch,
0
},
 
/branches/dynload/uspace/app/bdsh/cmds/modules/mkdir/mkdir.c
93,7 → 93,7
 
/* Its a good idea to allocate path, plus we (may) need a copy of
* path to tokenize if parents are specified */
if (NULL == (tmp = cli_strdup(path))) {
if (NULL == (tmp = strdup(path))) {
cli_error(CL_ENOMEM, "%s: path too big?", cmdname);
return 1;
}
128,9 → 128,9
absolute = 1;
 
/* TODO: Canonify the path prior to tokenizing it, see below */
dirs[i] = cli_strtok(tmp, "/");
dirs[i] = strtok(tmp, "/");
while (dirs[i] && i < 255)
dirs[++i] = cli_strtok(NULL, "/");
dirs[++i] = strtok(NULL, "/");
 
if (NULL == dirs[0])
return 1;
/branches/dynload/uspace/app/bdsh/cmds/modules/mkdir/mkdir_def.h
3,14 → 3,6
"Create new directories",
&cmd_mkdir,
&help_cmd_mkdir,
0
},
 
{
"md",
NULL,
&cmd_mkdir,
&help_cmd_mkdir,
0
},
 
/branches/dynload/uspace/app/bdsh/cmds/modules/cat/cat_def.h
3,6 → 3,5
"Show the contents of a file",
&cmd_cat,
&help_cmd_cat,
0
},
 
/branches/dynload/uspace/app/bdsh/cmds/modules/help/help.c
133,13 → 133,11
 
/* First, show a list of built in commands that are available in this mode */
for (cmd = builtins; cmd->name != NULL; cmd++, i++) {
if (!builtin_is_restricted(i)) {
if (is_builtin_alias(cmd->name))
printf(" %-16s\tAlias for `%s'\n", cmd->name,
alias_for_builtin(cmd->name));
else
printf(" %-16s\t%s\n", cmd->name, cmd->desc);
}
}
 
i = 0;
146,13 → 144,11
 
/* Now, show a list of module commands that are available in this mode */
for (mod = modules; mod->name != NULL; mod++, i++) {
if (!module_is_restricted(i)) {
if (is_module_alias(mod->name))
printf(" %-16s\tAlias for `%s'\n", mod->name,
alias_for_module(mod->name));
else
printf(" %-16s\t%s\n", mod->name, mod->desc);
}
}
 
printf("\n Try %s %s for more information on how `%s' works.\n\n",
/branches/dynload/uspace/app/bdsh/cmds/modules/help/help_def.h
3,5 → 3,4
"Show help for commands",
&cmd_help,
&help_cmd_help,
0
},
/branches/dynload/uspace/app/bdsh/cmds/modules/sleep/sleep_def.h
3,6 → 3,5
"Pause for given time interval (in seconds)",
&cmd_sleep,
&help_cmd_sleep,
0
},
 
/branches/dynload/uspace/app/bdsh/cmds/modules/pwd/pwd_def.h
3,5 → 3,4
"Prints the current working directory",
&cmd_pwd,
&help_cmd_pwd,
-1
},
/branches/dynload/uspace/app/bdsh/cmds/modules/module_aliases.h
12,10 → 12,6
* the entry point being reached. */
 
char *mod_aliases[] = {
"exit", "quit",
"md", "mkdir",
"del", "rm",
"dir", "ls",
NULL, NULL
};
 
/branches/dynload/uspace/app/bdsh/cmds/modules/ls/ls.c
50,6 → 50,24
 
static char *cmdname = "ls";
 
static inline off_t flen(const char *f)
{
int fd;
off_t size;
 
fd = open(f, O_RDONLY);
if (fd == -1)
return 0;
 
size = lseek(fd, 0, SEEK_END);
close(fd);
 
if (size < 0)
size = 0;
 
return size;
}
 
static unsigned int ls_scope(const char *path)
{
int fd;
120,7 → 138,7
 
static void ls_print_dir(const char *d)
{
printf("%-40s\t<DIR>\n", d);
printf("%-40s\t<dir>\n", d);
 
return;
}
127,7 → 145,7
 
static void ls_print_file(const char *f)
{
printf("%-40s\n", f);
printf("%-40s\t%llu\n", f, (long long) flen(f));
 
return;
}
/branches/dynload/uspace/app/bdsh/cmds/modules/ls/ls_def.h
3,14 → 3,4
"List files and directories",
&cmd_ls,
&help_cmd_ls,
0
},
 
{
"dir",
NULL,
&cmd_ls,
&help_cmd_ls,
0
},
 
/branches/dynload/uspace/app/bdsh/cmds/modules/modules.h
18,7 → 18,6
/* Prototypes for each module's entry (help/exec) points */
 
#include "help/entry.h"
#include "quit/entry.h"
#include "mkdir/entry.h"
#include "rm/entry.h"
#include "cat/entry.h"
34,7 → 33,6
 
module_t modules[] = {
#include "help/help_def.h"
#include "quit/quit_def.h"
#include "mkdir/mkdir_def.h"
#include "rm/rm_def.h"
#include "cat/cat_def.h"
/branches/dynload/uspace/app/bdsh/cmds/modules/rm/rm.c
33,7 → 33,6
#include <unistd.h>
#include <fcntl.h>
#include <dirent.h>
#include <assert.h>
#include <getopt.h>
 
#include "config.h"
219,7 → 218,11
while (NULL != argv[i]) {
len = strlen(argv[i]) + 2;
buff = (char *) realloc(buff, len);
assert(buff != NULL);
if (buff == NULL) {
printf("rm: out of memory\n");
ret = 1;
break;
}
memset(buff, 0, sizeof(buff));
snprintf(buff, len, argv[i]);
 
/branches/dynload/uspace/app/bdsh/cmds/modules/rm/rm_def.h
3,14 → 3,5
"Remove files and directories",
&cmd_rm,
&help_cmd_rm,
0
},
 
{
"del",
NULL,
&cmd_rm,
&help_cmd_rm,
0
},
 
/branches/dynload/uspace/app/bdsh/cmds/builtins/builtins.h
4,9 → 4,11
#include "config.h"
 
#include "cd/entry.h"
#include "exit/entry.h"
 
builtin_t builtins[] = {
#include "cd/cd_def.h"
#include "exit/exit_def.h"
{NULL, NULL, NULL, NULL}
};
 
/branches/dynload/uspace/app/bdsh/cmds/builtins/cd/cd_def.h
3,12 → 3,4
"Change the current working directory",
&cmd_cd,
&help_cmd_cd,
-1
},
{
"chdir",
NULL,
&cmd_cd,
&help_cmd_cd,
-1
},
/branches/dynload/uspace/app/bdsh/cmds/builtins/exit/exit.h
0,0 → 1,6
#ifndef EXIT_H
#define EXIT_H
 
/* Prototypes for the quit command (excluding entry points) */
 
#endif
/branches/dynload/uspace/app/bdsh/cmds/builtins/exit/entry.h
0,0 → 1,12
#ifndef EXIT_ENTRY_H_
#define EXIT_ENTRY_H_
 
#include "scli.h"
 
/* Entry points for the quit command */
extern void help_cmd_exit(unsigned int);
extern int cmd_exit(char *[], cliuser_t *);
 
#endif
 
 
/branches/dynload/uspace/app/bdsh/cmds/builtins/exit/exit.c
0,0 → 1,55
/* Copyright (c) 2008, Tim Post <tinkertim@gmail.com>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
*
* Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* Neither the name of the original program's authors nor the names of its
* contributors may be used to endorse or promote products derived from this
* software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
 
#include <stdio.h>
#include <stdlib.h>
#include "entry.h"
#include "exit.h"
#include "cmds.h"
 
static const char *cmdname = "exit";
 
extern volatile unsigned int cli_quit;
extern const char *progname;
 
void help_cmd_exit(unsigned int level)
{
printf("Type `%s' to exit %s\n", cmdname, progname);
return;
}
 
/* Quits the program and returns the status of whatever command
* came before invoking 'quit' */
int cmd_exit(char *argv[], cliuser_t *usr)
{
/* Inform that we're outta here */
cli_quit = 1;
return CMD_SUCCESS;
}
/branches/dynload/uspace/app/bdsh/cmds/builtins/exit/exit_def.h
0,0 → 1,6
{
"exit",
"Exit the shell",
&cmd_exit,
&help_cmd_exit,
},
/branches/dynload/uspace/app/bdsh/cmds/builtins/builtin_aliases.h
4,7 → 4,6
/* See modules/module_aliases.h for an explanation of this file */
 
char *builtin_aliases[] = {
"chdir", "cd",
NULL, NULL
};
 
/branches/dynload/uspace/app/bdsh/cmds/cmds.h
36,7 → 36,6
char *desc; /* Description of the command */
mod_entry_t entry; /* Command (exec) entry function */
mod_help_t help; /* Command (help) entry function */
int restricted; /* Restricts to interactive/non-interactive only */
} module_t;
 
/* Builtin structure, same as modules except different types of entry points */
/branches/dynload/uspace/app/bdsh/cmds/builtin_cmds.c
40,19 → 40,6
 
extern volatile unsigned int cli_interactive;
 
int builtin_is_restricted(int pos)
{
builtin_t *cmd = builtins;
cmd += pos;
 
if (cli_interactive && cmd->restricted <= 0)
return 0;
if (!cli_interactive && cmd->restricted >= 0)
return 0;
 
return 1;
}
 
int is_builtin(const char *command)
{
builtin_t *cmd;
/branches/dynload/uspace/app/bdsh/util.c
1,7 → 1,4
/* Copyright (c) 2008, Tim Post <tinkertim@gmail.com>
* Copyright (C) 1998 by Wes Peters <wes@softweyr.com>
* Copyright (c) 1988, 1993 The Regents of the University of California.
* All rights reserved by all copyright holders.
/* Copyright (c) 2008, Tim Post <tinkertim@gmail.com> - All rights reserved
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
30,18 → 27,6
* POSSIBILITY OF SUCH DAMAGE.
*/
 
/* NOTES:
* 1 - Various functions were adapted from FreeBSD (copyright holders noted above)
* these functions are identified with comments.
*
* 2 - Some of these have since appeared in libc. They remain here for various
* reasons, such as the eventual integration of garbage collection for things
* that allocate memory and don't automatically free it.
*
* 3 - Things that expect a pointer to an allocated string do _no_ sanity checking
* if developing on a simulator with no debugger, take care :)
*/
 
#include <stdio.h>
#include <string.h>
#include <stdarg.h>
54,71 → 39,6
 
extern volatile int cli_errno;
 
/* some platforms do not have strdup, implement it here.
* Returns a pointer to an allocated string or NULL on failure */
char * cli_strdup(const char *s1)
{
size_t len = strlen(s1) + 1;
void *ret = malloc(len);
 
if (ret == NULL) {
cli_errno = CL_ENOMEM;
return (char *) NULL;
}
 
cli_errno = CL_EOK;
return (char *) memcpy(ret, s1, len);
}
 
/* Ported from FBSD strtok.c 8.1 (Berkeley) 6/4/93 */
char * cli_strtok_r(char *s, const char *delim, char **last)
{
char *spanp, *tok;
int c, sc;
 
if (s == NULL && (s = *last) == NULL) {
cli_errno = CL_EFAIL;
return (NULL);
}
 
cont:
c = *s++;
for (spanp = (char *)delim; (sc = *spanp++) != 0;) {
if (c == sc)
goto cont;
}
 
if (c == 0) { /* no non-delimiter characters */
*last = NULL;
return (NULL);
}
 
tok = s - 1;
 
for (;;) {
c = *s++;
spanp = (char *)delim;
do {
if ((sc = *spanp++) == c) {
if (c == 0)
s = NULL;
else
s[-1] = '\0';
*last = s;
return (tok);
}
} while (sc != 0);
}
}
 
/* Ported from FBSD strtok.c 8.1 (Berkeley) 6/4/93 */
char * cli_strtok(char *s, const char *delim)
{
static char *last;
 
return (cli_strtok_r(s, delim, &last));
}
 
/* Count and return the # of elements in an array */
unsigned int cli_count_args(char **args)
{
/branches/dynload/uspace/app/bdsh/util.h
3,11 → 3,6
 
#include "scli.h"
 
/* Internal string handlers */
extern char * cli_strdup(const char *);
extern char * cli_strtok_r(char *, const char *, char **);
extern char * cli_strtok(char *, const char *);
 
/* Utility functions */
extern unsigned int cli_count_args(char **);
extern unsigned int cli_set_prompt(cliuser_t *usr);
/branches/dynload/uspace/app/bdsh/exec.c
80,10 → 80,10
return (char *) cmd;
}
 
path_tok = cli_strdup(PATH);
path_tok = strdup(PATH);
 
/* Extract the PATH env to a path[] array */
path[n] = cli_strtok(path_tok, PATH_DELIM);
path[n] = strtok(path_tok, PATH_DELIM);
while (NULL != path[n]) {
if ((strlen(path[n]) + x ) > PATH_MAX) {
cli_error(CL_ENOTSUP,
91,7 → 91,7
n, n-1);
break;
}
path[++n] = cli_strtok(NULL, PATH_DELIM);
path[++n] = strtok(NULL, PATH_DELIM);
}
 
/* We now have n places to look for the command */
114,7 → 114,7
task_id_t tid;
char *tmp;
 
tmp = cli_strdup(find_command(cmd));
tmp = strdup(find_command(cmd));
free(found);
 
tid = task_spawn((const char *)tmp, argv);
/branches/dynload/uspace/app/bdsh/scli.c
45,7 → 45,6
/* Globals that are modified during start-up that modules/builtins
* should be aware of. */
volatile unsigned int cli_quit = 0;
volatile unsigned int cli_interactive = 1;
volatile unsigned int cli_verbocity = 1;
 
/* The official name of this program
/branches/dynload/uspace/app/bdsh/Makefile
58,7 → 58,6
cmds/ \
cmds/modules/ \
cmds/modules/help/ \
cmds/modules/quit/ \
cmds/modules/mkdir/ \
cmds/modules/rm/ \
cmds/modules/cat/ \
68,11 → 67,11
cmds/modules/sleep/ \
cmds/modules/cp/ \
cmds/builtins/ \
cmds/builtins/exit/\
cmds/builtins/cd/
 
SOURCES = \
cmds/modules/help/help.c \
cmds/modules/quit/quit.c \
cmds/modules/mkdir/mkdir.c \
cmds/modules/rm/rm.c \
cmds/modules/cat/cat.c \
81,6 → 80,7
cmds/modules/pwd/pwd.c \
cmds/modules/sleep/sleep.c \
cmds/modules/cp/cp.c \
cmds/builtins/exit/exit.c \
cmds/builtins/cd/cd.c \
cmds/mod_cmds.c \
cmds/builtin_cmds.c \
/branches/dynload/uspace/app/dltest2/Makefile
27,7 → 27,7
#
 
include ../../../version
include ../../Makefile.config
-include ../../../Makefile.config
 
## Setup toolchain
#
/branches/dynload/uspace/app/dload/Makefile
27,7 → 27,7
#
 
include ../../../version
include ../../Makefile.config
-include ../../../Makefile.config
 
## Setup toolchain
#
/branches/dynload/uspace/app/trace/trace.c
642,6 → 642,18
proto_add_oper(p, VFS_MOUNT, o);
/* o = oper_new("unmount", 0, arg_def);
proto_add_oper(p, VFS_UNMOUNT, o);*/
o = oper_new("open", 2, arg_def, V_INT_ERRNO, 0, resp_def);
proto_add_oper(p, VFS_OPEN, o);
o = oper_new("close", 1, arg_def, V_ERRNO, 0, resp_def);
proto_add_oper(p, VFS_CLOSE, o);
o = oper_new("seek", 3, arg_def, V_ERRNO, 0, resp_def);
proto_add_oper(p, VFS_SEEK, o);
o = oper_new("mkdir", 1, arg_def, V_ERRNO, 0, resp_def);
proto_add_oper(p, VFS_MKDIR, o);
o = oper_new("unlink", 0, arg_def, V_ERRNO, 0, resp_def);
proto_add_oper(p, VFS_UNLINK, o);
o = oper_new("rename", 0, arg_def, V_ERRNO, 0, resp_def);
proto_add_oper(p, VFS_RENAME, o);
 
proto_register(SERVICE_VFS, p);
 
667,13 → 679,13
proto_add_oper(p, CONSOLE_FLUSH, o);
 
arg_def[0] = V_INTEGER;
o = oper_new("set_style", 1, arg_def, V_INTEGER, 0, resp_def);
o = oper_new("set_style", 1, arg_def, V_VOID, 0, resp_def);
proto_add_oper(p, CONSOLE_SET_STYLE, o);
arg_def[0] = V_INTEGER; arg_def[1] = V_INTEGER; arg_def[2] = V_INTEGER;
o = oper_new("set_color", 3, arg_def, V_INTEGER, 0, resp_def);
o = oper_new("set_color", 3, arg_def, V_VOID, 0, resp_def);
proto_add_oper(p, CONSOLE_SET_COLOR, o);
arg_def[0] = V_INTEGER; arg_def[1] = V_INTEGER;
o = oper_new("set_rgb_color", 2, arg_def, V_INTEGER, 0, resp_def);
o = oper_new("set_rgb_color", 2, arg_def, V_VOID, 0, resp_def);
proto_add_oper(p, CONSOLE_SET_RGB_COLOR, o);
o = oper_new("cursor_visibility", 1, arg_def, V_VOID, 0, resp_def);
proto_add_oper(p, CONSOLE_CURSOR_VISIBILITY, o);
/branches/dynload/uspace/app/trace/syscalls.c
59,6 → 59,7
[SYS_IPC_ANSWER_FAST] = { "ipc_answer_fast", 6, V_ERRNO },
[SYS_IPC_ANSWER_SLOW] = { "ipc_answer_slow", 2, V_ERRNO },
[SYS_IPC_FORWARD_FAST] = { "ipc_forward_fast", 6, V_ERRNO },
[SYS_IPC_FORWARD_SLOW] = { "ipc_forward_slow", 3, V_ERRNO },
[SYS_IPC_WAIT] = { "ipc_wait_for_call", 3, V_HASH },
[SYS_IPC_HANGUP] = { "ipc_hangup", 1, V_ERRNO },
[SYS_IPC_REGISTER_IRQ] = { "ipc_register_irq", 4, V_ERRNO },