summaryrefslogtreecommitdiff
path: root/tmpfs
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2002-06-25 05:07:25 +0000
committerRoland McGrath <roland@gnu.org>2002-06-25 05:07:25 +0000
commit645e15a460f41b9ff7271588fecfaf60fe9446a2 (patch)
treed72261367b15f18baff9e9dae781853d15affda1 /tmpfs
parentcbdc4eed040054b043548c095f800258217afcf7 (diff)
2002-06-14 Roland McGrath <roland@frob.com>
* tmpfs.c (main): If get_privileged_ports fails with EPERM, try to open /servers/default-pager instead.
Diffstat (limited to 'tmpfs')
-rw-r--r--tmpfs/tmpfs.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/tmpfs/tmpfs.c b/tmpfs/tmpfs.c
index 47ab8a6c..928ebaa4 100644
--- a/tmpfs/tmpfs.c
+++ b/tmpfs/tmpfs.c
@@ -26,6 +26,9 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#include "tmpfs.h"
#include <limits.h>
#include <version.h>
+#include <fcntl.h>
+#include <hurd.h>
+#include <hurd/paths.h>
char *diskfs_server_name = "tmpfs";
char *diskfs_server_version = HURD_VERSION;
@@ -287,7 +290,13 @@ main (int argc, char **argv)
/* Get our port to the default pager. Without that,
we have no place to put file contents. */
err = get_privileged_ports (&host_priv, NULL);
- if (err)
+ if (err == EPERM)
+ {
+ default_pager = file_name_lookup (_SERVERS_DEFPAGER, O_EXEC, 0);
+ if (default_pager == MACH_PORT_NULL)
+ error (0, errno, _SERVERS_DEFPAGER);
+ }
+ else if (err)
error (0, err, "Cannot get host privileged port");
else
{