diff options
author | Peter Jones <pjones@redhat.com> | 2008-03-17 11:51:58 -0400 |
---|---|---|
committer | Peter Jones <pjones@pjones2.localdomain> | 2008-03-17 11:51:58 -0400 |
commit | 321293c6f46d399502cd8ff82ce449ee1af8c132 (patch) | |
tree | 706cb0c0f5d74c15600f708e32f8ba31a7e26209 /isys/imount.c | |
parent | 10c7116dee4a077e8015c1be5149faf9cc0fc268 (diff) | |
download | anaconda-321293c6f46d399502cd8ff82ce449ee1af8c132.tar.gz anaconda-321293c6f46d399502cd8ff82ce449ee1af8c132.tar.xz anaconda-321293c6f46d399502cd8ff82ce449ee1af8c132.zip |
Don't prepend /dev/ onto nfs devices. Also log mount errors to tty5.
Diffstat (limited to 'isys/imount.c')
-rw-r--r-- | isys/imount.c | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/isys/imount.c b/isys/imount.c index ae47f7c65..4a495ccec 100644 --- a/isys/imount.c +++ b/isys/imount.c @@ -43,19 +43,20 @@ int doPwMount(char *dev, char *where, char *fs, char *options) { } if (strstr(fs, "nfs")) { - if (options) - rc = asprintf(&opts, "%s,nolock", options); - else - opts = strdup("nolock"); - } - else if (options) { - opts = strdup(options); + if (options) + rc = asprintf(&opts, "%s,nolock", options); + else + opts = strdup("nolock"); + device = strdup(dev); + } else { + if (*dev != '/') + rc = asprintf(&device, "/dev/%s", dev); + else + device = strdup(dev); + if (options) + opts = strdup(options); } - if (*dev != '/') - rc = asprintf(&device, "/dev/%s", dev); - else - device = strdup(dev); if (!(child = fork())) { int fd; @@ -63,12 +64,12 @@ int doPwMount(char *dev, char *where, char *fs, char *options) { /* Close off all these filehandles since we don't want errors * spewed to tty1. */ - fd = open("/dev/null", O_RDONLY); + fd = open("/dev/tty5", O_RDONLY); close(STDIN_FILENO); dup2(fd, STDIN_FILENO); close(fd); - fd = open("/dev/null", O_WRONLY); + fd = open("/dev/tty5", O_WRONLY); close(STDOUT_FILENO); dup2(fd, STDOUT_FILENO); close(STDERR_FILENO); |