summaryrefslogtreecommitdiff
path: root/serverboot/def_pager_setup.c
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2010-07-17 16:24:39 +0200
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2011-04-03 15:47:34 +0000
commita8744157214a302d84c8959b1ae99abe3ae2d7d2 (patch)
tree1cfebbd27e311beee3a6a1660ff7d08624ca20d8 /serverboot/def_pager_setup.c
parentbebc64a9a0f064a0e5f8a3549aa01aa9ac79a2e9 (diff)
Remove `serverboot'; fix "make dist" in `mach-defpager'.
* serverboot/default_pager.c, serverboot/kalloc.c, serverboot/queue.h, serverboot/wiring.c, serverboot/wiring.h: Move to `mach-defpager/'. * serverboot/Makefile, serverboot/assert.h, serverboot/bootstrap.c, serverboot/bunzip2.c, serverboot/def_pager_setup.c, serverboot/defs.h, serverboot/dir.h, serverboot/disk_inode.h, serverboot/disk_inode_ffs.h, serverboot/elf-load.c, serverboot/exec.c, serverboot/ext2_file_io.c, serverboot/ffs_compat.c, serverboot/ffs_compat.h, serverboot/ffs_file_io.c, serverboot/file_io.c, serverboot/file_io.h, serverboot/fs.h, serverboot/gets.c, serverboot/gunzip.c, serverboot/load.c, serverboot/mach-exec.h, serverboot/minix_ffs_compat.c, serverboot/minix_ffs_compat.h, serverboot/minix_file_io.c, serverboot/minix_fs.h, serverboot/minix_super.h, serverboot/panic.c, serverboot/strfcns.c: Remove. * mach-defpager/Makefile (LCLHDRS): New variable. (vpath): Remove. (CPPFLAGS): Remove `-I$(srcdir)/../serverboot'. * mach-defpager/setup.c (page_aligned): Make public.
Diffstat (limited to 'serverboot/def_pager_setup.c')
-rw-r--r--serverboot/def_pager_setup.c152
1 files changed, 0 insertions, 152 deletions
diff --git a/serverboot/def_pager_setup.c b/serverboot/def_pager_setup.c
deleted file mode 100644
index 5e2073ec..00000000
--- a/serverboot/def_pager_setup.c
+++ /dev/null
@@ -1,152 +0,0 @@
-/*
- * Mach Operating System
- * Copyright (c) 1992-1989 Carnegie Mellon University
- * All Rights Reserved.
- *
- * Permission to use, copy, modify and distribute this software and its
- * documentation is hereby granted, provided that both the copyright
- * notice and this permission notice appear in all copies of the
- * software, derivative works or modified versions, and any portions
- * thereof, and that both notices appear in supporting documentation.
- *
- * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
- * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
- * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
- *
- * Carnegie Mellon requests users of this software to return to
- *
- * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
- * School of Computer Science
- * Carnegie Mellon University
- * Pittsburgh PA 15213-3890
- *
- * any improvements or extensions that they make and grant Carnegie Mellon
- * the rights to redistribute these changes.
- */
-#include <mach.h>
-#include <mach/mig_errors.h>
-#include <mach/default_pager_types.h>
-
-#include <file_io.h>
-
-extern void *kalloc();
-
-/*
- * Create a paging partition given a file name
- */
-extern void create_paging_partition();
-
-kern_return_t
-add_paging_file(master_device_port, file_name, linux_signature)
- mach_port_t master_device_port;
- char *file_name;
- int linux_signature;
-{
- register struct file_direct *fdp;
- register kern_return_t result;
- struct file pfile;
- boolean_t isa_file;
-
- bzero((char *) &pfile, sizeof(struct file));
-
- result = open_file(master_device_port, file_name, &pfile);
- if (result != KERN_SUCCESS)
- return result;
-
- fdp = (struct file_direct *) kalloc(sizeof *fdp);
- bzero((char *) fdp, sizeof *fdp);
-
- isa_file = file_is_structured(&pfile);
-
- result = open_file_direct(pfile.f_dev, fdp, isa_file);
- if (result)
- panic("Can't open paging file %s: %s\n",
- file_name, strerror (result));
-
- result = add_file_direct(fdp, &pfile);
- if (result)
- panic("Can't read disk addresses: %s\n", strerror (result));
-
- close_file(&pfile);
-
- /*
- * Set up the default paging partition
- */
- create_paging_partition(file_name, fdp, isa_file, linux_signature);
-
- return result;
-}
-
-/*
- * Destroy a paging_partition given a file name
- */
-kern_return_t
-remove_paging_file(file_name)
- char *file_name;
-{
- struct file_direct *fdp = 0;
- kern_return_t kr;
-
- kr = destroy_paging_partition(file_name, &fdp);
- if (kr == KERN_SUCCESS) {
- remove_file_direct(fdp);
- kfree(fdp, sizeof(*fdp));
- }
- return kr;
-}
-
-kern_return_t
-default_pager_paging_storage (mach_port_t pager,
- mach_port_t device,
- recnum_t *runs, mach_msg_type_number_t nrun,
- default_pager_filename_t name,
- boolean_t add)
-{
- return MIG_BAD_ID;
-}
-
-#if 0 /* no longer used */
-/*
- * Set up default pager
- */
-extern char *strbuild();
-
-boolean_t
-default_pager_setup(master_device_port, server_dir_name)
- mach_port_t master_device_port;
- char *server_dir_name;
-{
- register kern_return_t result;
-
- char paging_file_name[MAXPATHLEN+1];
-
- (void) strbuild(paging_file_name,
- server_dir_name,
- "/paging_file",
- (char *)0);
-
- while (TRUE) {
- result = add_paging_file(master_device_port, paging_file_name);
- if (result == KERN_SUCCESS)
- break;
- printf("Can't open paging file %s: %d\n",
- paging_file_name,
- result);
-
- bzero(paging_file_name, sizeof(paging_file_name));
- printf("Paging file name ? ");
- safe_gets(paging_file_name, sizeof(paging_file_name));
-
- if (paging_file_name[0] == 0) {
- printf("*** WARNING: running without paging area!\n");
- return FALSE;
- }
- }
-
- /*
- * Our caller will become the default pager - later
- */
-
- return TRUE;
-}
-#endif