summaryrefslogtreecommitdiffstats
path: root/commands
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2014-03-07 09:25:44 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2014-03-07 09:25:44 +0100
commit144358e0aa102c84968443460c508eb3d65ccc90 (patch)
tree01b9aafde793d1124976ecd2bae090b9b978f8a3 /commands
parente358922a74b01e6272c77caf01bc78a8295cc7d7 (diff)
parent86f681abec4f8485d2e95537e0d59a8d9ab6b546 (diff)
downloadbarebox-144358e0aa102c84968443460c508eb3d65ccc90.tar.gz
barebox-144358e0aa102c84968443460c508eb3d65ccc90.tar.xz
Merge branch 'for-next/nfs'
Conflicts: defaultenv/defaultenv-2-base/bin/ifup
Diffstat (limited to 'commands')
-rw-r--r--commands/boot.c2
-rw-r--r--commands/exec.c2
-rw-r--r--commands/login.c2
-rw-r--r--commands/mount.c19
-rw-r--r--commands/tftp.c2
-rw-r--r--commands/time.c2
6 files changed, 17 insertions, 12 deletions
diff --git a/commands/boot.c b/commands/boot.c
index ccf5827a59..bb8d07fce4 100644
--- a/commands/boot.c
+++ b/commands/boot.c
@@ -47,7 +47,7 @@ static int boot_script(char *path)
globalvar_set_match("linux.bootargs.dyn.", "");
globalvar_set_match("bootm.", "");
- ret = run_command(path, 0);
+ ret = run_command(path);
if (ret) {
printf("Running %s failed\n", path);
goto out;
diff --git a/commands/exec.c b/commands/exec.c
index bd7d54afd2..8d12b30ec9 100644
--- a/commands/exec.c
+++ b/commands/exec.c
@@ -39,7 +39,7 @@ static int do_exec(int argc, char *argv[])
if (!script)
return 1;
- if (run_command (script, 0) == -1)
+ if (run_command(script) == -1)
goto out;
free(script);
}
diff --git a/commands/login.c b/commands/login.c
index b616bf15fc..d9297fa370 100644
--- a/commands/login.c
+++ b/commands/login.c
@@ -68,7 +68,7 @@ static int do_login(int argc, char *argv[])
if (passwd_len < 0) {
console_allow_input(false);
- run_command(timeout_cmd, 0);
+ run_command(timeout_cmd);
}
if (check_passwd(passwd, passwd_len))
diff --git a/commands/mount.c b/commands/mount.c
index 2e9d4bef5e..691bc2911e 100644
--- a/commands/mount.c
+++ b/commands/mount.c
@@ -33,26 +33,31 @@ static int do_mount(int argc, char *argv[])
{
int opt;
int ret = 0, verbose = 0;
- struct fs_device_d *fsdev;
struct driver_d *drv;
const char *type = NULL;
const char *mountpoint, *dev;
+ const char *fsoptions = NULL;
- while ((opt = getopt(argc, argv, "t:va")) > 0) {
+ while ((opt = getopt(argc, argv, "ao:t:v")) > 0) {
switch (opt) {
+ case 'a':
+ mount_all();
+ break;
case 't':
type = optarg;
break;
+ case 'o':
+ fsoptions = optarg;
+ break;
case 'v':
verbose++;
break;
- case 'a':
- mount_all();
- break;
}
}
if (argc == optind) {
+ struct fs_device_d *fsdev;
+
for_each_fs_device(fsdev) {
printf("%s on %s type %s\n",
fsdev->backingstore ? fsdev->backingstore : "none",
@@ -84,7 +89,7 @@ static int do_mount(int argc, char *argv[])
if (!cdev)
return -ENOENT;
- path = cdev_mount_default(cdev);
+ path = cdev_mount_default(cdev, fsoptions);
if (IS_ERR(path))
return PTR_ERR(path);
@@ -108,7 +113,7 @@ static int do_mount(int argc, char *argv[])
mountpoint = argv[optind + 1];
}
- if ((ret = mount(dev, type, mountpoint))) {
+ if ((ret = mount(dev, type, mountpoint, fsoptions))) {
perror("mount");
return 1;
}
diff --git a/commands/tftp.c b/commands/tftp.c
index c83d1740e2..64cab2f045 100644
--- a/commands/tftp.c
+++ b/commands/tftp.c
@@ -72,7 +72,7 @@ static int do_tftpb(int argc, char *argv[])
goto err_free;
ip = net_get_serverip();
- ret = mount(ip_to_string(ip), "tftp", TFTP_MOUNT_PATH);
+ ret = mount(ip_to_string(ip), "tftp", TFTP_MOUNT_PATH, NULL);
if (ret)
goto err_rmdir;
diff --git a/commands/time.c b/commands/time.c
index 987c25ef73..2cc3292d7b 100644
--- a/commands/time.c
+++ b/commands/time.c
@@ -27,7 +27,7 @@ static int do_time(int argc, char *argv[])
start = get_time_ns();
- run_command(buf, 0);
+ run_command(buf);
end = get_time_ns();