Changes in / [54d4b9e:8d12065] in mainline


Ignore:
Location:
uspace
Files:
2 deleted
35 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/bdsh/Makefile

    r54d4b9e r8d12065  
    5858        util.c \
    5959        exec.c \
    60         scli.c \
    61         tok.c
     60        scli.c
    6261
    6362include $(USPACE_PREFIX)/Makefile.common
  • uspace/app/bdsh/cmds/builtin_cmds.c

    r54d4b9e r8d12065  
    1 /*
    2  * Copyright (c) 2008 Tim Post
     1/* Copyright (c) 2008, Tim Post <tinkertim@gmail.com>
    32 * All rights reserved.
    43 *
    54 * Redistribution and use in source and binary forms, with or without
    6  * modification, are permitted provided that the following conditions
    7  * are met:
     5 * modification, are permitted provided that the following conditions are met:
    86 *
    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.
     7 * Redistributions of source code must retain the above copyright notice, this
     8 * list of conditions and the following disclaimer.
    169 *
    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.
     10 * Redistributions in binary form must reproduce the above copyright notice,
     11 * this list of conditions and the following disclaimer in the documentation
     12 * and/or other materials provided with the distribution.
     13 *
     14 * Neither the name of the original program's authors nor the names of its
     15 * contributors may be used to endorse or promote products derived from this
     16 * software without specific prior written permission.
     17 *
     18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
     19 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
     20 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
     21 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
     22 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
     23 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
     24 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
     25 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
     26 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
     27 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
     28 * POSSIBILITY OF SUCH DAMAGE.
    2729 */
    2830
     
    3638#include "cmds.h"
    3739#include "builtin_aliases.h"
    38 #include "scli.h"
    3940
    4041extern volatile unsigned int cli_interactive;
     
    9697                cmd->help(extended);
    9798                return CL_EOK;
    98         } else {
     99        } else
    99100                return CL_ENOENT;
    100         }
    101101}
    102102
    103 int run_builtin(int builtin, char *argv[], cliuser_t *usr, iostate_t *new_iostate)
     103int run_builtin(int builtin, char *argv[], cliuser_t *usr)
    104104{
    105         int rc;
    106105        builtin_t *cmd = builtins;
    107106
    108107        cmd += builtin;
    109        
    110         iostate_t *old_iostate = get_iostate();
    111         set_iostate(new_iostate);
    112        
    113         if (NULL != cmd->entry) {
    114                 rc = ((int)cmd->entry(argv, usr));
    115         } else {
    116                 rc = CL_ENOENT;
    117         }
    118        
    119         set_iostate(old_iostate);
    120108
    121         return rc;
     109        if (NULL != cmd->entry)
     110                return((int)cmd->entry(argv, usr));
     111
     112        return CL_ENOENT;
    122113}
  • uspace/app/bdsh/cmds/builtins/cd/cd.c

    r54d4b9e r8d12065  
    1 /*
    2  * Copyright (c) 2008 Tim Post
     1/* Copyright (c) 2008, Tim Post <tinkertim@gmail.com>
    32 * All rights reserved.
    43 *
    54 * Redistribution and use in source and binary forms, with or without
    6  * modification, are permitted provided that the following conditions
    7  * are met:
     5 * modification, are permitted provided that the following conditions are met:
    86 *
    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.
     7 * Redistributions of source code must retain the above copyright notice, this
     8 * list of conditions and the following disclaimer.
    169 *
    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.
     10 * Redistributions in binary form must reproduce the above copyright notice,
     11 * this list of conditions and the following disclaimer in the documentation
     12 * and/or other materials provided with the distribution.
     13 *
     14 * Neither the name of the original program's authors nor the names of its
     15 * contributors may be used to endorse or promote products derived from this
     16 * software without specific prior written permission.
     17 *
     18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
     19 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
     20 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
     21 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
     22 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
     23 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
     24 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
     25 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
     26 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
     27 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
     28 * POSSIBILITY OF SUCH DAMAGE.
    2729 */
    2830
  • uspace/app/bdsh/cmds/builtins/exit/exit.c

    r54d4b9e r8d12065  
    1 /*
    2  * Copyright (c) 2008 Tim Post
     1/* Copyright (c) 2008, Tim Post <tinkertim@gmail.com>
    32 * All rights reserved.
    43 *
    54 * Redistribution and use in source and binary forms, with or without
    6  * modification, are permitted provided that the following conditions
    7  * are met:
     5 * modification, are permitted provided that the following conditions are met:
    86 *
    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.
     7 * Redistributions of source code must retain the above copyright notice, this
     8 * list of conditions and the following disclaimer.
    169 *
    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.
     10 * Redistributions in binary form must reproduce the above copyright notice,
     11 * this list of conditions and the following disclaimer in the documentation
     12 * and/or other materials provided with the distribution.
     13 *
     14 * Neither the name of the original program's authors nor the names of its
     15 * contributors may be used to endorse or promote products derived from this
     16 * software without specific prior written permission.
     17 *
     18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
     19 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
     20 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
     21 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
     22 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
     23 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
     24 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
     25 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
     26 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
     27 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
     28 * POSSIBILITY OF SUCH DAMAGE.
    2729 */
    2830
  • uspace/app/bdsh/cmds/cmds.h

    r54d4b9e r8d12065  
    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 
    291#ifndef CMDS_H
    302#define CMDS_H
     
    8759extern char *alias_for_module(const char *);
    8860extern int help_module(int, unsigned int);
    89 extern int run_module(int, char *[], iostate_t *);
     61extern int run_module(int, char *[]);
    9062
    9163/* Prototypes for builtin launchers */
     
    9567extern char *alias_for_builtin(const char *);
    9668extern int help_builtin(int, unsigned int);
    97 extern int run_builtin(int, char *[], cliuser_t *, iostate_t *);
     69extern int run_builtin(int, char *[], cliuser_t *);
    9870
    9971#endif
  • uspace/app/bdsh/cmds/mod_cmds.c

    r54d4b9e r8d12065  
    1 /*
    2  * Copyright (c) 2008 Tim Post
     1/* Copyright (c) 2008, Tim Post <tinkertim@gmail.com>
    32 * All rights reserved.
    43 *
    54 * Redistribution and use in source and binary forms, with or without
    6  * modification, are permitted provided that the following conditions
    7  * are met:
     5 * modification, are permitted provided that the following conditions are met:
    86 *
    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.
     7 * Redistributions of source code must retain the above copyright notice, this
     8 * list of conditions and the following disclaimer.
    169 *
    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.
     10 * Redistributions in binary form must reproduce the above copyright notice,
     11 * this list of conditions and the following disclaimer in the documentation
     12 * and/or other materials provided with the distribution.
     13 *
     14 * Neither the name of the original program's authors nor the names of its
     15 * contributors may be used to endorse or promote products derived from this
     16 * software without specific prior written permission.
     17 *
     18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
     19 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
     20 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
     21 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
     22 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
     23 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
     24 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
     25 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
     26 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
     27 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
     28 * POSSIBILITY OF SUCH DAMAGE.
    2729 */
    2830
     
    116118                mod->help(extended);
    117119                return CL_EOK;
    118         } else {
     120        } else
    119121                return CL_ENOENT;
    120         }
    121122}
    122123
    123124/* Invokes the module entry point modules[module], passing argv[] as an argument
    124125 * stack. */
    125 int run_module(int module, char *argv[], iostate_t *new_iostate)
     126int run_module(int module, char *argv[])
    126127{
    127         int rc;
    128128        module_t *mod = modules;
    129129
    130130        mod += module;
    131        
    132         iostate_t *old_iostate = get_iostate();
    133         set_iostate(new_iostate);
    134131
    135         if (NULL != mod->entry) {
    136                 rc = ((int)mod->entry(argv));
    137         } else {
    138                 rc = CL_ENOENT;
    139         }
    140        
    141         set_iostate(old_iostate);
     132        if (NULL != mod->entry)
     133                return ((int)mod->entry(argv));
    142134
    143         return rc;
     135        return CL_ENOENT;
    144136}
  • uspace/app/bdsh/cmds/modules/cat/cat.c

    r54d4b9e r8d12065  
    1 /*
    2  * Copyright (c) 2008 Tim Post
     1/* Copyright (c) 2008, Tim Post <tinkertim@gmail.com>
    32 * Copyright (c) 2011, Martin Sucha
    43 * All rights reserved.
    54 *
    65 * Redistribution and use in source and binary forms, with or without
    7  * modification, are permitted provided that the following conditions
    8  * are met:
    9  *
    10  * - Redistributions of source code must retain the above copyright
    11  *   notice, this list of conditions and the following disclaimer.
    12  * - Redistributions in binary form must reproduce the above copyright
    13  *   notice, this list of conditions and the following disclaimer in the
    14  *   documentation and/or other materials provided with the distribution.
    15  * - The name of the author may not be used to endorse or promote products
    16  *   derived from this software without specific prior written permission.
    17  *
    18  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
    19  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
    20  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
    21  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
    22  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
    23  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
    24  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
    25  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
    26  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
    27  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
     6 * modification, are permitted provided that the following conditions are met:
     7 *
     8 * Redistributions of source code must retain the above copyright notice, this
     9 * list of conditions and the following disclaimer.
     10 *
     11 * Redistributions in binary form must reproduce the above copyright notice,
     12 * this list of conditions and the following disclaimer in the documentation
     13 * and/or other materials provided with the distribution.
     14 *
     15 * Neither the name of the original program's authors nor the names of its
     16 * contributors may be used to endorse or promote products derived from this
     17 * software without specific prior written permission.
     18 *
     19 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
     20 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
     21 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
     22 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
     23 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
     24 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
     25 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
     26 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
     27 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
     28 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
     29 * POSSIBILITY OF SUCH DAMAGE.
    2830 */
    2931
  • uspace/app/bdsh/cmds/modules/cp/cp.c

    r54d4b9e r8d12065  
    1 /*
    2  * Copyright (c) 2008 Tim Post
     1/* Copyright (c) 2008, Tim Post <tinkertim@gmail.com>
    32 * All rights reserved.
    43 *
    54 * 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.
     5 * modification, are permitted provided that the following conditions are met:
     6 *
     7 * Redistributions of source code must retain the above copyright notice, this
     8 * list of conditions and the following disclaimer.
     9 *
     10 * Redistributions in binary form must reproduce the above copyright notice,
     11 * this list of conditions and the following disclaimer in the documentation
     12 * and/or other materials provided with the distribution.
     13 *
     14 * Neither the name of the original program's authors nor the names of its
     15 * contributors may be used to endorse or promote products derived from this
     16 * software without specific prior written permission.
     17 *
     18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
     19 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
     20 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
     21 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
     22 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
     23 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
     24 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
     25 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
     26 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
     27 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
     28 * POSSIBILITY OF SUCH DAMAGE.
    2729 */
    2830
  • uspace/app/bdsh/cmds/modules/help/help.c

    r54d4b9e r8d12065  
    1 /*
    2  * Copyright (c) 2008 Tim Post
     1/* Copyright (c) 2008, Tim Post <tinkertim@gmail.com>
    32 * All rights reserved.
    43 *
    54 * Redistribution and use in source and binary forms, with or without
    6  * modification, are permitted provided that the following conditions
    7  * are met:
     5 * modification, are permitted provided that the following conditions are met:
    86 *
    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.
     7 * Redistributions of source code must retain the above copyright notice, this
     8 * list of conditions and the following disclaimer.
    169 *
    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.
     10 * Redistributions in binary form must reproduce the above copyright notice,
     11 * this list of conditions and the following disclaimer in the documentation
     12 * and/or other materials provided with the distribution.
     13 *
     14 * Neither the name of the original program's authors nor the names of its
     15 * contributors may be used to endorse or promote products derived from this
     16 * software without specific prior written permission.
     17 *
     18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
     19 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
     20 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
     21 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
     22 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
     23 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
     24 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
     25 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
     26 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
     27 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
     28 * POSSIBILITY OF SUCH DAMAGE.
    2729 */
    2830
  • uspace/app/bdsh/cmds/modules/kcon/kcon.c

    r54d4b9e r8d12065  
    1 /*
    2  * Copyright (c) 2008 Tim Post
     1/* Copyright (c) 2008, Tim Post <tinkertim@gmail.com>
    32 * All rights reserved.
    43 *
    54 * Redistribution and use in source and binary forms, with or without
    6  * modification, are permitted provided that the following conditions
    7  * are met:
     5 * modification, are permitted provided that the following conditions are met:
    86 *
    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.
     7 * Redistributions of source code must retain the above copyright notice, this
     8 * list of conditions and the following disclaimer.
    169 *
    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.
     10 * Redistributions in binary form must reproduce the above copyright notice,
     11 * this list of conditions and the following disclaimer in the documentation
     12 * and/or other materials provided with the distribution.
     13 *
     14 * Neither the name of the original program's authors nor the names of its
     15 * contributors may be used to endorse or promote products derived from this
     16 * software without specific prior written permission.
     17 *
     18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
     19 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
     20 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
     21 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
     22 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
     23 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
     24 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
     25 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
     26 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
     27 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
     28 * POSSIBILITY OF SUCH DAMAGE.
    2729 */
    2830
  • uspace/app/bdsh/cmds/modules/ls/ls.c

    r54d4b9e r8d12065  
    1 /*
    2  * Copyright (c) 2008 Tim Post
     1/* Copyright (c) 2008, Tim Post <tinkertim@gmail.com>
    32 * All rights reserved.
    43 *
    54 * 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.
     5 * modification, are permitted provided that the following conditions are met:
     6 *
     7 * Redistributions of source code must retain the above copyright notice, this
     8 * list of conditions and the following disclaimer.
     9 *
     10 * Redistributions in binary form must reproduce the above copyright notice,
     11 * this list of conditions and the following disclaimer in the documentation
     12 * and/or other materials provided with the distribution.
     13 *
     14 * Neither the name of the original program's authors nor the names of its
     15 * contributors may be used to endorse or promote products derived from this
     16 * software without specific prior written permission.
     17 *
     18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
     19 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
     20 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
     21 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
     22 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
     23 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
     24 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
     25 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
     26 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
     27 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
     28 * POSSIBILITY OF SUCH DAMAGE.
    2729 */
    2830
  • uspace/app/bdsh/cmds/modules/mkdir/mkdir.c

    r54d4b9e r8d12065  
    1 /*
    2  * Copyright (c) 2008 Tim Post
     1/* Copyright (c) 2008, Tim Post <tinkertim@gmail.com>
    32 * All rights reserved.
    43 *
    54 * 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.
     5 * modification, are permitted provided that the following conditions are met:
     6 *
     7 * Redistributions of source code must retain the above copyright notice, this
     8 * list of conditions and the following disclaimer.
     9 *
     10 * Redistributions in binary form must reproduce the above copyright notice,
     11 * this list of conditions and the following disclaimer in the documentation
     12 * and/or other materials provided with the distribution.
     13 *
     14 * Neither the name of the original program's authors nor the names of its
     15 * contributors may be used to endorse or promote products derived from this
     16 * software without specific prior written permission.
     17 *
     18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
     19 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
     20 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
     21 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
     22 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
     23 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
     24 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
     25 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
     26 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
     27 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
     28 * POSSIBILITY OF SUCH DAMAGE.
    2729 */
     30
    2831
    2932#include <stdio.h>
  • uspace/app/bdsh/cmds/modules/mkfile/mkfile.c

    r54d4b9e r8d12065  
    2626 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    2727 */
     28
    2829
    2930#include <stdio.h>
  • uspace/app/bdsh/cmds/modules/module_aliases.h

    r54d4b9e r8d12065  
    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 
    291#ifndef MODULE_ALIASES_H
    302#define MODULE_ALIASES_H
  • uspace/app/bdsh/cmds/modules/modules.h

    r54d4b9e r8d12065  
    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 
    291#ifndef MODULES_H
    302#define MODULES_H
  • uspace/app/bdsh/cmds/modules/pwd/pwd.c

    r54d4b9e r8d12065  
    1 /*
    2  * Copyright (c) 2008 Tim Post
     1/* Copyright (c) 2008, Tim Post <tinkertim@gmail.com>
    32 * All rights reserved.
    43 *
    54 * Redistribution and use in source and binary forms, with or without
    6  * modification, are permitted provided that the following conditions
    7  * are met:
     5 * modification, are permitted provided that the following conditions are met:
    86 *
    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.
     7 * Redistributions of source code must retain the above copyright notice, this
     8 * list of conditions and the following disclaimer.
    169 *
    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.
     10 * Redistributions in binary form must reproduce the above copyright notice,
     11 * this list of conditions and the following disclaimer in the documentation
     12 * and/or other materials provided with the distribution.
     13 *
     14 * Neither the name of the original program's authors nor the names of its
     15 * contributors may be used to endorse or promote products derived from this
     16 * software without specific prior written permission.
     17 *
     18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
     19 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
     20 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
     21 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
     22 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
     23 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
     24 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
     25 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
     26 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
     27 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
     28 * POSSIBILITY OF SUCH DAMAGE.
    2729 */
    2830
  • uspace/app/bdsh/cmds/modules/rm/rm.c

    r54d4b9e r8d12065  
    1 /*
    2  * Copyright (c) 2008 Tim Post
     1/* Copyright (c) 2008, Tim Post <tinkertim@gmail.com>
    32 * All rights reserved.
    43 *
    54 * 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.
     5 * modification, are permitted provided that the following conditions are met:
     6 *
     7 * Redistributions of source code must retain the above copyright notice, this
     8 * list of conditions and the following disclaimer.
     9 *
     10 * Redistributions in binary form must reproduce the above copyright notice,
     11 * this list of conditions and the following disclaimer in the documentation
     12 * and/or other materials provided with the distribution.
     13 *
     14 * Neither the name of the original program's authors nor the names of its
     15 * contributors may be used to endorse or promote products derived from this
     16 * software without specific prior written permission.
     17 *
     18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
     19 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
     20 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
     21 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
     22 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
     23 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
     24 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
     25 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
     26 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
     27 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
     28 * POSSIBILITY OF SUCH DAMAGE.
    2729 */
    2830
  • uspace/app/bdsh/cmds/modules/sleep/sleep.c

    r54d4b9e r8d12065  
    1 /*
    2  * Copyright (c) 2008 Tim Post
     1/* Copyright (c) 2008, Tim Post <tinkertim@gmail.com>
    32 * All rights reserved.
    43 *
    54 * Redistribution and use in source and binary forms, with or without
    6  * modification, are permitted provided that the following conditions
    7  * are met:
     5 * modification, are permitted provided that the following conditions are met:
    86 *
    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.
     7 * Redistributions of source code must retain the above copyright notice, this
     8 * list of conditions and the following disclaimer.
    169 *
    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.
     10 * Redistributions in binary form must reproduce the above copyright notice,
     11 * this list of conditions and the following disclaimer in the documentation
     12 * and/or other materials provided with the distribution.
     13 *
     14 * Neither the name of the original program's authors nor the names of its
     15 * contributors may be used to endorse or promote products derived from this
     16 * software without specific prior written permission.
     17 *
     18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
     19 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
     20 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
     21 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
     22 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
     23 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
     24 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
     25 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
     26 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
     27 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
     28 * POSSIBILITY OF SUCH DAMAGE.
    2729 */
    2830
  • uspace/app/bdsh/cmds/modules/touch/touch.c

    r54d4b9e r8d12065  
    1 /*
    2  * Copyright (c) 2008 Tim Post
     1/* Copyright (c) 2008, Tim Post <tinkertim@gmail.com>
    32 * All rights reserved.
    43 *
    54 * Redistribution and use in source and binary forms, with or without
    6  * modification, are permitted provided that the following conditions
    7  * are met:
     5 * modification, are permitted provided that the following conditions are met:
    86 *
    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.
     7 * Redistributions of source code must retain the above copyright notice, this
     8 * list of conditions and the following disclaimer.
    169 *
    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.
     10 * Redistributions in binary form must reproduce the above copyright notice,
     11 * this list of conditions and the following disclaimer in the documentation
     12 * and/or other materials provided with the distribution.
     13 *
     14 * Neither the name of the original program's authors nor the names of its
     15 * contributors may be used to endorse or promote products derived from this
     16 * software without specific prior written permission.
     17 *
     18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
     19 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
     20 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
     21 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
     22 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
     23 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
     24 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
     25 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
     26 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
     27 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
     28 * POSSIBILITY OF SUCH DAMAGE.
    2729 */
    2830
  • uspace/app/bdsh/config.h

    r54d4b9e r8d12065  
    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 
    291/* Various things that are used in many places including a few
    302 * tidbits left over from autoconf prior to the HelenOS port */
  • uspace/app/bdsh/errors.c

    r54d4b9e r8d12065  
    1 /*
    2  * Copyright (c) 2008 Tim Post
     1/* Copyright (c) 2008, Tim Post <tinkertim@gmail.com>
    32 * All rights reserved.
    43 *
    54 * Redistribution and use in source and binary forms, with or without
    6  * modification, are permitted provided that the following conditions
    7  * are met:
     5 * modification, are permitted provided that the following conditions are met:
    86 *
    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.
     7 * Redistributions of source code must retain the above copyright notice, this
     8 * list of conditions and the following disclaimer.
    169 *
    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.
     10 * Redistributions in binary form must reproduce the above copyright notice,
     11 * this list of conditions and the following disclaimer in the documentation
     12 * and/or other materials provided with the distribution.
     13 *
     14 * Neither the name of the original program's authors nor the names of its
     15 * contributors may be used to endorse or promote products derived from this
     16 * software without specific prior written permission.
     17 *
     18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
     19 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
     20 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
     21 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
     22 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
     23 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
     24 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
     25 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
     26 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
     27 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
     28 * POSSIBILITY OF SUCH DAMAGE.
    2729 */
    2830
     
    3638#include "errors.h"
    3739#include "errstr.h"
    38 #include "scli.h"
    3940
    4041volatile int cli_errno = CL_EOK;
  • uspace/app/bdsh/errors.h

    r54d4b9e r8d12065  
    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 
    291#ifndef ERRORS_H
    302#define ERRORS_H
  • uspace/app/bdsh/errstr.h

    r54d4b9e r8d12065  
    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 
    291#ifndef ERRSTR_H
    302#define ERRSTR_H
  • uspace/app/bdsh/exec.c

    r54d4b9e r8d12065  
    1 /*
    2  * Copyright (c) 2008 Tim Post
     1/* Copyright (c) 2008, Tim Post <tinkertim@gmail.com>
    32 * All rights reserved.
    43 *
    54 * Redistribution and use in source and binary forms, with or without
    6  * modification, are permitted provided that the following conditions
    7  * are met:
     5 * modification, are permitted provided that the following conditions are met:
    86 *
    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.
     7 * Redistributions of source code must retain the above copyright notice, this
     8 * list of conditions and the following disclaimer.
    169 *
    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.
     10 * Redistributions in binary form must reproduce the above copyright notice,
     11 * this list of conditions and the following disclaimer in the documentation
     12 * and/or other materials provided with the distribution.
     13 *
     14 * Neither the name of the original program's authors nor the names of its
     15 * contributors may be used to endorse or promote products derived from this
     16 * software without specific prior written permission.
     17 *
     18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
     19 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
     20 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
     21 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
     22 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
     23 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
     24 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
     25 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
     26 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
     27 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
     28 * POSSIBILITY OF SUCH DAMAGE.
    2729 */
    2830
     
    110112}
    111113
    112 unsigned int try_exec(char *cmd, char **argv, iostate_t *io)
     114unsigned int try_exec(char *cmd, char **argv)
    113115{
    114116        task_id_t tid;
    115117        task_exit_t texit;
    116118        char *tmp;
    117         int rc, retval, i;
    118         fdi_node_t file_nodes[3];
    119         fdi_node_t *file_nodes_p[4];
    120         FILE *files[3];
     119        int rc, retval;
    121120
    122121        tmp = str_dup(find_command(cmd));
    123122        free(found);
    124        
    125         files[0] = io->stdin;
    126         files[1] = io->stdout;
    127         files[2] = io->stderr;
    128        
    129         for (i = 0; i < 3 && files[i] != NULL; i++) {
    130                 if (fnode(files[i], &file_nodes[i]) == EOK) {
    131                         file_nodes_p[i] = &file_nodes[i];
    132                 }
    133                 else {
    134                         file_nodes_p[i] = NULL;
    135                 }
    136         }
    137         file_nodes_p[i] = NULL;
    138123
    139         rc = task_spawnvf(&tid, tmp, (const char **) argv, file_nodes_p);
     124        rc = task_spawnv(&tid, tmp, (const char **) argv);
    140125        free(tmp);
    141126
  • uspace/app/bdsh/exec.h

    r54d4b9e r8d12065  
    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 
    291#ifndef EXEC_H
    302#define EXEC_H
    313
    324#include <task.h>
    33 #include "scli.h"
    345
    35 extern unsigned int try_exec(char *, char **, iostate_t *);
     6extern unsigned int try_exec(char *, char **);
    367
    378#endif
  • uspace/app/bdsh/input.c

    r54d4b9e r8d12065  
    1 /*
    2  * Copyright (c) 2008 Tim Post
     1/* Copyright (c) 2008, Tim Post <tinkertim@gmail.com>
    32 * All rights reserved.
    43 *
    54 * Redistribution and use in source and binary forms, with or without
    6  * modification, are permitted provided that the following conditions
    7  * are met:
     5 * modification, are permitted provided that the following conditions are met:
    86 *
    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.
     7 * Redistributions of source code must retain the above copyright notice, this
     8 * list of conditions and the following disclaimer.
    169 *
    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.
     10 * Redistributions in binary form must reproduce the above copyright notice,
     11 * this list of conditions and the following disclaimer in the documentation
     12 * and/or other materials provided with the distribution.
     13 *
     14 * Neither the name of the original program's authors nor the names of its
     15 * contributors may be used to endorse or promote products derived from this
     16 * software without specific prior written permission.
     17 *
     18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
     19 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
     20 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
     21 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
     22 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
     23 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
     24 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
     25 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
     26 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
     27 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
     28 * POSSIBILITY OF SUCH DAMAGE.
    2729 */
    2830
     
    4850#include "errors.h"
    4951#include "exec.h"
    50 #include "tok.h"
    5152
    5253extern volatile unsigned int cli_quit;
     
    5556static tinput_t *tinput;
    5657
    57 /* Private helpers */
    58 static int run_command(char **, cliuser_t *, iostate_t *);
    59 static void print_pipe_usage(void);
    60 
    6158/* Tokenizes input from console, sees if the first word is a built-in, if so
    6259 * invokes the built-in entry point (a[0]) passing all arguments in a[] to
    6360 * the handler */
    64 int process_input(cliuser_t *usr)
     61int tok_input(cliuser_t *usr)
    6562{
    6663        char *cmd[WORD_MAX];
     64        int n = 0, i = 0;
    6765        int rc = 0;
    68         tokenizer_t tok;
    69         int i, pipe_count, processed_pipes;
    70         int pipe_pos[2];
    71         char **actual_cmd;
    72         char *redir_from = NULL;
    73         char *redir_to = NULL;
     66        char *tmp;
    7467
    7568        if (NULL == usr->line)
    7669                return CL_EFAIL;
    7770
    78         rc = tok_init(&tok, usr->line, cmd, WORD_MAX);
    79         if (rc != EOK) {
     71        tmp = str_dup(usr->line);
     72
     73        cmd[n] = strtok(tmp, " ");
     74        while (cmd[n] && n < WORD_MAX) {
     75                cmd[++n] = strtok(NULL, " ");
     76        }
     77
     78        /* We have rubbish */
     79        if (NULL == cmd[0]) {
     80                rc = CL_ENOENT;
    8081                goto finit;
    8182        }
    82        
    83         rc = tok_tokenize(&tok);
    84         if (rc != EOK) {
     83
     84        /* Its a builtin command ? */
     85        if ((i = (is_builtin(cmd[0]))) > -1) {
     86                rc = run_builtin(i, cmd, usr);
     87                goto finit;
     88        /* Its a module ? */
     89        } else if ((i = (is_module(cmd[0]))) > -1) {
     90                rc = run_module(i, cmd);
    8591                goto finit;
    8692        }
    87        
    88         /* Until full support for pipes is implemented, allow for a simple case:
    89          * [from <file> |] command [| to <file>]
    90          *
    91          * First find the pipes and check that there are no more
    92          */
    93         int cmd_length = 0;
    94         for (i = 0, pipe_count = 0; cmd[i] != NULL; i++, cmd_length++) {
    95                 if (cmd[i][0] == '|') {
    96                         if (pipe_count >= 2) {
    97                                 print_pipe_usage();
    98                                 rc = ENOTSUP;
    99                                 goto finit;
    100                         }
    101                         pipe_pos[pipe_count] = i;
    102                         pipe_count++;
    103                 }
    104         }
    105        
    106         actual_cmd = cmd;
    107         processed_pipes = 0;
    108        
    109         /* Check if the first part (from <file> |) is present */
    110         if (pipe_count > 0 && pipe_pos[0] == 2 && str_cmp(cmd[0], "from") == 0) {
    111                 /* Ignore the first three tokens (from, file, pipe) and set from */
    112                 redir_from = cmd[1];
    113                 actual_cmd = cmd + 3;
    114                 processed_pipes++;
    115         }
    116        
    117         /* Check if the second part (| to <file>) is present */
    118         if ((pipe_count - processed_pipes) > 0 &&
    119             pipe_pos[processed_pipes] == cmd_length - 3 &&
    120             str_cmp(cmd[cmd_length-2], "to") == 0) {
    121                 /* Ignore the last three tokens (pipe, to, file) and set to */
    122                 redir_to = cmd[cmd_length-1];
    123                 cmd[cmd_length-3] = NULL;
    124                 cmd_length -= 3;
    125                 processed_pipes++;
    126         }
    127        
    128         if (processed_pipes != pipe_count) {
    129                 print_pipe_usage();
    130                 rc = ENOTSUP;
    131                 goto finit;
    132         }
    133        
    134         if (actual_cmd[0] == NULL) {
    135                 print_pipe_usage();
    136                 rc = ENOTSUP;
    137                 goto finit;
    138         }
    139        
    140         iostate_t new_iostate = {
    141                 .stdin = stdin,
    142                 .stdout = stdout,
    143                 .stderr = stderr
    144         };
    145        
    146         FILE *from = NULL;
    147         FILE *to = NULL;
    148        
    149         if (redir_from) {
    150                 from = fopen(redir_from, "r");
    151                 if (from == NULL) {
    152                         printf("Cannot open file %s\n", redir_from);
    153                         rc = errno;
    154                         goto finit_with_files;
    155                 }
    156                 new_iostate.stdin = from;
    157         }
    158        
    159        
    160         if (redir_to) {
    161                 to = fopen(redir_to, "w");
    162                 if (to == NULL) {
    163                         printf("Cannot open file %s\n", redir_to);
    164                         rc = errno;
    165                         goto finit_with_files;
    166                 }
    167                 new_iostate.stdout = to;
    168         }
    169        
    170         rc = run_command(cmd, usr, &new_iostate);
    171        
    172 finit_with_files:
    173         if (from != NULL) {
    174                 fclose(from);
    175         }
    176         if (to != NULL) {
    177                 fclose(to);
    178         }
    179        
     93
     94        /* See what try_exec thinks of it */
     95        rc = try_exec(cmd[0], cmd);
     96
    18097finit:
    18198        if (NULL != usr->line) {
     
    183100                usr->line = (char *) NULL;
    184101        }
    185         tok_fini(&tok);
     102        if (NULL != tmp)
     103                free(tmp);
    186104
    187105        return rc;
    188 }
    189 
    190 void print_pipe_usage()
    191 {
    192         printf("Invalid syntax!\n");
    193         printf("Usage of redirection (pipes in the future):\n");
    194         printf("from filename | command ...\n");
    195         printf("from filename | command ... | to filename\n");
    196         printf("command ... | to filename\n");
    197        
    198 }
    199 
    200 int run_command(char **cmd, cliuser_t *usr, iostate_t *new_iostate)
    201 {
    202         int id = 0;
    203        
    204         /* We have rubbish */
    205         if (NULL == cmd[0]) {
    206                 return CL_ENOENT;
    207         }
    208        
    209         /* Is it a builtin command ? */
    210         if ((id = (is_builtin(cmd[0]))) > -1) {
    211                 return run_builtin(id, cmd, usr, new_iostate);
    212         }
    213        
    214         /* Is it a module ? */
    215         if ((id = (is_module(cmd[0]))) > -1) {
    216                 return run_module(id, cmd, new_iostate);
    217         }
    218 
    219         /* See what try_exec thinks of it */
    220         return try_exec(cmd[0], cmd, new_iostate);
    221106}
    222107
  • uspace/app/bdsh/input.h

    r54d4b9e r8d12065  
    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 
    291#ifndef INPUT_H
    302#define INPUT_H
     
    357
    368extern void get_input(cliuser_t *);
    37 extern int process_input(cliuser_t *);
     9extern int tok_input(cliuser_t *);
    3810extern int input_init(void);
    3911
  • uspace/app/bdsh/scli.c

    r54d4b9e r8d12065  
    1 /*
    2  * Copyright (c) 2008 Tim Post
     1/* Copyright (c) 2008, Tim Post <tinkertim@gmail.com>
    32 * All rights reserved.
    43 *
    54 * Redistribution and use in source and binary forms, with or without
    6  * modification, are permitted provided that the following conditions
    7  * are met:
     5 * modification, are permitted provided that the following conditions are met:
    86 *
    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.
     7 * Redistributions of source code must retain the above copyright notice, this
     8 * list of conditions and the following disclaimer.
    169 *
    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.
     10 * Redistributions in binary form must reproduce the above copyright notice,
     11 * this list of conditions and the following disclaimer in the documentation
     12 * and/or other materials provided with the distribution.
     13 *
     14 * Neither the name of the original program's authors nor the names of its
     15 * contributors may be used to endorse or promote products derived from this
     16 * software without specific prior written permission.
     17 *
     18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
     19 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
     20 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
     21 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
     22 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
     23 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
     24 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
     25 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
     26 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
     27 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
     28 * POSSIBILITY OF SUCH DAMAGE.
    2729 */
    2830
     
    4042/* See scli.h */
    4143static cliuser_t usr;
    42 static iostate_t *iostate;
    43 static iostate_t stdiostate;
    4444
    4545/* Globals that are modified during start-up that modules/builtins
     
    8282}
    8383
    84 iostate_t *get_iostate(void)
    85 {
    86         return iostate;
    87 }
    88 
    89 
    90 void set_iostate(iostate_t *ios)
    91 {
    92         iostate = ios;
    93         stdin = ios->stdin;
    94         stdout = ios->stdout;
    95         stderr = ios->stderr;
    96 }
    97 
    9884int main(int argc, char *argv[])
    9985{
    10086        int ret = 0;
    101        
    102         stdiostate.stdin = stdin;
    103         stdiostate.stdout = stdout;
    104         stdiostate.stderr = stderr;
    105         iostate = &stdiostate;
    10687
    10788        if (cli_init(&usr))
     
    11192                get_input(&usr);
    11293                if (NULL != usr.line) {
    113                         ret = process_input(&usr);
     94                        ret = tok_input(&usr);
    11495                        cli_set_prompt(&usr);
    11596                        usr.lasterr = ret;
  • uspace/app/bdsh/scli.h

    r54d4b9e r8d12065  
    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 
    291#ifndef SCLI_H
    302#define SCLI_H
     
    4113} cliuser_t;
    4214
    43 typedef struct {
    44         FILE *stdin;
    45         FILE *stdout;
    46         FILE *stderr;
    47 } iostate_t;
    48 
    4915extern const char *progname;
    5016
    51 extern iostate_t *get_iostate(void);
    52 extern void set_iostate(iostate_t *);
    53 
    5417#endif
  • uspace/app/bdsh/util.c

    r54d4b9e r8d12065  
    1 /*
    2  * Copyright (c) 2008 Tim Post
    3  * All rights reserved.
     1/* Copyright (c) 2008, Tim Post <tinkertim@gmail.com> - All rights reserved
    42 *
    53 * Redistribution and use in source and binary forms, with or without
    6  * modification, are permitted provided that the following conditions
    7  * are met:
     4 * modification, are permitted provided that the following conditions are met:
    85 *
    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.
     6 * Redistributions of source code must retain the above copyright notice, this
     7 * list of conditions and the following disclaimer.
    168 *
    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.
     9 * Redistributions in binary form must reproduce the above copyright notice,
     10 * this list of conditions and the following disclaimer in the documentation
     11 * and/or other materials provided with the distribution.
     12 *
     13 * Neither the name of the original program's authors nor the names of its
     14 * contributors may be used to endorse or promote products derived from this
     15 * software without specific prior written permission.
     16 *
     17 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
     18 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
     19 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
     20 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
     21 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
     22 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
     23 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
     24 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
     25 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
     26 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
     27 * POSSIBILITY OF SUCH DAMAGE.
    2728 */
    2829
     
    6869        return 0;
    6970}
     71
     72
  • uspace/app/bdsh/util.h

    r54d4b9e r8d12065  
    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 
    291#ifndef UTIL_H
    302#define UTIL_H
  • uspace/drv/uhci_hcd/uhci_hcd.ma

    r54d4b9e r8d12065  
    6610 pci/ven=8086&dev=27ca
    7710 pci/ven=8086&dev=27cb
     8
    89
    91010 pci/ven=8086&dev=2830
     
    232410 pci/ven=8086&dev=24c4
    242510 pci/ven=8086&dev=24c7
    25 
    26 10 pci/ven=8086&dev=2688
    27 10 pci/ven=8086&dev=2689
    28 10 pci/ven=8086&dev=268a
    29 10 pci/ven=8086&dev=268b
  • uspace/lib/c/generic/task.c

    r54d4b9e r8d12065  
    101101int task_spawnv(task_id_t *id, const char *path, const char *const args[])
    102102{
     103        /* Connect to a program loader. */
     104        loader_t *ldr = loader_connect();
     105        if (ldr == NULL)
     106                return EREFUSED;
     107       
     108        /* Get task ID. */
     109        task_id_t task_id;
     110        int rc = loader_get_task_id(ldr, &task_id);
     111        if (rc != EOK)
     112                goto error;
     113       
     114        /* Send spawner's current working directory. */
     115        rc = loader_set_cwd(ldr);
     116        if (rc != EOK)
     117                goto error;
     118       
     119        /* Send program pathname. */
     120        rc = loader_set_pathname(ldr, path);
     121        if (rc != EOK)
     122                goto error;
     123       
     124        /* Send arguments. */
     125        rc = loader_set_args(ldr, args);
     126        if (rc != EOK)
     127                goto error;
     128       
    103129        /* Send default files */
    104130        fdi_node_t *files[4];
     
    124150        files[3] = NULL;
    125151       
    126         return task_spawnvf(id, path, args, files);
    127 }
    128 
    129 /** Create a new task by running an executable from the filesystem.
    130  *
    131  * This is really just a convenience wrapper over the more complicated
    132  * loader API. Arguments are passed as a null-terminated array of strings.
    133  * Files are passed as null-terminated array of pointers to fdi_node_t.
    134  *
    135  * @param id    If not NULL, the ID of the task is stored here on success.
    136  * @param path  Pathname of the binary to execute.
    137  * @param argv  Command-line arguments.
    138  * @param files Standard files to use.
    139  *
    140  * @return Zero on success or negative error code.
    141  *
    142  */
    143 int task_spawnvf(task_id_t *id, const char *path, const char *const args[],
    144     fdi_node_t *const files[])
    145 {
    146         /* Connect to a program loader. */
    147         loader_t *ldr = loader_connect();
    148         if (ldr == NULL)
    149                 return EREFUSED;
    150        
    151         /* Get task ID. */
    152         task_id_t task_id;
    153         int rc = loader_get_task_id(ldr, &task_id);
    154         if (rc != EOK)
    155                 goto error;
    156        
    157         /* Send spawner's current working directory. */
    158         rc = loader_set_cwd(ldr);
    159         if (rc != EOK)
    160                 goto error;
    161        
    162         /* Send program pathname. */
    163         rc = loader_set_pathname(ldr, path);
    164         if (rc != EOK)
    165                 goto error;
    166        
    167         /* Send arguments. */
    168         rc = loader_set_args(ldr, args);
    169         if (rc != EOK)
    170                 goto error;
    171        
    172         /* Send files */
    173152        rc = loader_set_files(ldr, files);
    174153        if (rc != EOK)
     
    190169       
    191170        return EOK;
     171       
    192172error:
    193173        /* Error exit */
  • uspace/lib/c/include/task.h

    r54d4b9e r8d12065  
    3737
    3838#include <sys/types.h>
    39 #include <vfs/vfs.h>
    4039
    4140typedef uint64_t task_id_t;
     
    5251extern task_id_t task_spawn(const char *, const char *const[], int *);
    5352extern int task_spawnv(task_id_t *, const char *path, const char *const []);
    54 extern int task_spawnvf(task_id_t *, const char *path, const char *const [],
    55     fdi_node_t *const []);
    5653extern int task_spawnl(task_id_t *, const char *path, ...);
    5754
  • uspace/srv/hid/console/gcons.c

    r54d4b9e r8d12065  
    168168void gcons_change_console(size_t index)
    169169{
    170         if (!use_gcons) {
    171                 active_console = index;
    172                 return;
    173         }
     170        if (!use_gcons)
     171                return;
    174172       
    175173        if (active_console == KERNEL_CONSOLE) {
Note: See TracChangeset for help on using the changeset viewer.