source: trunk/kernel/ksh/kminiShell.h @ 68

Last change on this file since 68 was 1, checked in by alain, 7 years ago

First import

File size: 2.1 KB
Line 
1/*
2    This file is part of MutekP.
3
4    MutekP is free software; you can redistribute it and/or modify it
5    under the terms of the GNU General Public License as published by
6    the Free Software Foundation; either version 2 of the License, or
7    (at your option) any later version.
8
9    MutekP is distributed in the hope that it will be useful, but
10    WITHOUT ANY WARRANTY; without even the implied warranty of
11    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12    General Public License for more details.
13
14    You should have received a copy of the GNU General Public License
15    along with MutekP; if not, write to the Free Software Foundation,
16    Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
17
18    UPMC / LIP6 / SOC (c) 2008
19    Copyright Ghassan Almaless <ghassan.almaless@gmail.com>
20*/
21
22#ifndef __MINI_SHELL_H__
23#define __MINI_SHELL_H__
24
25#include <vfs.h>
26#include <kdmsg.h>
27
28#define MS_MAX_ARG_LEN    20
29#define MS_MAX_LINE_LEN   64
30#define BUFFER_SIZE       4096
31#define MSG_STR_LEN       512
32
33extern uint8_t buffer[];
34extern kdmsg_channel_t ksh_tty;
35
36typedef struct ms_argument_s
37{
38  uint_t argc;
39  char argv[MS_MAX_ARG_LEN][MS_MAX_LINE_LEN];
40}ms_args_t;
41
42extern struct vfs_file_s *root ;
43extern struct vfs_file_s *ms_n_cwd ;
44extern char ms_pwd[128] ;
45
46void print_error_msg(error_t err)  ;
47void ksh_print(const char *fmt, ...);
48void ksh_write(void *buff, size_t size);
49char getChar() ;
50void putChar(char ch) ;
51void cmdLineAnalyser(ms_args_t *args);
52
53typedef error_t (ksh_cmd_t)(void*);
54
55/* Commands */
56error_t clear_func(void* param);
57error_t rm_func(void *parm) ;
58error_t cd_func(void *parm) ;
59error_t ls_func(void *param) ;
60error_t mkdir_func(void *param) ;
61error_t cp_func(void *arg) ;
62error_t mkfifo_func(void *param) ;
63error_t cat_func(void *param) ;
64error_t cat2_func(void *param) ;
65error_t eomtkp_func(void *param) ;
66error_t ps_func(void *param);
67error_t show_instrumentation(void* param) ;
68error_t exec_func(void *param);
69error_t pwd_func(void *param);
70error_t ksh_set_tty_func(void *param);
71error_t ppm_func(void *param);
72error_t ksh_cpu_state_func(void *param);
73error_t kill_func(void *param);
74
75#endif
Note: See TracBrowser for help on using the repository browser.