commit eebe570f70d61348d856fe63930608f7730e837b
parent 0f7da1d9d4bd19390bb7934ae9eb387d926c4f5b
Author: Roberto E. Vargas Caballero <roberto.vargas@midokura.com>
Date: Thu, 17 Nov 2022 12:29:27 +0100
os9/dlang: Add bind command
Diffstat:
1 file changed, 15 insertions(+), 0 deletions(-)
diff --git a/src/os9/dlang.c b/src/os9/dlang.c
@@ -202,6 +202,14 @@ err:
}
static int
+do_bind(const struct cmd *cmd, struct args *args)
+{
+ if (bind(args->argv[1], args->argv[2]) < 0)
+ kprint(PREFIX "ERR bind:%e\n");
+ return 0;
+}
+
+static int
do_x(const struct cmd *cmd, struct args *args)
{
char *p, *s;
@@ -367,6 +375,13 @@ static const struct cmd cmds[] = {
.helpmsg = "Display stat attribute: stat path",
},
{
+ .name = "bind",
+ .eval = do_bind,
+ .min = 3,
+ .max = 3,
+ .helpmsg = "bind one directory in other: bind from to",
+ },
+ {
.name = "x",
.eval = do_x,
.min = 2,