summaryrefslogtreecommitdiffstats
path: root/collage
diff options
context:
space:
mode:
authorErik Troan <ewt@redhat.com>1999-09-13 23:34:52 +0000
committerErik Troan <ewt@redhat.com>1999-09-13 23:34:52 +0000
commiteecfb4ff0c017c117126064c17350b9703400663 (patch)
treefcdb854eaa2c8245125db88b4855ff418085aab8 /collage
parent9c102ad52ab1c35dc1a5d5dce14c9316b161a3bf (diff)
downloadanaconda-eecfb4ff0c017c117126064c17350b9703400663.tar.gz
anaconda-eecfb4ff0c017c117126064c17350b9703400663.tar.xz
anaconda-eecfb4ff0c017c117126064c17350b9703400663.zip
fixed mount device creation
Diffstat (limited to 'collage')
-rw-r--r--collage/commands.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/collage/commands.c b/collage/commands.c
index f181b9cd3..be94f0788 100644
--- a/collage/commands.c
+++ b/collage/commands.c
@@ -88,7 +88,7 @@ int lsmodCommand(int argc, char ** argv) {
int mountCommand(int argc, char ** argv) {
char * dev, * dir;
- char * fs;
+ char * fs, * buf;
if (argc < 2) {
return catFile("/proc/mounts");
@@ -111,11 +111,15 @@ int mountCommand(int argc, char ** argv) {
fs = argv[2];
dev = argv[3];
dir = argv[4];
-
}
- if (!strncmp(dev, "/dev/", 5) && access(dev, X_OK))
+ if (!strncmp(dev, "/dev/", 5) && access(dev, X_OK)) {
dev += 5;
+ buf = alloca(strlen(dev) + 10);
+ sprintf(buf, "/tmp/%s", dev);
+ devMakeInode(dev, buf);
+ dev = buf;
+ }
if (doPwMount(dev, dir, fs, 0, 1, NULL, NULL))
return 1;