From a8744157214a302d84c8959b1ae99abe3ae2d7d2 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Sat, 17 Jul 2010 16:24:39 +0200 Subject: 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. --- serverboot/def_pager_setup.c | 152 ------------------------------------------- 1 file changed, 152 deletions(-) delete mode 100644 serverboot/def_pager_setup.c (limited to 'serverboot/def_pager_setup.c') 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 -#include -#include - -#include - -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 -- cgit v1.2.3