Skip to contentSkip to conversation

More hostfs breakage

PATCH In review Matt Zimmerman 2 participants 3 messages Jun 5, 2004 – Jun 6, 2004 User-mode Linux (UML)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 More hostfs breakage

Even after applying Henrik's patches, hostfs was still not working for me. I tracked the problem down to this; I'm not exactly sure why it works this way (why does it always try to open the file read/write first?), but this got it working again for me so far.

If this is really the right way to go about this, then it needs to check for other things as well (EROFS?), but it doesn't seem right...

Signature · 1 line
 - mdz
arch/um/fs/hostfs/host_fs.c renamed from arch/um/fs/hostfs/host_fs.c~ +1 -1
@@ -146,7 +146,7 @@
 	    kfree(fh);
 	    return NULL;
 	}
-	if (err == -EPERM)
+	if (err == -EPERM || err == -EACCES)
 	    err = host_open_file(path, 1, 0, fh);
 	if(err)
 		goto out_free;
#1 lore raw

Hmm.. I thought I had the "always one read-write" issue addressed in my patch to only open read-write if the UML application asks for it.. need to investigate.

88e48f4e9b8d763f2d13d7a7974a3663 12-hostfs.patch 50e3b372d77793ed2a8422f75364422f 13-hostfs_access.patch

Note that there has been 2 revisions of the 12-hostfs.patch. The first version did not use correct mode when opening files..

Regards
Henrik

Quoted 9 lines · Matt Zimmerman

Even after applying Henrik's patches, hostfs was still not working for me. I tracked the problem down to this; I'm not exactly sure why it works this way (why does it always try to open the file read/write first?), but this got it working again for me so far.

If this is really the right way to go about this, then it needs to check for other things as well (EROFS?), but it doesn't seem right...

-------------------------------------------------------
This SF.Net email is sponsored by the new InstallShield X. From Windows to Linux, servers to mobile, InstallShield X is the one installation-authoring solution that does it all. Learn more and evaluate today! http://www.installshield.com/Dev2Dev/0504
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

#2 lore raw
Quoted 9 lines · Henrik Nordstrom

Hmm.. I thought I had the "always one read-write" issue addressed in my patch to only open read-write if the UML application asks for it.. need to investigate.

88e48f4e9b8d763f2d13d7a7974a3663 12-hostfs.patch 50e3b372d77793ed2a8422f75364422f 13-hostfs_access.patch

Note that there has been 2 revisions of the 12-hostfs.patch. The first version did not use correct mode when opening files..

88e48f4e9b8d763f2d13d7a7974a3663 mara-12-hostfs.diff 50e3b372d77793ed2a8422f75364422f mara-13-hostfs_access.diff

Signature · 12 lines
 - mdz


-------------------------------------------------------
This SF.Net email is sponsored by the new InstallShield X.
From Windows to Linux, servers to mobile, InstallShield X is the one
installation-authoring solution that does it all. Learn more and
evaluate today! http://www.installshield.com/Dev2Dev/0504
_______________________________________________
User-mode-linux-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel