aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog1769
-rw-r--r--INSTALL-cross3
-rw-r--r--Makeconf22
-rw-r--r--Makefile7
-rw-r--r--auth/ChangeLog217
-rw-r--r--auth/auth.c211
-rw-r--r--benchmarks/ChangeLog20
-rw-r--r--benchmarks/forks.c1
-rw-r--r--boot/ChangeLog893
-rw-r--r--boot/boot.c59
-rw-r--r--bsdfsck/ChangeLog98
-rw-r--r--bsdfsck/fsck.h2
-rw-r--r--bsdfsck/preen.c2
-rw-r--r--bsdfsck/utilities.c2
-rw-r--r--config.make.in2
-rw-r--r--config/ChangeLog210
-rw-r--r--config/ttys6
-rwxr-xr-xconfigure5870
-rw-r--r--configure.in69
-rw-r--r--console-client/ChangeLog327
-rw-r--r--console-client/Makefile47
-rw-r--r--console-client/bdf.c4
-rw-r--r--console-client/bdf.h8
-rw-r--r--console-client/current-vcs.c14
-rw-r--r--console-client/driver.c2
-rw-r--r--console-client/ncursesw.c2
-rw-r--r--console-client/pc-kbd.c6
-rw-r--r--console-client/trans.c14
-rw-r--r--console-client/vga-dynacolor.c2
-rw-r--r--console-client/vga-dynafont.c81
-rw-r--r--console-client/vga-hw.h2
-rw-r--r--console-client/vga-support.c55
-rw-r--r--console-client/vga.c6
-rw-r--r--console/ChangeLog615
-rw-r--r--console/console.c32
-rw-r--r--console/display.c54
-rw-r--r--console/hurd.ti2
-rw-r--r--console/priv.h3
-rw-r--r--daemons/ChangeLog240
-rw-r--r--daemons/Makefile6
-rw-r--r--daemons/getty.c8
-rw-r--r--daemons/lmail.c14
-rw-r--r--daemons/runsystem.sh2
-rw-r--r--daemons/runttys.c2
-rw-r--r--defpager/ChangeLog10
-rw-r--r--doc/ChangeLog141
-rw-r--r--doc/Makefile10
-rw-r--r--doc/hurd.texi78
-rw-r--r--exec/ChangeLog1070
-rw-r--r--exec/Makefile12
-rw-r--r--exec/do-bunzip2.c2
-rw-r--r--exec/elfcore.c18
-rw-r--r--exec/exec.c62
-rw-r--r--exec/hashexec.c8
-rw-r--r--ext2fs/ChangeLog1353
-rw-r--r--ext2fs/balloc.c2
-rw-r--r--ext2fs/dir.c18
-rw-r--r--ext2fs/ext2_fs.h4
-rw-r--r--ext2fs/inode.c47
-rw-r--r--ext2fs/pager.c7
-rw-r--r--ext2fs/storeinfo.c19
-rw-r--r--fatfs/ChangeLog220
-rw-r--r--fatfs/Makefile1
-rw-r--r--fatfs/dir.c19
-rw-r--r--fatfs/fat.h2
-rw-r--r--fatfs/inode.c4
-rw-r--r--fatfs/pager.c2
-rw-r--r--fstests/ChangeLog70
-rw-r--r--ftpfs/ChangeLog265
-rw-r--r--ftpfs/dir.c8
-rw-r--r--ftpfs/ftpfs.c6
-rw-r--r--ftpfs/ftpfs.h4
-rw-r--r--ftpfs/netfs.c14
-rw-r--r--hostmux/ChangeLog106
-rw-r--r--hostmux/leaf.c2
-rw-r--r--hostmux/node.c14
-rw-r--r--hurd/ChangeLog1224
-rw-r--r--hurd/console.h12
-rw-r--r--hurd/hurd_types.h2
-rw-r--r--hurd/iioctl.defs11
-rw-r--r--hurd/io.defs2
-rw-r--r--hurd/pfinet.defs2
-rw-r--r--hurd/process.defs8
-rw-r--r--hurd/process_request.defs6
-rw-r--r--include/ChangeLog16
-rw-r--r--include/Makefile5
-rw-r--r--init/ChangeLog777
-rw-r--r--init/init.c6
-rw-r--r--install-sh671
-rw-r--r--isofs/ChangeLog278
-rw-r--r--isofs/inode.c19
-rw-r--r--isofs/lookup.c4
-rw-r--r--isofs/rr.c2
-rw-r--r--libcons/ChangeLog223
-rw-r--r--libcons/Makefile4
-rw-r--r--libdirmgt/ChangeLog5
-rw-r--r--libdiskfs/ChangeLog4136
-rw-r--r--libdiskfs/boot-start.c8
-rw-r--r--libdiskfs/dir-lookup.c28
-rw-r--r--libdiskfs/dir-rename.c12
-rw-r--r--libdiskfs/dir-renamed.c1
-rw-r--r--libdiskfs/diskfs.h14
-rw-r--r--libdiskfs/file-utimes.c6
-rw-r--r--libdiskfs/fsys-getroot.c3
-rw-r--r--libdiskfs/io-pathconf.c1
-rw-r--r--libdiskfs/io-reauthenticate.c2
-rw-r--r--libdiskfs/lookup.c2
-rw-r--r--libdiskfs/node-times.c44
-rw-r--r--libdiskfs/priv.h6
-rw-r--r--libfshelp/ChangeLog648
-rw-r--r--libfshelp/exec-reauth.c2
-rw-r--r--libfshelp/fshelp.h4
-rw-r--r--libfshelp/perms-access.c2
-rw-r--r--libfshelp/perms-checkdirmod.c2
-rw-r--r--libfshelp/perms-iscontroller.c4
-rw-r--r--libfshelp/touch.c15
-rw-r--r--libftpconn/ChangeLog291
-rw-r--r--libftpconn/fname.c2
-rw-r--r--libftpconn/ftpconn.h4
-rw-r--r--libftpconn/reply.c2
-rw-r--r--libftpconn/unix.c9
-rw-r--r--libhurdbugaddr/ChangeLog21
-rw-r--r--libihash/ChangeLog82
-rw-r--r--libiohelp/ChangeLog146
-rw-r--r--libiohelp/Makefile6
-rw-r--r--libnetfs/ChangeLog752
-rw-r--r--libnetfs/Makefile6
-rw-r--r--libnetfs/file-get-translator.c6
-rw-r--r--libnetfs/io-pathconf.c1
-rw-r--r--libpager/ChangeLog501
-rw-r--r--libpager/data-request.c10
-rw-r--r--libpager/pager.h4
-rw-r--r--libpipe/ChangeLog186
-rw-r--r--libpipe/pipe.h6
-rw-r--r--libpipe/pq.h4
-rw-r--r--libports/ChangeLog581
-rw-r--r--libports/bucket-iterate.c2
-rw-r--r--libports/create-internal.c3
-rw-r--r--libports/manage-multithread.c2
-rw-r--r--libports/manage-one-thread.c2
-rw-r--r--libps/ChangeLog983
-rw-r--r--libps/fmt.c16
-rw-r--r--libps/procstat.c55
-rw-r--r--libps/ps.h24
-rw-r--r--libps/spec.c12
-rw-r--r--libshouldbeinlibc/ChangeLog1398
-rw-r--r--libshouldbeinlibc/cacheq.c2
-rw-r--r--libshouldbeinlibc/idvec-auth.c12
-rw-r--r--libshouldbeinlibc/idvec-verify.c5
-rw-r--r--libshouldbeinlibc/idvec.c2
-rw-r--r--libshouldbeinlibc/idvec.h2
-rw-r--r--libshouldbeinlibc/localhost.c23
-rw-r--r--libshouldbeinlibc/ugids-argp.c45
-rw-r--r--libshouldbeinlibc/ugids.c4
-rw-r--r--libstore/ChangeLog1275
-rw-r--r--libstore/Makefile7
-rw-r--r--libstore/argp.c2
-rw-r--r--libstore/kids.c4
-rw-r--r--libstore/nbd.c4
-rw-r--r--libstore/part.c7
-rw-r--r--libstore/store.h4
-rw-r--r--libthreads/ChangeLog501
-rw-r--r--libthreads/Makefile7
-rw-r--r--libthreads/cthread_internals.h18
-rw-r--r--libthreads/cthreads.h46
-rw-r--r--libthreads/i386/cthreads.h11
-rw-r--r--libthreads/mig_support.c2
-rw-r--r--libtrivfs/ChangeLog1037
-rw-r--r--libtrivfs/Makefile5
-rw-r--r--libtrivfs/file-reparent.c8
-rw-r--r--libtrivfs/times.c10
-rw-r--r--libtrivfs/trivfs.h2
-rw-r--r--login/ChangeLog19
-rw-r--r--login/utmp.c16
-rw-r--r--mach-defpager/ChangeLog64
-rw-r--r--mach-defpager/Makefile6
-rw-r--r--mach-defpager/default_pager.c (renamed from serverboot/default_pager.c)26
-rw-r--r--mach-defpager/kalloc.c (renamed from serverboot/kalloc.c)0
-rw-r--r--mach-defpager/queue.h (renamed from serverboot/queue.h)0
-rw-r--r--mach-defpager/setup.c20
-rw-r--r--mach-defpager/wiring.c (renamed from serverboot/wiring.c)0
-rw-r--r--mach-defpager/wiring.h (renamed from serverboot/wiring.h)0
-rw-r--r--nfs/ChangeLog732
-rw-r--r--nfs/Makefile6
-rw-r--r--nfs/mount.c4
-rw-r--r--nfs/nfs.c41
-rw-r--r--nfs/ops.c13
-rw-r--r--nfs/rpc.c2
-rw-r--r--nfsd/ChangeLog239
-rw-r--r--nfsd/ops.c20
-rw-r--r--nfsd/xdr.c16
-rw-r--r--pfinet/ChangeLog976
-rw-r--r--pfinet/Makefile128
-rw-r--r--pfinet/README6
-rw-r--r--pfinet/config.h4
-rw-r--r--pfinet/ethernet.c22
-rw-r--r--pfinet/glue-include/asm/delay.h1
-rw-r--r--pfinet/glue-include/linux/if.h1
-rw-r--r--pfinet/glue-include/linux/in6.h109
-rw-r--r--pfinet/glue-include/linux/ipv6.h116
-rw-r--r--pfinet/glue-include/linux/sched.h3
-rw-r--r--pfinet/glue-include/linux/socket.h7
-rw-r--r--pfinet/iioctl-ops.c43
-rw-r--r--pfinet/io-ops.c11
-rw-r--r--pfinet/linux-src/arch/sparc/lib/checksum.S2
-rw-r--r--pfinet/linux-src/include/asm-i386/checksum.h6
-rw-r--r--pfinet/linux-src/include/linux/b1lli.h2
-rw-r--r--pfinet/linux-src/include/linux/cdk.h2
-rw-r--r--pfinet/linux-src/include/linux/cdrom.h2
-rw-r--r--pfinet/linux-src/include/linux/coda_opstats.h2
-rw-r--r--pfinet/linux-src/include/linux/cyclades.h4
-rw-r--r--pfinet/linux-src/include/linux/isdn.h4
-rw-r--r--pfinet/linux-src/include/linux/isdn_ppp.h2
-rw-r--r--pfinet/linux-src/include/linux/isdnif.h4
-rw-r--r--pfinet/linux-src/include/linux/ixjuser.h4
-rw-r--r--pfinet/linux-src/include/linux/loop.h2
-rw-r--r--pfinet/linux-src/include/linux/module.h2
-rw-r--r--pfinet/linux-src/include/linux/notifier.h2
-rw-r--r--pfinet/linux-src/include/linux/poll.h2
-rw-r--r--pfinet/linux-src/include/linux/rtnetlink.h2
-rw-r--r--pfinet/linux-src/include/linux/socket.h2
-rw-r--r--pfinet/linux-src/include/linux/soundcard.h2
-rw-r--r--pfinet/linux-src/include/linux/telephony.h4
-rw-r--r--pfinet/linux-src/include/linux/tpqic02.h6
-rw-r--r--pfinet/linux-src/include/linux/tty_ldisc.h2
-rw-r--r--pfinet/linux-src/include/linux/wavefront.h2
-rw-r--r--pfinet/linux-src/include/linux/wireless.h2
-rw-r--r--pfinet/linux-src/include/net/pkt_sched.h2
-rw-r--r--pfinet/linux-src/include/net/tcp.h6
-rw-r--r--pfinet/linux-src/net/core/dev.c2
-rw-r--r--pfinet/linux-src/net/core/sock.c4
-rw-r--r--pfinet/linux-src/net/ipv4/fib_semantics.c2
-rw-r--r--pfinet/linux-src/net/ipv4/icmp.c2
-rw-r--r--pfinet/linux-src/net/ipv4/ip_fw.c2
-rw-r--r--pfinet/linux-src/net/ipv4/ip_gre.c2
-rw-r--r--pfinet/linux-src/net/ipv4/ip_masq_quake.c4
-rw-r--r--pfinet/linux-src/net/ipv4/ip_options.c9
-rw-r--r--pfinet/linux-src/net/ipv4/ip_output.c2
-rw-r--r--pfinet/linux-src/net/ipv4/ipconfig.c2
-rw-r--r--pfinet/linux-src/net/ipv4/ipip.c2
-rw-r--r--pfinet/linux-src/net/ipv4/raw.c2
-rw-r--r--pfinet/linux-src/net/ipv4/tcp.c2
-rw-r--r--pfinet/linux-src/net/ipv4/tcp_input.c8
-rw-r--r--pfinet/linux-src/net/ipv4/tcp_ipv4.c4
-rw-r--r--pfinet/linux-src/net/ipv4/tcp_output.c2
-rw-r--r--pfinet/linux-src/net/ipv6/addrconf.c1964
-rw-r--r--pfinet/linux-src/net/ipv6/af_inet6.c642
-rw-r--r--pfinet/linux-src/net/ipv6/datagram_ipv6.c434
-rw-r--r--pfinet/linux-src/net/ipv6/exthdrs.c771
-rw-r--r--pfinet/linux-src/net/ipv6/icmpv6.c676
-rw-r--r--pfinet/linux-src/net/ipv6/ip6_fib.c1205
-rw-r--r--pfinet/linux-src/net/ipv6/ip6_flowlabel.c627
-rw-r--r--pfinet/linux-src/net/ipv6/ip6_input.c284
-rw-r--r--pfinet/linux-src/net/ipv6/ip6_output.c720
-rw-r--r--pfinet/linux-src/net/ipv6/ipv6_sockglue.c439
-rw-r--r--pfinet/linux-src/net/ipv6/mcast.c711
-rw-r--r--pfinet/linux-src/net/ipv6/ndisc.c1217
-rw-r--r--pfinet/linux-src/net/ipv6/protocol_ipv6.c117
-rw-r--r--pfinet/linux-src/net/ipv6/raw_ipv6.c691
-rw-r--r--pfinet/linux-src/net/ipv6/reassembly.c492
-rw-r--r--pfinet/linux-src/net/ipv6/route_ipv6.c1974
-rw-r--r--pfinet/linux-src/net/ipv6/tcp_ipv6.c1767
-rw-r--r--pfinet/linux-src/net/ipv6/udp_ipv6.c967
-rw-r--r--pfinet/main.c176
-rw-r--r--pfinet/misc.c2
-rw-r--r--pfinet/options.c232
-rw-r--r--pfinet/pfinet-ops.c2
-rw-r--r--pfinet/pfinet.h23
-rw-r--r--pfinet/sched.c8
-rw-r--r--pfinet/socket-ops.c16
-rw-r--r--pflocal/ChangeLog378
-rw-r--r--pflocal/io.c14
-rw-r--r--pflocal/pf.c5
-rw-r--r--pflocal/socket.c59
-rw-r--r--proc/ChangeLog1314
-rw-r--r--proc/host.c3
-rw-r--r--proc/info.c44
-rw-r--r--proc/mgt.c2
-rw-r--r--proc/notify.c5
-rw-r--r--release/ChangeLog298
-rw-r--r--release/SOURCES.0.02
-rw-r--r--release/mkfsimage.sh6
-rw-r--r--release/servers.boot6
-rw-r--r--serverboot/ChangeLog473
-rw-r--r--serverboot/Makefile53
-rw-r--r--serverboot/assert.h50
-rw-r--r--serverboot/bootstrap.c438
-rw-r--r--serverboot/bunzip2.c169
-rw-r--r--serverboot/def_pager_setup.c152
-rw-r--r--serverboot/defs.h95
-rw-r--r--serverboot/dir.h142
-rw-r--r--serverboot/disk_inode.h101
-rw-r--r--serverboot/disk_inode_ffs.h99
-rw-r--r--serverboot/elf-load.c143
-rw-r--r--serverboot/exec.c147
-rw-r--r--serverboot/ext2_file_io.c983
-rw-r--r--serverboot/ffs_compat.c65
-rw-r--r--serverboot/ffs_compat.h54
-rw-r--r--serverboot/ffs_file_io.c969
-rw-r--r--serverboot/file_io.c317
-rw-r--r--serverboot/file_io.h200
-rw-r--r--serverboot/fs.h455
-rw-r--r--serverboot/gets.c90
-rw-r--r--serverboot/gunzip.c188
-rw-r--r--serverboot/load.c555
-rw-r--r--serverboot/mach-exec.h130
-rw-r--r--serverboot/minix_ffs_compat.c62
-rw-r--r--serverboot/minix_ffs_compat.h43
-rw-r--r--serverboot/minix_file_io.c851
-rw-r--r--serverboot/minix_fs.h107
-rw-r--r--serverboot/minix_super.h49
-rw-r--r--serverboot/panic.c58
-rw-r--r--serverboot/strfcns.c74
-rw-r--r--storeio/ChangeLog348
-rw-r--r--storeio/dev.c33
-rw-r--r--storeio/pager.c4
-rw-r--r--sutils/ChangeLog460
-rw-r--r--sutils/MAKEDEV.sh10
-rw-r--r--sutils/Makefile4
-rw-r--r--sutils/clookup.c2
-rw-r--r--sutils/fsck.c2
-rw-r--r--sutils/fstab.c26
-rw-r--r--tasks2
-rw-r--r--term/ChangeLog1023
-rw-r--r--term/main.c2
-rw-r--r--term/munge.c4
-rw-r--r--tmpfs/ChangeLog172
-rw-r--r--tmpfs/dir.c5
-rw-r--r--tmpfs/node.c23
-rw-r--r--tmpfs/pager-stubs.c4
-rw-r--r--tmpfs/tmpfs.c6
-rw-r--r--tmpfs/tmpfs.h3
-rw-r--r--trans/ChangeLog997
-rw-r--r--trans/Makefile7
-rw-r--r--trans/fakeroot.c20
-rw-r--r--ufs-fsck/ChangeLog326
-rw-r--r--ufs-fsck/utilities.c2
-rw-r--r--ufs-utils/ChangeLog163
-rw-r--r--ufs-utils/Makefile3
-rw-r--r--ufs/ChangeLog2001
-rw-r--r--ufs/alloc.c6
-rw-r--r--ufs/dir.c21
-rw-r--r--ufs/inode.c45
-rw-r--r--usermux/ChangeLog61
-rw-r--r--usermux/mux.c15
-rw-r--r--usermux/node.c14
-rw-r--r--utils/ChangeLog2180
-rw-r--r--utils/devprobe.c2
-rw-r--r--utils/ftpcp.c2
-rw-r--r--utils/ftpdir.c2
-rw-r--r--utils/login.c15
-rw-r--r--utils/mount.c4
-rw-r--r--utils/ps.c40
-rw-r--r--utils/rpctrace.c23
-rw-r--r--utils/settrans.c4
-rw-r--r--utils/shd.c2
-rw-r--r--utils/storeinfo.c4
-rw-r--r--utils/vmstat.c4
-rw-r--r--utils/w.c2
359 files changed, 22185 insertions, 45280 deletions
diff --git a/ChangeLog b/ChangeLog
index 97d1612f..053477ac 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,1707 +1,62 @@
-2007-04-07 Thomas Schwinge <tschwinge@gnu.org>
-
- * INSTALL-cross: Link to the `cross-gnu' script.
-
-2006-12-03 Thomas Schwinge <tschwinge@gnu.org>
-
- [bug #17121 --- ``GNU Hurd debian dir'']
- * debian/ChangeLog: Remove file.
- * Makefile (other-subdirs): Remove `debian'.
-
-2006-07-24 Thomas Schwinge <tschwinge@gnu.org>
-
- [bug #17127]
- * Makeconf (clean): Don't remove `*.*_d' files.
- (%.sdefsi): Add `%.sdefs.d' to the target list. Create these files by
- specifying `-MD' as a flag for CPP and mangle the output as needed.
- Include these `*.sdefs.d' files instead of `*.migs_d' and `*.migsh_d'
- files.
- (%.udefsi): Likewise for `%.udefs.d' / `*.migu_d' and `*.miguh_d'.
- (%.migs_d, %.migu_d, %.migsh_d, %.miguh_d): Remove targets.
-
-2006-03-21 Leonardo Lopes Pereira <leonardolopespereira@gmail.com>
-
- [patch #4984]
- * Makeconf (mach_defs_names): Remove `mach_norma' and `norma_task'.
-
-2006-01-26 Thomas Schwinge <tschwinge@gnu.org>
-
- * config.guess: Updated from the canonical source.
- * config.sub: Likewise.
-
-2005-04-07 Alfred M. Szmidt <ams@gnu.org>
-
- * configure.in: Error out if MiG couldn't be found.
- * configure: Regenerated.
-
-2004-09-29 Alfred M. Szmidt <ams@kemisten.nu>
-
- * config.make.in (datadir): New variable.
-
-2004-09-10 Roland McGrath <roland@frob.com>
-
- * Makefile (lib-subdirs): Remove bogon in last checkin.
-
-2004-09-09 Roland McGrath <roland@frob.com>
-
- * Makefile (prog-subdirs): Remove serverboot.
-
-2004-03-14 Marcus Brinkmann <marcus@gnu.org>
-
- * README.CVS: New file.
-
-2004-01-26 Jeff Bailey <jbailey@nisa.net>
-
- * config.make.in (hurddir): Use ${exec_prefix} instead of
- $(exec_prefix)
- (bootdir): Likewise
- (libdir): Get definition from autoconf
- (bindir): Likewise
- (sbindir): Likewise
- (includedir): Likewise
- (libexecdir): Likewise
- (infodir): Likewise
- (sysconfdir): Likewise
- (localstatedir): Likewise
- (sharedstatedir): Likewise
-
-2003-11-05 Jeff Bailey <jbailey@nisa.net>
-
- * config.sub: Update.
- * config.guess: Update.
-
-2003-10-09 Alfred M. Szmidt <ams@kemisten.nu>
-
- * Makeconf (TAGS): Add a space between the function `strip' and
- its argument.
-
-2003-02-15 Roland McGrath <roland@frob.com>
-
- * configure: New generated file, now in the repository.
-
-2002-10-23 Jeff Bailey <jbailey@gnu.org>
-
- Update for Autoconf 2.54.
- * configure.in: Replace AC_FD_CC with AS_MESSAGE_LOG_FD.
- (AC_PREREQ): Require Autoconf 2.54.
- (AC_INIT): Update to no arguments syntax. Call AC_CONFIG_SRCDIR.
- (AC_OUTPUT): Update to no arguments syntax. Call AC_CONFIG_FILES.
- (AC_CHECK_TOOL, hurd_PROG_CC): Replace with ...
- (AC_PROG_CC): ... this.
- * aclocal.m4: Replace AC_FD_CC with AS_MESSAGE_LOG_FD.
- (hurd_PROG_CC, hurd_PROG_CC_WORKS): Removed.
-
-2002-12-03 Marcus Brinkmann <marcus@gnu.org>
-
- * Makefile (prog-subdirs): Add fatfs.
-
-2002-10-12 Neal H. Walfield <neal@cs.uml.edu>
-
- * Makefile (lib-subdirs): Add libpthread.
-
-2002-09-17 Marcus Brinkmann <marcus@gnu.org>
-
- * Makeconf (CPPFLAGS): Move -std=gnu99 option to ...
- (CFLAGS): ... here.
-
- * Makefile (prog-subdirs): Add console-client.
-
-2002-09-05 Roland McGrath <roland@frob.com>
-
- * Makeconf (CPPFLAGS): Add -std=gnu99 option.
-
-2002-08-26 Roland McGrath <roland@frob.com>
-
- * configure.in: Check for uselocale function.
-
-2002-08-22 Marcus Brinkmann <marcus@gnu.org>
-
- * aclocal.m4 (hurd_LIB_NCURSESW): New test, modified from GNU
- inetutils 1.4.0.
- * configure.in: Use hurd_LIB_NCURSESW.
- * config.make.in (LIBNCURSESW): New variable, substituted by
- configure.
- (NCURSESW_INCLUDE): Likewise.
- * Makefile (lib-subdirs): Add libcons.
- (prog-subdirs): Add console.
-
-2002-06-14 Roland McGrath <roland@frob.com>
-
- * Makeconf (cleantarg): Add $(libname).so.$(hurd-version).
-
- * Makeconf ($(patsubst %.o,%.d,$(filter %.o,$(OBJS)))): Give these dep
- files a dependency on $(INSTALLED_LOCAL_HEADERS).
-
-2002-06-13 Roland McGrath <roland@frob.com>
-
- * Makeconf (%_S.h %Server.c): Prepend $(mig-sheader-prefix)
- to stub header file name.
- (INSTALLED_LOCAL_HEADERS): Put them in the build directory,
- not the source. Make files with #include rather than symlinks.
- (../$(dir)/%: %): New dummy pattern rule.
- (INCLUDES): New variable broken out of CPPFLAGS. Add -I$(..)include.
- Include ..-relative dirs only if [$(dir) != .].
- (CPPFLAGS): Use that.
-
-2002-06-11 Roland McGrath <roland@frob.com>
-
- * Makeconf (CPPFLAGS): Add -D_FILE_OFFSET_BITS=64.
- (hurd-version): Update to 0.3 so as to change sonames.
-
-2002-05-16 Roland McGrath <roland@frob.com>
-
- * configure.in (asm_syntax): Add patterns for all the flavors we have
- pfinet/linux-src/include/asm-* directories for: arm, m68k, mips,
- sparc, sparc64.
-
-2002-05-13 Marcus Brinkmann <marcus@gnu.org>
-
- * version.h.in (STANDARD_HURD_VERSION): Remove EXTRA argument,
- because cpp 3.0 is not removing any token before ##args that is
- not a single comma, in order to be more C99 compliant.
- (_SHV_SEP): Removed.
- (STANDARD_HURD_VERSION_EXTRA): New macro that does the job of the
- old macro with an extra argument.
-
-2002-04-27 Roland McGrath <roland@frob.com>
-
- * configure.in: Match $host_cpu of powerpc*, not just powerpc.
- Match $host_cpu of alpha* to set asm_syntax=alpha.
-
-2002-03-21 Roland McGrath <roland@frob.com>
-
- * Makeconf ($(libname).so.$(hurd-version)): Reorder link arguments so
- that .map files come after the -( ... -) group.
-
-2002-03-15 Roland McGrath <roland@frob.com>
-
- * configure.in: Remove the checks for libparted.
- Instead, check just for a static -lstore_part library and do
- that only if no --enable-boot-store-types option was given.
-
- * configure.in (boot_store_types): Add remap to the default list.
-
-2002-03-11 Roland McGrath <roland@frob.com>
-
- * Makeconf ($(libname).so.$(hurd-version)):
- Include $($(libname).so-LDLIBS) and $(LDLIBS) in the link.
-
- * configure.in (--enable-boot-store-types): Grok this arg.
- * config.make.in (boot-store-types): New variable, set by it.
- * Makeconf [$(dir) != libstore]
- ($(boot-store-types:%=../libstore/libstore_%.a)): Make these targets
- depend on ../libstore/libstore.so.
-
-2002-02-10 Marcus Brinkmann <marcus@gnu.org>
-
- * INSTALL: Change install-hdrs to install-headers. Reported by
- Vicente Hernando Ara <bizenton@terra.es>.
-
-2002-01-05 Roland McGrath <roland@frob.com>
-
- * aclocal.m4 (hurd_MIG_RETCODE): New macro.
- * configure.in: Broken out of here, now use that.
-
-2002-01-01 Roland McGrath <roland@frob.com>
-
- * configure.in: If mig supports `retcode', define HAVE_MIG_RETCODE.
-
-2001-12-31 Roland McGrath <roland@frob.com>
-
- * configure.in: Check mig for `retcode' keyword support.
- If not there, add -DRetCode=NoLong.
-
-2001-11-15 Neal H Walfield <neal@cs.uml.edu>
-
- * Makeconf (TAGS) [configured]: Create tags for MiG generated files.
- * Makefile (TAGS): Generate dependencies respecting broken
- code markers, i.e. based on $(working-prog-subdirs) and not
- $(prog-subdirs).
-
-2001-12-22 Roland McGrath <roland@frob.com>
-
- * configure.in (asm_syntax): Grok "powerpc" value for $host_cpu.
- Default asm_syntax to $host_cpu if not a known type.
- Complain about unsupported CPU iff libthreads/$asm_syntax/cthreads.h
- is missing; make that complaint a warning rather than fatal error.
-
- * Makeconf (MIGCOMFLAGS): New variable, set -subrprefix __ here.
- (%_S.h %Server.c rule, %_U.h %User.c rule): Pass that to $(MIGCOM).
-
-2001-11-24 Roland McGrath <roland@frob.com>
-
- * config.make.in (bootdir): New variable, set to $(exec_prefix)/boot.
- (installationdirlist): Add $(bootdir) to the list.
- From Alfred M. Szmidt <ams@kemisten.nu>.
-
-2001-11-15 Roland McGrath <roland@frob.com>
-
- * Makeconf: Typo fix in last change.
-
-2001-11-14 Roland McGrath <roland@frob.com>
-
- * Makeconf: Include config.make only if it exists.
- (configured): Set this if we included config.make.
- [! configured]: Set no_deps=t.
-
-2001-10-12 Marcus Brinkmann <marcus@gnu.org>
-
- * configure.in: If parted/parted.h is found, define
- HAVE_PARTED_PARTED_H explicitely.
-
-2001-08-25 Roland McGrath <roland@frob.com>
-
- * configure.in: Add a check for Parted's libraries.
- (PARTED_LIBS): New variable, substitute it.
-
-2001-08-24 Roland McGrath <roland@frob.com>
-
- * config.make.in (PARTED_LIBS): New variable, substituted by configure.
-
- * Makeconf ($(libname).so.$(hurd-version)): Replace $($@-LDFLAGS)
- with $($(libname).so-LDFLAGS).
-
-2001-08-23 Roland McGrath <roland@frob.com>
-
- * Makeconf (CPPFLAGS); Add -D_IO_MTSAFE_IO.
-
-2001-08-20 Roland McGrath <roland@frob.com>
-
- * hurd.boot: Change --bootflags to --multiboot-command-line.
-
-2001-06-24 Mark Kettenis <kettenis@gnu.org>
-
- * configure.in: Add check for getgrouplist.
-
-2001-06-15 Roland McGrath <roland@frob.com>
-
- * Makeconf (CPPFLAGS, CFLAGS): Append to these before we include the
- config.make file.
-
-2001-03-11 Roland McGrath <roland@frob.com>
-
- * Makeconf (%_S.h %Server.c): Split out an intermediate rule for the
- cpp stage ...
- (%.sdefsi: %.defs): ... into this rule.
- (%_U.h %User.c): Likewise split ...
- (%.udefsi: %.defs): ... into this rule.
- (clean): Remove *.[su]defsi too.
-
-2000-12-28 Roland McGrath <roland@frob.com>
-
- * Makeconf (mach_defs_names): Remove default_pager (replaced by our
- own in hurd) and default_pager_helper (never used).
-
-2001-02-02 Roland McGrath <roland@frob.com>
-
- * Makefile (prog-subdirs): Add tmpfs.
-
-2000-05-20 Mark Kettenis <kettenis@gnu.org>
-
- * configure.in: Add check for libio. Only enable versioning if we
- found libio.
-
-2000-03-27 Roland McGrath <roland@baalperazim.frob.com>
-
- * configure.in (VERSIONING): New check for ld --version-script.
- * config.make.in (VERSIONING): New variable, set by configure.
-
-1999-12-14 Roland McGrath <roland@baalperazim.frob.com>
-
- * mkbootfs: Removed directory and all files.
- They have long been obsolete.
-
-1999-11-18 Roland McGrath <roland@baalperazim.frob.com>
-
- * mach-defpager: New directory. See its ChangeLog.
- Makefile (prog-subdirs): Add mach-defpager.
-
-1999-10-03 Roland McGrath <roland@baalperazim.frob.com>
-
- * Makeconf [$(makemode) = misc]: If no installationdir and no targets,
- set makemode-instdir so it's not empty, to avoid expanding `$(dir)'.
-
-1999-10-01 Roland McGrath <roland@baalperazim.frob.com>
-
- * Makeconf [Decode makemode page]: Clean up variable usage in each
- cases, as follows:
- (installationdir): Don't test and set this directly.
- (makemode-instdir): New variable, set instead for each makemode.
- (linktarg): Don't this for each program-linking makemode.
- (targets): Make sure this is always set, i.e. = $(target) in singular
- modes.
- [$(makemode) != library] (progtarg): New variable.
- [$(makemode) != library] (linktarg): Set from $(progtarg), including
- .static versions.
- (installationdir): Test and default once, using $(makemode-instdir).
- [linking and dep rules]: Use $(linktarg) and $(progtarg) as
- appropriate instead of $(targets) or $(target).
-
-1999-09-19 Roland McGrath <roland@baalperazim.frob.com>
-
- * configure.in (enable_static_progs): Move sed translation of commas
- to spaces out of case stmt, so it applies to default too.
-
-1999-09-18 Roland McGrath <roland@baalperazim.frob.com>
-
- * Makeconf [$(makemode) != misc]: Use this to protect linking rules,
- so we don't define any rule for $(targets) if $(makemode) is misc.
-
- * Makefile: Revert last change; it is definitely wrong, and there is
- no verified bug that needs to be fixed at all.
-
-1999-09-17 Thomas Bushnell, BSG <tb@mit.edu>
-
- * Makeconf [Installation section]: Last change (9 Sep 1999) broke
- this. Separate more clearly the library and non-library install
- rules.
-
- * Makefile ($(prog-subdirs) $(lib-subdirs), %-lndist, %-clean,
- %-relink, %-objs, %-install, %-install-headers, %-TAGS, %.d): Pass
- -e to sub-make, so that explicit prefix= args (etc.) get passed
- down correctly.
-
-1999-09-09 Roland McGrath <roland@baalperazim.frob.com>
-
- * Makeconf (link-executable): New variable, partial linking
- commands for executables.
- ($(target)): Use it. Move .o's before -Wl,-(, just cause.
- ($(addsuffix .static,$(target))): New static pattern rule,
- use `$(link-executable) -static' and static hurd libs.
- [$(doinst) = one]: Give deps to $(target).static too.
- {"Decode makemode" page}: Set linktarg instead of cleantarg for each
- makemode that sets only one.
- [$(makemode) != library]: Append $(linktarg:=.static) to linktarg.
- [$(cleantarg) empty]: Set cleantarg to $(linktarg).
- [Installation section] (targets): Set to $(target) if empty.
- (installable): New variable, union of $(linktarg) and $(targets).
- Remove conditionals on $(doinst), leaving only multi-target version.
- Use $(installable) rather than $(targets) to compute list of
- targets for static pattern rule that does the install.
- (install-targets): New variable, $(targets) plus subset of $(linktarg)
- matching $(build-static:=.static).
- (all): Depend on $(install-targets) rather than $(targets).
- (install): Likewise for computed list of targets in $(installationdir).
- * config.make.in (build-static): New variable.
- * configure.in: Support --enable-static-progs=LIST.
-
-1999-09-12 Thomas Bushnell, BSG <tb@mit.edu>
-
- * libmom: Remove directory and contents.
- * Makefile (lib-subdirs): Remove `libmom'.
-
-1999-09-08 Thomas Bushnell, BSG <tb@mit.edu>
-
- * Makeconf (cleantarg): Add `$(libname)_pic.a'.
- [$(makemode) = library] (targets): Likewise.
- ($(libname)_pic.a): New rule.
- ($(libdir)/$(libname)_pic.a): Extended from the previous _p.a and
- .a rules.
- Submitted by Marcus Brinkmann (Marcus.Brinkmann@ruhr-uni-bochum.de).
-
-1999-06-19 Roland McGrath <roland@baalperazim.frob.com>
-
- * Makefile (DIST_FILES): Add move-if-change.
-
-1999-06-17 Roland McGrath <roland@baalperazim.frob.com>
-
- * move-if-change: New file, canonical GNU script.
-
-1999-03-23 Roland McGrath <roland@baalperazim.frob.com>
-
- * Makeconf [$(makemode) = library]
- (linktarg): Append .$(hurd-version).
- (cleantarg): Add $(linktarg) here.
-
-1999-03-17 Gordon Matzigkeit <gord@trick.fig.org>
-
- * Makefile (other-subdirs): Add the debian directory.
-
-1999-02-16 Roland McGrath <roland@baalperazim.frob.com>
-
- * Makeconf (install): Fix typo in Thomas's last change.
- ($(libdir)/$(libname).so): Depend on ....so.$(hurd-version).
-
- * Makeconf ($(libname).so): Make it a symlink to
- $(libname).so.$(hurd-version).
- ($(libname).so.$(hurd-version)): New target, renamed from
- $(libname).so; link the actual shared object with this name.
-
-Tue Feb 16 02:31:06 1999 Thomas Bushnell, BSG <tb@mit.edu>
-
- * Makeconf ($(libname).so): Include $(hurd-version) as part of the
- soname.
- ($(libdir)/$(libname).so.$(hurd-version)): New rule.
- ($(libdir)/$(libname).so): Only create a symlink to the
- version-numbered name.
- (install) [makemode == library]: Add
- the versioned name $(libdir)/$(libname.so).$(hurd-version).
-
- * version.h.in: New file.
- * versioh.h, sh-version.sed: Deleted files.
- * Makeconf (hurd-version): New variable.
- * Makefile ($(subdirs)): Depend on version.h.
- (version.h): New rule.
- (DIST_FILES): Delete version.h and sh-version.sed. Add version.h.in.
-
-1999-01-24 Roland McGrath <roland@baalperazim.frob.com>
-
- * configure.in: Add AC_PROG_AWK.
- * config.make.in (AWK): New variable, substituted by configure.
-
-1998-12-27 Roland McGrath <roland@baalperazim.frob.com>
-
- * Makefile (prog-subdirs): Reordered with vague topical grouping.
-
-1998-11-29 Roland McGrath <roland@baalperazim.frob.com>
-
- * Makeconf ($(libdir) installation rules): Use automatic variables.
- Use a static pattern rule for foo.a and foo_p.a, treated the same.
-
-1998-10-20 Roland McGrath <roland@baalperazim.frob.com>
-
- * Makefile (TAGS): Create a TAGS file that specifies the subdir TAGS
- files as includes.
-
- * Makeconf (TAGS): Make rules cope with having no source files to tag.
-
-1998-09-04 Roland McGrath <roland@baalperazim.frob.com>
-
- * Makeconf (objs): Don't build PIC objects unless $(makemode) library.
-
- * Makeconf (objs): New target, just compile w/o ar or ld.
- (OBJS): Remove bogus `%.o' default defn.
-
- * Makefile (objs, %-objs): New subdir target.
-
-1998-08-12 Roland McGrath <roland@baalperazim.frob.com>
-
- * aclocal.m4 (AC_PROG_CC_LOCAL): Renamed to hurd_PROG_CC.
- (AC_PROG_CC_WORKS_LOCAL): Renamed to hurd_PROG_CC_WORKS.
- * configure.in: Use hurd_PROG_CC instead of AC_PROG_CC_LOCAL.
- (AC_PREREQ): Require 2.12.
- (AC_CANONICAL_HOST): Give helpful error messages for likely cases of
- bogus host specs.
- (crypt check): Don't do AC_CHECK_FUNCS to get HAVE_CRYPT,
- just check for -lcrypt to set $LIBCRYPT.
-
-1998-07-20 Roland McGrath <roland@baalperazim.frob.com>
-
- * configure.in: Grok --{en,dis}able-profile, default enable.
- * config.make.in (build-profiled): New variable, from @enable_profile@.
- * Makeconf (no_prof): Set to t if $(build-profiled) is not no.
-
- * Makeconf: Inhibit $(target).prof_d include if no_prof=t.
-
-Tue Jul 7 11:39:08 1998 Thomas Bushnell, n/BSG <tb@mit.edu>
-
- * Makeconf (CPPFLAGS): Include $($*-CPPFLAGS). Reported by Gordon
- Matzigkeit (gord@gnu.org).
-
- * INSTALL-cross: Updated by Gordon Matzigkeit (gord@gnu.org).
-
-1998-04-02 Gordon Matzigkeit <gord@profitpress.com>
-
- * Makefile (srcdir): Don't set srcdir, since this is either done
- in the generated Makefile or in Makeconf. Just include ./Makeconf
- directly.
-
- * configure.in (makefiles): Check for $ac_unique_file, rather than
- doing string comparisons to determine if we are configured in the
- source directory. This works for silly things like `srcdir=./.'.
-
-1997-08-06 Miles Bader <miles@gnu.ai.mit.edu>
-
- * Makefile (prog-subdirs): Add ftpfs.
-
-1997-07-23 Miles Bader <miles@gnu.ai.mit.edu>
-
- * usermux: New directory.
- * Makefile (prog-subdirs): Add usermux.
-
-Mon Jul 21 16:18:50 1997 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * Makeconf (linking .prof executable): Don't mutate library names
- here.
- (making %.prof_d special target): Mutate library names here.
- (%.prof_d): Depend on Makefile in srcdir.
-
-Fri Jul 18 16:37:22 1997 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * isofs: New directory.
- * Makefile (prog-subdirs): Add isofs.
-
-Thu Jul 10 14:10:32 1997 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * Makeconf ($(makemode) == library): If $(no_prof) is `t', then
- don't build _p.a versions of libraries.
-
-1997-06-19 Miles Bader <miles@gnu.ai.mit.edu>
-
- * hostmux: New directory.
- * Makefile (prog-subdirs): Add hostmux.
-
-1997-06-18 Miles Bader <miles@gnu.ai.mit.edu>
-
- * Makefile (version): Use a four-digit year.
- (dist): Always generate distributes of the form
- `hurd-${version}.tar.gz'.
-
-Thu Jun 12 18:58:41 1997 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * Released version 0.2.
-
-1997-06-10 Miles Bader <miles@gnu.ai.mit.edu>
-
- * Makefile (DIST_FILES): Remove SETUP.
- * SETUP: File removed.
-
-Mon Jun 9 12:27:40 1997 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * version.h (HURD_VERSION): Update version number to 0.2.
- * sh-version.sed: Likewise.
- * README: Likewise.
- * INSTALL: Likewise.
-
-Thu Jun 5 14:20:56 1997 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * Makefile: Don't include directory .d files if no_deps is t.
- (prog-subdirs): Omit ftpfs.
-
-Fri May 23 10:06:34 1997 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * configure.in: Use AC_PROG_CC_LOCAL instead of AC_PROG_CC.
- * aclocal.m4: New file.
- * Makefile (DIST_FILES): Add aclocal.m4.
- (Patch from Marcus G. Daniels, marcus@cathcart.sysc.pdx.edu).
-
-Wed May 7 12:28:58 1997 Miles Bader <miles@gnu.ai.mit.edu>
-
- * libftpconn, ftpfs: New directories.
- * Makefile (lib-subdirs): Add libftpconn.
- (prog-subdirs): Add ftpfs.
-
-Mon Mar 10 17:07:11 1997 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * Makefile (prog-subdirs): Add `serverboot'.
- * serverboot: New directory.
-
-Fri Oct 25 20:17:47 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * Makeconf (%.prof_d): Don't set no-deps.
- (.prof_d inclusion): Don't do it if prof-depend=t.
-
-Wed Oct 23 01:36:35 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * Makeconf ($(target)): Repair rule for building of .prof_d
- files.
- ($(target), $(target).prof): Refer to generated variables
- (-CFLAGS, -LFLAGS, -LDLIBS) by the base name ($*) not $@.
- (_libext): Likewise.
-
-Mon Oct 21 22:22:49 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * Makeconf (cleantarg) [makemode == library]: Add $(libname)_p.a.
- (targets) [makemode == library]: Include $(libname)_p.a in default
- value.
- ($(libdir)/$(libname)_p.a) [makemode == library]: New rule.
- ($(libname)_p.a) [makemode == library]: New rule.
- (%_p.o): Two new rules (depend on %.c or %.S).
- (make_deps): Make dependency now specify $*_p.o too.
- ($(addsuffix .prof,$(target))): New rule to link profiled objects.
- ($(target)): Surround usual build rule with if prof-depend == nil.
- ($(addsuffix .prof_d, $(target))): Include this if not a library.
- Also a new rule to build them.
- ($(target)) [prof-depend == t]: Kludge to write out its dependencies.
-
-Tue Oct 15 12:29:26 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * Makeconf (relink): Remove $(linktarg) always.
- (linktarg) [makemode == library]: Set variable.
- (linktarg): And also a default.
- * Makefile (%-relink): Set no_deps=t here.
- (relink): Do $(lib-subdirs) too.
-
-Tue Oct 8 22:39:12 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * Makeconf ($(includedir)/$(installhdrsubdir),
- $(installationdirlist)): Suppress command echo (when mkinstalldirs
- actually does something, it prints the resulting commands itself).
-
-Fri Oct 4 17:52:54 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * Makeconf ($(..)$(dir).d): Always include libhurdbugaddr in the
- list for non-libraries.
-
-Thu Sep 26 15:43:18 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * Makeconf (%: %.sh): New rule.
-
-Tue Sep 24 21:43:57 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * configure.in: Add check for crypt function.
-
-Mon Sep 23 00:10:52 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * sh-version.sed: Change to use new version format.
-
- * configure.in: Check for libcrypt.
- * config.make.in (LIBCRYPT): New variable.
-
-Wed Sep 18 16:26:06 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * version.h (STANDARD_HURD_VERSION): Change to use new format.
- Add EXTRA tail arg.
- (_SHV_SEP): New macro.
-
- * Makefile (prog-subdirs): Remove devio.
-
-Thu Sep 19 16:53:09 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * Makefile ($(addsuffix .d,$(subdirs))): Depend on the makefile in
- the source directory, not the build directory.
- * Makeconf ($(..)$(dir).d): Likewise.
-
- * Makeconf (install) [all variants]: Depend on installation
- directory directly; don't make installed file depend on it.
-
-Thu Sep 12 15:45:34 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * Makefile (include $(addsuffix .d,$(subdirs))): New directive to
- get dependencies for directories included.
- ($(addsuffix .d,$(subdirs))) New target.
- * Makeconf (library_deps): New variable.
- (directory-depend): New target.
- ($(..)/$(dir).d): New target.
- ($(target)) [doinst == one]: Depend on libraries from library_deps.
- ($(libname).so) [makemode == library]: Likewise.
-
- * Makefile ($(prog-subdirs) $(lib-subdirs)): New rule.
- (%-all): Delete rule.
- (all): Depend on directory names without appended -all.
-
-Sun Sep 8 14:21:57 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * Makefile (prog-subdirs): Add storeio.
-
-Fri Sep 6 17:00:23 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * INSTALL: Update to version 0.1.
- * README: Likewise.
-
-Thu Sep 5 11:04:38 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * version.h: New file.
- * sh-version.sed: New file.
- * Makefile (DIST_FILES): Add version.h and sh-version.sed.
-
-Wed Sep 4 16:25:24 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * Makeconf
- ($(addprefix $(includedir)/$(installhdrsubdir)/,$(installhdrs))):
- `$(includdir)' --> `$(includedir)'
-
-Wed Sep 4 08:56:04 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * configure.in (asm_syntax): New variable, canonicalized from
- host_cpu. AC_SUBST it.
- * config.make.in (asm_syntax): New variable, from @asm_syntax@.
-
-Sun Sep 1 14:03:20 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * Makeconf ($(target): %$(target-suffix)): Add dependency on
- $(BUGADDR), and $(BUGADDR_REF) to the flags.
- (BUGADDR, BUGADDR_REF): New variables.
- * Makefile (lib-subdirs): Add libhurdbugaddr.
- * libhurdbugaddr: New directory.
-
-Thu Aug 29 14:14:04 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * Makeconf [doinst == one] (install): Don't depend on
- $(installationdir).
- [doinst==one] ($(installationdir)/$(target)): Do depend on
- $(installationdir).
- [doinst == many] (install): Don't depend on $(installationdir).
- $(addprefix $(installationdir)/,$(targets)): Depend on
- $(installationdir).
- [makemode == library] (install): Don't depend on $(libdir),
- $(includedir), or $(includedir)/$(installhdrsubdir).
- [makemode == library] ($(libdir)/$(libname.a)): Depend on
- $(libdir).
- [makemode == library] ($(libdir)/$(libname).so): Likewise.
- [makemode == library] $(addprefix
- $(includedir)/$(installhdrsubdir)/,$(installhdrs)): Depend on
- $(includdir)/$(installhdrsubdir)
- [makemode == library] $(includedir)/$(installhdrsubdir): Depend on
- $(includedir).
- [makemode == library] (install-headers): Don't depend on
- $(includedir)/$(installhdrsubdir) or $(includedir).
-
- * INSTALL: Tell people to delete Mach's mach_init.h if it got
- installed.
-
-Wed Aug 28 11:22:28 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * INSTALL: Say to use `no_deps=t' when installing headers.
-
-Tue Aug 13 17:54:53 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * Makeconf ($(target)): Add $($@-LDLIBS) $(LDLIBS) to libs.
-
-Tue Aug 13 14:05:54 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * Makeconf (vpath %.defs): Remove reference for mach and device
- headers.
- (mach_defs_names, device_defs,names, mach_defs, device_defs): New
- variables.
- ($(mach_defs), $(device_defs)): New rules.
- * config.make.in (install_prefix, install_includedir): Delete
- variables.
- * configure.in (install_prefix): Delete AC_SUBST.
-
-Mon Aug 12 12:51:03 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * Makeconf: Comment out the lines that cause recursive makes into
- library subdirs.
-
-Thu Aug 8 13:14:44 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * configure.in: Add AC_SUBST for `install_prefix'.
- * config.make.in (install_prefix, install_includedir): New
- variables.
- * Makeconf (vpath %.defs): Look for these in install_includedir.
-
-Wed Aug 7 14:57:55 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * Makefile (prog-subdirs): Add `nfsd'.
-
-Tue Aug 6 12:20:37 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * Released source version 0.0.
-
-Fri Aug 2 11:02:11 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * Makefile (cp-linked-files): Add missing hyphen to rule.
- (dist): Delete directory named for VERSION, not old var DATE.
- Build tar file from SRCDIR to avoid embedding an odd pathname in
- the archive.
-
-Tue Jul 30 13:54:47 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * Makeconf (top_srcdirinc): Don't define EWOULDBLOCK anymore.
-
-Sat Jul 20 15:42:43 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * Makeconf (lndist): Find DISTFILES in $(srcdir).
- * Makefile (date): Delete vare.
- (version, dirname): New vars.
- (dist): Operate in $(srcdir). Use $(dirname) for the tar dir name.
- (hurd-snap): Create in $(srcdir).
-
-Thu Jul 18 00:40:04 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * Makeconf (install): Depend on $(includedir)/$(installhdrsubdir).
- (install-headers): Likewise.
- ($(includedir)/$(installhdrsubdir)): New rule.
-
- * Makeconf (vpath -l%): Tell make where to find -l libraries.
-
-Wed Jul 17 22:49:50 1996 Roland McGrath <roland@baalperazim.frob.com>
-
- * build.mkcf.in: Use top_srcdir instead of srcdir.
-
-Wed Jul 17 14:28:29 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * Makeconf: gs/install-hdrs/install-headers/g
- * Makefile: Likewise.
-
-Tue Jul 16 11:35:48 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * Makeconf (CFLAGS): Define EWOULDBLOCK here to work around new
- libc bug.
-
-Sat Jul 13 20:34:41 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * Makefile (other-subdirs): Add `include'.
- * Makeconf (install-hdrs) [library]: Depend on installed copies of
- headers.
- (install-hdrs): Provide default target.
- * Makefile (%-install-hdrs, install-hdrs): New targets.
- * INSTALL: Discourage cross-building; include instructions for
- libc/hurd co-installation.
- * README: Discourage cross-building.
-
- * Makefile (install): Install $(other-subdirs) too.
-
-Fri Jul 12 14:18:37 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * Makeconf (install) [doinst==one || doinst==many]: Include
- file-specific options in call to INSTALL_PROGRAM.
-
-Mon Jul 8 00:54:56 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * Makefile (DIST_FILES): Removed *.h.
-
- * Makefile (DIST_FILES): Removed INSTALL-binary; now in
- ./release/.
- (other-subdirs): Add `release'.
- * release: New directory.
-
- * Makeconf: disable excessive cleverness for now...
-
-Sun Jul 7 22:41:04 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * Makefile (lib-subdirs): Move libthreads up before libpager.
- * Makeconf (libs) [library]: Depend on add-to-librecord instead of
- $(targets).
- (install) [library]: Add dependency on add-to-librecord.
- (add-to-librecord) [library]: Depend on $(targets).
- (librecord) [MAKELEVEL == 0]: Define and export.
- (include librecord): New inclusion.
- ($(librecord)): New target.
- (add-to-librecord): New target.
-
-Thu Jun 27 09:51:44 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * config.make.in (installationdirlist): New variable.
- * Makeconf (MKINSTALLDIRS): New variable.
- (install) [all versions]: Add dependency on the directory being
- installed into.
- ($(installationdirlist)): New dependency.
-
- * Makefile (linked-files, lf-inst): New variables.
- (cp-linked-files): Use implicit rule.
- ($(lfinst)): New implicit rule.
- * mkinstalldirs: New symlink to /gd/gnu/lib program.
-
- * Makefile (distclean): Add config.cache.
-
- * Makefile (lndist-cthreads-h): Delet target.
- (lndist): Remove `lndist-cthreads-h'.
-
-Fri Jun 21 12:28:26 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * Makeconf ($(target)): Get rid of -defsym hack for ___brk_addr
- (there's a hack in libc now).
-
-Thu Jun 20 14:33:01 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * Makefile (prog-subdirs): Add `daemons'.
- * daemons: New directory.
- * config.make.in (libexecdir): New variable.
-
-Mon Jun 17 11:24:49 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * Makeconf ($(target)): Add bletcherous hack to deal with undefined
- (and unused) libc symbol.
-
- * Makefile (prog-subdirs): init.trim -> init.
- (other-subdirs): Delete init; add config.
- * init.trim: Renamed to be init.
- * init: Sluffed into olds.
-
- * config: New directory.
-
-Mon Jun 17 10:30:54 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * Makeconf (CPPFLAGS): Add -I$(top_srcdir)/include.
- (INSTALLED_LOCAL_HEADERS): Split into two cases based on
- $(installhdrsubdir).
- ($(INSTALLED_LOCAL_HEADERS)) [$(installhdrsubdir) == .]: Linked to
- $(top_srcdir)/include. Prefix ../ to link contents.
- * include: New directory.
-
- * Makefile (prog-subdirs): Rename fsck to ufs-fsck. Add sutils.
- * ufs-fsck: Renamed from fsck.
- * sutils: New directory.
-
-Thu Jun 13 17:14:44 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * config.make.in (localstatedir, sharedstatedir): Add variables.
-
-Fri May 24 15:16:25 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * Makefile (lib-subdirs): Add libmom.
- * libmom: New directory.
-
-Sat May 11 17:00:19 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
-
- * Makeconf: Add .PHONY spec for phony targets.
-
-Thu May 9 12:19:08 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * Makefile (DIST_FILES): Add *.h.
-
- * Makeconf (INSTALLED_LOCAL_HEADERS): New variable that $(libs)
- depends on. This arranges to make sure that headers exported by
- this library always get installed eventually into the source
- directory as symlinks.
-
-Mon May 6 16:25:46 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * libiohelp: Renamed from `libioserver'.
- * Makefile (lib-subdirs): libioserver -> libiohelp.
-
-Tue Apr 30 22:06:05 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
-
- * Makefile (DIST_FILES): Add build.mkcf.in.
- * build.mkcf.in: New file.
- * configure.in (makefiles): Add Makeconf:build.mkcf.in.
-
- * Makefile (srcdir): Set to . if undefined. Find Makeconf in
- $(srcdir).
-
-Tue Apr 30 09:27:31 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * Makeconf ($(target)): Don't depend on $(OBJS) or $(OTHERLIBS) in
- the main build rule. Add new rule specifying such a dependency
- only when doinst is one.
-
-Sun Apr 28 19:02:56 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
-
- * Makeconf (make-deps): New canned sequence. Remove gcc-lib hdrs from
- deps. Use atomic mv for output.
- (%.d: %.c, %.d: %.S): Use $(make-deps).
-
-Fri Apr 26 09:25:48 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * Makeconf (OBJS): Provide default definition.
- (_objs): Delete variable; replace references with $(OBJS).
-
- * Makefile (cp-linked-files): New target.
- (lndist): Add `cp-linked-files'.
-
-Thu Apr 25 03:13:51 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
-
- * Makeconf: Use -include for generated dep files.
-
-Thu Apr 11 16:18:25 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * INSTALL-binary: Renamed from README-binary.
-
-Thu Apr 11 16:13:35 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * Makefile (DIST_FILES): Add SETUP.
-
-Thu Apr 11 16:06:21 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * README: Rewritten for a new purpose.
- * INSTALL-cross: Renamed from INSTALL.
- * INSTALL: New file.
-
-Mon Mar 25 03:09:09 1996 Roland McGrath <roland@charlie-brown.gnu.ai.mit.edu>
-
- * configure.in: After CC tool check, invoke AC_PROG_CC to set default
- CFLAGS and test for GCC. Barf if not GCC.
-
-Thu Mar 21 11:41:53 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * Makeconf (CFLAGS): Always turn on -g and -O3.
-
-Wed Mar 20 15:30:49 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * Makeconf (vpath %.defs): Make that $(includedir)/mach and
- $(includedir)/device.
- (CPPFLAGS): Add -D_GNU_SOURCE.
-
-Wed Mar 20 15:29:21 1996 Roland McGrath <roland@charlie-brown.gnu.ai.mit.edu>
-
- * Makeconf (vpath %.defs): Use $(includedir) to locate mach files.
-
-Tue Feb 27 14:48:19 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * Makefile (prog-subdirs): Change `newfs' to `ufs-utils'.
-
- * Makeconf ($(target): %): Add $(target-suffix) to destination name.
-
-Thu Nov 30 10:57:21 1995 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * Makefile (prog-subdirs): Added pfinet.
-
-Tue Nov 21 14:34:04 1995 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * Makeconf (top_srcdirinc, srcdirinc): New variables.
- (CPPFLAGS): Use new vars $(top_srcdirinc) and $(srcdirinc) to avoid
- ugly duplication of `.' and `..' in compile lines when possible.
-
-Tue Oct 24 17:24:36 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * Makefile (DIST_FILES): Replace hurd.boot.in with hurd.boot
- (hurd.boot): Target removed.
- (clean-misc): Don't remove hurd.boot.
- (all): Don't depend on it.
- * hurd.boot: Renamed back from hurd.boot.in.
- Name ufs and ld.so as they will be found in an installed Hurd
- filesystem.
-
-Tue Oct 10 23:31:26 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * Makeconf (rpath): New variable.
- ($(target)): Use it in link command.
- ($(libname).so): Likewise.
- Use $^ instead of $+.
-
-Sat Oct 7 05:02:17 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * Makeconf ($(libname).so): Pass $(LDFLAGS) and $($@-LDFLAGS).
-
-Wed Oct 4 16:21:33 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * Makeconf (%_pic.o: %.c): Use $(COMPILE.c) instead of its
- contents. Pass -DPIC.
- (%_pic.o: %.S): New rule.
-
-Sat Sep 23 02:45:18 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * Makeconf (top_srcdir): Define properly in parent directory.
-
- * Makefile (other-subdirs): Remove lib.
-
-Fri Sep 22 14:26:12 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * build.mk.in (VPATH): New variable.
-
-Thu Sep 21 19:07:44 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * Makefile (hurd.boot): New target.
- (all): Depend on hurd.boot
- (DIST_FILES): Add build.mk.in and hurd.boot.in.
- (clean-misc, distclean): New targets.
- (clean): Depend on clean-misc.
-
- * hurd.boot.in: Renamed from hurd.boot; use @exec_prefix@ instead
- of hardcoded dir. Added some comments.
- * build.mk.in: New file.
- * configure.in: If not in $srcdir, produce */Makefile from
- build.mk.in.
-
-Thu Sep 21 14:28:26 1995 Michael I. Bushnell, p/BSG <mib@duality.gnu.ai.mit.edu>
-
- * Makefile (prog-subdirs): Removed `pfinet'.
-
- * term, newterm: Renamed `term' to be `term.old'; renamed
- `newterm' to be `term', thus installing the new version.
-
-Wed Sep 20 20:10:54 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * hurd.boot: Run ld.so with arg of /hurd/exec, instead of running
- exec/exec. Now exec can be dynamically linked.
-
-Tue Sep 19 13:40:47 1995 Miles Bader <miles@churchy.gnu.ai.mit.edu>
-
- * Makeconf (LDFLAGS): Variable removed.
-
-Tue Sep 19 02:33:13 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * Makeconf (libthreads-libsubst): Variable removed.
-
-Sat Sep 16 14:17:08 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * configure.in: New file.
- * config.make.in: New file.
- * Maketools: File removed.
- * Makefile (DIST_FILES): Remove Maketools.
- Add config.make.in, configure.in, configure.
- * Makeconf: Include $(..)config.make for configure-generated
- parameters.
- No longer include Maketools.
- (prefix, exec_prefix, srcdir, hurddir, bindir, sbindir, libdir,
- infodir, includedir): Variables removed.
- (..): New variable.
- (srcdir, top_srcdir): Set if not already set.
- (CPPFLAGS): Append -I's for . and .. and $(srcdir) and $(top_srcdir).
- (CFLAGS): Remove -g.
- Change miscellaneous uses of $(srcdir) to $(top_srcdir).
- (vpath %.defs): Remove $(crossheaders) dirs from path.
-
-Sat Sep 16 13:26:59 1995 Miles Bader <roland@churchy.gnu.ai.mit.edu>
-
- * Makeconf (sbindir): New variable.
- (installationdir): Don't set if already set.
-
-Mon Sep 11 12:06:44 1995 Miles Bader <miles@churchy.gnu.ai.mit.edu>
-
- * Maketools (CCVERSION): Changed to 2.7.1.
- (CCVERSION-duality.gnu.ai.mit.edu): Removed.
-
-Fri Sep 1 13:02:12 1995 Miles Bader <miles@churchy.gnu.ai.mit.edu>
-
- * Makeconf (libsubst, libsubst-override, _libsubst): New vars.
- ($(target): %): Replace each library reference with $(_libsubst).
- (libthreads-libsubst): New variable.
- [$(makemode)==library] (targets): Default to both .a and .so libraries.
- [$(makemode)==library] (all, install): Make and install $(targets)
- instead of the explicit default list of them.
- [$(makemode)==library] (libs): New target.
- (../%.a ../%.so): Make the `libs' target instead of an explicit
- list of libraries.
-
-Mon Aug 28 17:22:24 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * hurd.boot: Use ${boot-args} preset variable.
- Use $(...) for action directives.
-
-Mon Aug 28 15:52:16 1995 Michael I. Bushnell, p/BSG <mib@duality.gnu.ai.mit.edu>
-
- * Makeconf (inclusion of .d files based on OBJS): Only deal with
- .o files in $(OBJS).
-
-Mon Aug 28 09:59:04 1995 Miles Bader <miles@churchy.gnu.ai.mit.edu>
-
- * Makeconf (TAGS): Automagically find all the files to scan from
- the dependency information.
- (DEP_SRCS): Sort in reverse order so that local files come first.
-
-Fri Aug 25 08:02:04 1995 Miles Bader <miles@churchy.gnu.ai.mit.edu>
-
- * Makeconf ($(libname).so): Use the linker -soname option to
- specify what library name should be recorded by users.
- (__libext, __libext-static, _libext): New variables.
- ($(target): %): Link against the absolute library with the
- appropiate extension do determine whether shared or not, instead
- of using -L...-l syntax.
-
-Thu Aug 24 10:09:59 1995 Miles Bader <miles@churchy.gnu.ai.mit.edu>
-
- * Makeconf (HURDLIBS-files, HURDLIBS-libs): Removed.
- ($(targets): %): The same rule now used for both many and one
- cases. Get the things to be linked against entirely from the
- dependency list, and munge it to convert library pathnames to
- -L...-l pairs.
- Stop using *HURDLIBS as the mechanism for passing in libraries to
- be linked against. Now you should just put the pathname in the
- dependency list of the target, along with the object files, etc.
- [$(doinst)==many] (target): Set this from $(targets).
- ($(sort $(HURDLIBS-files))): Rule deleted.
- (../%.a ../%.so): New rule, replacing the previous one.
-
-Wed Aug 23 17:55:04 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * Makefile (DIST_FILES): Add hurd.boot.
- * hurd.boot: New file.
-
-Tue Aug 22 17:04:19 1995 Miles Bader <miles@churchy.gnu.ai.mit.edu>
-
- * Makeconf ($(addprefix $(installationdir)/,$(targets)),): Use
- INSTALL_PROGRAM, not INSTALL_BIN.
- * Maketools (INSTALL_BIN): Changed to INSTALL_PROGRAM.
-
- * Makeconf (HURDLIBS-libs): Re-enable the -L... version, but using
- -Wl,-L... instead to avoid gcc hosage.
- (HURDLIBS-files): Use both the target specific and general values
- of HURDLIBS.
- Get rid of the merging of all target-specific HURDLIBS into the
- general HURDLIBS, as the former are use properly now.
- [$(doinst)==one] ($(target)): Don't explicitly link with $(libc).
- [$(doinst)==many] ($(targets): %:): Depend on the .o file of the
- same name, and on all the hurd library files, and on all
- appropriate other libraries. Use $^ instead of $+ as we now get
- all the libraries from the various HURDLIBS instead of from the
- dependencies list, and this allows us to put %.o in our
- dependencies without worrying about duplicating what the user has
- done. Don't explicitly link with $(libc).
-
- * Makeconf [$(makemode)==library]: Use $(installhdrsubdir) to
- determine where headers in $(installhdrs) should be installed,
- instead of a constant `hurd'.
-
-Fri Aug 18 21:53:17 1995 Miles Bader <miles@duality.gnu.ai.mit.edu>
-
- * Makeconf [$(doinst)==many]: Depend on what's in plain OTHERLIBS
- as well as the target specific $@-OTHERLIBS.
-
-Mon Aug 7 16:29:53 1995 Miles Bader <miles@duality.gnu.ai.mit.edu>
-
- * Makefile (prog-subdirs): Remove pipes.
-
-Fri Aug 4 14:49:25 1995 Miles Bader <miles@churchy.gnu.ai.mit.edu>
-
- * README-binary: Say to run /hurd/pflocal instead of /hurd/pipes.
-
-Wed Jul 26 14:30:17 1995 Miles Bader <miles@churchy.gnu.ai.mit.edu>
-
- * Makefile (lib-subdirs): Added libpipe.
- (prog-subdirs): Added pflocal.
- * libpipe: New directory.
-
-Sun Jul 23 15:57:50 1995 Michael I Bushnell <mib@geech.gnu.ai.mit.edu>
-
- * Makefile (DIST_FILES): Removed `missing'.
- (dist): Include date in snapshot name.
-
-Sat Jul 22 14:19:36 1995 Michael I Bushnell <mib@geech.gnu.ai.mit.edu>
-
- * Makefile (%-lndist, %-clean, %-TAGS): Set no_deps in recursive
- make.
- * Makeconf: Don't include dependency files if no_deps is set.
-
-Tue Jul 18 20:09:35 1995 Michael I Bushnell <mib@geech.gnu.ai.mit.edu>
-
- * Makeconf (%.d: %.c): Include the _pic.o files if we are making a
- library.
-
-Wed Jul 12 11:41:19 1995 Michael I Bushnell <mib@duality.gnu.ai.mit.edu>
-
- * Makefile (lib-subdirs): Removed `libnetserv'.
- * libnetserv: Move to old.
- * pfinet: Move to old; start new directory.
-
-Fri Jul 7 17:34:54 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * Makeconf [$(doinst)==many] ($(targets) installation rule): Fix typo.
-
-Fri Jul 7 00:29:12 1995 Michael I Bushnell <mib@duality.gnu.ai.mit.edu>
-
- * Makeconf (install) [doinst == one || doinst == many]: Don't
- install files if they already exist and are up to date.
-
-Thu Jul 6 14:45:30 1995 Michael I Bushnell <mib@duality.gnu.ai.mit.edu>
-
- * Maketools (OBJCOPY): New var.
-
- * Makeconf (HURDLIBS-libs): Comment out path-search rule here; I
- don't yet trust -L to work right; particularly inside linker
- parens.
-
- * Makeconf (%.d:%.c %.d:%.S): Repair sed line to include more
- context.
-
- * Makeconf (Building targets) [doinst == many]: Don't try and
- build $(special-targets).
-
- * Makeconf: Delete now-unneeeded explicit dependencies.
-
- * Makeconf (clean): Add dependency files to be removed.
-
- * cthreads.h: New link to libthreads/cthreads.h to make sure we
- get the local copy instead of the one in the include dir.
- * Makefile (lndist): Add new dependency.
- (lndist-cthreads-h): Rule to create the cthreads.h link.
-
- * Makeconf ($(target) [doinst == one]): Don't explicitly depend on
- libc. Too hairy for now.
-
- * Makeconf: Added many new rules for automatic dependency
- generation.
-
- * Makeconf (install) [makemode == library]: Install libraries and
- headers as separate targets.
-
-Wed Jul 5 17:41:33 1995 Michael I Bushnell <mib@duality.gnu.ai.mit.edu>
-
- * Makeconf: Make things work nicer for $(doinst)==many by allowing
- per-target HURDLIBS and LDFLAGS values.
-
- * Makefile (prog-subdirs): Removed `pflocal'.
-
-Thu Jun 29 15:14:25 1995 Michael I Bushnell <mib@duality.gnu.ai.mit.edu>
-
- * Makeconf (cleantarg) [makemode == library]: Add $(libname).so.
- (`Building Hurd libraries'): Make simpler rule that doesn't need
- allibs.
- (alllibs): Delete variable.
- (all) [makemode == library]: Add $(libname).so.
- (install) [makemode == library]: Install $(libname.so) too.
- ($(libname).so) [makemode == library]: New rule to build shared
- library.
- (%_pic.o): New rule to build pic object files.
-
-Wed Jun 28 15:06:25 1995 Michael I Bushnell <mib@duality.gnu.ai.mit.edu>
-
- * Makeconf (HURDLIBS-libs): Restore variable definition.
- ($(target)) [doinst == one]: Use HURDLIBS-libs instead of
- HURDLIBS-files.
- (HURDLIBS-files): Compute names automatically. Dike out
- per-library variables up above.
-
- * Makefile (prog-subdirs): Removed dev.trim.
-
-Thu Jun 22 11:47:05 1995 Michael I Bushnell <mib@duality.gnu.ai.mit.edu>
-
- * Makeconf (libihash): New variable.
- (alllibs): Add libihash.
-
-Mon Jun 19 21:34:14 1995 Michael I Bushnell <mib@duality.gnu.ai.mit.edu>
-
- * Makeconf (CFLAGS): Omit -Wno-parentheses.
-
-Tue Jun 6 13:18:14 1995 Michael I Bushnell <mib@duality.gnu.ai.mit.edu>
-
- * Makefile (lib-subdirs): Added libihash.
- * libihash: New directory.
-
-Thu May 18 03:34:31 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * Makeconf (LDFLAGS): Append -static.
-
-Fri May 12 18:39:21 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * Makefile (prog-subdirs): Removed mkbootfs.
-
-Fri May 5 09:46:01 1995 Miles Bader <miles@churchy.gnu.ai.mit.edu>
-
- * Makeconf: Make MIGCOMUFLAGS & <target>-MIGCOMUFLAGS actually work.
-
-Fri Apr 21 11:44:05 1995 Michael I Bushnell <mib@duality.gnu.ai.mit.edu>
-
- * Maketools (INSTALL_BIN): Reverse Miles's last change.
-
-Wed Apr 12 11:12:51 1995 Michael I Bushnell <mib@duality.gnu.ai.mit.edu>
-
- * Makeconf (install [$(makemode) == library]): Use `$(RANLIB)',
- not `ranlib'.
-
-Tue Apr 11 10:51:22 1995 Michael I Bushnell <mib@duality.gnu.ai.mit.edu>
-
- * Makefile (DIST_FILES): Add README-binary.
- * README: Small doc fix.
- * INSTALL: Many changes.
- * README-binary: New file.
-
- * Makeconf (prefix): Change to /home/gd4/hurdinst.
-
- * Makefile (all, install): Do lib-subdirs too.
-
- * Makefile (prog-subdirs): Added devio, newfs, ext2fs, benchmarks,
- pfinet, tmpfs, defpager, login, and nfs.
- (other-subdirs): Added lib.
- (lib-subdirs): Added libps, libnetserv, libdirmgt, and libnetfs.
- (subdirs-nodist): Remove libnetserv.
-
- * devio, lib, libps, ext2fs: New directories (actually created
- several weeks before this log entry).
-
-Mon Apr 10 14:38:26 1995 Miles Bader <miles@churchy.gnu.ai.mit.edu>
-
- * Maketools (INSTALL_BIN): Use /gd4/hurd-cross/install-stripped to
- install binaries stripped.
-
- * Makeconf (prefix, exec_prefix): Point at the currently correct place.
-
-Fri Apr 7 18:14:01 1995 Michael I Bushnell <mib@duality.gnu.ai.mit.edu>
-
- * ext2fs: Delete directory and its contents.
- * Makefile (subdirs-nodist, other-subdirs): Delete `ext2fs'.
-
-Wed Apr 5 12:59:10 1995 Michael I Bushnell <mib@duality.gnu.ai.mit.edu>
-
- * Makefile (clean): Only clean in working-prog-subdirs.
-
- * Makeconf (hurdinst, hurdroot): Deleted vars. Replaced usages
- with $(prefix) and derivatives.
- (hurdroot-douglas.gnu.ai.mit.edu, hurdroot-ernst.gnu.ai.mit.edu,
- hostname, hurdrootdev): Deleted vars.
- (hurdsource): Replaced with `srcdir'.
- (startup, libc): Deleted vars; now in Maketools.
- (prefix, exec_prefix): New vars.
- (hurddir, bindir, libdir, infodir, includedir): New vars.
- ($(hurdroot), $(hurdroot)/mounted): Deleted rules.
- (vpath %.defs): Look in $(crossheaders), not installation dir.
- * Maketools (crossdir, startup, libc, crossheaders): New vars.
- (MIGCOM): Use $(crossdir) instead of literal string.
-
-Fri Mar 31 23:45:11 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * Makeconf [makemode=library] (install): Only do $(installhdrs) if
- defined.
- * Makeconf [makemode=library] (install): Use $(INSTALL_DATA).
- * Maketools (INSTALL, INSTALL_DATA, INSTALL_BIN): Define normally
- using `install'.
-
-Mon Mar 20 14:02:08 1995 Michael I Bushnell <mib@duality.gnu.ai.mit.edu>
-
- * Makeconf (libps): New variable.
- (alllibs): Add libps.
-
- * ps, libps: New directories.
-
- * Makeconf: Doc fix.
-
- * Maketools (CC): Specify `$(CCTARGET)-gcc' instead of just `gcc'.
-
-Thu Feb 16 00:43:43 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * Makeconf (CPPFLAGS, CFLAGS): Set with += so Makefiles can add things.
-
- * Maketools (hostname): New variable, so CCVERSION actually works.
-
-Wed Feb 15 22:40:25 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * Maketools (CCVERSION-duality.gnu.ai.mit.edu): New variable.
-
-Sat Feb 11 03:59:15 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * Maketools (INSTALL_BIN): Use objcopy.
-
-Wed Dec 14 07:31:46 1994 Michael I Bushnell <mib@churchy.gnu.ai.mit.edu>
-
- * Makeconf (libnetserv): New variable.
- (alllibs): Added `libnetserv'.
-
-Thu Nov 24 07:36:57 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * Makefile (DIST_FILES): Remove gcc-specs.
-
-Tue Nov 22 22:29:41 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * Makeconf ($(target)): Use normal linking with -Wl,-( $+ -Wl,-).
-
-Wed Nov 16 14:52:20 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * Maketools (MIG, MIGCOM): Never define using rsh; use
- /usr/local/i386-gnu/....
-
-Tue Nov 8 14:27:58 1994 Michael I Bushnell <mib@geech.gnu.ai.mit.edu>
-
- * Makeconf (link-objects): Mention libgcc.a explicitly here.
- * Maketools (CCVERSION): Upgrade default to version 2.6.2.
-
-Thu Nov 3 17:17:15 1994 Michael I Bushnell <mib@geech.gnu.ai.mit.edu>
-
- * Renamed `fsck' to `bsdfsck'; renamed `newfsck' to `fsck'.
- * Makefile (prog-subdirs): Added bsdfsck.
-
-Tue Nov 1 13:15:28 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * Makeconf (hurdroot): Don't set if already defined.
-
-Fri Oct 14 17:43:46 1994 Michael I Bushnell <mib@geech.gnu.ai.mit.edu>
-
- * newfsck: New directory.
-
-Fri Sep 23 15:57:45 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * Makefile (working-prog-subdirs): New variable, omits dirs
- containing a file BROKEN.
- (all, install): Use that instead of $(prog-subdirs).
-
-Fri Sep 16 10:16:19 1994 Michael I Bushnell <mib@churchy.gnu.ai.mit.edu>
-
- * Makeconf (libc): Now that libc.a is a linker script, do the
- Right Thing here.
- ($(target)): Here too.
-
-Thu Sep 8 12:20:05 1994 Michael I Bushnell <mib@churchy.gnu.ai.mit.edu>
-
- * Makefile (prog-subdirs): Added `fsck'.
-
- * Makefile (DIST_FILES): Added `INSTALL'.
- * INSTALL: New file.
-
-Tue Aug 30 11:29:50 1994 Michael I Bushnell <mib@geech.gnu.ai.mit.edu>
-
- * Makefile (other-subdirs): Add libnetserv.
- (lib-subdirs): Remove libnetserv.
-
-Tue Aug 23 09:35:44 1994 Michael I Bushnell <mib@geech.gnu.ai.mit.edu>
-
- * Makeconf (link-objects): Don't use -v anymore.
-
-Fri Aug 19 01:36:11 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * Makeconf (link-objects): Don't put $(OBJS) inside -( ... -).
-
-Tue Aug 16 14:21:46 1994 Michael I Bushnell <mib@geech.gnu.ai.mit.edu>
-
- * Makeconf (link-objects): Don't use $^; it omits duplicates.
-
-Tue Aug 16 00:47:08 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * Makeconf (link-objects): Define with hair to use -( ... -).
-
-Mon Aug 15 21:24:42 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * gcc-specs: Updated; now expects gcc configured for
- {i386,mips}-gnu target and libc installed in
- /usr/local/{i386,mips}-gnu/{lib,include} or wherever configured.
- (cpp): Grok only -posix.
- (lib): Use -( ... -) hack.
- (startfile): Use normal defn.
- (predefines): Remove `hurd'; `gnu' is enough.
-
- * Makeconf (link-objects): New variable.
- ($(target)): Use it in place of other objects variables.
- Depend on $(libc).
-
- * Maketools (BUILD_CC): Set this instead of HOST_CC.
-
-Wed Aug 10 13:59:40 1994 Michael I Bushnell <mib@geech.gnu.ai.mit.edu>
-
- * netinet: New directory.
-
-Wed Aug 10 13:41:54 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * Maketools (LD): Find ld in $(tooldir) instead of $(ccdir).
-
-Mon Aug 8 15:37:29 1994 Michael I Bushnell <mib@churchy.gnu.ai.mit.edu>
-
- * libnetserv: New directory.
- * Makefile (lib-subdirs): Added `libnetserv'.
-
- * Makeconf (distfiles): Don't set with :=.
- * Makefile (dist): Fix typo.
-
-Fri Aug 5 15:23:49 1994 Michael I Bushnell <mib@churchy.gnu.ai.mit.edu>
-
- * Makeconf (machdefs, devicedefs): Deleted vars.
- (vpath %.defs): Added $(includedir)/device.
-
- * Makeconf (install) [doinst == many]: Repair shell syntax.
-
- * sh.trim, ps, su: Deleted directories.
-
-Mon Aug 1 19:41:06 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * Maketools (CC): Add -pipe.
-
-Sun Jul 31 21:12:40 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * Maketools (tooldir): Use /usr/local/i386-gnu/bin.
- (CCVERSION): Use 2.6.0.
- (INSTALL_BIN): Use objcopy -S.
-
-Sat Jul 23 01:35:03 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * Makeconf: Removed all the hairy mig rules.
- Replaced with two pattern rules and a vpath %.defs directive.
- Rationalized use of flag variables; add dash after interface name
- in computed flag variable names.
-
- * gcc-specs (predefines): Remove -Asystem(hurd); `gnu' is enough.
-
- * Makeconf ($(target)): Pass $(LDFLAGS) like a sane person.
-
-Fri Jul 22 19:42:53 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * Makeconf (HURDLIBS-files): New variable.
- ($(target)): Use that instead of $($(HURDLIBS)). (mib braino.)
- (distfiles): Use $(DIST_FILES) instead of just DIST_FILES.
- (TAGS): Use a substitution reference instead of several function
- invocations.
-
-Fri Jul 22 10:18:33 1994 Michael I Bushnell <mib@geech.gnu.ai.mit.edu>
-
- * Makefile (other-subdirs): Removed `i386'.
- * i386: Deleted directory.
- * machine: Deleted symlink.
-
- * Makeconf (CFLAGS): Use += instead of :=.
- (TAGS): New var OTHERTAGS for source not in the usual places.
-
-Thu Jul 21 15:09:34 1994 Michael I Bushnell <mib@geech.gnu.ai.mit.edu>
-
- * Makeconf (CPPFLAGS): Remove -I. and add -I$(hurdsource) in
- accord with reorganization.
- (libthreads,libports,libioserver,libpager,libfshelp,libdiskfs,
- libtrivfs): Changed to find libraries in local (uninstalled)
- locations.
- ($(hurdsource)/lib%/lib%.a): Define this instead of bogus rules for
- each installed library and header file separately.
- (%_S.h, %Server.c): New implicit rules for Hurd and Mach
- interfaces; associated variables.
- (makemode): New variable parent should set.
- (doinst, installationdir): New vars.
- (install, $(target), $(libname).a): New targets.
- (TAGS): Rewritten with new variable names.
-
- * Makefile (prog-subdirs): Removed sh.trim, ps, and su. Added
- utils. Removed ifsock and symlink. Added trans.
-
-Wed Jul 20 16:27:50 1994 Michael I Bushnell <mib@geech.gnu.ai.mit.edu>
-
- * Maketools (MIGHOSTCCVERSION, MIGCCTYPE, MIGHOSTCC): Deleted
- variables.
-
-Tue Jul 19 12:25:06 1994 Michael I Bushnell (mib@churchy.gnu.ai.mit.edu)
-
- * Makefile (other-subdirs): Added ext2fs.
- (subdirs-nodist): New variable.
- (dist): Don't include things in subdirs-nodist.
-
- * gcc-specs (cpp): Use -idirafter instead of -I in searching for
- our substitute /usr/include.
- (lib): Don't look for libmalloc.
-
- * Maketools (CCTARGET): Changed to be i386-gnu.
- (CPP): Use $(CC) instead of calling CPP directly.
- * Makeconf (CPPFLAGS): Deleted -nostdinc and -I flags.
- (link): Deleted macro.
- (ldflags, gccheaders, libgcc): Deleted variables.
-
- * Makeconf (malloc): Deleted variable.
- (link): Deleted $(malloc) and `-u _malloc'.
-
-Tue Jul 12 15:23:43 1994 Michael I Bushnell (mib@churchy.gnu.ai.mit.edu)
-
- * Makefile (other-subdirs): Moved dev here from $(prog-subdirs).
- (prog-subdirs): Added dev.trim.
-
-Tue Jul 5 14:07:02 1994 Michael I Bushnell (mib@churchy.gnu.ai.mit.edu)
-
- * Snapshot published.
-
- * Makefile (prog-subdirs): Added dev, su, symlink.
- (DIST_FILES): Added tasks and ChangeLog.
-
- * Makeconf (TAGS): New target.
- * Makefile (%-TAGS): New target.
- (TAGS): New target.
-
- (other-subdirs): Moved tmpfs here from $(prog-subdirs).
-
-Mon Jun 20 15:03:14 1994 Michael I Bushnell (mib@churchy.gnu.ai.mit.edu)
-
- * Maketools (INSTALL_BIN): New macro.
-
-Sat Jun 18 12:34:04 1994 Roland McGrath (roland@geech.gnu.ai.mit.edu)
-
- * Maketools (MIGCOM): Fix mib's losing command to propagate umask
- through rsh to the remote migcom run.
-
-Wed May 25 12:55:35 1994 Michael I Bushnell (mib@churchy.gnu.ai.mit.edu)
-
- * Makeconf (libtrivfs): New variable.
- ($(libtrivfs), $(includedir/hurd/trivfs.h)): New targets.
-
-Tue May 24 16:15:30 1994 Michael I Bushnell (mib@churchy.gnu.ai.mit.edu)
-
- * Maketools (MIGHOSTCC, CC): Don't use -pipe any more.
-
-Wed May 18 13:02:44 1994 Michael I Bushnell (mib@churchy.gnu.ai.mit.edu)
-
- * tasks: New file.
-
-Tue May 17 19:51:15 1994 Michael I Bushnell (mib@churchy.gnu.ai.mit.edu)
-
- * Snapshot published.
-
- * gcc-specs: New file.
- * Makefile (DIST_FILES): Added gcc-specs.
-
-Fri May 6 13:24:42 1994 Michael I Bushnell (mib@geech.gnu.ai.mit.edu)
-
- * Maketools (MIGHOSTCCVERSION, MIGHOSTCCTYPE, MIGHOSTCC):
- New variables.
- (mighost): Fully canonicalize name.
-
-Thu May 5 19:34:57 1994 Michael I Bushnell (mib@geech.gnu.ai.mit.edu)
-
- * Makeconf (malloc): Changed to point to libmalloc.a; installed
- there by libthreads/Makefile.
-
-Thu May 5 07:10:49 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
-
- * Makeconf (malloc): Pass -u _malloc and reference $(libthreads).
-
- * Makeconf (headers): Variable renamed to includedir; all uses changed.
- (CPPFLAGS): Add -I. before other -Is.
-
-Wed May 4 07:07:16 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
-
- * Maketools (machine): Define variable.
-
-Wed Apr 27 01:54:34 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
-
- * Makefile (LIB_SUBDIRS, PROG_SUBDIRS, OTHER_SUBDIRS, SUBDIRS):
- Renamed to less annoying names, not in ALL GRATUITOUS CAPS.
- (lib-subdirs): Fixed name of libthreads.
+2772f5c6a6a51cf946fd95bf6ffe254273157a21 is the last commit imported from CVS.
+All commits after that one have valid author and committer information.
+
+Use this to examine the change log for earlier changes:
+
+ $ git show 2772f5c6a6a51cf946fd95bf6ffe254273157a21:ChangeLog
+ $ git show 2772f5c6a6a51cf946fd95bf6ffe254273157a21:auth/ChangeLog
+ $ git show 2772f5c6a6a51cf946fd95bf6ffe254273157a21:benchmarks/ChangeLog
+ $ git show 2772f5c6a6a51cf946fd95bf6ffe254273157a21:boot/ChangeLog
+ $ git show 2772f5c6a6a51cf946fd95bf6ffe254273157a21:bsdfsck/ChangeLog
+ $ git show 2772f5c6a6a51cf946fd95bf6ffe254273157a21:config/ChangeLog
+ $ git show 2772f5c6a6a51cf946fd95bf6ffe254273157a21:console-client/ChangeLog
+ $ git show 2772f5c6a6a51cf946fd95bf6ffe254273157a21:console/ChangeLog
+ $ git show 2772f5c6a6a51cf946fd95bf6ffe254273157a21:daemons/ChangeLog
+ $ git show 2772f5c6a6a51cf946fd95bf6ffe254273157a21:defpager/ChangeLog
+ $ git show 2772f5c6a6a51cf946fd95bf6ffe254273157a21:doc/ChangeLog
+ $ git show 2772f5c6a6a51cf946fd95bf6ffe254273157a21:exec/ChangeLog
+ $ git show 2772f5c6a6a51cf946fd95bf6ffe254273157a21:ext2fs/ChangeLog
+ $ git show 2772f5c6a6a51cf946fd95bf6ffe254273157a21:fatfs/ChangeLog
+ $ git show 2772f5c6a6a51cf946fd95bf6ffe254273157a21:fstests/ChangeLog
+ $ git show 2772f5c6a6a51cf946fd95bf6ffe254273157a21:ftpfs/ChangeLog
+ $ git show 2772f5c6a6a51cf946fd95bf6ffe254273157a21:hostmux/ChangeLog
+ $ git show 2772f5c6a6a51cf946fd95bf6ffe254273157a21:hurd/ChangeLog
+ $ git show 2772f5c6a6a51cf946fd95bf6ffe254273157a21:include/ChangeLog
+ $ git show 2772f5c6a6a51cf946fd95bf6ffe254273157a21:init/ChangeLog
+ $ git show 2772f5c6a6a51cf946fd95bf6ffe254273157a21:isofs/ChangeLog
+ $ git show 2772f5c6a6a51cf946fd95bf6ffe254273157a21:libcons/ChangeLog
+ $ git show 2772f5c6a6a51cf946fd95bf6ffe254273157a21:libdirmgt/ChangeLog
+ $ git show 2772f5c6a6a51cf946fd95bf6ffe254273157a21:libdiskfs/ChangeLog
+ $ git show 2772f5c6a6a51cf946fd95bf6ffe254273157a21:libfshelp/ChangeLog
+ $ git show 2772f5c6a6a51cf946fd95bf6ffe254273157a21:libftpconn/ChangeLog
+ $ git show 2772f5c6a6a51cf946fd95bf6ffe254273157a21:libhurdbugaddr/ChangeLog
+ $ git show 2772f5c6a6a51cf946fd95bf6ffe254273157a21:libihash/ChangeLog
+ $ git show 2772f5c6a6a51cf946fd95bf6ffe254273157a21:libiohelp/ChangeLog
+ $ git show 2772f5c6a6a51cf946fd95bf6ffe254273157a21:libnetfs/ChangeLog
+ $ git show 2772f5c6a6a51cf946fd95bf6ffe254273157a21:libpager/ChangeLog
+ $ git show 2772f5c6a6a51cf946fd95bf6ffe254273157a21:libpipe/ChangeLog
+ $ git show 2772f5c6a6a51cf946fd95bf6ffe254273157a21:libports/ChangeLog
+ $ git show 2772f5c6a6a51cf946fd95bf6ffe254273157a21:libps/ChangeLog
+ $ git show 2772f5c6a6a51cf946fd95bf6ffe254273157a21:libshouldbeinlibc/ChangeLog
+ $ git show 2772f5c6a6a51cf946fd95bf6ffe254273157a21:libstore/ChangeLog
+ $ git show 2772f5c6a6a51cf946fd95bf6ffe254273157a21:libthreads/ChangeLog
+ $ git show 2772f5c6a6a51cf946fd95bf6ffe254273157a21:libtrivfs/ChangeLog
+ $ git show 2772f5c6a6a51cf946fd95bf6ffe254273157a21:login/ChangeLog
+ $ git show 2772f5c6a6a51cf946fd95bf6ffe254273157a21:mach-defpager/ChangeLog
+ $ git show 2772f5c6a6a51cf946fd95bf6ffe254273157a21:nfs/ChangeLog
+ $ git show 2772f5c6a6a51cf946fd95bf6ffe254273157a21:nfsd/ChangeLog
+ $ git show 2772f5c6a6a51cf946fd95bf6ffe254273157a21:pfinet/ChangeLog
+ $ git show 2772f5c6a6a51cf946fd95bf6ffe254273157a21:pflocal/ChangeLog
+ $ git show 2772f5c6a6a51cf946fd95bf6ffe254273157a21:proc/ChangeLog
+ $ git show 2772f5c6a6a51cf946fd95bf6ffe254273157a21:release/ChangeLog
+ $ git show 2772f5c6a6a51cf946fd95bf6ffe254273157a21:serverboot/ChangeLog
+ $ git show 2772f5c6a6a51cf946fd95bf6ffe254273157a21:storeio/ChangeLog
+ $ git show 2772f5c6a6a51cf946fd95bf6ffe254273157a21:sutils/ChangeLog
+ $ git show 2772f5c6a6a51cf946fd95bf6ffe254273157a21:term/ChangeLog
+ $ git show 2772f5c6a6a51cf946fd95bf6ffe254273157a21:tmpfs/ChangeLog
+ $ git show 2772f5c6a6a51cf946fd95bf6ffe254273157a21:trans/ChangeLog
+ $ git show 2772f5c6a6a51cf946fd95bf6ffe254273157a21:ufs-fsck/ChangeLog
+ $ git show 2772f5c6a6a51cf946fd95bf6ffe254273157a21:ufs-utils/ChangeLog
+ $ git show 2772f5c6a6a51cf946fd95bf6ffe254273157a21:ufs/ChangeLog
+ $ git show 2772f5c6a6a51cf946fd95bf6ffe254273157a21:usermux/ChangeLog
+ $ git show 2772f5c6a6a51cf946fd95bf6ffe254273157a21:utils/ChangeLog
diff --git a/INSTALL-cross b/INSTALL-cross
index 80c47441..f91d1195 100644
--- a/INSTALL-cross
+++ b/INSTALL-cross
@@ -4,8 +4,7 @@ Cross-compiling the GNU Hurd -*- Outline -*-
The procedure described below -- albeit not completely obsolete, of course --
is outdated a bit. If you attempt to build a cross compiler, have a look at
-<http://nic-nac-project.de/~schwinge/tmp/cross-gnu-env> and
-<http://nic-nac-project.de/~schwinge/tmp/cross-gnu> for now.
+<http://www.bddebian.com/~wiki/hurd/building/cross-compiling/> for now.
Last update 1998-06-01 Gordon Matzigkeit <gord@gnu.org>.
Previous update 1996-04-11 Thomas Bushnell, n/BSG <thomas@gnu.org>.
diff --git a/Makeconf b/Makeconf
index cc3d48ab..5e33e15b 100644
--- a/Makeconf
+++ b/Makeconf
@@ -65,7 +65,8 @@ INCLUDES += -I$(..)include -I$(top_srcdir)/include
CPPFLAGS += $(INCLUDES) \
-D_GNU_SOURCE -D_IO_MTSAFE_IO -D_FILE_OFFSET_BITS=64 \
$($*-CPPFLAGS)
-CFLAGS += -std=gnu99 -Wall -g -O3
+CFLAGS += -std=gnu99 $(gnu89-inline-CFLAGS) -Wall -g -O3 \
+ $($*-CFLAGS)
# Include the configure-generated file of parameters.
# This sets up variables for build tools and installation directories.
@@ -245,17 +246,12 @@ $(includedir)/$(installhdrsubdir): $(includedir)
# Arrange to have the headers installed locally anytime we build the library.
# Not quite perfect, but at least it does end up getting done; and once done
# it never needs to be repeated for a particular header.
-ifeq ($(installhdrsubdir),.)
-local-installhdrsubdir = include
-else
-local-installhdrsubdir = $(installhdrsubdir)
-endif
-ifneq ($(local-installhdrsubdir),$(dir))
+local-installhdrsubdir = include/$(installhdrsubdir)
INSTALLED_LOCAL_HEADERS := $(installhdrs:%=../$(local-installhdrsubdir)/%)
$(INSTALLED_LOCAL_HEADERS): ../$(local-installhdrsubdir)/%: ../config.make
@rm -f $@
+ @test -d $(@D)/ || $(MKINSTALLDIRS) $(@D)
echo '#include "../$(dir)/$*"' > $@
-endif
libs: $(INSTALLED_LOCAL_HEADERS)
# Make sure we make those before compiling, since -MG will be unhelpful.
$(patsubst %.o,%.d,$(filter %.o,$(OBJS))): $(INSTALLED_LOCAL_HEADERS)
@@ -329,7 +325,8 @@ $(progtarg): %$(target-suffix): $(BUGADDR)
$(addsuffix .static,$(progtarg)): %$(target-suffix).static: $(BUGADDR)
$(link-executable) -static \
'-Wl,-(' $(patsubst %.so,%.a,$^) $($*-LDLIBS) $(LDLIBS) \
- '-Wl,-)'
+ '-Wl,-)' \
+ $(and $(filter %/libstore_part.a,$^), $(PARTED_LIBS))
endif
# Just like above, but tell how to make .prof versions of programs.
@@ -385,7 +382,7 @@ $(..)$(dir).d: $(srcdir)/Makefile
echo $(dir): $(hurd-bug-addr-dir-dep) $(addprefix lib,$(HURDLIBS)) > $@
# Making a snapshot
-distfiles = Makefile ChangeLog $(SRCS) $(LCLHDRS) $(DIST_FILES)
+distfiles = Makefile $(SRCS) $(LCLHDRS) $(DIST_FILES)
lndist: $(distfiles) $(top_srcdir)/hurd-snap/$(dir) FORCE
ln $(addprefix $(srcdir)/,$(distfiles)) $(top_srcdir)/hurd-snap/$(dir)
@@ -472,6 +469,7 @@ relink:
# Tell make where to find other -l libraries that we use
vpath libutil.% $(libdir)/
+# The libstore_%.a files fetch symbols from libstore.so
ifneq ($(dir),libstore)
$(boot-store-types:%=../libstore/libstore_%.a): ../libstore/libstore.so
endif
@@ -615,6 +613,6 @@ endef
echo '$*.o: $<' > $@
# Rule to make executable shell scripts from .sh files.
-%: %.sh $(top_srcdir)/sh-version.sed
- sed -e 's/STANDARD_HURD_VERSION_\\(.[^_]*\\)_/\\1 (GNU Hurd) $(hurd-version)/' < $< > $@
+%: %.sh
+ sed -e 's/STANDARD_HURD_VERSION_\(.[^_]*\)_/\1 (GNU Hurd) $(hurd-version)/' < $< > $@
chmod +x $@
diff --git a/Makefile b/Makefile
index 6d7e688a..ad187d0d 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,6 @@
#
# Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2002, 2004,
-# 2006 Free Software Foundation, Inc.
+# 2006, 2009 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
@@ -21,7 +21,7 @@ makemode := misc
include ./Makeconf
-DIST_FILES = COPYING Makeconf config.make.in configure.in configure \
+DIST_FILES = ChangeLog COPYING Makeconf config.make.in configure.in configure \
move-if-change hurd.boot build.mk.in build.mkcf.in aclocal.m4 \
README NEWS tasks INSTALL INSTALL-cross version.h.in
@@ -31,8 +31,7 @@ DIST_FILES = COPYING Makeconf config.make.in configure.in configure \
# Hurd libraries
lib-subdirs = libshouldbeinlibc libihash libiohelp libports libthreads \
libpager libfshelp libdiskfs libtrivfs libps \
- libnetfs libpipe libstore libhurdbugaddr libftpconn libcons \
- libpthread
+ libnetfs libpipe libstore libhurdbugaddr libftpconn libcons
# Hurd programs
prog-subdirs = auth proc exec init term \
diff --git a/auth/ChangeLog b/auth/ChangeLog
deleted file mode 100644
index caddb11f..00000000
--- a/auth/ChangeLog
+++ /dev/null
@@ -1,217 +0,0 @@
-2003-08-17 Marcus Brinkmann <marcus@gnu.org>
-
- * auth.c: Include <stddef.h>.
- (pending_users, pending_server): Change type to struct hurd_ihash,
- initialize with HURD_IHASH_INITIALIZER.
- (struct pending): Change type of member LOCP to hurd_ihash_locp_t.
- (S_auth_user_authenticate): Use hurd_ihash_* functions instead
- ihash_*.
- (S_auth_server_authenticate): Likewise.
- (main): Do not allocate the hash tables.
-
-2002-05-07 Roland McGrath <roland@frob.com>
-
- * auth.c (S_auth_getids): u_int -> size_t
- (S_auth_makeauth, S_auth_server_authenticate): Likewise.
- (idvec_copyout): Fix argument type; make static.
-
-2002-05-03 Roland McGrath <roland@frob.com>
-
- * auth.c (S_auth_server_authenticate): Take reply port args.
-
-2001-02-12 Marcus Brinkmann <marcus@gnu.org>
-
- * auth.c (main): New variable ARGP defining a doc string.
- Pass address of ARGP to argp_parse().
-
-2000-07-26 Mark Kettenis <kettenis@gnu.org>
-
- * Makefile (HURDLIBS): Reorder libs such that the threads lib
- comes before the ports lib. This makes sure the functions in
- libthreads properly override the stubs in libports with the new
- dynamic linker semantics in glibc 2.2.
-
-1999-05-13 Roland McGrath <roland@baalperazim.frob.com>
-
- * auth.c (S_auth_server_authenticate, S_auth_user_authenticate): If
- rendezvous port arrives as MACH_PORT_DEAD, fail with EINVAL.
-
-1999-05-02 Roland McGrath <roland@baalperazim.frob.com>
-
- * auth.c: Include <error.h>.
-
-1999-05-01 Roland McGrath <roland@baalperazim.frob.com>
-
- * auth.c (main): Give diagnostics for lack of bootstrap port or
- failure of startup_authinit RPC.
-
-1998-11-27 Mark Kettenis <kettenis@phys.uva.nl>
-
- * auth.c (main): Call _hurd_proc_init with new args set to zero.
-
-Wed Aug 20 14:01:43 1997 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * auth.c (main): New args for
- ports_manage_port_operations_multithread.
-
-Wed Feb 19 23:04:30 1997 Miles Bader <miles@gnu.ai.mit.edu>
-
- * auth.c (argp_program_version): Make const.
-
-Thu Sep 12 16:27:31 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * Makefile (HURDLIBS): New variable.
- (auth): Delete special depedencies.
-
-Thu Sep 5 11:05:37 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * auth.c (AUTH_VERSION): Delete macro.
- (argp_program_version): Use STANDARD_HURD_VERSION.
- (main): Pass empty string as release; HURD_VERSION as version.
-
-Fri Jul 19 00:35:46 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * auth.c (S_auth_makeauth): Deallocate initial reference to
- NEWAUTH after *NEWHANDLE has been set.
-
-Thu Jul 18 19:31:53 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * auth.c (S_auth_makeauth): It's fine if a passed in auth port is
- not one we know about; just make the loops across AUTHS deal
- properly with null values. Only deallocate the AUTHPTS passed in
- if we don't encounter any errors. Always deallocate the
- references in the AUTHS array. ISUID and GROUPMEMBER functions
- should check both effective and auxiliary members of AUTH.
- (struct pending): Delete member `passthrough_type'.
- (S_auth_user_authenticate): Always use MOVE_SEND to send pass
- through port back to user.
- (S_auth_server_authenticate): Don't bother initializing
- U.passthrough_type or S.passthrough_type.
-
-Sat Jul 6 23:16:42 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * auth.c (AUTH_VERSION): New macro.
- (argp_program_version): New variable.
- (auth_version): Variable removed.
- (main): Call argp_parse to get defaults.
- Use AUTH_VERSION instead of auth_version.
- <argp.h>: New include.
- <idvec.h>: Changed from <hurd/idvec.h>.
-
-Wed Jun 26 14:22:51 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * auth.c (S_auth_makeauth): Don't special-case the 0 explicit ids
- case (it used to merge in all the ids from passed in auth-handles
- in that case).
-
-Mon May 6 14:22:13 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * auth.c (auth_version): Upgrade to 0.0.
-
-Sat May 4 22:40:42 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * auth.c (S_auth_user_authenticate, S_auth_server_authenticate):
- Use ports_interrupt_self_on_port_death instead of
- cancel_on_dead_name. Hurd_condition_wait returns a boolean, not
- an error_t, so supply EINTR ourselves.
- (cancel_on_dead_name): Function removed.
-
-Fri May 3 17:07:45 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
-
- * auth.c (S_auth_server_authenticate, S_auth_user_authenticate):
- Remove IGNORED arg.
-
-Tue Apr 30 21:16:07 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
-
- * auth.c (S_auth_makeauth): Increment NAUTHS for first elt.
- (main): Initialize the ihash tables, dammit.
-
-Thu Apr 25 02:57:53 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
-
- * auth.c: Rewritten.
- * authmutations.h: New file.
- * Makefile (LCLHDRS): Add it, remove auth_mig.h.
- (OBJS): Remove auth_replyUser.o, notifyServer.o.
- (auth): Depend on libports, libihash, libthreads, libshouldbeinlibc.
-
- * auth_mig.h: Rewritten.
- * Makefile (OBJS): Add auth_replyUser.o.
-
-Thu Jul 6 15:29:43 1995 Michael I Bushnell <mib@duality.gnu.ai.mit.edu>
-
- * Makefile: Removed dependencies that are now automatically
- generated.
-
-Fri Nov 18 07:34:11 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * Makefile (OBJS): Add notifyServer.o.
- (auth.o): Depend on notify_S.h.
- * auth.c: Include "notify_S.h". Remove _S_ from all
- do_mach_notify_* server routines.
-
-Wed Sep 7 13:14:41 1994 Michael I Bushnell <mib@churchy.gnu.ai.mit.edu>
-
- * auth.c (isuid): Look for TEST in the uid arrays, not the gid arrays.
-
-Tue Sep 6 14:33:02 1994 Michael I Bushnell <mib@churchy.gnu.ai.mit.edu>
-
- * auth.c (auth_nosenders): Remove auth struct from allapts
- list correctly.
-
-Thu Aug 25 13:24:24 1994 Michael I Bushnell <mib@geech.gnu.ai.mit.edu>
-
- * auth.c (struct saved_user): Use second rendezvous port in place
- of rend_int.
- (strut saved_server): Likewise.
- (S_auth_user_authenticate): Replace int arg with secondary
- rendezvous port. Check it instead of old rend_int for match.
- Deallocate it (twice) if we are completing the auth transaction
- here. Store it in U in place of the old int.
- (S_auth_server_authenticate): Likewise, mutatis mutandis.
-
-Mon Aug 15 11:52:49 1994 Michael I Bushnell <mib@geech.gnu.ai.mit.edu>
-
- * auth.c (main): Make startup_essential_task the last thing we
- do before processing messages.
-
-Thu Jul 21 18:39:38 1994 Michael I Bushnell <mib@geech.gnu.ai.mit.edu>
-
- * Makefile: Rewritten in accord with new scheme.
- * auth.c: Include "auth_reply_U.h" instead of "auth_reply.h".
-
-Tue Jul 19 12:32:54 1994 Michael I Bushnell (mib@churchy.gnu.ai.mit.edu)
-
- * Makefile (auth): Don't use variable $(link) anymore.
-
-Tue Jul 5 14:18:23 1994 Michael I Bushnell (mib@churchy.gnu.ai.mit.edu)
-
- * Makefile (SRCS, TAGSHDRS): New variables.
-
-Mon Jun 20 15:04:42 1994 Michael I Bushnell (mib@churchy.gnu.ai.mit.edu)
-
- * Makefile (install): Use $(INSTALL_BIN) instead of cp.
-
-Thu May 19 15:18:52 1994 Michael I Bushnell (mib@geech.gnu.ai.mit.edu)
-
- * auth.c (auth_nosenders): Take auth off of allapts list
- before destroying it.
-
-Thu May 12 15:28:50 1994 Michael I Bushnell (mib@geech.gnu.ai.mit.edu)
-
- * auth.c (main): Declare args ARGC and ARGV; pass ARGV in call
- to _hurd_proc_init.
-
-Mon May 9 16:50:09 1994 Michael I Bushnell (mib@geech.gnu.ai.mit.edu)
-
- * auth.c (auth_version): New variable.
- (main): Call proc_register_version.
-
-Thu May 5 07:42:28 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
-
- * Makefile: Change uses of $(headers) to $(includedir).
-
-Fri Apr 29 16:50:50 1994 Michael I Bushnell (mib@churchy.gnu.ai.mit.edu)
-
- * auth.c (main): Fetch hostpriv arg and provide it to
- startup_essential_task in accord with interface change to
- startup.defs.
diff --git a/auth/auth.c b/auth/auth.c
index 3c5fa861..11db0f8f 100644
--- a/auth/auth.c
+++ b/auth/auth.c
@@ -251,11 +251,22 @@ S_auth_makeauth (struct authhandle *auth,
/* Transaction handling. */
-/* A pending transaction. */
-struct pending
+/* Since the user is responsible for freeing the rendezvous port, it has to
+ * wait for the server to have finished transmitting uids.
+ *
+ * The server thus waits for the user to give it uids (unless it was already
+ * there), transmits them and provides the passthrough port.
+ *
+ * The user gives the uids and waits for the passthrough port from the server.
+ *
+ * If the user is early, it has to tell the server it arrived.
+ */
+
+/* A pending user. */
+struct pending_user
{
- hurd_ihash_locp_t locp; /* Position in one of the ihash tables. */
- struct condition wakeup; /* The waiter is blocked on this condition. */
+ hurd_ihash_locp_t locp; /* Position in the pending_users ihash table. */
+ struct condition wakeup; /* The reader is blocked on this condition. */
/* The user's auth handle. */
struct authhandle *user;
@@ -264,11 +275,18 @@ struct pending
mach_port_t passthrough;
};
+/* A pending server. */
+struct pending_server
+ {
+ hurd_ihash_locp_t locp; /* Position in the pending_servers ihash table. */
+ struct condition wakeup; /* The server is blocked on this condition. */
+ };
+
/* Table of pending transactions keyed on RENDEZVOUS. */
struct hurd_ihash pending_users
- = HURD_IHASH_INITIALIZER (offsetof (struct pending, locp));
+ = HURD_IHASH_INITIALIZER (offsetof (struct pending_user, locp));
struct hurd_ihash pending_servers
- = HURD_IHASH_INITIALIZER (offsetof (struct pending, locp));
+ = HURD_IHASH_INITIALIZER (offsetof (struct pending_server, locp));
struct mutex pending_lock = MUTEX_INITIALIZER;
/* Implement auth_user_authenticate as described in <hurd/auth.defs>. */
@@ -280,7 +298,9 @@ S_auth_user_authenticate (struct authhandle *userauth,
mach_port_t *newport,
mach_msg_type_name_t *newporttype)
{
- struct pending *s;
+ struct pending_server *s;
+ struct pending_user u;
+ error_t err;
if (! userauth)
return EOPNOTSUPP;
@@ -288,64 +308,54 @@ S_auth_user_authenticate (struct authhandle *userauth,
if (rendezvous == MACH_PORT_DEAD) /* Port died in transit. */
return EINVAL;
+ u.user = userauth;
+ condition_init (&u.wakeup);
+
mutex_lock (&pending_lock);
- /* Look for this port in the server list. */
- s = hurd_ihash_find (&pending_servers, rendezvous);
- if (s)
- {
- /* Found it! Extract the port. */
- *newport = s->passthrough;
- *newporttype = MACH_MSG_TYPE_MOVE_SEND;
+ err = hurd_ihash_add (&pending_users, rendezvous, &u);
+ if (err) {
+ mutex_unlock (&pending_lock);
+ return err;
+ }
- /* Remove it from the pending list. */
- hurd_ihash_locp_remove (&pending_servers, s->locp);
+ /* Give the server the auth port.
+ We need to add a ref in case the port dies. */
+ ports_port_ref (userauth);
- /* Give the server the auth port and wake the RPC up.
- We need to add a ref in case the port dies. */
- s->user = userauth;
- ports_port_ref (userauth);
+ /* Look for this rendezvous in the server list. */
+ s = hurd_ihash_find (&pending_servers, rendezvous);
+ if (s) {
+ /* Found it! */
- condition_signal (&s->wakeup);
- mutex_unlock (&pending_lock);
+ /* Remove it from the pending list. */
+ hurd_ihash_locp_remove (&pending_servers, s->locp);
- mach_port_deallocate (mach_task_self (), rendezvous);
- return 0;
- }
- else
+ /* Tell it we eventually arrived. */
+ condition_signal (&s->wakeup);
+ }
+
+ ports_interrupt_self_on_port_death (userauth, rendezvous);
+ /* Wait for server answer. */
+ if (hurd_condition_wait (&u.wakeup, &pending_lock) &&
+ hurd_ihash_find (&pending_users, rendezvous))
+ /* We were interrupted; remove our record. */
{
- /* No pending server RPC for this port.
- Create a pending user RPC record. */
- struct pending u;
- error_t err;
+ hurd_ihash_locp_remove (&pending_users, u.locp);
+ err = EINTR;
+ }
- err = hurd_ihash_add (&pending_users, rendezvous, &u);
- if (! err)
- {
- /* Store the user auth port and wait for the server RPC to wake
- us up. */
- u.user = userauth;
- condition_init (&u.wakeup);
- ports_interrupt_self_on_port_death (userauth, rendezvous);
- if (hurd_condition_wait (&u.wakeup, &pending_lock))
- /* We were interrupted; remove our record. */
- {
- hurd_ihash_locp_remove (&pending_users, u.locp);
- err = EINTR;
- }
- }
- /* The server side has already removed U from the ihash table. */
- mutex_unlock (&pending_lock);
+ mutex_unlock (&pending_lock);
- if (! err)
- {
- /* The server RPC has set the port and signalled U.wakeup. */
- *newport = u.passthrough;
- *newporttype = MACH_MSG_TYPE_MOVE_SEND;
- mach_port_deallocate (mach_task_self (), rendezvous);
- }
- return err;
+ if (! err)
+ {
+ /* Extract the port. */
+ *newport = u.passthrough;
+ *newporttype = MACH_MSG_TYPE_MOVE_SEND;
+ mach_port_deallocate (mach_task_self (), rendezvous);
}
+
+ return err;
}
/* Implement auth_server_authenticate as described in <hurd/auth.defs>. */
@@ -365,8 +375,9 @@ S_auth_server_authenticate (struct authhandle *serverauth,
uid_t **agids,
size_t *nagids)
{
- struct pending *u;
+ struct pending_user *u;
struct authhandle *user;
+ error_t err;
if (! serverauth)
return EOPNOTSUPP;
@@ -376,63 +387,69 @@ S_auth_server_authenticate (struct authhandle *serverauth,
mutex_lock (&pending_lock);
- /* Look for this port in the user list. */
+ /* Look for this rendezvous in the user list. */
u = hurd_ihash_find (&pending_users, rendezvous);
+ if (! u)
+ {
+ /* User not here yet, have to wait for it. */
+ struct pending_server s;
+ condition_init (&s.wakeup);
+ err = hurd_ihash_add (&pending_servers, rendezvous, &s);
+ if (! err)
+ {
+ ports_interrupt_self_on_port_death (serverauth, rendezvous);
+ if (hurd_condition_wait (&s.wakeup, &pending_lock) &&
+ hurd_ihash_find (&pending_servers, rendezvous))
+ /* We were interrupted; remove our record. */
+ {
+ hurd_ihash_locp_remove (&pending_servers, s.locp);
+ err = EINTR;
+ }
+ else
+ {
+ u = hurd_ihash_find (&pending_users, rendezvous);
+ if (! u)
+ /* User still not here, odd! */
+ err = EINTR;
+ }
+ }
+ }
+
if (u)
{
+ error_t err2;
+
/* Remove it from the pending list. */
hurd_ihash_locp_remove (&pending_users, u->locp);
- /* Found it! We must add a ref because the one held by the
- user RPC might die as soon as we unlock pending_lock. */
+ /* Found it! */
user = u->user;
- ports_port_ref (user);
+
+ mutex_unlock (&pending_lock);
+
+ /* Tell third party. */
+ err2 = auth_server_authenticate_reply (reply, reply_type, 0,
+ user->euids.ids, user->euids.num,
+ user->auids.ids, user->auids.num,
+ user->egids.ids, user->egids.num,
+ user->agids.ids, user->agids.num);
+
+ if (err2)
+ mach_port_deallocate (mach_task_self (), reply);
+
+ mutex_lock (&pending_lock);
/* Give the user the new port and wake the RPC up. */
u->passthrough = newport;
condition_signal (&u->wakeup);
- mutex_unlock (&pending_lock);
}
- else
- {
- /* No pending user RPC for this port.
- Create a pending server RPC record. */
- struct pending s;
- error_t err;
- err = hurd_ihash_add (&pending_servers, rendezvous, &s);
- if (! err)
- {
- /* Store the new port and wait for the user RPC to wake us up. */
- s.passthrough = newport;
- condition_init (&s.wakeup);
- ports_interrupt_self_on_port_death (serverauth, rendezvous);
- if (hurd_condition_wait (&s.wakeup, &pending_lock))
- /* We were interrupted; remove our record. */
- {
- hurd_ihash_locp_remove (&pending_servers, s.locp);
- err = EINTR;
- }
- }
- /* The user side has already removed S from the ihash table. */
- mutex_unlock (&pending_lock);
-
- if (err)
- return err;
+ mutex_unlock (&pending_lock);
- /* The user RPC has set the port (with a ref) and signalled S.wakeup. */
- user = s.user;
- }
+ if (err)
+ return err;
- /* Extract the ids. We must use a separate reply stub so
- we can deref the user auth handle after the reply uses its
- contents. */
- auth_server_authenticate_reply (reply, reply_type, 0,
- user->euids.ids, user->euids.num,
- user->auids.ids, user->auids.num,
- user->egids.ids, user->egids.num,
- user->agids.ids, user->agids.num);
ports_port_deref (user);
mach_port_deallocate (mach_task_self (), rendezvous);
return MIG_NO_REPLY;
diff --git a/benchmarks/ChangeLog b/benchmarks/ChangeLog
deleted file mode 100644
index 82eaf033..00000000
--- a/benchmarks/ChangeLog
+++ /dev/null
@@ -1,20 +0,0 @@
-2002-06-15 Roland McGrath <roland@frob.com>
-
- * forks.c (main): Fix cast of sbrk result.
-
-1999-10-01 Roland McGrath <roland@baalperazim.frob.com>
-
- * forks.c: Add #include's to silence implicit decl warnings
- (main): Use time_t and add a cast, to silence type warnings.
-
-1999-09-14 Thomas Bushnell, BSG <tb@mit.edu>
-
- * forks.c (main): Count argc correctly.
-
-Wed Apr 12 11:25:25 1995 Michael I Bushnell <mib@duality.gnu.ai.mit.edu>
-
- * Makefile (OBJS): New var.
-
-Tue Apr 11 11:17:32 1995 Michael I Bushnell <mib@duality.gnu.ai.mit.edu>
-
- * Makefile: Rewrote in accordance with new scheme.
diff --git a/benchmarks/forks.c b/benchmarks/forks.c
index 4f500d9a..ed8e53e1 100644
--- a/benchmarks/forks.c
+++ b/benchmarks/forks.c
@@ -16,6 +16,7 @@
int
main(argc, argv)
+ int argc;
char *argv[];
{
register int nforks, i;
diff --git a/boot/ChangeLog b/boot/ChangeLog
deleted file mode 100644
index b1e3a6ad..00000000
--- a/boot/ChangeLog
+++ /dev/null
@@ -1,893 +0,0 @@
-2006-03-15 Thomas Schwinge <tschwinge@gnu.org>
-
- * boot.c (boot_script_exec_cmd): Fix invalid lvalues.
-
-2003-01-04 Roland McGrath <roland@frob.com>
-
- * boot_script.c (boot_script_parse_line): Copy the file name into
- malloc'd storage.
- (add_arg): New arg TEXTLEN. Store malloc'd copy of TEXT.
- (boot_script_parse_line): Update callers.
-
-2002-06-13 Roland McGrath <roland@frob.com>
-
- * boot.c (ds_device_write): int -> size_t in store_write call.
- (ds_device_write_inband): Likewise.
-
-2002-06-08 Roland McGrath <roland@frob.com>
-
- * boot.c (S_io_identity): Use ino_t for FILENO.
-
-2002-05-31 Roland McGrath <roland@frob.com>
-
- * boot.c: Don't include "exec_S.h".
-
- * boot.c (boot_script_exec_cmd): Fix typos:
- {I386,ALPHA}_THREAD_STATE -> {i386,ALPHA}_THREAD_STATE_COUNT
-
-2002-05-28 Roland McGrath <roland@frob.com>
-
- * boot_script.c (boot_script_set_variable): Values int -> integer_t.
- (boot_script_define_function): Likewise.
- (boot_script_parse_line): Likewise.
- (struct sym, struct arg): Likewise.
- (boot_script_exec): Likewise.
- (builtin_symbols): Likewise.
- * boot.c (main): Likewise.
- * boot_script.h: Update decls.
-
- * boot.c (boot_script_exec_cmd)
- [I386_THREAD_STATE]: Conditionalize i386 thread setup code on this.
- [ALPHA_THREAD_STATE]: Add Alpha thread setup code.
- (set_mach_stack_args): Obsolete function removed.
-
- * boot.c (load_image): u_int -> vm_address_t
- (ds_xxx_device_get_status, ds_xxx_device_set_status): u_int -> size_t
- (S_io_restrict_auth, S_io_reauthenticate): Likewise.
- (ds_device_write, ds_device_read_inband): Likewise.
- (ds_device_get_status): Likewise.
- (ds_device_set_status): Likewise.
- (boot_script_exec_cmd): Likewise.
- (ds_device_read, ds_device_write_inband): Likewise.
- (ds_xxx_device_set_filter): Likewise.
- (ds_device_set_filter): Likewise.
-
-2002-05-13 Marcus Brinkmann <marcus@gnu.org>
-
- * boot.c: Include <version.h>
- (argp_program_version): New variable.
-
-2002-03-23 James A. Morrison <ja2morri@uwaterloo.ca>
-
- * boot.c (main): Use error, not perror and exit.
-
-2001-10-07 Neal H Walfield <neal@cs.uml.edu>
-
- * boot.c (main): Set the boot script variables based on
- the KERNEL_COMMAND_LINE value.
-
-2001-08-23 Roland McGrath <roland@frob.com>
-
- * boot.c (kernel_command_line): New variable.
- (options): Add --kernel-command-line/-K.
- (parse_opt): Parse it, set kernel_command_line.
- (main): If unset, default it to "argv[0] bootstrap_args bootdevice".
- Set ${kernel-command-line} boot script variable to kernel_command_line.
-
-2001-08-17 Neal H Walfield <neal@cs.uml.edu>
-
- * userland-boot.c (boot_script_task_create): Suspend the newly
- created task as the protocol requires.
- (boot_script_insert_right): Fix the error message.
-
-2001-08-17 Roland McGrath <roland@frob.com>
-
- * userland-boot.c (boot_script_insert_right): Take new result
- parameter for send right name in target task.
- (boot_script_insert_task_port): New function.
-
- * boot_script.h: Update those two decls.
- (VAL_TASK): New macro.
- * boot_script.c (VAL_SYM, VAL_FUNC): Increase these constants.
- (builtin_symbols): Use VAL_TASK for "task-create".
- (boot_script_exec): Update caller of boot_script_insert_right.
- Treat VAL_TASK like VAL_PORT, but call boot_script_insert_task_port.
-
- * boot_script.h: size_t -> unsigned int
- * boot_script.c: Don't #include <string.h>.
-
-2001-08-16 Roland McGrath <roland@frob.com>
-
- * userland-boot.c (boot_script_insert_right): New function.
- * boot_script.h: Declare it.
- * boot_script.c (boot_script_exec): Use that instead of
- mach_port_insert_right.
-
- * boot_script.h: Protect from multiple inclusion.
- (safe_gets): Remove decl.
-
- * boot_script.h (boot_script_exec_cmd): Change TASK arg type to task_t.
- * userland-boot.c: Likewise.
-
- * boot_script.h (struct cmd): Change `task' member type to `task_t'.
- (boot_script_task_create, boot_script_task_resume,
- boot_script_prompt_task_resume, boot_script_free_task): Declare new
- functions that callers must define.
- * userland-boot.c: Define those.
- * boot_script.c (create_task, resume_task, prompt_resume_task): Use
- those instead of direct Mach calls.
- (free_cmd): Likewise.
- (read_file): Function removed.
- (builtin_symbols): Remove the "read-file" element.
-
- * boot_script.h (boot_script_malloc, boot_script_free): Declare new
- functions that callers must define.
- * boot_script.c: All uses of malloc/free changed to use those instead.
- * userland-boot.c: New file. Defines them using malloc/free.
- * Makefile (SRCS, OBJS): Add it.
- * boot.c (boot_script_malloc, boot_script_free): Old cruft functions
- removed.
-
- * boot_script.c (boot_script_parse_line): Take new first argument HOOK.
- Store it in CMD->hook.
- (main): Update caller.
- (boot_script_exec): Pass CMD->hook as 1st arg to boot_script_exec_cmd.
- (boot_script_exec_cmd): Take new first argument HOOK.
- * boot.c (boot_script_exec_cmd): Likewise.
- * boot_script.h (struct cmd): New member `void *hook'.
- Update decls for HOOK arguments added.
-
-2001-02-25 Roland McGrath <roland@frob.com>
-
- * Makefile (ourdevice.defs): Loosen up regexp since some whitespace in
- the file changed.
-
-2000-12-21 Marcus Brinkmann <marcus@gnu.org>
-
- * boot.c (main): If malloc or realloc fails, print diagnostic
- message and exit.
- (queue_read): Change return type from void to kern_return_t.
- If malloc fails, return D_NO_MEMORY, otherwise D_SUCCESS (to simplify
- code flow, malloc before acquiring the queuelock).
- (ds_device_read): New variable err (local to the block in which it is
- used). If queue_read fails, pass through error.
- (ds_device_read_inband): Likewise.
- (S_io_read): Likewise.
- Reported by Igor Khavkine <i_khavki@alcor.concordia.ca>.
-
-2000-03-17 Roland McGrath <roland@baalperazim.frob.com>
-
- * boot.c (S_io_reauthenticate): Check mach_port_insert_right result
- with assert_perror.
-
-2000-03-17 Thomas Bushnell, BSG <tb@mit.edu>
-
- * boot.c (S_io_reauthenticate): Don't use MACH_MSG_TYPE_MAKE_SEND
- in Hurd RPC.
-
-2000-02-28 Roland McGrath <roland@baalperazim.frob.com>
-
- * boot.c (ds_device_get_status): Accept *STATUSLEN greater than needed.
-
-1999-09-13 Roland McGrath <roland@baalperazim.frob.com>
-
- * boot.c: Reverted changes related to io_map_segment.
-
-1999-09-07 Thomas Bushnell, BSG <tb@mit.edu>
-
- * boot.c (S_io_map_segment): New function.
-
-1999-07-11 Roland McGrath <roland@baalperazim.frob.com>
-
- * boot.c (ds_device_read, S_io_read): Fix sloppy bugs in last change.
-
-1999-07-06 Thomas Bushnell, BSG <tb@mit.edu>
-
- * boot.c (load_image): Use mmap instead of vm_allocate, when
- allocating in mach_task_self ().
- (boot_script_exec_cmd): Likewise.
- (set_mach_stack_args): Likewise.
- (read_reply): Likewise.
- (S_io_read): Likewise.
-
-1999-07-10 Roland McGrath <roland@baalperazim.frob.com>
-
- * boot.c: Add #include <sys/mman.h> for munmap decl.
-
-Mon Jul 5 20:04:06 1999 Thomas Bushnell, BSG <tb@mit.edu>
-
- * boot.c (load_image): Fix typo in cast. Reported by Yamashita
- TAKAO <jargon@lares.dti.ne.jp>.
-
-1999-07-03 Thomas Bushnell, BSG <tb@mit.edu>
-
- * boot.c (load_image): Use munmap instead of vm_deallocate when
- it's from our own task.
- (boot_script_read_file): Likewise.
- (boot_script_exec_cmd): Likewise.
- (set_mach_stack_args): Likewise.
- (ds_device_read_inband): Likewise.
-
-1999-03-20 Roland McGrath <roland@baalperazim.frob.com>
-
- * boot.c (S_term_get_peername): New function.
-
-1999-03-14 Roland McGrath <roland@baalperazim.frob.com>
-
- * boot.c: Fix typo in last change.
-
-1999-03-10 Roland McGrath <roland@baalperazim.frob.com>
-
- * boot.c (main): Only use real device name if root_store is for an
- enforced single run starting at the beginning of the device.
-
-1999-03-09 Roland McGrath <roland@baalperazim.frob.com>
-
- * boot.c (main): Add newline to error msg.
- Patch by Marcus Brinkmann <Marcus.Brinkmann@ruhr-uni-bochum.de>.
-
-1999-02-16 Roland McGrath <roland@baalperazim.frob.com>
-
- * boot.c (S_io_revoke): Add reply, replyPoly args.
-
-Tue Feb 16 05:06:12 1999 Thomas Bushnell, BSG <tb@mit.edu>
-
- * boot.c (S_io_revoke): New (unsupported) routine.
-
-1998-12-26 Roland McGrath <roland@baalperazim.frob.com>
-
- * boot.c (isig): New variable.
- (init_termstate): If it's set, set ISIG flag in c_lflag.
- (options): New option -I/--isig.
- (parse_opt): Make -I set `isig'.
- (boot_script_exec_cmd): Print out args as well as file name.
-
-1998-09-04 Roland McGrath <roland@baalperazim.frob.com>
-
- * boot_script.c: Include <string.h> instead of declaring memset here.
- Include <stdlib.h> instead of declaring malloc, free here.
-
-1997-07-08 Miles Bader <miles@gnu.ai.mit.edu>
-
- * boot_script.c (prompt_resume_task): Pass more than a single
- character buffer to safe_gets.
-
-Mon Jul 7 16:25:49 1997 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * boot.c: Include <fcntl.h> instead of <fcntlbits.h>. Suggested
- by Marcus G. Daniels (marcus@cathcart.sysc.pdx.edu).
-
-1997-06-20 Miles Bader <miles@gnu.ai.mit.edu>
-
- * boot.c (bootscript): Made global.
- (parse_opt): New function.
- (options, doc, args_doc): New variables.
- (bootscript_args): Now an array.
- (ds_device_open, ds_device_close, ds_device_write,
- ds_device_write_inband, ds_device_read, ds_device_read_inband,
- ds_device_get_status, ds_device_set_status, ds_device_map,
- ds_xxx_device_set_filter, ds_xxx_device_get_status,
- ds_xxx_device_set_status, ds_device_set_filter):
- Handle "pseudo-root" device.
- (pseudo_root, root_store): New variables.
- (main): Use argp to parse args, and implement the pseudo-root device.
- Include <argp.h> & <hurd/store.h>
- * Makefile (HURDLIBS): Include libstore & libshouldbeinlibc.
-
-Thu Apr 10 11:53:57 1997 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * boot.c: Don't include varargs.h.
- (set_mach_stack_args): Use stdarg instead of vararg.
-
-Mon Mar 17 13:12:45 1997 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * boot_script.c (boot_script_parse_line): Don't print gratuitous
- output noise.
-
-Thu Sep 12 16:28:47 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * Makefile (HURDLIBS): New variable.
- (boot): Delete special depedencies.
-
-Tue Aug 13 16:57:22 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * Makefile (device.defs): Rule removed.
- (ourdevice.defs): Fix rule to work with Makeconf-generated device.defs.
-
-Tue Aug 13 15:09:45 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * Makefile (ourdevice.defs): Depend on local device.defs.
- (device.defs): New rule.
-
-Mon Aug 12 11:11:08 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * Makefile (ourdevice.defs): Find device.defs under
- install_includedir now.
-
- * Makefile (all): No longer build uxboot by default.
-
-Thu Aug 1 14:38:38 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * boot_script.h (safe_gets): Declare second parm as type `int'.
- * boot.c (safe_gets): Likewise.
-
-Sun Jul 7 21:10:08 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * boot.c (S_io_reauthenticate): Don't use unsafe MOVE_SEND in
- auth_server_authenticate.
-
-Fri May 10 16:11:49 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * boot.c (S_io_identity): Typo.
-
-Fri May 10 09:18:53 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * boot.c (S_io_identity): New function.
-
-Thu May 9 18:57:34 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * boot.c (S_io_select): No longer has TAG parm.
-
- * boot.c (S_io_reauthenticate): Use new interface.
-
-Sun Apr 28 22:50:38 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * boot.c (main): Use select instead of SIGIO.
-
-Mon Apr 15 12:57:29 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * Makefile (uxboot): Permit errors because people might not have
- the a.out-mach3 target installed, and that's OK for many users.
-
- * Makefile (uxboot.0): Find frank1.ld in #(srcdir).
-
- * boot_script.h (safe_gets): Add decl.
- * boot_script.c: Include <stdio.h>.
-
-Wed Apr 3 18:54:22 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * ux.c (printf): Add %d.
-
-Wed Mar 27 11:30:29 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * boot.c [notanymore] (S_tioctl_tiocgeta, S_tioctl_tiocseta,
- S_tioctl_tiocsetaf, term_modes, term_ccs, term_speeds):
- Functions & variables removed.
- * Makefile (COMMON-OBJS): Remove tcattr.o.
- (SRCS): Remove tcattr.c.
-
-Thu Mar 14 10:10:20 1996 Roland McGrath <roland@charlie-brown.gnu.ai.mit.edu>
-
- * Makefile (boot): Depend on libthreads.so, nothing wrong with shared
- libs.
- (uxboot.0, uxboot.1): Use automatic vars in cmds instead of gratuitous
- redundancy.
- (LDFLAGS-uxboot.0): Remove useless indirection through variable.
-
-Wed Feb 14 16:50:05 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * boot.c [!UX]
- (orig_tty_state): New variable.
- (init_termstate, restore_termstate): New hurd versions of these funcs.
- * ux.c (init_termstate, restore_termstate, term_sgb, localbits):
- Moved here from boot.c
-
-Tue Feb 13 18:49:26 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * boot.c (load_image, boot_script_read_file, main): Use O_RDONLY,
- not 0 (kind of ironic, this...).
- (load_image): Give the filename with the error message (and a newline).
-
- * ux.h (O_RDONLY, O_WRONLY, O_RDWR): New macros.
-
- * ux.c, ux.h: New files.
- * boot.c: Move all the ux-specific grot into ux.c & ux.h.
- If UX is defined, include "ux.h", else define hurdish stuff.
- (main): Use get_privileged_ports instead of task_by_pid.
- (load_image, boot_script_read_file, main, do_mach_notify_no_senders,
- do_mach_notify_dead_name): Use host_exit instead of uxexit.
- (boot_script_read_file): Use host_stat instead of uxstat.
- (init_termstate, S_tioctl_tiocseta): Use sg_flags fld in struct sgttyb.
-
- * Makefile (all): Depend on `boot' and `uxboot'.
- (COMMON-OBJS, UX-OBJS): New macros.
- (OBJS): Inherit most names from $(COMMON-OBJS).
- (LCLHDRS): Add ux.h.
- (LDFLAGS): Use target-specific value.
- (uxboot.0-LDFLAGS): New macro (with contents from old LDFLAGS).
- (uxboot.o, uxboot.0): New targets.
- (uxboot): Target renamed from boot.a.
-
-Sun Dec 10 18:05:14 1995 Miles Bader <miles@gnu.ai.mit.edu>
-
- * boot.c (read_reply): Don't call clear_should_read(), just do
- things ourselves.
- (should_read_lock): Variable deleted.
- (service_sigio): Function deleted.
- (main): Use read_reply to service SIGIO again, not service_sigio.
-
- * boot.c (service_sigio): New function, replacing set_should_read.
- Calls read_reply() itself too.
- (unlock_readlock): New function.
- (ds_device_read, ds_device_read_inband, S_io_read): Call
- unlock_readlock instead of directly unlocking READLOCK.
- (request_server, main): Don't call read_reply() anymore.
-
- * boot.c (should_read): New variable.
- (main): SIGIO uses set_should_read instead of read_reply.
- Call read_reply() after sigpause() returns.
- (read_reply): Call clear_should_read(), and don't do anything if
- SHOULD_READ wasn't set.
- (set_should_read): New function.
- (clear_should_read): New function.
- (request_server): Call read_reply() before returning.
-
-Sat Dec 9 19:01:10 1995 Miles Bader <miles@gnu.ai.mit.edu>
-
- * boot.c (S_io_read, ds_device_read_inband, ds_device_read): Don't
- block SIGIO.
- (main): Don't trap SIGMSG & SIGEMSG.
-
-Mon Dec 4 23:54:18 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * boot.c (main): Request no-senders notification on
- pseudo_master_device_port.
- Deallocate our send right to it when we no longer need it.
- (do_mach_notify_no_senders): Exit only when both pseudo_console and
- pseudo_master_device_port have no senders.
- (ds_device_read_inband): Unlock readlock properly.
-
-Thu Nov 30 15:58:47 1995 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * boot.c (readlock): New variable.
- (read_reply): Check FIONREAD before dequeueing QR so that we don't
- abandon requests. Lock READLOCK around FIONREAD/read pair.
- (ds_device_read): Lock READLOCK around FIONREAD/read pair.
- (ds_device_read_inband): Likewise.
- (S_io_read): Likewise.
-
-Nov 22 16:25:01 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * boot.c (request_server): Don't call exec_server.
- (S_exec_*): Functions removed.
- (boot_script_task_port): Variable removed.
- (boot_script_task_*, boot_script_port_*): Functions removed.
-
-Tue Nov 14 12:07:24 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * Makefile (OBJS): Remove execServer.o.
-
-Thu Sep 28 14:47:46 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * boot_script.c (read_file): Pass CMD->path for file name.
- (CHECK_CMDLINE_LEN): Update ARGV pointers after reallocating the line
- buffer.
-
-Wed Sep 27 14:01:03 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * boot.c (struct uxstat): New type.
- (uxfstat): Renamed from fstat; use struct uxstat * for arg.
- (boot_script_read_file): Use those.
- Return the memory object port, not zero.
-
- * boot.c (fstat): New syscall function.
-
- * boot_script.c (read_file): New function.
- (builtin_symbols): Add $(read-file) builtin.
- * boot_script.h (boot_script_read_file): Declare it.
- * boot.c (close): New syscall function.
- (defpager): New variable.
- (main): Set it up.
- (boot_script_read_file): New function.
- (useropen_dir): New variable.
- (useropen): New function.
- (load_image): Call it instead of open.
- (main): Grok -D arg to set useropen_dir.
-
-Sat Sep 23 00:53:51 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * syscall.S: Restore entry SP before return.
-
- * boot.c (main): Use static const for constant strings.
- On boot script error, write script line with error msg.
-
- * boot_script.c (boot_script_parse_line): Ignore line beginning
- with #.
-
- * boot.c (S_io_pathconf): New function.
-
- * Makefile (LDFLAGS): Add -static.
-
-Fri Sep 22 14:14:23 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * mach-crt0.c (__data_start): New variable.
-
-Tue Aug 29 10:41:29 1995 Michael I. Bushnell, p/BSG <mib@duality.gnu.ai.mit.edu>
-
- * boot.c (mig_dealloc_reply_port): Remove __ from call to
- mach_port_mod_refs.
- (main): Look for -d in bootstrap_args, not (nonexistent)
- boot_args. Remove `const' keyword from decl of MSG.
-
- * boot.c (sigblock, sigsetmask): New functions.
- (sigmask): New macro.
- (ds_device_read): Block SIGIO around critical section.
- (ds_device_read_inband): Likewise.
- (S_io_read): Likewise.
-
-Mon Aug 28 17:16:48 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * boot_script.h, boot_script.c: Updated by Shantanu Goel, to
- accept action keywords only inside $(...) and only variable values
- inside ${...}.
- * boot.c: Updated for changes in boot_script.h protocol by
- Shantanu Goel.
- (main): Use boot_script_set_variable instead of magic variables.
- Under -d, pause between parsing bootscript and executing it.
-
-Wed Aug 23 16:08:04 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- New script-driven boot mechanism, mostly implemented by Shantanu Goel.
- * Makefile (SRCS): Add boot_script.c.
- (OBJS): Add boot_script.o.
- (LCLHDRS): New variable.
- (HURDLIBS): Variable removed.
- (boot): Depend on ../libthreads/libthreads.a.
- * boot_script.c, boot_script.h: New files.
- * boot.c (boot_like_kernel, boot_like_cmudef, boot_like_hurd):
- Variables removed.
- (main): Don't interpret switches. Instead of servers, take
- command line argument of boot script file name. Read the file and
- use boot_script functions to parse and execute its directives.
- (boot_script_*): New variables and functions for boot_script callbacks.
-
-Sun Jul 30 23:50:53 1995 Michael I. Bushnell, p/BSG <mib@geech.gnu.ai.mit.edu>
-
- * Makefile: DISTFILES -> DIST_FILES.
-
-Sat Jul 8 11:37:32 1995 Miles Bader <miles@churchy.gnu.ai.mit.edu>
-
- * boot.c (free_reply_ports, free_reply_ports_lock): New variables.
- (__mig_get_reply_port, __mig_put_reply_port, __mig_dealloc_reply_port,
- mig_get_reply_port, mig_put_reply_port, mig_dealloc_reply_port):
- Provide better versions of these routines that won't leak reply ports.
-
-Fri Jul 7 15:55:18 1995 Miles Bader <miles@churchy.gnu.ai.mit.edu>
-
- * mach-crt0.c: New file, from mach4-i386/libmach/standalone.
- * boot.c (mach_init_routine): New variable, wanted by mach-crt0.o.
- (__mig_get_reply_port, __mig_dealloc_reply_port, __mig_put_reply_port):
- New functions, to avoid using hurdish versions.
- * Makefile (OBJS): Add mach-crt0.o.
- (SRCS): Add mach-crt0.c.
- (LDFLAGS): Add -nostartfiles (as we now use mach-crt0.o).
-
-Thu Jul 6 15:30:18 1995 Michael I Bushnell <mib@duality.gnu.ai.mit.edu>
-
- * Makefile (boot.1, boot.a): Use $(LD) and $(OBJCOPY) instead of
- explicit names.
-
- * boot.c: Include <mach/mig_support.h>.
- (S_io_reauthenticate): Cast first arg to mig_deallocate.
- (load_image): Cast second arg to read.
- * tcattr.c: Undo last change; add private decl of ioctl.
-
- * boot.c (bootdevice): Initialize to hard-coded `sd0a' instead of
- DEFAULT_BOOTDEVICE.
-
- * Makefile (all): Depend on boot.a too.
-
- * Makefile: Removed dependencies that are now automatically
- generated.
-
-Wed May 31 10:02:11 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * Makefile (DISTFILES): New variable; include frank1.ld and
- frankemul.ld.
- (CPPFLAGS): Variable removed.
- (LDFLAGS): Append -T frank1.ld.
- (boot.1, boot.a): New targets.
-
- * syscall.S: Omit .globl decl for errno; it caused some as
- complaint.
-
-Mon May 22 11:48:58 1995 Michael I Bushnell <mib@duality.gnu.ai.mit.edu>
-
- * sigvec.S: Remove copyright notice.
-
-Wed May 17 13:10:27 1995 Miles Bader <miles@churchy.gnu.ai.mit.edu>
-
- * boot.c (load_image): Make sure we actually allocate enough
- memory to read into, including the offset into the buffer at which
- the segment is read.
-
- * sigvec.S (sigreturn, _sigreturn, sigvec): Remove the explicit
- underscore prefixes from these names, now that we're using elf.
- Instead we use the various macros from <i386/asm.h>. Also, return
- errors correctly. [Also added a copyright notice]
-
-Sat May 13 03:37:24 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * boot.c (load_image): Fixed alignment calculation in ELF segment
- loading.
-
- * syscall.S: Include i386/asm.h and use ENTRY and EXT macros,
- instead of explicit _s.
-
-Fri May 12 18:36:39 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * boot.c (load_image): Grok ELF executables as well as a.out.
- (main): Load multiple servers. Suspend all but the first.
- The first gets an extra arg, its name for the task port of the
- second.
-
-Wed Apr 12 09:18:50 1995 Miles Bader <miles@churchy.gnu.ai.mit.edu>
-
- * Makefile: Don't try and install boot in /usr/local/bin.
-
-Wed Apr 5 17:25:19 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * boot.c: Don't include <errno.h>. Define `errno' variable.
- * Makefile (SRCS): Add syscall.S.
- (OBJS): Add syscall.o.
- * syscall.S: Check for errors.
-
-Thu Jan 19 01:21:24 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * boot.c (S_io_select): Updated to new io_select protocol.
-
-Fri Dec 9 01:23:22 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * boot.c: Use mach_msg_type_number_t in place of unsigned int and
- int.
-
-Fri Nov 11 14:05:43 1994 Michael I Bushnell <mib@churchy.gnu.ai.mit.edu>
-
- * boot.c (main): Always set `f' flag (signifying "fake" because we
- aren't a real native bootstrap).
-
-Thu Nov 3 17:26:37 1994 Michael I Bushnell <mib@geech.gnu.ai.mit.edu>
-
- * Makefile (boot.o): Depend on bootstrap_S.h.
-
-Fri Oct 28 17:08:12 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * boot.c (main): Create the thread before setting it up.
- (bootstrap_compat): Make a send right for psuedo_master_device_port.
- (main): Explicitly clear NEWTASK's bootstrap port for boot_like_kernel.
- (main): Format strings for port names for boot_like_kernel.
-
-Fri Oct 28 15:26:48 1994 Michael I Bushnell <mib@churchy.gnu.ai.mit.edu>
-
- * boot.c (boot_like_kernel, boot_like_cmudef, boot_like_hurd): New
- global vars.
- (set_mach_stack_args): New function.
- (main): If the -k flag is given, set BOOT_LIKE_KERNEL.
- If the -p flag is given, set BOOT_LIKE_CMUDEF. If neither is
- given, set BOOT_LIKE_HURD.
- Only set a bootstrap port if BOOT_LIKE_CMUDEF or BOOT_LIKE_HURD.
- If BOOT_LIKE_KERNEL or BOOT_LIKE_CMUDEF, set up the stack the
- Mach way using set_mach_stack_args.
- (request_server): Declare and call bootstrap_server.
- (do_bootstrap_priveleged_ports, bootstrap_compat): New functions.
- * Makefile (OBJS): Require bootstrapServer.o.
- * bootstrap.defs: New file.
-
-Tue Aug 30 11:41:33 1994 Michael I Bushnell <mib@geech.gnu.ai.mit.edu>
-
- * boot.c (S_io_reauthenticate): Use new authentication protocol.
-
-Mon Aug 22 13:43:32 1994 Michael I Bushnell <mib@geech.gnu.ai.mit.edu>
-
- * boot.c: Include <cthreads.h>.
- (main): Run msg_thread fork; don't call
- mach_msg_server_timeout here. Use sigpause instead of getpid.
- (msg_thread): New function.
- (queuelock): New variable.
- (queue_read): Acquire queuelock.
- (read_reply): Acquire queuelock.
- * Makefile (HURDLIBS): New var to get threads.
-
-Thu Aug 18 18:04:36 1994 Michael I Bushnell <mib@geech.gnu.ai.mit.edu>
-
- * boot.c (restore_termstate): New function.
- (do_mach_notify_no_senders): Call restore_termstate before exiting.
-
- * boot.c (main): New var `usagemsg'; print it if args are wrong.
- Allow flags and disk device to be given on command line.
- New var `bootfile'.
- (bootdevice, bootstrap_args): New vars.
- (load_image): Exit nicely if the startup file can't be found.
- (S_exec_startup): Use `bootdevice' instead of hardcoded name.
- Use `bootstrap_args' instead of hardcoded "-x".
- (main): Only do `pausing' hack if -d was provided.
-
- * Makefile (CPPFLAGS): Define DEFAULT_BOOTDEVICE.
-
- * Makefile (/usr/local/bin/boot): Depend on boot.
-
- * boot.c (S_termctty_open_terminal): New "function".
- (S_io_select): Added `rettype' arg.
-
-Sat Jul 23 02:58:05 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * Makefile (io-MIGSFLAGS): Renamed from ioMIGSFLAGS.
-
-Fri Jul 22 15:10:45 1994 Michael I Bushnell <mib@geech.gnu.ai.mit.edu>
-
- * boot.c (request_server): Remove S_ from io_server and
- term_server.
-
-Thu Jul 21 19:00:36 1994 Michael I Bushnell <mib@geech.gnu.ai.mit.edu>
-
- * Makefile: Rewritten to use new scheme.
- * boot.c: Include io_reply_U.h and device_reply_U.h instead
- of io_repl.h and device_reply.h.
-
-Wed Jul 20 13:19:45 1994 Michael I Bushnell <mib@geech.gnu.ai.mit.edu>
-
- * boot.c: Comment out bits relating to tioctl interface.
- * Makefile: Likewise.
-
-Tue Jul 19 12:41:46 1994 Michael I Bushnell (mib@churchy.gnu.ai.mit.edu)
-
- * Makefile (boot): Don't use variable $(link) anymore.
-
-Tue Jul 5 14:19:36 1994 Michael I Bushnell (mib@churchy.gnu.ai.mit.edu)
-
- * Makefile (SRCS): New variable.
-
-Sun Jul 3 17:20:07 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
-
- * tcattr.c: New file.
- * boot.c (S_tioctl_tiocgeta): Call tcgetattr.
- (S_tioctl_tiocseta): Call tcsetattr.
- * Makefile (OBJS): Add tcattr.o.
- (DIST_FILES): Add tcattr.c.
-
-Fri Jul 1 11:16:27 1994 Michael I Bushnell (mib@churchy.gnu.ai.mit.edu)
-
- * boot.c (init_termstate): Enter raw mode here.
-
-Fri Jun 24 14:27:56 1994 Michael I Bushnell (mib@churchy.gnu.ai.mit.edu)
-
- * boot.c (S_term_open_ctty): Renamed from term_become_ctty.
- Deleted SIGPT arg. Add msg type arg for NEWTTY.
-
-Fri Jun 17 13:46:07 1994 Michael I Bushnell (mib@geech.gnu.ai.mit.edu)
-
- * boot.c (request_server): Remove S_ prefix from exec_server
- and notify_server.
-
-Fri Jun 17 00:12:16 1994 Roland McGrath (roland@geech.gnu.ai.mit.edu)
-
- * Makefile (boot.o): Depend on term_S.h.
-
-Tue Jun 14 01:28:10 1994 Roland McGrath (roland@geech.gnu.ai.mit.edu)
-
- * boot.c (request_server): Add S_ prefix to demuxer functions.
-
-Wed Jun 8 18:02:19 1994 Roland McGrath (roland@geech.gnu.ai.mit.edu)
-
- * boot.c (S_tioctl_tiocseta): Turn off ECHO.
- (S_io_select): Implement.
-
-Tue Jun 7 04:33:42 1994 Roland McGrath (roland@geech.gnu.ai.mit.edu)
-
- * Makefile (tioctlServer.o): Depend on ../hurd/ioctl_types.h.
-
-Mon Jun 6 20:33:39 1994 Roland McGrath (roland@geech.gnu.ai.mit.edu)
-
- * boot.c (authserver): New variable.
- (S_io_reauthenticate): Do auth_server_authenticate and throw away
- the returned info.
- (S_exec_init): Set authserver to the passed port.
-
-Sat Jun 4 02:32:03 1994 Roland McGrath (roland@geech.gnu.ai.mit.edu)
-
- * boot.c: Include term_S.h and tioctl_S.h.
- (S_term_getctty): New function.
- (S_term_*): Stub functions.
- (request_server): Use S_term_server.
-
- * Makefile (termServer.c term_S.h): New rule.
- (OBJS): Add termServer.o.
-
- * boot.c (S_exec_setexecdata, S_exec_exec): Fix prototypes.
-
-Tue May 17 18:44:29 1994 Michael I Bushnell (mib@churchy.gnu.ai.mit.edu)
-
- * boot.c (ds_device_write): DATA arg is char *; don't dereference
- it in call to write.
-
-Mon May 16 14:34:15 1994 Michael I Bushnell (mib@churchy.gnu.ai.mit.edu)
-
- * boot.c (fsname): New variable.
- (main): Set fsname to argv[1].
- (S_exec_startup): Include fsname in child's argv[0].
-
- * boot.c (init_termstate): Add forward declaration.
- (struct sigvec): Make SV_HANDLER member void (*)().
- (sigvec): Add declaration to avoid warning.
-
-Tue May 10 18:14:39 1994 Michael I Bushnell (mib@geech.gnu.ai.mit.edu)
-
- * boot.c (tioctl_tiocseta, tioctl_tiocsetw, tioctl_tiocsetf,
- tioctl_tiocgeta, init_termstate): New functions.
- (term_modes, term_ccs, term_speeds, term_sgb, localbits): Nev
- vars.
- Also added new bits from ioctl.h.
- (main): Call init_termstate.
- (request_server): Call tioctl_server.
- * Makefile (tioctlServer.c tioctl_S.h): New targets.
- (OBJS): Include tioctlServer.o.
- (boot.o): Depend on tioctl_S.h
-
-Fri May 6 13:56:58 1994 Michael I Bushnell (mib@geech.gnu.ai.mit.edu)
-
- * boot.c (main): Restore braindamage of yesterday relating to
- signals; that is, restore declaration of VEC and calls to sigvec.
- * Makefile (DIST_FILES): Add sigvec.S.
-
-Thu May 5 13:16:42 1994 Michael I Bushnell (mib@geech.gnu.ai.mit.edu)
-
- * Makefile (device_replyUser.c): Mention that this build
- device_reply.h as well.
- (boot.o): Add dependency on device_reply.h and io_repl.h.
-
- * boot.c: Include <stdlib.h> for malloc and free prototypes.
- Include <string.h> for bcopy and bzero prototypes.
- Include <stdio.h> for sprintf prototype.
- Include "device_reply.h" for its prototypes.
- Include "io_reply.h" for its prototypes.
- Declare return type for all the server functions that were lacking
- such.
- (sigpause): Declare type of MASK.
- (ioctl): Declare third arg to be generic pointer, not char *.
- (request_server): Declare MiG functions we call.
- (load_image): Delete unused variable STACKADDR.
- (main): Comment out declaration of VEC.
- Comment out calls to sigvec.
- Cast STARTPC in call to __mach_setup_thread.
- Delete unused variable TIMEOUT.
- (read_reply): Cast BUF correctly in call to ds_device_read_reply.
- (S_exec_startup): Delete unused variable DTABLE.
- (ds_device_write): Double cast arg to write to avoid warning.
- (S_io_read): Order args to vm_allocate properly; cast DATA arg.
- Check *datalen properly for unsigned type.
-
- * boot.c: Renamed _exit to uxexit to avoid library name clash.
- (do_mach_notify_dead_name, do_mach_notify_no_senders):
- Call uxexit instead of _exit.
-
- * boot.c (S_io_async, S_io_get_icky_async_id, S_io_map_cntl):
- Expect new type arg for returned port.
- (S_io_prenotify, S_io_postnotify): START and END args are now
- vm_offset_t.
-
- * boot.c: Change error_t to kern_return_t because error_t
- is now unsigned and conflicts with MiG's use of kern_return_t.
-
- * Makefile (io_S.h, ioServer.c): Punt mungio hack; use
- -DREPLY_PORTS.
- * boot.c: Changed all io server stubs to expect reply ports.
-
- * mungio: removed file.
- * Makefile (DIST_FILES): Removed mungio.
-
- * boot.c (load_image): Only read from the image file the actual
- amount being read, not that amount rounded to the nearest page.
- Otherwise, the first bit of the BSS will not be zero, but will be
- whatever is in the front of the symbol section of the a.out.
-
-Thu May 5 07:43:06 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
-
- * Makefile: Change uses of $(headers) to $(includedir).
-
-Mon May 2 16:47:49 1994 Michael I Bushnell (mib@geech.gnu.ai.mit.edu)
-
- * boot.c (S_io_readable): Implement io_readable fully.
-
-Fri Apr 1 17:55:38 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
-
- * Makefile (OBJS): Remove boot_machdep.o.
diff --git a/boot/boot.c b/boot/boot.c
index 33e1930e..2b143844 100644
--- a/boot/boot.c
+++ b/boot/boot.c
@@ -432,14 +432,53 @@ static struct argp_option options[] =
"Pause for user confirmation at various times during booting" },
{ "isig", 'I', 0, 0,
"Do not disable terminal signals, so you can suspend and interrupt boot."},
+ { "device", 'f', "device_name=device_file", 0,
+ "Specify a device file used by subhurd and its virtual name."},
{ 0 }
};
static char args_doc[] = "BOOT-SCRIPT";
static char doc[] = "Boot a second hurd";
+struct dev_map
+{
+ char *name;
+ mach_port_t port;
+ struct dev_map *next;
+};
+
+static struct dev_map *dev_map_head;
+
+static struct dev_map *add_dev_map (char *dev_name, char *dev_file)
+{
+ struct dev_map *map = malloc (sizeof (*map));
+
+ assert (map);
+ map->name = dev_name;
+ map->port = file_name_lookup (dev_file, 0, 0);
+ if (map->port == MACH_PORT_NULL)
+ error (1, errno, "file_name_lookup: %s", dev_file);
+ map->next = dev_map_head;
+ dev_map_head = map;
+ return map;
+}
+
+static struct dev_map *lookup_dev (char *dev_name)
+{
+ struct dev_map *map;
+
+ for (map = dev_map_head; map; map = map->next)
+ {
+ if (strcmp (map->name, dev_name) == 0)
+ return map;
+ }
+ return NULL;
+}
+
static error_t
parse_opt (int key, char *arg, struct argp_state *state)
{
+ char *dev_file;
+
switch (key)
{
size_t len;
@@ -458,6 +497,14 @@ parse_opt (int key, char *arg, struct argp_state *state)
bootstrap_args[len] = '\0';
break;
+ case 'f':
+ dev_file = strchr (arg, '=');
+ if (dev_file == NULL)
+ return ARGP_ERR_UNKNOWN;
+ *dev_file = 0;
+ add_dev_map (arg, dev_file+1);
+ break;
+
case ARGP_KEY_ARG:
if (state->arg_num == 0)
bootscript = arg;
@@ -683,6 +730,7 @@ main (int argc, char **argv, char **envp)
int i = strlen (str);
write (2, str, i);
+ write (2, "\n", 1);
host_exit (1);
}
free (buf);
@@ -779,7 +827,7 @@ read_reply ()
if (! spin_try_lock (&readlock))
return;
- /* Since we're commited to servicing the read, no one else need do so. */
+ /* Since we're committed to servicing the read, no one else need do so. */
should_read = 0;
ioctl (0, FIONREAD, &avail);
@@ -942,6 +990,8 @@ ds_device_open (mach_port_t master_port,
mach_port_t *device,
mach_msg_type_name_t *devicetype)
{
+ struct dev_map *map;
+
if (master_port != pseudo_master_device_port)
return D_INVALID_OPERATION;
@@ -965,6 +1015,13 @@ ds_device_open (mach_port_t master_port,
return 0;
}
+ map = lookup_dev (name);
+ if (map)
+ {
+ *devicetype = MACH_MSG_TYPE_MOVE_SEND;
+ return device_open (map->port, mode, "", device);
+ }
+
*devicetype = MACH_MSG_TYPE_MOVE_SEND;
return device_open (master_device_port, mode, name, device);
}
diff --git a/bsdfsck/ChangeLog b/bsdfsck/ChangeLog
deleted file mode 100644
index 0a948518..00000000
--- a/bsdfsck/ChangeLog
+++ /dev/null
@@ -1,98 +0,0 @@
-Thu Jul 6 15:30:43 1995 Michael I Bushnell <mib@duality.gnu.ai.mit.edu>
-
- * Makefile (tables.o): Delete target.
- (vpath tables.c): Tell where to find tables.c.
-
- * Makefile: Removed dependencies that are now automatically
- generated.
-
-Thu Nov 3 17:18:35 1994 Michael I Bushnell <mib@geech.gnu.ai.mit.edu>
-
- * Makefile (dir): Changed to bsdfsck.
- (target): Changed to bsdfsck.
-
-Thu Oct 6 13:19:25 1994 Michael I Bushnell <mib@geech.gnu.ai.mit.edu>
-
- * dir.c (dircheck): Fix from Charles Hannum: dircheck() shouldn't
- be looking at d_type or d_namlen in blank entries *at all*. Not
- only is it wrong, but it causes a serious problem on little-endian
- machines, since after -c2 conversion, d_type will often be > 15.
-
-Wed Oct 5 12:53:45 1994 Michael I Bushnell <mib@geech.gnu.ai.mit.edu>
-
- * pass1.c (checkinode) [mode == 0]: Check that di_trans
- is also clear here.
-
- * fsck.h (IFTODT): Provide macro here.
- * inode.c: Not here.
-
-Tue Oct 4 22:42:54 1994 Michael I Bushnell <mib@churchy.gnu.ai.mit.edu>
-
- * inode.c (ckinode) [dino.di_trans set]: Only call IDESC->id_func
- if IDESC->id_type is ADDR (meaning call function for each block).
- If it's DATA, then that means call dirscan on each data block,
- something entirely different.
-
- * inode.c (IFTODT): Provide macro.
-
-Fri Sep 30 21:28:57 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * Makefile (LCLHDRS): Define.
-
-Fri Sep 16 10:57:04 1994 Michael I Bushnell <mib@churchy.gnu.ai.mit.edu>
-
- * fsck.h (direct): Define macro.
-
-Thu Sep 1 14:51:23 1994 Michael I Bushnell <mib@geech.gnu.ai.mit.edu>
-
- * inode.c (ckinode): Don't pay attention to fs_maxsymlinklen
- if it's -1.
- * pass1.c (checkinode): Likewise.
-
- * fsck.h (DI_MODE): Use | not & for bitwise disjunction.
-
-Fri Aug 26 12:35:21 1994 Michael I Bushnell <mib@geech.gnu.ai.mit.edu>
-
- * main.c (main): Don't call checkblock.
-
- * pass5.c (ffs_fragacct): Copy in function from ../ufs/subr.c.
-
- * inode.c (ckinode): Call IDESC->id_func for passive translator
- if it's set.
-
-Thu Aug 25 11:07:05 1994 Michael I Bushnell <mib@geech.gnu.ai.mit.edu>
-
- * setup.c: Don't include <disklabel.h>.
- (setup): Comment out variable LP and label fetching code.
- (calcsb, getdisklabel): Comment out functions. Replace
- calcsb with one returning constant zero.
-
- * main.c: Don't include <sys/mount.h> or <fstab.h>.
- (main): Don't run checkfstab; just print an error in that case.
- (docheck): Comment out this function.
- (checkfilesys): Comment out special code for HOTROOT.
-
-Wed Aug 24 11:11:23 1994 Michael I Bushnell <mib@geech.gnu.ai.mit.edu>
-
- * fsck.h (NBBY): Define macro.
-
-Tue Aug 23 15:54:49 1994 Michael I Bushnell <mib@geech.gnu.ai.mit.edu>
-
- * dir.c (fileerror): Use DI_MODE instead of di_mode member.
- (adjust): Likewise.
- (linkup): Likewise.
- * inode.c (ckinode): Likewise.
- (clri): Likewise.
- (pinode): Likewise.
- * pass1.c (checkinode): Likewise.
- * pass2.c (pass2check): Likewise.
- * utilities.c (ftypeok): Likewise.
-
- * inode.c (allocino): Set di_model and di_modeh instead of di_mode.
- * pass1.c (checkinode): Likewise.
- * pass2.c (pass2): Likewise.
-
- * fsck.h (DIRSIZ): Replace ufs version with old BSD version.
- (struct dirtemplate, struct odirtemplate): Proved old BSD types.
- (DEV_BSIZE, MAXPATHLEN): Provide definitions.
- (DI_MODE): New macro.
diff --git a/bsdfsck/fsck.h b/bsdfsck/fsck.h
index c418f66c..04bb7698 100644
--- a/bsdfsck/fsck.h
+++ b/bsdfsck/fsck.h
@@ -209,7 +209,7 @@ struct inodesc {
* To check if a block has been found as a duplicate it is only
* necessary to search from duplist through muldup. To find the
* total number of times that a block has been found as a duplicate
- * the entire list must be searched for occurences of the block
+ * the entire list must be searched for occurrences of the block
* in question. The following diagram shows a sample list where
* w (found twice), x (found once), y (found three times), and z
* (found once) are duplicate block numbers:
diff --git a/bsdfsck/preen.c b/bsdfsck/preen.c
index 7893a5e1..5650f900 100644
--- a/bsdfsck/preen.c
+++ b/bsdfsck/preen.c
@@ -51,7 +51,7 @@ struct part {
struct part *next; /* forward link of partitions on disk */
char *name; /* device name */
char *fsname; /* mounted filesystem name */
- long auxdata; /* auxillary data for application */
+ long auxdata; /* auxiliary data for application */
} *badlist, **badnext = &badlist;
struct disk {
diff --git a/bsdfsck/utilities.c b/bsdfsck/utilities.c
index 2141e7f8..1c281b1b 100644
--- a/bsdfsck/utilities.c
+++ b/bsdfsck/utilities.c
@@ -520,7 +520,7 @@ errexit(s1, s2, s3, s4)
}
/*
- * An unexpected inconsistency occured.
+ * An unexpected inconsistency occurred.
* Die if preening, otherwise just print message and continue.
*/
/* VARARGS1 */
diff --git a/config.make.in b/config.make.in
index 4c459f3f..986ea2ae 100644
--- a/config.make.in
+++ b/config.make.in
@@ -51,6 +51,8 @@ CPPFLAGS += @CPPFLAGS@ @DEFS@
CFLAGS += @CFLAGS@
LDFLAGS += @LDFLAGS@
+gnu89-inline-CFLAGS = @libc_cv_gnu89_inline@
+
# `yes' or `no' to indicate if ld --version-script is available.
VERSIONING = @VERSIONING@
diff --git a/config/ChangeLog b/config/ChangeLog
deleted file mode 100644
index 3dc6e2f7..00000000
--- a/config/ChangeLog
+++ /dev/null
@@ -1,210 +0,0 @@
-2004-12-16 Alfred M. Szmidt <ams@gnu.org>
-
- * Makefile ($(installed_logins)): Don't overwrite already existing
- login files unless asked for.
-
-2002-09-30 Marcus Brinkmann <marcus@gnu.org>
-
- * ttys (console): Change type column ($TERM setting) to `mach-color'.
-
-2002-06-05 Roland McGrath <roland@frob.com>
-
- * login-.bash_login: Prepend ~/ to file names.
-
-1999-05-29 Roland McGrath <roland@baalperazim.frob.com>
-
- * ttys (console): Change type column ($TERM setting) to `mach'.
-
- * login-.bashrc: Alias su to login.
-
-1999-05-24 Roland McGrath <roland@baalperazim.frob.com>
-
- * protocols, services, shells, passwd, group, resolv.conf, fstab,
- root-.bash_login, root-.bashrc, root-.profile: Files removed.
- These files are not really Hurd-specific, and so should be installed
- by some other package (and are in Debian).
- * Makefile (SYSCONFFILES): Remove those files from the list.
- (ROOTDOTS, installed_rootdots): Variables removed.
- (DIST_FILES): Remove reference to $(ROOTDOTS).
- (install): Remove dep on $(installed_rootdots).
- ($(installed_rootdots)): Rule removed.
-
- * Makefile (SYSCONFFILES): Remove hostname.
- * hostname: File removed (it was empty). Current libc copes with
- having no hostname file.
-
-1999-05-16 Roland McGrath <roland@baalperazim.frob.com>
-
- * syslog.conf: Removed. We don't install syslogd, so we have no
- business installing its configuration file.
- * Makefile (SYSCONFFILES): Remove syslog.conf.
-
- * inetd.conf: Removed. We don't install inetd, so we have no business
- installing inetd.conf.
- * Makefile (SYSCONFFILES): Remove inetd.conf.
-
-Sat Mar 6 15:46:17 1999 Thomas Bushnell, BSG <tb@mit.edu>
-
- * group, passwd: Revert preceding change.
-
-Fri Mar 5 18:25:01 1999 Thomas Bushnell, BSG <tb@mit.edu>
-
- * passwd (bin): New entry with ID 0, for compatibility with BSD.
- * group (bin, kmem): Likewise.
-
-1997-06-26 Miles Bader <miles@gnu.ai.mit.edu>
-
- * root-.profile: Recommend using `addauth root'.
-
-Thu Jun 12 18:39:18 1997 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * syslog.conf: Updated.
-
-Wed Jun 11 14:17:25 1997 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * inetd.conf, syslog.conf: New files.
- * Makefile (SYSCONFFILES): Add inetd.conf and syslog.conf.
-
-Tue Jun 10 18:41:00 1997 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * Makefile (install): Repair typo.
-
-Mon May 26 23:11:52 1997 Miles Bader <miles@gnu.ai.mit.edu>
-
- * login-.bashrc (sush): Alias renamed from su.
- * root-.profile: Say to use `su' rather than `sush root'.
- * login-README: Refer to sush rather than su.
-
-Thu Sep 19 16:56:52 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * Makefile (install): Depend on installation directories directly;
- don't make installed files depend on the directory.
-
-Tue Sep 17 16:29:40 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * Makefile ($(installed_logins), $(installed_rootdots),
- $(installed_conf): Depend on FORCE instead of /dev/null.
- (foo): Deleted target.
- (LINKEDCONFFILES, installed_links): Deleted vars.
- ($(sysconfdir)/rc): Deleted target.
- ($(installed_links)): Deleted target.
- (install): Don't depend on $(installed_links).
-
-Tue Sep 10 13:53:31 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * Makefile ($(installed_conf)): Depend on $(sysconfdir).
- ($(installed_links)): Likewise.
-
-Mon Aug 5 13:43:28 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * Makefile (SYSCONFFILES): Add `resolv.conf'.
- * resolv.conf: New file.
-
-Fri Aug 2 11:07:18 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * Makefile (DIST_FILES): Put `root-' before ROOTDOTS and `login-'
- before LOGINDOTS.
-
-Wed Jul 31 12:11:02 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * passwd (games): Have no password.
- * Makefile (SYSCONFFILES): Add `group'.
- * group: New file.
-
-Mon Jul 29 14:43:54 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * passwd: mib -> thomas.
-
-Wed Jul 24 15:23:29 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * root-.profile: But do \ ` inside "s.
-
-Sat Jul 20 02:13:52 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * ttys (console): Change type to `pc3'.
- (com0): Renamed from tty00.
-
-Fri Jul 19 11:02:18 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * root-.profile: Don't \ ' inside "s.
- Advise to use `sush root', not su.
-
- * passwd (games): New user.
-
-Thu Jul 18 17:24:55 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * root-.profile: Echo usual noisy message.
-
- * fstab: Comment out example entry so it doesn't get incorrectly
- used by accident.
-
-Wed Jul 17 17:09:06 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * root-.bashrc: Fixup test and source of user's .root_bashrc.
- * root-.profile: Likewise.
-
-Tue Jul 16 11:12:10 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * passwd (root): Group should be `0'.
-
- * Makefile: Prettier installation of dotfiles for root and login.
-
-Mon Jul 15 19:16:30 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * ttys: Comment out tty00 entry.
-
-Sat Jul 13 18:06:49 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * Makefile: Always touch /dev/null. If OVERRIDE_CONF, then
- $(installed_rootdots) and $(installed_conf) depend on it.
- $(installed_logins) always depend on /dev/null.
-
- * Makefile (DIST_FILES): New variable. Move rules to past
- `include ../Makeconf'.
-
- * Makefile (ROOTDOTS, installed_rootdots): New variables.
- (install): Depend on $(installed_rootdots).
- ($(installed_rootdots): New target.
- * root-.bash_login, root-.bashrc, root-.profile: New files.
-
- * Makefile (LOGINDOTS, installed_logins): New variables.
- (install): Depend on $(installed_logins).
- ($(installed_logins)): New rule.
- * login-.bash_login, login-.bashrc, login-.hushlogin,
- login-.profile, login-README: New files.
-
- * passwd, fstab: New files.
- * hostname: New (empty) file.
- * Makefile (SYSCONFFILES): Add hostname, fstab, and passwd.
-
-Thu Jun 20 14:46:39 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * Makefile (install): Install symlink for rc.
-
- * Makefile (SYSCONFFILES): Removed `rc'.
- * rc: Removed to daemons/rc.sh.
-
-Wed Jun 19 15:25:15 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * rc: Print date before running fsck. Comment out pty permission
- frobbing.
-
-Tue Jun 18 22:40:57 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * rc: Understand special more status codes for signals from fsck.
- Fix some messages. Factor out date.
-
-Mon Jun 17 13:45:40 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * motd: Drop first line.
- * rc: Comment out motd update.
-
- * ttys: Fixup getty spec.
-
- * protocols: Updated from RFC 1700.
-
- * Makefile (SYSCONFFILES): Add protocols services shells motd ttys
-
- * rc: Update /etc/motd.
- (autoboot) Make root readonly before fscking it.
- Clean /var/run and make utmp.
diff --git a/config/ttys b/config/ttys
index 14922eb3..6a548d59 100644
--- a/config/ttys
+++ b/config/ttys
@@ -5,4 +5,10 @@
# name program type status comments
console "/libexec/getty 9600" mach-color on secure trusted console
+tty1 "/libexec/getty 38400" hurd on secure trusted console
+tty2 "/libexec/getty 38400" hurd on secure trusted console
+tty3 "/libexec/getty 38400" hurd on secure trusted console
+tty4 "/libexec/getty 38400" hurd on secure trusted console
+tty5 "/libexec/getty 38400" hurd on secure trusted console
+tty6 "/libexec/getty 38400" hurd on secure trusted console
#com0 "/libexec/getty 9600" dialup on secure
diff --git a/configure b/configure
index e335a198..db1574fb 100755
--- a/configure
+++ b/configure
@@ -1,82 +1,416 @@
#! /bin/sh
-# From configure.in Id: configure.in,v 1.35 2003/02/15 23:57:50 roland Exp .
+# From configure.in Id: configure.in,v 1.38 2008/11/17 11:34:18 tschwinge Exp .
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.59.
+# Generated by GNU Autoconf 2.67.
+#
+#
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
+# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
+# Foundation, Inc.
+#
#
-# Copyright (C) 2003 Free Software Foundation, Inc.
# This configure script is free software; the Free Software Foundation
# gives unlimited permission to copy, distribute and modify it.
-## --------------------- ##
-## M4sh Initialization. ##
-## --------------------- ##
+## -------------------- ##
+## M4sh Initialization. ##
+## -------------------- ##
-# Be Bourne compatible
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
emulate sh
NULLCMD=:
- # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+ # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
# is contrary to our usage. Disable this feature.
alias -g '${1+"$@"}'='"$@"'
-elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
- set -o posix
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in #(
+ *posix*) :
+ set -o posix ;; #(
+ *) :
+ ;;
+esac
fi
-DUALCASE=1; export DUALCASE # for MKS sh
-# Support unset when possible.
-if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
- as_unset=unset
+
+as_nl='
+'
+export as_nl
+# Printing a long string crashes Solaris 7 /usr/bin/printf.
+as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
+# Prefer a ksh shell builtin over an external printf program on Solaris,
+# but without wasting forks for bash or zsh.
+if test -z "$BASH_VERSION$ZSH_VERSION" \
+ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='print -r --'
+ as_echo_n='print -rn --'
+elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='printf %s\n'
+ as_echo_n='printf %s'
else
- as_unset=false
+ if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
+ as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
+ as_echo_n='/usr/ucb/echo -n'
+ else
+ as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
+ as_echo_n_body='eval
+ arg=$1;
+ case $arg in #(
+ *"$as_nl"*)
+ expr "X$arg" : "X\\(.*\\)$as_nl";
+ arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
+ esac;
+ expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
+ '
+ export as_echo_n_body
+ as_echo_n='sh -c $as_echo_n_body as_echo'
+ fi
+ export as_echo_body
+ as_echo='sh -c $as_echo_body as_echo'
+fi
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ PATH_SEPARATOR=:
+ (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+ (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+ PATH_SEPARATOR=';'
+ }
fi
-# Work around bugs in pre-3.0 UWIN ksh.
-$as_unset ENV MAIL MAILPATH
+# IFS
+# We need space, tab and new line, in precisely that order. Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+IFS=" "" $as_nl"
+
+# Find who we are. Look in the path if we contain no directory separator.
+case $0 in #((
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+ as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+ $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+ exit 1
+fi
+
+# Unset variables that we do not need and which cause bugs (e.g. in
+# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
+# suppresses any "Segmentation fault" message there. '((' could
+# trigger a bug in pdksh 5.2.14.
+for as_var in BASH_ENV ENV MAIL MAILPATH
+do eval test x\${$as_var+set} = xset \
+ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
+done
PS1='$ '
PS2='> '
PS4='+ '
# NLS nuisances.
-for as_var in \
- LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
- LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
- LC_TELEPHONE LC_TIME
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# CDPATH.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+if test "x$CONFIG_SHELL" = x; then
+ as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
+ emulate sh
+ NULLCMD=:
+ # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '\${1+\"\$@\"}'='\"\$@\"'
+ setopt NO_GLOB_SUBST
+else
+ case \`(set -o) 2>/dev/null\` in #(
+ *posix*) :
+ set -o posix ;; #(
+ *) :
+ ;;
+esac
+fi
+"
+ as_required="as_fn_return () { (exit \$1); }
+as_fn_success () { as_fn_return 0; }
+as_fn_failure () { as_fn_return 1; }
+as_fn_ret_success () { return 0; }
+as_fn_ret_failure () { return 1; }
+
+exitcode=0
+as_fn_success || { exitcode=1; echo as_fn_success failed.; }
+as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
+as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
+as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
+if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
+
+else
+ exitcode=1; echo positional parameters were not saved.
+fi
+test x\$exitcode = x0 || exit 1"
+ as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
+ as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
+ eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
+ test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
+test \$(( 1 + 1 )) = 2 || exit 1"
+ if (eval "$as_required") 2>/dev/null; then :
+ as_have_required=yes
+else
+ as_have_required=no
+fi
+ if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
+
+else
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+as_found=false
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
do
- if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
- eval $as_var=C; export $as_var
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ as_found=:
+ case $as_dir in #(
+ /*)
+ for as_base in sh bash ksh sh5; do
+ # Try only shells that exist, to save several forks.
+ as_shell=$as_dir/$as_base
+ if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
+ { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
+ CONFIG_SHELL=$as_shell as_have_required=yes
+ if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
+ break 2
+fi
+fi
+ done;;
+ esac
+ as_found=false
+done
+$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
+ { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
+ CONFIG_SHELL=$SHELL as_have_required=yes
+fi; }
+IFS=$as_save_IFS
+
+
+ if test "x$CONFIG_SHELL" != x; then :
+ # We cannot yet assume a decent shell, so we have to provide a
+ # neutralization value for shells without unset; and this also
+ # works around shells that cannot unset nonexistent variables.
+ BASH_ENV=/dev/null
+ ENV=/dev/null
+ (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+ export CONFIG_SHELL
+ exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
+fi
+
+ if test x$as_have_required = xno; then :
+ $as_echo "$0: This script requires a shell more modern than all"
+ $as_echo "$0: the shells that I found on your system."
+ if test x${ZSH_VERSION+set} = xset ; then
+ $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
+ $as_echo "$0: be upgraded to zsh 4.3.4 or later."
else
- $as_unset $as_var
+ $as_echo "$0: Please tell bug-autoconf@gnu.org about your system,
+$0: including any error possibly output before this
+$0: message. Then install a modern shell, or manually run
+$0: the script under such a shell if you do have one."
fi
-done
+ exit 1
+fi
+fi
+fi
+SHELL=${CONFIG_SHELL-/bin/sh}
+export SHELL
+# Unset more variables known to interfere with behavior of common tools.
+CLICOLOR_FORCE= GREP_OPTIONS=
+unset CLICOLOR_FORCE GREP_OPTIONS
+
+## --------------------- ##
+## M4sh Shell Functions. ##
+## --------------------- ##
+# as_fn_unset VAR
+# ---------------
+# Portably unset VAR.
+as_fn_unset ()
+{
+ { eval $1=; unset $1;}
+}
+as_unset=as_fn_unset
+
+# as_fn_set_status STATUS
+# -----------------------
+# Set $? to STATUS, without forking.
+as_fn_set_status ()
+{
+ return $1
+} # as_fn_set_status
+
+# as_fn_exit STATUS
+# -----------------
+# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
+as_fn_exit ()
+{
+ set +e
+ as_fn_set_status $1
+ exit $1
+} # as_fn_exit
+
+# as_fn_mkdir_p
+# -------------
+# Create "$as_dir" as a directory, including parents if necessary.
+as_fn_mkdir_p ()
+{
+
+ case $as_dir in #(
+ -*) as_dir=./$as_dir;;
+ esac
+ test -d "$as_dir" || eval $as_mkdir_p || {
+ as_dirs=
+ while :; do
+ case $as_dir in #(
+ *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+ *) as_qdir=$as_dir;;
+ esac
+ as_dirs="'$as_qdir' $as_dirs"
+ as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ test -d "$as_dir" && break
+ done
+ test -z "$as_dirs" || eval "mkdir $as_dirs"
+ } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
+
+
+} # as_fn_mkdir_p
+# as_fn_append VAR VALUE
+# ----------------------
+# Append the text in VALUE to the end of the definition contained in VAR. Take
+# advantage of any shell optimizations that allow amortized linear growth over
+# repeated appends, instead of the typical quadratic growth present in naive
+# implementations.
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
+ eval 'as_fn_append ()
+ {
+ eval $1+=\$2
+ }'
+else
+ as_fn_append ()
+ {
+ eval $1=\$$1\$2
+ }
+fi # as_fn_append
+
+# as_fn_arith ARG...
+# ------------------
+# Perform arithmetic evaluation on the ARGs, and store the result in the
+# global $as_val. Take advantage of shells that can avoid forks. The arguments
+# must be portable across $(()) and expr.
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
+ eval 'as_fn_arith ()
+ {
+ as_val=$(( $* ))
+ }'
+else
+ as_fn_arith ()
+ {
+ as_val=`expr "$@" || test $? -eq 1`
+ }
+fi # as_fn_arith
+
-# Required to use basename.
-if expr a : '\(a\)' >/dev/null 2>&1; then
+# as_fn_error STATUS ERROR [LINENO LOG_FD]
+# ----------------------------------------
+# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
+# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
+# script with STATUS, using 1 if that was 0.
+as_fn_error ()
+{
+ as_status=$1; test $as_status -eq 0 && as_status=1
+ if test "$4"; then
+ as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
+ fi
+ $as_echo "$as_me: error: $2" >&2
+ as_fn_exit $as_status
+} # as_fn_error
+
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
as_expr=expr
else
as_expr=false
fi
-if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
as_basename=basename
else
as_basename=false
fi
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+ as_dirname=dirname
+else
+ as_dirname=false
+fi
-# Name of the executable.
-as_me=`$as_basename "$0" ||
+as_me=`$as_basename -- "$0" ||
$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
X"$0" : 'X\(//\)$' \| \
- X"$0" : 'X\(/\)$' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X/"$0" |
- sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
- /^X\/\(\/\/\)$/{ s//\1/; q; }
- /^X\/\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
+ X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
-
-# PATH needs CR, and LINENO needs CR and PATH.
# Avoid depending upon Character Ranges.
as_cr_letters='abcdefghijklmnopqrstuvwxyz'
as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
@@ -84,146 +418,107 @@ as_cr_Letters=$as_cr_letters$as_cr_LETTERS
as_cr_digits='0123456789'
as_cr_alnum=$as_cr_Letters$as_cr_digits
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
- echo "#! /bin/sh" >conf$$.sh
- echo "exit 0" >>conf$$.sh
- chmod +x conf$$.sh
- if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
- PATH_SEPARATOR=';'
- else
- PATH_SEPARATOR=:
- fi
- rm -f conf$$.sh
-fi
-
-
- as_lineno_1=$LINENO
- as_lineno_2=$LINENO
- as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
- test "x$as_lineno_1" != "x$as_lineno_2" &&
- test "x$as_lineno_3" = "x$as_lineno_2" || {
- # Find who we are. Look in the path if we contain no path at all
- # relative or not.
- case $0 in
- *[\\/]* ) as_myself=$0 ;;
- *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
-done
- ;;
- esac
- # We did not find ourselves, most probably we were run as `sh COMMAND'
- # in which case we are not to be found in the path.
- if test "x$as_myself" = x; then
- as_myself=$0
- fi
- if test ! -f "$as_myself"; then
- { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
- { (exit 1); exit 1; }; }
- fi
- case $CONFIG_SHELL in
- '')
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for as_base in sh bash ksh sh5; do
- case $as_dir in
- /*)
- if ("$as_dir/$as_base" -c '
- as_lineno_1=$LINENO
- as_lineno_2=$LINENO
- as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
- test "x$as_lineno_1" != "x$as_lineno_2" &&
- test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
- $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
- $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
- CONFIG_SHELL=$as_dir/$as_base
- export CONFIG_SHELL
- exec "$CONFIG_SHELL" "$0" ${1+"$@"}
- fi;;
- esac
- done
-done
-;;
- esac
-
- # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
- # uniformly replaced by the line number. The first 'sed' inserts a
- # line-number line before each line; the second 'sed' does the real
- # work. The second script uses 'N' to pair each line-number line
- # with the numbered line, and appends trailing '-' during
- # substitution so that $LINENO is not a special case at line end.
- # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
- # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
- sed '=' <$as_myself |
+ as_lineno_1=$LINENO as_lineno_1a=$LINENO
+ as_lineno_2=$LINENO as_lineno_2a=$LINENO
+ eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
+ test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
+ # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
+ sed -n '
+ p
+ /[$]LINENO/=
+ ' <$as_myself |
sed '
+ s/[$]LINENO.*/&-/
+ t lineno
+ b
+ :lineno
N
- s,$,-,
- : loop
- s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
+ :loop
+ s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
t loop
- s,-$,,
- s,^['$as_cr_digits']*\n,,
+ s/-\n.*//
' >$as_me.lineno &&
- chmod +x $as_me.lineno ||
- { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
- { (exit 1); exit 1; }; }
+ chmod +x "$as_me.lineno" ||
+ { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
# Don't try to exec as it changes $[0], causing all sort of problems
# (the dirname of $[0] is not the place where we might find the
- # original and so on. Autoconf is especially sensible to this).
- . ./$as_me.lineno
+ # original and so on. Autoconf is especially sensitive to this).
+ . "./$as_me.lineno"
# Exit status is that of the last command.
exit
}
-
-case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
- *c*,-n*) ECHO_N= ECHO_C='
-' ECHO_T=' ' ;;
- *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
- *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in #(((((
+-n*)
+ case `echo 'xy\c'` in
+ *c*) ECHO_T=' ';; # ECHO_T is single tab character.
+ xy) ECHO_C='\c';;
+ *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
+ ECHO_T=' ';;
+ esac;;
+*)
+ ECHO_N='-n';;
esac
-if expr a : '\(a\)' >/dev/null 2>&1; then
- as_expr=expr
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+ rm -f conf$$.dir/conf$$.file
else
- as_expr=false
+ rm -f conf$$.dir
+ mkdir conf$$.dir 2>/dev/null
fi
-
-rm -f conf$$ conf$$.exe conf$$.file
-echo >conf$$.file
-if ln -s conf$$.file conf$$ 2>/dev/null; then
- # We could just check for DJGPP; but this test a) works b) is more generic
- # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
- if test -f conf$$.exe; then
- # Don't use ln at all; we don't have any links
- as_ln_s='cp -p'
- else
+if (echo >conf$$.file) 2>/dev/null; then
+ if ln -s conf$$.file conf$$ 2>/dev/null; then
as_ln_s='ln -s'
+ # ... but there are two gotchas:
+ # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+ # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+ # In both cases, we have to default to `cp -p'.
+ ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+ as_ln_s='cp -p'
+ elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+ else
+ as_ln_s='cp -p'
fi
-elif ln conf$$.file conf$$ 2>/dev/null; then
- as_ln_s=ln
else
as_ln_s='cp -p'
fi
-rm -f conf$$ conf$$.exe conf$$.file
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
if mkdir -p . 2>/dev/null; then
- as_mkdir_p=:
+ as_mkdir_p='mkdir -p "$as_dir"'
else
test -d ./-p && rmdir ./-p
as_mkdir_p=false
fi
-as_executable_p="test -f"
+if test -x / >/dev/null 2>&1; then
+ as_test_x='test -x'
+else
+ if ls -dL / >/dev/null 2>&1; then
+ as_ls_L_option=L
+ else
+ as_ls_L_option=
+ fi
+ as_test_x='
+ eval sh -c '\''
+ if test -d "$1"; then
+ test -d "$1/.";
+ else
+ case $1 in #(
+ -*)set "./$1";;
+ esac;
+ case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
+ ???[sx]*):;;*)false;;esac;fi
+ '\'' sh
+ '
+fi
+as_executable_p=$as_test_x
# Sed expression to map a string onto a valid CPP name.
as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
@@ -232,38 +527,25 @@ as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
-# IFS
-# We need space, tab and new line, in precisely that order.
-as_nl='
-'
-IFS=" $as_nl"
-
-# CDPATH.
-$as_unset CDPATH
-
+test -n "$DJDIR" || exec 7<&0 </dev/null
+exec 6>&1
# Name of the host.
-# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
+# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
# so uname gets run too.
ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
-exec 6>&1
-
#
# Initializations.
#
ac_default_prefix=/usr/local
+ac_clean_files=
ac_config_libobj_dir=.
+LIBOBJS=
cross_compiling=no
subdirs=
MFLAGS=
MAKEFLAGS=
-SHELL=${CONFIG_SHELL-/bin/sh}
-
-# Maximum number of lines to put in a shell here document.
-# This variable seems obsolete. It should probably be removed, and
-# only ac_max_sed_lines should be used.
-: ${ac_max_here_lines=38}
# Identity of this package.
PACKAGE_NAME=
@@ -271,15 +553,149 @@ PACKAGE_TARNAME=
PACKAGE_VERSION=
PACKAGE_STRING=
PACKAGE_BUGREPORT=
+PACKAGE_URL=
ac_unique_file="hurd/hurd_types.h"
ac_default_prefix=
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os asm_syntax enable_profile enable_static_progs INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA AWK CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT LD ac_ct_LD OBJCOPY ac_ct_OBJCOPY AR ac_ct_AR RANLIB ac_ct_RANLIB MIG ac_ct_MIG LIBCRYPT VERSIONING boot_store_types NCURSESW_INCLUDE LIBNCURSESW LIBOBJS LTLIBOBJS'
+# Factoring default headers for most tests.
+ac_includes_default="\
+#include <stdio.h>
+#ifdef HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+#ifdef STDC_HEADERS
+# include <stdlib.h>
+# include <stddef.h>
+#else
+# ifdef HAVE_STDLIB_H
+# include <stdlib.h>
+# endif
+#endif
+#ifdef HAVE_STRING_H
+# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
+# include <memory.h>
+# endif
+# include <string.h>
+#endif
+#ifdef HAVE_STRINGS_H
+# include <strings.h>
+#endif
+#ifdef HAVE_INTTYPES_H
+# include <inttypes.h>
+#endif
+#ifdef HAVE_STDINT_H
+# include <stdint.h>
+#endif
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif"
+
+ac_subst_vars='LTLIBOBJS
+LIBOBJS
+LIBNCURSESW
+NCURSESW_INCLUDE
+boot_store_types
+PARTED_LIBS
+EGREP
+GREP
+CPP
+libc_cv_gnu89_inline
+VERSIONING
+LIBCRYPT
+MIG
+RANLIB
+AR
+OBJCOPY
+LD
+OBJEXT
+EXEEXT
+ac_ct_CC
+CPPFLAGS
+LDFLAGS
+CFLAGS
+CC
+AWK
+INSTALL_DATA
+INSTALL_SCRIPT
+INSTALL_PROGRAM
+enable_static_progs
+enable_profile
+asm_syntax
+host_os
+host_vendor
+host_cpu
+host
+build_os
+build_vendor
+build_cpu
+build
+target_alias
+host_alias
+build_alias
+LIBS
+ECHO_T
+ECHO_N
+ECHO_C
+DEFS
+mandir
+localedir
+libdir
+psdir
+pdfdir
+dvidir
+htmldir
+infodir
+docdir
+oldincludedir
+includedir
+localstatedir
+sharedstatedir
+sysconfdir
+datadir
+datarootdir
+libexecdir
+sbindir
+bindir
+program_transform_name
+prefix
+exec_prefix
+PACKAGE_URL
+PACKAGE_BUGREPORT
+PACKAGE_STRING
+PACKAGE_VERSION
+PACKAGE_TARNAME
+PACKAGE_NAME
+PATH_SEPARATOR
+SHELL'
ac_subst_files=''
+ac_user_opts='
+enable_option_checking
+enable_profile
+enable_static_progs
+with_parted
+enable_boot_store_types
+enable_ncursesw
+with_ncursesw_include_dir
+'
+ ac_precious_vars='build_alias
+host_alias
+target_alias
+CC
+CFLAGS
+LDFLAGS
+LIBS
+CPPFLAGS
+CPP'
+
# Initialize some variables set by options.
ac_init_help=
ac_init_version=false
+ac_unrecognized_opts=
+ac_unrecognized_sep=
# The variables have the same names as the options, with
# dashes changed to underlines.
cache_file=/dev/null
@@ -302,34 +718,49 @@ x_libraries=NONE
# and all the variables that are supposed to be based on exec_prefix
# by default will actually change.
# Use braces instead of parens because sh, perl, etc. also accept them.
+# (The list follows the same order as the GNU Coding Standards.)
bindir='${exec_prefix}/bin'
sbindir='${exec_prefix}/sbin'
libexecdir='${exec_prefix}/libexec'
-datadir='${prefix}/share'
+datarootdir='${prefix}/share'
+datadir='${datarootdir}'
sysconfdir='${prefix}/etc'
sharedstatedir='${prefix}/com'
localstatedir='${prefix}/var'
-libdir='${exec_prefix}/lib'
includedir='${prefix}/include'
oldincludedir='/usr/include'
-infodir='${prefix}/info'
-mandir='${prefix}/man'
+docdir='${datarootdir}/doc/${PACKAGE}'
+infodir='${datarootdir}/info'
+htmldir='${docdir}'
+dvidir='${docdir}'
+pdfdir='${docdir}'
+psdir='${docdir}'
+libdir='${exec_prefix}/lib'
+localedir='${datarootdir}/locale'
+mandir='${datarootdir}/man'
ac_prev=
+ac_dashdash=
for ac_option
do
# If the previous option needs an argument, assign it.
if test -n "$ac_prev"; then
- eval "$ac_prev=\$ac_option"
+ eval $ac_prev=\$ac_option
ac_prev=
continue
fi
- ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
+ case $ac_option in
+ *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
+ *=) ac_optarg= ;;
+ *) ac_optarg=yes ;;
+ esac
# Accept the important Cygnus configure options, so we can diagnose typos.
- case $ac_option in
+ case $ac_dashdash$ac_option in
+ --)
+ ac_dashdash=yes ;;
-bindir | --bindir | --bindi | --bind | --bin | --bi)
ac_prev=bindir ;;
@@ -351,33 +782,59 @@ do
--config-cache | -C)
cache_file=config.cache ;;
- -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
+ -datadir | --datadir | --datadi | --datad)
ac_prev=datadir ;;
- -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
- | --da=*)
+ -datadir=* | --datadir=* | --datadi=* | --datad=*)
datadir=$ac_optarg ;;
+ -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
+ | --dataroo | --dataro | --datar)
+ ac_prev=datarootdir ;;
+ -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
+ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
+ datarootdir=$ac_optarg ;;
+
-disable-* | --disable-*)
- ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
+ ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
# Reject names that are not valid shell variable names.
- expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
- { echo "$as_me: error: invalid feature name: $ac_feature" >&2
- { (exit 1); exit 1; }; }
- ac_feature=`echo $ac_feature | sed 's/-/_/g'`
- eval "enable_$ac_feature=no" ;;
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid feature name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"enable_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval enable_$ac_useropt=no ;;
+
+ -docdir | --docdir | --docdi | --doc | --do)
+ ac_prev=docdir ;;
+ -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
+ docdir=$ac_optarg ;;
+
+ -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
+ ac_prev=dvidir ;;
+ -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
+ dvidir=$ac_optarg ;;
-enable-* | --enable-*)
- ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
+ ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
# Reject names that are not valid shell variable names.
- expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
- { echo "$as_me: error: invalid feature name: $ac_feature" >&2
- { (exit 1); exit 1; }; }
- ac_feature=`echo $ac_feature | sed 's/-/_/g'`
- case $ac_option in
- *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
- *) ac_optarg=yes ;;
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid feature name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"enable_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
esac
- eval "enable_$ac_feature='$ac_optarg'" ;;
+ eval enable_$ac_useropt=\$ac_optarg ;;
-exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
| --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
@@ -404,6 +861,12 @@ do
-host=* | --host=* | --hos=* | --ho=*)
host_alias=$ac_optarg ;;
+ -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
+ ac_prev=htmldir ;;
+ -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
+ | --ht=*)
+ htmldir=$ac_optarg ;;
+
-includedir | --includedir | --includedi | --included | --include \
| --includ | --inclu | --incl | --inc)
ac_prev=includedir ;;
@@ -428,13 +891,16 @@ do
| --libexe=* | --libex=* | --libe=*)
libexecdir=$ac_optarg ;;
+ -localedir | --localedir | --localedi | --localed | --locale)
+ ac_prev=localedir ;;
+ -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
+ localedir=$ac_optarg ;;
+
-localstatedir | --localstatedir | --localstatedi | --localstated \
- | --localstate | --localstat | --localsta | --localst \
- | --locals | --local | --loca | --loc | --lo)
+ | --localstate | --localstat | --localsta | --localst | --locals)
ac_prev=localstatedir ;;
-localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
- | --localstate=* | --localstat=* | --localsta=* | --localst=* \
- | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
+ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
localstatedir=$ac_optarg ;;
-mandir | --mandir | --mandi | --mand | --man | --ma | --m)
@@ -499,6 +965,16 @@ do
| --progr-tra=* | --program-tr=* | --program-t=*)
program_transform_name=$ac_optarg ;;
+ -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
+ ac_prev=pdfdir ;;
+ -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
+ pdfdir=$ac_optarg ;;
+
+ -psdir | --psdir | --psdi | --psd | --ps)
+ ac_prev=psdir ;;
+ -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
+ psdir=$ac_optarg ;;
+
-q | -quiet | --quiet | --quie | --qui | --qu | --q \
| -silent | --silent | --silen | --sile | --sil)
silent=yes ;;
@@ -549,26 +1025,36 @@ do
ac_init_version=: ;;
-with-* | --with-*)
- ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
+ ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
# Reject names that are not valid shell variable names.
- expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
- { echo "$as_me: error: invalid package name: $ac_package" >&2
- { (exit 1); exit 1; }; }
- ac_package=`echo $ac_package| sed 's/-/_/g'`
- case $ac_option in
- *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
- *) ac_optarg=yes ;;
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid package name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"with_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
esac
- eval "with_$ac_package='$ac_optarg'" ;;
+ eval with_$ac_useropt=\$ac_optarg ;;
-without-* | --without-*)
- ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
+ ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
# Reject names that are not valid shell variable names.
- expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
- { echo "$as_me: error: invalid package name: $ac_package" >&2
- { (exit 1); exit 1; }; }
- ac_package=`echo $ac_package | sed 's/-/_/g'`
- eval "with_$ac_package=no" ;;
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid package name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"with_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval with_$ac_useropt=no ;;
--x)
# Obsolete; use --with-x.
@@ -588,26 +1074,25 @@ do
| --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
x_libraries=$ac_optarg ;;
- -*) { echo "$as_me: error: unrecognized option: $ac_option
-Try \`$0 --help' for more information." >&2
- { (exit 1); exit 1; }; }
+ -*) as_fn_error $? "unrecognized option: \`$ac_option'
+Try \`$0 --help' for more information"
;;
*=*)
ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
# Reject names that are not valid shell variable names.
- expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
- { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
- { (exit 1); exit 1; }; }
- ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
- eval "$ac_envvar='$ac_optarg'"
+ case $ac_envvar in #(
+ '' | [0-9]* | *[!_$as_cr_alnum]* )
+ as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
+ esac
+ eval $ac_envvar=\$ac_optarg
export $ac_envvar ;;
*)
# FIXME: should be removed in autoconf 3.0.
- echo "$as_me: WARNING: you should use --build, --host, --target" >&2
+ $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
- echo "$as_me: WARNING: invalid host type: $ac_option" >&2
+ $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
: ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
;;
@@ -616,31 +1101,36 @@ done
if test -n "$ac_prev"; then
ac_option=--`echo $ac_prev | sed 's/_/-/g'`
- { echo "$as_me: error: missing argument to $ac_option" >&2
- { (exit 1); exit 1; }; }
+ as_fn_error $? "missing argument to $ac_option"
fi
-# Be sure to have absolute paths.
-for ac_var in exec_prefix prefix
-do
- eval ac_val=$`echo $ac_var`
- case $ac_val in
- [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
- *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
- { (exit 1); exit 1; }; };;
+if test -n "$ac_unrecognized_opts"; then
+ case $enable_option_checking in
+ no) ;;
+ fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
+ *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
esac
-done
+fi
-# Be sure to have absolute paths.
-for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
- localstatedir libdir includedir oldincludedir infodir mandir
+# Check all directory arguments for consistency.
+for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
+ datadir sysconfdir sharedstatedir localstatedir includedir \
+ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
+ libdir localedir mandir
do
- eval ac_val=$`echo $ac_var`
+ eval ac_val=\$$ac_var
+ # Remove trailing slashes.
case $ac_val in
- [\\/$]* | ?:[\\/]* ) ;;
- *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
- { (exit 1); exit 1; }; };;
+ */ )
+ ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
+ eval $ac_var=\$ac_val;;
esac
+ # Be sure to have absolute directory names.
+ case $ac_val in
+ [\\/$]* | ?:[\\/]* ) continue;;
+ NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
+ esac
+ as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
done
# There might be people who depend on the old broken behavior: `$host'
@@ -654,8 +1144,8 @@ target=$target_alias
if test "x$host_alias" != x; then
if test "x$build_alias" = x; then
cross_compiling=maybe
- echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
- If a cross compiler is detected then cross compile mode will be used." >&2
+ $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
+ If a cross compiler is detected then cross compile mode will be used" >&2
elif test "x$build_alias" != "x$host_alias"; then
cross_compiling=yes
fi
@@ -667,70 +1157,72 @@ test -n "$host_alias" && ac_tool_prefix=$host_alias-
test "$silent" = yes && exec 6>/dev/null
+ac_pwd=`pwd` && test -n "$ac_pwd" &&
+ac_ls_di=`ls -di .` &&
+ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
+ as_fn_error $? "working directory cannot be determined"
+test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
+ as_fn_error $? "pwd does not report name of working directory"
+
+
# Find the source files, if location was not specified.
if test -z "$srcdir"; then
ac_srcdir_defaulted=yes
- # Try the directory containing this script, then its parent.
- ac_confdir=`(dirname "$0") 2>/dev/null ||
-$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$0" : 'X\(//\)[^/]' \| \
- X"$0" : 'X\(//\)$' \| \
- X"$0" : 'X\(/\)' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X"$0" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
- /^X\(\/\/\)[^/].*/{ s//\1/; q; }
- /^X\(\/\/\)$/{ s//\1/; q; }
- /^X\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
+ # Try the directory containing this script, then the parent directory.
+ ac_confdir=`$as_dirname -- "$as_myself" ||
+$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_myself" : 'X\(//\)[^/]' \| \
+ X"$as_myself" : 'X\(//\)$' \| \
+ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_myself" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
srcdir=$ac_confdir
- if test ! -r $srcdir/$ac_unique_file; then
+ if test ! -r "$srcdir/$ac_unique_file"; then
srcdir=..
fi
else
ac_srcdir_defaulted=no
fi
-if test ! -r $srcdir/$ac_unique_file; then
- if test "$ac_srcdir_defaulted" = yes; then
- { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
- { (exit 1); exit 1; }; }
- else
- { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
- { (exit 1); exit 1; }; }
- fi
-fi
-(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
- { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
- { (exit 1); exit 1; }; }
-srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
-ac_env_build_alias_set=${build_alias+set}
-ac_env_build_alias_value=$build_alias
-ac_cv_env_build_alias_set=${build_alias+set}
-ac_cv_env_build_alias_value=$build_alias
-ac_env_host_alias_set=${host_alias+set}
-ac_env_host_alias_value=$host_alias
-ac_cv_env_host_alias_set=${host_alias+set}
-ac_cv_env_host_alias_value=$host_alias
-ac_env_target_alias_set=${target_alias+set}
-ac_env_target_alias_value=$target_alias
-ac_cv_env_target_alias_set=${target_alias+set}
-ac_cv_env_target_alias_value=$target_alias
-ac_env_CC_set=${CC+set}
-ac_env_CC_value=$CC
-ac_cv_env_CC_set=${CC+set}
-ac_cv_env_CC_value=$CC
-ac_env_CFLAGS_set=${CFLAGS+set}
-ac_env_CFLAGS_value=$CFLAGS
-ac_cv_env_CFLAGS_set=${CFLAGS+set}
-ac_cv_env_CFLAGS_value=$CFLAGS
-ac_env_LDFLAGS_set=${LDFLAGS+set}
-ac_env_LDFLAGS_value=$LDFLAGS
-ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
-ac_cv_env_LDFLAGS_value=$LDFLAGS
-ac_env_CPPFLAGS_set=${CPPFLAGS+set}
-ac_env_CPPFLAGS_value=$CPPFLAGS
-ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
-ac_cv_env_CPPFLAGS_value=$CPPFLAGS
+if test ! -r "$srcdir/$ac_unique_file"; then
+ test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
+ as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
+fi
+ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
+ac_abs_confdir=`(
+ cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
+ pwd)`
+# When building in place, set srcdir=.
+if test "$ac_abs_confdir" = "$ac_pwd"; then
+ srcdir=.
+fi
+# Remove unnecessary trailing slashes from srcdir.
+# Double slashes in file names in object file debugging info
+# mess up M-x gdb in Emacs.
+case $srcdir in
+*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
+esac
+for ac_var in $ac_precious_vars; do
+ eval ac_env_${ac_var}_set=\${${ac_var}+set}
+ eval ac_env_${ac_var}_value=\$${ac_var}
+ eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
+ eval ac_cv_env_${ac_var}_value=\$${ac_var}
+done
#
# Report the --help message.
@@ -753,20 +1245,17 @@ Configuration:
--help=short display options specific to this package
--help=recursive display the short help of all the included packages
-V, --version display version information and exit
- -q, --quiet, --silent do not print \`checking...' messages
+ -q, --quiet, --silent do not print \`checking ...' messages
--cache-file=FILE cache test results in FILE [disabled]
-C, --config-cache alias for \`--cache-file=config.cache'
-n, --no-create do not create output files
--srcdir=DIR find the sources in DIR [configure dir or \`..']
-_ACEOF
-
- cat <<_ACEOF
Installation directories:
--prefix=PREFIX install architecture-independent files in PREFIX
- [$ac_default_prefix]
+ [$ac_default_prefix]
--exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
- [PREFIX]
+ [PREFIX]
By default, \`make install' will install all the files in
\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
@@ -776,18 +1265,25 @@ for instance \`--prefix=\$HOME'.
For better control, use the options below.
Fine tuning of the installation directories:
- --bindir=DIR user executables [EPREFIX/bin]
- --sbindir=DIR system admin executables [EPREFIX/sbin]
- --libexecdir=DIR program executables [EPREFIX/libexec]
- --datadir=DIR read-only architecture-independent data [PREFIX/share]
- --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
- --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
- --localstatedir=DIR modifiable single-machine data [PREFIX/var]
- --libdir=DIR object code libraries [EPREFIX/lib]
- --includedir=DIR C header files [PREFIX/include]
- --oldincludedir=DIR C header files for non-gcc [/usr/include]
- --infodir=DIR info documentation [PREFIX/info]
- --mandir=DIR man documentation [PREFIX/man]
+ --bindir=DIR user executables [EPREFIX/bin]
+ --sbindir=DIR system admin executables [EPREFIX/sbin]
+ --libexecdir=DIR program executables [EPREFIX/libexec]
+ --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
+ --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
+ --localstatedir=DIR modifiable single-machine data [PREFIX/var]
+ --libdir=DIR object code libraries [EPREFIX/lib]
+ --includedir=DIR C header files [PREFIX/include]
+ --oldincludedir=DIR C header files for non-gcc [/usr/include]
+ --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
+ --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
+ --infodir=DIR info documentation [DATAROOTDIR/info]
+ --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
+ --mandir=DIR man documentation [DATAROOTDIR/man]
+ --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
+ --htmldir=DIR html documentation [DOCDIR]
+ --dvidir=DIR dvi documentation [DOCDIR]
+ --pdfdir=DIR pdf documentation [DOCDIR]
+ --psdir=DIR ps documentation [DOCDIR]
_ACEOF
cat <<\_ACEOF
@@ -803,6 +1299,7 @@ if test -n "$ac_init_help"; then
cat <<\_ACEOF
Optional Features:
+ --disable-option-checking ignore unrecognized --enable/--with options
--disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
--disable-profile do not build profiled libraries and programs
@@ -817,7 +1314,7 @@ Optional Features:
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
- --without-parted don't try to use GNU Parted libraries
+ --without-parted disable user-space partition stores
--with-ncursesw-include-dir=DIR
Set directory containing the include files for
use with -lncursesw, when it isn't installed as
@@ -831,125 +1328,449 @@ Some influential environment variables:
CFLAGS C compiler flags
LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
nonstandard directory <lib dir>
- CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
- headers in a nonstandard directory <include dir>
+ LIBS libraries to pass to the linker, e.g. -l<library>
+ CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
+ you have headers in a nonstandard directory <include dir>
+ CPP C preprocessor
Use these variables to override the choices made by `configure' or to help
it to find libraries and programs with nonstandard names/locations.
+Report bugs to the package provider.
_ACEOF
+ac_status=$?
fi
if test "$ac_init_help" = "recursive"; then
# If there are subdirs, report their specific --help.
- ac_popdir=`pwd`
for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
- test -d $ac_dir || continue
+ test -d "$ac_dir" ||
+ { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
+ continue
ac_builddir=.
-if test "$ac_dir" != .; then
- ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
- # A "../" for each directory in $ac_dir_suffix.
- ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
-else
- ac_dir_suffix= ac_top_builddir=
-fi
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+ ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+ # A ".." for each directory in $ac_dir_suffix.
+ ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+ case $ac_top_builddir_sub in
+ "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+ *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+ esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
case $srcdir in
- .) # No --srcdir option. We are building in place.
+ .) # We are building in place.
ac_srcdir=.
- if test -z "$ac_top_builddir"; then
- ac_top_srcdir=.
- else
- ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
- fi ;;
- [\\/]* | ?:[\\/]* ) # Absolute path.
+ ac_top_srcdir=$ac_top_builddir_sub
+ ac_abs_top_srcdir=$ac_pwd ;;
+ [\\/]* | ?:[\\/]* ) # Absolute name.
ac_srcdir=$srcdir$ac_dir_suffix;
- ac_top_srcdir=$srcdir ;;
- *) # Relative path.
- ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
- ac_top_srcdir=$ac_top_builddir$srcdir ;;
-esac
-
-# Do not use `cd foo && pwd` to compute absolute paths, because
-# the directories may not exist.
-case `pwd` in
-.) ac_abs_builddir="$ac_dir";;
-*)
- case "$ac_dir" in
- .) ac_abs_builddir=`pwd`;;
- [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
- *) ac_abs_builddir=`pwd`/"$ac_dir";;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_top_builddir=${ac_top_builddir}.;;
-*)
- case ${ac_top_builddir}. in
- .) ac_abs_top_builddir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
- *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
- esac;;
+ ac_top_srcdir=$srcdir
+ ac_abs_top_srcdir=$srcdir ;;
+ *) # Relative name.
+ ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_build_prefix$srcdir
+ ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
esac
-case $ac_abs_builddir in
-.) ac_abs_srcdir=$ac_srcdir;;
-*)
- case $ac_srcdir in
- .) ac_abs_srcdir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
- *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_top_srcdir=$ac_top_srcdir;;
-*)
- case $ac_top_srcdir in
- .) ac_abs_top_srcdir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
- *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
- esac;;
-esac
-
- cd $ac_dir
- # Check for guested configure; otherwise get Cygnus style configure.
- if test -f $ac_srcdir/configure.gnu; then
- echo
- $SHELL $ac_srcdir/configure.gnu --help=recursive
- elif test -f $ac_srcdir/configure; then
- echo
- $SHELL $ac_srcdir/configure --help=recursive
- elif test -f $ac_srcdir/configure.ac ||
- test -f $ac_srcdir/configure.in; then
- echo
- $ac_configure --help
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+ cd "$ac_dir" || { ac_status=$?; continue; }
+ # Check for guested configure.
+ if test -f "$ac_srcdir/configure.gnu"; then
+ echo &&
+ $SHELL "$ac_srcdir/configure.gnu" --help=recursive
+ elif test -f "$ac_srcdir/configure"; then
+ echo &&
+ $SHELL "$ac_srcdir/configure" --help=recursive
else
- echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
- fi
- cd "$ac_popdir"
+ $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+ fi || ac_status=$?
+ cd "$ac_pwd" || { ac_status=$?; break; }
done
fi
-test -n "$ac_init_help" && exit 0
+test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
+configure
+generated by GNU Autoconf 2.67
-Copyright (C) 2003 Free Software Foundation, Inc.
+Copyright (C) 2010 Free Software Foundation, Inc.
This configure script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it.
_ACEOF
- exit 0
+ exit
fi
-exec 5>config.log
-cat >&5 <<_ACEOF
+
+## ------------------------ ##
+## Autoconf initialization. ##
+## ------------------------ ##
+
+# ac_fn_c_try_compile LINENO
+# --------------------------
+# Try to compile conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_compile ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ rm -f conftest.$ac_objext
+ if { { ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_compile") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ grep -v '^ *+' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ mv -f conftest.er1 conftest.err
+ fi
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then :
+ ac_retval=0
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=1
+fi
+ eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+ as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_compile
+
+# ac_fn_c_try_link LINENO
+# -----------------------
+# Try to link conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_link ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ rm -f conftest.$ac_objext conftest$ac_exeext
+ if { { ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_link") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ grep -v '^ *+' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ mv -f conftest.er1 conftest.err
+ fi
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then :
+ ac_retval=0
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=1
+fi
+ # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
+ # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
+ # interfere with the next link command; also delete a directory that is
+ # left behind by Apple's compiler. We do this before executing the actions.
+ rm -rf conftest.dSYM conftest_ipa8_conftest.oo
+ eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+ as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_link
+
+# ac_fn_c_check_func LINENO FUNC VAR
+# ----------------------------------
+# Tests whether FUNC exists, setting the cache variable VAR accordingly
+ac_fn_c_check_func ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval "test \"\${$3+set}\"" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $2 innocuous_$2
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $2 (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $2
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char $2 ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined __stub_$2 || defined __stub___$2
+choke me
+#endif
+
+int
+main ()
+{
+return $2 ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ eval "$3=yes"
+else
+ eval "$3=no"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+eval ac_res=\$$3
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+ eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+
+} # ac_fn_c_check_func
+
+# ac_fn_c_try_cpp LINENO
+# ----------------------
+# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_cpp ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ if { { ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ grep -v '^ *+' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ mv -f conftest.er1 conftest.err
+ fi
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } > conftest.i && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ }; then :
+ ac_retval=0
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=1
+fi
+ eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+ as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_cpp
+
+# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
+# -------------------------------------------------------
+# Tests whether HEADER exists, giving a warning if it cannot be compiled using
+# the include files in INCLUDES and setting the cache variable VAR
+# accordingly.
+ac_fn_c_check_header_mongrel ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ if eval "test \"\${$3+set}\"" = set; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval "test \"\${$3+set}\"" = set; then :
+ $as_echo_n "(cached) " >&6
+fi
+eval ac_res=\$$3
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+else
+ # Is the header compilable?
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
+$as_echo_n "checking $2 usability... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+#include <$2>
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_header_compiler=yes
+else
+ ac_header_compiler=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
+$as_echo_n "checking $2 presence... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <$2>
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+ ac_header_preproc=yes
+else
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
+ yes:no: )
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
+ ;;
+ no:yes:* )
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
+ ;;
+esac
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval "test \"\${$3+set}\"" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ eval "$3=\$ac_header_compiler"
+fi
+eval ac_res=\$$3
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+fi
+ eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+
+} # ac_fn_c_check_header_mongrel
+
+# ac_fn_c_try_run LINENO
+# ----------------------
+# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
+# that executables *can* be run.
+ac_fn_c_try_run ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ if { { ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
+ { { case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; }; then :
+ ac_retval=0
+else
+ $as_echo "$as_me: program exited with status $ac_status" >&5
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=$ac_status
+fi
+ rm -rf conftest.dSYM conftest_ipa8_conftest.oo
+ eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+ as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_run
+
+# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
+# -------------------------------------------------------
+# Tests whether HEADER exists and can be compiled using the include files in
+# INCLUDES, setting the cache variable VAR accordingly.
+ac_fn_c_check_header_compile ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval "test \"\${$3+set}\"" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+#include <$2>
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ eval "$3=yes"
+else
+ eval "$3=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$3
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+ eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+
+} # ac_fn_c_check_header_compile
+cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by $as_me, which was
-generated by GNU Autoconf 2.59. Invocation command line was
+generated by GNU Autoconf 2.67. Invocation command line was
$ $0 $@
_ACEOF
+exec 5>>config.log
{
cat <<_ASUNAME
## --------- ##
@@ -968,7 +1789,7 @@ uname -v = `(uname -v) 2>/dev/null || echo unknown`
/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
-hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
+/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
@@ -980,8 +1801,9 @@ for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
- echo "PATH: $as_dir"
-done
+ $as_echo "PATH: $as_dir"
+ done
+IFS=$as_save_IFS
} >&5
@@ -1003,7 +1825,6 @@ _ACEOF
ac_configure_args=
ac_configure_args0=
ac_configure_args1=
-ac_sep=
ac_must_keep_next=false
for ac_pass in 1 2
do
@@ -1014,13 +1835,13 @@ do
-q | -quiet | --quiet | --quie | --qui | --qu | --q \
| -silent | --silent | --silen | --sile | --sil)
continue ;;
- *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
- ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ *\'*)
+ ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
esac
case $ac_pass in
- 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
+ 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2)
- ac_configure_args1="$ac_configure_args1 '$ac_arg'"
+ as_fn_append ac_configure_args1 " '$ac_arg'"
if test $ac_must_keep_next = true; then
ac_must_keep_next=false # Got value, back to normal.
else
@@ -1036,104 +1857,115 @@ do
-* ) ac_must_keep_next=true ;;
esac
fi
- ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
- # Get rid of the leading space.
- ac_sep=" "
+ as_fn_append ac_configure_args " '$ac_arg'"
;;
esac
done
done
-$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
-$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
+{ ac_configure_args0=; unset ac_configure_args0;}
+{ ac_configure_args1=; unset ac_configure_args1;}
# When interrupted or exit'd, cleanup temporary files, and complete
# config.log. We remove comments because anyway the quotes in there
# would cause problems or look ugly.
-# WARNING: Be sure not to use single quotes in there, as some shells,
-# such as our DU 5.0 friend, will then `close' the trap.
+# WARNING: Use '\'' to represent an apostrophe within the trap.
+# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
trap 'exit_status=$?
# Save into config.log some information that might help in debugging.
{
echo
- cat <<\_ASBOX
-## ---------------- ##
+ $as_echo "## ---------------- ##
## Cache variables. ##
-## ---------------- ##
-_ASBOX
+## ---------------- ##"
echo
# The following way of writing the cache mishandles newlines in values,
-{
+(
+ for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
+ eval ac_val=\$$ac_var
+ case $ac_val in #(
+ *${as_nl}*)
+ case $ac_var in #(
+ *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+ esac
+ case $ac_var in #(
+ _ | IFS | as_nl) ;; #(
+ BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
+ *) { eval $ac_var=; unset $ac_var;} ;;
+ esac ;;
+ esac
+ done
(set) 2>&1 |
- case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
- *ac_space=\ *)
+ case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
+ *${as_nl}ac_space=\ *)
sed -n \
- "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
- s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
- ;;
+ "s/'\''/'\''\\\\'\'''\''/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
+ ;; #(
*)
- sed -n \
- "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
+ sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
;;
- esac;
-}
+ esac |
+ sort
+)
echo
- cat <<\_ASBOX
-## ----------------- ##
+ $as_echo "## ----------------- ##
## Output variables. ##
-## ----------------- ##
-_ASBOX
+## ----------------- ##"
echo
for ac_var in $ac_subst_vars
do
- eval ac_val=$`echo $ac_var`
- echo "$ac_var='"'"'$ac_val'"'"'"
+ eval ac_val=\$$ac_var
+ case $ac_val in
+ *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+ esac
+ $as_echo "$ac_var='\''$ac_val'\''"
done | sort
echo
if test -n "$ac_subst_files"; then
- cat <<\_ASBOX
-## ------------- ##
-## Output files. ##
-## ------------- ##
-_ASBOX
+ $as_echo "## ------------------- ##
+## File substitutions. ##
+## ------------------- ##"
echo
for ac_var in $ac_subst_files
do
- eval ac_val=$`echo $ac_var`
- echo "$ac_var='"'"'$ac_val'"'"'"
+ eval ac_val=\$$ac_var
+ case $ac_val in
+ *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+ esac
+ $as_echo "$ac_var='\''$ac_val'\''"
done | sort
echo
fi
if test -s confdefs.h; then
- cat <<\_ASBOX
-## ----------- ##
+ $as_echo "## ----------- ##
## confdefs.h. ##
-## ----------- ##
-_ASBOX
+## ----------- ##"
echo
- sed "/^$/d" confdefs.h | sort
+ cat confdefs.h
echo
fi
test "$ac_signal" != 0 &&
- echo "$as_me: caught signal $ac_signal"
- echo "$as_me: exit $exit_status"
+ $as_echo "$as_me: caught signal $ac_signal"
+ $as_echo "$as_me: exit $exit_status"
} >&5
- rm -f core *.core &&
- rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
+ rm -f core *.core core.conftest.* &&
+ rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
exit $exit_status
- ' 0
+' 0
for ac_signal in 1 2 13 15; do
- trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
+ trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
done
ac_signal=0
# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -rf conftest* confdefs.h
-# AIX cpp loses on an empty file, so make sure it contains at least a newline.
-echo >confdefs.h
+rm -f -r conftest* confdefs.h
+
+$as_echo "/* confdefs.h */" > confdefs.h
# Predefined preprocessor variables.
@@ -1141,112 +1973,137 @@ cat >>confdefs.h <<_ACEOF
#define PACKAGE_NAME "$PACKAGE_NAME"
_ACEOF
-
cat >>confdefs.h <<_ACEOF
#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
_ACEOF
-
cat >>confdefs.h <<_ACEOF
#define PACKAGE_VERSION "$PACKAGE_VERSION"
_ACEOF
-
cat >>confdefs.h <<_ACEOF
#define PACKAGE_STRING "$PACKAGE_STRING"
_ACEOF
-
cat >>confdefs.h <<_ACEOF
#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
_ACEOF
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_URL "$PACKAGE_URL"
+_ACEOF
+
# Let the site file select an alternate cache file if it wants to.
-# Prefer explicitly selected file to automatically selected ones.
-if test -z "$CONFIG_SITE"; then
- if test "x$prefix" != xNONE; then
- CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
- else
- CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
- fi
+# Prefer an explicitly selected file to automatically selected ones.
+ac_site_file1=NONE
+ac_site_file2=NONE
+if test -n "$CONFIG_SITE"; then
+ # We do not want a PATH search for config.site.
+ case $CONFIG_SITE in #((
+ -*) ac_site_file1=./$CONFIG_SITE;;
+ */*) ac_site_file1=$CONFIG_SITE;;
+ *) ac_site_file1=./$CONFIG_SITE;;
+ esac
+elif test "x$prefix" != xNONE; then
+ ac_site_file1=$prefix/share/config.site
+ ac_site_file2=$prefix/etc/config.site
+else
+ ac_site_file1=$ac_default_prefix/share/config.site
+ ac_site_file2=$ac_default_prefix/etc/config.site
fi
-for ac_site_file in $CONFIG_SITE; do
- if test -r "$ac_site_file"; then
- { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
-echo "$as_me: loading site script $ac_site_file" >&6;}
+for ac_site_file in "$ac_site_file1" "$ac_site_file2"
+do
+ test "x$ac_site_file" = xNONE && continue
+ if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
+$as_echo "$as_me: loading site script $ac_site_file" >&6;}
sed 's/^/| /' "$ac_site_file" >&5
- . "$ac_site_file"
+ . "$ac_site_file" \
+ || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "failed to load site script $ac_site_file
+See \`config.log' for more details" "$LINENO" 5 ; }
fi
done
if test -r "$cache_file"; then
- # Some versions of bash will fail to source /dev/null (special
- # files actually), so we avoid doing that.
- if test -f "$cache_file"; then
- { echo "$as_me:$LINENO: loading cache $cache_file" >&5
-echo "$as_me: loading cache $cache_file" >&6;}
+ # Some versions of bash will fail to source /dev/null (special files
+ # actually), so we avoid doing that. DJGPP emulates it as a regular file.
+ if test /dev/null != "$cache_file" && test -f "$cache_file"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
+$as_echo "$as_me: loading cache $cache_file" >&6;}
case $cache_file in
- [\\/]* | ?:[\\/]* ) . $cache_file;;
- *) . ./$cache_file;;
+ [\\/]* | ?:[\\/]* ) . "$cache_file";;
+ *) . "./$cache_file";;
esac
fi
else
- { echo "$as_me:$LINENO: creating cache $cache_file" >&5
-echo "$as_me: creating cache $cache_file" >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
+$as_echo "$as_me: creating cache $cache_file" >&6;}
>$cache_file
fi
# Check that the precious variables saved in the cache have kept the same
# value.
ac_cache_corrupted=false
-for ac_var in `(set) 2>&1 |
- sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
+for ac_var in $ac_precious_vars; do
eval ac_old_set=\$ac_cv_env_${ac_var}_set
eval ac_new_set=\$ac_env_${ac_var}_set
- eval ac_old_val="\$ac_cv_env_${ac_var}_value"
- eval ac_new_val="\$ac_env_${ac_var}_value"
+ eval ac_old_val=\$ac_cv_env_${ac_var}_value
+ eval ac_new_val=\$ac_env_${ac_var}_value
case $ac_old_set,$ac_new_set in
set,)
- { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
-echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
ac_cache_corrupted=: ;;
,set)
- { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
-echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
+$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
ac_cache_corrupted=: ;;
,);;
*)
if test "x$ac_old_val" != "x$ac_new_val"; then
- { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
-echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
- { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
-echo "$as_me: former value: $ac_old_val" >&2;}
- { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
-echo "$as_me: current value: $ac_new_val" >&2;}
- ac_cache_corrupted=:
+ # differences in whitespace do not lead to failure.
+ ac_old_val_w=`echo x $ac_old_val`
+ ac_new_val_w=`echo x $ac_new_val`
+ if test "$ac_old_val_w" != "$ac_new_val_w"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
+$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+ ac_cache_corrupted=:
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
+$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
+ eval $ac_var=\$ac_old_val
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
+$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
+$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
fi;;
esac
# Pass precious variables to config.status.
if test "$ac_new_set" = set; then
case $ac_new_val in
- *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
- ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
+ *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
*) ac_arg=$ac_var=$ac_new_val ;;
esac
case " $ac_configure_args " in
*" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
- *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
+ *) as_fn_append ac_configure_args " '$ac_arg'" ;;
esac
fi
done
if $ac_cache_corrupted; then
- { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
-echo "$as_me: error: changes in the environment can compromise the build" >&2;}
- { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
-echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
- { (exit 1); exit 1; }; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
+$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
+ as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
fi
+## -------------------- ##
+## Main body of script. ##
+## -------------------- ##
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
@@ -1257,124 +2114,117 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
ac_aux_dir=
-for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
- if test -f $ac_dir/install-sh; then
+for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
+ if test -f "$ac_dir/install-sh"; then
ac_aux_dir=$ac_dir
ac_install_sh="$ac_aux_dir/install-sh -c"
break
- elif test -f $ac_dir/install.sh; then
+ elif test -f "$ac_dir/install.sh"; then
ac_aux_dir=$ac_dir
ac_install_sh="$ac_aux_dir/install.sh -c"
break
- elif test -f $ac_dir/shtool; then
+ elif test -f "$ac_dir/shtool"; then
ac_aux_dir=$ac_dir
ac_install_sh="$ac_aux_dir/shtool install -c"
break
fi
done
if test -z "$ac_aux_dir"; then
- { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
-echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
- { (exit 1); exit 1; }; }
+ as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
fi
-ac_config_guess="$SHELL $ac_aux_dir/config.guess"
-ac_config_sub="$SHELL $ac_aux_dir/config.sub"
-ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
-# Make sure we can run config.sub.
-$ac_config_sub sun4 >/dev/null 2>&1 ||
- { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
-echo "$as_me: error: cannot run $ac_config_sub" >&2;}
- { (exit 1); exit 1; }; }
-
-echo "$as_me:$LINENO: checking build system type" >&5
-echo $ECHO_N "checking build system type... $ECHO_C" >&6
-if test "${ac_cv_build+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_cv_build_alias=$build_alias
-test -z "$ac_cv_build_alias" &&
- ac_cv_build_alias=`$ac_config_guess`
-test -z "$ac_cv_build_alias" &&
- { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
-echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
- { (exit 1); exit 1; }; }
-ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
- { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
-echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
- { (exit 1); exit 1; }; }
-
-fi
-echo "$as_me:$LINENO: result: $ac_cv_build" >&5
-echo "${ECHO_T}$ac_cv_build" >&6
-build=$ac_cv_build
-build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+# These three variables are undocumented and unsupported,
+# and are intended to be withdrawn in a future Autoconf release.
+# They can cause serious problems if a builder's source tree is in a directory
+# whose full name contains unusual characters.
+ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
+ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
+ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
+
+# Make sure we can run config.sub.
+$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
+ as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
-echo "$as_me:$LINENO: checking host system type" >&5
-echo $ECHO_N "checking host system type... $ECHO_C" >&6
-if test "${ac_cv_host+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
+$as_echo_n "checking build system type... " >&6; }
+if test "${ac_cv_build+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_build_alias=$build_alias
+test "x$ac_build_alias" = x &&
+ ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
+test "x$ac_build_alias" = x &&
+ as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
+ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
+ as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
+$as_echo "$ac_cv_build" >&6; }
+case $ac_cv_build in
+*-*-*) ;;
+*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5 ;;
+esac
+build=$ac_cv_build
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_build
+shift
+build_cpu=$1
+build_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+build_os=$*
+IFS=$ac_save_IFS
+case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
+$as_echo_n "checking host system type... " >&6; }
+if test "${ac_cv_host+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test "x$host_alias" = x; then
+ ac_cv_host=$ac_cv_build
else
- ac_cv_host_alias=$host_alias
-test -z "$ac_cv_host_alias" &&
- ac_cv_host_alias=$ac_cv_build_alias
-ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
- { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
-echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
- { (exit 1); exit 1; }; }
+ ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
+ as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
+fi
fi
-echo "$as_me:$LINENO: result: $ac_cv_host" >&5
-echo "${ECHO_T}$ac_cv_host" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
+$as_echo "$ac_cv_host" >&6; }
+case $ac_cv_host in
+*-*-*) ;;
+*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5 ;;
+esac
host=$ac_cv_host
-host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_host
+shift
+host_cpu=$1
+host_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+host_os=$*
+IFS=$ac_save_IFS
+case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
case "$host_os" in
gnu*) ;;
-none) { { echo "$as_me:$LINENO: error:
+none) as_fn_error $? "
*** You must specify a host of $host_cpu-gnu or $host_cpu-$host_vendor-gnu
*** to configure; you will need to use the same host specification
-*** to configure other packages for the GNU/Hurd system." >&5
-echo "$as_me: error:
-*** You must specify a host of $host_cpu-gnu or $host_cpu-$host_vendor-gnu
-*** to configure; you will need to use the same host specification
-*** to configure other packages for the GNU/Hurd system." >&2;}
- { (exit 1); exit 1; }; } ;;
-*) { { echo "$as_me:$LINENO: error: this is the gnu os, host cannot be $host_os
+*** to configure other packages for the GNU/Hurd system." "$LINENO" 5 ;;
+*) as_fn_error $? "this is the gnu os, host cannot be $host_os
*** Host configuration must be \`MACHINE-gnu' or \`MACHINE-VENDOR-gnu'.
*** To cross-compile, you must specify both --host and --build;
*** for example \`--build=$host --host=$host_cpu-gnu'.
-*** Run $0 --help for more information." >&5
-echo "$as_me: error: this is the gnu os, host cannot be $host_os
-*** Host configuration must be \`MACHINE-gnu' or \`MACHINE-VENDOR-gnu'.
-*** To cross-compile, you must specify both --host and --build;
-*** for example \`--build=$host --host=$host_cpu-gnu'.
-*** Run $0 --help for more information." >&2;}
- { (exit 1); exit 1; }; } ;;
+*** Run $0 --help for more information." "$LINENO" 5 ;;
esac
case "$host_cpu" in
@@ -1409,22 +2259,22 @@ esac
test -r "$srcdir/libthreads/$asm_syntax/cthreads.h" || {
- { echo "$as_me:$LINENO: WARNING: unsupported CPU type $host_cpu" >&5
-echo "$as_me: WARNING: unsupported CPU type $host_cpu" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unsupported CPU type $host_cpu" >&5
+$as_echo "$as_me: WARNING: unsupported CPU type $host_cpu" >&2;}
}
-# Check whether --enable-profile or --disable-profile was given.
-if test "${enable_profile+set}" = set; then
- enableval="$enable_profile"
+# Check whether --enable-profile was given.
+if test "${enable_profile+set}" = set; then :
+ enableval=$enable_profile;
+fi
-fi;
-# Check whether --enable-static-progs or --disable-static-progs was given.
-if test "${enable_static_progs+set}" = set; then
- enableval="$enable_static_progs"
+# Check whether --enable-static-progs was given.
+if test "${enable_static_progs+set}" = set; then :
+ enableval=$enable_static_progs;
+fi
-fi;
case "$enable_static_progs" in
'no') enable_static_progs= ;; # we got --disable-static
'') enable_static_progs='ext2fs,ufs' ;;
@@ -1433,6 +2283,13 @@ esac
enable_static_progs=`echo "$enable_static_progs" | sed 's/[, ][, ]*/ /g'`
+# Don't needlessly overwrite files that whose contents haven't changed. This
+# helps for avoinding unneccessary recompilation cycles when keeping
+# cross-compilation toolchains up-to-date. Thus, unconditionally use the
+# supplied `install-sh', as the GNU Coreutils one doesn't provide this
+# functionality yet (TODO: change that). TODO: $ac_abs_top_builddir et al. are
+# not yet available here, that's why we use `readlink' (but only if available).
+INSTALL="$SHELL $(readlink -f "$ac_install_sh")"\ -C || unset INSTALL
# Find a good install program. We prefer a C program (faster),
# so one script is as good as another. But avoid the broken or
# incompatible versions:
@@ -1446,22 +2303,23 @@ enable_static_progs=`echo "$enable_static_progs" | sed 's/[, ][, ]*/ /g'`
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# OS/2's system install, which has a completely different semantic
# ./install, which can be erroneously created by make from ./install.sh.
-echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
-echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
+# Reject install programs that cannot install multiple files.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
+$as_echo_n "checking for a BSD-compatible install... " >&6; }
if test -z "$INSTALL"; then
-if test "${ac_cv_path_install+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+if test "${ac_cv_path_install+set}" = set; then :
+ $as_echo_n "(cached) " >&6
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
- # Account for people who put trailing slashes in PATH elements.
-case $as_dir/ in
- ./ | .// | /cC/* | \
+ # Account for people who put trailing slashes in PATH elements.
+case $as_dir/ in #((
+ ./ | .// | /[cC]/* | \
/etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
- ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
+ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
/usr/ucb/* ) ;;
*)
# OSF1 and SCO ODT 3.0 have their own names for install.
@@ -1469,7 +2327,7 @@ case $as_dir/ in
# by default.
for ac_prog in ginstall scoinst install; do
for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
+ if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
if test $ac_prog = install &&
grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
# AIX install. It has an incompatible calling convention.
@@ -1479,30 +2337,43 @@ case $as_dir/ in
# program-specific install script used by HP pwplus--don't use.
:
else
- ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
- break 3
+ rm -rf conftest.one conftest.two conftest.dir
+ echo one > conftest.one
+ echo two > conftest.two
+ mkdir conftest.dir
+ if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
+ test -s conftest.one && test -s conftest.two &&
+ test -s conftest.dir/conftest.one &&
+ test -s conftest.dir/conftest.two
+ then
+ ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
+ break 3
+ fi
fi
fi
done
done
;;
esac
-done
+ done
+IFS=$as_save_IFS
+
+rm -rf conftest.one conftest.two conftest.dir
fi
if test "${ac_cv_path_install+set}" = set; then
INSTALL=$ac_cv_path_install
else
- # As a last resort, use the slow shell script. We don't cache a
- # path for INSTALL within a source directory, because that will
+ # As a last resort, use the slow shell script. Don't cache a
+ # value for INSTALL within a source directory, because that will
# break other packages using the cache if that directory is
- # removed, or if the path is relative.
+ # removed, or if the value is a relative name.
INSTALL=$ac_install_sh
fi
fi
-echo "$as_me:$LINENO: result: $INSTALL" >&5
-echo "${ECHO_T}$INSTALL" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
+$as_echo "$INSTALL" >&6; }
# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
# It thinks the first close brace ends the variable substitution.
@@ -1516,10 +2387,10 @@ for ac_prog in gawk mawk nawk awk
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_AWK+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_AWK+set}" = set; then :
+ $as_echo_n "(cached) " >&6
else
if test -n "$AWK"; then
ac_cv_prog_AWK="$AWK" # Let the user override the test.
@@ -1529,26 +2400,28 @@ for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_AWK="$ac_prog"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
-done
+ done
+IFS=$as_save_IFS
fi
fi
AWK=$ac_cv_prog_AWK
if test -n "$AWK"; then
- echo "$as_me:$LINENO: result: $AWK" >&5
-echo "${ECHO_T}$AWK" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
+$as_echo "$AWK" >&6; }
else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
fi
+
test -n "$AWK" && break
done
@@ -1561,10 +2434,10 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
set dummy ${ac_tool_prefix}gcc; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_CC+set}" = set; then :
+ $as_echo_n "(cached) " >&6
else
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
@@ -1574,35 +2447,37 @@ for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_CC="${ac_tool_prefix}gcc"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
-done
+ done
+IFS=$as_save_IFS
fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
- echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
fi
+
fi
if test -z "$ac_cv_prog_CC"; then
ac_ct_CC=$CC
# Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
+ $as_echo_n "(cached) " >&6
else
if test -n "$ac_ct_CC"; then
ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
@@ -1612,39 +2487,50 @@ for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_ac_ct_CC="gcc"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
-done
+ done
+IFS=$as_save_IFS
fi
fi
ac_ct_CC=$ac_cv_prog_ac_ct_CC
if test -n "$ac_ct_CC"; then
- echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
-echo "${ECHO_T}$ac_ct_CC" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+$as_echo "$ac_ct_CC" >&6; }
else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
fi
- CC=$ac_ct_CC
+ if test "x$ac_ct_CC" = x; then
+ CC=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ CC=$ac_ct_CC
+ fi
else
CC="$ac_cv_prog_CC"
fi
if test -z "$CC"; then
- if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
set dummy ${ac_tool_prefix}cc; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_CC+set}" = set; then :
+ $as_echo_n "(cached) " >&6
else
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
@@ -1654,77 +2540,37 @@ for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_CC="${ac_tool_prefix}cc"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
-done
+ done
+IFS=$as_save_IFS
fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
- echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
fi
-fi
-if test -z "$ac_cv_prog_CC"; then
- ac_ct_CC=$CC
- # Extract the first word of "cc", so it can be a program name with args.
-set dummy cc; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$ac_ct_CC"; then
- ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_ac_ct_CC="cc"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-ac_ct_CC=$ac_cv_prog_ac_ct_CC
-if test -n "$ac_ct_CC"; then
- echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
-echo "${ECHO_T}$ac_ct_CC" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
- CC=$ac_ct_CC
-else
- CC="$ac_cv_prog_CC"
-fi
+ fi
fi
if test -z "$CC"; then
# Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_CC+set}" = set; then :
+ $as_echo_n "(cached) " >&6
else
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
@@ -1735,18 +2581,19 @@ for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
ac_prog_rejected=yes
continue
fi
ac_cv_prog_CC="cc"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
-done
+ done
+IFS=$as_save_IFS
if test $ac_prog_rejected = yes; then
# We found a bogon in the path, so make sure we never use it.
@@ -1764,24 +2611,25 @@ fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
- echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
fi
+
fi
if test -z "$CC"; then
if test -n "$ac_tool_prefix"; then
- for ac_prog in cl
+ for ac_prog in cl.exe
do
# Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
set dummy $ac_tool_prefix$ac_prog; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_CC+set}" = set; then :
+ $as_echo_n "(cached) " >&6
else
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
@@ -1791,39 +2639,41 @@ for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
-done
+ done
+IFS=$as_save_IFS
fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
- echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
fi
+
test -n "$CC" && break
done
fi
if test -z "$CC"; then
ac_ct_CC=$CC
- for ac_prog in cl
+ for ac_prog in cl.exe
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
+ $as_echo_n "(cached) " >&6
else
if test -n "$ac_ct_CC"; then
ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
@@ -1833,66 +2683,78 @@ for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_ac_ct_CC="$ac_prog"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
-done
+ done
+IFS=$as_save_IFS
fi
fi
ac_ct_CC=$ac_cv_prog_ac_ct_CC
if test -n "$ac_ct_CC"; then
- echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
-echo "${ECHO_T}$ac_ct_CC" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+$as_echo "$ac_ct_CC" >&6; }
else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
fi
+
test -n "$ac_ct_CC" && break
done
- CC=$ac_ct_CC
+ if test "x$ac_ct_CC" = x; then
+ CC=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ CC=$ac_ct_CC
+ fi
fi
fi
-test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
-See \`config.log' for more details." >&5
-echo "$as_me: error: no acceptable C compiler found in \$PATH
-See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }
+test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "no acceptable C compiler found in \$PATH
+See \`config.log' for more details" "$LINENO" 5 ; }
# Provide some information about the compiler.
-echo "$as_me:$LINENO:" \
- "checking for C compiler version" >&5
-ac_compiler=`set X $ac_compile; echo $2`
-{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
- (eval $ac_compiler --version </dev/null >&5) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }
-{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
- (eval $ac_compiler -v </dev/null >&5) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }
-{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
- (eval $ac_compiler -V </dev/null >&5) 2>&5
+$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
+set X $ac_compile
+ac_compiler=$2
+for ac_option in --version -v -V -qversion; do
+ { { ac_try="$ac_compiler $ac_option >&5"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_compiler $ac_option >&5") 2>conftest.err
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }
+ if test -s conftest.err; then
+ sed '10a\
+... rest of stderr output deleted ...
+ 10q' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ fi
+ rm -f conftest.er1 conftest.err
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+done
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
@@ -1904,112 +2766,108 @@ main ()
}
_ACEOF
ac_clean_files_save=$ac_clean_files
-ac_clean_files="$ac_clean_files a.out a.exe b.out"
+ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
# Try to create an executable without -o first, disregard a.out.
# It will help us diagnose broken compilers, and finding out an intuition
# of exeext.
-echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
-echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6
-ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
-if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
- (eval $ac_link_default) 2>&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
+$as_echo_n "checking whether the C compiler works... " >&6; }
+ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
+
+# The possible output files:
+ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
+
+ac_rmfiles=
+for ac_file in $ac_files
+do
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
+ * ) ac_rmfiles="$ac_rmfiles $ac_file";;
+ esac
+done
+rm -f $ac_rmfiles
+
+if { { ac_try="$ac_link_default"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_link_default") 2>&5
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; then
- # Find the output, starting from the most likely. This scheme is
-# not robust to junk in `.', hence go to wildcards (a.*) only as a last
-# resort.
-
-# Be careful to initialize this variable, since it used to be cached.
-# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
-ac_cv_exeext=
-# b.out is created by i960 compilers.
-for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then :
+ # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
+# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
+# in a Makefile. We should not override ac_cv_exeext if it was cached,
+# so that the user can short-circuit this test for compilers unknown to
+# Autoconf.
+for ac_file in $ac_files ''
do
test -f "$ac_file" || continue
case $ac_file in
- *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
- ;;
- conftest.$ac_ext )
- # This is the source file.
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
;;
[ab].out )
# We found the default executable, but exeext='' is most
# certainly right.
break;;
*.* )
- ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
- # FIXME: I believe we export ac_cv_exeext for Libtool,
- # but it would be cool to find out if it's true. Does anybody
- # maintain Libtool? --akim.
- export ac_cv_exeext
+ if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
+ then :; else
+ ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+ fi
+ # We set ac_cv_exeext here because the later test for it is not
+ # safe: cross compilers may not add the suffix if given an `-o'
+ # argument, so we may need to know it at that point already.
+ # Even if this section looks crufty: it has the advantage of
+ # actually working.
break;;
* )
break;;
esac
done
+test "$ac_cv_exeext" = no && ac_cv_exeext=
+
else
- echo "$as_me: failed program was:" >&5
+ ac_file=''
+fi
+if test -z "$ac_file"; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
-See \`config.log' for more details." >&5
-echo "$as_me: error: C compiler cannot create executables
-See \`config.log' for more details." >&2;}
- { (exit 77); exit 77; }; }
+{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "C compiler cannot create executables
+See \`config.log' for more details" "$LINENO" 5 ; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
fi
-
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
+$as_echo_n "checking for C compiler default output file name... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
+$as_echo "$ac_file" >&6; }
ac_exeext=$ac_cv_exeext
-echo "$as_me:$LINENO: result: $ac_file" >&5
-echo "${ECHO_T}$ac_file" >&6
-
-# Check the compiler produces executables we can run. If not, either
-# the compiler is broken, or we cross compile.
-echo "$as_me:$LINENO: checking whether the C compiler works" >&5
-echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
-# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
-# If not cross compiling, check that we can run a simple program.
-if test "$cross_compiling" != yes; then
- if { ac_try='./$ac_file'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- cross_compiling=no
- else
- if test "$cross_compiling" = maybe; then
- cross_compiling=yes
- else
- { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
-If you meant to cross compile, use \`--host'.
-See \`config.log' for more details." >&5
-echo "$as_me: error: cannot run C compiled programs.
-If you meant to cross compile, use \`--host'.
-See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }
- fi
- fi
-fi
-echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
-rm -f a.out a.exe conftest$ac_cv_exeext b.out
+rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
ac_clean_files=$ac_clean_files_save
-# Check the compiler produces executables we can run. If not, either
-# the compiler is broken, or we cross compile.
-echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
-echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
-echo "$as_me:$LINENO: result: $cross_compiling" >&5
-echo "${ECHO_T}$cross_compiling" >&6
-
-echo "$as_me:$LINENO: checking for suffix of executables" >&5
-echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
+$as_echo_n "checking for suffix of executables... " >&6; }
+if { { ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_link") 2>&5
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; then
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then :
# If both `conftest.exe' and `conftest' are `present' (well, observable)
# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
# work properly (i.e., refer to `conftest.exe'), while it won't with
@@ -2017,38 +2875,90 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
for ac_file in conftest.exe conftest conftest.*; do
test -f "$ac_file" || continue
case $ac_file in
- *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
*.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
- export ac_cv_exeext
break;;
* ) break;;
esac
done
else
- { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
-See \`config.log' for more details." >&5
-echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
-See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details" "$LINENO" 5 ; }
fi
-
-rm -f conftest$ac_cv_exeext
-echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
-echo "${ECHO_T}$ac_cv_exeext" >&6
+rm -f conftest conftest$ac_cv_exeext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
+$as_echo "$ac_cv_exeext" >&6; }
rm -f conftest.$ac_ext
EXEEXT=$ac_cv_exeext
ac_exeext=$EXEEXT
-echo "$as_me:$LINENO: checking for suffix of object files" >&5
-echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
-if test "${ac_cv_objext+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdio.h>
+int
+main ()
+{
+FILE *f = fopen ("conftest.out", "w");
+ return ferror (f) || fclose (f) != 0;
+
+ ;
+ return 0;
+}
_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+ac_clean_files="$ac_clean_files conftest.out"
+# Check that the compiler produces executables we can run. If not, either
+# the compiler is broken, or we cross compile.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
+$as_echo_n "checking whether we are cross compiling... " >&6; }
+if test "$cross_compiling" != yes; then
+ { { ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+ if { ac_try='./conftest$ac_cv_exeext'
+ { { case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; }; then
+ cross_compiling=no
+ else
+ if test "$cross_compiling" = maybe; then
+ cross_compiling=yes
+ else
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot run C compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details" "$LINENO" 5 ; }
+ fi
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
+$as_echo "$cross_compiling" >&6; }
+
+rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
+ac_clean_files=$ac_clean_files_save
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
+$as_echo_n "checking for suffix of object files... " >&6; }
+if test "${ac_cv_objext+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
@@ -2060,45 +2970,46 @@ main ()
}
_ACEOF
rm -f conftest.o conftest.obj
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
+if { { ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_compile") 2>&5
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; then
- for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then :
+ for ac_file in conftest.o conftest.obj conftest.*; do
+ test -f "$ac_file" || continue;
case $ac_file in
- *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
*) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
break;;
esac
done
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
-See \`config.log' for more details." >&5
-echo "$as_me: error: cannot compute suffix of object files: cannot compile
-See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }
+{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot compute suffix of object files: cannot compile
+See \`config.log' for more details" "$LINENO" 5 ; }
fi
-
rm -f conftest.$ac_cv_objext conftest.$ac_ext
fi
-echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
-echo "${ECHO_T}$ac_cv_objext" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
+$as_echo "$ac_cv_objext" >&6; }
OBJEXT=$ac_cv_objext
ac_objext=$OBJEXT
-echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
-echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
-if test "${ac_cv_c_compiler_gnu+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
+$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
+if test "${ac_cv_c_compiler_gnu+set}" = set; then :
+ $as_echo_n "(cached) " >&6
else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
@@ -2112,54 +3023,34 @@ main ()
return 0;
}
_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+if ac_fn_c_try_compile "$LINENO"; then :
ac_compiler_gnu=yes
else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_compiler_gnu=no
+ ac_compiler_gnu=no
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ac_cv_c_compiler_gnu=$ac_compiler_gnu
fi
-echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
-echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
-GCC=`test $ac_compiler_gnu = yes && echo yes`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
+$as_echo "$ac_cv_c_compiler_gnu" >&6; }
+if test $ac_compiler_gnu = yes; then
+ GCC=yes
+else
+ GCC=
+fi
ac_test_CFLAGS=${CFLAGS+set}
ac_save_CFLAGS=$CFLAGS
-CFLAGS="-g"
-echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
-echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
-if test "${ac_cv_prog_cc_g+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
+$as_echo_n "checking whether $CC accepts -g... " >&6; }
+if test "${ac_cv_prog_cc_g+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_save_c_werror_flag=$ac_c_werror_flag
+ ac_c_werror_flag=yes
+ ac_cv_prog_cc_g=no
+ CFLAGS="-g"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
@@ -2170,38 +3061,49 @@ main ()
return 0;
}
_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+if ac_fn_c_try_compile "$LINENO"; then :
ac_cv_prog_cc_g=yes
else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+ CFLAGS=""
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
-ac_cv_prog_cc_g=no
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+else
+ ac_c_werror_flag=$ac_save_c_werror_flag
+ CFLAGS="-g"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_prog_cc_g=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
-echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_c_werror_flag=$ac_save_c_werror_flag
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
+$as_echo "$ac_cv_prog_cc_g" >&6; }
if test "$ac_test_CFLAGS" = set; then
CFLAGS=$ac_save_CFLAGS
elif test $ac_cv_prog_cc_g = yes; then
@@ -2217,18 +3119,14 @@ else
CFLAGS=
fi
fi
-echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
-echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
-if test "${ac_cv_prog_cc_stdc+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
+$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
+if test "${ac_cv_prog_cc_c89+set}" = set; then :
+ $as_echo_n "(cached) " >&6
else
- ac_cv_prog_cc_stdc=no
+ ac_cv_prog_cc_c89=no
ac_save_CC=$CC
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <stdarg.h>
#include <stdio.h>
@@ -2256,12 +3154,17 @@ static char *f (char * (*g) (char **, int), char **p, ...)
/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
function prototypes and stuff, but not '\xHH' hex character constants.
These don't provoke an error unfortunately, instead are silently treated
- as 'x'. The following induces an error, until -std1 is added to get
+ as 'x'. The following induces an error, until -std is added to get
proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
array size at least. It's necessary to write '\x00'==0 to get something
- that's true only with -std1. */
+ that's true only with -std. */
int osf4_cc_array ['\x00' == 0 ? 1 : -1];
+/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
+ inside strings and character constants. */
+#define FOO(x) 'x'
+int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
+
int test (int i, double x);
struct s1 {int (*f) (int a);};
struct s2 {int (*f) (double a);};
@@ -2276,201 +3179,37 @@ return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
return 0;
}
_ACEOF
-# Don't try gcc -ansi; that turns off useful extensions and
-# breaks some systems' header files.
-# AIX -qlanglvl=ansi
-# Ultrix and OSF/1 -std1
-# HP-UX 10.20 and later -Ae
-# HP-UX older versions -Aa -D_HPUX_SOURCE
-# SVR4 -Xc -D__EXTENSIONS__
-for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
+ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
do
CC="$ac_save_CC $ac_arg"
- rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_prog_cc_stdc=$ac_arg
-break
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
+ if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_prog_cc_c89=$ac_arg
fi
-rm -f conftest.err conftest.$ac_objext
+rm -f core conftest.err conftest.$ac_objext
+ test "x$ac_cv_prog_cc_c89" != "xno" && break
done
-rm -f conftest.$ac_ext conftest.$ac_objext
+rm -f conftest.$ac_ext
CC=$ac_save_CC
fi
-
-case "x$ac_cv_prog_cc_stdc" in
- x|xno)
- echo "$as_me:$LINENO: result: none needed" >&5
-echo "${ECHO_T}none needed" >&6 ;;
+# AC_CACHE_VAL
+case "x$ac_cv_prog_cc_c89" in
+ x)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+$as_echo "none needed" >&6; } ;;
+ xno)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+$as_echo "unsupported" >&6; } ;;
*)
- echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
-echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
- CC="$CC $ac_cv_prog_cc_stdc" ;;
+ CC="$CC $ac_cv_prog_cc_c89"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
+$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
esac
+if test "x$ac_cv_prog_cc_c89" != xno; then :
-# Some people use a C++ compiler to compile C. Since we use `exit',
-# in C++ we need to declare it. In case someone uses the same compiler
-# for both compiling C and C++ we need to have the C++ compiler decide
-# the declaration of exit, since it's the most demanding environment.
-cat >conftest.$ac_ext <<_ACEOF
-#ifndef __cplusplus
- choke me
-#endif
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- for ac_declaration in \
- '' \
- 'extern "C" void std::exit (int) throw (); using std::exit;' \
- 'extern "C" void std::exit (int); using std::exit;' \
- 'extern "C" void exit (int) throw ();' \
- 'extern "C" void exit (int);' \
- 'void exit (int);'
-do
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_declaration
-#include <stdlib.h>
-int
-main ()
-{
-exit (42);
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- :
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-continue
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_declaration
-int
-main ()
-{
-exit (42);
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- break
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-done
-rm -f conftest*
-if test -n "$ac_declaration"; then
- echo '#ifdef __cplusplus' >>confdefs.h
- echo $ac_declaration >>confdefs.h
- echo '#endif' >>confdefs.h
-fi
-
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -2479,18 +3218,16 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
# Require GCC.
if test x$GCC != xyes; then
- { { echo "$as_me:$LINENO: error: this code uses GNU C extensions, you must compile with GCC" >&5
-echo "$as_me: error: this code uses GNU C extensions, you must compile with GCC" >&2;}
- { (exit 1); exit 1; }; }
+ as_fn_error $? "this code uses GNU C extensions, you must compile with GCC" "$LINENO" 5
fi
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
set dummy ${ac_tool_prefix}ld; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_LD+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_LD+set}" = set; then :
+ $as_echo_n "(cached) " >&6
else
if test -n "$LD"; then
ac_cv_prog_LD="$LD" # Let the user override the test.
@@ -2500,35 +3237,37 @@ for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_LD="${ac_tool_prefix}ld"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
-done
+ done
+IFS=$as_save_IFS
fi
fi
LD=$ac_cv_prog_LD
if test -n "$LD"; then
- echo "$as_me:$LINENO: result: $LD" >&5
-echo "${ECHO_T}$LD" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
+$as_echo "$LD" >&6; }
else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
fi
+
fi
if test -z "$ac_cv_prog_LD"; then
ac_ct_LD=$LD
# Extract the first word of "ld", so it can be a program name with args.
set dummy ld; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_LD+set}" = set; then :
+ $as_echo_n "(cached) " >&6
else
if test -n "$ac_ct_LD"; then
ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
@@ -2538,27 +3277,38 @@ for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_ac_ct_LD="ld"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
-done
+ done
+IFS=$as_save_IFS
fi
fi
ac_ct_LD=$ac_cv_prog_ac_ct_LD
if test -n "$ac_ct_LD"; then
- echo "$as_me:$LINENO: result: $ac_ct_LD" >&5
-echo "${ECHO_T}$ac_ct_LD" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LD" >&5
+$as_echo "$ac_ct_LD" >&6; }
else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
fi
- LD=$ac_ct_LD
+ if test "x$ac_ct_LD" = x; then
+ LD=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ LD=$ac_ct_LD
+ fi
else
LD="$ac_cv_prog_LD"
fi
@@ -2566,10 +3316,10 @@ fi
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}objcopy", so it can be a program name with args.
set dummy ${ac_tool_prefix}objcopy; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_OBJCOPY+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_OBJCOPY+set}" = set; then :
+ $as_echo_n "(cached) " >&6
else
if test -n "$OBJCOPY"; then
ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
@@ -2579,35 +3329,37 @@ for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_OBJCOPY="${ac_tool_prefix}objcopy"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
-done
+ done
+IFS=$as_save_IFS
fi
fi
OBJCOPY=$ac_cv_prog_OBJCOPY
if test -n "$OBJCOPY"; then
- echo "$as_me:$LINENO: result: $OBJCOPY" >&5
-echo "${ECHO_T}$OBJCOPY" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
+$as_echo "$OBJCOPY" >&6; }
else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
fi
+
fi
if test -z "$ac_cv_prog_OBJCOPY"; then
ac_ct_OBJCOPY=$OBJCOPY
# Extract the first word of "objcopy", so it can be a program name with args.
set dummy objcopy; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_ac_ct_OBJCOPY+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_OBJCOPY+set}" = set; then :
+ $as_echo_n "(cached) " >&6
else
if test -n "$ac_ct_OBJCOPY"; then
ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
@@ -2617,27 +3369,38 @@ for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_ac_ct_OBJCOPY="objcopy"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
-done
+ done
+IFS=$as_save_IFS
fi
fi
ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
if test -n "$ac_ct_OBJCOPY"; then
- echo "$as_me:$LINENO: result: $ac_ct_OBJCOPY" >&5
-echo "${ECHO_T}$ac_ct_OBJCOPY" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
+$as_echo "$ac_ct_OBJCOPY" >&6; }
else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
fi
- OBJCOPY=$ac_ct_OBJCOPY
+ if test "x$ac_ct_OBJCOPY" = x; then
+ OBJCOPY=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ OBJCOPY=$ac_ct_OBJCOPY
+ fi
else
OBJCOPY="$ac_cv_prog_OBJCOPY"
fi
@@ -2645,10 +3408,10 @@ fi
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
set dummy ${ac_tool_prefix}ar; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_AR+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_AR+set}" = set; then :
+ $as_echo_n "(cached) " >&6
else
if test -n "$AR"; then
ac_cv_prog_AR="$AR" # Let the user override the test.
@@ -2658,35 +3421,37 @@ for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_AR="${ac_tool_prefix}ar"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
-done
+ done
+IFS=$as_save_IFS
fi
fi
AR=$ac_cv_prog_AR
if test -n "$AR"; then
- echo "$as_me:$LINENO: result: $AR" >&5
-echo "${ECHO_T}$AR" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
+$as_echo "$AR" >&6; }
else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
fi
+
fi
if test -z "$ac_cv_prog_AR"; then
ac_ct_AR=$AR
# Extract the first word of "ar", so it can be a program name with args.
set dummy ar; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
+ $as_echo_n "(cached) " >&6
else
if test -n "$ac_ct_AR"; then
ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
@@ -2696,27 +3461,38 @@ for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_ac_ct_AR="ar"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
-done
+ done
+IFS=$as_save_IFS
fi
fi
ac_ct_AR=$ac_cv_prog_ac_ct_AR
if test -n "$ac_ct_AR"; then
- echo "$as_me:$LINENO: result: $ac_ct_AR" >&5
-echo "${ECHO_T}$ac_ct_AR" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
+$as_echo "$ac_ct_AR" >&6; }
else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
fi
- AR=$ac_ct_AR
+ if test "x$ac_ct_AR" = x; then
+ AR=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ AR=$ac_ct_AR
+ fi
else
AR="$ac_cv_prog_AR"
fi
@@ -2724,10 +3500,10 @@ fi
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
set dummy ${ac_tool_prefix}ranlib; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_RANLIB+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_RANLIB+set}" = set; then :
+ $as_echo_n "(cached) " >&6
else
if test -n "$RANLIB"; then
ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
@@ -2737,35 +3513,37 @@ for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
-done
+ done
+IFS=$as_save_IFS
fi
fi
RANLIB=$ac_cv_prog_RANLIB
if test -n "$RANLIB"; then
- echo "$as_me:$LINENO: result: $RANLIB" >&5
-echo "${ECHO_T}$RANLIB" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
+$as_echo "$RANLIB" >&6; }
else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
fi
+
fi
if test -z "$ac_cv_prog_RANLIB"; then
ac_ct_RANLIB=$RANLIB
# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
+ $as_echo_n "(cached) " >&6
else
if test -n "$ac_ct_RANLIB"; then
ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
@@ -2775,27 +3553,38 @@ for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_ac_ct_RANLIB="ranlib"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
-done
+ done
+IFS=$as_save_IFS
fi
fi
ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
if test -n "$ac_ct_RANLIB"; then
- echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
-echo "${ECHO_T}$ac_ct_RANLIB" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
+$as_echo "$ac_ct_RANLIB" >&6; }
else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
fi
- RANLIB=$ac_ct_RANLIB
+ if test "x$ac_ct_RANLIB" = x; then
+ RANLIB=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ RANLIB=$ac_ct_RANLIB
+ fi
else
RANLIB="$ac_cv_prog_RANLIB"
fi
@@ -2803,10 +3592,10 @@ fi
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args.
set dummy ${ac_tool_prefix}mig; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_MIG+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_MIG+set}" = set; then :
+ $as_echo_n "(cached) " >&6
else
if test -n "$MIG"; then
ac_cv_prog_MIG="$MIG" # Let the user override the test.
@@ -2816,35 +3605,37 @@ for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_MIG="${ac_tool_prefix}mig"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
-done
+ done
+IFS=$as_save_IFS
fi
fi
MIG=$ac_cv_prog_MIG
if test -n "$MIG"; then
- echo "$as_me:$LINENO: result: $MIG" >&5
-echo "${ECHO_T}$MIG" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MIG" >&5
+$as_echo "$MIG" >&6; }
else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
fi
+
fi
if test -z "$ac_cv_prog_MIG"; then
ac_ct_MIG=$MIG
# Extract the first word of "mig", so it can be a program name with args.
set dummy mig; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_ac_ct_MIG+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_MIG+set}" = set; then :
+ $as_echo_n "(cached) " >&6
else
if test -n "$ac_ct_MIG"; then
ac_cv_prog_ac_ct_MIG="$ac_ct_MIG" # Let the user override the test.
@@ -2854,124 +3645,102 @@ for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_ac_ct_MIG="mig"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
-done
+ done
+IFS=$as_save_IFS
fi
fi
ac_ct_MIG=$ac_cv_prog_ac_ct_MIG
if test -n "$ac_ct_MIG"; then
- echo "$as_me:$LINENO: result: $ac_ct_MIG" >&5
-echo "${ECHO_T}$ac_ct_MIG" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MIG" >&5
+$as_echo "$ac_ct_MIG" >&6; }
else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
fi
- MIG=$ac_ct_MIG
+ if test "x$ac_ct_MIG" = x; then
+ MIG=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ MIG=$ac_ct_MIG
+ fi
else
MIG="$ac_cv_prog_MIG"
fi
# Require MiG.
if test x${MIG} = x; then
- { { echo "$as_me:$LINENO: error:
-*** You need GNU MiG to compile the GNU Hurd, please see
-*** http://www.gnu.org/software/hurd/mig.html for further details, or
-*** download it directly from the main GNU server (ftp.gnu.org) or any
-*** GNU mirror." >&5
-echo "$as_me: error:
+ as_fn_error $? "
*** You need GNU MiG to compile the GNU Hurd, please see
*** http://www.gnu.org/software/hurd/mig.html for further details, or
*** download it directly from the main GNU server (ftp.gnu.org) or any
-*** GNU mirror." >&2;}
- { (exit 1); exit 1; }; }
+*** GNU mirror." "$LINENO" 5
fi
# See if there's a separate libcrypt (many systems put crypt there).
-echo "$as_me:$LINENO: checking for crypt in -lcrypt" >&5
-echo $ECHO_N "checking for crypt in -lcrypt... $ECHO_C" >&6
-if test "${ac_cv_lib_crypt_crypt+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for crypt in -lcrypt" >&5
+$as_echo_n "checking for crypt in -lcrypt... " >&6; }
+if test "${ac_cv_lib_crypt_crypt+set}" = set; then :
+ $as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lcrypt $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-/* Override any gcc2 internal prototype to avoid an error. */
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
#ifdef __cplusplus
extern "C"
#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
char crypt ();
int
main ()
{
-crypt ();
+return crypt ();
;
return 0;
}
_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+if ac_fn_c_try_link "$LINENO"; then :
ac_cv_lib_crypt_crypt=yes
else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_crypt_crypt=no
+ ac_cv_lib_crypt_crypt=no
fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_crypt_crypt" >&5
-echo "${ECHO_T}$ac_cv_lib_crypt_crypt" >&6
-if test $ac_cv_lib_crypt_crypt = yes; then
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypt_crypt" >&5
+$as_echo "$ac_cv_lib_crypt_crypt" >&6; }
+if test "x$ac_cv_lib_crypt_crypt" = x""yes; then :
LIBCRYPT=-lcrypt
fi
# See if mig groks `retcode'.
-echo "$as_me:$LINENO: checking whether $MIG supports the retcode keyword" >&5
-echo $ECHO_N "checking whether $MIG supports the retcode keyword... $ECHO_C" >&6
-if test "${hurd_cv_mig_retcode+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $MIG supports the retcode keyword" >&5
+$as_echo_n "checking whether $MIG supports the retcode keyword... " >&6; }
+if test "${hurd_cv_mig_retcode+set}" = set; then :
+ $as_echo_n "(cached) " >&6
else
cat > conftest.defs <<\EOF
#include <mach/std_types.defs>
@@ -2984,31 +3753,29 @@ simpleroutine foobar_reply (
err: kern_return_t, RetCode);
EOF
if { ac_try='CC="${CC}" ${MIG-false} -n conftest.defs 1>&5'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; }; then
hurd_cv_mig_retcode=yes
else
hurd_cv_mig_retcode=no
fi
rm -f conftest*
fi
-echo "$as_me:$LINENO: result: $hurd_cv_mig_retcode" >&5
-echo "${ECHO_T}$hurd_cv_mig_retcode" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hurd_cv_mig_retcode" >&5
+$as_echo "$hurd_cv_mig_retcode" >&6; }
if test $hurd_cv_mig_retcode = yes; then
- cat >>confdefs.h <<\_ACEOF
-#define HAVE_MIG_RETCODE 1
-_ACEOF
+ $as_echo "#define HAVE_MIG_RETCODE 1" >>confdefs.h
fi
# See if --version-script is available.
-echo "$as_me:$LINENO: checking for ld --version-script" >&5
-echo $ECHO_N "checking for ld --version-script... $ECHO_C" >&6
-if test "${hurd_cv_ld_version_script_option+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld --version-script" >&5
+$as_echo_n "checking for ld --version-script... " >&6; }
+if test "${hurd_cv_ld_version_script_option+set}" = set; then :
+ $as_echo_n "(cached) " >&6
else
cat > conftest.c <<\EOF
void foobar() {}
@@ -3024,40 +3791,36 @@ VERS_2 {
EOF
if { ac_try='eval $ac_compile 1>&5'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; } &&
{ ac_try='${CC-cc} $CFLAGS -shared -o conftest.so conftest.o
-nostartfiles -nostdlib
-Wl,--version-script,conftest.map
1>&5'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; }; then
hurd_cv_ld_version_script_option=yes
else
hurd_cv_ld_version_script_option=no
fi
rm -f conftest*
fi
-echo "$as_me:$LINENO: result: $hurd_cv_ld_version_script_option" >&5
-echo "${ECHO_T}$hurd_cv_ld_version_script_option" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hurd_cv_ld_version_script_option" >&5
+$as_echo "$hurd_cv_ld_version_script_option" >&6; }
# See if libc was built with --enable-libio.
-echo "$as_me:$LINENO: checking for libio" >&5
-echo $ECHO_N "checking for libio... $ECHO_C" >&6
-if test "${hurd_cv_libio+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libio" >&5
+$as_echo_n "checking for libio... " >&6; }
+if test "${hurd_cv_libio+set}" = set; then :
+ $as_echo_n "(cached) " >&6
else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <stdio.h>
#ifndef _STDIO_USES_IOSTREAM
@@ -3071,38 +3834,15 @@ main ()
return 0;
}
_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+if ac_fn_c_try_compile "$LINENO"; then :
hurd_cv_libio=yes
else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-hurd_cv_libio=no
+ hurd_cv_libio=no
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-echo "$as_me:$LINENO: result: $hurd_cv_libio" >&5
-echo "${ECHO_T}$hurd_cv_libio" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hurd_cv_libio" >&5
+$as_echo "$hurd_cv_libio" >&6; }
# The versions of the symbols in libthreads have to match those in
# libc.so. Since the symbols in a libc that includes libio will be
@@ -3117,308 +3857,734 @@ fi
# Check if libc contains getgrouplist and/or uselocale.
+for ac_func in getgrouplist uselocale
+do :
+ as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
-for ac_func in getgrouplist uselocale
+
+# From glibc HEAD, 2007-11-07.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -fgnu89-inline" >&5
+$as_echo_n "checking for -fgnu89-inline... " >&6; }
+if test "${libc_cv_gnu89_inline+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat > conftest.c <<EOF
+int foo;
+#ifdef __GNUC_GNU_INLINE__
+main () { return 0;}
+#else
+#error
+#endif
+EOF
+if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS -S -std=gnu99 -fgnu89-inline
+ -o conftest.s conftest.c 1>&5'
+ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; }
+then
+ libc_cv_gnu89_inline=yes
+else
+ libc_cv_gnu89_inline=no
+fi
+rm -f conftest*
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_gnu89_inline" >&5
+$as_echo "$libc_cv_gnu89_inline" >&6; }
+if test $libc_cv_gnu89_inline = yes; then
+ libc_cv_gnu89_inline=-fgnu89-inline
+else
+ libc_cv_gnu89_inline=
+fi
+
+
+
+# Insist on libparted unless the user declines explicitely
+
+# Check whether --with-parted was given.
+if test "${with_parted+set}" = set; then :
+ withval=$with_parted;
+else
+ with_parted=yes
+fi
+
+
+PARTED_LIBS=
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
+$as_echo_n "checking how to run the C preprocessor... " >&6; }
+# On Suns, sometimes $CPP names a directory.
+if test -n "$CPP" && test -d "$CPP"; then
+ CPP=
+fi
+if test -z "$CPP"; then
+ if test "${ac_cv_prog_CPP+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ # Double quotes because CPP needs to be expanded
+ for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
+ do
+ ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
+ # Use a header file that comes with gcc, so configuring glibc
+ # with a fresh cross-compiler works.
+ # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ # <limits.h> exists even on freestanding compilers.
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp. "Syntax error" is here to catch this case.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+ Syntax error
_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+
+else
+ # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+ # OK, works on sane cases. Now check whether nonexistent headers
+ # can be detected and how.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
- For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define $ac_func innocuous_$ac_func
+#include <ac_nonexistent.h>
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+ # Broken: success on invalid input.
+continue
+else
+ # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); below.
- Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- <limits.h> exists even on freestanding compilers. */
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.i conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then :
+ break
+fi
+ done
+ ac_cv_prog_CPP=$CPP
+
+fi
+ CPP=$ac_cv_prog_CPP
+else
+ ac_cv_prog_CPP=$CPP
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
+$as_echo "$CPP" >&6; }
+ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+ # Use a header file that comes with gcc, so configuring glibc
+ # with a fresh cross-compiler works.
+ # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ # <limits.h> exists even on freestanding compilers.
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp. "Syntax error" is here to catch this case.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
#ifdef __STDC__
# include <limits.h>
#else
# include <assert.h>
#endif
+ Syntax error
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
-#undef $ac_func
+else
+ # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
+ # OK, works on sane cases. Now check whether nonexistent headers
+ # can be detected and how.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <ac_nonexistent.h>
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+ # Broken: success on invalid input.
+continue
+else
+ # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.i conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then :
+
+else
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details" "$LINENO" 5 ; }
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
+$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
+if test "${ac_cv_path_GREP+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -z "$GREP"; then
+ ac_path_GREP_found=false
+ # Loop through the user's path and test for each of PROGNAME-LIST
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_prog in grep ggrep; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
+ { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
+# Check for GNU ac_path_GREP and select it if it is found.
+ # Check for GNU $ac_path_GREP
+case `"$ac_path_GREP" --version 2>&1` in
+*GNU*)
+ ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
+*)
+ ac_count=0
+ $as_echo_n 0123456789 >"conftest.in"
+ while :
+ do
+ cat "conftest.in" "conftest.in" >"conftest.tmp"
+ mv "conftest.tmp" "conftest.in"
+ cp "conftest.in" "conftest.nl"
+ $as_echo 'GREP' >> "conftest.nl"
+ "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+ as_fn_arith $ac_count + 1 && ac_count=$as_val
+ if test $ac_count -gt ${ac_path_GREP_max-0}; then
+ # Best one so far, save it but keep looking for a better one
+ ac_cv_path_GREP="$ac_path_GREP"
+ ac_path_GREP_max=$ac_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test $ac_count -gt 10 && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+ $ac_path_GREP_found && break 3
+ done
+ done
+ done
+IFS=$as_save_IFS
+ if test -z "$ac_cv_path_GREP"; then
+ as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+ fi
+else
+ ac_cv_path_GREP=$GREP
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
+$as_echo "$ac_cv_path_GREP" >&6; }
+ GREP="$ac_cv_path_GREP"
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
+$as_echo_n "checking for egrep... " >&6; }
+if test "${ac_cv_path_EGREP+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
+ then ac_cv_path_EGREP="$GREP -E"
+ else
+ if test -z "$EGREP"; then
+ ac_path_EGREP_found=false
+ # Loop through the user's path and test for each of PROGNAME-LIST
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_prog in egrep; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
+ { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
+# Check for GNU ac_path_EGREP and select it if it is found.
+ # Check for GNU $ac_path_EGREP
+case `"$ac_path_EGREP" --version 2>&1` in
+*GNU*)
+ ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
+*)
+ ac_count=0
+ $as_echo_n 0123456789 >"conftest.in"
+ while :
+ do
+ cat "conftest.in" "conftest.in" >"conftest.tmp"
+ mv "conftest.tmp" "conftest.in"
+ cp "conftest.in" "conftest.nl"
+ $as_echo 'EGREP' >> "conftest.nl"
+ "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+ as_fn_arith $ac_count + 1 && ac_count=$as_val
+ if test $ac_count -gt ${ac_path_EGREP_max-0}; then
+ # Best one so far, save it but keep looking for a better one
+ ac_cv_path_EGREP="$ac_path_EGREP"
+ ac_path_EGREP_max=$ac_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test $ac_count -gt 10 && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+ $ac_path_EGREP_found && break 3
+ done
+ done
+ done
+IFS=$as_save_IFS
+ if test -z "$ac_cv_path_EGREP"; then
+ as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+ fi
+else
+ ac_cv_path_EGREP=$EGREP
+fi
+
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
+$as_echo "$ac_cv_path_EGREP" >&6; }
+ EGREP="$ac_cv_path_EGREP"
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
+$as_echo_n "checking for ANSI C header files... " >&6; }
+if test "${ac_cv_header_stdc+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
+
+int
+main ()
{
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func ();
-/* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-char (*f) () = $ac_func;
-#endif
-#ifdef __cplusplus
+
+ ;
+ return 0;
}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_header_stdc=yes
+else
+ ac_cv_header_stdc=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+if test $ac_cv_header_stdc = yes; then
+ # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <string.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "memchr" >/dev/null 2>&1; then :
+
+else
+ ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+ # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdlib.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "free" >/dev/null 2>&1; then :
+
+else
+ ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+ # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
+ if test "$cross_compiling" = yes; then :
+ :
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <ctype.h>
+#include <stdlib.h>
+#if ((' ' & 0x0FF) == 0x020)
+# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+#else
+# define ISLOWER(c) \
+ (('a' <= (c) && (c) <= 'i') \
+ || ('j' <= (c) && (c) <= 'r') \
+ || ('s' <= (c) && (c) <= 'z'))
+# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
#endif
+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
int
main ()
{
-return f != $ac_func;
- ;
+ int i;
+ for (i = 0; i < 256; i++)
+ if (XOR (islower (i), ISLOWER (i))
+ || toupper (i) != TOUPPER (i))
+ return 2;
return 0;
}
_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- eval "$as_ac_var=yes"
+if ac_fn_c_try_run "$LINENO"; then :
+
else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+ ac_cv_header_stdc=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
-eval "$as_ac_var=no"
fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-if test `eval echo '${'$as_ac_var'}'` = yes; then
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
+$as_echo "$ac_cv_header_stdc" >&6; }
+if test $ac_cv_header_stdc = yes; then
+
+$as_echo "#define STDC_HEADERS 1" >>confdefs.h
+
+fi
+
+# On IRIX 5.3, sys/types and inttypes.h are conflicting.
+for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
+ inttypes.h stdint.h unistd.h
+do :
+ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
+"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
fi
+
done
+if test "x$with_parted" != xno; then :
-# Check whether --with-parted or --without-parted was given.
-if test "${with_parted+set}" = set; then
- withval="$with_parted"
+ ac_fn_c_check_header_mongrel "$LINENO" "parted/parted.h" "ac_cv_header_parted_parted_h" "$ac_includes_default"
+if test "x$ac_cv_header_parted_parted_h" = x""yes; then :
+ $as_echo "#define HAVE_PARTED_PARTED_H 1" >>confdefs.h
else
- with_parted=yes
-fi;
-# Check whether --enable-boot-store-types or --disable-boot-store-types was given.
-if test "${enable_boot_store_types+set}" = set; then
- enableval="$enable_boot_store_types"
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "Please install required libraries or use --without-parted.
+See \`config.log' for more details" "$LINENO" 5 ; }
+
+fi
-fi; if test -z "$enable_boot_store_types"; then
- boot_store_types='device remap gunzip bunzip2'
- # Check for Parted's static store module.
- if test "x$with_parted" != xno; then
- save_LDFLAGS="$LDFLAGS"
- LDFLAGS="$LDFLAGS -static"
- echo "$as_me:$LINENO: checking for store_part_open in -lstore_part" >&5
-echo $ECHO_N "checking for store_part_open in -lstore_part... $ECHO_C" >&6
-if test "${ac_cv_lib_store_part_store_part_open+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ped_device_read in -lparted" >&5
+$as_echo_n "checking for ped_device_read in -lparted... " >&6; }
+if test "${ac_cv_lib_parted_ped_device_read+set}" = set; then :
+ $as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
-LIBS="-lstore_part -luuid -lstore $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+LIBS="-lparted $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-/* Override any gcc2 internal prototype to avoid an error. */
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
#ifdef __cplusplus
extern "C"
#endif
-/* We use char because int might match the return type of a gcc2
+char ped_device_read ();
+int
+main ()
+{
+return ped_device_read ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_parted_ped_device_read=yes
+else
+ ac_cv_lib_parted_ped_device_read=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_parted_ped_device_read" >&5
+$as_echo "$ac_cv_lib_parted_ped_device_read" >&6; }
+if test "x$ac_cv_lib_parted_ped_device_read" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBPARTED 1
+_ACEOF
+
+ LIBS="-lparted $LIBS"
+
+else
+
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "Please install required libraries or use --without-parted.
+See \`config.log' for more details" "$LINENO" 5 ; }
+
+fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_generate in -luuid" >&5
+$as_echo_n "checking for uuid_generate in -luuid... " >&6; }
+if test "${ac_cv_lib_uuid_uuid_generate+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-luuid $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
-char store_part_open ();
+#ifdef __cplusplus
+extern "C"
+#endif
+char uuid_generate ();
int
main ()
{
-store_part_open ();
+return uuid_generate ();
;
return 0;
}
_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_lib_store_part_store_part_open=yes
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_uuid_uuid_generate=yes
else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+ ac_cv_lib_uuid_uuid_generate=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_generate" >&5
+$as_echo "$ac_cv_lib_uuid_uuid_generate" >&6; }
+if test "x$ac_cv_lib_uuid_uuid_generate" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBUUID 1
+_ACEOF
-ac_cv_lib_store_part_store_part_open=no
+ LIBS="-luuid $LIBS"
+
+else
+
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "Please install required libraries or use --without-parted.
+See \`config.log' for more details" "$LINENO" 5 ; }
+
+fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
+$as_echo_n "checking for dlopen in -ldl... " >&6; }
+if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldl $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dlopen ();
+int
+main ()
+{
+return dlopen ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_dl_dlopen=yes
+else
+ ac_cv_lib_dl_dlopen=no
fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_store_part_store_part_open" >&5
-echo "${ECHO_T}$ac_cv_lib_store_part_store_part_open" >&6
-if test $ac_cv_lib_store_part_store_part_open = yes; then
- boot_store_types="$boot_store_types part"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
+$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
+if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBDL 1
+_ACEOF
+
+ LIBS="-ldl $LIBS"
+
+else
+
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "Please install required libraries or use --without-parted.
+See \`config.log' for more details" "$LINENO" 5 ; }
+
fi
- LDFLAGS="$save_LDFLAGS"
- fi
+ PARTED_LIBS="-lparted -luuid -ldl"
+
+fi
+
+
+# Check whether --enable-boot-store-types was given.
+if test "${enable_boot_store_types+set}" = set; then :
+ enableval=$enable_boot_store_types;
+fi
+if test -z "$enable_boot_store_types"; then
+ boot_store_types='device remap gunzip bunzip2'
+ test -z "$PARTED_LIBS" || boot_store_types="$boot_store_types part"
elif test "x$enable_boot_store_types" = xno; then
- { echo "$as_me:$LINENO: WARNING: you probably wanted --disable-static-progs" >&5
-echo "$as_me: WARNING: you probably wanted --disable-static-progs" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: you probably wanted --disable-static-progs" >&5
+$as_echo "$as_me: WARNING: you probably wanted --disable-static-progs" >&2;}
else
boot_store_types="$enable_boot_store_types"
fi
-echo "$as_me:$LINENO: checking boot store types" >&5
-echo $ECHO_N "checking boot store types... $ECHO_C" >&6
-echo "$as_me:$LINENO: result: $boot_store_types" >&5
-echo "${ECHO_T}$boot_store_types" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking boot store types" >&5
+$as_echo_n "checking boot store types... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_store_types" >&5
+$as_echo "$boot_store_types" >&6; }
# Check for ncursesw, which is needed for the console-curses client.
- # Check whether --enable-ncursesw or --disable-ncursesw was given.
-if test "${enable_ncursesw+set}" = set; then
- enableval="$enable_ncursesw"
-
+ # Check whether --enable-ncursesw was given.
+if test "${enable_ncursesw+set}" = set; then :
+ enableval=$enable_ncursesw;
else
enable_ncursesw=yes
-fi;
+fi
+
if test "$enable_ncursesw" = yes; then
- echo "$as_me:$LINENO: checking for initscr in -lncursesw" >&5
-echo $ECHO_N "checking for initscr in -lncursesw... $ECHO_C" >&6
-if test "${ac_cv_lib_ncursesw_initscr+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for initscr in -lncursesw" >&5
+$as_echo_n "checking for initscr in -lncursesw... " >&6; }
+if test "${ac_cv_lib_ncursesw_initscr+set}" = set; then :
+ $as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lncursesw $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-/* Override any gcc2 internal prototype to avoid an error. */
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
#ifdef __cplusplus
extern "C"
#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
char initscr ();
int
main ()
{
-initscr ();
+return initscr ();
;
return 0;
}
_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+if ac_fn_c_try_link "$LINENO"; then :
ac_cv_lib_ncursesw_initscr=yes
else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_ncursesw_initscr=no
+ ac_cv_lib_ncursesw_initscr=no
fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_ncursesw_initscr" >&5
-echo "${ECHO_T}$ac_cv_lib_ncursesw_initscr" >&6
-if test $ac_cv_lib_ncursesw_initscr = yes; then
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ncursesw_initscr" >&5
+$as_echo "$ac_cv_lib_ncursesw_initscr" >&6; }
+if test "x$ac_cv_lib_ncursesw_initscr" = x""yes; then :
LIBNCURSESW="-lncursesw"
fi
if test "$LIBNCURSESW"; then
-# Check whether --with-ncursesw-include-dir or --without-ncursesw-include-dir was given.
-if test "${with_ncursesw_include_dir+set}" = set; then
- withval="$with_ncursesw_include_dir"
-
-fi; if test "${with_ncursesw_include_dir+set}" = set; then
- echo "$as_me:$LINENO: checking for ncursesw include dir" >&5
-echo $ECHO_N "checking for ncursesw include dir... $ECHO_C" >&6
+# Check whether --with-ncursesw-include-dir was given.
+if test "${with_ncursesw_include_dir+set}" = set; then :
+ withval=$with_ncursesw_include_dir;
+fi
+ if test "${with_ncursesw_include_dir+set}" = set; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ncursesw include dir" >&5
+$as_echo_n "checking for ncursesw include dir... " >&6; }
case "$with_ncursesw_include_dir" in
no|none)
hurd_cv_includedir_ncursesw=none;;
*)
hurd_cv_includedir_ncursesw="$with_ncursesw_include_dir";;
esac
- echo "$as_me:$LINENO: result: $hurd_cv_includedir_ncursesw" >&5
-echo "${ECHO_T}$hurd_cv_includedir_ncursesw" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hurd_cv_includedir_ncursesw" >&5
+$as_echo "$hurd_cv_includedir_ncursesw" >&6; }
else
- echo "$as_me:$LINENO: checking for ncursesw include dir" >&5
-echo $ECHO_N "checking for ncursesw include dir... $ECHO_C" >&6
-if test "${hurd_cv_includedir_ncursesw+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ncursesw include dir" >&5
+$as_echo_n "checking for ncursesw include dir... " >&6; }
+if test "${hurd_cv_includedir_ncursesw+set}" = set; then :
+ $as_echo_n "(cached) " >&6
else
for D in $includedir $prefix/include /local/include /usr/local/include /include /usr/include; do
if test -d $D/ncursesw; then
@@ -3429,8 +4595,8 @@ else
|| hurd_cv_includedir_ncursesw=none
done
fi
-echo "$as_me:$LINENO: result: $hurd_cv_includedir_ncursesw" >&5
-echo "${ECHO_T}$hurd_cv_includedir_ncursesw" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hurd_cv_includedir_ncursesw" >&5
+$as_echo "$hurd_cv_includedir_ncursesw" >&6; }
fi
if test "$hurd_cv_includedir_ncursesw" = none; then
NCURSESW_INCLUDE=""
@@ -3454,7 +4620,7 @@ else
echo ${file}:build.mk.in; done`"
fi
- ac_config_files="$ac_config_files config.make ${makefiles}"
+ac_config_files="$ac_config_files config.make ${makefiles}"
cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
@@ -3474,39 +4640,59 @@ _ACEOF
# The following way of writing the cache mishandles newlines in values,
# but we know of no workaround that is simple, portable, and efficient.
-# So, don't put newlines in cache variables' values.
+# So, we kill variables containing newlines.
# Ultrix sh set writes to stderr and can't be redirected directly,
# and sets the high bit in the cache file unless we assign to the vars.
-{
+(
+ for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
+ eval ac_val=\$$ac_var
+ case $ac_val in #(
+ *${as_nl}*)
+ case $ac_var in #(
+ *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+ esac
+ case $ac_var in #(
+ _ | IFS | as_nl) ;; #(
+ BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
+ *) { eval $ac_var=; unset $ac_var;} ;;
+ esac ;;
+ esac
+ done
+
(set) 2>&1 |
- case `(ac_space=' '; set | grep ac_space) 2>&1` in
- *ac_space=\ *)
- # `set' does not quote correctly, so add quotes (double-quote
- # substitution turns \\\\ into \\, and sed turns \\ into \).
+ case $as_nl`(ac_space=' '; set) 2>&1` in #(
+ *${as_nl}ac_space=\ *)
+ # `set' does not quote correctly, so add quotes: double-quote
+ # substitution turns \\\\ into \\, and sed turns \\ into \.
sed -n \
"s/'/'\\\\''/g;
s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
- ;;
+ ;; #(
*)
# `set' quotes correctly as required by POSIX, so do not add quotes.
- sed -n \
- "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
+ sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
;;
- esac;
-} |
+ esac |
+ sort
+) |
sed '
+ /^ac_cv_env_/b end
t clear
- : clear
+ :clear
s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
t end
- /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
- : end' >>confcache
-if diff $cache_file confcache >/dev/null 2>&1; then :; else
- if test -w $cache_file; then
- test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
+ s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+ :end' >>confcache
+if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
+ if test -w "$cache_file"; then
+ test "x$cache_file" != "x/dev/null" &&
+ { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
+$as_echo "$as_me: updating cache $cache_file" >&6;}
cat confcache >$cache_file
else
- echo "not updating unwritable cache $cache_file"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
+$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
fi
fi
rm -f confcache
@@ -3515,63 +4701,55 @@ test "x$prefix" = xNONE && prefix=$ac_default_prefix
# Let make expand exec_prefix.
test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-# VPATH may cause trouble with some makes, so we remove $(srcdir),
-# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
-# trailing colons and then remove the whole line if VPATH becomes empty
-# (actually we leave an empty line to preserve line numbers).
-if test "x$srcdir" = x.; then
- ac_vpsub='/^[ ]*VPATH[ ]*=/{
-s/:*\$(srcdir):*/:/;
-s/:*\${srcdir}:*/:/;
-s/:*@srcdir@:*/:/;
-s/^\([^=]*=[ ]*\):*/\1/;
-s/:*$//;
-s/^[^=]*=[ ]*$//;
-}'
-fi
-
# Transform confdefs.h into DEFS.
# Protect against shell expansion while executing Makefile rules.
# Protect against Makefile macro expansion.
#
# If the first sed substitution is executed (which looks for macros that
-# take arguments), then we branch to the quote section. Otherwise,
+# take arguments), then branch to the quote section. Otherwise,
# look for a macro that doesn't take arguments.
-cat >confdef2opt.sed <<\_ACEOF
+ac_script='
+:mline
+/\\$/{
+ N
+ s,\\\n,,
+ b mline
+}
t clear
-: clear
-s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\),-D\1=\2,g
+:clear
+s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g
t quote
-s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\),-D\1=\2,g
+s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g
t quote
-d
-: quote
-s,[ `~#$^&*(){}\\|;'"<>?],\\&,g
-s,\[,\\&,g
-s,\],\\&,g
-s,\$,$$,g
-p
-_ACEOF
-# We use echo to avoid assuming a particular line-breaking character.
-# The extra dot is to prevent the shell from consuming trailing
-# line-breaks from the sub-command output. A line-break within
-# single-quotes doesn't work because, if this script is created in a
-# platform that uses two characters for line-breaks (e.g., DOS), tr
-# would break.
-ac_LF_and_DOT=`echo; echo .`
-DEFS=`sed -n -f confdef2opt.sed confdefs.h | tr "$ac_LF_and_DOT" ' .'`
-rm -f confdef2opt.sed
+b any
+:quote
+s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g
+s/\[/\\&/g
+s/\]/\\&/g
+s/\$/$$/g
+H
+:any
+${
+ g
+ s/^\n//
+ s/\n/ /g
+ p
+}
+'
+DEFS=`sed -n "$ac_script" confdefs.h`
ac_libobjs=
ac_ltlibobjs=
+U=
for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
# 1. Remove the extension, and $U if already installed.
- ac_i=`echo "$ac_i" |
- sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
- # 2. Add them.
- ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
- ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
+ ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
+ ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
+ # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
+ # will be set to the directory where LIBOBJS objects are built.
+ as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
+ as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
done
LIBOBJS=$ac_libobjs
@@ -3580,11 +4758,13 @@ LTLIBOBJS=$ac_ltlibobjs
: ${CONFIG_STATUS=./config.status}
+ac_write_fail=0
ac_clean_files_save=$ac_clean_files
ac_clean_files="$ac_clean_files $CONFIG_STATUS"
-{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
-echo "$as_me: creating $CONFIG_STATUS" >&6;}
-cat >$CONFIG_STATUS <<_ACEOF
+{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
+$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
+as_write_fail=0
+cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
#! $SHELL
# Generated by $as_me.
# Run this file to recreate the current configuration.
@@ -3594,81 +4774,252 @@ cat >$CONFIG_STATUS <<_ACEOF
debug=false
ac_cs_recheck=false
ac_cs_silent=false
-SHELL=\${CONFIG_SHELL-$SHELL}
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
-## --------------------- ##
-## M4sh Initialization. ##
-## --------------------- ##
-
-# Be Bourne compatible
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+SHELL=\${CONFIG_SHELL-$SHELL}
+export SHELL
+_ASEOF
+cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
+## -------------------- ##
+## M4sh Initialization. ##
+## -------------------- ##
+
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
emulate sh
NULLCMD=:
- # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+ # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
# is contrary to our usage. Disable this feature.
alias -g '${1+"$@"}'='"$@"'
-elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
- set -o posix
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in #(
+ *posix*) :
+ set -o posix ;; #(
+ *) :
+ ;;
+esac
fi
-DUALCASE=1; export DUALCASE # for MKS sh
-# Support unset when possible.
-if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
- as_unset=unset
+
+as_nl='
+'
+export as_nl
+# Printing a long string crashes Solaris 7 /usr/bin/printf.
+as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
+# Prefer a ksh shell builtin over an external printf program on Solaris,
+# but without wasting forks for bash or zsh.
+if test -z "$BASH_VERSION$ZSH_VERSION" \
+ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='print -r --'
+ as_echo_n='print -rn --'
+elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='printf %s\n'
+ as_echo_n='printf %s'
else
- as_unset=false
+ if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
+ as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
+ as_echo_n='/usr/ucb/echo -n'
+ else
+ as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
+ as_echo_n_body='eval
+ arg=$1;
+ case $arg in #(
+ *"$as_nl"*)
+ expr "X$arg" : "X\\(.*\\)$as_nl";
+ arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
+ esac;
+ expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
+ '
+ export as_echo_n_body
+ as_echo_n='sh -c $as_echo_n_body as_echo'
+ fi
+ export as_echo_body
+ as_echo='sh -c $as_echo_body as_echo'
+fi
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ PATH_SEPARATOR=:
+ (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+ (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+ PATH_SEPARATOR=';'
+ }
fi
-# Work around bugs in pre-3.0 UWIN ksh.
-$as_unset ENV MAIL MAILPATH
+# IFS
+# We need space, tab and new line, in precisely that order. Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+IFS=" "" $as_nl"
+
+# Find who we are. Look in the path if we contain no directory separator.
+case $0 in #((
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+ as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+ $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+ exit 1
+fi
+
+# Unset variables that we do not need and which cause bugs (e.g. in
+# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
+# suppresses any "Segmentation fault" message there. '((' could
+# trigger a bug in pdksh 5.2.14.
+for as_var in BASH_ENV ENV MAIL MAILPATH
+do eval test x\${$as_var+set} = xset \
+ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
+done
PS1='$ '
PS2='> '
PS4='+ '
# NLS nuisances.
-for as_var in \
- LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
- LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
- LC_TELEPHONE LC_TIME
-do
- if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
- eval $as_var=C; export $as_var
- else
- $as_unset $as_var
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# CDPATH.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+
+# as_fn_error STATUS ERROR [LINENO LOG_FD]
+# ----------------------------------------
+# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
+# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
+# script with STATUS, using 1 if that was 0.
+as_fn_error ()
+{
+ as_status=$1; test $as_status -eq 0 && as_status=1
+ if test "$4"; then
+ as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
fi
-done
+ $as_echo "$as_me: error: $2" >&2
+ as_fn_exit $as_status
+} # as_fn_error
+
+
+# as_fn_set_status STATUS
+# -----------------------
+# Set $? to STATUS, without forking.
+as_fn_set_status ()
+{
+ return $1
+} # as_fn_set_status
+
+# as_fn_exit STATUS
+# -----------------
+# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
+as_fn_exit ()
+{
+ set +e
+ as_fn_set_status $1
+ exit $1
+} # as_fn_exit
+
+# as_fn_unset VAR
+# ---------------
+# Portably unset VAR.
+as_fn_unset ()
+{
+ { eval $1=; unset $1;}
+}
+as_unset=as_fn_unset
+# as_fn_append VAR VALUE
+# ----------------------
+# Append the text in VALUE to the end of the definition contained in VAR. Take
+# advantage of any shell optimizations that allow amortized linear growth over
+# repeated appends, instead of the typical quadratic growth present in naive
+# implementations.
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
+ eval 'as_fn_append ()
+ {
+ eval $1+=\$2
+ }'
+else
+ as_fn_append ()
+ {
+ eval $1=\$$1\$2
+ }
+fi # as_fn_append
+
+# as_fn_arith ARG...
+# ------------------
+# Perform arithmetic evaluation on the ARGs, and store the result in the
+# global $as_val. Take advantage of shells that can avoid forks. The arguments
+# must be portable across $(()) and expr.
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
+ eval 'as_fn_arith ()
+ {
+ as_val=$(( $* ))
+ }'
+else
+ as_fn_arith ()
+ {
+ as_val=`expr "$@" || test $? -eq 1`
+ }
+fi # as_fn_arith
-# Required to use basename.
-if expr a : '\(a\)' >/dev/null 2>&1; then
+
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
as_expr=expr
else
as_expr=false
fi
-if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
as_basename=basename
else
as_basename=false
fi
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+ as_dirname=dirname
+else
+ as_dirname=false
+fi
-# Name of the executable.
-as_me=`$as_basename "$0" ||
+as_me=`$as_basename -- "$0" ||
$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
X"$0" : 'X\(//\)$' \| \
- X"$0" : 'X\(/\)$' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X/"$0" |
- sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
- /^X\/\(\/\/\)$/{ s//\1/; q; }
- /^X\/\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
-
+ X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
-# PATH needs CR, and LINENO needs CR and PATH.
# Avoid depending upon Character Ranges.
as_cr_letters='abcdefghijklmnopqrstuvwxyz'
as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
@@ -3676,148 +5027,123 @@ as_cr_Letters=$as_cr_letters$as_cr_LETTERS
as_cr_digits='0123456789'
as_cr_alnum=$as_cr_Letters$as_cr_digits
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
- echo "#! /bin/sh" >conf$$.sh
- echo "exit 0" >>conf$$.sh
- chmod +x conf$$.sh
- if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
- PATH_SEPARATOR=';'
- else
- PATH_SEPARATOR=:
- fi
- rm -f conf$$.sh
-fi
-
-
- as_lineno_1=$LINENO
- as_lineno_2=$LINENO
- as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
- test "x$as_lineno_1" != "x$as_lineno_2" &&
- test "x$as_lineno_3" = "x$as_lineno_2" || {
- # Find who we are. Look in the path if we contain no path at all
- # relative or not.
- case $0 in
- *[\\/]* ) as_myself=$0 ;;
- *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
-done
-
- ;;
- esac
- # We did not find ourselves, most probably we were run as `sh COMMAND'
- # in which case we are not to be found in the path.
- if test "x$as_myself" = x; then
- as_myself=$0
- fi
- if test ! -f "$as_myself"; then
- { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
-echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
- { (exit 1); exit 1; }; }
- fi
- case $CONFIG_SHELL in
- '')
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for as_base in sh bash ksh sh5; do
- case $as_dir in
- /*)
- if ("$as_dir/$as_base" -c '
- as_lineno_1=$LINENO
- as_lineno_2=$LINENO
- as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
- test "x$as_lineno_1" != "x$as_lineno_2" &&
- test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
- $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
- $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
- CONFIG_SHELL=$as_dir/$as_base
- export CONFIG_SHELL
- exec "$CONFIG_SHELL" "$0" ${1+"$@"}
- fi;;
- esac
- done
-done
-;;
- esac
-
- # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
- # uniformly replaced by the line number. The first 'sed' inserts a
- # line-number line before each line; the second 'sed' does the real
- # work. The second script uses 'N' to pair each line-number line
- # with the numbered line, and appends trailing '-' during
- # substitution so that $LINENO is not a special case at line end.
- # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
- # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
- sed '=' <$as_myself |
- sed '
- N
- s,$,-,
- : loop
- s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
- t loop
- s,-$,,
- s,^['$as_cr_digits']*\n,,
- ' >$as_me.lineno &&
- chmod +x $as_me.lineno ||
- { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
-echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
- { (exit 1); exit 1; }; }
-
- # Don't try to exec as it changes $[0], causing all sort of problems
- # (the dirname of $[0] is not the place where we might find the
- # original and so on. Autoconf is especially sensible to this).
- . ./$as_me.lineno
- # Exit status is that of the last command.
- exit
-}
-
-
-case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
- *c*,-n*) ECHO_N= ECHO_C='
-' ECHO_T=' ' ;;
- *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
- *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in #(((((
+-n*)
+ case `echo 'xy\c'` in
+ *c*) ECHO_T=' ';; # ECHO_T is single tab character.
+ xy) ECHO_C='\c';;
+ *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
+ ECHO_T=' ';;
+ esac;;
+*)
+ ECHO_N='-n';;
esac
-if expr a : '\(a\)' >/dev/null 2>&1; then
- as_expr=expr
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+ rm -f conf$$.dir/conf$$.file
else
- as_expr=false
+ rm -f conf$$.dir
+ mkdir conf$$.dir 2>/dev/null
fi
-
-rm -f conf$$ conf$$.exe conf$$.file
-echo >conf$$.file
-if ln -s conf$$.file conf$$ 2>/dev/null; then
- # We could just check for DJGPP; but this test a) works b) is more generic
- # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
- if test -f conf$$.exe; then
- # Don't use ln at all; we don't have any links
- as_ln_s='cp -p'
- else
+if (echo >conf$$.file) 2>/dev/null; then
+ if ln -s conf$$.file conf$$ 2>/dev/null; then
as_ln_s='ln -s'
+ # ... but there are two gotchas:
+ # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+ # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+ # In both cases, we have to default to `cp -p'.
+ ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+ as_ln_s='cp -p'
+ elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+ else
+ as_ln_s='cp -p'
fi
-elif ln conf$$.file conf$$ 2>/dev/null; then
- as_ln_s=ln
else
as_ln_s='cp -p'
fi
-rm -f conf$$ conf$$.exe conf$$.file
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+
+# as_fn_mkdir_p
+# -------------
+# Create "$as_dir" as a directory, including parents if necessary.
+as_fn_mkdir_p ()
+{
+
+ case $as_dir in #(
+ -*) as_dir=./$as_dir;;
+ esac
+ test -d "$as_dir" || eval $as_mkdir_p || {
+ as_dirs=
+ while :; do
+ case $as_dir in #(
+ *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+ *) as_qdir=$as_dir;;
+ esac
+ as_dirs="'$as_qdir' $as_dirs"
+ as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ test -d "$as_dir" && break
+ done
+ test -z "$as_dirs" || eval "mkdir $as_dirs"
+ } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
+
+} # as_fn_mkdir_p
if mkdir -p . 2>/dev/null; then
- as_mkdir_p=:
+ as_mkdir_p='mkdir -p "$as_dir"'
else
test -d ./-p && rmdir ./-p
as_mkdir_p=false
fi
-as_executable_p="test -f"
+if test -x / >/dev/null 2>&1; then
+ as_test_x='test -x'
+else
+ if ls -dL / >/dev/null 2>&1; then
+ as_ls_L_option=L
+ else
+ as_ls_L_option=
+ fi
+ as_test_x='
+ eval sh -c '\''
+ if test -d "$1"; then
+ test -d "$1/.";
+ else
+ case $1 in #(
+ -*)set "./$1";;
+ esac;
+ case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
+ ???[sx]*):;;*)false;;esac;fi
+ '\'' sh
+ '
+fi
+as_executable_p=$as_test_x
# Sed expression to map a string onto a valid CPP name.
as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
@@ -3826,31 +5152,20 @@ as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
-# IFS
-# We need space, tab and new line, in precisely that order.
-as_nl='
-'
-IFS=" $as_nl"
-
-# CDPATH.
-$as_unset CDPATH
-
exec 6>&1
-
-# Open the log real soon, to keep \$[0] and so on meaningful, and to
+## ----------------------------------- ##
+## Main body of $CONFIG_STATUS script. ##
+## ----------------------------------- ##
+_ASEOF
+test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# Save the log message, to keep $0 and so on meaningful, and to
# report actual input values of CONFIG_FILES etc. instead of their
-# values after options handling. Logging --version etc. is OK.
-exec 5>>config.log
-{
- echo
- sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
-## Running $as_me. ##
-_ASBOX
-} >&5
-cat >&5 <<_CSEOF
-
+# values after options handling.
+ac_log="
This file was extended by $as_me, which was
-generated by GNU Autoconf 2.59. Invocation command line was
+generated by GNU Autoconf 2.67. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
CONFIG_HEADERS = $CONFIG_HEADERS
@@ -3858,125 +5173,118 @@ generated by GNU Autoconf 2.59. Invocation command line was
CONFIG_COMMANDS = $CONFIG_COMMANDS
$ $0 $@
-_CSEOF
-echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
-echo >&5
+on `(hostname || uname -n) 2>/dev/null | sed 1q`
+"
+
_ACEOF
-# Files that config.status was made for.
-if test -n "$ac_config_files"; then
- echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
-fi
+case $ac_config_files in *"
+"*) set x $ac_config_files; shift; ac_config_files=$*;;
+esac
-if test -n "$ac_config_headers"; then
- echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
-fi
-if test -n "$ac_config_links"; then
- echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
-fi
-if test -n "$ac_config_commands"; then
- echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
-fi
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+# Files that config.status was made for.
+config_files="$ac_config_files"
-cat >>$CONFIG_STATUS <<\_ACEOF
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
ac_cs_usage="\
-\`$as_me' instantiates files from templates according to the
-current configuration.
+\`$as_me' instantiates files and other configuration actions
+from templates according to the current configuration. Unless the files
+and actions are specified as TAGs, all are instantiated by default.
-Usage: $0 [OPTIONS] [FILE]...
+Usage: $0 [OPTION]... [TAG]...
-h, --help print this help, then exit
- -V, --version print version number, then exit
- -q, --quiet do not print progress messages
+ -V, --version print version number and configuration settings, then exit
+ --config print configuration, then exit
+ -q, --quiet, --silent
+ do not print progress messages
-d, --debug don't remove temporary files
--recheck update $as_me by reconfiguring in the same conditions
- --file=FILE[:TEMPLATE]
- instantiate the configuration file FILE
+ --file=FILE[:TEMPLATE]
+ instantiate the configuration file FILE
Configuration files:
$config_files
-Report bugs to <bug-autoconf@gnu.org>."
-_ACEOF
+Report bugs to the package provider."
-cat >>$CONFIG_STATUS <<_ACEOF
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
config.status
-configured by $0, generated by GNU Autoconf 2.59,
- with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
+configured by $0, generated by GNU Autoconf 2.67,
+ with options \\"\$ac_cs_config\\"
-Copyright (C) 2003 Free Software Foundation, Inc.
+Copyright (C) 2010 Free Software Foundation, Inc.
This config.status script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it."
-srcdir=$srcdir
-INSTALL="$INSTALL"
+
+ac_pwd='$ac_pwd'
+srcdir='$srcdir'
+INSTALL='$INSTALL'
+AWK='$AWK'
+test -n "\$AWK" || AWK=awk
_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
-# If no file are specified by the user, then we need to provide default
-# value. By we need to know if files were specified by the user.
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# The default lists apply if the user does not specify any file.
ac_need_defaults=:
while test $# != 0
do
case $1 in
- --*=*)
- ac_option=`expr "x$1" : 'x\([^=]*\)='`
- ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
+ --*=?*)
+ ac_option=`expr "X$1" : 'X\([^=]*\)='`
+ ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
+ ac_shift=:
+ ;;
+ --*=)
+ ac_option=`expr "X$1" : 'X\([^=]*\)='`
+ ac_optarg=
ac_shift=:
;;
- -*)
+ *)
ac_option=$1
ac_optarg=$2
ac_shift=shift
;;
- *) # This is not an option, so the user has probably given explicit
- # arguments.
- ac_option=$1
- ac_need_defaults=false;;
esac
case $ac_option in
# Handling of the options.
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
-recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
ac_cs_recheck=: ;;
- --version | --vers* | -V )
- echo "$ac_cs_version"; exit 0 ;;
- --he | --h)
- # Conflict between --help and --header
- { { echo "$as_me:$LINENO: error: ambiguous option: $1
-Try \`$0 --help' for more information." >&5
-echo "$as_me: error: ambiguous option: $1
-Try \`$0 --help' for more information." >&2;}
- { (exit 1); exit 1; }; };;
- --help | --hel | -h )
- echo "$ac_cs_usage"; exit 0 ;;
- --debug | --d* | -d )
+ --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
+ $as_echo "$ac_cs_version"; exit ;;
+ --config | --confi | --conf | --con | --co | --c )
+ $as_echo "$ac_cs_config"; exit ;;
+ --debug | --debu | --deb | --de | --d | -d )
debug=: ;;
--file | --fil | --fi | --f )
$ac_shift
- CONFIG_FILES="$CONFIG_FILES $ac_optarg"
- ac_need_defaults=false;;
- --header | --heade | --head | --hea )
- $ac_shift
- CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
+ case $ac_optarg in
+ *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ '') as_fn_error $? "missing file argument" ;;
+ esac
+ as_fn_append CONFIG_FILES " '$ac_optarg'"
ac_need_defaults=false;;
+ --he | --h | --help | --hel | -h )
+ $as_echo "$ac_cs_usage"; exit ;;
-q | -quiet | --quiet | --quie | --qui | --qu | --q \
| -silent | --silent | --silen | --sile | --sil | --si | --s)
ac_cs_silent=: ;;
# This is an error.
- -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
-Try \`$0 --help' for more information." >&5
-echo "$as_me: error: unrecognized option: $1
-Try \`$0 --help' for more information." >&2;}
- { (exit 1); exit 1; }; } ;;
+ -*) as_fn_error $? "unrecognized option: \`$1'
+Try \`$0 --help' for more information." ;;
- *) ac_config_targets="$ac_config_targets $1" ;;
+ *) as_fn_append ac_config_targets " $1"
+ ac_need_defaults=false ;;
esac
shift
@@ -3990,31 +5298,45 @@ if $ac_cs_silent; then
fi
_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
if \$ac_cs_recheck; then
- echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
- exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+ set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+ shift
+ \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
+ CONFIG_SHELL='$SHELL'
+ export CONFIG_SHELL
+ exec "\$@"
fi
_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+exec 5>>config.log
+{
+ echo
+ sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
+## Running $as_me. ##
+_ASBOX
+ $as_echo "$ac_log"
+} >&5
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-
-
-cat >>$CONFIG_STATUS <<\_ACEOF
+# Handling of arguments.
for ac_config_target in $ac_config_targets
do
- case "$ac_config_target" in
- # Handling of arguments.
- "config.make" ) CONFIG_FILES="$CONFIG_FILES config.make" ;;
- "${makefiles}" ) CONFIG_FILES="$CONFIG_FILES ${makefiles}" ;;
- *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
-echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
- { (exit 1); exit 1; }; };;
+ case $ac_config_target in
+ "config.make") CONFIG_FILES="$CONFIG_FILES config.make" ;;
+ "${makefiles}") CONFIG_FILES="$CONFIG_FILES ${makefiles}" ;;
+
+ *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;;
esac
done
+
# If the user did not use the arguments to specify the items to instantiate,
# then the envvar interface is used. Set only those that are not.
# We use the long form for the default assignment because of an extremely
@@ -4024,360 +5346,416 @@ if $ac_need_defaults; then
fi
# Have a temporary directory for convenience. Make it in the build tree
-# simply because there is no reason to put it here, and in addition,
+# simply because there is no reason against having it here, and in addition,
# creating and moving files from /tmp can sometimes cause problems.
-# Create a temporary directory, and hook for its removal unless debugging.
+# Hook for its removal unless debugging.
+# Note that there is a small window in which the directory will not be cleaned:
+# after its creation but before its name has been assigned to `$tmp'.
$debug ||
{
- trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
- trap '{ (exit 1); exit 1; }' 1 2 13 15
+ tmp=
+ trap 'exit_status=$?
+ { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
+' 0
+ trap 'as_fn_exit 1' 1 2 13 15
}
-
# Create a (secure) tmp directory for tmp files.
{
- tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
+ tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
test -n "$tmp" && test -d "$tmp"
} ||
{
- tmp=./confstat$$-$RANDOM
- (umask 077 && mkdir $tmp)
-} ||
+ tmp=./conf$$-$RANDOM
+ (umask 077 && mkdir "$tmp")
+} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
+
+# Set up the scripts for CONFIG_FILES section.
+# No need to generate them if there are no CONFIG_FILES.
+# This happens for instance with `./config.status config.h'.
+if test -n "$CONFIG_FILES"; then
+
+
+ac_cr=`echo X | tr X '\015'`
+# On cygwin, bash can eat \r inside `` if the user requested igncr.
+# But we know of no other shell where ac_cr would be empty at this
+# point, so we can use a bashism as a fallback.
+if test "x$ac_cr" = x; then
+ eval ac_cr=\$\'\\r\'
+fi
+ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
+if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
+ ac_cs_awk_cr='\\r'
+else
+ ac_cs_awk_cr=$ac_cr
+fi
+
+echo 'BEGIN {' >"$tmp/subs1.awk" &&
+_ACEOF
+
+
+{
+ echo "cat >conf$$subs.awk <<_ACEOF" &&
+ echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
+ echo "_ACEOF"
+} >conf$$subs.sh ||
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
+ac_delim='%!_!# '
+for ac_last_try in false false false false false :; do
+ . ./conf$$subs.sh ||
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+
+ ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
+ if test $ac_delim_n = $ac_delim_num; then
+ break
+ elif $ac_last_try; then
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+ else
+ ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+ fi
+done
+rm -f conf$$subs.sh
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
+_ACEOF
+sed -n '
+h
+s/^/S["/; s/!.*/"]=/
+p
+g
+s/^[^!]*!//
+:repl
+t repl
+s/'"$ac_delim"'$//
+t delim
+:nl
+h
+s/\(.\{148\}\)..*/\1/
+t more1
+s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
+p
+n
+b repl
+:more1
+s/["\\]/\\&/g; s/^/"/; s/$/"\\/
+p
+g
+s/.\{148\}//
+t nl
+:delim
+h
+s/\(.\{148\}\)..*/\1/
+t more2
+s/["\\]/\\&/g; s/^/"/; s/$/"/
+p
+b
+:more2
+s/["\\]/\\&/g; s/^/"/; s/$/"\\/
+p
+g
+s/.\{148\}//
+t delim
+' <conf$$subs.awk | sed '
+/^[^""]/{
+ N
+ s/\n//
+}
+' >>$CONFIG_STATUS || ac_write_fail=1
+rm -f conf$$subs.awk
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+_ACAWK
+cat >>"\$tmp/subs1.awk" <<_ACAWK &&
+ for (key in S) S_is_set[key] = 1
+ FS = ""
+
+}
{
- echo "$me: cannot create a temporary directory in ." >&2
- { (exit 1); exit 1; }
+ line = $ 0
+ nfields = split(line, field, "@")
+ substed = 0
+ len = length(field[1])
+ for (i = 2; i < nfields; i++) {
+ key = field[i]
+ keylen = length(key)
+ if (S_is_set[key]) {
+ value = S[key]
+ line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
+ len += length(value) + length(field[++i])
+ substed = 1
+ } else
+ len += 1 + keylen
+ }
+
+ print line
}
+_ACAWK
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
+ sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
+else
+ cat
+fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
+ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF
+# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
+# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
+# trailing colons and then remove the whole line if VPATH becomes empty
+# (actually we leave an empty line to preserve line numbers).
+if test "x$srcdir" = x.; then
+ ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
+h
+s///
+s/^/:/
+s/[ ]*$/:/
+s/:\$(srcdir):/:/g
+s/:\${srcdir}:/:/g
+s/:@srcdir@:/:/g
+s/^:*//
+s/:*$//
+x
+s/\(=[ ]*\).*/\1/
+G
+s/\n//
+s/^[^=]*=[ ]*$//
+}'
+fi
-#
-# CONFIG_FILES section.
-#
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+fi # test -n "$CONFIG_FILES"
-# No need to generate the scripts if there are no CONFIG_FILES.
-# This happens for instance when ./config.status config.h
-if test -n "\$CONFIG_FILES"; then
- # Protect against being on the right side of a sed subst in config.status.
- sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
- s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
-s,@SHELL@,$SHELL,;t t
-s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
-s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
-s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
-s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
-s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
-s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
-s,@exec_prefix@,$exec_prefix,;t t
-s,@prefix@,$prefix,;t t
-s,@program_transform_name@,$program_transform_name,;t t
-s,@bindir@,$bindir,;t t
-s,@sbindir@,$sbindir,;t t
-s,@libexecdir@,$libexecdir,;t t
-s,@datadir@,$datadir,;t t
-s,@sysconfdir@,$sysconfdir,;t t
-s,@sharedstatedir@,$sharedstatedir,;t t
-s,@localstatedir@,$localstatedir,;t t
-s,@libdir@,$libdir,;t t
-s,@includedir@,$includedir,;t t
-s,@oldincludedir@,$oldincludedir,;t t
-s,@infodir@,$infodir,;t t
-s,@mandir@,$mandir,;t t
-s,@build_alias@,$build_alias,;t t
-s,@host_alias@,$host_alias,;t t
-s,@target_alias@,$target_alias,;t t
-s,@DEFS@,$DEFS,;t t
-s,@ECHO_C@,$ECHO_C,;t t
-s,@ECHO_N@,$ECHO_N,;t t
-s,@ECHO_T@,$ECHO_T,;t t
-s,@LIBS@,$LIBS,;t t
-s,@build@,$build,;t t
-s,@build_cpu@,$build_cpu,;t t
-s,@build_vendor@,$build_vendor,;t t
-s,@build_os@,$build_os,;t t
-s,@host@,$host,;t t
-s,@host_cpu@,$host_cpu,;t t
-s,@host_vendor@,$host_vendor,;t t
-s,@host_os@,$host_os,;t t
-s,@asm_syntax@,$asm_syntax,;t t
-s,@enable_profile@,$enable_profile,;t t
-s,@enable_static_progs@,$enable_static_progs,;t t
-s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
-s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
-s,@INSTALL_DATA@,$INSTALL_DATA,;t t
-s,@AWK@,$AWK,;t t
-s,@CC@,$CC,;t t
-s,@CFLAGS@,$CFLAGS,;t t
-s,@LDFLAGS@,$LDFLAGS,;t t
-s,@CPPFLAGS@,$CPPFLAGS,;t t
-s,@ac_ct_CC@,$ac_ct_CC,;t t
-s,@EXEEXT@,$EXEEXT,;t t
-s,@OBJEXT@,$OBJEXT,;t t
-s,@LD@,$LD,;t t
-s,@ac_ct_LD@,$ac_ct_LD,;t t
-s,@OBJCOPY@,$OBJCOPY,;t t
-s,@ac_ct_OBJCOPY@,$ac_ct_OBJCOPY,;t t
-s,@AR@,$AR,;t t
-s,@ac_ct_AR@,$ac_ct_AR,;t t
-s,@RANLIB@,$RANLIB,;t t
-s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
-s,@MIG@,$MIG,;t t
-s,@ac_ct_MIG@,$ac_ct_MIG,;t t
-s,@LIBCRYPT@,$LIBCRYPT,;t t
-s,@VERSIONING@,$VERSIONING,;t t
-s,@boot_store_types@,$boot_store_types,;t t
-s,@NCURSESW_INCLUDE@,$NCURSESW_INCLUDE,;t t
-s,@LIBNCURSESW@,$LIBNCURSESW,;t t
-s,@LIBOBJS@,$LIBOBJS,;t t
-s,@LTLIBOBJS@,$LTLIBOBJS,;t t
-CEOF
-_ACEOF
+eval set X " :F $CONFIG_FILES "
+shift
+for ac_tag
+do
+ case $ac_tag in
+ :[FHLC]) ac_mode=$ac_tag; continue;;
+ esac
+ case $ac_mode$ac_tag in
+ :[FHL]*:*);;
+ :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5 ;;
+ :[FH]-) ac_tag=-:-;;
+ :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
+ esac
+ ac_save_IFS=$IFS
+ IFS=:
+ set x $ac_tag
+ IFS=$ac_save_IFS
+ shift
+ ac_file=$1
+ shift
- cat >>$CONFIG_STATUS <<\_ACEOF
- # Split the substitutions into bite-sized pieces for seds with
- # small command number limits, like on Digital OSF/1 and HP-UX.
- ac_max_sed_lines=48
- ac_sed_frag=1 # Number of current file.
- ac_beg=1 # First line for current file.
- ac_end=$ac_max_sed_lines # Line after last line for current file.
- ac_more_lines=:
- ac_sed_cmds=
- while $ac_more_lines; do
- if test $ac_beg -gt 1; then
- sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
- else
- sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
- fi
- if test ! -s $tmp/subs.frag; then
- ac_more_lines=false
- else
- # The purpose of the label and of the branching condition is to
- # speed up the sed processing (if there are no `@' at all, there
- # is no need to browse any of the substitutions).
- # These are the two extra sed commands mentioned above.
- (echo ':t
- /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
- if test -z "$ac_sed_cmds"; then
- ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
- else
- ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
- fi
- ac_sed_frag=`expr $ac_sed_frag + 1`
- ac_beg=$ac_end
- ac_end=`expr $ac_end + $ac_max_sed_lines`
+ case $ac_mode in
+ :L) ac_source=$1;;
+ :[FH])
+ ac_file_inputs=
+ for ac_f
+ do
+ case $ac_f in
+ -) ac_f="$tmp/stdin";;
+ *) # Look for the file first in the build tree, then in the source tree
+ # (if the path is not absolute). The absolute path cannot be DOS-style,
+ # because $ac_f cannot contain `:'.
+ test -f "$ac_f" ||
+ case $ac_f in
+ [\\/$]*) false;;
+ *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
+ esac ||
+ as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5 ;;
+ esac
+ case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
+ as_fn_append ac_file_inputs " '$ac_f'"
+ done
+
+ # Let's still pretend it is `configure' which instantiates (i.e., don't
+ # use $as_me), people would be surprised to read:
+ # /* config.h. Generated by config.status. */
+ configure_input='Generated from '`
+ $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
+ `' by configure.'
+ if test x"$ac_file" != x-; then
+ configure_input="$ac_file. $configure_input"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
+$as_echo "$as_me: creating $ac_file" >&6;}
fi
- done
- if test -z "$ac_sed_cmds"; then
- ac_sed_cmds=cat
- fi
-fi # test -n "$CONFIG_FILES"
+ # Neutralize special characters interpreted by sed in replacement strings.
+ case $configure_input in #(
+ *\&* | *\|* | *\\* )
+ ac_sed_conf_input=`$as_echo "$configure_input" |
+ sed 's/[\\\\&|]/\\\\&/g'`;; #(
+ *) ac_sed_conf_input=$configure_input;;
+ esac
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
-for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
- # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
- case $ac_file in
- - | *:- | *:-:* ) # input from stdin
- cat >$tmp/stdin
- ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
- ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
- *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
- ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
- * ) ac_file_in=$ac_file.in ;;
+ case $ac_tag in
+ *:-:* | *:-) cat >"$tmp/stdin" \
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
+ esac
+ ;;
esac
- # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
- ac_dir=`(dirname "$ac_file") 2>/dev/null ||
+ ac_dir=`$as_dirname -- "$ac_file" ||
$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$ac_file" : 'X\(//\)[^/]' \| \
X"$ac_file" : 'X\(//\)$' \| \
- X"$ac_file" : 'X\(/\)' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X"$ac_file" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
- /^X\(\/\/\)[^/].*/{ s//\1/; q; }
- /^X\(\/\/\)$/{ s//\1/; q; }
- /^X\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
- { if $as_mkdir_p; then
- mkdir -p "$ac_dir"
- else
- as_dir="$ac_dir"
- as_dirs=
- while test ! -d "$as_dir"; do
- as_dirs="$as_dir $as_dirs"
- as_dir=`(dirname "$as_dir") 2>/dev/null ||
-$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$as_dir" : 'X\(//\)[^/]' \| \
- X"$as_dir" : 'X\(//\)$' \| \
- X"$as_dir" : 'X\(/\)' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X"$as_dir" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
- /^X\(\/\/\)[^/].*/{ s//\1/; q; }
- /^X\(\/\/\)$/{ s//\1/; q; }
- /^X\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
- done
- test ! -n "$as_dirs" || mkdir $as_dirs
- fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
-echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
- { (exit 1); exit 1; }; }; }
-
+ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$ac_file" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ as_dir="$ac_dir"; as_fn_mkdir_p
ac_builddir=.
-if test "$ac_dir" != .; then
- ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
- # A "../" for each directory in $ac_dir_suffix.
- ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
-else
- ac_dir_suffix= ac_top_builddir=
-fi
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+ ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+ # A ".." for each directory in $ac_dir_suffix.
+ ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+ case $ac_top_builddir_sub in
+ "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+ *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+ esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
case $srcdir in
- .) # No --srcdir option. We are building in place.
+ .) # We are building in place.
ac_srcdir=.
- if test -z "$ac_top_builddir"; then
- ac_top_srcdir=.
- else
- ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
- fi ;;
- [\\/]* | ?:[\\/]* ) # Absolute path.
+ ac_top_srcdir=$ac_top_builddir_sub
+ ac_abs_top_srcdir=$ac_pwd ;;
+ [\\/]* | ?:[\\/]* ) # Absolute name.
ac_srcdir=$srcdir$ac_dir_suffix;
- ac_top_srcdir=$srcdir ;;
- *) # Relative path.
- ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
- ac_top_srcdir=$ac_top_builddir$srcdir ;;
+ ac_top_srcdir=$srcdir
+ ac_abs_top_srcdir=$srcdir ;;
+ *) # Relative name.
+ ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_build_prefix$srcdir
+ ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
-# Do not use `cd foo && pwd` to compute absolute paths, because
-# the directories may not exist.
-case `pwd` in
-.) ac_abs_builddir="$ac_dir";;
-*)
- case "$ac_dir" in
- .) ac_abs_builddir=`pwd`;;
- [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
- *) ac_abs_builddir=`pwd`/"$ac_dir";;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_top_builddir=${ac_top_builddir}.;;
-*)
- case ${ac_top_builddir}. in
- .) ac_abs_top_builddir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
- *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_srcdir=$ac_srcdir;;
-*)
- case $ac_srcdir in
- .) ac_abs_srcdir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
- *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_top_srcdir=$ac_top_srcdir;;
-*)
- case $ac_top_srcdir in
- .) ac_abs_top_srcdir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
- *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
- esac;;
-esac
+ case $ac_mode in
+ :F)
+ #
+ # CONFIG_FILE
+ #
case $INSTALL in
[\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
- *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
+ *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
esac
+_ACEOF
- # Let's still pretend it is `configure' which instantiates (i.e., don't
- # use $as_me), people would be surprised to read:
- # /* config.h. Generated by config.status. */
- if test x"$ac_file" = x-; then
- configure_input=
- else
- configure_input="$ac_file. "
- fi
- configure_input=$configure_input"Generated from `echo $ac_file_in |
- sed 's,.*/,,'` by configure."
-
- # First look for the input files in the build tree, otherwise in the
- # src tree.
- ac_file_inputs=`IFS=:
- for f in $ac_file_in; do
- case $f in
- -) echo $tmp/stdin ;;
- [\\/$]*)
- # Absolute (can't be DOS-style, as IFS=:)
- test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
-echo "$as_me: error: cannot find input file: $f" >&2;}
- { (exit 1); exit 1; }; }
- echo "$f";;
- *) # Relative
- if test -f "$f"; then
- # Build tree
- echo "$f"
- elif test -f "$srcdir/$f"; then
- # Source tree
- echo "$srcdir/$f"
- else
- # /dev/null tree
- { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
-echo "$as_me: error: cannot find input file: $f" >&2;}
- { (exit 1); exit 1; }; }
- fi;;
- esac
- done` || { (exit 1); exit 1; }
-
- if test x"$ac_file" != x-; then
- { echo "$as_me:$LINENO: creating $ac_file" >&5
-echo "$as_me: creating $ac_file" >&6;}
- rm -f "$ac_file"
- fi
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# If the template does not know about datarootdir, expand it.
+# FIXME: This hack should be removed a few years after 2.60.
+ac_datarootdir_hack=; ac_datarootdir_seen=
+ac_sed_dataroot='
+/datarootdir/ {
+ p
+ q
+}
+/@datadir@/p
+/@docdir@/p
+/@infodir@/p
+/@localedir@/p
+/@mandir@/p'
+case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
+*datarootdir*) ac_datarootdir_seen=yes;;
+*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
+$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF
- sed "$ac_vpsub
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ ac_datarootdir_hack='
+ s&@datadir@&$datadir&g
+ s&@docdir@&$docdir&g
+ s&@infodir@&$infodir&g
+ s&@localedir@&$localedir&g
+ s&@mandir@&$mandir&g
+ s&\\\${datarootdir}&$datarootdir&g' ;;
+esac
+_ACEOF
+
+# Neutralize VPATH when `$srcdir' = `.'.
+# Shell code in configure.ac might set extrasub.
+# FIXME: do we really want to maintain this feature?
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_sed_extra="$ac_vpsub
$extrasub
_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
:t
/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
-s,@configure_input@,$configure_input,;t t
-s,@srcdir@,$ac_srcdir,;t t
-s,@abs_srcdir@,$ac_abs_srcdir,;t t
-s,@top_srcdir@,$ac_top_srcdir,;t t
-s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
-s,@builddir@,$ac_builddir,;t t
-s,@abs_builddir@,$ac_abs_builddir,;t t
-s,@top_builddir@,$ac_top_builddir,;t t
-s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
-s,@INSTALL@,$ac_INSTALL,;t t
-" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
- rm -f $tmp/stdin
- if test x"$ac_file" != x-; then
- mv $tmp/out $ac_file
- else
- cat $tmp/out
- rm -f $tmp/out
- fi
+s|@configure_input@|$ac_sed_conf_input|;t t
+s&@top_builddir@&$ac_top_builddir_sub&;t t
+s&@top_build_prefix@&$ac_top_build_prefix&;t t
+s&@srcdir@&$ac_srcdir&;t t
+s&@abs_srcdir@&$ac_abs_srcdir&;t t
+s&@top_srcdir@&$ac_top_srcdir&;t t
+s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
+s&@builddir@&$ac_builddir&;t t
+s&@abs_builddir@&$ac_abs_builddir&;t t
+s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
+s&@INSTALL@&$ac_INSTALL&;t t
+$ac_datarootdir_hack
+"
+eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+
+test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
+ { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
+ { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined. Please make sure it is defined" >&5
+$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined. Please make sure it is defined" >&2;}
+
+ rm -f "$tmp/stdin"
+ case $ac_file in
+ -) cat "$tmp/out" && rm -f "$tmp/out";;
+ *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
+ esac \
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+ ;;
-done
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
-{ (exit 0); exit 0; }
+ esac
+
+done # for ac_tag
+
+
+as_fn_exit 0
_ACEOF
-chmod +x $CONFIG_STATUS
ac_clean_files=$ac_clean_files_save
+test $ac_write_fail = 0 ||
+ as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
+
# configure is writing to config.log, and then calls config.status.
# config.status does its own redirection, appending to config.log.
@@ -4397,7 +5775,11 @@ if test "$no_create" != yes; then
exec 5>>config.log
# Use ||, not &&, to avoid exiting from the if with $? = 1, which
# would make configure fail if this is the last instruction.
- $ac_cs_success || { (exit 1); exit 1; }
+ $ac_cs_success || as_fn_exit 1
+fi
+if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
+$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
fi
diff --git a/configure.in b/configure.in
index 74fc9d13..1cf4daab 100644
--- a/configure.in
+++ b/configure.in
@@ -1,5 +1,5 @@
dnl Process this file with autoconf to produce a configure script.
-AC_REVISION([$Id: configure.in,v 1.36 2005/04/07 20:48:40 ams Exp $])
+AC_REVISION([$Id: configure.in,v 1.38 2008/11/17 11:34:18 tschwinge Exp $])
AC_PREREQ(2.54) dnl Minimum Autoconf version required.
AC_INIT
AC_CONFIG_SRCDIR([hurd/hurd_types.h]) dnl File to look for in srcdir.
@@ -73,6 +73,13 @@ esac
enable_static_progs=`echo "$enable_static_progs" | sed 's/[[, ]][[, ]]*/ /g'`
AC_SUBST(enable_static_progs)
+[# Don't needlessly overwrite files that whose contents haven't changed. This
+# helps for avoinding unneccessary recompilation cycles when keeping
+# cross-compilation toolchains up-to-date. Thus, unconditionally use the
+# supplied `install-sh', as the GNU Coreutils one doesn't provide this
+# functionality yet (TODO: change that). TODO: $ac_abs_top_builddir et al. are
+# not yet available here, that's why we use `readlink' (but only if available).
+INSTALL="$SHELL $(readlink -f "$ac_install_sh")"\ -C || unset INSTALL]
AC_PROG_INSTALL
AC_PROG_AWK
@@ -156,9 +163,53 @@ AC_SUBST(VERSIONING)
# Check if libc contains getgrouplist and/or uselocale.
AC_CHECK_FUNCS(getgrouplist uselocale)
-AC_ARG_WITH(parted, dnl
-[ --without-parted don't try to use GNU Parted libraries],
- , with_parted=yes)
+
+# From glibc HEAD, 2007-11-07.
+AC_CACHE_CHECK(for -fgnu89-inline, libc_cv_gnu89_inline, [dnl
+cat > conftest.c <<EOF
+int foo;
+#ifdef __GNUC_GNU_INLINE__
+main () { return 0;}
+#else
+#error
+#endif
+EOF
+if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS -S -std=gnu99 -fgnu89-inline
+ -o conftest.s conftest.c 1>&AS_MESSAGE_LOG_FD])
+then
+ libc_cv_gnu89_inline=yes
+else
+ libc_cv_gnu89_inline=no
+fi
+rm -f conftest*])
+if test $libc_cv_gnu89_inline = yes; then
+ libc_cv_gnu89_inline=-fgnu89-inline
+else
+ libc_cv_gnu89_inline=
+fi
+AC_SUBST(libc_cv_gnu89_inline)
+
+
+# Insist on libparted unless the user declines explicitely
+AC_ARG_WITH([parted],
+ [AS_HELP_STRING([--without-parted], [disable user-space partition stores])],
+ [],
+ [with_parted=yes])
+
+PARTED_LIBS=
+AC_DEFUN([PARTED_FAIL], [
+ AC_MSG_FAILURE([Please install required libraries or use --without-parted.])
+])
+AS_IF([test "x$with_parted" != xno], [
+ AC_CHECK_HEADER([parted/parted.h],
+ [AC_DEFINE(HAVE_PARTED_PARTED_H)],
+ [PARTED_FAIL])
+ AC_CHECK_LIB([parted], [ped_device_read], [], [PARTED_FAIL])
+ AC_CHECK_LIB([uuid], [uuid_generate], [], [PARTED_FAIL])
+ AC_CHECK_LIB([dl], [dlopen], [], [PARTED_FAIL])
+ PARTED_LIBS="-lparted -luuid -ldl"
+])
+AC_SUBST([PARTED_LIBS])
AC_ARG_ENABLE(boot-store-types,
[ --enable-boot-store-types=TYPES...
@@ -166,15 +217,7 @@ AC_ARG_ENABLE(boot-store-types,
linked filesystems used for booting])dnl
if test -z "$enable_boot_store_types"; then
boot_store_types='device remap gunzip bunzip2'
-
- # Check for Parted's static store module.
- if test "x$with_parted" != xno; then
- save_LDFLAGS="$LDFLAGS"
- LDFLAGS="$LDFLAGS -static"
- AC_CHECK_LIB(store_part, store_part_open, [dnl
- boot_store_types="$boot_store_types part"], , -luuid -lstore)
- LDFLAGS="$save_LDFLAGS"
- fi
+ test -z "$PARTED_LIBS" || boot_store_types="$boot_store_types part"
elif test "x$enable_boot_store_types" = xno; then
AC_MSG_WARN([you probably wanted --disable-static-progs])
else
diff --git a/console-client/ChangeLog b/console-client/ChangeLog
deleted file mode 100644
index b69ffe4f..00000000
--- a/console-client/ChangeLog
+++ /dev/null
@@ -1,327 +0,0 @@
-2007-05-08 Samuel Thibault <samuel.thibault@ens-lyon.org>
-
- * vga-support.c (vga_fini): Fix call to ioperm().
- * generic-speaker.c (generic_speaker_start): Call ioperm() on GNU Mach
- 1 too.
-
-2005-07-13 Samuel Thibault <samuel.thibault@ens-lyon.org>
-
- * current-vcs.c (repeater_node): Set default.
-
-2005-07-11 Samuel Thibault <samuel.thibault@ens-lyon.org>
-
- * Makefile (modules): Add `current-vcs' and its rules.
- * console.c (console_current_id): New function.
- * input.h (console_current_id): New prototype.
- * trans.c (struct netnode): New member `symlink_path'.
- (console_demuxer): Handle case when node it anonymous.
- (netfs_S_io_select): Likewise.
- (netfs_S_io_read): Likewise.
- (netfs_S_io_write): Likewise.
- (netfs_report_access): Likewise.
- (netfs_attempt_mksymlink): Implement symlinks.
- (netfs_attempt_lookup): Likewise.
- (netfs_attempt_unlink): Likewise.
- (netfs_attempt_link): Likewise.
- (netfs_attempt_mkfile): Likewise.
- (netfs_attempt_readlink): Likewise.
- (netfs_get_dirents): Likewise.
- (netfs_create_consnode): Likewise.
- * trans.h (struct consnode): New members `readlink' and `mksymlink'.
- * current-vcs.c: New file.
-
-2005-01-10 Alfred M. Szmidt <ams@gnu.org>
-
- * console.c (consnode_path): Renamed to ...
- (console_node): ... this. Updated all references.
-
-2005-01-06 Marco Gerards <metgerards@student.han.nl>
-
- * Makefile (SRCS): Add `trans.c'.
- (LCLHDRS): Add `mach-inputdev.h'.
- (HURDLIBS): Add `netfs', `fshelp' and `iohelp'.
- (modules): Add `pc_mouse'.
- (pc_kbd.so.$(hurd-version)): Add `kdioctlServer.o' and
- `kbd-repeat.c'.
- (pc_mouse.so.$(hurd-version)): New variable.
- * console.c: Include <trans.h>.
- (DEFAULT_CONSOLE_NODE): New macro.
- (saved_id, saved_cons, consnode_path): New variables.
- (console_move_mouse): New function.
- (console_switch_away): New function.
- (console_switch_back): Likewise.
- (cons_vcons_set_mousecursor_pos): Likewise.
- (cons_vcons_set_mousecursor_status): Likewise.
- (options): Add the option `--console-node'.
- (parse_opt): Parse the options that were added to `options'.
- (main): Setup the console client translator node.
- * display.h (display_ops): New members `set_mousecursor_pos' and
- `set_mousecursor_status'.
- * driver.c (driver_start): Change the type of `i' to `unsigned
- int'.
- * driver.h (driver_ops): New members `save_status' and
- `restore_status'.
- * input.h (console_switch_away): New prototype.
- (console_switch_back): Likewise.
- (console_move_mouse): Likewise.
- * kbd-repeat.c: New file.
- * mach-inputdev.h: Likewise.
- * pc-mouse.c: Likewise.
- * trans.c: Likewise.
- * trans.h: Likewise.
- * pc-kbd.c: Include <argp.h> and "mach-inputdev.h".
- (DEFAULT_REPEATER_NODE): New macro.
- (repeater_node, cnode): New variables.
- (kev_type, mouse_motion, Scancode, m_deltaX, m_deltaY, MOUSE_LEFT)
- (MOUSE_MIDDLE, MOUSE_RIGHT, MOUSE_MOTION, KEYBD_EVENT)
- (IOCPARM_MASK, IOC_OUT, IOC_IN, _IOC, _IOR, _IOW, KDSKBDMODE,
- (KB_EVENT, KB_ASCII, KDGKBDTYPE, KB_VANILLAKB, KDSETLEDS):
- Removed.
- (gnumach_v1_input_next): Call the repeater when repeating is
- active.
- (doc, options, argp): New variables.
- (parse_opt): New function.
- (pc_kbd_init): Function rewritten.
- (pc_kbd_start): Initialize the repeater, when it is active.
- (pc_kbd_fini): Destroy the console node.
- * vga.c (vga_mousecursor): New struct.
- (vga_mousecursor_t): New type.
- (mousecursor): New variable.
- (hide_mousecursor): New function.
- (draw_mousecursor): Likewise.
- (vga_display_restore_status): Likewise.
- (vga_display_update): Likewise.
- (vga_set_mousecursor_pos): Likewise.
- (vga_set_mousecursor_status): Likewise.
- (vga_display_scroll): Update the mousecursor state.
- (driver_vga_ops): Add `vga_display_restore_status'.
- (vga_display_op): Add `vga_display_update', `vga_set_mousecursor_pos'
- and `vga_set_mousecursor_status'.
-
-2004-11-15 Marcus Brinkmann <marcus@gnu.org>
-
- * pc-kbd.c (input_loop): Make the left shift key behave the same
- as right shift key with regards to page up/down.
-
-2004-10-22 Marcus Brinkmann <marcus@gnu.org>
-
- * driver.c (driver_start): Don't underflow I.
-
-2004-09-29 Alfred M. Szmidt <ams@kemisten.nu>
-
- * Makefile (vga-CPPFLAGS): New variable.
-
- * vga.c (DEFAULT_VGA_FONT, DEFAULT_VGA_FONT_ITALIC)
- (DEFAULT_VGA_FONT_BOLD, DEFAULT_VGA_FONT_BOLD_ITALIC): Use
- `DEFAULT_VGA_FONT_DIR' instead of hardcoding the filename.
-
-2004-03-21 Marco Gerards <metgerards@student.han.nl>
-
- * console.c (main): Make sure the arguments are parsed in order.
- * driver.c (driver_add): Set up argc and argv so they can be used
- by argp.
- * generic-speaker.c: Include <string.h> and <argp.h>.
- (struct melody): New member `name'. Every melody was given a
- name.
- (BELL_CLASSIC, BELL_LINUX, BELL_ALARM, BELL_CMAJOR): New macros.
- (doc, options, argp): New variables.
- (parse_opt): New function.
- (generic_speaker_init): Parse the arguments using argp.
- * vga.c (doc, options, argp): New variables.
- (parse_opt): New function.
- (parse_startup_args): Function removed.
- (vga_display_init): Use argp_parse instead of parse_startup_args.
-
-2004-03-07 Marco Gerards <metgerards@student.han.nl>
-
- * bdf.c (bdf_read): Change the types of has_size, has_fbbx,
- has_metricset, glyph_has_encoding, glyph_has_bbx, glyph_bwidth,
- glyph_bheight and glyph_blines to unsigned int.
- * bell.h (struct bell_ops): Change the type of the argument KEY of
- the interface `deprecated' to unsigned int. All callers changed.
- * display.h (struct display_ops): Changed the type of the
- arguments width and height to unsigned int. All callers changed.
- * driver.c (driver_fini): Change the type of `i' to unsigned int
- to silence a gcc warning.
- (driver_start): Likewise.
- (driver_remove): Likewise.
- (ADD_REMOVE_COMPONENT): Likewise.
- (driver_add): Likewise.
- * generic-speaker.c (beep_on): Cup pitch at 20000, not 327677.
- Also silences a gcc warning.
- * ncursesw.c: Changed all calls to the function `ncurses_refresh'
- to `refresh_screen'.
- (current_width): Changed type to unsigned int.
- (current_height): Likewise.
- (padx): Likewise.
- (pady): Likewise.
- (refresh_screen): Cast LINES and COLS to unsigned int.
- (input_loop): Change `i' from int to unsigned int to silence a gcc
- warning.
- * vga.c (current_width): Changed type to unsigned int to silence a
- gcc warning.
- (current_heigh): Likewise.
- (struct vga_display): Changed the type of the members `width' and
- `height' to unsigned int to silence a gcc warning.
- (vga_display_change_font): Disabled the unused code for now.
-
-2003-08-17 Marcus Brinkmann <marcus@gnu.org>
-
- * vga-dynafont.c: Include <stddef.h>.
- (struct mapped_character): Change type of LOCP to
- hurd_ihash_locp_t.
- (struct dynafont): Change type of CHARMAP to struct hurd_ihash.
- (dynafont_new): Use hurd_ihash_init instead of ihash_create.
- Remove variable ERR. Call hurd_ihash_add instead of ihash_add.
- (dynafont_free): Call hurd_ihash_destroy, no ihash_free.
- (dynafont_lookup_internal): Use hurd_ihash_find, not ihash_find.
- (dynafont_lookup_internal): Call hurd_ihash_locp_remove instead
- ihash_locp_remove, and hurd_ihash_add instead ihash_add.
- (dynafont_change_font): Likewise. Clean out LOCP if character is
- unmapped.
-
-2004-02-02 Marco Gerards <metgerards@student.han.nl>
-
- * pc-kbd.c (KDSETLEDS): New macro.
- (update_leds): Add support for setting the keyboard LED state on
- GNUMach 1.x (> 1.3).
- (input_loop): Use size_t for `nr' instead of int to silence a gcc
- warning.
-
-2003-08-11 Marco Gerards <metgerards@student.han.nl>
-
- * console.c (cons_vcons_set_dimension): New function.
- * display.h (display_ops): New interface set_dimension.
- * ncursesw.c (ncursesw_set_dimension): New function.
- (ncursesw_displ): Add ncursesw_set_dimension.
- (ncurses_lock): Make variable static.
- (current_width): New variable.
- (current_height): Likewise.
- (cursor_state): Likewise.
- (cursor_hidden): Likewise.
- (driver_ncursesw_ops): Added ncursesw_set_dimension.
- * vga.c (current_width): New variable.
- (current_height): Likewise.
- (vga_display_set_cursor_status): If the cursor is outside the
- screen, don't change the visibility.
- (vga_display_set_cursor_pos): Don't set the cursor outside the
- physical screen. Update cursor_hidden and hide/unhide
- to match cursor_hidden. Function moved to above
- vga_display_set_cursor_status.
- (vga_display_scroll): Report an error when scrolling is not
- possible.
- (vga_display_clear): Recalculate cols, rows and length.
- (vga_display_write): Make it wrap around the edge.
- (vga_set_dimension): New function.
- (vga_disp_ops): Added vga_set_dimension.
-
- * ncursesw.c (conspad): New variable.
- (padx): Likewise.
- (pady): Likewise.
- (autoscroll): Likewise.
- (refresh_screen): new function.
- (input_loop): Use conspad instead of (the default) stdscr.
- Call console_exit instead of exiting here. Add keybindings
- 'j, 'k', 'l' and 'i' to scroll the console, add keybinding 'a'
- to switch autoscroll.
- (mvwputsn): Use conspad instead of (the default) stdscr.
- (ncursesw_scroll): Likewise.
- (ncursesw_write): Likewise.
- (ncursesw_driver_start): Likewise. Initialize conspad.
- (ncursesw_update): Call refresh_screen to refresh the console.
- (ncursesw_set_cursor_pos): Use conspad instead of (the default)
- stdscr. Make the console autoscroll.
-
- * ncursesw.c (ncursesw_driver_start): Remove endwin call at
- the end of the function.
-
- * ncursesw.c (ncursesw_set_cursor_status): If the status can
- not be set, use another status that can sanely be used instead
- of the unavailable status.
-
-2003-07-14 Marco Gerards <metgerards@student.han.nl>
-
- * vga.c: New global variable vga_display_max_glyphs.
- (parse_startup_args): New macro PARSE_FONT_OPT_NOARGS.
- (parse_startup_args): Parse "--max-colors" and "--max-glyphs".
- (vga_display_init): Set disp->df_size to match the color setting.
-
-2003-02-24 Marco Gerards <metgerards@student.han.nl>
-
- * pc-kbd.c (sc_set1_to_set2): Map the set2 scancodes for F11 and
- F12 properly on the set1 scancodes for F11 and F12.
-
-2002-11-25 Marcus Brinkmann <marcus@gnu.org>
-
- * pc-kbd.c (IS_FUNC_KEY): Fix last change.
-
-2002-11-21 Marco Gerards <metgerards@student.han.nl>
-
- * pc-kbd.c (IS_FUNC_KEY): New macro.
- (input_loop): Replaced code for set1 for console switching by set2
- code. Also accept F11 and F12.
-
-2002-11-18 Marcus Brinkmann <marcus@gnu.org>
-
- * console.c (main): Pass ERR to error invocation.
- * generic-speaker.c (generic_spaker_beep): Use currently active
- beep's next pointer, instead index 0.
- * pc-kbd.c: New global variables led_state and gnumach_v1_compat.
- (enum scancode): Change to set 2 encoding.
- (enum scancode_x1): Likewise.
- (enum scancode_x2): New type.
- (sc_to_kc): Change to set 2 encoding.
- (sc_x1_to_kc): Likewise.
- (sc_set1_to_set2): New variable.
- (sc_set1_to_set2_x1): Likewise.
- (gnumach_v1_input_next): New function.
- (update_leds): Likewise.
- (input_next): Likewise.
- (input_loop): Use input_next or gnumach_v1_input_next to read next
- key code.
- (pc_kbd_start): Add support for current GNU Mach @>=kbd interface.
- Call update_leds and toggle led_state.
- (pc_kbd_fini): Add support for current GNU Mach.
- (pc_kbd_set_scroll_lock_status): Toggle led_state and call
- update_leds.
- * vga-support.c (vga_init): Add support for current GNU Mach's I/O
- permission bitmap handling and its mem device.
-
-2002-09-30 Marcus Brinkmann <marcus@gnu.org>
-
- * vga-support.c (vga_get_font_width): New function.
- * vga-support.h: Add prototype for vga_get_font_width.
- * vga-dynafont.c (create_system_font): Call vga_get_font_width to
- determine real font width.
-
-2002-09-22 Marcus Brinkmann <marcus@gnu.org>
-
- * pc-kbd.c (sc_to_kc): Implement Meta-Backspace combinations.
-
-2002-09-19 Marcus Brinkmann <marcus@gnu.org>
-
- * vga-support.c (vga_read_write_font_buffer): New function. It
- turns out that reading and writing needs the same register
- settings.
- (vga_write_font_buffer): Implement in terms of
- vga_read_write_font_buffer.
- (vga_read_font_buffer): Likewise.
-
-2002-09-18 Marcus Brinkmann <marcus@gnu.org>
-
- * ncursesw.c: Add an entry for the clear function.
-
- * pc-kbd.c (sv_to_kc): Add entries for unused scan codes 0x55 and
- 0x56.
-
-2002-09-17 Marcus Brinkmann <marcus@gnu.org>
-
- * pc-kbd.c (input_loop): Move code that toggles NumLock after code
- that handles direct entry of character codes with RightAlt.
-
-2002-09-17 Marcus Brinkmann <marcus@gnu.org>
-
- * Makefile, bdf.c, bdf.h, bell.h, console.c, display.h, driver.c,
- driver.h, generic-speaker.c, input.h, pc-kbd.c, timer.c, timer.h,
- unicode.h, vga.c, vga-dynacolor.c, vga-dynacolor.h, vga-dynafont.c,
- vga-dynafont.h, vga-hw.h, vga-support.c, vga-support.h: New file.
diff --git a/console-client/Makefile b/console-client/Makefile
index ff1a8f29..22a492a9 100644
--- a/console-client/Makefile
+++ b/console-client/Makefile
@@ -1,5 +1,6 @@
#
-# Copyright (C) 1994,95,96,97,98,99,2000,01,02,04,2005 Free Software Foundation, Inc.
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2004,
+# 2005, 2008, 2010 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
@@ -16,16 +17,28 @@
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
dir := console-client
-makemode := utility
-
-target = console
-SRCS = console.c timer.c driver.c trans.c
+makemode := utilities
+
+targets = console
+CONSOLE_SRCS = console.c timer.c driver.c trans.c
+VGA_SO_SRCS = bdf.c vga-dynafont.c vga-dynacolor.c vga-support.c vga.c
+PC_KBD_SO_SRCS = pc-kbd.c kbd-repeat.c
+PC_MOUSE_SO_SRCS = pc-mouse.c
+GENERIC_SPEAKER_SO_SRCS = generic-speaker.c
+CURRENT_VCS_SO_SRCS = current-vcs.c
+ifneq ($(LIBNCURSESW),)
+NCURSESW_SO_SRCS = ncursesw.c
+endif
+SRCS = $(CONSOLE_SRCS) \
+ $(VGA_SO_SRCS) $(PC_KBD_SO_SRCS) $(PC_MOUSE_SO_SRCS) \
+ $(GENERIC_SPEAKER_SO_SRCS) $(CURRENT_VCS_SO_SRCS) $(NCURSESW_SO_SRCS)
LCLHDRS = timer.h driver.h display.h input.h bell.h \
unicode.h bdf.h mach-inputdev.h \
- vga-dynafont.h vga-dynacolor.h vga-hw.h vga.h
+ vga-dynafont.h vga-dynacolor.h vga-hw.h vga-support.h \
+ trans.h
-OBJS = $(filter-out %.sh,$(SRCS:.c=.o))
-HURDLIBS = cons threads ports netfs fshelp iohelp
+OBJS = $(SRCS:.c=.o) kdioctlServer.o
+HURDLIBS = cons threads ports netfs fshelp iohelp ihash shouldbeinlibc
LDLIBS = -ldl
module-dir = $(libdir)/hurd/console
console-LDFLAGS = -Wl,-E
@@ -38,22 +51,24 @@ include ../Makeconf
driver-CPPFLAGS = -D'CONSOLE_DEFPATH="$(module-dir)\0"' \
-D'CONSOLE_SONAME_SUFFIX=".so.$(hurd-version)"'
-console: ../libcons/libcons.a ../libports/libports.a \
+console: $(CONSOLE_SRCS:.c=.o) \
+ ../libnetfs/libnetfs.a ../libfshelp/libfshelp.a \
+ ../libcons/libcons.a ../libports/libports.a \
../libthreads/libthreads.a ../libshouldbeinlibc/libshouldbeinlibc.a
modules = vga pc_kbd generic_speaker pc_mouse current_vcs
vga-CPPFLAGS = -DDEFAULT_VGA_FONT_DIR=\"${datadir}/hurd/\"
-vga.so.$(hurd-version): $(patsubst %.c,%_pic.o,bdf.c vga-dynafont.c \
- vga-dynacolor.c vga-support.c vga.c)
-pc_kbd.so.$(hurd-version): $(patsubst %.c,%_pic.o,pc-kbd.c kdioctlServer.o kbd-repeat.c)
-pc_mouse.so.$(hurd-version): $(patsubst %.c,%_pic.o,pc-mouse.c)
-generic_speaker.so.$(hurd-version): $(patsubst %.c,%_pic.o,generic-speaker.c)
-current_vcs.so.$(hurd-version): $(patsubst %.c,%_pic.o,current-vcs.c)
+vga.so.$(hurd-version): $(patsubst %.c,%_pic.o,$(VGA_SO_SRCS))
+pc_kbd.so.$(hurd-version): $(patsubst %.c,%_pic.o,$(PC_KBD_SO_SRCS)) \
+ kdioctlServer_pic.o
+pc_mouse.so.$(hurd-version): $(patsubst %.c,%_pic.o,$(PC_MOUSE_SO_SRCS))
+generic_speaker.so.$(hurd-version): $(patsubst %.c,%_pic.o,$(GENERIC_SPEAKER_SO_SRCS))
+current_vcs.so.$(hurd-version): $(patsubst %.c,%_pic.o,$(CURRENT_VCS_SO_SRCS))
ifneq ($(LIBNCURSESW),)
modules += ncursesw
-ncursesw.so.$(hurd-version): $(patsubst %.c,%_pic.o,ncursesw.c)
+ncursesw.so.$(hurd-version): $(patsubst %.c,%_pic.o,$(NCURSESW_SO_SRCS))
ncursesw-CPPFLAGS = $(NCURSESW_INCLUDE)
ncursesw-LDLIBS = $(LIBNCURSESW)
endif
diff --git a/console-client/bdf.c b/console-client/bdf.c
index 30501f4a..f62a2473 100644
--- a/console-client/bdf.c
+++ b/console-client/bdf.c
@@ -154,7 +154,7 @@ next_line (char **line, int *size, FILE *file, int *count)
}
-/* Isolate the next white-space seperated argument from the current
+/* Isolate the next white-space separated argument from the current
line, and set ARGP to the beginning of the next argument. It is an
error if there is no further argument. */
static bdf_error_t
@@ -178,7 +178,7 @@ find_arg (char **argp)
/* Read the font from stream FILE, and return it in FONT. If
LINECOUNT is not zero, it will contain the number of lines in the
- file at success, and the line an error occured at failure. */
+ file at success, and the line an error occurred at failure. */
bdf_error_t
bdf_read (FILE *filep, bdf_font_t *font, int *linecount)
{
diff --git a/console-client/bdf.h b/console-client/bdf.h
index 1f0bce41..17cd0235 100644
--- a/console-client/bdf.h
+++ b/console-client/bdf.h
@@ -32,17 +32,17 @@
types of the arguments, so we treat a string as an 8-bit string
which must not contain a binary null, and a number like an integer
as an int. Leading and trailing white space are removed, multiple
- spaces that seperate arguments are replaced by a single white
+ spaces that separate arguments are replaced by a single white
space, and empty lines are ignored. */
/* Possible error values returned by the BDF functions. */
typedef enum
{
- /* No error occured. This is guaranteed to be zero. */
+ /* No error occurred. This is guaranteed to be zero. */
BDF_NO_ERROR = 0,
- /* A system error occured. The caller should consult errno. */
+ /* A system error occurred. The caller should consult errno. */
BDF_SYSTEM_ERROR,
/* All following errors indicate that the file is not a valid BDF
@@ -200,7 +200,7 @@ typedef struct bdf_font *bdf_font_t;
/* Read the font from stream FILE, and return it in FONT. If
LINECOUNT is not zero, it will contain the number of lines in the
- file at success, and the current line an error occured at
+ file at success, and the current line an error occurred at
failure. */
bdf_error_t bdf_read (FILE *file, bdf_font_t *font, int *linecount);
diff --git a/console-client/current-vcs.c b/console-client/current-vcs.c
index a86c6708..1b63e0ba 100644
--- a/console-client/current-vcs.c
+++ b/console-client/current-vcs.c
@@ -167,7 +167,7 @@ static struct argp argp = {options, parse_opt, 0, doc};
/* Initialize the current VCS driver. */
static error_t
-vcs_repeat_init (void **handle, int no_exit, int argc, char *argv[], int *next)
+current_vcs_init (void **handle, int no_exit, int argc, char *argv[], int *next)
{
error_t err;
int pos = 1;
@@ -184,7 +184,7 @@ vcs_repeat_init (void **handle, int no_exit, int argc, char *argv[], int *next)
}
static error_t
-vcs_repeat_start (void *handle)
+current_vcs_start (void *handle)
{
error_t err;
@@ -206,7 +206,7 @@ vcs_repeat_start (void *handle)
}
static error_t
-vcs_repeat_fini (void *handle, int force)
+current_vcs_fini (void *handle, int force)
{
console_unregister_consnode (vcs_node);
console_destroy_consnode (vcs_node);
@@ -214,10 +214,10 @@ vcs_repeat_fini (void *handle, int force)
}
-struct driver_ops driver_vcs_repeat_ops =
+struct driver_ops driver_current_vcs_ops =
{
- vcs_repeat_init,
- vcs_repeat_start,
- vcs_repeat_fini
+ current_vcs_init,
+ current_vcs_start,
+ current_vcs_fini
};
diff --git a/console-client/driver.c b/console-client/driver.c
index 2a56729d..7f799f0a 100644
--- a/console-client/driver.c
+++ b/console-client/driver.c
@@ -83,7 +83,7 @@ driver_fini (void)
/* Load, intialize and (if START is non-zero) start the driver DRIVER
under the given NAME (which must be unique among all loaded
- drivers) with arguments ARGZ with length ARGZ_LEN. This funtion
+ drivers) with arguments ARGZ with length ARGZ_LEN. This function
will grab the driver list lock. The driver itself might try to
grab the display, input source and bell list locks as well. */
error_t driver_add (const char *const name, const char *const driver,
diff --git a/console-client/ncursesw.c b/console-client/ncursesw.c
index 8b559016..a34026a2 100644
--- a/console-client/ncursesw.c
+++ b/console-client/ncursesw.c
@@ -47,7 +47,7 @@ static WINDOW *conspad;
static unsigned int padx;
static unsigned int pady;
-/* Autoscroll is on or off. Autoscroll makes scrolling dependant on
+/* Autoscroll is on or off. Autoscroll makes scrolling dependent on
the cursor position. */
static int autoscroll;
diff --git a/console-client/pc-kbd.c b/console-client/pc-kbd.c
index 35e25617..d66e94b3 100644
--- a/console-client/pc-kbd.c
+++ b/console-client/pc-kbd.c
@@ -583,7 +583,7 @@ gnumach_v1_input_next ()
error_t err = device_read_inband (kbd_dev, 0, -1, sizeof (kd_event),
(void *) &data_buf, &data_cnt);
- /* XXX The error occured likely because KBD_DEV was closed, so
+ /* XXX The error occurred likely because KBD_DEV was closed, so
terminate. */
if (err)
return 0;
@@ -661,7 +661,7 @@ input_next ()
error_t err = device_read_inband (kbd_dev, 0, -1, 1,
(void *) &next, &data_cnt);
- /* XXX The error occured likely because KBD_DEV was closed, so
+ /* XXX The error occurred likely because KBD_DEV was closed, so
terminate. */
if (err)
return 0;
@@ -761,7 +761,7 @@ input_loop (any_t unused)
/* The virtual console to switch to. */
int vc = 0;
- /* Check if a funtion key was pressed.
+ /* Check if a function key was pressed.
Choose the virtual console corresponding to that key. */
switch (sc)
{
diff --git a/console-client/trans.c b/console-client/trans.c
index ee7581b4..a90b5c5d 100644
--- a/console-client/trans.c
+++ b/console-client/trans.c
@@ -1,5 +1,7 @@
/* trans.c -- Control a translator node for the repeaters.
- Copyright (C) 2004, 2005 Free Software Foundation, Inc.
+
+ Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc.
+
Written by Marco Gerards.
This program is free software; you can redistribute it and/or
@@ -173,18 +175,12 @@ netfs_attempt_utimes (struct iouser *cred, struct node *np,
if (! err)
{
if (mtime)
- {
- np->nn_stat.st_mtime = mtime->tv_sec;
- np->nn_stat.st_mtime_usec = mtime->tv_nsec / 1000;
- }
+ np->nn_stat.st_mtim = *mtime;
else
flags |= TOUCH_MTIME;
if (atime)
- {
- np->nn_stat.st_atime = atime->tv_sec;
- np->nn_stat.st_atime_usec = atime->tv_nsec / 1000;
- }
+ np->nn_stat.st_atim = *atime;
else
flags |= TOUCH_ATIME;
diff --git a/console-client/vga-dynacolor.c b/console-client/vga-dynacolor.c
index 7b81e2f9..9289e1eb 100644
--- a/console-client/vga-dynacolor.c
+++ b/console-client/vga-dynacolor.c
@@ -177,7 +177,7 @@ dynacolor_replace_colors (dynacolor_t *dc,
based on pairs, but that increases the number of cases a
lot. */
/* Note that no color must occur twice in one replacement list,
- and that the color to be replaced must not occure either. */
+ and that the color to be replaced must not occur either. */
static signed char pref[16][9] =
{
/* Replacements for CONS_COLOR_BLACK. */
diff --git a/console-client/vga-dynafont.c b/console-client/vga-dynafont.c
index 0cce5176..834d0aca 100644
--- a/console-client/vga-dynafont.c
+++ b/console-client/vga-dynafont.c
@@ -1,5 +1,5 @@
/* vga-dynafont.c - Dynamic font handling for VGA cards.
- Copyright (C) 2002 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2010 Free Software Foundation, Inc.
Written by Marcus Brinkmann.
This file is part of the GNU Hurd.
@@ -60,9 +60,9 @@ struct mapped_character
/* Remember the character this glyph belongs to, so the glyph can be
reloaded when the font is changed. This is actually a wchar_t
with some text attributes mixed into the high bits. */
-#define WCHAR_BOLD ((wchar_t) 0x40000000)
-#define WCHAR_ITALIC ((wchar_t) 0x20000000)
-#define WCHAR_MASK ((wchar_t) 0x001fffff)
+#define WCHAR_BOLD ((wchar_t) 0x20000000)
+#define WCHAR_ITALIC ((wchar_t) 0x10000000)
+#define WCHAR_MASK CONS_WCHAR_MASK
wchar_t character;
/* Used by libihash for fast removal of elements. */
@@ -529,6 +529,31 @@ dynafont_new (bdf_font_t font, bdf_font_t font_italic, bdf_font_t font_bold,
df->vga_font_last_free_index_lgc = 0;
}
+ /* Ensure that ASCII is always available 1-to-1, for kernel messages. */
+ for (int c = ' '; c <= '~'; c++)
+ {
+ glyph = bdf_find_glyph (df->font, c, 0);
+ if (!glyph)
+ glyph = bdf_find_glyph (df->font, -1, c);
+ if (glyph)
+ {
+ struct mapped_character *chr = &df->charmap_data[c];
+ df->vga_font_free_indices--;
+ chr->refs = 1;
+
+ for (int i = 0; i < ((glyph->bbox.height > 32)
+ ? 32 : glyph->bbox.height); i++)
+ df->vga_font[c][i]
+ = glyph->bitmap[i * ((glyph->bbox.width + 7) / 8)];
+ if (glyph->bbox.height < 32)
+ memset (((char *) df->vga_font[c])
+ + glyph->bbox.height, 0, 32 - glyph->bbox.height);
+
+ /* Update the hash table. */
+ hurd_ihash_add (&df->charmap, c, chr);
+ }
+ }
+
/* Ensure that we always have the replacement character
available. */
{
@@ -541,14 +566,13 @@ dynafont_new (bdf_font_t font, bdf_font_t font_italic, bdf_font_t font_bold,
glyph = bdf_find_glyph (df->font, -1, UNICODE_REPLACEMENT_CHARACTER);
if (glyph)
{
- /* XXX Take glyph size into account. */
- for (int i = 0; i < ((df->font->bbox.height > 32)
- ? 32 : df->font->bbox.height); i++)
+ for (int i = 0; i < ((glyph->bbox.height > 32)
+ ? 32 : glyph->bbox.height); i++)
df->vga_font[FONT_INDEX_UNKNOWN][i]
- = glyph->bitmap[i * ((df->font->bbox.width + 7) / 8)];
- if (df->font->bbox.height < 32)
+ = glyph->bitmap[i * ((glyph->bbox.width + 7) / 8)];
+ if (glyph->bbox.height < 32)
memset (((char *) df->vga_font[FONT_INDEX_UNKNOWN])
- + df->font->bbox.height, 0, 32 - df->font->bbox.height);
+ + glyph->bbox.height, 0, 32 - glyph->bbox.height);
/* Update the hash table. */
hurd_ihash_add (&df->charmap, UNICODE_REPLACEMENT_CHARACTER, chr);
@@ -780,9 +804,9 @@ dynafont_lookup_internal (dynafont_t df, bdf_font_t font,
|| (!lgc && !df->vga_font_free_indices))
return 0;
- glyph = bdf_find_glyph (font, (int) wide_chr, 0);
+ glyph = bdf_find_glyph (font, (int) (wide_chr & ~CONS_WCHAR_CONTINUED), 0);
if (!glyph)
- glyph = bdf_find_glyph (font, -1, (int) wide_chr);
+ glyph = bdf_find_glyph (font, -1, (int) (wide_chr & ~CONS_WCHAR_CONTINUED));
if (!glyph)
return 0;
@@ -847,14 +871,17 @@ dynafont_lookup_internal (dynafont_t df, bdf_font_t font,
chr->refs = 1;
chr->character = (wide_chr | attr);
- /* XXX Should look at glyph bbox. */
- for (int i = 0; i < ((font->bbox.height > 32)
- ? 32 : font->bbox.height); i++)
- df->vga_font[pos][i]
- = glyph->bitmap[i * ((font->bbox.width + 7) / 8)];
- if (font->bbox.height < 32)
- memset (((char *) df->vga_font[pos])
- + font->bbox.height, 0, 32 - font->bbox.height);
+ /* Copy the glyph bitmap, taking into account double-width characters. */
+ {
+ int height = (glyph->bbox.height > 32) ? 32 : glyph->bbox.height;
+ int bwidth = (glyph->bbox.width + 7) / 8;
+ int ofs = (bwidth >= 2) && (wide_chr & CONS_WCHAR_CONTINUED);
+
+ for (int i = 0; i < height; i++)
+ df->vga_font[pos][i] = glyph->bitmap[i * bwidth + ofs];
+ if (height < 32)
+ memset (&df->vga_font[pos][height], 0, 32 - height);
+ }
if (active_dynafont == df)
vga_write_font_buffer (0, pos, df->vga_font[pos],
@@ -958,7 +985,7 @@ dynafont_activate (dynafont_t df)
display problems for the user if we don't also program the video
mode timings. The standard font height for 80x25 is 16. */
vga_set_font_height (height);
- vga_set_font_width (df->font->bbox.width <= 8 ? 8 : 9);
+ vga_set_font_width (df->font->bbox.width % 8 ? 9 : 8);
active_dynafont = df;
dynafont_set_cursor (df, df->cursor_standout);
@@ -1027,13 +1054,13 @@ dynafont_change_font (dynafont_t df, bdf_font_t font)
else
{
/* XXX Take font size and glyph size into account. */
- for (int j = 0; j < ((df->font->bbox.height > 32)
- ? 32 : df->font->bbox.height); j++)
+ for (int j = 0; j < ((glyph->bbox.height > 32)
+ ? 32 : glyph->bbox.height); j++)
df->vga_font[i][j]
- = glyph->bitmap[j * ((df->font->bbox.width + 7) / 8)];
- if (df->font->bbox.height < 32)
- memset (((char *) df->vga_font[i]) + df->font->bbox.height,
- 0, 32 - df->font->bbox.height);
+ = glyph->bitmap[j * ((glyph->bbox.width + 7) / 8)];
+ if (glyph->bbox.height < 32)
+ memset (((char *) df->vga_font[i]) + glyph->bbox.height,
+ 0, 32 - glyph->bbox.height);
}
}
}
diff --git a/console-client/vga-hw.h b/console-client/vga-hw.h
index 6be87d31..7275b03e 100644
--- a/console-client/vga-hw.h
+++ b/console-client/vga-hw.h
@@ -21,7 +21,7 @@
#ifndef _VGA_HW_H_
#define _VGA_HW_H_ 1
-#define VGA_VIDEO_MEM_BASE_ADDR 0x0a0000
+#define VGA_VIDEO_MEM_BASE_ADDR 0x0b8000
#define VGA_VIDEO_MEM_LENGTH 0x004000
#define VGA_FONT_BUFFER 8
diff --git a/console-client/vga-support.c b/console-client/vga-support.c
index dd4d099d..2837a6e0 100644
--- a/console-client/vga-support.c
+++ b/console-client/vga-support.c
@@ -59,19 +59,6 @@ struct vga_state
static struct vga_state *vga_state;
-#if OSKIT_MACH
-#else
-
-#include <device/device.h>
-#include <hurd.h>
-
-/* Constants from Mach. */
-#define VIDMMAP_BEGIN 0xA0000
-#define VIDMMAP_SIZE (0xC0000 - 0xA0000)
-#define VIDMMAP_KDOFS 0xA0000 /* == kd_bitmap_start in mach/i386/i386at/kd.c */
-
-#endif
-
error_t
vga_init (void)
{
@@ -101,43 +88,6 @@ vga_init (void)
if (vga_videomem == (void *) -1)
return err;
}
- else if (errno == ENXIO)
- {
- /* GNU Mach v1 does not provide /dev/mem, but allows direct
- memory access to the video memory through the special "kd"
- kernel device. */
- device_t device_master = MACH_PORT_NULL;
- memory_object_t kd_mem = MACH_PORT_NULL;
- static device_t kd_device = MACH_PORT_NULL;
- vm_address_t mapped;
-
- err = get_privileged_ports (0, &device_master);
- if (err)
- return err;
-
- err = device_open (device_master, D_WRITE, "kd", &kd_device);
- if (err)
- return err;
-
- err = device_map (kd_device, VM_PROT_READ | VM_PROT_WRITE,
- VIDMMAP_BEGIN - VIDMMAP_KDOFS, VIDMMAP_SIZE,
- &kd_mem, 0);
- if (err)
- return err;
-
- err = vm_map (mach_task_self (), &mapped, VIDMMAP_SIZE,
- 0, 1, kd_mem, VIDMMAP_BEGIN - VIDMMAP_KDOFS, 0,
- VM_PROT_READ | VM_PROT_WRITE, VM_PROT_READ | VM_PROT_WRITE,
- VM_INHERIT_NONE);
- if (err)
- return err;
-
- vga_videomem = (char *) mapped;
- assert (vga_videomem != NULL);
-
- mach_port_deallocate (mach_task_self (), device_master);
- mach_port_deallocate (mach_task_self (), kd_mem);
- }
else
return errno;
@@ -175,7 +125,7 @@ vga_init (void)
/* Read/write in interleaved mode. */
outb (VGA_GFX_MISC_ADDR, VGA_GFX_ADDR_REG);
- outb (VGA_GFX_MISC_CHAINOE | VGA_GFX_MISC_A0TOAF, VGA_GFX_DATA_REG);
+ outb (VGA_GFX_MISC_CHAINOE | VGA_GFX_MISC_B8TOBF, VGA_GFX_DATA_REG);
outb (VGA_GFX_MODE_ADDR, VGA_GFX_ADDR_REG);
outb (VGA_GFX_MODE_HOSTOE, VGA_GFX_DATA_REG);
@@ -269,7 +219,7 @@ vga_read_write_font_buffer (int write, int buffer, int index,
outb (VGA_GFX_MODE_READ0, VGA_GFX_DATA_REG);
outb (VGA_GFX_MISC_ADDR, VGA_GFX_ADDR_REG);
saved_gfx_misc = inb (VGA_GFX_DATA_REG);
- outb (VGA_GFX_MISC_A0TOBF, VGA_GFX_DATA_REG);
+ outb (VGA_GFX_MISC_B8TOBF, VGA_GFX_DATA_REG);
if (write)
memcpy (vga_videomem + offset, data, datalen);
@@ -488,4 +438,5 @@ vga_exchange_palette_attributes (unsigned char index,
operation. */
inb (VGA_INPUT_STATUS_1_REG);
outb (0x20, VGA_ATTR_ADDR_DATA_REG);
+ outb (0x00, VGA_ATTR_ADDR_DATA_REG);
}
diff --git a/console-client/vga.c b/console-client/vga.c
index 3cc2135a..9e8abb3a 100644
--- a/console-client/vga.c
+++ b/console-client/vga.c
@@ -244,11 +244,11 @@ parse_opt (int key, char *arg, struct argp_state *state)
break;
case 'm':
- vga_display_max_glyphs = 1;
+ vga_display_max_glyphs = 0;
break;
case 'g':
- vga_display_max_glyphs = 0;
+ vga_display_max_glyphs = 1;
break;
case ARGP_KEY_END:
@@ -394,7 +394,7 @@ vga_display_restore_status (void *handle)
/* Read/write in interleaved mode. This is not preserved by the
XFree VESA driver. */
outb (VGA_GFX_MISC_ADDR, VGA_GFX_ADDR_REG);
- outb (VGA_GFX_MISC_CHAINOE | VGA_GFX_MISC_A0TOAF, VGA_GFX_DATA_REG);
+ outb (VGA_GFX_MISC_CHAINOE | VGA_GFX_MISC_B8TOBF, VGA_GFX_DATA_REG);
}
diff --git a/console/ChangeLog b/console/ChangeLog
deleted file mode 100644
index 4a7ad713..00000000
--- a/console/ChangeLog
+++ /dev/null
@@ -1,615 +0,0 @@
-2006-01-23 Samuel Thibault <samuel.thibault@ens-lyon.org>
-
- * console.c (main): Check CONS instead of MALLOC.
-
- * input.c (input_create): Fix arguments order of iconv_open()
- call.
-
-2005-01-19 Marco Gerards <metgerards@student.han.nl>
-
- * README.UTF8: New file.
- * motd.UTF8: Likewise.
-
-2003-04-29 Marco Gerards <metgerards@student.han.nl>
-
- * display.c (display_create): Added arguments width, height and
- lines, variables with the same name were removed.
- * display.h (display_creat): Add missing arguments to prototype.
- * console.c (DEFAULT_WIDTH): New macro.
- (DEFAULT_HEIGHT): Likewise.
- (DEFAULT_LINES): Likewise.
- (STRX): Likewise.
- (STR): Likewise.
- (struct cons): New members lines, width and height.
- (vcons_lookup): Add missing arguments to display_create.
- (options): Add options width, height and lines.
- (parse_opt): Parse width, height and lines.
- (netfs_append_args): Append arguments width, height and lines.
- (netfs_append_args): Fix asprintf error checking.
- (main): Initialize cons with default width, height and lines.
-
-2002-12-10 Marcus Brinkmann <marcus@gnu.org>
-
- * console.c (main): Don't use err without setting it.
-
-2002-10-10 Marcus Brinkmann <marcus@gnu.org>
-
- * hurd.ti (cub1): Change from \E[D to ^H.
- * display.c (handle_esc_bracket): Revert last change.
-
- * display.c (handle_esc_bracket): Implement <bw> for <cub1>.
-
-2002-09-22 Marcus Brinkmann <marcus@gnu.org>
-
- * pager.c, pager.h: New file.
- * Makefile (SRCS): Add pager.c.
- (LCLHDRS): Add pager.h.
- * display.c: Do not include <hurd/pager.h>, <sys/mman.h>,
- <sys/io.h>, <fcntl.h> and <sys/fcntl.h>. Include <hurd/ports.h>
- and "pager.h".
- (struct display): Replace member PAGER and MEMOBJ with USER_PAGER.
- (display_get_filemap): Implement with user_pager_get_filemap.
- (user_destroy): Implement with user_pager_destroy.
- (user_create): Implement partially with user_create.
- (display_init): Call user_pager_init.
- (struct user_pager_info, pager_bucket, pager_clear_user_data,
- pager_read_page, pager_write_page, pager_unlock_page,
- pager_report_extent, pager_dropweak, service_paging_requests):
- Move to ...
- * pager.c: ... here.
-
- * console.c: Include <mach.h>.
- (netfs_S_dir_notice_changes): New variable PREQ. Clean out the
- dead wood, eh, dead name notifications from the CONS->dirmod_req
- list.
- * display.c (struct user_pager_info): Drop members DISPLAY and P.
- (struct display): Remove member UPI and add member PAGER.
- (pager_report_extent): Remove local variable DISPLAY, use UPI
- directly.
- (user_create): New variable UPI to hold the user pager info.
- Modify the code to match new struct organization.
- (user_destroy): Unmap the user data.
- (display_notice_changes): Request dead-name notifications.
- (free_modreqs): Cancel dead-name notification request before
- deallocation send right.
- (display_notice_filechange): Likewise.
- (do_mach_notify_msg_accepted): Likewise.
- (display_destroy): Take DISPLAY->lock while operating. Reset the
- filemod_reqs and filemod_reqs_pending members of DISPLAY to NULL.
- (do_mach_notify_port_deleted): Add comment.
- (do_mach_notify_dead_name): Implement.
- (do_mach_notify_no_senders): Implement by delegating to libports.
- (do_mach_notify_send_once): Don't fail.
-
-2002-09-18 Marcus Brinkmann <marcus@gnu.org>
-
- * hurd.ti: Enable <kb2> and <kmouse>, fix the comments.
- * display.c (handle_esc_bracket_question_hl): Handle escape
- bracket 1000 h/l for XTerm-like mouse tracking enable/disable.
-
- * display.c (handle_esc_bracket): Use scrolling region for <ind>,
- <indn>, <ri>, <rin>, <il1>, <il>, <dl1> and <dl>. Also fix
- off-by-one error in <ri>, <rin>.
-
- * hurd.ti: Change <gsbom> and <grbom> to escape bracket
- right-angle sequences. Add <csr>, <smir>, <rmir> and <mir>,
- disable <ich1>.
- * display.c (handle_esc_bracket_m): Map \E[21m to normal intensity
- (as a way to switch off bright intensity).
- (handle_esc_bracket): Fix calculation of fill area for <ech>.
- (struct scrolling_region): New type.
- (struct display): New members INSERT_MODE and CSR.
- (display_output_one): For <rs2>, also reset DISPLAY->insert_mode
- and DISPLAY->csr.
- (display_create): Initialize DISPLAY->csr.bottom.
- (display_output_one): If in insert mode, shift to the right before
- printing the character.
- (linefeed): Take scrolling region into account.
- (handle_esc_bracket): Switch the meaning of 'h' and 'l'.
- (handle_esc_bracket_question): Likewise.
- (handle_esc_bracket_question_hl): Switch the interpretation of
- FLAG.
- (handle_esc_bracket_hl): Likewise. Add support for insert mode
- <smir> and <rmir>.
- (struct parse): New state STATE_ESC_BRACKET_RIGHT_ANGLE.
- (display_output_one): Handle STATE_ESC_BRACKET_RIGHT_ANGLE.
- (display_output_one): Move the bold attribute handling from here
- (<PU1>, <PU2>) ...
- (handle_esc_bracket_right_angle_hl): ... to here. New function
- handling <gsbom> and <grbom>.
- (handle_esc_bracket_right_angle): New function.
- (handle_esc_bracket): Implement <csr>.
-
-2002-09-17 Marcus Brinkmann <marcus@gnu.org>
-
- * input.c (input_enqueue): Initialize ERR.
-
- * bdf.c, bdf.h, display-drv.h, dynafont.c, dynafont.h, focus.c,
- focus.h, input-drv.h, main.c, ourfs_notify.defs, vcons.c, vcons.h,
- vga.c, vga-display.c, vga.h, vga-hw.h: Obsolete files removed.
-
- * display.c (handle_esc_bracket_m): Really disable italics on
- <ritm>.
-
-2002-09-16 Marcus Brinkmann <marcus@gnu.org>
-
- * hurd.ti: Add capabilities <sitm>, <ritm>, <gsbom>, <grbom>.
- * display.c (handle_esc_bracket_m): Add support for italic.
- (display_output_one): Add new capabilities PU1 and PU2 to toggle
- bold mode. Reset PARSE->state on most escape sequences.
- * console.c (parse_attributes): Rename old bold attribute to
- bright. Add support for italic and bold.
-
-2002-09-10 Marcus Brinkmann <marcus@gnu.org>
-
- * display.c (DISPLAY_CHANGE_FLAGS): New macro.
- (struct changes): New member FLAGS.
- (display_flush_filechange): Handle change of flags.
- (display_output_some): Initialize DISPLAY->changes.flags.
- (display_start_output): Clear CONS_FLAGS_SCROLL_LOCK in DISPLAY.
- (display_stop_output): Set CONS_FLAGS_SCROLL_LOCK in DISPLAY.
-
- * display.c (display_output_some): If iconv fails with EILSEQ,
- skip the next byte in the buffer and print a replacement
- character.
-
-2002-08-30 Marcus Brinkmann <marcus@gnu.org>
-
- * display.c (display_create): Likewise. Set
- DISPLAY->attr.attr_def instead the color versions.
- (struct attr): Remove fgcol_def, bgcol_def, and add attr_def.
- (handle_esc_bracket_m): Set all attributes to their defaults for
- case 0. Set default color using default attribute for case 49 and
- case 39.
- (display_output_one): Likewise.
- * console.c (options): Add --attribute option.
- (parse_opt): Parse --attribute option. Bail out with argp_error
- on error.
- (netfs_append_args): ...
- (struct cons): Replace foreground and background with new
- attribute member.
- (vcons_lookup): Pass CONS->attribute to display_create instead
- CONS->foreground and CONS->background.
- (main): Set default colors and attributes.
- (parse_attributes): New function.
-
- * console.c (parse_opt): If STATE->input is zero, use
- netfs_root_node's hook to cons.
-
-2002-08-28 Marcus Brinkmann <marcus@gnu.org>
-
- * display.c (screen_fill): Take CUR_LINES modulo LINES.
- (screen_shift_left): Likewise.
- (screen_shift_right): Likewise.
- (linefeed): Don't take CUR_LINES modulo LINES here.
-
-2002-08-28 Marcus Brinkmann <marcus@gnu.org>
-
- * display.c (display_output_one): Also set USER->cursor.status to
- normal for ECMA-48 <RIS> (hard reset).
-
-2002-08-23 Marcus Brinkmann <marcus@gnu.org>
-
- * Makefile (DIST_FILES): New variable.
- * hurd.ti: New file describing the terminal capabilities of the
- Hurd console server.
-
-2002-08-22 Marcus Brinkmann <marcus@gnu.org>
-
- * console.h: Move file to ../hurd/.
- * Makefile (LCLHDRS): Remove console.h.
- * display.c: Include <hurd/console.h> instead "console.h".
- * console.c: Likewise.
-
- * display.h: Add prototype for display_get_size.
- * display.c (display_get_size): New function.
- (nowait_file_changed): Update for new interfaces.
- * console.c (new_node): Use display_get_size to retrieve size of
- display node.
- (netfs_get_dirents): Initialize FIRST_VCONS to silence gcc warning.
-
-2002-07-15 Marcus Brinkmann <marcus@gnu.org>
-
- * display.c: Restore copyright notice until the papers by Kalle
- are actually received.
-
-2002-06-27 Marcus Brinkmann <marcus@gnu.org>
-
- * Makefile (MIGSTUBS): Add fs_notifyUser.o.
- (MIGSFLAGS): New variable.
- * console.c: Include "fs_notify_U.h".
- (struct modreq): New structure.
- (struct cons): New members DIRMOD_REQS and DIRMOD_TICK.
- (cons_notice_dirchange): New function.
- (vcons_lookup): Call cons_notice_dirchange.
- (netfs_S_dir_notice_changes): New function.
- (main): Initialize new members in CONS.
- * display.c (nowait_file_changed): Update to new interface (new
- argument TICKNO).
- (do_mach_notify_msg_accepted): Call nowait_file_changed with new argument.
- (display_notice_changes): Likewise.
- (display_notice_filechange): Likewise.
-
-2002-06-25 Marcus Brinkmann <marcus@gnu.org>
-
- * Makefile (HURDLIBS): Add pager, reported by Alfred M. Szmidt.
-
- * display.c (screen_shift_left): Don't increase DST twice in one
- iteration.
- * display.c (screen_shift_right): Likewise.
-
-2002-06-25 Marcus Brinkmann <marcus@gnu.org>
-
- * Makefile (LCLHDRS): Add priv.h and mutations.h.
- (MIGSTUBS): Add tioctlServer.o
- * console.c: Include <hurd/ioctl-types.h>.
- (new_node): Bump up st_size for display node.
- (S_tioctl_tiocflush, S_tioctl_tiocgwinsz, S_tioctl_tiocstart,
- S_tioctl_tiocstop, S_tioctl_tiocoutq, S_tioctl_tiocspgrp,
- S_tioctl_tiocgpgrp): New functions.
- (S_tioctl_tiocmodg, S_tioctl_tiocmods, S_tioctl_tiocexcl,
- S_tioctl_tiocnxcl, S_tioctl_tiocgeta, S_tioctl_tiocseta,
- S_tioctl_tiocsetaw, S_tioctl_tiocsetaf, S_tioctl_tiocgetd,
- S_tioctl_tiocsetd, S_tioctl_tiocdrain, S_tioctl_tiocmget,
- S_tioctl_tiocmset, S_tioctl_tiocsig, S_tioctl_tiocext,
- S_tioctl_tiocswinsz, S_tioctl_tiocremote, S_tioctl_tiocmbic,
- S_tioctl_tiocmbis, S_tioctl_tiocpkt, S_tioctl_tiocsti,
- S_tioctl_tioccdtr, S_tioctl_tiocsdtr, S_tioctl_tioccbrk,
- S_tioctl_tiocsbrk): New stubs.
- (console_demuxer): New function.
- (main): Don't call netfs_server_loop, but call
- ports_manage_port_operations_multithread, so we can use our own
- demuxer.
- * mutations.h: Use intran and outtran for netfs.
- * priv.h: Likewise.
-
- * console.h (cons_change_t): Add bits for bell_audible and
- bell_visible.
- (struct cons_display): Add member BELL.
- * display.c (struct changes): Add new members bell_audible and
- bell_visible. Add bit flag macro names for those.
- (display_flush_filechange): Start with first index in buffer.
- Signal bell events.
- (display_record_filechange): Set DISPLAY_CHANGE_MATRIX bit in the
- disjoint case after flushing the update.
- (display_output_one): Recognize '\a' as audible bell and '\Eg' as
- visible bell.
- (display_output_some): Handle bell updates.
-
-2002-06-24 Marcus Brinkmann <marcus@gnu.org>
-
- * console.h (cons_color_t): New enum type replacing color macros.
- (CONS_COLOR_MAX): New macro.
- (cons_change_t): New type.
- (struct cons_display): New member CHANGES.
- * console.c: Include "console.h".
- (DEFAULT_FOREGROUND, DEFAULT_FOREGROUND_NAME, DEFAULT_BACKGROUND,
- DEFAULT_BACKGROUND_NAME): New macros.
- (struct cons): New members foreground and background.
- (vcons_lookup): Pass colors to display_create invocation.
- (new_node): Fix st_size for display node.
- (color_names): New array.
- (options): Add options to set default foreground and background
- color.
- (parse_color): New function.
- (parse_opt): Implement new options.
- (netfs_append_args): Add new options to output.
- (main): Set default colors.
-
- * Makefile (DIST_FILES): Remove target.
- (MIGSTUBS): Remove ourfs_notifyUser.o and add notifyServer.o.
- * display.c: Do not include "ourfs_notify_U.h".
- (struct modreq): New member PENDING.
- (struct notify): New structure.
- (struct display): New members FILEMOD_REQS_PENDING and
- NOTIFY_PORT.
- (pager_read_page): Hand out previously returned pages.
- (pager_unlock_page): Assert that this is not called.
- (notify_class, notify_bucket): New port class and bucket global
- variables.
- (nowait_file_changed): New function, modified from mig output.
- (do_mach_notify_port_deleted): New stub function.
- (do_mach_notify_port_destroyed): New stub function.
- (do_mach_notify_no_senders): New stub function.
- (do_mach_notify_dead_name): New stub function.
- (do_mach_notify_send_once): New stub function.
- (do_mach_notify_msg_accepted): New function.
- (service_notifications): New function.
- (display_notice_changes): Call nowait_file_changed with new
- argument. Initialize REQ->pending.
- (display_notice_filechange): Remove arguments except DISPLAY. Set
- PENDING flags in pending filemod requests. Call
- nowait_file_changed with new notify argument. If notification
- will be sent, move modreq structure to pending list.
- (display_flush_filechange): Rewritten to use ring buffer to store
- changes.
- (user_create): Initialize new members of struct cons_display.
- (display_init): Initialize notify_class and notify_bucket.
- (display_create): Accept new arguments for default colors.
- Initialize new members of struct display.
- (display_destroy): Remove pending filemod requests and destroy the
- notification port. Do not free the display structure memory.
- (display_destroy_complete): New function.
- * display.h: Add new arguments to prototype of display_create.
-
-2002-06-18 Marcus Brinkmann <marcus@gnu.org>
-
- * console.h: Update all CONS_KEY_* macros to match other terminfo
- definitions (like "linux", "screen", "gnome"). Add CONS_CHAR_*
- macros for terminal graphic characters.
-
- * display.c (struct attr): New member ALTCHAR to flag usage of
- alternate character set.
- (display_notice_filechange): Make static.
- (handle_escape_bracket_m): Set ALTCHAR to 0 when resetting.
- Support new modes 10 and 11 to disable and enable ALTCHAR.
- (limit_cursor): New function, moved to global scope from ...
- (handle_escape_bracket): ... here.
- (linefeed): New function, moved to global scope from ...
- (display_output_one): ... here.
- (horizontal_tab): New function.
- (handle_escape_bracket): Add alias \E[' to \E[G for VT100
- compatibility. Add capability \E[a (horizontal cursor position
- relative) for ECMA-48 compatibility. Add capabilities \E[I
- (horizontal tab) and \E[Z (backward tabulation) for ECMA-48
- compatibility. Move capabilities \E[s and \E[u to ...
- (display_output_one): ... here as \E7 and \E8 for VT100
- compatibility.
- (altchar_to_ucs4): New function.
- (display_output_one): Use altchar_to_ucs4 when in altchar mode.
- Add \EM (reset) capability.
-
-2002-06-17 Marcus Brinkmann <marcus@gnu.org>
-
- * console.c (new_node): Adjust size of display node.
- * console.h: Add macros for color names. Add macros for intensity
- names. Add new types conchar_t and conchar_attr_t, which
- represent a console matrix cell and the attribute of one such
- cell, resp. Add macros for keycodes.
- (struct cons_display): Change type of _matrix member to conchar_t.
- * display.c (struct attr): Rewrite, using cons_attr_t to hold the
- attributes.
- (handle_escape_bracket_m): Use new members of ATTR.
- (display_flush_filechange): Send notification for changed matrix
- before the notification for new cur_line. Fix types in length
- calculation.
- (conchar_memset): New function.
- (user_create): Accept CHR and ATTR arguments. Fix calculation of
- NPAGES. Use conchar_memset instead of wmemset.
- (screen_fill): Fix type of ATTR argument. Use conchar_memset
- instead of wmemset.
- (screen_shift_left): Fix type of ATTR argument. Set attribute of
- empty cells. Fix length calculation.
- (screen_shift_right): Likewise.
- (handle_escape_bracket): Set default parameter for HUP. Be more
- ECMA-48 conform.
- (display_output_one): Fix arguments in screen_fill invocation.
- Set attribute for character output. Add <NEL> from ECMA-48.
- (display_create): Use 50 lines for now. Set default colors, and
- add new arguments to user_create invocation.
-
-2002-06-15 Marcus Brinkmann <marcus@gnu.org>
-
- * display.c (struct changes): Change type of WHICH from int to
- unsigned int.
- (display_flush_filechanges): Likewise for argument TYPE. Fix a
- zillion bugs.
- (display_record_filechange): Fix half a zillion bugs.
- (screen_shift_left): Fix order of arguments. Just flag a normal
- write change for the whole region, instead trying to be clever.
- (screen_shift_right): Likewise.
-
-2002-06-14 Marcus Brinkmann <marcus@gnu.org>
-
- * display.c (struct changes): New structure to temporarily hold
- changes to the display.
- (struct display): New member CHANGES.
- (display_flush_filechange): New function.
- (display_record_filechange): Likewise.
- (screen_fill): Use display_record_filechange instead
- display_notice_filechange.
- (display_output_one): Likewise.
- (screen_shift_left): Flush pending filechanges before scrolling.
- (screen_shift_right): Likewise.
- (display_output_one): Don't notice changes here ...
- (display_output_some): ... but here.
-
- * display.c (struct user_pager_info): Add members MEMOBJ_NPAGES
- and MEMOBJ_PAGES to hold the allocated and returned pages.
- (struct display): Remove member MEMOBJ_SIZE.
- (pager_clear_user_data): Deallocate returned pages for this pager
- object.
- (pager_read_page): Add an assertion to check that we don't create
- new pages for already allocated and returned pages.
- (pager_write_page): Implement by just holding to the page and
- storing its address in the pager object for later deallocation.
- (pager_report_extent): Implement using new member MEMOBJ_NPAGES
- rather than MEMOBJ_SIZE.
- (user_create): Allocate extra storage for the returned pages in
- UPI.
-
-2002-06-13 Marcus Brinkmann <marcus@gnu.org>
-
- * Makefile (DIST_FILES): New target.
- (MIGSTUBS): Likewise.
- (OBJS): Add $(MIGSTUBS).
- * ourfs_notify.defs: New file.
- * console.c: Diddle order of typedefs.
- (netfs_attempt_read): Clip AMT to bytes left to read before
- calling display_read.
- (netfs_S_file_notice_changes): New function.
- * console.h: Include <stdint.h>, not <sys/types.h>.
- Change all types from u_int32_t to uint32_t.
- * display.c: Include <stddef.h> and "outfs_notify_U.h". Change
- all u_int_32 types to uint32_t.
- (struct modreq): New structure.
- (struct display): New member filemod_reqs.
- (free_modreqs): New function.
- (display_notice_changes): Likewise.
- (display_notice_filechange): Likewise.
- (display_destroy): Free filemod_reqs member of DISPLAY.
- (MATRIX_POS): Macro removed.
- (screen_fill): Rewritten.
- (screen_shift_left): New function.
- (screen_shift_right): Likewise.
- (screen_scroll_up): Function removed.
- (screen_scroll_down): Likewise.
- (screen_scroll_left): Likewise.
- (screen_scroll_right): Likewise.
- (handle_esc_bracket): Use new screen_* functions.
- (display_output_one): Store old cursor and screen attributes, and
- if they have been changed, send file change notifications.
- * display.h: New prototype for display_notice_changes.
-
-2002-06-12 Marcus Brinkmann <marcus@gnu.org>
-
- * console.c: Include <argz.h>. Do not include "console.h", but
- inline it. New macro DEFAULT_ENCODING.
- (struct cons): De-const-ify member ENCODING.
- (mycons, cons): Remove global variables.
- (vcons_lookup): Use default encoding if CONS->encoding is not set.
- (new_node): Access CONS through VCONS. Adjust size of display
- node.
- (netfs_attempt_read): Truncate length to read before reading.
- (netfs_S_io_map): New function.
- (options): New global variable.
- (parse_opt): New function.
- (netfs_append_args): New function.
- (main): New variable CONS to hold console structure. Rediddle
- initialization to allocate memory for it, parse arguments, and
- create the root node in correct order. Also call display_init.
- * console.h: Rewritten with new meaning. It now describes the
- public interface of the console.
- * display.c: Include <assert.h>, <error.h>, <hurd.h>,
- <hurd/pager.h> and "console.h".
- (struct screen): Removed.
- (struct cursor): Remove members X, Y and status.
- (struct user_pager_info): New struct.
- (struct display): Remove member SCREEN, add new members USER, UPI,
- MEMOBJ and MEMOBJ_SIZE.
- (pager_bucket): New global variable.
- (display_get_filemap): New function.
- (pager_clear_user_data): Likewise.
- (pager_read_page): Likewise.
- (pager_write_page): Likewise.
- (pager_unlock_page): Likewise.
- (pager_report_extent): Likewise.
- (pager_dropweak): Likewise.
- (service_paging_requests): Likewise.
- (screen_init): Renamed to ...
- (user_create): ... this new function and changed to allocate
- memory object and map it for USER data in display structure.
- (screen_deinit): Renamed to ...
- (user_destroy): ... this new function and rewrote it.
- (MATRIX_POS): New macro.
- (screen_fill): Take DISPLAY argument instead SCREEN. Use
- MATRIX_POS.
- (screen_scroll_up): Likewise.
- (screen_scroll_down): Likewise.
- (screen_scroll_left): Likewise.
- (screen_scroll_right): Likewise.
- (handle_esc_bracket_hl): Take DISPLAY argument instead CURSOR.
- (handle_esc_bracket): Access screen and cursor fields correctly.
- (display_output_one): Likewise.
- (display_getsize): Likewise.
- (display_init): New function.
- (display_create): New variables width, height, lines. Call
- user_create, not screen_init. Call user_destroy, not
- screen_deinit.
- (display_destroy): Call user_destroy, not
- screen_deinit.
- (display_read): Reimplement using memory mapping.
- * display.h: New prototypes for display_init and display_get_filemap.
-
-2002-06-09 Marcus Brinkmann <marcus@gnu.org>
-
- * display.c (struct cursor): Change type of all members from int
- to u_int32_t.
- (screen_init): Initialize SCREEN->lines with 25 instead 200 for
- now.
- (screen_fill): Bring SCREEN->current_line into the calculation of
- MATRIXP.
- (screen_scroll_up): Likewise.
- (screen_scroll_down): Likewise.
- (screen_scroll_left): Likewise.
- (screen_scroll_right): Likewise.
- (display_output_one): Beautify code a bit.
- (display_read): Add metadata to beginning of file.
- * console.c (new_node): Increase size of display node to include
- metadata.
-
-2002-06-05 Marcus Brinkmann <marcus@gnu.org>
-
- * input.h: New file.
- * input.c: Likewise.
- * console.h: Likewise.
- * console.c: Likewise.
- * display.h: New development version.
- * display.c: Likewise.
- * Makefile (SRCS): Replace with files for new console server.
- (LCLHDRS): Likewise.
- (HURDLIBS): Likewise.
- (OBJS): Likewise.
-
-2002-06-05 Marcus Brinkmann <marcus@gnu.org>
-
- * input.h: Renamed to ...
- * input-drv.h: ... this.
- * focus.c: Include "input-drv.h" instead "input.h".
- * console.c: Likewise.
- * Makefile (LCLHDRS): Rename input.h to input-drv.h.
-
- * main.c: Include "vcons.h" instead "console.h".
- * focus.c: Likewise.
- * Makefile (LCLHDRS): Rename console.h to vcons.h.
- (SRCS): Rename console.c to vcons.c.
-
-2002-06-04 Marcus Brinkmann <marcus@gnu.org>
-
- * display.h: New file.
- * display.c: Likewise.
-
-2002-06-04 Marcus Brinkmann <marcus@gnu.org>
-
- * display.h: Renamed to ...
- * display-drv.h: ... this.
- * Makefile (LCLHDRS): Rename display.h to display-drv.h.
- * console.c: Include "display-drv.h" instead "display.h".
- * vga-display.c: Likewise.
-
-2002-06-03 Marcus Brinkmann <marcus@gnu.org>
-
- * console.c (vcons_release): Fix last change.
-
-2002-06-02 Marcus Brinkmann <marcus@gnu.org>
-
- * console.c (vcons_lookup): Correct nesting.
- (vcons_release): Negate if condition.
- Delete VCONS_LIST in CONS with last virtual console.
-
-2002-03-23 James A. Morrison <ja2morri@uwaterloo.ca>
-
- * main.c (main): Use error, not fprintf and exit.
-
-2002-03-17 Roland McGrath <roland@frob.com>
-
- * mutations.h (TIOCTL_IMPORTS): New macro.
- * priv.h: Protect from multiple inclusion.
-
- * vga.c (vga_init): io_perm -> ioperm.
- (vga_deinit): Likewise.
-
- * dynafont.c: Include <string.h>.
- * focus.c: Likewise.
- * vga.c: Likewise.
- * vga-display.c: Likewise.
-
- * main.c: Include <error.h>.
- (main): Use `error' instead of perror + exit.
- (console_mode, console_owner, console_group): Use *_t, not int.
-
-2002-03-17 Marcus Brinkmann <marcus@gnu.org>
-
- * bdf.c, bdf.h, console.c, console.h, display.h, dynafont.c,
- dynafont.h, focus.c, focus.h, input.h, main.c, Makefile,
- mutations.h, priv.h, vga.c, vga-display.c, vga.h, vga-hw.h: New files.
diff --git a/console/console.c b/console/console.c
index 118787eb..0b1f42c4 100644
--- a/console/console.c
+++ b/console/console.c
@@ -1,5 +1,8 @@
/* console.c -- A console server.
- Copyright (C) 1997, 1999, 2002, 2003 Free Software Foundation, Inc.
+
+ Copyright (C) 1997, 1999, 2002, 2003, 2007, 2008, 2010
+ Free Software Foundation, Inc.
+
Written by Miles Bader and Marcus Brinkmann.
This program is free software; you can redistribute it and/or
@@ -20,6 +23,7 @@
#include <stdlib.h>
#include <stddef.h>
#include <unistd.h>
+#include <locale.h>
#include <argp.h>
#include <argz.h>
@@ -223,7 +227,7 @@ vcons_lookup (cons_t cons, int id, int create, vcons_t *r_vcons)
vcons = calloc (1, sizeof (struct vcons));
if (!vcons)
{
- mutex_unlock (&vcons->cons->lock);
+ mutex_unlock (&cons->lock);
return ENOMEM;
}
vcons->cons = cons;
@@ -240,7 +244,7 @@ vcons_lookup (cons_t cons, int id, int create, vcons_t *r_vcons)
{
free (vcons->name);
free (vcons);
- mutex_unlock (&vcons->cons->lock);
+ mutex_unlock (&cons->lock);
return err;
}
@@ -250,7 +254,7 @@ vcons_lookup (cons_t cons, int id, int create, vcons_t *r_vcons)
display_destroy (vcons->display);
free (vcons->name);
free (vcons);
- mutex_unlock (&vcons->cons->lock);
+ mutex_unlock (&cons->lock);
return err;
}
@@ -500,18 +504,12 @@ netfs_attempt_utimes (struct iouser *cred, struct node *node,
if (! err)
{
if (mtime)
- {
- node->nn_stat.st_mtime = mtime->tv_sec;
- node->nn_stat.st_mtime_usec = mtime->tv_nsec / 1000;
- }
+ node->nn_stat.st_mtim = *mtime;
else
flags |= TOUCH_MTIME;
if (atime)
- {
- node->nn_stat.st_atime = atime->tv_sec;
- node->nn_stat.st_atime_usec = atime->tv_nsec / 1000;
- }
+ node->nn_stat.st_atim = *atime;
else
flags |= TOUCH_ATIME;
@@ -864,7 +862,6 @@ netfs_get_dirents (struct iouser *cred, struct node *dir,
if (!add_dir_entry (vcons->name,
vcons->id << 2, DT_DIR))
break;
- mutex_unlock (&dir->nn->cons->lock);
}
else
{
@@ -882,7 +879,10 @@ netfs_get_dirents (struct iouser *cred, struct node *dir,
add_dir_entry ("input", (dir->nn->vcons->id << 3) + 2, DT_FIFO);
}
}
-
+
+ if (dir->nn->cons)
+ mutex_unlock(&dir->nn->cons->lock);
+
fshelp_touch (&dir->nn_stat, TOUCH_ATIME, console_maptime);
return err;
}
@@ -1368,7 +1368,7 @@ parse_color (const char *name, int *number)
errno = 0;
nr = strtol (name, &tail, 0);
- if (errno || &tail || nr < 0 || nr > CONS_COLOR_MAX)
+ if (errno || *tail || nr < 0 || nr > CONS_COLOR_MAX)
return EINVAL;
*number = nr;
return 0;
@@ -2021,6 +2021,8 @@ main (int argc, char **argv)
/* Parse our command line arguments. */
argp_parse (&netfs_std_runtime_argp, argc, argv, 0, 0, cons);
+ setlocale (LC_CTYPE, "C.UTF-8");
+
task_get_bootstrap_port (mach_task_self (), &bootstrap);
netfs_init ();
diff --git a/console/display.c b/console/display.c
index 090aaf80..e807c50f 100644
--- a/console/display.c
+++ b/console/display.c
@@ -1,6 +1,6 @@
/* display.c - The display component of a virtual console.
Copyright (C) 1999 Kalle Olavi Niemitalo (emu.c from colortext 0.3).
- Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2003, 2010 Free Software Foundation, Inc.
Written by Marcus Brinkmann and Kalle Olavi Niemitalo.
This file is part of the GNU Hurd.
@@ -454,7 +454,7 @@ do_mach_notify_msg_accepted (mach_port_t notify, mach_port_t send)
mutex_unlock (&display->lock);
return 0;
}
- /* The message was succesfully queued, fall through. */
+ /* The message was successfully queued, fall through. */
}
/* Remove request from pending queue. */
*preq = req->next;
@@ -788,7 +788,7 @@ user_create (display_t display, uint32_t width, uint32_t height,
user = display->user;
user->magic = CONS_MAGIC;
- user->version = CONS_VERSION_MAJ << 16 | CONS_VERSION_AGE;
+ user->version = CONS_VERSION_MAJ << CONS_VERSION_MAJ_SHIFT | CONS_VERSION_AGE;
user->changes.buffer = offsetof (struct cons_display, changes._buffer)
/ sizeof (uint32_t);
user->changes.length = _CONS_CHANGES_LENGTH;
@@ -1590,30 +1590,54 @@ display_output_one (display_t display, wchar_t chr)
break;
default:
{
- int line = (user->screen.cur_line + user->cursor.row)
+ int line;
+ int idx;
+
+ if (user->cursor.col >= user->screen.width)
+ {
+ user->cursor.col = 0;
+ linefeed (display);
+ }
+
+ line = (user->screen.cur_line + user->cursor.row)
% user->screen.lines;
- int idx = line * user->screen.width + user->cursor.col;
+ idx = line * user->screen.width + user->cursor.col;
+ int width, i;
+
+ width = wcwidth (chr);
+ if (width < 0)
+ width = 1;
if (display->insert_mode
- && user->cursor.col != user->screen.width - 1)
+ && user->cursor.col < user->screen.width - width)
{
/* If in insert mode, do the same as <ich1>. */
screen_shift_right (display, user->cursor.col,
user->cursor.row,
user->screen.width - 1, user->cursor.row,
- 1, L' ', display->attr.current);
+ width, L' ', display->attr.current);
+ }
+
+ if (display->attr.altchar)
+ chr = altchar_to_ucs4 (chr);
+
+ for (i = 0; i < width; i++)
+ {
+ if (user->cursor.col >= user->screen.width)
+ break;
+ user->_matrix[idx+i].chr = chr;
+ user->_matrix[idx+i].attr = display->attr.current;
+ user->cursor.col++;
+ chr |= CONS_WCHAR_CONTINUED;
}
- user->_matrix[idx].chr = display->attr.altchar
- ? altchar_to_ucs4 (chr) : chr;
- user->_matrix[idx].attr = display->attr.current;
+ if (i > 0)
+ display_record_filechange (display, idx, idx + i - 1);
- display_record_filechange (display, idx, idx);
- user->cursor.col++;
- if (user->cursor.col == user->screen.width)
+ if (user->cursor.col > user->screen.width)
{
- user->cursor.col = 0;
- linefeed (display);
+ user->cursor.col = 0;
+ linefeed (display);
}
}
break;
diff --git a/console/hurd.ti b/console/hurd.ti
index 504192b5..2508482a 100644
--- a/console/hurd.ti
+++ b/console/hurd.ti
@@ -116,7 +116,7 @@ hurd|The GNU Hurd console server,
kpp=\E[5~, knp=\E[6~,
# Keycode for center of keypad area.
kb2=\E[G,
-# Mouse event has occured.
+# Mouse event has occurred.
kmous=\E[M,
# Text attribute capabilities.
diff --git a/console/priv.h b/console/priv.h
index 2fb72bf9..c03bbc46 100644
--- a/console/priv.h
+++ b/console/priv.h
@@ -1,5 +1,6 @@
/*
- Copyright (C) 1995,96,2001 Free Software Foundation, Inc.
+ Copyright (C) 1995, 1996, 2001, 2007 Free Software Foundation, Inc.
+
Written by Michael I. Bushnell, p/BSG.
This file is part of the GNU Hurd.
diff --git a/daemons/ChangeLog b/daemons/ChangeLog
deleted file mode 100644
index 5f5b7fee..00000000
--- a/daemons/ChangeLog
+++ /dev/null
@@ -1,240 +0,0 @@
-2002-09-15 Marcus Brinkmann <marcus@gnu.org>
-
- * getty.c: Include <termios.h>.
- (set_speed): New function.
- (main): Take linespec from argc[1], not argc[2]. Call set_speed.
-
-2002-03-23 James A. Morrison <ja2morri@uwaterloo.ca>
-
- * console-run.c (open_console): Use ERR, not errno.
-
-2001-12-20 Marcus Brinkmann <marcus@gnu.org>
-
- * runsystem.sh: For now, this requires bash.
-
-2001-11-21 Roland McGrath <roland@frob.com>
-
- * runttys.c (setup_terminal, add_terminal, init_ttys): Check for
- malloc failures.
- (add_terminal): Fix type used for sizeof calculation in realloc.
- (init_ttys): Likewise.
-
-2001-11-21 Ryan M Golbeck <rmgolbeck@uwaterloo.ca>
-
- * runttys.c (setup_terminal: make_args): Fixed off by one error.
-
-2001-08-20 Roland McGrath <roland@frob.com>
-
- * runsystem.sh: Don't check for MULTIBOOT_CMDLINE environment variable.
- Instead, expect it as normal arguments from init.
-
-2001-06-08 Roland McGrath <roland@frob.com>
-
- * rc.sh: Start /hurd/mach-defpager before swapon.
-
-2001-06-07 Roland McGrath <roland@frob.com>
-
- * rc.sh: Include $? value in message about unexpected fsck exit.
-
-2001-01-17 Neal H Walfield <neal@cs.uml.edu>
-
- * console-run.c (open_console): Conform to new
- fshelp_start_translator semantics.
-
-1999-09-23 Mark Kettenis <kettenis@gnu.org>
-
- * getty.c (main): Report an error if login_tty failed.
-
-1999-09-22 Roland McGrath <roland@baalperazim.frob.com>
-
- * getty.c: Undo last change.
-
- * getty.c (main): Make TTY our controlling terminal with TIOCSCTTY.
-
-1999-09-19 Roland McGrath <roland@baalperazim.frob.com>
-
- * runttys.c (main): Only call error if setsid returns -1.
- From Marcus Brinkmann <Marcus.Brinkmann@ruhr-uni-bochum.de>.
-
-1999-07-20 Roland McGrath <roland@baalperazim.frob.com>
-
- * getty.c: Include <utmp.h> for login_tty decl.
-
-1999-09-18 Marcus Brinkmann <Marcus.Brinkmann@ruhr-uni-bochum.de>
-
- * runttys.c (run): Only call error if setsid returns -1.
- * console-run.c (open_console): Likewise.
-
-1999-07-10 Roland McGrath <roland@baalperazim.frob.com>
-
- * console-run.c (open_console): Move first setting of TERMINAL and
- ARGZ_LEN outside of loop, quiets compiler warning.
-
- * lmail.c: Add #include <sys/mman.h> for munmap decl.
-
-1999-07-03 Thomas Bushnell, BSG <tb@mit.edu>
-
- * lmail.c (bfree): Use munmap instead of vm_deallocate.
-
-1999-07-01 Thomas Bushnell, BSG <tb@mit.edu>
-
- * rc.sh: Specify bash instead of sh.
- (remove_translators): Don't descend into "." or "..". Alter
- calling convention slightly and require the `nullglob' option to
- be set. Change caller to suit. From Kalle Olavi Niemitalo
- <tosi@ees2.oulu.fi>.
-
-1999-06-22 Roland McGrath <roland@baalperazim.frob.com>
-
- * rc.sh: Clean /tmp using special hackery to nuke translators.
-
-1999-06-18 Roland McGrath <roland@baalperazim.frob.com>
-
- * runsystem.sh: New file.
- * Makefile (targets, special-targets): Add runsystem.
- (runsystem): New target.
-
-1999-06-15 Roland McGrath <roland@baalperazim.frob.com>
-
- * runttys.c: New file.c
- * Makefile (targets, SRCS): Add runttys, runttys.c.
- (runttys): New target.
- (runttys-LDLIBS): New variable, -lutil.
-
- * console-run.c: New file.
- * Makefile (targets, SRCS): Add console-run, console-run.c.
- (console-run): New target.
-
-1999-05-29 Roland McGrath <roland@baalperazim.frob.com>
-
- * rc.sh: Don't create /var/run/uptime. It's no longer used.
-
-1999-05-15 Roland McGrath <roland@baalperazim.frob.com>
-
- * rc.sh: Do `swapon -a' first thing.
-
-Tue Mar 9 13:18:14 1999 Thomas Bushnell, BSG <tb@mit.edu>
-
- * lmail.c (OPT_REMOVE): New macro.
- (options): Don't recognize -r as an alias for --remove, but
- recognize it separately as a hidden alias.
- (main / parse_opt): Make -d do nothing.
- Make -r an alias for -f. Have OPT_REMOVE do the removal thing.
- Reported by Mark Kettenis (kettenis@wins.uva.nl).
-
-1998-12-06 Roland McGrath <roland@baalperazim.frob.com>
-
- * lmail.c (deliver, main): Add braces to silence gcc warning.
-
-1998-09-04 Roland McGrath <roland@baalperazim.frob.com>
-
- * lmail.c: Include <time.h> and <sys/time.h>.
-
-1998-07-19 Roland McGrath <roland@baalperazim.frob.com>
-
- * getty.c: Include <string.h> for basename decl.
-
-Wed Feb 19 23:05:13 1997 Miles Bader <miles@gnu.ai.mit.edu>
-
- * lmail.c (argp_program_version): Make const.
-
-Tue Oct 22 15:47:13 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * lmail.c (options): Make -l/--use-lock-file hidden, as we don't
- support it anyway (we just leave it here in case someone does
- implement it, so they'll know the right option to use for
- compatibility).
-
-Thu Oct 17 11:06:44 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * lmail.c (deliver): fsync the user's mailbox after delivery.
-
-Mon Oct 14 21:36:29 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * lmail.c: New file.
- * Makefile (targets): Add mail.local.
- (SRCS): Add lmail.c.
- (rc, mail.local): New rules.
- (%: %.sh): Rule removed.
- (INSTALL-mail.local-ops): New variable.
-
-Thu Oct 10 16:12:55 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * rc.sh: Startup up sendmail if possible.
-
-Thu Sep 12 16:50:12 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * Makefile (HURDLIBS): New variable.
-
-Wed Aug 14 10:22:39 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * Makefile (getty-LDLIBS): New variable.
- (getty): Dependency on -lutil removed.
- (libutil-libsubst): Variable removed.
-
-Tue Aug 13 08:13:04 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * rc.sh: When deleting files from /tmp, use -f flag to rm.
-
-Sat Jul 20 01:06:07 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * getty.c (main): Get the tty name from the right element in ARGV.
-
-Mon Jul 15 17:27:27 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * rc.sh: Create /var/run/uptime *after* clearing /var/run. Always
- create /var/run/mtab to keep e2fsck happy.
-
-Fri Jul 12 16:49:33 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * rc.sh: Only clean /tmp and /var/run if they are respectively
- directories.
-
-Sun Jul 7 10:39:27 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * getty.c (print_banner): Use basename instead of rolling our own.
-
-Sat Jul 6 13:58:40 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * getty.c (print_banner): Don't include directory in terminal
- name.
-
-Sat Jul 6 00:10:35 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * getty.c (print_banner): Use localhost instead of grotty loop.
- Make static.
- (main): Use syslog instead of error to report exec failure.
- * Makefile (getty): Depend on ../libshouldbeinlibc/libshouldbeinlibc.a.
-
-Fri Jul 5 22:02:16 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * getty.c: Include <sys/utsname.h> and <stdlib.h>.
- (print_banner): New function.
- (main): Call print_banner.
-
- * getty.c (main): Return something.
-
-Tue Jul 2 23:36:33 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * rc.sh: Touch /var/run/uptime file.
-
-Mon Jul 1 17:54:39 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * getty.c (main): Don't time out hardwired lines.
- Print an error if exec fails.
-
-Thu Jun 27 16:44:52 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * getty.c (main): Repair loop.
-
-Tue Jun 25 18:01:17 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * rc.sh: Use real fsck instead of kluge.
-
- * Makefile (%: %.sh): Make target writable.
-
-Thu Jun 20 14:38:58 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * rc.sh: Copied from ../config.
- * getty.c: Copied from ../utils.
- * Makefile: New file.
diff --git a/daemons/Makefile b/daemons/Makefile
index 72394733..d16680ec 100644
--- a/daemons/Makefile
+++ b/daemons/Makefile
@@ -1,6 +1,6 @@
# Makefile for daemons
#
-# Copyright (C) 1996,99 Free Software Foundation, Inc.
+# Copyright (C) 1996, 1999, 2008, 2010 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
@@ -22,10 +22,10 @@ makemode := utilities
targets = rc getty mail.local console-run runttys runsystem
special-targets = rc runsystem
-SRCS = rc.sh getty.c lmail.c console-run.c runttys.c
+SRCS = rc.sh runsystem.sh getty.c lmail.c console-run.c runttys.c
installationdir = $(libexecdir)
-HURDLIBS=shouldbeinlibc
+HURDLIBS = fshelp ports shouldbeinlibc
OBJS = $(SRCS:.c=.o)
getty-LDLIBS = -lutil
diff --git a/daemons/getty.c b/daemons/getty.c
index bacec355..5a2896d8 100644
--- a/daemons/getty.c
+++ b/daemons/getty.c
@@ -1,5 +1,7 @@
/* Stubby version of getty for Hurd
- Copyright (C) 1996, 1998, 1999 Free Software Foundation, Inc.
+
+ Copyright (C) 1996, 1998, 1999, 2007 Free Software Foundation, Inc.
+
Written by Michael I. Bushnell, p/BSG.
This file is part of the GNU Hurd.
@@ -127,10 +129,10 @@ main (int argc, char **argv)
if (tt && strcmp (tt->ty_type, "dialup") == 0)
/* Dialup lines time out (which is login's default). */
- execl (_PATH_LOGIN, "login", "-e", arg, 0);
+ execl (_PATH_LOGIN, "login", "-e", arg, NULL);
else
/* Hardwired lines don't. */
- execl (_PATH_LOGIN, "login", "-e", arg, "-aNOAUTH_TIMEOUT", 0);
+ execl (_PATH_LOGIN, "login", "-e", arg, "-aNOAUTH_TIMEOUT", NULL);
syslog (LOG_ERR, "%s: %m", _PATH_LOGIN);
diff --git a/daemons/lmail.c b/daemons/lmail.c
index ef616862..23c7b497 100644
--- a/daemons/lmail.c
+++ b/daemons/lmail.c
@@ -60,7 +60,7 @@ static const char doc[] = "Deliver mail to the local mailboxes of USER...";
#define HDR_PFX "From " /* Header, at the beginning of a line,
starting each msg in a mailbox. */
-#define ESC_PFX ">" /* Used to escape occurances of HDR_PFX in
+#define ESC_PFX ">" /* Used to escape occurrences of HDR_PFX in
the msg body. */
#define BMAX (64*1024) /* Chunk size for I/O. */
@@ -71,7 +71,7 @@ struct params
char *mail_dir; /* Mailbox directory. */
};
-/* Convert the system error code ERR to an appropiate exit value. This
+/* Convert the system error code ERR to an appropriate exit value. This
function currently only returns three sorts: success, temporary failure,
or error, with exit codes 0, EX_TEMPFAIL, or EX_UNAVAILABLE. The table of
temporary failures is from the bsd original of this program. */
@@ -116,7 +116,7 @@ err_to_ex (error_t err)
}
/* Print and syslog the given error message, with the system error string for
- ERRNO appended. Return an appropiate exit code for ERRNO. */
+ ERRNO appended. Return an appropriate exit code for ERRNO. */
#define SYSERR(fmt, args...) \
({ syslog (LOG_ERR, fmt ": %m" , ##args); err_to_ex (errno); })
@@ -126,7 +126,7 @@ err_to_ex (error_t err)
({ syslog (LOG_ERR, fmt , ##args); EX_UNAVAILABLE; })
/* Print and syslog the given error message, with the system error string for
- CODE appended. Return an appropiate exit code for CODE. */
+ CODE appended. Return an appropriate exit code for CODE. */
#define SYSERRX(code, fmt, args...) \
({ error_t _code = (code); \
syslog (LOG_ERR, fmt ": %s" , ##args , strerror (_code)); \
@@ -225,7 +225,7 @@ write_header (int out, char *out_name, struct params *params)
/* Copy from file descriptor IN to OUT, making any changes needed to make the
contents a valid mailbox entry. These include:
(1) Prepending a `From ...' line, and appending a blank line.
- (2) Replacing any occurances of `From ' at the beginning of lines with
+ (2) Replacing any occurrences of `From ' at the beginning of lines with
`>From '.
An exit status is returned. */
static int
@@ -326,7 +326,7 @@ process (int in, char *in_name, int out, char *out_name, struct params *params)
#define D_REWIND 0x2 /* Rewind MSG before using it. */
/* Deliver the text from the file descriptor MSG to the mailbox of the user
- RCPT in MAIL_DIR. FLAGS is from the set D_* above. An exit appropiate
+ RCPT in MAIL_DIR. FLAGS is from the set D_* above. An exit appropriate
exit code is returned. */
static int
deliver (int msg, char *msg_name, char *rcpt, int flags, struct params *params)
@@ -437,7 +437,7 @@ cache (int in, char *in_name, struct params *params, int *cached)
int
main (int argc, char **argv)
{
- int rcpt = 0; /* Index in ARGV of next recepient. */
+ int rcpt = 0; /* Index in ARGV of next recipient. */
char *file = 0; /* File containing message. */
int remove = 0; /* Remove file after successful delivery. */
int in = 0; /* Raw input file descriptor. */
diff --git a/daemons/runsystem.sh b/daemons/runsystem.sh
index c653807f..c3cb2d62 100644
--- a/daemons/runsystem.sh
+++ b/daemons/runsystem.sh
@@ -14,6 +14,8 @@
PATH=/bin:/sbin
export PATH
+umask 022
+
# If we lose badly, try to exec each of these in turn.
fallback_shells='/bin/sh /bin/bash /bin/csh /bin/ash /bin/shd'
diff --git a/daemons/runttys.c b/daemons/runttys.c
index 1afd558d..7efb7b7a 100644
--- a/daemons/runttys.c
+++ b/daemons/runttys.c
@@ -190,7 +190,7 @@ init_ttys (void)
return 0;
}
-/* Free everyting in the terminal array */
+/* Free everything in the terminal array */
void
free_ttys (void)
{
diff --git a/defpager/ChangeLog b/defpager/ChangeLog
deleted file mode 100644
index 8ccfd133..00000000
--- a/defpager/ChangeLog
+++ /dev/null
@@ -1,10 +0,0 @@
-1999-07-03 Thomas Bushnell, BSG <tb@mit.edu>
-
- * defpager.c (pager_read_page): Use munmap instead of
- vm_deallocate.
-
-Tue Apr 11 11:19:04 1995 Michael I Bushnell <mib@duality.gnu.ai.mit.edu>
-
- * Makefile: New file.
-
-
diff --git a/doc/ChangeLog b/doc/ChangeLog
deleted file mode 100644
index 447eb581..00000000
--- a/doc/ChangeLog
+++ /dev/null
@@ -1,141 +0,0 @@
-2007-03-16 Ben Asselstine <benasselstine@gmail.com>
- Thomas Schwinge <tschwinge@gnu.org>
-
- * hurd.texi (Invoking serverboot): Remove.
- (Server Bootstrap, Boot Scripts): Update.
-
-2005-01-21 Alfred M. Szmidt <ams@gnu.org>
-
- * hurd.texi: Doc fixes.
-
-2004-02-01 Alfred M. Szmidt <ams@kemisten.nu>
-
- * hurd.texi (Installing): Chapter removed.
-
-2003-08-09 Alfred M. Szmidt <ams@kemisten.nu>
-
- * Makefile (targets): Add hurd.info-* to list.
-
-2002-12-03 Marcus Brinkmann <marcus@gnu.org>
-
- * hurd.texi (Store I/O): Add store_set_size.
-
-2002-09-29 Marcus Brinkmann <marcus@gnu.org>
-
- * hurd.texi (Translators): Change isofs to iso9660fs
- (ISO-9660 CD-ROM FS): Likewise.
-
-2002-04-20 Marcus Brinkmann <marcus@gnu.org>
-
- * hurd.texi: Fix section nesting in last change.
-
-2002-02-11 James A. Morrison <ja2morri@student.math.uwaterloo.ca>
-
- * hurd.texi (Translators): Document the options for showtrans and
- fsystops.
-
-2002-02-11 James A. Morrison <ja2morri@student.math.uwaterloo.ca>
-
- * hurd.texi: Add a space before []'s in vector definitions to remove
- compile warnings.
-
-2002-04-15 Marcus Brinkmann <marcus@gnu.org>
-
- * hurd.texi (Modifying Directories): Documented dir_mkfile, dir_mkdir
- dir_rmdir, dir_unlink, dir_link and dir_rename.
- Submitted by James A. Morrison <ja2morri@student.math.uwaterloo.ca>.
-
-2002-02-11 James A. Morrison <ja2morri@student.math.uwaterloo.ca>
-
- * hurd.texi: Updated grub url.
-
-2002-03-05 Marcus Brinkmann <marcus@gnu.org>
-
- * hurd.texi (Diskfs Callbacks): Refer to dir_lookup, not dir_pathtrans.
- Reported by James A Morrison <ja2morri@student.math.uwaterloo.ca>.
-
-2001-01-08 Marcus Brinkmann <marcus@gnu.org>
-
- * hurd.texi (Store Management): Replace off_t with store_offset_t.
- (Store I/O): Likewise.
- (Store Classes): Likewise.
-
-2001-01-07 Marcus Brinkmann <marcus@gnu.org>
-
- * hurd.texi (Diskfs Callbacks): Make diskfs_dirstat_size const.
-
-2000-04-18 Gordon Matzigkeit <gord@fig.org>
-
- * hurd.texi (Microkernel Object Library): Delete deprecated
- node.
-
-2000-03-08 Gordon Matzigkeit <gord@fig.org>
-
- * hurd.texi (Overview): Add a first cut at an architectural
- summary.
-
-1999-09-20 Thomas Bushnell, BSG <tb@mit.edu>
-
- * hurd.texi: Repair syntax lossage.
-
-1999-09-18 Roland McGrath <roland@baalperazim.frob.com>
-
- * Makefile (installationdir): New variable.
- (DIST_FILES): Use := instead of =, so as to process wildcard only once.
- (all): Target removed (superfluous).
-
-1999-09-18 Thomas Bushnell, BSG <tb@mit.edu>
-
- * hurd.texi: Added many comments (marked by `tb:') to some of the
- FIXME questions and reworded a few things.
-
-1999-06-17 Roland McGrath <roland@baalperazim.frob.com>
-
- * Makefile (%.info rule): Put output in build dir, not srcdir.
- Pass -I options to makeinfo for both dirs.
- (move-if-change): New variable.
- (version.texi, stamp-version): New targets, update version.texi (in
- build dir) from `$(hurd-version)' as set in Makeconf.
-
-Tue Apr 20 21:50:19 1999 Thomas Bushnell, BSG <tb@mit.edu>
-
- * hurd.texi: More detail on fshelp_start_translator.
-
-Tue Apr 13 16:47:41 1999 Thomas Bushnell, BSG <tb@mit.edu>
-
- * hurd.texi: Doc updates from Eric Hanchrow, filtered through
- Gordon Matzigkeit.
-
-1999-03-17 Gordon Matzigkeit <gord@trick.fig.org>
-
- * gpl.texinfo: New file, taken from /gd/gnu/doc/gpl.texi on the
- GNU machines.
-
- * Makefile (DIST_FILES): Fix up wildcard so that we don't
- accidentally include hurd.info twice.
-
-1998-06-02 Gordon Matzigkeit <gord@profitpress.com>
-
- * Makefile: Add rules for building info, dvi and ps files.
-
- * hurd.texi: Change the basic structure, and add a lot more
- information.
-
-Wed Apr 22 16:52:22 1998 Thomas Bushnell, n/BSG <tb@mit.edu>
-
- * hurd.texi: Various doc fixes submitted by Gordon Matzigkeit
- (gord@m-tech.ab.ca).
-
-Mon Apr 13 15:40:43 1998 Thomas Bushnell, n/BSG <thomas@gnu.org>
-
- * navigating: New file.
- * Makefile (DIST_FILES): Mention `navigating'.
-
-Thu Sep 19 17:52:23 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * hurd.texi: Comment out sections related to Shared I/O.
- Begin documenting fs.defs.
-
-Mon Aug 8 15:50:17 1994 Michael I Bushnell <mib@churchy.gnu.ai.mit.edu>
-
- * Makefile: Rewritten in accord with new scheme.
diff --git a/doc/Makefile b/doc/Makefile
index 707f3304..0c00976c 100644
--- a/doc/Makefile
+++ b/doc/Makefile
@@ -18,8 +18,7 @@
dir := doc
makemode := misc
-DIST_FILES := navigating gpl.texinfo hurd.texi version.texi \
- hurd.info $(wildcard hurd.info-*)
+DIST_FILES := navigating gpl.texinfo hurd.texi version.texi
targets = hurd.info $(wildcard hurd.info-*)
installationdir = $(infodir)
@@ -56,3 +55,10 @@ stamp-version: $(top_srcdir)/Makeconf
echo '@set VERSION $(hurd-version)' > version.texi.new
$(move-if-change) version.texi.new version.texi
touch $@
+
+# XXX: the default lndist target will try to look for target files
+# in the source directory. Special case them.
+lndist: lndist-info-targets
+lndist-info-targets: hurd.info $(wildcard hurd.info-*)
+ ln $? $(top_srcdir)/hurd-snap/$(dir)
+
diff --git a/doc/hurd.texi b/doc/hurd.texi
index 2d5ce5c5..ea73a4c6 100644
--- a/doc/hurd.texi
+++ b/doc/hurd.texi
@@ -97,10 +97,14 @@
* Hurd: (hurd). Using and programming the Hurd kernel servers.
@end direntry
-@ifinfo
+@copying
+This file documents the GNU Hurd kernel component. This edition of the
+documentation was last updated for version @value{VERSION} of the Hurd.
+
Copyright @copyright{} 1994, 1996, 1998, 1999, 2000, 2001, 2002, 2003,
-2004, 2005, 2007 Free Software Foundation, Inc.
+2004, 2005, 2007, 2008, 2009 Free Software Foundation, Inc.
+@quotation
Permission is granted to make and distribute verbatim copies of
this manual provided the copyright notice and this permission notice
are preserved on all copies.
@@ -120,10 +124,12 @@ permission notice identical to this one.
Permission is granted to copy and distribute translations of this manual
into another language, under the above conditions for modified versions.
-@end ifinfo
+@end quotation
+@end copying
@setchapternewpage none
@settitle Hurd Reference Manual
+
@titlepage
@finalout
@title The GNU Hurd Reference Manual
@@ -132,29 +138,15 @@ into another language, under the above conditions for modified versions.
@page
@vskip 0pt plus 1filll
-Copyright @copyright{} 1994, 1996, 1998, 1999, 2000, 2001, 2002, 2003,
-2004, 2005, 2007 Free Software Foundation, Inc.
-
-Permission is granted to make and distribute verbatim copies of
-this manual provided the copyright notice and this permission notice
-are preserved on all copies.
-
-Permission is granted to copy and distribute modified versions of this
-manual under the conditions for verbatim copying, provided also that
-the entire resulting derived work is distributed under the terms of a
-permission notice identical to this one.
-
-Permission is granted to copy and distribute translations of this manual
-into another language, under the above conditions for modified versions.
+@insertcopying
@end titlepage
-@ifinfo
-
+@ifnottex
@node Top
@top The GNU Hurd
-This file documents the GNU Hurd kernel component. This edition of the
-documentation was last updated for version @value{VERSION} of the Hurd.
+@insertcopying
+@end ifnottex
@menu
* Introduction:: How to use this manual.
@@ -336,8 +328,6 @@ Auth Interface
@end detailmenu
@end menu
-@end ifinfo
-
@node Introduction
@chapter Introduction
@@ -1769,7 +1759,7 @@ new reference port. (FIXME: xref the C library manual for information
on how to send sig_post messages.)
The server then sends one @code{SIGIO} signal to each registered async
-user everytime I/O becomes possible. I/O is possible if at least one
+user every time I/O becomes possible. I/O is possible if at least one
byte can be read or written immediately. The definition of
``immediately'' must be the same as for the implementation of the
@code{O_NONBLOCK} flag (@pxref{Open Modes}). In addition, every time a
@@ -1816,27 +1806,23 @@ this by calling @code{io_get_icky_async_id}.
Users may call @code{io_stat} to find out information about the I/O
object. Most of the fields of a @code{struct stat} are meaningful only
for files. All objects, however, must support the fields
-@var{st_fstype}, @var{st_fsid}, @var{st_ino}, @var{st_atime},
-@var{st_atime_usec}, @var{st_mtime_user}, @var{st_ctime},
-@var{st_ctime_usec}, and @var{st_blksize}.
+@var{st_fstype}, @var{st_fsid}, @var{st_ino}, @var{st_atim},
+@var{st_mtim}, @var{st_ctim}, and @var{st_blksize}.
@var{st_fstype}, @var{st_fsid}, and @var{st_ino} must be unique for
the underlying object across the entire system.
-@var{st_atime} and @var{st_atime_usec} hold the seconds and
-microseconds, respectively, of the system clock at the last time the
+@var{st_atim} holds the timestamp of the system clock at the last time the
object was read with @code{io_read}.
-@var{st_mtime} and @var{st_mtime_usec} hold the seconds and microseconds,
-respectively, of the system clock at the last time the object was
-written with @code{io_write}.
+@var{st_mtim} holds the timestamp of the system clock at the last time the
+object was written with @code{io_write}.
-Other appropriate operations may update the @var{atime} and the
-@var{mtime} as well; both the file and socket interfaces specify such
+Other appropriate operations may update the @var{atim} and the
+@var{mtim} as well; both the file and socket interfaces specify such
operations.
-@var{st_ctime} and @var{st_ctime_usec} hold the seconds and
-microseconds, respectively, of the system clock at the last time
+@var{st_ctim} holds the timestamp of the system clock at the last time
permanent meta-data associated with the object was changed. The exact
operations which cause such an update are server-dependent, but must
include the creation of the object.
@@ -2144,6 +2130,13 @@ some common ones are:
If no options are supplied, @var{filesys}' current options are
printed.
+The options passed as @var{fs_option}s are meant to augment or change those
+which are already set, they're not meant to completely replace the existing
+command line options. For example, passing @code{--readonly} to a file system
+server will change the server from writable to read-only, but will not touch
+the used backing store. Passing @code{--address=new_IP} to
+@file{/servers/socket/2} will change the local IP address to @var{new_IP}, but
+will not touch the interface, netmask and gateway settings.
@node Trivfs Library
@section Trivfs Library
@@ -3928,10 +3921,15 @@ locked since). @var{dir} must always be provided as at least a hint for
disk allocation strategies.
@end deftypefun
+@deftypefun void diskfs_set_node_atime (@w{struct node *@var{np}})
+If disk is not readonly and the noatime option is not enabled, set
+@code{@var{np}->dn_set_atime}.
+@end deftypefun
+
@deftypefun void diskfs_set_node_times (@w{struct node *@var{np}})
If @code{@var{np}->dn_set_ctime} is set, then modify
-@code{@var{np}->dn_stat.st_ctime} appropriately; do the analogous
-operations for atime and mtime as well.
+@code{@var{np}->dn_stat.st_ctim} appropriately; do the analogous
+operations for @code{st_atim} and @code{st_mtim} as well.
@end deftypefun
@deftypefun {struct node *} diskfs_check_lookup_cache (@w{struct node *@var{dir}}, @w{char *@var{name}})
@@ -4016,8 +4014,8 @@ Set @code{*@var{statfsbuf}} with appropriate values to reflect the
current state of the filesystem.
@end deftypefun
-@deftypefun error_t diskfs_lookup (@w{struct node *@var{dp}}, @w{char *@var{name}}, @w{enum lookup_type @var{type}}, @w{struct node **@var{np}}, @w{struct dirstat *@var{ds}}, @w{struct protid *@var{cred}})
-@deftypefunx error_t diskfs_lookup_hard (@w{struct node *@var{dp}}, @w{char *@var{name}}, @w{enum lookup_type @var{type}}, @w{struct node **@var{np}}, @w{struct dirstat *@var{ds}}, @w{struct protid *@var{cred}})
+@deftypefun error_t diskfs_lookup (@w{struct node *@var{dp}}, @w{const char *@var{name}}, @w{enum lookup_type @var{type}}, @w{struct node **@var{np}}, @w{struct dirstat *@var{ds}}, @w{struct protid *@var{cred}})
+@deftypefunx error_t diskfs_lookup_hard (@w{struct node *@var{dp}}, @w{const char *@var{name}}, @w{enum lookup_type @var{type}}, @w{struct node **@var{np}}, @w{struct dirstat *@var{ds}}, @w{struct protid *@var{cred}})
You should not define @code{diskfs_lookup}, because it is simply a
wrapper for @code{diskfs_lookup_hard}, and is already defined in
@code{libdiskfs}.
diff --git a/exec/ChangeLog b/exec/ChangeLog
deleted file mode 100644
index 4a36825d..00000000
--- a/exec/ChangeLog
+++ /dev/null
@@ -1,1070 +0,0 @@
-2004-10-22 Roland McGrath <roland@frob.com>
-
- * exec.c (check_elf_phdr): Return early on setting ENOEXEC.
- Only touch E->info.elf.phdr_addr once, on the PT_LOAD segment that
- actually contains the e_phoff location in the file.
- (do_exec): If E.info.elf.phdr_addr is zero, don't set BOOT->phdr_size.
-
-2004-09-26 Roland McGrath <roland@frob.com>
-
- * priv.h (struct execdata.info.elf): New field `phdr_addr'.
- * exec.c (check_elf): Set E->info.elf.phdr_addr here from e_phoff.
- (check_elf_phdr): Don't check for PT_PHDR, remove last two args.
- (do_exec): Update callers. Set BOOT->phdr_addr and BOOT->phdr_size
- using info saved by check_elf.
-
-2004-02-11 Roland McGrath <roland@frob.com>
-
- * exec.c (servercopy): Change signature to avoid casted arguments.
- Update callers.
- (do_exec, S_exec_setexecdata): Update callers.
-
-2004-02-10 Roland McGrath <roland@frob.com>
-
- * elfcore.c (dump_core): Include null terminator in note name size,
- and round up to four byte alignment.
- (dump_core: write_note): Don't round OFFSET after each partial write.
- (dump_core): Don't round up to page size before writing notes.
- Do round up to page size for offset of each PT_LOAD region.
-
-2004-01-15 Roland McGrath <roland@frob.com>
-
- * priv.h (struct execdata.info.elf): Add `execstack' flag.
- * exec.c (check_elf_phdr): Set it according to PT_GNU_STACK's PF_X
- flag bit. If no PT_GNU_STACK, default to set.
- (do_exec): If flag is clear, remove execute permission from stack.
-
-2002-09-17 Roland McGrath <roland@frob.com>
-
- * elfcore.c [i386_THREAD_STATE] (fetch_thread_regset): The two types
- are not actually identical, must rearrange some members a little.
-
-2002-06-13 Roland McGrath <roland@frob.com>
-
- * priv.h (trivfs_protid_t): Type removed (now in trivfs.h).
-
-2002-05-29 Roland McGrath <roland@frob.com>
-
- * hashexec.c (check_hashbang): Fix fs id port arg in io_identity call.
-
- * elfcore.c (dump_core): int -> size_t
-
-2002-05-10 Roland McGrath <roland@frob.com>
-
- * exec.c (prepare): Do io_stat when io_map fails as for when
- io_map_cntl fails.
-
-2002-05-01 Roland McGrath <roland@frob.com>
-
- * elfcore.c [ALPHA_THREAD_STATE]
- (ELF_MACHINE, fetch_thread_regset, fetch_thread_fpregset):
- New definitions for Alpha CPU.
-
-2002-04-27 Roland McGrath <roland@frob.com>
-
- * priv.h: Include <link.h> to get ElfW macro.
- * priv.h, exec.c, main.c, hostarch.c: Use `ElfW(TYPE)' in place
- of `Elf32_TYPE' throughout.
-
-2002-03-11 Roland McGrath <roland@frob.com>
-
- * core.c: File removed.
- * Makefile (DIST_FILES): Remove core.c from the list.
-
- * elfcore.c: New file, used by crash server (../trans) to write
- ELF core dump files. Thanks to Jon Arney <jarney1@cox.net> for
- spurring me to write this, and for helping to test and debug it.
-
-2002-01-02 Roland McGrath <roland@frob.com>
-
- * exec.c (do_exec) [KERN_INVALID_LEDGER]:
- Pass extra arguments to task_create for OSF variant.
-
-2002-01-01 Roland McGrath <roland@frob.com>
-
- * execmutations.h (SERVERCOPY): New macro.
-
-2001-12-31 Roland McGrath <roland@frob.com>
-
- * exec.c (do_exec): thread_array_t -> thread_t *
-
-2001-11-23 Roland McGrath <roland@frob.com>
-
- * gcore.c: File moved to ../utils.
- * Makefile (DIST_FILES): Remove it.
-
-2001-04-01 Neal H Walfield <neal@cs.uml.edu>
-
- * main.c (S_exec_init): Use iohelp_create_empty_iouser.
-
-2001-06-15 Roland McGrath <roland@frob.com>
-
- * exec.c (do_exec: user_fd): Add a user ref to returned port.
-
-2001-02-12 Marcus Brinkmann <marcus@gnu.org>
-
- * main.c: Change hurd version name from proc to exec.
- (main): Add period to doc string.
-
-2000-10-01 Roland McGrath <roland@frob.com>
-
- * exec.c: Comments.
-
-2000-09-24 Roland McGrath <roland@frob.com>
-
- * exec.c (map): Bail if the requested position + data size does not
- fit in the file size.
-
-2000-07-26 Mark Kettenis <kettenis@gnu.org>
-
- * Makefile (HURDLIBS): Reorder libs such that the threads lib
- comes before the ports lib. This makes sure the functions in
- libthreads properly override the stubs in libports with the new
- dynamic linker semantics in glibc 2.2.
-
-2000-07-20 Thomas Bushnell, BSG <tb@mit.edu>
-
- * hashexec.c (check_hashbang): Count characters in interp
- correctly. Fix from Kalle Olavi Niemitalo <tosi@stekt.oulu.fi>.
-
-2000-03-23 Mark Kettenis <kettenis@gnu.org>
-
- * exec.c (do_exec): Set interp.file to MACH_PORT_NULL before the
- first `goto out'.
-
-2000-03-20 Roland McGrath <roland@baalperazim.frob.com>
-
- * main.c (trivfs_allow_open): Initialize to zero.
- (trivfs_support_read, trivfs_support_write): Likewise.
- (trivfs_support_exec): Variable removed.
-
- * exectrans.c: Obsolete file removed.
- * Makefile (DIST_FILES): Remove it.
-
-2000-03-17 Roland McGrath <roland@baalperazim.frob.com>
-
- * hashexec.c (check_hashbang): Use strpbrk directly instead of strsep.
- Fix up INTERP_LEN properly in the no-argument case.
-
-2000-03-17 Thomas Bushnell, BSG <tb@mit.edu>
-
- * main.c (S_exec_init): Don't use MOVE_SEND in Hurd RPC.
-
-2000-03-17 Roland McGrath <roland@baalperazim.frob.com>
-
- * exec.c (do_exec): Use ports_get_send_right.
-
-2000-03-13 Roland McGrath <roland@baalperazim.frob.com>
-
- * priv.h (EXECDATA_STREAM): Define this only #ifdef BFD.
- The non-BFD exec server is now completely independent of stdio magic;
- it uses only those interfaces documented in the C library manual,
- which are provided both by old GNU stdio and by GNU libio.
- Resurrecting the BFD exec server will require using magic again,
- for which libio-specific magic needs to be written.
-
- * exec.c [! EXECDATA_STREAM] (prepare_stream): Replace no-op with real
- function to initialize map_* members to zero.
-
- * priv.h (EXECDATA_STREAM): New macro, always defined for now.
- (struct execdata) [! EXECDATA_STREAM]: Add members
- map_buffer, map_bsize, map_fsize, map_filepos in place of stream.
- (map_buffer, map_filepos, map_set_fsize): New macros for accessing
- those or stream.
- [! EXECDATA_STREAM] (map_fsize, map_vsize): Define using new members.
-
- * exec.c (map): Rewritten purely using those accessor macros.
- (input_room): Set the __target, __bufp, __error, and __eof members,
- which are no longer set by map.
- [! EXECDATA_STREAM] (prepare_stream, prepare_in_memory): Make no-ops.
- (input_room, close_exec_stream, fake_seek, prepare_stream,
- prepare_in_memory): Conditionalize these defns on [EXECDATA_STREAM].
- (load_section): Always use map instead of stdio.
- Replace bcopy with memcpy.
- (check_gzip: zipread): Rewrite using map instead of stdio.
- (check_bzip2: zipread): Likewise.
-
- * hashexec.c (check_hashbang): Fix up multiple fencepost brainos.
-
- * hashexec.c (check_hashbang): Fix fencepost error in last change.
-
- * exec.c (map): Made global.
- * priv.h: Declare it.
- (map_fsize, map_vsize): New macros for accessing state set up by map.
- * hashexec.c (check_hashbang): Use map and copying operations rather
- than stdio to extract the first line from the file. Move finish call
- to immediately after reading the line.
-
- * exec.c (map): If E->file_data is set, diagnose EOF before going to
- direct io_read.
- (prepare_in_memory): New function, broken out of check_gzip before
- last change.
- (check_gzip, check_bzip2): Use it.
-
- * exec.c (prepare_stream): New function, broken out of prepare.
- (prepare): Call it.
- [_STDIO_USES_IOSTREAM]: Do #error if this is defined.
- (map, input_room, close_exec_stream, fake_seek, prepare_stream):
- Conditionalize all these definitions on [! _STDIO_USES_IOSTREAM].
- Only map and prepare_stream are called from elsewhere in the code.
- (check_gzip): Don't reinitialize E->stream, since it will in fact not
- be used again.
- (check_bzip2): Likewise.
-
-2000-03-09 Roland McGrath <roland@baalperazim.frob.com>
-
- * hostarch.c (elf_machine_matches_host): Don't recognize EM_486,
- since newer <elf.h>'s don't define it any more.
-
-2000-02-27 Roland McGrath <roland@baalperazim.frob.com>
-
- * hashexec.c (check_hashbang: user_fd): Add a user ref to DTABLE[FD]
- send right, because caller (hurd_file_name_lookup internals) will
- consume one.
-
- * hashexec.c (check_hashbang): When dealloc'ing DTABLE ports,
- optimize out syscall for null ports.
-
-1999-11-08 Roland McGrath <roland@baalperazim.frob.com>
-
- * exectrans.c (trivfs_support_write, trivfs_support_exec): Variables
- removed.
- (trivfs_allow_open): Set to just O_READ.
-
-1999-09-09 Roland McGrath <roland@baalperazim.frob.com>
-
- * Makefile (exec.static-LDFLAGS): Variable removed.
-
-1999-07-17 Roland McGrath <roland@baalperazim.frob.com>
-
- * exec.c (servercopy): Removed unused variable.
-
-1999-07-11 Roland McGrath <roland@baalperazim.frob.com>
-
- * exec.c (load_section): Fix typos in last change.
-
-1999-07-11 Thomas Bushnell, BSG <tb@mit.edu>
-
- * exec.c (load_section): Use mmap instead of vm_allocate when
- allocating in mach_task_self ().
- (servercopy): Likewise.
- (do_exec): Likewise.
- * hashexec.c (check_hashbang): Likewise.
-
-1999-07-10 Roland McGrath <roland@baalperazim.frob.com>
-
- * hostarch.c (mach_host_elf_machine): Replaced with ...
- (elf_machine_matches_host): New function. Instead of returning
- an ELF EM_* code, take one and check if it matches the host;
- operate only on mach_host_self(), cache results,
- Grok CPU_TYPE_{I486,PENTIUM,PENTIUMPRO} to accept EM_386 or EM_486.
- Grok POWERPC, ALPHA, HPPA types.
- * exec.c (check_elf): Call elf_machine_matches_host instead of
- comparing against elf_machine.
- (load_section): #if 0 out no-op code that uses elf_machine.
- * priv.h (elf_machine_matches_host): Declare it.
- (elf_machine, mach_host_elf_machine): Remove decls.
- * main.c (main) [!BFD]: Don't call mach_host_elf_machine.
- (elf_machine): Variable removed.
-
- * exec.c (map): Don't cast arg to munmap to vm_address_t.
-
- * priv.h: Add #include <sys/mman.h> for munmap decl.
-
-1999-07-03 Thomas Bushnell, BSG <tb@mit.edu>
-
- * core.c (core_dump_task): Use munmap instead of vm_deallocate,
- when it's from our own task.
- * elfcore.c: Likewise.
- * exec.c (load_section): Likewise.
- (map): Likewise.
- (close_exec_stream): Likewise.
- (finish_mapping): Likewise.
- (load): Likewise.
- (do_exec): Likewise.
- (S_exec_setexecdata): Likewise.
- * hashexec.c (check_hashbang): Likewise.
- * main.c (deadboot): Likewise.
-
-1999-06-04 Roland McGrath <roland@baalperazim.frob.com>
-
- * exec.c (map): Fix mapping calls to use F->__offset consistently
- instead of F->__target.
-
-1999-05-16 Roland McGrath <roland@baalperazim.frob.com>
-
- * hashexec.c (check_hashbang): Fix bug in last change.
-
-1999-05-15 Roland McGrath <roland@baalperazim.frob.com>
-
- * hashexec.c (check_hashbang): Trim trailing blanks after interpreter
- argument.
-
-1998-09-05 OKUJI Yoshinori <okuji@kuicr.kyoto-u.ac.jp>
-
- * do-bunzip2.c: New file.
- * exec.c (check_bzip2): New function.
- (BZIP2): New cpp symbol. If defined, bunzip2 engine is enabled.
- * Makefile (bzip2-objects): New variable.
- (OBJS): Add bzip2-objects.
- (CPPFLAGS): Add -DBZIP2.
-
-1999-04-27 Roland McGrath <roland@baalperazim.frob.com>
-
- * exec.c (do_exec): Implement EXEC_SIGTRAP flag.
-
-1998-12-27 Roland McGrath <roland@baalperazim.frob.com>
-
- * main.c (S_exec_init): Deallocate PROCSERVER port when finished.
-
-1998-12-27 Roland McGrath <roland@baalperazim.frob.com>
-
- * main.c (S_exec_init): Remove variable DEV_MASTER; pass null instead
- since we don't need it. Use assert_perror on getting the host-priv
- port and on startup_essential_task, since init will hang until we've
- done made that RPC.
-
-1998-12-26 Roland McGrath <roland@baalperazim.frob.com>
-
- * exec.c (do_exec): Fix conditional for cleaning up INTERP,
- from nonnull E.interp.section to nonnull INTERP.file.
- If we failed to open the interpreter file, INTERP.file will be
- null and the rest of INTERP will be uninitialized.
-
-1998-12-21 Roland McGrath <roland@baalperazim.frob.com>
-
- * main.c (S_exec_init): Don't call set_active_trans.
- (set_active_trans): Function removed.
-
- * Makefile (HURDLIBS): Add missing implied library deps.
-
-1998-11-25 Mark Kettenis <kettenis@phys.uva.nl>
-
- * main.c (S_exec_init): Call _hurd_proc_init with new args set to
- zero.
-
- * hashexec.c (check_hashbang): Fix typo: interplen -> interp_len.
-
-Thu Nov 5 15:26:50 1998 Thomas Bushnell, BSG <tb@mit.edu>
-
- * hashexec.c (check_hashbang): Keep INTERP_LEN with the correct
- value (bytes of memory holding INTERP) for later use.
- (check_hashbang: setup_args): Set argv[0] from the interpreter
- name, not copied from the existing command line.
-
-1998-10-26 Roland McGrath <roland@baalperazim.frob.com>
-
- * hashexec.c: Use mach_* instead of __mach_*.
-
-1998-07-15 Roland McGrath <roland@baalperazim.frob.com>
-
- * exec.c (do_exec): Set boot->phdr_addr and boot->user_entry after
- loading, to addresses adjusted for actual run-time load address.
-
-Wed Aug 20 14:02:11 1997 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * main.c (main): New args for
- ports_manage_port_operations_multithread.
-
-1997-06-30 Miles Bader <miles@gnu.ai.mit.edu>
-
- * main.c (main): Arg parsing added.
- (argp_program_version): New variable.
- Include <argp.h>.
-
-Mon Jan 20 16:16:33 1997 Miles Bader <miles@gnu.ai.mit.edu>
-
- * hashexec.c (check_hashbang): `preempter' -> `preemptor'.
-
-Sat Nov 23 16:26:55 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * priv.h (mach_host_elf_machine): New prototype.
- * hostarch.c: Include "priv.h".
-
-Mon Nov 18 17:45:48 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * exec.c (load_section): If ANYWHERE, then make sure ADDR starts
- out at least past the first page, so that we don't take it. Then
- the library can (if desired) make the page no-access.
-
-Fri Nov 15 17:34:23 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * exec.c: Don't include <hurd/shared.h> any more.
-
- * main.c (S_exec_init): New arg syntax of trivfs_open.
-
-Mon Oct 7 21:31:25 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * exec.c (fake_seek): New function.
- (prepare): Initialize E->stream.__io_funcs.seek to fake_seek; this
- is called now that stdio doesn't assume it always knows the file
- position.
-
-Thu Sep 12 16:30:12 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * Makefile (HURDLIBS): New variable.
- (exec): Delete special dependencies.
-
-Thu Sep 5 11:11:19 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * main.c: Include <version.h>.
- (exec_version): Delete variable.
- (S_exec_init): Pass empty string as release; HURD_VERSION
- as version.
-
-Thu Aug 29 13:00:38 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * priv.h: Only include <bfd.h> if BFD. Only declare
- host_bfd_arc_info, and bfd_host_bfd if BFD. If not BFD, give
- typedef for asection.
- * main.c: Only define host_bfd_arch_info, host_bfd, and
- bfd_mach_host_arch_mach if BFD.
- (main): Only call bfd_mach_most_arch_mach if BFD.
- Call mach_host_elf_machine.
- * hostarch.c (bfd_mach_host_arch_mach): Only define if BFD.
- Delete arg E_MACHINE. All callers changed.
- (mach_host_elf_machine): New function.
-
-Sun Jul 7 21:13:22 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * exec.c (S_exec_exec): Don't use unsafe MOVE_SEND in call to
- interruptible exec_exec stub.
-
-Mon Jul 1 16:08:03 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * Makefile (DIST_FILES): Removed crash.c.
- * crash.c: Moved to ../trans.
-
-Thu Jun 20 15:43:51 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * Makefile (exec): Link against fshelp too now.
-
- * exec.c (do_exec): Call proc_setowner *after* possible
- proc_reassign; otherwise it modifies the stub process's state and
- not the real process's.
-
-Wed Jun 19 14:08:15 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * exec.c (do_exec, S_exec_exec): Pass 0 for new LOOKUP arg to
- hurd_file_name_lookup.
- * hashexec.c (hurd_file_name_path_lookup): Declaration removed.
- (check_hashbang): Pass 0 for new LOOKUP arg to hurd_file_name_lookup.
-
-Wed Jun 12 21:17:33 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * gzip.h (basename): Comment out declaration; it conflicts with
- libc's.
-
- * exec.c (do_exec): If secure, set the owner with proc_setowner.
-
-Fri May 10 16:47:11 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * hashexec.c (search_path): Don't make PATH or PFXED_NAME const.
-
-Fri May 10 09:20:26 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * exec.c (do_exec) [use1]: Use new auth_user_authenticate interface.
- * hashexec.c (check_hashbang) [userport/reauthenticate]: Likewise.
-
- * hashexec.c (check_hashbang) [setup_args/search_path]: Declare
- PATH to be `char const *'.
-
-Tue May 7 16:24:52 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
-
- * hashexec.c (check_hashbang): Use io_identity instead of io_stat to
- compare files.
-
-Mon May 6 14:26:41 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * main.c (exec_version): Upgrade to 0.0.
-
-Fri May 3 14:16:17 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
-
- * exec.c (map): Use F->__offset and F->__target properly.
-
-Thu May 2 10:21:37 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
-
- * exec.c (map): Fix fencepost error in check of current mapping
- window. Request round_page (LEN) bytes in io_read to avoid many small
- reads.
-
- * exec.c (do_exec): Terminate OLDTASK if we get an error after killing
- its threads and deallocating its address space.
-
-Tue Apr 30 11:36:25 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * exec.c (check_gzip) [ziprderr]: Treat all read errors as
- ENOEXEC. First off, because that's what they are; also because
- some callers of read_error don't set errno at all.
-
-Mon Apr 29 15:11:55 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * exec.c (check_section): If the format makes no sense, return
- ENOEXEC, not EINVAL.
- (check_bfd): Likewise.
- (check_elf): Likewise.
- (check_elf_phdr): Likewise.
- (do_exec): Likewise.
-
- * exec.c (do_exec): Use correct args to ports_create_port.
-
-Sat Apr 27 06:02:42 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
-
- * crash.c: Use ports_create_port instead of ports_allocate_port, and
- notice the error.
- * exec.c: Likewise.
-
-Tue Apr 23 18:53:54 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
-
- * hashexec.c (check_hashbang: user_port): Use default root port when
- secure.
-
-Mon Apr 15 12:48:35 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * Makefile (DIST_FILES): Add elfcore.c, crash.c, and exectrans.c.
- (SRCS): That's hashexec.c, not .o.
-
- * Makefile (exec-MIGSFLAGS): Look for execmutations.h in
- $(srcdir).
-
-Mon Apr 8 15:49:39 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * exec.c (prepare): If io_map returns EOPNOTSUPP, suppress the
- error, and still setup E's stream.
- (prepare_and_check): If prepare returns an error, do no more.
-
-Thu Mar 28 14:06:07 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * hashexec.c (check_hashbang): Pass open flags & mode args to
- hurd_file_name_path_lookup.
-
-Mon Feb 26 16:33:22 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * hashexec.c (check_hashbang): Correctly deal with interpreter
- lines having no argument.
-
-Sat Jan 13 12:28:03 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * hashexec.c (check_hashbang): Use hash_file_name_path_lookup()
- instead of doing the path search ourselves, and get rid of
- LOOKUP_CWDIR & associated logic.
- * exec.c (S_exec_exec): Use strdupa(). Also update use of
- hurd_file_name_lookup() [still probably not right though].
-
-Thu Jan 11 15:36:18 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * hashexec.c (check_hashbang): When using executable name found on
- the path, don't return alloca()ed memory from search_path(); use
- malloc() instead.
- Use envz_get() to search the environment.
-
- * exec.c (S_exec_exec): Use envz_get() to search the environment.
-
-Thu Jan 4 11:30:15 1996 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * exec.c (safe_bzero): Rewritten using hurd_catch_signal.
- * hashexec.c (check_hashbang): Rearrange arg frobbing code
- somewhat to use hurd_catch_signal instead of old preemption interface.
-
-Fri Dec 29 15:54:06 1995 Miles Bader <miles@gnu.ai.mit.edu>
-
- * exec.c (do_exec): Be careful not to look at BOOT after we
- release our reference on it.
- Correctly initialize BOOT->intarray in the case where NINTS <
- INIT_INT_MAX but we don't alloc a new array.
-
-Fri Dec 15 01:53:07 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * exec.c (map): Rearrange code to fix some bugs and not remap
- unless necessary.
- (input_room): Simplify.
- (check_elf): Extract all information from file header before
- calling `map' for program headers.
-
-Sat Nov 25 22:10:41 1995 Miles Bader <miles@gnu.ai.mit.edu>
-
- * crash.c (S_msg_sig_post_untraced): Also let the debugger have
- the process back if it's posting the crashing signal.
-
-Tue Nov 21 15:01:56 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * exec.c (safe_bzero): New function, broken out of load_section.
- (load_section): Call it.
-
- * main.c (going_down): Variable removed.
- (deadboot): Don't test it. Instead, use ports calls to check if
- there are no other live ports.
- (trivfs_goaway): Don't set it.
-
-Wed Nov 15 19:40:44 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * hashexec.c (user_port): Fixed port selection logic.
- (check_hashbang): Fixed PATH searching in script name guessing.
-
-Mon Nov 13 15:11:37 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * exec.c (S_exec_startup): Compatibility RPC removed.
-
- * exec.c (load_section): Catch faults while zeroing partial bss page.
-
-Sun Nov 5 00:15:07 1995 Miles Bader <miles@gnu.ai.mit.edu>
-
- * main.c (main): Add flags arg to trivfs_startup call.
-
-Wed Oct 25 15:50:38 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * exec.c (S_exec_startup_get_info): New function, modified from
- S_exec_startup.
- (S_exec_startup): Just call it.
- * main.c (exec_demuxer): Call exec_startup_server.
-
-Tue Oct 24 19:21:20 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * Makefile (OBJS): Add exec_startupServer.o.
-
- * priv.h (struct bootinfo): Use vm_size_t for phdr_size.
-
-Wed Oct 18 18:36:30 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * hashexec.c (check_hashbang: prepare_args): Enable and clean up
- code to guess the name of the script before resorting to /dev/fd.
-
-Wed Oct 18 03:05:05 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * hashexec.c: New file.
- * exec.c (struct execdata): Moved to priv.h.
- (std_*, finish): Make global.
- (do_exec): Only reset CWDIR when null, even if secure.
- Actually call check_hashbang and return success if it does.
- Use new hurd_file_name_lookup protocol with private callbacks to open
- interpreter file on behalf of client.
- Remove `bootout' label; use `stdout' or `out' as appropriate instead.
- At `out' label always deref BOOT, which cleans it up iff necessary.
- (S_exec_exec): #if 0 out $EXECSERVERS processing for time being.
- * priv.h: Added some #includes.
- (struct execdata): Moved here from exec.c.
- (std_*): Declare these.
- (finish, check_hashbang): Declare them.
- * Makefile (SRCS, OBJS): Add hashexec.[co].
- (DIST_FILES): Remove it from here.
-
-Wed Oct 11 01:45:32 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * main.c, priv.h, execmutations.h: New files.
- * exec.c: Server mechanics removed; now uses libtrivfs/libports.
- Main program split out into main.c.
- (std_lock): New variable (rwlock).
- (do_exec): Acquire reader lock to access std_ints and std_ports.
- (S_exec_setexecdata): Acquire writer lock to change them.
- * Makefile (OBJS): Add main.o; remove fsysServer.o, notifyServer.o.
- (LCLHDRS): Add priv.h and execmutations.h.
- (exec-MIGSFLAGS): New variable.
- (exec): Depend on livtrivfs, libthreads, libshouldbeinlibc.
-
-Mon Oct 2 10:33:14 1995 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * exec.c (do_exec): Doc fix.
-
-Wed Sep 27 11:21:19 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * exec.c (do_exec): Don't set NEWTASK's bootstrap port until after
- we have finished completely with OLDTASK.
- (do_mach_notify_no_senders): Remove bogus mod_refs call on
- receive_portset.
-
-Wed Sep 20 19:57:55 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * exec.c (struct bootinfo): New members `phdr_addr', `phdr_size',
- `user_entry'.
- (do_exec): Set them. Code rearranged to construct bootinfo before
- looking up interpreter file, keep proper track of port rights and
- VM copied into bootinfo (there were leaks).
-
-Sat Sep 16 13:15:42 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * Makefile: Remove vpath directive.
-
-Fri Sep 8 17:50:03 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * Makefile (OTHERLIBS, CPPFLAGS): Disable bfd by default.
-
-Mon Aug 28 16:57:14 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * exec.c (S_fsys_forward): New stub function.
-
-Sun Jul 30 23:49:49 1995 Michael I. Bushnell, p/BSG <mib@geech.gnu.ai.mit.edu>
- * Makefile (SRCS): Added unzip.c, util.c, and inflate.c.
-
-Thu Jul 6 15:32:39 1995 Michael I Bushnell <mib@duality.gnu.ai.mit.edu>
-
- * hostarch.c (bfd_mach_host_arch_mach): Remove assignment from
- inside if test.
-
- * Makefile: Removed dependencies that are now automatically
- generated.
-
-Wed Jul 5 18:00:49 1995 Michael I Bushnell <mib@duality.gnu.ai.mit.edu>
-
- * Makefile (OTHERLIBS): Define var.
- (all, exec): Delete targets.
-
-Tue Jun 27 11:48:08 1995 Michael I Bushnell <mib@duality.gnu.ai.mit.edu>
-
- * exec.c (load_section): Remove assignments from if tests.
- (map): Likewise.
- (prepare): Likewise.
- (load): Likewise.
- (servercopy): Likewise.
- (do_exec): Likewise.
- (S_exec_setexecdata): Likewise.
- (S_exec_exec): Put extra parens around assignment inside while
- test.
-
-Thu Jun 8 02:57:28 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * exec.c (struct execdata.info.elf): Add members `anywhere' and
- `loadbase'.
- (load_section): Use them; if `anywhere' set, load the section anywhere.
- Record load address in `loadbase'.
- (check_elf): Initialize `anywhere' and `loadbase'.
- (postload): Merged into load.
- (load): Perform postload functionality here, after calling
- finish_mapping.
- (finish): Take new flag arg; deallocate file port only if set.
- (do_exec): Pass flag to finish appropriately.
- Don't call finish_mapping and postload after load. KLUDGE: Load
- the interpreter before the program instead of after.
-
-Mon Jun 5 06:42:33 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * exec.c: Majorly revamped: Now supports the ELF format directly.
- Secondarily uses the BFD library #ifdef BFD. Supports gunzipping
- only #ifdef GZIP.
- * hostarch.c: Rewritten to unconditionally return both BFD and ELF
- machine types.
-
-Fri May 12 18:59:21 1995 Miles Bader <miles@churchy.gnu.ai.mit.edu>
-
- * exec.c (S_fsys_set_options, S_fsys_mod_readonly): Change from
- mod_readonly to set_options.
-
-Thu Apr 20 22:14:47 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * exec.c (check_gzip): Rewind the stream before calling
- `get_method'. Open a new BFD on the uncompressed data stream
- before return.
-
-Sun Apr 9 01:27:10 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * exec.c (struct execdata) [BFD]: New member `interp_section'.
- (check_section): Notice section named ".interp" and set that pointer.
- (load_section): Do nothing if the section is zero size.
- When reading into our copy of the overlap page, don't read past
- the end of the section.
- (do_exec): Consolidate new subfunction `check_maybe_gzip'.
- If there is an interpreter section, load the interpreter file too,
- and use its entry point instead of the user program's. Cleaned up
- and made more robust deallocation of BOOT info on error.
- (deadboot): New function, split out of do_mach_port_notify_no_senders.
-
- * Makefile (vpath lib%.a): Add search path.
- (exec): Depend on -lbfd and -liberty.
- (CPPFLAGS): Append -DBFD; omit -DA_OUT_H=...
- (bfdexec): Target removed.
- * exec.c (load_section): fseek to desired position before freading.
- (input_room): Always map a page-aligned region.
-
-Thu Feb 9 01:01:57 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * exec.c (check_section): Don't check SEC_RELOC flag.
-
-Wed Feb 8 19:48:11 1995 Michael I Bushnell <mib@duality.gnu.ai.mit.edu>
-
- * exec.c (load_section) [BFD]: BFD does not set SEC_HAS_CONTENTS
- on a.out BSS's ever; don't make zeroing of bss conditional on that.
- It's not clear exactly what SEC_HAS_CONTENTS is for anyhow;
- perhaps the Right Thing is to set in on BSS. In any case, don't
- depend on this flag here.
-
-Sat Jan 28 17:08:02 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * exec.c (prepare): Give the stream a seek function.
-
-Sun Jan 22 03:16:17 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * exec.c: Update BFD code; it works now.
- * hostarch.c [BFD]: Fix prototype.
-
-Thu Jan 19 01:24:18 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * hostarch.c: Add case for CPU_TYPE_ALPHA.
-
- * hostarch.c (bfd_mach_host_arch_mach, aout_mach_host_machine):
- Use mach_msg_type_number_t instead of unsigned int. Cast
- &HOSTINFO to (natural_t *).
-
-Sun Jan 15 06:29:56 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * exec.c [BFD] (bfd_mach_host_arch_mach): In decl, MACHINE arg is
- `long int *' now.
- [BFD] (host_bfd_arch_info): New variable.
- [BFD] (host_bfd): Initialize `arch_info' member to its address.
- (check) [BFD]: Use bfd_arch_get_compatible properly, rather than the
- nonexistent bfd_arch_compatible.
- (main) [BFD]: Fill in host_bfd.arch_info instead of old
- `obj_machine' and `obj_archiecture' members, which BFD no longer has.
- * hostarch.c [BFD] (bfd_mach_host_arch_mach): MACHINE arg is `long
- int *' now.
-
-Tue Dec 13 23:28:08 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * Makefile (OBJS): Add unzip.o util.o inflate.o.
- (LCLHDRS): Add gzip.h crypt.h tailor.h.
- (unzip.o util.o inflate.o): Depend on those.
- (CFLAGS): Use +=.
- * inflate.c, unzip.c, util.c, tailor.h, gzip.h, crypt.h: New files.
-
-Sun Dec 11 19:49:01 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * exec.c (struct execdata): New members `headbuf', `file_data',
- `optimal_block'.
- (load_section): Copy data from U->file_data if that is nonnull.
- Use new subfunction `write_to_task' that handles non-page aligned
- sections.
- (input_room): Fix EOF check.
- Use io_read if no memory object.
- (prepare): New function, broken out of check.
- Initialize E->file_data and E->optimal_block. Set
- E->stream.__seen bit.
- (check): No longer take FILE arg.
- Use E->file_data if nonnull; else read from stream if no memory object.
- (finish_mapping): Reset members after deallocating resources.
- (finish): Likewise. Call fclose. Don't deallocate E->header if
- it points to &E->headbuf or E->file_data.
- (check_gzip): New function, implements executing gzip'd binaries.
- (do_exec): Call prepare before check.
- Call check_gzip if file format unrecognized.
-
-Wed Nov 9 01:40:28 1994 Michael I Bushnell <mib@geech.gnu.ai.mit.edu>
-
- * exec.c (set_active_trans): Don't deallocate EXECNODE here to
- work around a ufs bug.
-
- * exec.c: Include <hurd/paths.h> and <fcntl.h>.
- (set_active_trans): New function.
- (S_exec_init): Call set_active_trans.
-
-Wed Aug 31 11:16:04 1994 Michael I Bushnell <mib@geech.gnu.ai.mit.edu>
-
- * exec.c (load_section): Pass address of stream in call to fread.
- (input_room): Cast second arg to vm_deallocate. Dereference F
- in setting __error member.
- (close_exec_stream): Provide all three args to vm_deallocate
- and cast the second one properly.
-
-Wed Aug 31 04:32:26 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * exec.c (do_exec): Do check before task_suspend.
- #if 0'd out: If check gets ENOEXEC, call check_hashbang.
- (struct execdata): Move member `stream' outside of [BFD].
- (load_section): Use fread instead of hand mapping and copying
- unconditionally (was [BFD]); old code left #if'd out.
- (close_exec_stream): Renamed from close_stdio_bfd; moved out of [BFD].
- (input_room): Define unconditionally, not [BFD].
- (check): Set up E->stream unconditionally.
-
-Tue Aug 30 11:58:27 1994 Michael I Bushnell <mib@geech.gnu.ai.mit.edu>
-
- * exec.c (S_fsys_syncfs, S_fsys_mod_readonly): New stubs.
-
- * exec.c (set_init_port): Use new authentication protocol.
-
- * exec.c (S_exec_exec): Call hurd_file_name_lookup instead
- of hurd_path_lookup.
-
- * exec.c (S_fsys_getroot): Return FS_RETRY_NORMAL instead
- of FS_RETRY_NONE.
-
- * exec.c (procserver): New global variable.
- (S_exec_init): Set procserver.
- (do_exec): Use `procserver' instead of USEPORT macro.
- (S_exec_init): Likewise.
-
-Mon Aug 29 13:08:44 1994 Michael I Bushnell <mib@geech.gnu.ai.mit.edu>
-
- * exec.c (do_exec): Enable and fix up code for doing proc_reassign
- in the EXEC_NEWTASK case.
- (do_exec): If we don't provide the proc port, and this is a
- newtask exec, then use the proc port to fetch a new one
- corresponding to the new task.
-
-Wed Aug 17 14:59:58 1994 Michael I Bushnell <mib@geech.gnu.ai.mit.edu>
-
- * exec.c (S_exec_exec): Bother to pass flags to do_exec.
-
- * exec.c (essentialstartupport, essentialhostport): Deleted vars.
- (S_exec_init): Do startup_essential_task here like before, but
- make sure we do it last.
- (S_exec_setexecdata): Don't do startup_essential_task here.
-
-Tue Aug 16 10:02:50 1994 Michael I Bushnell <mib@geech.gnu.ai.mit.edu>
-
- * exec.c (set_init_port): Don't assume that MACH_PORT_NULL == 0.
- (do_exec): Likewise.
-
-Mon Aug 15 21:23:13 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * exec.c: Include <unistd.h> for getpid decl.
- (set_init_port): Use pid_t for PID.
- (S_exec_init): Pass poly arg to proc_execdata_notify.
-
-Mon Aug 15 15:24:45 1994 Michael I Bushnell <mib@geech.gnu.ai.mit.edu>
-
- * exec.c (do_exec): Finish implementing EXEC_SECURE flag;
- implement EXEC_DEFAULTS flag.
- (S_exec_init): Delay startup_essential_task until after
- we've received the first essential ports from the proc server.
- (essentialstartupport essentialhostport): New global vars.
-
-Fri Jul 22 10:21:30 1994 Michael I Bushnell <mib@geech.gnu.ai.mit.edu>
-
- * Makefile: Rewritten in accord with new scheme.
- * exec.c: Include "exec_S.h" instead of "exec_server.h".
- Include "notify_S.h".
-
-Tue Jul 19 20:51:58 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
-
- * Makefile (exec_server.h execServer.c, fsys_S.h fsysServer.c):
- Find .defs file in ../hurd, not $(includedir).
-
-Tue Jul 19 12:42:32 1994 Michael I Bushnell (mib@churchy.gnu.ai.mit.edu)
-
- * exec.c (S_fsys_getroot): New arg `dotdot'; don't do anything
- with it.
- (S_fsys_startup): Removed dotdot args.
- (main): Deleted var `dotdot'; don't expect it from fsys_startup.
-
- * Makefile (exec): Don't use variable $(link) anymore.
-
-Tue Jul 5 14:20:15 1994 Michael I Bushnell (mib@churchy.gnu.ai.mit.edu)
-
- * Makefile (SRCS, TAGSHDRS): New variables.
-
-Fri Jun 24 14:42:59 1994 Michael I Bushnell (mib@churchy.gnu.ai.mit.edu)
-
- * exec.c (load_section) [AOUT, mapstart > addr]: Dereference
- U->header in use of N_MAGIC.
-
-Fri Jun 24 02:40:32 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
-
- * exec.c (load_section): Store protection of section in new local
- VM_PROT. If vm_write of overlap page gets KERN_PROTECTION_FAILURE,
- change protection of overlap page long enough to write it.
- [AOUT]: Return ENOEXEC if there is overlap in NMAGIC or ZMAGIC.
-
-Thu Jun 16 16:15:17 1994 Michael I Bushnell (mib@geech.gnu.ai.mit.edu)
-
- * exec.c (S_fsys_getroot): Implement new fsys_getroot interface.
-
-Mon Jun 13 04:06:24 1994 Roland McGrath (roland@geech.gnu.ai.mit.edu)
-
- * exec.c (check): Store FILE in E->file.
-
-Tue May 31 17:20:24 1994 Roland McGrath (roland@geech.gnu.ai.mit.edu)
-
- * a.out.h (struct exec): Type removed.
- (OMAGIC, NMAGIC, ZMAGIC, N_MAGIC, N_MACHTYPE, N_BADMAG): Macros
- removed. Just #include "a.out.gnu.h" to get all these defined.
- (N_TXTLEN, N_TXTOFF): Use N_MAGIC instead of a_magic member.
-
- * Makefile (DIST_FILES): Add a.out.gnu.h.
- (exec.o, hostarch.o): Depend on a.out.gnu.h.
-
-Fri May 27 01:40:04 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
-
- * exec.c (servercopy): New function to check the servercopy flag
- and possibly vm_allocate a copy of argument data.
- (do_exec): Take new args DTABLE_COPY, PORTARRAY_COPY,
- INTARRAY_COPY. Use servercopy for ARGV, ENVP, DTABLE, PORTARRAY,
- and INTARRAY.
- (S_exec_exec): Take those new args and pass them to do_exec.
- (S_exec_setexecdata): Take new args PORTS_COPY and INTS_COPY.
- Use servercopy for PORTS and INTS.
- (S_exec_startup): Never copy from info in *BOOT, always just set
- the argument pointers to the pointers in *BOOT. MiG will copy and
- deallocate the space as necessary.
-
- * exec.c (check): Lock and unlock E->cntl->lock properly.
- (finish_mapping): New function, broken out of finish.
- (postload_section): New function, broken out of load_section.
- (postload): New function, like load but calls postload_section.
- (do_exec): Call finish_mapping and postload between load and finish.
-
-Tue May 24 19:49:16 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
-
- * exec.c (S_exec_exec): Use strsep instead of strtok.
- (main): Keep looping after error from mach_msg_server.
-
-Tue May 24 14:22:16 1994 Michael I Bushnell (mib@churchy.gnu.ai.mit.edu)
-
- * exec.c (load_section): Cast arg to vm_deallocate properly.
-
-Tue May 24 01:05:08 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
-
- * exec.c (struct bootinfo): Remove members argv_vmalloc, envp_vmalloc.
- (do_exec): Don't set BOOT->argv_vmalloc or BOOT->envp_vmalloc. If
- ARGV_COPY is set, vm_allocate space for ARGV; likewise for
- ENVP_COPY and ENVP.
- (S_exec_startup): Don't test BOOT->argv_vmalloc and
- BOOT->envp_vmalloc; BOOT->argv and BOOT->envp are always vm_allocate'd.
- (do_mach_notify_no_senders): Likewise.
- (load_section): Handle non-bss sections that are not page aligned.
-
-Mon May 23 22:01:11 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
-
- * exec.c (S_exec_exec): Reverse args to memmem.
- (do_exec): Don't vm_deallocate DEALLOCNAMES or DESTROYNAMES; mig
- deallocates the space for us.
-
-Tue May 17 13:33:41 1994 Michael I Bushnell (mib@churchy.gnu.ai.mit.edu)
-
- * exec.c (S_exec_init): Don't deallocate host_priv until after
- we've used it in the call to startup_essential_task.
-
-Thu May 12 03:53:57 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
-
- * exec.c (S_fsys_init): Add reply port args.
-
-Wed May 11 16:03:07 1994 Michael I Bushnell (mib@geech.gnu.ai.mit.edu)
-
- * exec.c (S_exec_init): Spelling fix.
-
- * Makefile (exec.o): Add dependencies on fsys_S.h and notify_S.h.
- (fsysServer.c, notifyServer.c): Notice that these rules build
- fsys_S.h and notify_S.h respectively.
-
-Mon May 9 17:06:52 1994 Michael I Bushnell (mib@geech.gnu.ai.mit.edu)
-
- * exec.c (exec_version, save_argv): New variable.
- (main): Set save_argv.
- (S_exec_init): Give the real argv to proc.
- Call proc_register_version if we can.
- (S_exec_init): Call startup_essential_task if we can.
-
-Thu May 5 06:25:02 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
-
- * Makefile: Change uses of $(headers) to $(includedir).
-
- * exec.c: Change return type of all RPC server functions to
- kern_return_t. error_t is not compatible with the declarations in
- the mig-generated header files.
-
- * exec.c (do_exec): Set BOOT->stack_base and BOOT->stack_size with
- mach_setup_thread.
- (S_exec_exec): Pass msg type arg for FILE arg to exec_exec.
-
-Thu Dec 23 18:05:04 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
-
- * exec.c (do_exec): For a newtask exec when EXEC_SECURE is not set
- and OLDTASK is not null, send the `task_create' RPC on OLDTASK
- rather than mach_task_self ().
diff --git a/exec/Makefile b/exec/Makefile
index 9b318e8a..e7050c10 100644
--- a/exec/Makefile
+++ b/exec/Makefile
@@ -1,4 +1,4 @@
-# Copyright (C) 1993,94,95,96,98,99,2000,01,02 Free Software Foundation, Inc.
+# Copyright (C) 1993,94,95,96,98,99,2000,01,02,10 Free Software Foundation, Inc.
# This file is part of the GNU Hurd.
#
# The GNU Hurd is free software; you can redistribute it and/or modify
@@ -18,12 +18,16 @@
dir := exec
makemode := server
-SRCS = exec.c main.c hashexec.c hostarch.c unzip.c util.c inflate.c
+SRCS = exec.c main.c hashexec.c hostarch.c \
+ $(gzip-sources) $(bzip2-sources)
OBJS = main.o hostarch.o exec.o hashexec.o \
execServer.o exec_startupServer.o \
$(gzip-objects) $(bzip2-objects)
-gzip-objects = unzip.o util.o inflate.o
-bzip2-objects = do-bunzip2.o
+gzip-sources = unzip.c util.c inflate.c
+gzip-objects = $(gzip-sources:%.c=%.o)
+bzip2-sources = do-bunzip2.c
+bzip2-objects = $(bzip2-sources:%.c=%.o)
+
LCLHDRS = gzip.h crypt.h tailor.h priv.h execmutations.h
target = exec
#targets = exec exec.static
diff --git a/exec/do-bunzip2.c b/exec/do-bunzip2.c
index 17bbf911..716a0cde 100644
--- a/exec/do-bunzip2.c
+++ b/exec/do-bunzip2.c
@@ -150,7 +150,7 @@ bz2_fclose (void *stream)
with *all* the algorithms contained herein, and with the
consequences of modifying them, you should NOT meddle with the
compression or decompression machinery. Incorrect changes can
- and very likely *will* lead to disasterous loss of data.
+ and very likely *will* lead to disastrous loss of data.
DISCLAIMER:
I TAKE NO RESPONSIBILITY FOR ANY LOSS OF DATA ARISING FROM THE
diff --git a/exec/elfcore.c b/exec/elfcore.c
index 0bbe7653..f953cc76 100644
--- a/exec/elfcore.c
+++ b/exec/elfcore.c
@@ -1,5 +1,5 @@
/* Write ELF core dump files for GNU Hurd.
- Copyright (C) 2002, 2004 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2004, 2008 Free Software Foundation, Inc.
Written by Roland McGrath.
This file is part of the GNU Hurd.
@@ -121,8 +121,10 @@ fetch_thread_fpregset (thread_t thread, prfpregset_t *fpregs)
#endif
-#define TIME_VALUE_TO_TIMESPEC(tv, ts) \
- TIMEVAL_TO_TIMESPEC ((struct timeval *) (tv), (ts))
+#define TIME_VALUE_TO_TIMESPEC(tv, ts) { \
+ (ts)->tv_sec = (tv)->seconds; \
+ (ts)->tv_nsec = (tv)->microseconds * 1000; \
+}
#define PAGES_TO_KB(x) ((x) * (vm_page_size / 1024))
#define ENCODE_PCT(f) ((uint16_t) ((f) * 32768.0))
@@ -380,9 +382,13 @@ dump_core (task_t task, file_t file, off_t corelimit,
TIME_VALUE_TO_TIMESPEC (&pi->taskinfo.system_time,
&pstatus.data.pr_stime);
/* Sum the user and system time for pr_time. */
- timeradd ((const struct timeval *) &pi->taskinfo.user_time,
- (const struct timeval *) &pi->taskinfo.system_time,
- (struct timeval *) &pi->taskinfo.user_time);
+ pi->taskinfo.user_time.seconds += pi->taskinfo.system_time.seconds;
+ pi->taskinfo.user_time.microseconds += pi->taskinfo.system_time.microseconds;
+ if (pi->taskinfo.user_time.microseconds >= 1000000)
+ {
+ ++pi->taskinfo.user_time.seconds;
+ pi->taskinfo.user_time.microseconds -= 1000000;
+ }
TIME_VALUE_TO_TIMESPEC (&pi->taskinfo.user_time, &psinfo.data.pr_time);
/* XXX struct procinfo should have dead child info for pr_c[us]?time */
diff --git a/exec/exec.c b/exec/exec.c
index 05dc883e..4c2fcec1 100644
--- a/exec/exec.c
+++ b/exec/exec.c
@@ -233,11 +233,12 @@ load_section (void *section, struct execdata *u)
u->error = (page == -1) ? errno : 0;
if (! u->error)
{
- memcpy ((void *) page, /* XXX/fault */
+ u->error = hurd_safe_copyin ((void *) page, /* XXX/fault */
(void *) (contents + (size - off)),
off);
- u->error = vm_write (u->task, mapstart + (size - off),
- page, vm_page_size);
+ if (! u->error)
+ u->error = vm_write (u->task, mapstart + (size - off),
+ page, vm_page_size);
munmap ((caddr_t) page, vm_page_size);
}
}
@@ -339,7 +340,10 @@ load_section (void *section, struct execdata *u)
const void *contents = map (u, filepos, readsize);
if (!contents)
goto maplose;
- memcpy (readaddr, contents, readsize); /* XXX/fault */
+ u->error = hurd_safe_copyin (readaddr, contents,
+ readsize); /* XXX/fault */
+ if (u->error)
+ goto maplose;
}
u->error = vm_write (u->task, overlap_page, ourpage, size);
if (u->error == KERN_PROTECTION_FAILURE)
@@ -443,7 +447,9 @@ map (struct execdata *e, off_t posn, size_t len)
else if (posn + len > size)
/* The requested data wouldn't fit in the file. */
return NULL;
- else if (e->filemap == MACH_PORT_NULL)
+ else if (e->file_data != NULL) {
+ return e->file_data + posn;
+ } else if (e->filemap == MACH_PORT_NULL)
{
/* No mapping for the file. Read the data by RPC. */
char *buffer = map_buffer (e);
@@ -519,7 +525,10 @@ prepare_stream (struct execdata *e)
e->map_filepos = 0;
}
-static void prepare_in_memory (struct execdata *e) {}
+static void prepare_in_memory (struct execdata *e)
+{
+ prepare_stream(e);
+}
#else
@@ -726,6 +735,9 @@ prepare (file_t file, struct execdata *e)
e->interp.section = NULL;
+ /* Initialize E's stdio stream. */
+ prepare_stream (e);
+
/* Try to mmap FILE. */
e->error = io_map (file, &rd, &wr);
if (! e->error)
@@ -790,9 +802,6 @@ prepare (file_t file, struct execdata *e)
e->file_size = st.st_size;
e->optimal_block = st.st_blksize;
}
-
- /* Initialize E's stdio stream. */
- prepare_stream (e);
}
/* Check the magic number, etc. of the file.
@@ -991,7 +1000,9 @@ finish_mapping (struct execdata *e)
}
}
-/* Clean up after reading the file (need not be completed). */
+/* Clean up after reading the file (need not be completed).
+ Note: this may be called several times for the E, so it must take care
+ of checking what was already freed. */
void
finish (struct execdata *e, int dealloc_file)
{
@@ -1008,10 +1019,13 @@ finish (struct execdata *e, int dealloc_file)
#ifdef EXECDATA_STREAM
fclose (&e->stream);
#else
- if (e->file_data != NULL)
+ if (e->file_data != NULL) {
free (e->file_data);
- else if (map_buffer (e) != NULL)
+ e->file_data = NULL;
+ } else if (map_buffer (e) != NULL) {
munmap (map_buffer (e), map_vsize (e));
+ map_buffer (e) = NULL;
+ }
#endif
}
if (dealloc_file && e->file != MACH_PORT_NULL)
@@ -1047,7 +1061,7 @@ load (task_t usertask, struct execdata *e)
if (e->info.elf.phdr[i].p_type == PT_LOAD)
load_section (&e->info.elf.phdr[i], e);
- /* The entry point address is relative to whereever we loaded the
+ /* The entry point address is relative to wherever we loaded the
program text. */
e->entry += e->info.elf.loadbase;
}
@@ -1142,7 +1156,11 @@ check_gzip (struct execdata *earg)
return -1;
}
n = MIN (maxread, map_buffer (e) + map_fsize (e) - contents);
- memcpy (buf, contents, n); /* XXX/fault */
+ errno = hurd_safe_copyin (buf, contents, n); /* XXX/fault */
+ if (errno)
+ longjmp (ziperr, 2);
+
+ zipread_pos += n;
return n;
}
void zipwrite (const char *buf, size_t nwrite)
@@ -1202,8 +1220,6 @@ check_gzip (struct execdata *earg)
/* The output is complete. Clean up the stream and store its resultant
buffer and size in the execdata as the file contents. */
fclose (zipout);
- e->file_data = zipdata;
- e->file_size = zipdatasz;
/* Clean up the old exec file stream's state.
Now that we have the contents all in memory (in E->file_data),
@@ -1211,6 +1227,8 @@ check_gzip (struct execdata *earg)
finish (e, 0);
/* Prepare the stream state to use the file contents already in memory. */
+ e->file_data = zipdata;
+ e->file_size = zipdatasz;
prepare_in_memory (e);
}
#endif
@@ -1248,7 +1266,11 @@ check_bzip2 (struct execdata *earg)
return -1;
}
n = MIN (maxread, map_buffer (e) + map_fsize (e) - contents);
- memcpy (buf, contents, n); /* XXX/fault */
+ errno = hurd_safe_copyin (buf, contents, n); /* XXX/fault */
+ if (errno)
+ longjmp (ziperr, 2);
+
+ zipread_pos += n;
return n;
}
void zipwrite (const char *buf, size_t nwrite)
@@ -1297,8 +1319,6 @@ check_bzip2 (struct execdata *earg)
/* The output is complete. Clean up the stream and store its resultant
buffer and size in the execdata as the file contents. */
fclose (zipout);
- e->file_data = zipdata;
- e->file_size = zipdatasz;
/* Clean up the old exec file stream's state.
Now that we have the contents all in memory (in E->file_data),
@@ -1306,6 +1326,8 @@ check_bzip2 (struct execdata *earg)
finish (e, 0);
/* Prepare the stream state to use the file contents already in memory. */
+ e->file_data = zipdata;
+ e->file_size = zipdatasz;
prepare_in_memory (e);
}
#endif
@@ -1881,8 +1903,6 @@ do_exec (file_t file,
proc_reassign (proc, newtask);
mach_port_deallocate (mach_task_self (), proc);
}
-
- mach_port_deallocate (mach_task_self (), oldtask);
}
/* Make sure the proc server has the right idea of our identity. */
diff --git a/exec/hashexec.c b/exec/hashexec.c
index f880983d..2aa3844b 100644
--- a/exec/hashexec.c
+++ b/exec/hashexec.c
@@ -127,12 +127,16 @@ check_hashbang (struct execdata *e,
name, flags, 0, result);
}
- const char *page = map (e, 0, 2);
+ const char *page;
char interp_buf[vm_page_size - 2 + 1];
+ e->error = 0;
+ page = map (e, 0, 2);
+
if (!page)
{
- e->error = errno;
+ if (!e->error)
+ e->error = ENOEXEC;
return;
}
diff --git a/ext2fs/ChangeLog b/ext2fs/ChangeLog
deleted file mode 100644
index b6fe57b9..00000000
--- a/ext2fs/ChangeLog
+++ /dev/null
@@ -1,1353 +0,0 @@
-2005-07-12 Marcus Brinkmann <marcus@gnu.org>
-
- * pager.c (diskfs_get_filemap): Initialize upi->max_prot to PROT.
-
-2004-11-08 Ognyan Kulev <ogi@fmi.uni-sofia.bg>
-
- * storeinfo.c (diskfs_S_file_get_storage_info): Cast -1 to
- store_offset_t in conditional operator, instead of implicitly cast
- to uint32_t.
-
-2004-01-10 Roberto Reale <rreale@iol.it>
-
- * ext2fs.h (ext2_getblk): Fix typo in comment.
- * getblk.c (ext2_getblk): Likewise.
- * dir.c (diskfs_get_directs): Likewise.
-
-2002-10-08 Roland McGrath <roland@frob.com>
-
- * ext2fs.h (struct disknode): New member `info_i_translator'.
- * inode.c (diskfs_set_translator): Update NP->dn->info_i_translator.
- * ialloc.c (diskfs_alloc_node): Clear a nonzero translator block in
- the on-disk inode just as we do for data blocks.
-
-2002-07-31 Roland McGrath <roland@frob.com>
-
- * dir.c (diskfs_direnter_hard): Fix test in last change.
-
-2002-06-08 Roland McGrath <roland@frob.com>
-
- * inode.c (diskfs_cached_lookup): Use ino_t for argument.
-
- * ialloc.c (diskfs_free_node): Use %Ld format for ino_t/off_t values.
- * pager.c (diskfs_grow, pager_unlock_page): Likewise.
- * inode.c (read_node): Likewise.
- * dir.c (diskfs_get_directs): Likewise.
-
- * dir.c (diskfs_direnter_hard): Use size_t for OLDSIZE.
- Fail with EOVERFLOW when it would exceed that width.
-
-2002-04-05 Neal H Walfield <neal@cs.uml.edu>
-
- * pager.c (diskfs_grow): Correctly recalculate NEW_SIZE.
-
-2002-05-29 Roland McGrath <roland@frob.com>
-
- * dir.c (dirscanblock): Use %z format.
- (diskfs_get_directs): Likewise.
- * ext2fs.c (main): Likewise.
- * hyper.c (get_hypermetadata): Likewise.
- * pager.c (pager_unlock_page): Likewise.
-
-2002-05-28 Roland McGrath <roland@frob.com>
-
- * ext2fs.c (diskfs_append_args): unsigned -> size_t
- * dir.c (count_dirents): int -> size_t
- (diskfs_get_directs): u_int -> size_t
-
-2001-11-20 Neal H Walfield <neal@cs.uml.edu>
-
- * ext2fs.c (diskfs_synchronous): Removing superfluous zero initializer.
- (store): Likewise.
- (store_parsed): Likewise.
- (diskfs_disk_name): Likewise.
- (ext2_debug_flag): Likewise.
-
-2002-04-01 Neal H Walfield <neal@cs.uml.edu>
-
- * pager.c (diskfs_grow): Fix inverted logic.
-
-2001-11-20 Neal H Walfield <neal@cs.uml.edu>
-
- * pager.c (MAX_FREE_PAGE_BUFS): Remove obsolete macro.
- (FREE_PAGE_BUFS): New macro.
-
- (free_page_bufs_lock): Make this global variable local to
- get_page_buf.
- (free_page_bufs): Likewise.
- (num_free_page_bufs): Likewise.
-
- (get_page_buf): Reimplement using a new caching algorithm
- based on preallocation of COW zero pages.
- (free_page_buf): Likewise.
-
- (find_block): Documentation fixes.
-
-2002-03-11 Roland McGrath <roland@frob.com>
-
- * Makefile (ext2fs.static): Depend on
- $(boot-store-types:%=../libstore/libstore_%.a).
-
-2002-01-03 Roland McGrath <roland@frob.com>
-
- * inode.c (write_node): Never clear i_translator here.
- That is only done by diskfs_set_translator.
-
-2001-11-21 Roland McGrath <roland@frob.com>
-
- * inode.c (read_node): Just always call getpid for the fsid value.
-
-2001-08-17 Marcus Brinkmann <marcus@gnu.org>
-
- * ialloc.c (diskfs_alloc_node): Remove warnings about stale
- nonzero st_blocks or st_size.
-
-2001-08-16 Roland McGrath <roland@frob.com>
-
- * inode.c (write_node): Leave i_size, i_blocks, i_translator unchanged
- when the inode has been deleted. Suggested by Marcus Brinkmann.
-
- * dir.c (diskfs_dirremove_hard): Remove redundant DP->dn_set_mtime set.
- Noticed by Marcus Brinkmann.
-
-2001-08-09 Roland McGrath <roland@frob.com>
-
- * inode.c (diskfs_get_translator): Fail with EFTYPE if the length
- field stored on disk is unreasonable. Don't crash on ENOMEM.
- Use memcpy instead of bcopy.
-
-2001-06-09 Mark Kettenis <kettenis@gnu.org>
-
- * inode.c (diskfs_set_statfs): If number of free blocks is less
- than the number of reserved blocks, set the number of available
- blocks to 0.
-
-2001-03-03 Roland McGrath <roland@frob.com>
-
- * hyper.c (zeroblock, modified_global_blocks): Remove superfluous
- zero initializers.
- (allocate_mod_map): Likewise for static here.
- (get_hypermetadata): Don't munmap old ZEROBLOCK, just keep it.
- Allocate ZEROBLOCK with PROT_READ.
-
-2001-02-28 Roland McGrath <roland@frob.com>
-
- * dir.c (count_dirents): Check for bogus rec_len having pushed us past
- the end.
-
-2001-01-08 Marcus Brinkmann <marcus@gnu.org>
-
- * ext2fs.c (main): Use %Ld instead %ld to print store->size.
- * hyper.c (get_hypermetadata): Likewise.
-
-2001-01-07 Marcus Brinkmann <marcus@gnu.org>
-
- * dir.c: Make diskfs_dirstat_size const.
-
-2000-12-21 Marcus Brinkmann <marcus@gnu.org>
-
- * pager.c: Include <errno.h>.
- (create_disk_pager): Panic if malloc fails.
- Reported by Igor Khavkine <i_khavki@alcor.concordia.ca>.
-
- * inode.c (diskfs_get_translator): If malloc fails, set err to ENOMEM.
- Initialize err with 0, and return it at the end of the function.
- Reported by Igor Khavkine <i_khavki@alcor.concordia.ca>.
-
-2000-12-02 Roland McGrath <roland@frob.com>
-
- * inode.c (write_all_disknodes): Call diskfs_set_node_times after
- pokel_sync, since it might delay a little.
- (write_node): Remove assert that dn_set_mtime et al are clear.
- It is ok if they are set in parallel, because the latter setting
- will be carried out eventually.
-
-2000-10-01 Roland McGrath <roland@frob.com>
-
- * truncate.c (diskfs_truncate): Use & instead of %.
-
-2000-11-30 Marcus Brinkmann <marcus@gnu.org>
-
- * dir.c (diskfs_lookup_hard): If name is too long, clear
- DS before returning ENAMETOOLONG.
-
-2000-10-01 Roland McGrath <roland@frob.com>
-
- * inode.c (write_node): Use memcpy instead of a loop.
-
-2000-07-26 Mark Kettenis <kettenis@gnu.org>
-
- * Makefile (HURDLIBS): Reorder libs such that the threads lib
- comes before the ports lib. This makes sure the functions in
- libthreads properly override the stubs in libports with the new
- dynamic linker semantics in glibc 2.2.
-
-2000-07-26 Marcus Brinkmann <marcus@gnu.org>
-
- * truncate.c (trunc_indirect): Add missing argument to
- pager_flush_some.
-
-2000-07-25 Thomas Bushnell, BSG <tb@mit.edu>
-
- * truncate.c (trunc_indirect): Before freeing an indirect block,
- remove it from the disk pager's kernel cache.
-
-2000-03-09 Roland McGrath <roland@baalperazim.frob.com>
-
- * balloc.c (ext2_free_blocks, ext2_new_block): Fix formats to avoid
- -Wformat warnings.
- * getblk.c (ext2_alloc_block, inode_getblk, ext2_getblk): Likewise.
- * ialloc.c (ext2_count_free_inodes): Likewise.
- * truncate.c (trunc_direct): Likewise.
- * pager.c (pending_blocks_write, diskfs_grow): Likewise.
-
-2000-03-03 Roland McGrath <roland@baalperazim.frob.com>
-
- * dir.c (diskfs_get_directs): Don't allocate buffer for *DATA until
- after scanning for ENTRY and possibly returning EOF.
-
-2000-02-05 Roland McGrath <roland@baalperazim.frob.com>
-
- * ext2_fs.h: Update from Linux 2.3.42 version (ext2_fs_i.h unchanged).
- * inode.c (check_high_bits): In accordance with Linux 2.3.42 behavior,
- permit 32-bit uids on non-hurd filesystems unless i_dtime is zero
- (which indicates an extra old Linux ext2 implementation I guess).
-
-2000-01-16 Mark Kettenis <kettenis@gnu.org>
-
- * pager.c (file_pager_write_page): Lock NODE->dn->alloc_lock
- before accessing NODE->allocsize. Fixes Debian bug #40302.
-
-1999-10-13 Roland McGrath <roland@baalperazim.frob.com>
-
- * ext2fs.c (diskfs_name_max): New variable.
-
-1999-10-06 Roland McGrath <roland@baalperazim.frob.com>
-
- * hyper.c (get_hypermetadata): Avoid overflow in calculation of disk
- size vs superblock-specified requirement.
- Add a warning for wasted disk blocks after last filesystem block.
-
-1999-10-03 Roland McGrath <roland@baalperazim.frob.com>
-
- * dir.c (ext2_file_type): #if 0 out this variable.
- (diskfs_get_directs): #if 0 out code to interpret file_type field
- and set d_type. Instead, always return DT_UNKNOWN for now.
-
- * dir.c (file_type_ext2): #if 0 out.
- (diskfs_direnter_hard): #if 0 out code to set file_type field in
- directory entries. Instead, always set it to zero.
-
-1999-10-03 Roland McGrath <roland@baalperazim.frob.com>
-
- * bitmap.c (ffz): Subtract one from (1-origin) result of ffs to get
- our (0-origin) result.
-
- * Makefile (LCLHDRS): bitmap.h -> bitmap.c
-
- * ext2fs.h (test_bit, set_bit, clear_bit): Rewritten to operate on
- 32-bit words instead of bytes.
-
- * truncate.c (diskfs_truncate): Add missing call to
- diskfs_end_catch_exception.
-
- * ext2fs.h (group_desc): Inline function replaced with macro.
- (group_desc_image): New variable.
- * hyper.c (get_hypermetadata): Initialize it.
-
- * ext2fs.h (sblock_block): Declare new variable.
- (SBLOCK_LBLOCK): Macro removed.
- (SBLOCK_OFFS): Define in terms of sblock_block.
- * ext2fs.c (options): Add --sblock/-S.
- (parse_opt): Parse it to set sblock_block.
- * hyper.c (sblock_block): New variable.
- (get_hypermetadata): Use sblock_block instead of constant SBLOCK_BLOCK.
-
- * ext2fs.c (options): List --debug/-D unconditionally, adding to help
- text #ifndef EXT2FS_DEBUG
- (parse_opt): Always grok -D. #ifndef EXT2FS_DEBUG, reject it with
- message saying debugging support not compiled in.
-
- * hyper.c (get_hypermetadata): Use EXT2_MAX_BLOCK_SIZE instead of
- hard-wired 8192. Don't use ffs to compute log2_block_size, and don't
- check for the impossible case of non-power-of-two block size (the
- block size specification we start with is given as a power of two!).
- * ext2fs.h (block_size): Change type to unsigned int.
- (BLOCKSIZE_SCALE): Just use SBLOCK->s_log_block_size directly.
- * hyper.c (get_hypermetadata): Fix printf formats to silence warning.
- * dir.c (dirscanblock): Likewise.
-
- * dir.c (file_type_ext2): New const variable, map DT_* -> EXT2_FT_*.
- (diskfs_direnter_hard): Move initialization of directory entry content
- fields out of switch; use memcpy or memmove as appropriate, instead of
- bcopy. Set file_type field in new directory entry to appropriate
- type for the node, or to zero if the filesystem doesn't have the
- EXT2_FEATURE_INCOMPAT_FILETYPE flag set.
-
-1999-10-02 Roland McGrath <roland@baalperazim.frob.com>
-
- * ext2fs.h (SBLOCK_LBLOCK): New macro, filesystem block number of sb.
- (BLOCKSIZE_SCALE): New macro for converting min-blocks to fs blocks.
- (group_desc): Fix calculation of offset from superblock, so it works
- properly with block_size != EXT2_MIN_BLOCK_SIZE.
-
- * ext2fs.h (EXT2FS_EI): New macro, use it for all extern inlines.
-
- * bitmap.c (count_free, find_next_zero_bit, find_first_zero_bit):
- Make these all static inline.
- (ffz, ffz_nibble_map): Function and variable removed.
- (ffz): Replace decl with macro defined in terms of ffs.
- * ext2fs.h (count_free, find_next_zero_bit, find_first_zero_bit, ffz):
- Remove these declarations.
- * Makefile (SRCS): Remove bitmap.c.
- (LCLHDRS): Add bitmap.c here instead.
- * balloc.c, ialloc.c: #include "bitmap.c" here.
-
-1999-10-01 Roland McGrath <roland@baalperazim.frob.com>
-
- * bitmap.c (memscan): Function removed.
- * ext2fs.h: Removed its decl.
- * balloc.c (memscan): New static function, defined using memchr.
-
-1999-09-13 Roland McGrath <roland@baalperazim.frob.com>
-
- * dir.c, truncate.c, pager.c: Reverted changes related to
- io_map_segment.
-
-1999-09-09 Roland McGrath <roland@baalperazim.frob.com>
-
- * Makefile (makemode): server -> servers.
- (targets): Replaced with target; remove ext2fs.static.
- (ext2fs.static-LDFLAGS): Variable removed.
- (ext2fs, ext2fs.static): Remove deps.
-
-1999-09-07 Thomas Bushnell, BSG <tb@mit.edu>
-
- * dir.c (diskfs_lookup_hard): Pass additional parameter to
- diskfs_get_filemap.
- (diskfs_dirempty): Likewise.
- * truncate.c (force_delayed_copies): Likewise.
- * pager.c (diskfs_get_filemap): Accept additional parameter.
-
-1999-09-04 Thomas Bushnell, BSG <tb@mit.edu>
-
- * pager.c (file_pager_write_page): Don't report errors on writes
- that extend past NODE->allocsize. This avoids a race between sync
- and truncate. Reported by Mark Kettenis <kettenis@wins.uva.nl>.
-
-1999-08-23 Roland McGrath <roland@baalperazim.frob.com>
-
- * ext2_fs.h, ext2_fs_i.h: Replaced with Linux 2.3.14 versions.
- * ext2fs.h (i_mode_high): New macro, missing from ext2_fs.h.
-
- * inode.c (read_node): Don't set INFO->i_version.
- Extract INFO->i_dir_acl value only for a directory;
- otherwise use zero and instead extract INFO->i_high_size.
- Fail with EFBIG if INFO->i_high_size is nonzero.
-
- * ialloc.c (diskfs_alloc_node): Propagate initial value of i_flags
- from directory, as Linux 2.3.14 does.
-
- * inode.c (write_node): Get i_flags from NP->dn->info instead of from
- the disk inode, so we can have modified the in-core version.
- * dir.c (diskfs_direnter_hard, diskfs_dirremove_hard,
- diskfs_dirrewrite_hard): Clear EXT2_BTREE_FL flag bit from
- DP->dn->info.i_flags after modifying the directory (this is what
- Linux 2.3.14 does).
-
- * inode.c (read_node): i_version -> i_generation
- * inode.c (write_node): Likewise.
-
- * balloc.c (ext2_free_blocks): Handle freeing across group boundary,
- as Linux 2.3.14 does.
-
- * balloc.c (ext2_check_blocks_bitmap): If RO_COMPAT_SPARSE_SUPER
- feature flag is set, or if group number is not a power of 3, 5, or 7
- (I don't know why; this is what Linux 2.3.14 does), skip tests for
- superblocks and descriptor blocks being free in bitmap.
-
- * dir.c: Replace `struct ext2_dir_entry' with `struct ext2_dir_entry_2'
- in all uses.
- (ext2_file_type): New static const variable.
- (diskfs_get_directs): Set d_type member based on file_type field in
- directory entry.
-
- * balloc.c (ext2_new_block): Take new arg PREALLOC_GOAL.
- Use that instead of hard-coded 8 as maximum of blocks to preallocate.
- Also test that instead of PREALLOC_COUNT to decide whether to
- try any preallocation at all.
- * getblk.c (ext2_alloc_block): Pass new arg to ext2_new_block.
- Use EXT2_DEFAULT_PREALLOC_BLOCKS as default (replaces hard-coded 8);
- For a regular file, use SBLOCK->s_prealloc_blocks before default.
- For a directory, use SBLOCK->s_dir_prealloc_blocks if the
- EXT2_FEATURE_COMPAT_DIR_PREALLOC flag is set, otherwise zero.
- * inode.c (diskfs_set_translator): Pass new arg (zero).
-
-1999-07-11 Roland McGrath <roland@baalperazim.frob.com>
-
- * dir.c (diskfs_get_directs): Fix sloppy bugs in last change.
- * hyper.c (allocate_mod_map): Likewise.
- * pager.c (get_page_buf): Likewise.
-
-1999-07-10 Roland McGrath <roland@baalperazim.frob.com>
-
- * ext2fs.h: Add #include <sys/mman.h> for munmap decl.
-
-1999-07-06 Thomas Bushnell, BSG <tb@mit.edu>
-
- * dir.c (diskfs_get_directs): Use mmap instead of vm_allocate.
- * hyper.c (allocate_mod_map): Likewise.
- (get_hypermetadata): Likewise.
- * pager.c (get_page_buf): Likewise.
-
- * hyper.c (diskfs_readonly_changed): Use mprotect instead of
- vm_protect.
-
-1999-07-03 Thomas Bushnell, BSG <tb@mit.edu>
-
- * dir.c (diskfs_lookup_hard): Use munmap instead of vm_deallocate.
- (diskfs_direnter_hard): Likewise.
- (diskfs_dirremove_hard): Likewise.
- (diskfs_dirrewrite_hard): Likewise.
- (diskfs_dirempty): Likewise.
- (diskfs_drop_dirstat): Likewise.
- (diskfs_get_directs): Likewise.
- * hyper.c (allocate_mod_map): Likewise.
- (get_hypermetadata): Likewise.
- * pager.c (free_page_buf): Likewise.
- * truncate.c (poke_pages): Likewise.
-
-1999-06-29 Thomas Bushnell, BSG <tb@mit.edu>
-
- * hyper.c (diskfs_readonly_changed): Adjust whether the store
- should permit writes too.
-
-1999-06-19 Roland McGrath <roland@baalperazim.frob.com>
-
- * pager.c (free_page_buf): Fix type cast.
-
-Tue Jun 15 21:51:58 1999 Thomas Bushnell, BSG <tb@mit.edu>
-
- * pager.c: Clamp the number of free pages we keep around to some
- reasonably small value. Patch from Mark Kettenis
- <kettenis@wins.uva.nl>.
-
-1999-06-15 Thomas Bushnell, BSG <tb@mit.edu>
-
- * inode.c (diskfs_validate_flags_change): Invert sense of test wrt
- bits that haven't yet been defined. Reported by Kalle Olavi
- Niemitalo <tosi@ees2.oulu.fi>.
-
-1999-05-23 Roland McGrath <roland@baalperazim.frob.com>
-
- * ialloc.c (diskfs_alloc_node): Frob printf format to suppress warning.
- * getblk.c (ext2_getblk): Likewise.
- * balloc.c (ext2_free_blocks): Likewise.
- * hyper.c (get_hypermetadata): Likewise.
-
- * ialloc.c (diskfs_alloc_node): If creator_os is not EXT2_OS_HURD,
- suppress warnings about stale nonzero st_blocks or st_size.
-
-1999-05-19 Roland McGrath <roland@baalperazim.frob.com>
-
- * ext2fs.c (main): Include store size in panic msg when it's too small.
-
-1999-01-23 Roland McGrath <roland@baalperazim.frob.com>
-
- * ext2fs.c (main): Use diskfs_init_main.
-
-1998-12-27 Roland McGrath <roland@baalperazim.frob.com>
-
- * inode.c (diskfs_set_statfs): Remove __ from struct members.
-
-1998-12-21 Mark Kettenis <kettenis@phys.uva.nl>
-
- * inode.c (diskfs_set_statfs): Fill in statfs members that are
- used to implement statvfs.
-
-1998-12-27 Roland McGrath <roland@baalperazim.frob.com>
-
- * ext2fs.c (main): Pass ARGP_IN_ORDER flag to argp_parse because
- diskfs options need it.
-
-1998-12-20 Roland McGrath <roland@baalperazim.frob.com>
-
- * inode.c (diskfs_write_disknode): Add braces to silence warning.
- * pager.c (file_pager_read_page): Likewise.
-
- * storeinfo.c: Don't include <netinet/in.h>.
-
-1998-09-04 Roland McGrath <roland@baalperazim.frob.com>
-
- * dir.c (dirscanblock): Fix defn with `const'.
- (diskfs_direnter_hard): Likewise.
- * inode.c (diskfs_create_symlink_hook): Likewise.
- (write_symlink): Likewise.
-
- * pager.c: strings.h -> string.h; gets strerror decl.
-
- * ext2fs.c (main): Fix return type to int.
-
- * dir.c (diskfs_lookup_hard): Fix defn with `const'.
- * inode.c (diskfs_set_translator): Likewise.
-
-Wed Aug 20 14:28:00 1997 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * dir.c (diskfs_lookup_hard): Cope with error return from
- diskfs_get_filemap.
- (diskfs_dirempty): Cope (poorly) with error return from
- diskfs_get_filemap.
- * truncate.c (force_delayed_copies): Likewise.
-
- * pager.c (diskfs_get_filemap): If pager_create fails, return
- error to caller.
-
-Mon Jun 30 17:34:27 1997 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * ext2fs.c (diskfs_readonly): Delete variable definition.
- (main): If the store cannot be made writable, then set
- diskfs_hard_readonly and diskfs_readonly.
-
-1997-06-20 Miles Bader <miles@gnu.ai.mit.edu>
-
- * pager.c (disk_pager_read_page): Initialize READ to 0 to force
- store_read to allocate a buffer.
-
-1997-06-18 Miles Bader <miles@gnu.ai.mit.edu>
-
- * ext2fs.c (main): Get rid of device-block-size-is-power-of-2 check.
-
-Tue Jun 3 17:18:35 1997 Miles Bader <miles@gnu.ai.mit.edu>
-
- * inode.c (read_node): Don't assert that st_blocks is zero for
- non-dir/file/long-symlink inodes.
-
-Tue Nov 19 18:30:37 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * inode.c (read_node): If SBLOCK->s_creator_os != EXT2_OS_HURD,
- set NP->author_tracks_uid to true.
-
-Mon Nov 18 17:14:31 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * ialloc.c (diskfs_alloc_node): Clear S_IPTRANS bit in ST->st_mode
- instead of NP->istranslated.
- * inode.c (read_node): Set S_IPTRANS bit in ST->st_mode (and clear
- S_ITRANS) rather than NP->istranslated.
- (write_node): Don't write S_IPTRANS to disk.
- (diskfs_set_translator): Frob S_IPTRANS bit rather than
- istranslated field.
-
-Sat Nov 16 17:26:20 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * storeinfo.c (diskfs_S_file_get_storage_info): diskfs_isuid ->
- idvec_contains.
-
-Tue Nov 12 17:53:08 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * inode.c (diskfs_validate_flags_change): New function.
- (write_node): Convert generic flags in ST->st_flags to ext2-
- specific flags in DI->i_flags.
- (read_node): Renamed from read_disknode; all callers changed.
- Convert ext2-specific flags on disk to generic flags in ST.
- [!UF_APPEND] (UF_APPEND): New macro (temporary).
- [!UF_NODUMP] (UF_NODUMP): New macro (temporary).
- [!UF_IMMUTABLE] (UF_IMMUTABLE): New macro (temporary).
- <sys/stat.h>: New include.
-
-Thu Oct 24 16:24:05 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * ext2fs.c (startup_children, runtime_children): New variables.
- (startup_parents, runtime_parents): Variables removed.
- (startup_argp, runtime_argp): Use new *_CHILDREN variables instead of
- corresponding *_PARENT ones.
-
-Wed Oct 9 13:30:15 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * storeinfo.c (diskfs_S_file_get_storage_info): Return ports with
- MACH_MSG_TYPE_COPY_SEND, not MACH_MSG_TYPE_MAKE_SEND.
-
-Tue Oct 8 23:25:53 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * storeinfo.c (diskfs_S_file_get_storage_info): If st_size
- indicates a lower value for NUM_FS_BLOCK, use it instead of the
- value derived from st_blocks.
-
-Mon Oct 7 15:48:49 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * storeinfo.c (diskfs_S_file_get_storage_info): Typo.
-
-Fri Oct 4 23:51:05 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * storeinfo.c (diskfs_S_file_get_storage_info): Add security
- check, and deactivate FILE_STORE if necessary.
-
-Mon Sep 30 15:40:53 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * storeinfo.c (diskfs_S_file_get_storage_info): Set *PORTS_TYPE.
-
-Thu Sep 19 17:57:07 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * Makefile (HURDLIBS): Add store.
-
-Wed Sep 18 15:28:32 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * ext2fs.c (main): Remove CLASSES argument to store_parsed_open.
- Use STORE_PARAMS variable to get result from parsing STORE_ARGP.
- (diskfs_extra_version): Put `GNU Hurd' in here.
-
-Fri Sep 13 00:15:56 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * ext2fs.c (diskfs_append_args): Renamed from diskfs_get_options.
- Don't initialize *ARGZ & *ARGZ_LEN anymore, or deallocate on errors.
- Append store args too.
-
- * pager.c (file_pager_read_page:do_pending_reads, pager_unlock_page,
- pending_blocks_write, diskfs_grow, find_block): Use filesystem blocks,
- not device blocks, in block<->offset/size conversions.
-
- * Makefile (ext2fs ext2fs.static): Add ../libstore/libstore.a.
-
-1996-09-12 Miles Bader <miles@gnu.ai.mit.edu>
-
- * ext2fs.c (diskfs_disk_name): Renamed from STORE_NAME.
-
-Wed Sep 11 12:59:28 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * pager.c (create_disk_pager): Create PAGER_BUCKET. Pass in new
- args to diskfs_pager_setup (renamed from disk_pager_setup).
- (disk_image): New variable.
- (service_paging_request): Function removed.
- (diskfs_shutdown_pager): Use DISKFS_DISK_PAGER instead of DISK_PAGER.
- * ext2fs.h (disk_image): New declaration.
- (sync_global_ptr): Use DISKFS_DISK_PAGER instead of DISK_PAGER.
- * ext2fs.c (main, diskfs_reload_global_state): Use
- DISKFS_DISK_PAGER instead of DISK_PAGER.
-
- * ext2fs.c (main): Change store_parsed_get_name to store_parsed_name.
-
- * storeinfo.c (diskfs_S_file_get_storage_info): Clone STORE before
- remapping it.
-
-Tue Sep 10 17:12:16 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * storeinfo.c (diskfs_S_file_get_storage_info): Rewritten to use
- store functions.
-
-Mon Sep 9 11:10:11 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * ext2fs.c (main): Use store fields instead of diskfs variables.
- (store, store_parsed, store_name): New variables.
- (free_page_bufs, free_page_bufs_lock): Variables removed.
- (get_page_buf, free_page_buf): Functions removed.
- <argp.h>, <hurd/store.h>: New includes.
- * ext2fs.h (store_parsed, store_name): New declarations.
- (get_page_buf, free_page_buf): Declarations removed.
- * hyper.c <hurd/store.h>: New include.
- * pager.c <hurd/store.h>: New include.
- (file_pager_write_pager): Make BUF void *.
- (file_pager_read_page): Make BUF void **, NEW_BUF void *, and
- LENGTH size_t. Pass &LENGTH to store_read, not LENGTH.
- (pending_blocks_write): Make PAGE_BUF void *, and LENGTH size_t.
- Check amount written, and return EIO if it's wrong.
- (disk_pager_read_page): Make BUF void **, and LENGTH size_t.
- Check amount read, and return EIO if it's wrong.
- (disk_pager_write_page): Make BUF void *, and LENGTH size_t.
- Check amount written, and return EIO if it's wrong.
- (pager_read_page, pager_read_page): Convert BUF to a pointer when
- calling work functions.
- (struct pending_blocks): Make BUF void *.
- (free_page_bufs, free_page_bufs_lock): New variables.
- (get_page_buf, free_page_buf): New functions.
-
-Sun Sep 8 18:47:10 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * hyper.c (diskfs_readonly_changed): Use STORE->size.
- (get_hypermetadata): Use STORE->size & STORE->block_size.
-
- * pager.c (file_pager_read_page, pending_blocks_write,
- disk_pager_read_page, disk_pager_read_page, disk_pager_write_page,
- pager_report_extent, find_block, pager_unlock_page, diskfs_grow):
- Use store_ operations instead of the old device ones, and some
- store fields instead of globals.
- * inode.c (read_disknode): Use STORE->log2_block_size instead of
- LOG2_BLOCK_SIZE.
- * ext2fs.h (store): New declaration.
- * ext2fs.c (startup_parents): Use diskfs_store_startup_argp
- instead of diskfs_std_device_startup_argp.
- (startup_parents, startup_argp, runtime_parents, runtime_argp,
- options, parse_opt, diskfs_get_options):
- Define always, not just when EXT2FS_DEBUG is defined.
- (parse_opt): Propagate our input to the first child argp.
- (parse_opt, diskfs_get_options): Guard debug-specific bits with
- #ifdef EXT2FS_DEBUG.
-
-Thu Sep 12 16:41:20 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * Makefile (HURDLIBS): New variable.
- (ext2fs ext2fs.static): Depend on $(library_deps) instead of
- explicit list.
-
-Fri Sep 6 16:03:11 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * ext2fs.c: Include <version.h>.
- (diskfs_major_version, diskfs_minor_version, diskfs_edit_version):
- Deleted variables.
- (diskfs_server_version): New variable.
-
-Thu Aug 29 16:59:51 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- Changes from ufs/dir.c:
- * dir.c (diskfs_lookup_hard): When setting ds->stat to EXTEND, set
- ds->idx by looking at the size of the file. After successful
- dirscanblock, record index where we finished in DP->dn->dir_idx.
- Start searches at that index.
- (dirscanblock): Size dirents correctly when mallocing it.
- (diskfs_direnter_hard): Be more careful when sizing or resizing
- dirents. Correctly set to -1 all the new entries we create after
- realloc call.
- * ext2fs.h (struct disknode): New member `dir_idx'.
- * inode.c (diskfs_cached_lookup): Initialize DN->dir_idx.
-
- * dir.c (diskfs_direnter_hard): Initialize OLDSIZE to quiet gcc.
-
-Sun Aug 18 01:45:42 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * pager.c (file_pager_read_page): Use get_page_buf to get a free page.
- (file_pager_read_page): Use free_page_buf to deallocate pages.
- * ext2fs.c (get_page_buf): Return 0 if we can't allocate.
-
-Thu Aug 15 14:55:01 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * ext2fs.c (diskfs_edit_version): Change to `1'.
- (diskfs_version_extra): New variable.
- * inode.c (read_disknode): Change assertion to allow non-zero
- st_size for anything, but assert that st_blocks == 0 for any case
- where we set allocsize to 0.
- * truncate.c (diskfs_truncate): Allow any sort of node to have a
- size without any blocks (as linux apparently does this sometimes
- with devices).
-
-Wed Aug 14 14:03:33 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * ext2fs.c (diskfs_minor_version): Change to `2'.
-
-Tue Aug 13 15:11:42 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * ext2_fs.h: Update to version from linux-2.0.12.
- * ialloc.c (ext2_alloc_inode, diskfs_free_node): Pass SBLOCK as a
- parameter to EXT2_FIRST_INO (v2.x change).
- * hyper.c (get_hypermetadata): Use EXT2_INODE_SIZE instead of
- sizeof (struct ext2_inode).
- Deal with various version 2.x features.
- * ext2fs.h (dino): Dont recalculate INODES_PER_BLOCK here.
- (ext2_debug): redefine macro after including ext2_fs.h.
-
-Mon Aug 12 13:48:17 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * ext2fs.c (diskfs_minor_version): Changed to `1'.
-
- * inode.c (read_disknode): Don't set allocsize for in-inode symlinks.
- (MAX_INODE_SYMLINK): New macro.
- (write_symlink, read_symlink): New functions.
- (diskfs_create_symlink_hook, diskfs_read_symlink_hook): New variables.
- * truncate.c (diskfs_truncate): For in-inode symlinks, just frob
- the size.
-
- * ext2fs.h (__u32, __u16, __u8, __s32, __s16, __s8): New types.
- * ext2_fs.h (u32, u16, u8, s32, s16, s8): All uses of these types
- changed to have a leading `__', and the definitions removed.
- * ext2_fs_i.h (u32, u16, u8, s32, s16, s8): All uses of these types
- changed to have a leading `__'.
-
-Mon Aug 12 11:18:37 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * hyper.c (diskfs_set_hypermetadata): Return an error code now.
-
-Fri Aug 2 12:10:40 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * inode.c (diskfs_write_disknode): If WAIT is false, still record
- the write for later, using record_global_poke.
-
-Thu Aug 1 16:18:59 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * ext2_fs.h (ext2_debug_flag): New decl.
- (ext2_debug): Pay attention to EXT2_DEBUG_FLAG.
- * ext2fs.c [EXT2FS_DEBUG] (options, ext2_debug_flag): New variables.
- [EXT2FS_DEBUG] (parse_opt, diskfs_get_options): New functions.
- [EXT2FS_DEBUG] (startup_parents, startup_argp, runtime_parents,
- diskfs_runtime_argp): New variables.
- [!EXT2FS_DEBUG] (startup_argp): New macro.
- (main): Use STARTUP_ARGP instead of DISKFS_STD_DEVICE_STARTUP_ARGP.
- * pager.c (diskfs_grow): Fix ext2_debug format strings.
- * truncate.c (trunc_direct): Fix ext2_debug call.
-
-Sat Jul 20 00:58:44 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * ext2fs.h (struct disknode): Remove debugging info.
- (RECORD_LAST): Function removed.
- (LAST_BUFSZ): Macro removed.
- (enum last_act): Type removed.
- * inode.c (diskfs_cached_lookup): Don't initialize debugging info.
- * pager.c (file_pager_read_page, file_pager_write_page,
- pager_unlock_page, diskfs_grow): Don't record debugging info.
- * truncate.c (diskfs_truncate): Likewise.
-
- * pager.c (file_pager_read_page): Set
- NODE->dn->last_page_partially_writable if we return such a page.
-
-Fri Jul 19 15:02:24 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * pager.c (diskfs_grow): Rename OLD_END_BLOCK to END_BLOCK.
- Correctly determine whether to set DN->last_page_partially_writable
- after allocating new blocks.
-
- * pager.c (file_pager_read_page, file_pager_write_page): Pass
- NODE->dn, not &NODE->dn to RECORD_LAST.
-
-Mon Jul 15 18:00:26 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * ext2fs.h (struct disknode): Add debugging info.
- (RECORD_LAST): New function.
- (LAST_BUFSZ): New macro.
- (enum last_act): New type.
- * pager.c (pager_unlock_page, diskfs_grow, file_pager_read_page,
- file_pager_write_page): Record debugging info.
- * truncate.c (diskfs_truncate): Likewise.
- * inode.c (diskfs_cached_lookup): Initialize debugging info.
-
- * pager.c (file_pager_read_page): Initialize *WRITELOCK to 0.
-
-Tue Jun 25 12:22:21 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * ext2fs.h (sync_global): Renamed from sync_global_data. Add WAIT
- flag. Don't call diskfs_set_hypermetadata.
- (alloc_sync): Call diskfs_set_hypermetadata instead of sync_global_data.
- (sync_super_block): Function removed.
- * hyper.c (diskfs_readonly_changed): No longer clear the clean bit.
- (diskfs_set_hypermetadata): Work correctly.
- * truncate.c (diskfs_truncate): Add call diskfs_check_readonly to
- clear clean bit.
- * inode.c (diskfs_cached_lookup): Use diskfs_check_readonly
- instead of diskfs_readonly.
- * dir.c (diskfs_lookup_hard, diskfs_dirempty): Likewise.
- * pager.c (diskfs_shutdown_pager): Don't shutdown the disk pager,
- just sync it.
- (diskfs_sync_everything): Call sync_global instead of pokel_sync.
- (final_sblock): Variable removed.
- (diskfs_grow): Add call diskfs_check_readonly to clear clean bit.
-
-Mon Jun 24 17:14:25 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * inode.c (check_high_bits, diskfs_validate_owner_change,
- diskfs_validate_group_change, diskfs_validate_mode_change,
- diskfs_validate_author_change): New functions.
- (write_node): For non-hurd filesystems, assert that no hurd
- extensions should be used.
-
-Thu Jun 20 22:36:23 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * ext2fs.c (main): Rename diskfs_device_startup_argp to
- diskfs_std_device_startup_argp.
-
-Sat Jun 15 15:56:01 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * inode.c (read_disknode, write_inode): Use hurd-specific fields
- only on a hurd filesystem.
-
-Fri May 10 09:32:43 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * inode.c (diskfs_set_statfs): Fix one reference to old name of ST
- member.
-
-Thu May 9 11:52:20 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * inode.c (diskfs_set_statfs): Expect and fill in new format
- statfs buffer.
-
- * Makefile (ext2fs ext2fs.static): s/ioserver/iohelp/g.
- * ext2fs.h: ioserver.h -> iohelp.h.
-
-Tue May 7 16:22:56 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * storeinfo.c (diskfs_S_file_get_storage_info): Rewrite for new
- interface.
-
-Tue Apr 30 12:51:09 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * Makefile (targets): Renamed from `target'.
-
-Fri Apr 26 16:10:19 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * Makefile (makemode): Now `servers'.
- (targets): Renamed from `target'; now include ext2fs.static.
- (ext2fs.static-LDFLAGS): Renamed from `LDFLAGS'.
- (ext2fs.static): Depend on same things as `ext2fs'.
- (include ../Makeconf): Must come before dependency information.
-
-Wed Apr 17 13:30:49 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * inode.c (diskfs_write_disknode): Only sync DI if WAIT.
-
- * dir.c (diskfs_lookup_hard): Set atime appropriately, and sync
- the new atime if we are running synchronously (!).
- (diskfs_dirempty): Likewise.
- (diskfs_direnter_hard): Set mtime appropriately.
- (diskfs_dirremove_hard): Likewise.
- (diskfs_dirrewrite_hard): Likewise.
-
-Thu Apr 4 18:51:19 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * inode.c (diskfs_cached_lookup): Renamed from iget; all uses updated.
- Initialize the CACHE_ID field in the new node.
- * ext2fs.h (struct disknode): Get rid of NUMBER field; all references
- replaced by references to the CACHE_ID field in the corresponding node.
-
-Fri Mar 29 11:03:58 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * dir.c (diskfs_null_dirstat): New function.
- (diskfs_lookup_hard, diskfs_direnter, diskfs_dirremove_hard,
- diskfs_dirrewrite_hard): Renamed from versions without `_hard' suffix.
- Get rid of stuff now done by diskfs.
-
- * ext2fs.c (main): Pass new argument to argp_parse.
-
-Tue Mar 19 17:52:04 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * pager.c (pager_unlock_page, diskfs_grow): Try to make the logic
- a bit simpler and more robust.
-
-Fri Feb 16 17:05:01 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * ext2fs.c (main): Check error return from diskfs_init_diskfs.
-
-Tue Feb 6 14:49:40 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * ext2fs.h (ext2_warning): Make a declaration, not a macro.
- * msg.c (ext2_warning): Rename from _ext2_warning; don't take (or
- print) a function argument any more.
-
- * dir.c (diskfs_get_directs): When BUFSIZ is 0, allocate enough
- extra space over the directory size to account for the worst case
- difference between the ext2 and canonical formats.
-
-Sat Feb 3 11:27:07 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * hyper.c (get_hypermetadata, diskfs_readonly_changed): Use
- ext2_warning to print warnings instead of error().
- * msg.c (_ext2_warning): Include `warning:' in message.
-
-Sat Feb 3 06:10:43 1996 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * hyper.c: Fixed handling of the filesystem `clean bit'.
- (ext2fs_clean): New boolean variable.
- (get_hypermetadata): Set it iff the clean bit is set on entry.
- If not clean, complain and force read-only.
- (diskfs_set_hypermetadata): Set clean bit only if ext2fs_clean is set.
- (diskfs_readonly_changed): Complain if going writable and clean
- bit clear.
-
- * ext2fs.c: Include string.h for strerror decl.
-
-Tue Jan 30 22:25:19 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * hyper.c (get_hypermetadata): Don't return any error value, just
- panic if we can't read the superblock.
- * ext2fs.c (main): Move warp_inode() inline. Make sure root inode
- is really there. Don't check return value from get_hypermetadata.
- (warp_inode): Function removed.
- * ext2fs.h (get_hypermetadata): Returns void now.
-
-Tue Jan 30 17:04:41 1996 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * pager.c (file_pager_read_page, file_pager_write_page): Check for
- a page offset beyond the allocsize and return EIO.
-
-Wed Jan 17 15:11:55 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * storeinfo.c (diskfs_S_file_get_storage_info): Calculate the
- right value for *RUNS_LEN.
-
-Tue Jan 16 17:37:00 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * pager.c (diskfs_file_update): Ext2fs doesn't require that the
- last block in the file always be allocated, so don't.
- (diskfs_grow, pager_unlock_page): Don't set last_block_allocated.
- * ext2fs.h (struct disknode): Get rid of last_block_allocated field.
- * inode.c (read_disknode): Don't set last_block_allocated.
- * truncate.c (diskfs_truncate): Likewise.
-
- * Makefile (LDFLAGS): Add -static.
-
-Mon Jan 15 10:25:19 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * pager.c (pager_unlock_page, diskfs_grow): Leave things in a
- slightly more consistent state when block allocation errors happen.
-
- * dir.c (diskfs_direnter): Don't include the terminating '\0' in
- on-disk directory entry names.
-
- * inode.c (diskfs_node_norefs): When losing our in-core copy of an
- inode, remember which indirect blocks still have to be written.
- * pokel.c (pokel_inherit, pokel_finalize): New functions.
- * ext2fs.h (pokel_inherit, pokel_finalize): New declarations.
-
- * dir.c (diskfs_lookup): Patch from ufs/dir.c: If we are returning
- an error, then set the dirstat to be ignored by drop_dirstat.
-
-Sun Jan 14 13:17:33 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * ialloc.c (diskfs_alloc_node): Set NP->istranslated to 0.
- * inode.c (write_node): If NP isn't translated, force
- DI->i_translator to 0.
-
- * getblk.c (inode_getblk, block_getblk): Set dn_set_mtime too.
-
-Sat Jan 6 11:57:26 1996 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * pager.c (pager_bucket): Made global.
- (create_disk_pager): Pass MAY_CACHE to disk_pager_setup.
- * ext2fs.c (main): Don't map in disk image here; create_disk_pager
- now does it.
-
-Fri Jan 5 16:57:54 1996 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * ext2fs.h: Declare create_disk_pager.
-
-Thu Jan 4 18:46:40 1996 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * ext2fs.h (disk_pager, disk_pager_port, disk_image,
- create_disk_pager): Decls removed.
- Include hurd/diskfs-pager.h instead.
-
- * pager.c (create_disk_pager): Use disk_pager_setup.
-
-Tue Nov 14 14:59:32 1995 Miles Bader <miles@gnu.ai.mit.edu>
-
- * dir.c (dirscanblock): Apply mib's changes to ufs/dir.c.
-
-Sat Nov 4 20:01:01 1995 Miles Bader <miles@gnu.ai.mit.edu>
-
- * storeinfo.c (diskfs_S_file_get_storage_info): Add FLAGS argument.
-
-Wed Nov 1 20:09:59 1995 Miles Bader <miles@gnu.ai.mit.edu>
-
- * ext2fs.c (main): Add FLAGS arg to diskfs_startup_diskfs call.
-
-Mon Oct 23 17:49:16 1995 Miles Bader <miles@gnu.ai.mit.edu>
-
- * inode.c (diskfs_get_translator, diskfs_set_translator): Only
- support these if the filesystem's creator-os is `hurd'.
- (read_disknode): Only check the i_translator field if the
- filesystem's creator-os is `hurd'.
-
-Fri Oct 20 19:18:16 1995 Miles Bader <miles@gnu.ai.mit.edu>
-
- * ext2fs.h (MS_RDONLY, MS_NOSUID, MS_NODEV, MS_NOEXEC,
- MS_SYNCHRONOUS, MS_REMOUNT, S_APPEND, S_IMMUTABLE, IS_APPEND,
- IS_IMMUTABLE): Macros deleted.
-
-Thu Oct 19 19:15:15 1995 Miles Bader <miles@gnu.ai.mit.edu>
-
- * pager.c (create_disk_pager, diskfs_get_filemap,
- pager_clear_user_data): Don't use the p field in a upi.
- (diskfs_get_filemap): Update/initialize the max_prot field.
- Add the prot arg.
-
- * ext2fs.h (struct user_pager_info): Add max_prot field, remove p.
- * pager.c (drop_pager_softrefs): Declare PAGER, not UPI.
- (enable_caching): The disk node is upi->node, not upi->np.
- (diskfs_enable_pagers): Function removed.
- * inode.c (read_disknode): Add DN and OFFSET variables. Use
- log2_block_size to mask instead of doing a modulo with block_size.
- * hyper.c (diskfs_readonly_changed): Typo.
- (allocate_mod_map): Declare ERR; OLD_MOD_MAP_SIZE --> MOD_MAP_SIZE.
- * dir.c (diskfs_lookup, diskfs_dirempty): Give diskfs_get_filemap
- a protection arg.
- * truncate.c (force_delayed_copies): Ditto.
-
-Wed Oct 18 21:00:28 1995 Miles Bader <miles@gnu.ai.mit.edu>
-
- * ext2fs.h (struct disknode): Replace fileinfo field with pager.
- * inode.c (diskfs_node_norefs, iget): Use pager field, not fileinfo.
- * pager.c (diskfs_get_filemap_pager_struct, flush_node_pager,
- diskfs_file_update, pager_clear_user_data, drop_pager_softrefs): Ditto.
- * truncate.c (enable_delayed_copies, force_delayed_copies): Ditto.
-
- * ext2fs.c (main): Always include VM_PROT_WRITE in max prot.
- * hyper.c (diskfs_readonly_changed): Change the protection of
- DISK_IMAGE to reflect the new state.
- * pager.c (diskfs_enable_pagers): New function.
-
-Tue Oct 17 21:16:04 1995 Miles Bader <miles@gnu.ai.mit.edu>
-
- * pokel.c (_pokel_exec, pokel_flush): New functions.
- (pokel_sync): Use _pokel_exec to do the work.
- * pager.c (flush_node_pager): New function.
- * ext2fs.h (pokel_flush, flush_node_pager): New declarations.
-
- * hyper.c (allocate_mod_map): New function (from get_hypermetadata).
- (zeroblock, modified_global_blocks): Define (were common).
- (get_hypermetadata): Deallocate ZEROBLOCK if necessary. Use
- allocate_mod_map to allocate MODIFIED_GLOBAL_BLOCKS.
- (diskfs_readonly_changed): New function.
- * main.c (main): Move stuff into get_hypermetadata.
- Writable init code moved to diskfs_readonly_changed.
-
- * inode.c (diskfs_node_reload): New function.
- (iget, read_disknode): Code to set allocsize and the last_* fields
- moved from iget to read_disknode.
-
- * ext2fs.h (disk_pager): Type changed to struct pager.
- (sync_global_ptr): Use DISK_PAGER, not DISK_PAGER->p.
- * pager.c (create_disk_pager): Store the actual pager into DISK_PAGER.
- * ext2fs.c (main): Use DISK_PAGER directly, not ->p.
- * inode.c (iget): Ditto.
- * pager.c (diskfs_shutdown_pager, diskfs_sync_everything): Ditto.
-
-Mon Oct 16 15:23:25 1995 Miles Bader <miles@gnu.ai.mit.edu>
-
- * inode.c (diskfs_lost_hardrefs): #ifdef'd out contents removed.
-
-Fri Oct 13 17:50:23 1995 Miles Bader <miles@gnu.ai.mit.edu>
-
- * ext2fs.c (main): Use argp for parsing.
- (usage, USAGE, SHORT_OPTS, long_opts, console_stdio): Removed
-
-Thu Oct 12 18:16:00 1995 Miles Bader <miles@gnu.ai.mit.edu>
-
- * hyper.c (get_hypermetadata): Use diskfs device functions &
- variables instead of our own.
- * ext2fs.h (device_arg, device_name, device_port, device_start,
- device_size, device_block_size): Declarations removed.
-
- * ext2fs.c (printf, _ext2_error, _ext2_panic, _ext2_warning):
- Functions moved to msg.c
- * msg.c: New file.
- (printf, _ext2_error, _ext2_panic, _ext2_warning): Funcs from ext2fs.c.
- * Makefile (SRCS): Remove devio.c, add msg.c.
-
-Sat Oct 7 20:47:19 1995 Miles Bader <miles@gnu.ai.mit.edu>
-
- * storeinfo.c (diskfs_S_file_get_storage_info): run_elem_t --> off_t.
-
- * ext2fs.c (diskfs_init_completed): Func deleted (now in libdiskfs).
-
-Fri Oct 6 17:24:57 1995 Miles Bader <miles@gnu.ai.mit.edu>
-
- * storeinfo.c (diskfs_S_file_get_storage_info): Change type of
- ADDRESSES to off_t **, and add BLOCK_SIZE parameter.
-
-Wed Oct 4 20:02:34 1995 Miles Bader <miles@gnu.ai.mit.edu>
-
- * inode.c (diskfs_set_statfs): fsys_stb_bsize -> fsys_stb_iosize.
- fsys_stb_fsize -> fsys_stb_bsize.
-
-Wed Sep 27 20:07:53 1995 Miles Bader <miles@gnu.ai.mit.edu>
-
- * ext2fs.c (main): Use diskfs routines to open the device.
- Support both file and mach devices. Move the parse function here.
- (parse_opt): Move into main (as a nested function).
- * ext2fs.h (device_arg, device_start): New declarations.
- * devio.c (dev_read_sync, dev_write_sync): Offset the address to
- which we're doing i/o with DEVICE_START.
-
-Tue Sep 26 18:39:58 1995 Miles Bader <miles@gnu.ai.mit.edu>
-
- * storeinfo.c (diskfs_S_file_get_storage_info): New function.
- * Makefile (SRCS): Add storeinfo.c.
-
-Fri Sep 15 14:21:18 1995 Miles Bader <miles@churchy.gnu.ai.mit.edu>
-
- * truncate.c (trunc_indirect): Only record an indirect block as
- being modified when it actually is.
-
- * truncate.c (diskfs_truncate): Use the new truncate functions.
- (poke_pages): Gratuitous cosmetic changes.
- (trunc_direct): Rewritten, new args.
- (trunc_indirect): Rewritten, new args, now more general to support
- all the various indirection levels.
- (trunc_triple_indirect, trunc_double_indirect,
- trunc_single_indirect): New functions.
- (struct free_block_run): New structure.
- (free_block_run_finish, free_block_run_free_ptr,
- free_block_run_add, free_block_run_init, _free_block_run_flush):
- New functions.
- (trunc_dindirect, trunc_tindirect): Functions deleted.
- (DIRECT_BLOCK, INDIRECT_BLOCK, DINDIRECT_BLOCK, TINDIRECT_BLOCK):
- Macros deleted.
-
- * getblk.c (block_getblk, ext2_getblk): u32 --> block_t.
- * balloc.c (ext2_new_block): Ditto.
- * hyper.c (get_hypermetadata): Ditto.
- * pager.c (file_pager_write_page): Ditto.
-
-Wed Sep 13 12:30:23 1995 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * dir.c (diskfs_lookup): Don't attempt to lock NP if NPP is not
- set. Don't even set NP if NPP is not set; use INUM as "lookup
- succeeded flag" instead. Lookups for REMOVE and RENAME now *must*
- set NPP.
-
-Tue Sep 12 11:03:19 1995 Miles Bader <miles@churchy.gnu.ai.mit.edu>
-
- * pokel.c (pokel_init): Initialize the free_pokes field.
- (pokel_add): Assert that this malloc should succeed.
- (pokel_sync): Don't hold POKEL's spin lock while syncing.
-
- * ialloc.c (diskfs_alloc_node): Check for a non-zero ALLOCSIZE.
-
-Tue Sep 5 16:59:40 1995 Miles Bader <miles@churchy.gnu.ai.mit.edu>
-
- * pager.c (diskfs_pager_users): Ignore the disk pager when seeing
- if there are any active pagers.
- (diskfs_shutdown_pager): shutdown_one gets passed a pager, not a upi.
- (diskfs_sync_everything): sync_one gets passed a pager, not a upi.
-
-Sun Sep 3 17:28:13 1995 Miles Bader <miles@churchy.gnu.ai.mit.edu>
-
- * ext2fs.c (thread_cancel): Removed.
-
-Fri Aug 25 14:37:32 1995 Miles Bader <miles@churchy.gnu.ai.mit.edu>
-
- * Makefile (ext2fs): Put libports in the right place in the
- linking order.
-
-Thu Aug 24 10:34:15 1995 Miles Bader <miles@churchy.gnu.ai.mit.edu>
-
- * Makefile (ext2fs): Put all dependencies here.
- (HURDLIBS): Removed.
-
-Tue Aug 22 19:39:06 1995 Miles Bader <miles@churchy.gnu.ai.mit.edu>
-
- * Makefile (HURDLIBS): Add libshouldbeinlibc.
- Remove rules for error.o.
-
-Fri Jul 21 17:51:33 1995 Michael I Bushnell <mib@geech.gnu.ai.mit.edu>
-
- * pager.c (diskfs_get_filemap): Free initial reference created by
- pager_create.
-
- * pager.c (diskfs_get_filemap): Avoid race with simultaneous
- termination by looping until we win.
- (pager_clear_user_data): Only clear UPI->np->dn->fileinfo if it
- still points to us.
-
-Thu Jul 6 15:33:24 1995 Michael I Bushnell <mib@duality.gnu.ai.mit.edu>
-
- * Makefile: Removed dependencies that are now automatically
- generated.
-
-Thu Jul 6 13:36:25 1995 Miles Bader <miles@geech.gnu.ai.mit.edu>
-
- * pager.c (diskfs_pager_users): New function.
-
-Tue Jun 27 13:08:33 1995 Michael I Bushnell <mib@duality.gnu.ai.mit.edu>
-
- * pager.c (pager_unlock_page): Declare BLOCK volatile.
-
-Sat Jun 24 17:59:36 1995 Miles Bader <miles@churchy.gnu.ai.mit.edu>
-
- * Makefile (HURDLIBS): Add libihash.
-
- * ext2fs.c (thread_cancel): Dummy function.
-
- * dir.c (diskfs_direnter): Move assignment out of test.
- (diskfs_get_directs): Fix print-format types.
- * ialloc.c (diskfs_free_node): Fix print-format types.
-
- * pager.c (thread_function): New function.
- (create_disk_pager): Make a new thread to service paging requests.
- * ext2fs.c (main): Have the initial thread die when it's done, leaving
- other thread to do the work.
-
- * pager.c (pager_bucket): New variable.
- (pager_list_lock, file_pager_list): Variables deleted.
- (create_disk_pager): Create pager_bucket.
- (create_disk_pager, diskfs_get_filemap): Pass pager_bucket to
- pager_create.
- (pager_traverse): Function deleted.
- (diskfs_get_filemap, pager_clear_user_data): Don't add/remove UPI
- to/from the pager list, as there isn't any.
- (diskfs_shutdown_pager, diskfs_sync_everything): Use
- ports_bucket_iterate on pager_bucket to go through all the pagers,
- instead of pager_traverse.
- (diskfs_file_update, pager_traverse, allow_pager_softrefs,
- drop_pager_softrefs): Change pager [un]ref calls to use the new ports
- ref calls directly instead.
- (pager_dropweak): New function (does nothing).
- * ext2fs.h (struct user_pager_info): Remove the next & prevp fields.
-
- * truncate.c (force_delayed_copies, enable_delayed_copies): Change
- pager [un]ref calls to use the new ports ref calls directly instead.
- * inode.c (diskfs_lost_hardrefs): Ditto.
-
- * inode.c (diskfs_node_iterate): New function.
- (write_all_disknodes): Re-implemented using diskfs_node_iterate.
-
-Wed Jun 14 16:19:49 1995 Michael I Bushnell <mib@duality.gnu.ai.mit.edu>
-
- * inode.c (diskfs_get_translator): Conform to new memory usage
- semantic.
-
-Fri May 19 20:56:51 1995 Miles Bader <miles@churchy.gnu.ai.mit.edu>
-
- * ext2fs.c (main): Use options_parse & diskfs_standard_startup_options
- to do command line options parsing.
- (long_opts): Was `options'. Most things removed, as
- they're now handled by libdiskfs.
- (parse_opt): New routine to deal with our few meagre remaining
- options in the approved options_parse manner.
-
-Mon May 15 15:55:49 1995 Miles Bader <miles@churchy.gnu.ai.mit.edu>
-
- * ext2fs.c (main, usage, options): Add --writable & --nosync options.
-
-Sat May 13 20:04:55 1995 Miles Bader <miles@duality.gnu.ai.mit.edu>
-
- * inode.c (diskfs_set_statfs): Set st->fsys_stb_bsize, not _fsize,
- to the block size.
-
-Sat May 13 05:02:59 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * Makefile (OBJS): Remove exec_server_image.o.
- (exec_server_image.o): Rule removed.
-
-Fri May 12 15:23:02 1995 Miles Bader <miles@churchy.gnu.ai.mit.edu>
-
- * ext2fs.c (main): Add an optional argument to the --sync option
- that lets the user specify an initial sync interval.
-
-Thu May 11 13:30:06 1995 Miles Bader <miles@churchy.gnu.ai.mit.edu>
-
- * pager.c (pager_unlock_page): Give an explanation of why the file
- system will shortly crash.
-
- * balloc.c (ext2_free_blocks, ext2_new_block): Get rid of the
- CHECK_STRICT variable, and just always do the tests it controlled.
- * ext2fs.h: Get rid of the CHECK_STRICT variable.
-
- * ext2fs.h (ext2_error, ext2_warning, ext2_panic, all callers changed):
- Make these into macros that automagically supply the caller's
- function name, and rename the original functions (which these
- macros call) to have an underline prefix.
- * ext2fs.c (ext2_error, ext2_warning, ext2_panic): Rename to add
- the underline prefix. Also rearrange a bit to hold the lock
- around the use of the global message buffer.
-
- * ext2fs.c (main): Enable the bootstrap code.
-
- * inode.c (read_disknode): Make st_blksize larger: 2 * pagesize.
-
-Wed May 10 14:03:34 1995 Miles Bader <miles@churchy.gnu.ai.mit.edu>
-
- * getblk.c (block_getblk, inode_getblk): Return ENOSPC instead of
- EIO when we can't allocate a new block.
-
- * bitmap.c (find_next_zero_bit): Fix stupid typos (present in the
- original linux source I copied this function from!) which were
- causing occasional garbage results.
-
-Tue May 9 18:08:41 1995 Miles Bader <miles@churchy.gnu.ai.mit.edu>
-
- * ext2fs.h (DONT_CACHE_MEMORY_OBJECTS): Don't define this any
- more, as the bugs we were using it to catch are supposedly gone :-|
diff --git a/ext2fs/balloc.c b/ext2fs/balloc.c
index a53e1116..7333123c 100644
--- a/ext2fs/balloc.c
+++ b/ext2fs/balloc.c
@@ -44,7 +44,7 @@
#include "ext2fs.h"
#include "bitmap.c"
-/* Returns a pointer to the first occurence of CH in the buffer BUF of len
+/* Returns a pointer to the first occurrence of CH in the buffer BUF of len
LEN, or BUF + LEN if CH doesn't occur. */
static inline void *
memscan (void *buf, unsigned char ch, size_t len)
diff --git a/ext2fs/dir.c b/ext2fs/dir.c
index 334536d8..d70dbf32 100644
--- a/ext2fs/dir.c
+++ b/ext2fs/dir.c
@@ -1,6 +1,8 @@
/* Directory management routines
- Copyright (C) 1994,95,96,97,98,99,2000,01,02 Free Software Foundation, Inc.
+ Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2007
+ Free Software Foundation, Inc.
+
Converted for ext2fs by Miles Bader <miles@gnu.org>
This program is free software; you can redistribute it and/or
@@ -196,8 +198,7 @@ diskfs_lookup_hard (struct node *dp, const char *name, enum lookup_type type,
inum = 0;
- if (!diskfs_check_readonly ())
- dp->dn_set_atime = 1;
+ diskfs_set_node_atime (dp);
/* Start the lookup at DP->dn->dir_idx. */
idx = dp->dn->dir_idx;
@@ -234,8 +235,7 @@ diskfs_lookup_hard (struct node *dp, const char *name, enum lookup_type type,
}
}
- if (!diskfs_check_readonly ())
- dp->dn_set_atime = 1;
+ diskfs_set_node_atime (dp);
if (diskfs_synchronous)
diskfs_node_update (dp, 1);
@@ -698,7 +698,7 @@ diskfs_direnter_hard (struct node *dp, const char *name, struct node *np,
/* Following a lookup call for REMOVE, this removes the link from the
directory. DP is the directory being changed and DS is the cached
information returned from lookup. This call is only valid if the
- directory has been locked continously since the call to lookup, and
+ directory has been locked continuously since the call to lookup, and
only if that call succeeded. */
error_t
diskfs_dirremove_hard (struct node *dp, struct dirstat *ds)
@@ -778,8 +778,7 @@ diskfs_dirempty (struct node *dp, struct protid *cred)
mach_port_deallocate (mach_task_self (), memobj);
assert (!err);
- if (! diskfs_check_readonly ())
- dp->dn_set_atime = 1;
+ diskfs_set_node_atime (dp);
for (curoff = buf;
!hit && curoff < buf + dp->dn_stat.st_size;
@@ -795,8 +794,7 @@ diskfs_dirempty (struct node *dp, struct protid *cred)
hit = 1;
}
- if (! diskfs_check_readonly ())
- dp->dn_set_atime = 1;
+ diskfs_set_node_atime (dp);
if (diskfs_synchronous)
diskfs_node_update (dp, 1);
diff --git a/ext2fs/ext2_fs.h b/ext2fs/ext2_fs.h
index a5a19317..a8f922e1 100644
--- a/ext2fs/ext2_fs.h
+++ b/ext2fs/ext2_fs.h
@@ -283,8 +283,8 @@ struct ext2_inode {
#ifdef __hurd__
#define i_translator osd1.hurd1.h_i_translator
-#define i_frag osd2.hurd2.h_i_frag;
-#define i_fsize osd2.hurd2.h_i_fsize;
+#define i_frag osd2.hurd2.h_i_frag
+#define i_fsize osd2.hurd2.h_i_fsize
#define i_uid_high osd2.hurd2.h_i_uid_high
#define i_gid_high osd2.hurd2.h_i_gid_high
#define i_author osd2.hurd2.h_i_author
diff --git a/ext2fs/inode.c b/ext2fs/inode.c
index b6185855..f25cc1fa 100644
--- a/ext2fs/inode.c
+++ b/ext2fs/inode.c
@@ -1,6 +1,7 @@
/* Inode management routines
- Copyright (C) 1994,95,96,97,98,99,2000,01,02 Free Software Foundation, Inc.
+ Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2007
+ Free Software Foundation, Inc.
Converted for ext2fs by Miles Bader <miles@gnu.org>
@@ -216,14 +217,23 @@ read_node (struct node *np)
st->st_size = di->i_size;
st->st_gen = di->i_generation;
- st->st_atime = di->i_atime;
- st->st_mtime = di->i_mtime;
- st->st_ctime = di->i_ctime;
-
-#ifdef XXX
- st->st_atime_usec = di->i_atime.ts_nsec / 1000;
- st->st_mtime_usec = di->i_mtime.ts_nsec / 1000;
- st->st_ctime_usec = di->i_ctime.ts_nsec / 1000;
+ st->st_atim.tv_sec = di->i_atime;
+#ifdef not_yet
+ /* ``struct ext2_inode'' doesn't do better than sec. precision yet. */
+#else
+ st->st_atim.tv_nsec = 0;
+#endif
+ st->st_mtim.tv_sec = di->i_mtime;
+#ifdef not_yet
+ /* ``struct ext2_inode'' doesn't do better than sec. precision yet. */
+#else
+ st->st_mtim.tv_nsec = 0;
+#endif
+ st->st_ctim.tv_sec = di->i_ctime;
+#ifdef not_yet
+ /* ``struct ext2_inode'' doesn't do better than sec. precision yet. */
+#else
+ st->st_ctim.tv_nsec = 0;
#endif
st->st_blocks = di->i_blocks;
@@ -446,13 +456,18 @@ write_node (struct node *np)
di->i_links_count = st->st_nlink;
- di->i_atime = st->st_atime;
- di->i_mtime = st->st_mtime;
- di->i_ctime = st->st_ctime;
-#ifdef XXX
- di->i_atime.ts_nsec = st->st_atime_usec * 1000;
- di->i_mtime.ts_nsec = st->st_mtime_usec * 1000;
- di->i_ctime.ts_nsec = st->st_ctime_usec * 1000;
+ di->i_atime = st->st_atim.tv_sec;
+#ifdef not_yet
+ /* ``struct ext2_inode'' doesn't do better than sec. precision yet. */
+ di->i_atime.tv_nsec = st->st_atim.tv_nsec;
+#endif
+ di->i_mtime = st->st_mtim.tv_sec;
+#ifdef not_yet
+ di->i_mtime.tv_nsec = st->st_mtim.tv_nsec;
+#endif
+ di->i_ctime = st->st_ctim.tv_sec;
+#ifdef not_yet
+ di->i_ctime.tv_nsec = st->st_ctim.tv_nsec;
#endif
/* Convert generic flags in ST->st_flags to ext2-specific flags in DI
diff --git a/ext2fs/pager.c b/ext2fs/pager.c
index 3f4674b4..0136f9b1 100644
--- a/ext2fs/pager.c
+++ b/ext2fs/pager.c
@@ -119,7 +119,7 @@ free_page_buf (void *buf)
/* Find the location on disk of page OFFSET in NODE. Return the disk block
in BLOCK (if unallocated, then return 0). If *LOCK is 0, then a reader
- lock is aquired on NODE's ALLOC_LOCK before doing anything, and left
+ lock is acquired on NODE's ALLOC_LOCK before doing anything, and left
locked after the return -- even if an error is returned. 0 is returned
on success otherwise an error code. */
static error_t
@@ -851,7 +851,10 @@ drop_pager_softrefs (struct node *node)
spin_unlock (&node_to_page_lock);
if (MAY_CACHE && pager)
- pager_change_attributes (pager, 0, MEMORY_OBJECT_COPY_DELAY, 0);
+ {
+ pager_sync (pager, 0);
+ pager_change_attributes (pager, 0, MEMORY_OBJECT_COPY_DELAY, 0);
+ }
if (pager)
ports_port_deref (pager);
}
diff --git a/ext2fs/storeinfo.c b/ext2fs/storeinfo.c
index 08b917f3..395ab5ca 100644
--- a/ext2fs/storeinfo.c
+++ b/ext2fs/storeinfo.c
@@ -63,19 +63,17 @@ diskfs_S_file_get_storage_info (struct protid *cred,
err = ext2_getblk (node, index++, 0, &block);
if (err == EINVAL)
- /* Either a hole, or past the end of the file. */
- {
- block = 0;
- err = 0;
- }
- else if (err)
+ /* Either a hole, or past the end of the file.
+ A hole can't be mapped in runs since we don't know
+ where the blocks will be allocated, so we can't return the
+ underlying storage. */
+ err = EOPNOTSUPP;
+ if (err)
break;
block <<= log2_dev_blocks_per_fs_block;
if (num_runs == 0
- || ((block && run->start >= 0) /* Neither is a hole and... */
- ? (block != run->start + run->length) /* BLOCK doesn't follow RUN */
- : (block || run->start >= 0))) /* or one is, but not both */
+ || block != run->start + run->length) /* BLOCK doesn't follow RUN */
/* Add a new run. */
{
if (num_runs == runs_alloced)
@@ -93,8 +91,7 @@ diskfs_S_file_get_storage_info (struct protid *cred,
}
run = runs + num_runs++;
- /* -1 means a hole in OFFSETS. */
- run->start = block ?: (store_offset_t) -1;
+ run->start = block;
/* The length will get extended just below. */
run->length = 0;
}
diff --git a/fatfs/ChangeLog b/fatfs/ChangeLog
deleted file mode 100644
index 5c9eeb5c..00000000
--- a/fatfs/ChangeLog
+++ /dev/null
@@ -1,220 +0,0 @@
-2007-03-31 Thomas Schwinge <tschwinge@gnu.org>
-
- * Makefile (HURDLIBS): Put ``threads'' in front of ``ports''.
-
-2007-03-30 Thomas Schwinge <tschwinge@gnu.org>
-
- * inode.c (read_node): Correctly convert from nanoseconds to
- microseconds.
-
-2007-03-28 Thomas Schwinge <tschwinge@gnu.org>
-
- * Makefile (fatfs.static): New target.
-
- * main.c (diskfs_readonly): Remove variable.
- (main): Set `diskfs_readonly' and `diskfs_hard_readonly' to one.
-
-2005-07-12 Marcus Brinkmann <marcus@gnu.org>
-
- * pager.c (diskfs_get_filemap): Initialize upi->max_prot to PROT.
-
-2003-08-09 Marcus Brinkmann <marcus@gnu.org>
-
- * fat.h: Include <byteswap.h>.
- (read_dword) [BYTE_ORDER == BIG_ENDIAN]: Use bswap_32 to swap bytes.
- (write_dword) [BYTE_ORDER == BIG_ENDIAN]: Likewise.
- (read_word) [BYTE_ORDER == BIG_ENDIAN]: Use bswap_16 to swap bytes.
- (write_word) [BYTE_ORDER == BIG_ENDIAN]: Likewise.
-
-2003-08-03 Marco Gerards <metgerards@student.han.nl>
-
- * fatfs.h (struct disknode): New member DIRNODE.
- * inode.c (read_node): Added assertion to be sure the directory
- can always be found. Add directory dependancy to node by
- initializing DIRNODE and holding a reference.
- (diskfs_node_norefs): Release reference to DIRNODE.
- (write_node): Don't use diskfs_cached_lookup to lookup the
- directory, use DIRNODE instead and lock DP. Don't use diskfs_nput,
- use mutex_unlock instead.
- (diskfs_alloc_node): Add directory dependancy to node by
- initializing DIRNODE and holding a reference.
-
-2003-08-05 Marcus Brinkmann <marcus@gnu.org>
-
- * fat.c (fat_read_sblock): Catch error from store_read.
-
-2003-08-03 Marco Gerards <metgerards@student.han.nl>
-
- * inode.c (read_node): Fix typo.
-
-2003-08-01 Marco Gerards <metgerards@student.han.nl>
-
- * node-create.c: New file.
- * Makefile (SRCS): Added node-created.c.
- * dir.c: Include <hurd/fsys.h>.
- (diskfs_direnter_hard): Initialize a new block with zeros. Enter
- direntry and setup the virtual inode. Also handle directories
- correctly.
- (diskfs_rewrite_hard): Function rewritten.
- (diskfs_dirempty): Change logic to test if a file was deleted.
- * fat.c (fat_extend_chain): Unlock spin_lock when returning from
- function. Set dn->last to 0 when deallocating the complete
- file. Update dn->last when not deallocating the complete file. Set
- dn->first to zero when the complete file was deallocated. Also
- update dn->length_of_chain to the new amount of clusters in the
- chain.
- * main.c (diskfs_hard_readonly): Remove global variable.
-
-2003-07-29 Jeff Bailey <jbailey@nisa.net>
-
- * fatfs.h (LOG2_BLOCKS_PER_CLUSTER): Fix typo.
-
-2003-07-17 Marcus Brinkmann <marcus@gnu.org>
-
- * pager.c (find_cluster): Round to cluster size rather than adding
- cluster size.
-
-2003-07-14 Marco Gerards <metgerards@student.han.nl>
-
- * fat.c (fat_read_sblock): Don't test if the root dir size is a
- multiple of sectors_per_cluster. Reported by Barry deFreese
- (bddebian@cox.net).
-
- * fatfs.h (LOG2_BLOCKS_PER_CLUSTER): New macro.
- (FAT_FIRST_CLUSTER_BLOCK): Likewise.
- (fat_first_cluster_byte): Macro removed.
-
- * inode.c (read_node): Correctly setup diskfs_root_node for FAT32
- filesystems.
-
- * pager.c (fat_getcluster): Check for reading beyond allocsize
- correctly for file systems with a clustersize > vm_page_size.
- (file_pager_read_small_page): Don't use byte offsets when
- calculating the block.
- (file_pager_read_huge_page): Likewise.
- (pending_clusters_write): Likewise.
- (file_pager_write_small_page): Likewise.
- (STAT_INC): Cast to void to suppress warning.
-
-2003-04-26 Marco Gerards <metgerards@student.han.nl>
-
- * dir.c (diskfs_get_directs): Consider ENTRY when adding
- "." and ".." for the rootnode.
-
- * inode.c (read_node): Use ifind instead of diskfs_cached_lookup
- and do not use diskfs_nput anymore.
- * main.c (diskfs_S_fsys_getfile): New function.
-
-2002-10-06 Marcus Brinkmann <marcus@gnu.org>
-
- * main.c (diskfs_server_version): Set to HURD_VERSION.
-
- * dir.c (dirscanblock): Always emulate "." and ".." for the root
- dir, even on FAT32.
- (diskfs_get_directs): Likewise. New variable DOTDOT. Set EP to
- DOT or DOTDOT when approriate. Implement inode number generation
- with vi_rlookup.
- Submitted by Marco Gerards <mg@friaco.nl>.
-
- * main.c (fetch_root): Implement this for FAT32.
- Submitted by Marco Gerards <mg@friaco.nl>.
-
- * fatfs.h: Renamed prototype from fat_next_cluster to
- fat_get_next_cluster.
- * fat.c (fat_extend_chain): Replace CLUSTERS_PER_CHAIN with
- CLUSTERS_PER_TABLE and LOG2_CLUSTERS_PER_CHAIN with
- LOG2_CLUSTERS_PER_TABLE.
- (fat_getcluster): Likewise.
- (fat_truncate_node): Likewise.
- Submitted by Marco Gerards <mg@friaco.nl>.
-
- * fat.c (fat_get_freespace): New function.
- * fat.h: New prototype for fat_get_freespace.
- * inode.c (diskfs_set_statfs): Set ST->f_bfree and ST->f_bavail.
- Submitted by Marco Gerards <mg@friaco.nl>.
-
- * fatfs.h: New prototypes for fs_uid and fs_gid.
- New prototype for refresh_node_stats.
- * inode.c (read_node): Set ST->st_uid to fs_uid and ST->st_gid to
- fs_gid.
- (refresh_node_stats): New function.
- * main.c: New variables default_fs_uid, default_fs_gid, fs_uid, fs_gid.
- Include <argz.h>
- (options): New variable.
- (startup_children): Likewise.
- (startup_argp): Likewise.
- (runtime_children): Likewise.
- (runtime_argp): Likewise.
- (diskfs_runtime_argp): Likewise.
- (parse_opt): New function.
- (main): Set default_fs_uid, default_fs_gid, fs_uid and fs_gid.
- Pass startup_argp to diskfs_init_main.
- Submitted by Marco Gerards <mg@friaco.nl>.
-
- * main.c (read_sblock): Move to ...
- * fat.c (read_sblock): ... here and rename to fat_read_sblock. New
- variable READ. Don't use disk_image but access store directly.
- (fat_read_sblock): Remove check for large clusters.
- * fat.c: Include <time.h>
- Submitted by Marco Gerards <mg@friaco.nl>.
-
- * fatfs.h (struct user_pager_info): Rename DISK in enum pager_type
- to FAT.
- (disk_image): Rename to fat_image and make extern.
- (host_name, mounted_on): Remove cruft.
- (sblock, dr_root_node): Make extern.
- * pager.c (create_disk_pager): Rename to create_fat_pager. Create
- the pager with the type FAT and size of the FAT, not the whole
- disk. Use fat_image instead disk_image.
- (pager_read_page): Replace DISK with FAT and call
- fat_pager_read_page instead disk_pager_read_page.
- (pager_write_page): Replace DISK with FAT and call
- fat_pager_write_page instead disk_pager_write_page.
- (pager_report_extent): Replace DISK with FAT and return new size.
- (disk_pager_read_page): Rename to fat_pager_read_page. Adjusted
- to restrict to new size. Use memset instead bcopy. dev_end
- renamed to fat_end. Add beginning of FAT to page.
- (disk_pager_write_page): Rename to fat_pager_write_page. Adjusted
- to restrict to new size. dev_end renamed to fat_end. Add
- beginning to FAT to PAGE.
- (file_pager_read_huge_page): Use memcpy instead bcopy.
- (pending_clusters_write): Likewise.
- * fat.c (fat_write_next_cluster): Don't add the beginning of FAT
- to FAT_ENTRY_OFFSET. Reflect renaming of disk_image to fat_image.
- (fat_get_next_cluster): Likewise.
- * main.c (main): Call fat_read_sblock, not read_block. Call
- create_fat_pager instead create_disk_pager, and do this only after
- reading the superblock.
-
- * main.c (fetch_root): Use memset, not bzero.
- (read_sblock): Use memcpy, not bcopy.
- * dir.c (diskfs_get_directs): Replace bcopy with memcpy.
-
-2002-04-15 Marcus Brinkmann <marcus@gnu.org>
-
- * dir.c (diskfs_get_directs): Count the special cased DOT and
- DOTDOT directories for root directory nodes in FAT12 and FAT16
- file systems.
-
- * dir.c (dirscanblock): Determine the parent inode correctly.
- Submitted by Marco Gerards <mg@friaco.nl>.
-
- * inode.c (read_node): Add VK.dir_offset to BUF before doing the
- pointer conversion.
- (write_node): Likewise.
- Submitted by Marco Gerards <mg@friaco.nl>.
-
- * inode.c (write_node): Save the modification time as write time.
- Submitted by Marco Gerards <mg@friaco.nl>.
-
- * fat.h: Add prototype for fat_from_epoch().
- Submitted by Marco Gerards <mg@friaco.nl>.
-
- * inode.c (read_node): For the root dir of a FAT12/16 file system,
- set allocsize to size of the root directory region.
- (read_node): For files, round up to a full cluster multiple.
- Reported by Marco Gerards <mg@friaco.nl>.
-
-2000-05-05 Marcus Brinkmann <marcus@gnu.org>
-
- * Initial release.
diff --git a/fatfs/Makefile b/fatfs/Makefile
index 7a24840b..06ed8778 100644
--- a/fatfs/Makefile
+++ b/fatfs/Makefile
@@ -21,7 +21,6 @@ makemode := server
target = fatfs
SRCS = inode.c main.c dir.c pager.c fat.c virt-inode.c node-create.c
LCLHDRS = fat.h fatfs.h virt-inode.h
-DIST_FILES = EXTENSIONS
OBJS = $(SRCS:.c=.o)
HURDLIBS = diskfs iohelp fshelp store pager threads ports ihash shouldbeinlibc
diff --git a/fatfs/dir.c b/fatfs/dir.c
index 78a44edc..762320f8 100644
--- a/fatfs/dir.c
+++ b/fatfs/dir.c
@@ -1,5 +1,8 @@
/* dir.c - FAT filesystem.
- Copyright (C) 1997, 1998, 1999, 2002, 2003 Free Software Foundation, Inc.
+
+ Copyright (C) 1997, 1998, 1999, 2002, 2003, 2007
+ Free Software Foundation, Inc.
+
Written by Thomas Bushnell, n/BSG and Marcus Brinkmann.
This file is part of the GNU Hurd.
@@ -231,8 +234,7 @@ diskfs_lookup_hard (struct node *dp, const char *name, enum lookup_type type,
inum = 0;
- if (!diskfs_check_readonly ())
- dp->dn_set_atime = 1;
+ diskfs_set_node_atime (dp);
/* Start the lookup at DP->dn->dir_idx. */
idx = dp->dn->dir_idx;
@@ -269,8 +271,7 @@ diskfs_lookup_hard (struct node *dp, const char *name, enum lookup_type type,
}
}
- if (!diskfs_check_readonly ())
- dp->dn_set_atime = 1;
+ diskfs_set_node_atime (dp);
if (diskfs_synchronous)
diskfs_node_update (dp, 1);
@@ -680,7 +681,7 @@ diskfs_direnter_hard (struct node *dp, const char *name, struct node *np,
/* Following a lookup call for REMOVE, this removes the link from the
directory. DP is the directory being changed and DS is the cached
information returned from lookup. This call is only valid if the
- directory has been locked continously since the call to lookup, and
+ directory has been locked continuously since the call to lookup, and
only if that call succeeded. */
error_t
diskfs_dirremove_hard (struct node *dp, struct dirstat *ds)
@@ -781,8 +782,7 @@ diskfs_dirempty (struct node *dp, struct protid *cred)
mach_port_deallocate (mach_task_self (), memobj);
assert (!err);
- if (! diskfs_check_readonly ())
- dp->dn_set_atime = 1;
+ diskfs_set_node_atime (dp);
for (curoff = buf;
!hit && curoff < buf + dp->dn_stat.st_size;
@@ -798,8 +798,7 @@ diskfs_dirempty (struct node *dp, struct protid *cred)
hit = 1;
}
- if (! diskfs_check_readonly ())
- dp->dn_set_atime = 1;
+ diskfs_set_node_atime (dp);
if (diskfs_synchronous)
diskfs_node_update (dp, 1);
diff --git a/fatfs/fat.h b/fatfs/fat.h
index 87af27db..58b45c63 100644
--- a/fatfs/fat.h
+++ b/fatfs/fat.h
@@ -72,7 +72,7 @@
Data
The data region occupies the rest of the filesystem and stores
- the actual file and directory data. It is seperated in clusters,
+ the actual file and directory data. It is separated in clusters,
which are indexed in the FAT.
The size of the data region is stored in the word at offset 19
diff --git a/fatfs/inode.c b/fatfs/inode.c
index cce8a084..2a427933 100644
--- a/fatfs/inode.c
+++ b/fatfs/inode.c
@@ -385,9 +385,7 @@ read_node (struct node *np, vm_address_t buf)
{
struct timespec ts;
fat_to_epoch (dr->write_date, dr->write_time, &ts);
- st->st_ctime = st->st_mtime = st->st_atime = ts.tv_sec;
- st->st_ctime_usec = st->st_mtime_usec = st->st_atime_usec
- = ts.tv_nsec / 1000;
+ st->st_ctim = st->st_mtim = st->st_atim = ts;
}
st->st_blksize = bytes_per_sector;
diff --git a/fatfs/pager.c b/fatfs/pager.c
index 22adb089..e617af03 100644
--- a/fatfs/pager.c
+++ b/fatfs/pager.c
@@ -91,7 +91,7 @@ free_page_buf (void *buf)
/* Find the location on disk of page OFFSET in NODE. Return the disk
cluster in CLUSTER. If *LOCK is 0, then it a reader
- lock is aquired on NODE's ALLOC_LOCK before doing anything, and left
+ lock is acquired on NODE's ALLOC_LOCK before doing anything, and left
locked after return -- even if an error is returned. 0 on success or an
error code otherwise is returned. */
static error_t
diff --git a/fstests/ChangeLog b/fstests/ChangeLog
deleted file mode 100644
index 599a6c80..00000000
--- a/fstests/ChangeLog
+++ /dev/null
@@ -1,70 +0,0 @@
-2002-03-23 James A. Morrison <ja2morri@uwaterloo.ca>
-
- * fstests.c: Include <error.h>.
- (main): Use error, not perror.
- [HURDISH_TESTS]: Use this rather then having the code in question
- #if 0'd out.
- * timertest.c: Include <error.h> and <errno.h>
- (main): Use error, not perror and exit.
-
-2002-03-05 Marcus Brinkmann <marcus@gnu.org>
-
- * fstests.c (main): Call dir_lookup, not dir_pathtrans.
- Reported by James A Morrison <ja2morri@student.math.uwaterloo.ca>.
-
-2001-02-25 Roland McGrath <roland@frob.com>
-
- * fstests.c (main): sync now returns void.
-
- * timertest.c: Include <stdlib.h> for decl.
-
-2000-03-26 Roland McGrath <roland@baalperazim.frob.com>
-
- * fstests.c (main): Fix return type. #if 0 out some unused variables.
-
-Thu Jun 27 17:59:04 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * Makefile (targets): Comment out opendisk for now.
-
-Mon Apr 29 16:43:44 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * Makefile (OBJS): Delete variable.
-
-Thu Jul 6 21:03:12 1995 Michael I Bushnell <mib@duality.gnu.ai.mit.edu>
-
- * Makefile (OBJS): New var.
- (timertest, fstests, opendisk, fdtests): List object files.
-
-Wed Aug 31 12:02:01 1994 Michael I Bushnell <mib@geech.gnu.ai.mit.edu>
-
- * Makefile (targets): Added opendisk.
- (SRCS): Added opendisk.c.
- * opendisk.c: New file.
-
-Wed Aug 31 03:26:13 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * fstests.c: Include unistd.h.
- (main): #if 0 out unused variables.
-
-Tue Aug 16 13:55:04 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * timertest.c (main): Don't sigpause; instead getchar, so we are
- blocked in an RPC when the signal arrives--do sigpause on EOF.
-
-Thu Jul 21 19:14:30 1994 Michael I Bushnell <mib@geech.gnu.ai.mit.edu>
-
- * Makefile: Rewritten to use new scheme.
-
-Tue Jul 19 12:43:00 1994 Michael I Bushnell (mib@churchy.gnu.ai.mit.edu)
-
- * Makefile (OBJS): Deleted variables.
- (fstests, fdtests, timertest): Don't use variable $(link) anymore.
- (install): Install all three programs.
-
-Tue Jul 5 14:20:48 1994 Michael I Bushnell (mib@churchy.gnu.ai.mit.edu)
-
- * Makefile (SRCS): New variable.
-
-Mon Jun 20 15:05:34 1994 Michael I Bushnell (mib@churchy.gnu.ai.mit.edu)
-
- * Makefile (install): Use $(INSTALL_BIN) instead of cp.
diff --git a/ftpfs/ChangeLog b/ftpfs/ChangeLog
deleted file mode 100644
index b9866ca9..00000000
--- a/ftpfs/ChangeLog
+++ /dev/null
@@ -1,265 +0,0 @@
-2006-07-11 Samuel Thibault <samuel.thibault@ens-lyon.org>
-
- * node.c (ftpfs_create_node): Check the result from hurd_ihash_add().
- Add E to the hash table instead of NEW.
-
-2005-06-14 Hugues Larrive <hugues.larrive@gmail.com>
-
- * ftpfs.c (parse_startup_opt): User names may contain a @, so take
- the last @ of FTPFS_REMOTE_FS.
- * host.c (split_server_name): User names may contain a @, so take
- the last @ of P.
-
-2003-08-17 Marcus Brinkmann <marcus@gnu.org>
-
- * ftpfs.h: Include <hurd/ihash.h>.
- (struct ftpfs): Change type of INODE_MAPPINGS to struct
- hurd_ihash.
- (struct ftpfs_dir_entry): Change type of INODE_LOCP to
- hurd_ihash_locp_t.
- * node.c (ftpfs_create_node): Call hurd_ihash_add, not ihash_add.
- (netfs_node_norefs): Call hurd_ihash_locp_remove, not
- ihash_locp_remove.
- * fs.c: Include <stddef.h>.
- (ftpfs_create): Call hurd_ihash_init, not hurd_ihash_create.
- Call hurd_ihash_destroy on error.
-
-2002-10-18 Moritz Schulte <moritz@duesseldorf.ccc.de>
-
- * dir.c (ftpfs_dir_lookup): Initialize NES.entry.
-
-2002-05-13 Roland McGrath <roland@frob.com>
-
- * dir.c (ftpfs_refresh_node): Set NODE->nn_translated appropriately.
-
-2002-05-13 Marcus Brinkmann <marcus@gnu.org>
-
- * ftpfs.c (netfs_server_name, netfs_server_version): New
- variables.
-
-2002-05-08 Roland McGrath <roland@frob.com>
-
- * conn.c (ftpfs_get_ftp_conn): Cast to uintptr_t before void *.
- * ftpfs.c (cntl_debug): Vice versa.
-
-2002-04-13 Moritz Schulte <moritz@chaosdorf.de>
-
- * ftpfs.c: Include <sys/stat.h>
- (main): Stat the underlying node and initialize the root node's
- stat information.
-
- * dir.c (ftpfs_refresh_node): If refreshing the root node, simply
- use the old stat information.
-
-2002-03-11 Roland McGrath <roland@frob.com>
-
- * ftpfs.c (parse_startup_opt): If given one argument with no :,
- use "/" as the remote root.
-
-2001-12-29 Roland McGrath <roland@frob.com>
-
- * netfs.c (netfs_attempt_statfs): Implement this,
- returning all zeros except for f_type and f_fsid.
-
-2001-12-22 Roland McGrath <roland@frob.com>
-
- * fs.c (ftpfs_create): Move braces around to avoid warning.
-
-2001-02-12 Marcus Brinkmann <marcus@gnu.org>
-
- * ftpfs.c: Include <version.h>. Add global variable
- ARGP_PROGRAM_VERSION. Add period to DOC.
-
-2001-01-07 Marcus Brinkmann <marcus@gnu.org>
-
- * dir.c (ftpfs_dir_create): Fix last change (calloc invocation).
-
-2000-12-21 Marcus Brinkmann <marcus@gnu.org>
-
- * dir.c (ftpfs_dir_create): New macro INIT_HTABLE_LEN to
- specify initialize htable_len. New variable htable,
- allocate memory to it with calloc before acquiring a node
- reference. If this fails, return any allocated memory and
- return with ENOMEM. Set new->htable_len to INIT_HTABLE_LEN
- and new->htable to htable. Don't bzero htable anymore, as
- we use calloc.
-
-2000-07-26 Mark Kettenis <kettenis@gnu.org>
-
- * Makefile (HURDLIBS): Reorder libs such that the threads lib
- comes before the ports lib. This makes sure the functions in
- libthreads properly override the stubs in libports with the new
- dynamic linker semantics in glibc 2.2.
-
-1999-07-10 Roland McGrath <roland@baalperazim.frob.com>
-
- * netfs.c: Add #include <sys/mman.h> for munmap decl.
- * ccache.c: Likewise.
-
-1999-07-09 Thomas Bushnell, BSG <tb@mit.edu>
-
- * ccache.c (ccache_read): Use mmap instead of vm_allocate.
- * netfs.c (get_dirents): Likewise.
-
-1999-07-03 Thomas Bushnell, BSG <tb@mit.edu>
-
- * ccache.c (ccache_read): Use munmap instead of vm_deallocate.
- (ccache_invalidate): Likewise.
- (ccache_free): Likewise.
- * netfs.c (get_dirents): Likewise.
-
-Sun Jan 31 18:33:55 1999 Thomas Bushnell, BSG <tb@mit.edu>
-
- * netfs.c (netfs_attempt_utimes): Implement new possibility that
- ATIME or MTIME might be null.
-
-1998-10-20 Roland McGrath <roland@baalperazim.frob.com>
-
- * ftpfs.c (netfs_append_args): Add braces to silence gcc warning.
- * netfs.c (get_dirents): Likewise.
- (netfs_get_dirents): Likewise.
- * dir.c (ftpfs_refresh_node): Likewise.
- (ftpfs_dir_lookup): Likewise.
-
-1998-09-04 Roland McGrath <roland@baalperazim.frob.com>
-
- * ftpfs.c (netfs_append_args): Use %ld for time_t and %Zu for size_t.
-
-1997-09-09 Miles Bader <miles@gnu.ai.mit.edu>
-
- * ftpfs.c (parse_runtime_opt): New function.
- (runtime_argp): Use it.
- (netfs_append_args): Fix printed name of --node-cache-size.
-
- * dir.c (delete): Immediately free entries without nodes.
-
-1997-08-29 Miles Bader <miles@gnu.ai.mit.edu>
-
- * ftpfs.c (parse_startup_opt): Report an error if no filesystem is
- supplied.
-
-1997-08-27 Miles Bader <miles@gnu.ai.mit.edu>
-
- * ftpfs.c (parse_common_opt): Turn on debugging when there *aren't*
- any errors...
-
-1997-08-22 Miles Bader <miles@gnu.ai.mit.edu>
-
- * ftpfs.c (parse_common_opt): Release DEBUG_LOCK even if we get an
- error.
-
-1997-08-19 Miles Bader <miles@gnu.ai.mit.edu>
-
- * ftpfs.c (netfs_maxsymlinks): Initialize to 12.
-
- * ccache.c (ccache_read): Always update CC->max to something
- reasonable after a transfer.
-
-1997-08-18 Miles Bader <miles@gnu.ai.mit.edu>
-
- * ftpfs.c (debug_stream, debug_stream_name): New variables.
- (cntl_debug): Print to DEBUG_STREAM.
- (debug_lock): New variable (was local to cntl_debug).
- (parse_common_opt): Accept a FILE argument to --debug.
- (netfs_append_args): Print FILE argument to --debug.
-
-1997-08-15 Miles Bader <miles@gnu.ai.mit.edu>
-
- * netfs.c (netfs_attempt_mkfile): Unlock DIR.
-
- * dir.c (ftpfs_dir_null_lookup): New function.
- (ftpfs_dir_lookup): Handle "" lookups like ".".
- * ftpfs.h (ftpfs_dir_null_lookup): New declaration.
- * fs.c (ftpfs_create): Use ftpfs_dir_null_lookup instead of
- ftpfs_dir_lookup.
-
- * dir.c (ftpfs_dir_lookup): Set E's name timestamp for noent entries.
- (ftpfs_refresh_node): Record ENOENT entries.
- (refresh_dir): Add PRESERVE_ENTRY parameter; all callers changed.
-
-1997-08-14 Miles Bader <miles@gnu.ai.mit.edu>
-
- * ftpfs.c (ftpfs_ftp_hooks): Use ports_self_interrupted to check
- for interrupts.
- * ccache.c (ccache_read): Likewise.
-
-1997-08-12 Miles Bader <miles@gnu.ai.mit.edu>
-
- * ftpfs.c (main): Supply the FSID argument to ftpfs_create.
- * dir.c (update_entry): Set E->stat.st_fsid & st_fstype.
- (ftpfs_next_inode): Variable removed.
- * ftpfs.h (struct ftpfs ): Add FSID & NEXT_INODE fields.
- (ftpfs_create): Add FSID parameter.
- * fs.c (ftpfs_create): Add FSID parameter. Initialize FSID &
- NEXT_INODE fields.
-
-1997-08-11 Miles Bader <miles@gnu.ai.mit.edu>
-
- * dir.c (sweep): Don't delete entries that have the NOENT flag set.
- (refresh_dir): Ensure there are entries for `.' and `..'.
-
-1997-08-09 Miles Bader <miles@gnu.ai.mit.edu>
-
- * dir.c (struct new_entry_state): DIR_PFX & DIR_PFX_LEN fields removed.
- (update_new_entry): Don't futz with NAME anymore.
-
- * ftpfs.c (ftpfs_hooks): Initialize INTERRUPT_CHECK Field.
- * ccache.c (ccache_read): Check for thread cancelation.
-
-1997-08-08 Miles Bader <miles@gnu.ai.mit.edu>
-
- * dir.c (update_ordered_entry): Correctly handle a non-empty list.
- Only insert E in the ordered entry list if it's not already there.
- (refresh_dir): Don't clear the ordered entry list.
- Only reset bulk stat detection state if actually doing a bulk stat.
- Initialize DFS.prev_entry_next_p instead of DFS.prev_entry.
- (struct dir_fetch_state): Replace PREV_ENTRY by PREV_ENTRY_NEXT_P.
- (lookup): Grow the hash table when it gets large.
- (rehash): Zero the new hash table.
-
- * dir.c (path_append): Macro removed.
- (ftpfs_dir_lookup, ftpfs_refresh_node): Use ftp_conn_append_name
- instead of path_append.
- Don't set dir_pfx fields in RES anymore.
- (update_old_entry): Don't futz with NAME anymore.
- (struct refresh_entry_state): DIR_PFX & DIR_PFX_LEN fields removed.
-
-1997-08-07 Miles Bader <miles@gnu.ai.mit.edu>
-
- * ftpfs.c (DEFAULT_NAME_TIMEOUT): New macro.
- (DEFAULT_DIR_TIMEOUT, DEFAULT_DIRENT_TIMEOUT): Macros removed.
- (OPT_NAME_TIMEOUT): New macro.
- (OPT_DIR_TIMEOUT, OPT_DIRENT_TIMEOUT): Macros removed.
- (common_options, parse_common_opt, netfs_append_args, main):
- Replace --dir-timeout & --dirent-timeout by --name-timeout.
- Add --bulk-stat-period and --bulk-stat-threshold options.
- (netfs_append_args): Output --debug.
-
- * ftpfs.h (struct ftpfs_params): Remove dirent_timeout and
- dir_timeout fields. Add name_timeout field.
- * dir.c (ftpfs_dir_lookup): dirent_timeout parameter renamed to
- name_timeout and dirent_timestamp field renamed to name_timestamp.
- (lookup): Initialize timestamps.
- * ftpfs.h (struct ftpfs_dir): timestamp renamed to stat_timestamp.
- Add name_timestamp field.
- (struct ftpfs_dir_entry): dirent_timestamp renamed to name_timestamp.
-
- * dir.c (update_ordered_name): New function.
- (refresh_dir): Use ftp_conn_get_names instead of huge wodge of code.
- Update new timestamps.
-
-1997-08-06 Miles Bader <miles@gnu.ai.mit.edu>
-
- * dir.c (update_entry): Allow ST to be zero. Don't leak memory
- when updating symlink info. Change return type to void. Remove
- NO_LOCK parameter.
- (update_ordered_entry, update_old_entry, update_new_entry): Update
- calls to update_entry.
- (refresh_dir): Add UPDATE_STATS parameter, and only fetch names if
- it's zero.
- (ftpfs_dir_refresh, ftpfs_refresh_node, ftpfs_dir_lookup): Supply
- UPDATE_STATS argument to refresh_dir.
-
- * host.c (split_server_name): Enable password parsing.
-
- * dir.c (lookup): Initialize the NODE field.
diff --git a/ftpfs/dir.c b/ftpfs/dir.c
index 8544a325..8ef719d8 100644
--- a/ftpfs/dir.c
+++ b/ftpfs/dir.c
@@ -485,7 +485,7 @@ ftpfs_refresh_node (struct node *node)
}
else if (*(entry->name))
{
- /* The root node is treated seperately below. */
+ /* The root node is treated separately below. */
struct ftp_conn *conn;
err = ftpfs_get_ftp_conn (dir->fs, &conn);
@@ -532,7 +532,9 @@ ftpfs_refresh_node (struct node *node)
}
}
- if ((entry->stat.st_mtime < node->nn_stat.st_mtime
+ if ((entry->stat.st_mtim.tv_sec < node->nn_stat.st_mtim.tv_sec
+ || (entry->stat.st_mtim.tv_sec == node->nn_stat.st_mtim.tv_sec
+ && entry->stat.st_mtim.tv_nsec < node->nn_stat.st_mtim.tv_nsec)
|| entry->stat.st_size != node->nn_stat.st_size)
&& nn && nn->contents)
/* The file has changed. */
@@ -773,7 +775,7 @@ ftpfs_dir_lookup (struct ftpfs_dir *dir, const char *name,
}
/* Lookup the null name in DIR, and return a node for it in NODE. Unlike
- ftpfs_dir_lookup, this won't attempt to validate the existance of the
+ ftpfs_dir_lookup, this won't attempt to validate the existence of the
entry (to avoid opening a new connection if possible) -- that will happen
the first time the entry is refreshed. Also unlink ftpfs_dir_lookup, this
function doesn't expect DIR to be locked, and won't return *NODE locked.
diff --git a/ftpfs/ftpfs.c b/ftpfs/ftpfs.c
index 09c072d1..393cc5ba 100644
--- a/ftpfs/ftpfs.c
+++ b/ftpfs/ftpfs.c
@@ -272,14 +272,16 @@ parse_startup_opt (int key, char *arg, struct argp_state *state)
ftpfs_remote_root = sep + 1;
/* Lookup the ftp server (the part before the `:'). */
- *sep = '\0';
+ if (sep)
+ *sep = '\0';
err = lookup_server (ftpfs_remote_fs, &ftpfs_ftp_params, &h_err);
if (err == EINVAL)
argp_failure (state, 10, 0, "%s: %s",
ftpfs_remote_fs, hstrerror (h_err));
else if (err)
argp_failure (state, 11, err, "%s", ftpfs_remote_fs);
- *sep = ':';
+ if (sep)
+ *sep = ':';
}
case ARGP_KEY_INIT:
diff --git a/ftpfs/ftpfs.h b/ftpfs/ftpfs.h
index d1d816d7..0eef5bde 100644
--- a/ftpfs/ftpfs.h
+++ b/ftpfs/ftpfs.h
@@ -138,7 +138,7 @@ struct netnode
/* Various parameters that can be used to change the behavior of an ftpfs. */
struct ftpfs_params
{
- /* Amount of time name existance is cached. */
+ /* Amount of time name existence is cached. */
time_t name_timeout;
/* Amount of time stat information is cached. */
@@ -240,7 +240,7 @@ error_t ftpfs_dir_lookup (struct ftpfs_dir *dir, const char *name,
struct node **node);
/* Lookup the null name in DIR, and return a node for it in NODE. Unlike
- ftpfs_dir_lookup, this won't attempt to validate the existance of the
+ ftpfs_dir_lookup, this won't attempt to validate the existence of the
entry (to avoid opening a new connection if possible) -- that will happen
the first time the entry is refreshed. Also unlink ftpfs_dir_lookup, this
function doesn't expect DIR to be locked, and won't return *NODE locked.
diff --git a/ftpfs/netfs.c b/ftpfs/netfs.c
index 0bc6f5be..8922f3ab 100644
--- a/ftpfs/netfs.c
+++ b/ftpfs/netfs.c
@@ -1,7 +1,9 @@
/* ftpfs interface to libnetfs
- Copyright (C) 1997,98,99,2001 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1998, 1999, 2001, 2007 Free Software Foundation, Inc.
+
Written by Miles Bader <miles@gnu.org>
+
This file is part of the GNU Hurd.
The GNU Hurd is free software; you can redistribute it and/or
@@ -75,18 +77,12 @@ netfs_attempt_utimes (struct iouser *cred, struct node *node,
if (! err)
{
if (atime)
- {
- node->nn_stat.st_atime = atime->tv_sec;
- node->nn_stat.st_atime_usec = atime->tv_nsec / 1000;
- }
+ node->nn_stat.st_atim = *atime;
else
flags |= TOUCH_ATIME;
if (mtime)
- {
- node->nn_stat.st_mtime = mtime->tv_sec;
- node->nn_stat.st_mtime_usec = mtime->tv_nsec / 1000;
- }
+ node->nn_stat.st_mtim = *mtime;
else
flags |= TOUCH_MTIME;
diff --git a/hostmux/ChangeLog b/hostmux/ChangeLog
deleted file mode 100644
index 239c8f88..00000000
--- a/hostmux/ChangeLog
+++ /dev/null
@@ -1,106 +0,0 @@
-2004-10-23 Marcus Brinkmann <marcus@gnu.org>
-
- * hostmux-xinl.c (__OPTIMIZE__): Define to 1 instead of nothing.
-
-2002-06-02 Marcus Brinkmann <marcus@gnu.org>
-
- * mux.c (netfs_get_dirents): Initialize COUNT with 2, to take into
- account the DOT and DOTDOT directories when skipping over the
- first FIRST_ENTRY entries.
-
-2002-05-13 Roland McGrath <roland@frob.com>
-
- * mux.c (netfs_attempt_chmod): Handle MODE arg with no S_IFMT bits set.
-
- * leaf.c (create_host_node): Set NEW->nn_translated appropriately.
- * hostmux.c (main): Set netfs_root_node->nn_translated to zero.
-
-2002-05-13 Marcus Brinkmann <marcus@gnu.org>
-
- * hostmux.c (netfs_server_name, netfs_server_version): New
- variables.
-
-2002-03-10 Neal H Walfield <neal@cs.uml.edu>
-
- * mux.c (lookup_addrinfo): Renamed from lookup_hostent. Change HE
- from a struct hostent to a struct addrinfo.
- (lookup_host): Use lookup_addrinfo, not lookup_hostent.
- Reported by James A. Morrison <ja2morri@uwaterloo.ca>.
-
-2001-08-01 Marcus Brinkmann <marcus@gnu.org>
-
- * mux.c (free_name): Swap order of memory releases.
- Reported by Kalle Olavi Niemitalo <kon@iki.fi>
-
-2001-02-12 Marcus Brinkmann <marcus@gnu.org>
-
- * hostmux.c: Include <version.h>. Add global variable
- ARGP_PROGRAM_VERSION. Add period to DOC.
-
-2000-07-26 Mark Kettenis <kettenis@gnu.org>
-
- * Makefile (HURDLIBS): Reorder libs such that the threads lib
- comes before the ports lib. This makes sure the functions in
- libthreads properly override the stubs in libports with the new
- dynamic linker semantics in glibc 2.2.
-
-1999-07-11 Roland McGrath <roland@baalperazim.frob.com>
-
- * mux.c: Add #include <sys/mman.h>.
-
-1999-07-09 Thomas Bushnell, BSG <tb@mit.edu>
-
- * mux.c (netfs_get_dirents): Use mmap instead of vm_allocate.
-
-Tue Feb 16 05:09:49 1999 Thomas Bushnell, BSG <tb@mit.edu>
-
- * Makefile (MIGSTUBS): Deleted variable; neither ioServer nor
- socketServer seem to be used.
-
-Sun Jan 31 18:34:59 1999 Thomas Bushnell, BSG <tb@mit.edu>
-
- * node.c (netfs_attempt_utimes): Implement new possibility that
- ATIME or MTIME might be null.
-
-1997-08-27 Miles Bader <miles@gnu.ai.mit.edu>
-
- * mux.c (netfs_attempt_lookup): Clear *NODE on errors.
-
-1997-08-19 Miles Bader <miles@gnu.ai.mit.edu>
-
- * hostmux.c (main): If the underlying node isn't a directory,
- propagate read permission to execute permission.
-
- * mux.c (netfs_attempt_lookup): Check for lookup permission.
- Re-arrange code to correctly handle errors.
-
-1997-08-18 Miles Bader <miles@gnu.ai.mit.edu>
-
- * stubs.c (netfs_attempt_mkfile): Correctly implement the interface.
-
-1997-08-14 Miles Bader <miles@gnu.ai.mit.edu>
-
- * hostmux.c (DEFAULT_HOST_PAT): New macro.
- (options, main): Use DEFAULT_HOST_PAT.
- (netfs_append_args): New function.
-
-1997-08-11 Miles Bader <miles@gnu.ai.mit.edu>
-
- * mux.c (netfs_attempt_lookup): Handle `.' and `..' lookups.
- (netfs_get_dirents): Add entries for `.' and `..'.
-
-1997-08-07 Miles Bader <miles@gnu.ai.mit.edu>
-
- * hostmux.c (main): Use ARGP_IN_ORDER to parse args.
-
-1997-06-13 Miles Bader <miles@gnu.ai.mit.edu>
-
- * leaf.c (create_host_node): Set the times of the new node.
- (str_append): Function removed.
- (netfs_get_translator): Use argz_replace instead of doing it ourselves.
- * mux.c (netfs_get_dirents): MAX_DATA_LEN == 0 means `no limit'.
- * hostmux.h (touch): Function removed; all uses replaced by the
- appropriate use of fshelp_touch instead.
- (TOUCH_ATIME, TOUCH_MTIME, TOUCH_CTIME): Macro removed.
- (hostmux_maptime): Renamed from HOSTMUX_MAPPED_TIME; all uses changed.
- * hostmux.c (options): --host-pattern isn't optional.
diff --git a/hostmux/leaf.c b/hostmux/leaf.c
index aba32b84..fb53622f 100644
--- a/hostmux/leaf.c
+++ b/hostmux/leaf.c
@@ -53,7 +53,7 @@ netfs_get_translator (struct node *node, char **argz, size_t *argz_len)
*argz = 0; /* Initialize return value. */
*argz_len = 0;
- /* Return a copy of MUX's translator template, with occurances of
+ /* Return a copy of MUX's translator template, with occurrences of
HOST_PAT replaced by the canonical hostname. */
err = argz_append (argz, argz_len,
mux->trans_template, mux->trans_template_len);
diff --git a/hostmux/node.c b/hostmux/node.c
index 3576af90..d6edc53e 100644
--- a/hostmux/node.c
+++ b/hostmux/node.c
@@ -1,7 +1,9 @@
/* General fs node functions
- Copyright (C) 1997, 1999 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1999, 2007 Free Software Foundation, Inc.
+
Written by Miles Bader <miles@gnu.ai.mit.edu>
+
This file is part of the GNU Hurd.
The GNU Hurd is free software; you can redistribute it and/or
@@ -77,18 +79,12 @@ netfs_attempt_utimes (struct iouser *cred, struct node *node,
if (! err)
{
if (mtime)
- {
- node->nn_stat.st_mtime = mtime->tv_sec;
- node->nn_stat.st_mtime_usec = mtime->tv_nsec / 1000;
- }
+ node->nn_stat.st_mtim = *mtime;
else
flags |= TOUCH_MTIME;
if (atime)
- {
- node->nn_stat.st_atime = atime->tv_sec;
- node->nn_stat.st_atime_usec = atime->tv_nsec / 1000;
- }
+ node->nn_stat.st_atim = *atime;
else
flags |= TOUCH_ATIME;
diff --git a/hurd/ChangeLog b/hurd/ChangeLog
deleted file mode 100644
index 63109f20..00000000
--- a/hurd/ChangeLog
+++ /dev/null
@@ -1,1224 +0,0 @@
-2007-03-24 Thomas Schwinge <tschwinge@gnu.org>
-
- * fsys_reply.defs (fsys_syncfs_reply): Fix typo. Reported by Austin
- Thompson.
-
-2005-01-06 Marco Gerards <metgerards@student.han.nl>
-
- * kdioctl.defs: New file.
-
-2004-10-31 Alfred M. Szmidt <ams@gnu.org>
-
- * io.defs (io_read, io_write, io_select): Comment fixes.
-
-2004-03-30 Marco Gerards <metgerards@student.han.nl>
-
- * console.h (CONS_MOUSE_OFFSET_BASE): Redefined to 0x20.
-
-2003-02-15 Roland McGrath <roland@frob.com>
-
- * configure.ac: New file.
- * configure: New file.
- * install-headers.in: New file.
-
-2002-10-04 Marcus Brinkmann <marcus@gnu.org>
-
- * console.h (struct cons_display): Doc fix.
-
-2002-09-18 Marcus Brinkmann <marcus@gnu.org>
-
- * console.h (struct cons_display): Add a new flag
- CONS_FLAGS_TRACK_MOUSE.
- (CONS_MOUSE_BUTTON_MASK, CONS_MOUSE_BUTTON1, CONS_MOUSE_BUTTON2,
- CONS_MOUSE_BUTTON3, CONS_MOUSE_RELEASE, CONS_MOUSE_MOD_MASK,
- CONS_MOUSE_MOD_SHIFT, CONS_MOUSE_MOD_META, CONS_MOUSE_MOD_CTRL,
- CONS_MOUSE_OFFSET_BASE, CONS_MOUSE_EVENT_LENGTH,
- CONS_MOUSE_EVENT_PREFIX, CONS, MOUSE_EVENT): New macro.
- (CONS_KEY_B2): New macro.
-
-2002-09-16 Marcus Brinkmann <marcus@gnu.org>
-
- * console.h (conchar_attr_t): Add bits for italic and bold text
- attributes.
-
-2002-09-10 Marcus Brinkmann <marcus@gnu.org>
-
- * console.h (struct cons_display): New member FLAGS.
- (union cons_change_t): Likewise for WHAT->flags.
-
-2002-09-04 Marcus Brinkmann <marcus@gnu.org>
-
- * console.h: Include <wchar.h>.
-
-2002-08-28 Marcus Brinkmann <marcus@gnu.org>
-
- * console.h (struct cons_display): Fix comment on CUR_LINE.
-
-2002-08-22 Marcus Brinkmann <marcus@gnu.org>
-
- * console.h: Move here from ../console/.
- * Makefile (INSTHDRS): Add console.h.
-
-2002-08-03 Marcus Brinkmann <marcus@gnu.org>
-
- * hurd_types.defs (fsys_statfsbuf_t): Bump size up to 22.
-
-2002-06-26 Marcus Brinkmann <marcus@gnu.org>
-
- * fs_notify.defs: Add MsgOption for send timeout.
- (dir_changed): Changed to simpleroutine. Change type of first
- argument to fs_notify_t. Add TICKNO argument.
- (file_changed): Likewise.
- * hurd_types.defs (fs_notify_t): New type.
- * hurd_types.h (fs_notify_t): Likewise.
-
-2002-06-14 Roland McGrath <roland@frob.com>
-
- * paths.h (_SERVERS_DEFPAGER): New macro.
-
-2002-06-13 Roland McGrath <roland@frob.com>
-
- * fs.defs (dir_readdir): Revert AMOUNT type to int, since it's a count
- of entries and not a byte count.
-
-2002-06-09 Roland McGrath <roland@frob.com>
-
- * version.h: New file.
- * Makefile (INSTHDRS): Add it.
-
-2002-06-08 Roland McGrath <roland@frob.com>
-
- * hurd_types.defs (loff_t, ino64_t): New types, 64 bits.
- (off_t): Type removed.
- (off_array_t): Use loff_t instead of off_t as base type.
- * hurd_types.h (off_array_t): Likewise.
- [_FILE_OFFSET_BITS != 64] (io_statbuf_t, fsys_statfsbuf_t): Define
- using struct stat64/statfs64 instead of struct stat/statfs.
- * io.defs (io_identity): Use ino64_t for FILENO.
- * fs.defs (file_set_size): off_t -> loff_t
- * fs_notify.defs (file_changed): Likewise.
- * io.defs (io_write, io_read, io_seek): Likewise.
- * io_request.defs: Likewise for those RPCs' *_request variants.
- * io_reply.defs: Likewise for those RPCs' *_reply variants.
-
- * hurd_types.defs (size_t): Remove type.
- * fs.defs (dir_readdir): Use vm_size_t for AMOUNT.
- * socket.defs (socket_send, socket_recv): Likewise.
- * pfinet.defs (pfinet_siocgifconf): Likewise.
- * io.defs (io_write, io_read, io_readable): Likewise.
- * io_request.defs: Likewise for those RPCs' *_request variants.
- * io_reply.defs: Likewise for those RPCs' *_reply variants.
-
-2002-06-07 Roland McGrath <roland@frob.com>
-
- * hurd_types.defs (dev_t, ssize_t): Remove unused types.
- (uid_t, gid_t, mode_t, pid_t, off_t, size_t): Use int32/unsigned32.
- (retry_type, wait_status_t): Likewise.
- (file_changed_type_t, dir_changed_type_t): Likewise.
-
-2002-06-05 Roland McGrath <roland@frob.com>
-
- * hurd_types.h (struct procinfo): New member `taskevents'.
- (PI_FETCH_TASKEVENTS): New macro.
-
-2002-05-23 Roland McGrath <roland@frob.com>
-
- * newterm.defs: Add routine keywords.
-
- * Makefile (%.msgids, hurd.msgids): New rules.
-
-2002-05-22 Marcus Brinkmann <marcus@gnu.org>
-
- * process.defs (proc_setlogin): Remove comment about being
- deprecated. It is used to create login sandboxes.
-
-2002-05-20 Alfred M. Szmidt <ams@kemisten.nu>
-
- * paths.h (_SERVERS_STARTUP): Macro removed.
-
-2002-05-07 Roland McGrath <roland@frob.com>
-
- * msg.defs (msg_report_wait): int -> mach_msg_id_t
- * hurd_types.h: Include <mach/message.h>.
- (struct procinfo): int -> mach_msg_id_t for rpc_block.
-
-2002-05-03 Roland McGrath <roland@frob.com>
-
- * auth.defs (auth_user_authenticate): Add sreplyport argument.
- * auth_request.defs: New file.
-
-2002-02-17 Roland McGrath <roland@frob.com>
-
- * hurd_types.h (after #include <mach/thread_info.h>)
- [! THREAD_SCHED_INFO]: Include <mach/policy.h> for OSF Mach
- scheduler definitions.
- (struct procinfo) [TASK_SCHED_TIMESHARE_INFO]:
- Add new member `timeshare_base_info'.
- (struct procinfo.threadinfos) [! THREAD_SCHED_INFO]:
- Use `struct policy_infos' in place of `struct thread_sched_info'.
-
-2002-03-23 Roland McGrath <roland@frob.com>
-
- * default_pager.defs (default_pager_object_set_size): New RPC.
- * default_pager_reply.defs: New file.
-
-2002-03-17 Roland McGrath <roland@frob.com>
-
- * tioctl.defs [TIOCTL_IMPORTS]: Use this macro if defined.
-
-2002-03-05 Marcus Brinkmann <marcus@gnu.org>
-
- * fs.defs: Refer to dir_lookup, not dir_pathtrans, in comments.
- * fsys.defs: Likewise.
- * hurd_types.h (enum retry_type): Likewise.
- Reported by James A Morrison <ja2morri@student.math.uwaterloo.ca>.
-
-2002-01-01 Roland McGrath <roland@frob.com>
-
- * exec.defs (exec_exec, exec_setexecdata): Use SCP macro
- in place of `, servercopy'.
-
- * io.defs (io_write, io_read, io_readable): Use size_t in place
- of mach_msg_type_number_t.
- * socket.defs (socket_send, socket_recv): Likewise.
-
- * hurd_types.defs (RETURN_CODE_ARG): New macro, definition
- depends on [HAVE_MIG_RETCODE].
- * auth_reply.defs: Replace return code args with that.
- * crash_reply.defs: Likewise.
- * fsys_reply.defs: Likewise.
- * io_reply.defs: Likewise.
- * msg_reply.defs: Likewise.
- * process_reply.defs: Likewise.
- * startup_reply.defs: Likewise.
-
-2001-12-31 Roland McGrath <roland@frob.com>
-
- * auth_reply.defs: Change return code parameters to use `RetCode'
- keyword, for compatibility with OSF Mach mig.
- * crash_reply.defs: Likewise.
- * fsys_reply.defs: Likewise.
- * io_reply.defs: Likewise.
- * msg_reply.defs: Likewise.
- * process_reply.defs: Likewise.
- * startup_reply.defs: Likewise.
-
-2001-07-11 Marcus Brinkmann <marcus@gnu.org>
-
- * fs.defs (routine file_get_storage_info): Add dealloc to all out
- parameters (PORTS, INTS, OFFSETS, DATA).
- (routine file_get_fs_options): Add dealloc to out parameter OPTIONS.
-
- * fsys.defs (routine fsys_get_options): Add dealloc to out
- parameter OPTIONS.
-
- * process.defs (routine proc_getprocinfo): Add dealloc to out
- paramter PROCINFO.
-
-2001-06-15 Neal H Walfield <neal@cs.uml.edu>
-
- * hurd_types.h: New macro, FS_TRANS_ORPHAN.
-
-2001-05-01 Neal H Walfield <neal@cs.uml.edu>
-
- * hurd_types.defs (startup_t): Fix typo.
-
-2001-01-11 Marcus Brinkmann <marcus@gnu.org>
-
- * default_pager_types.h: New file.
- default_pager.defs: Import <default_pager_types.h>.
-
-2000-12-28 Roland McGrath <roland@frob.com>
-
- * default_pager.defs: New file, modified from the original version
- in <mach/default_pager.defs>. Adds new RPC, obsoletes an unused one.
- It is compatible enough that it doesn't really matter which version
- things use unless they are using the new RPC.
-
-2001-01-07 Marcus Brinkmann <marcus@gnu.org>
-
- * ioctl_types.h: Include <net/if.h>, define types sockaddr_t and
- ifname_t for iioctl.defs.
- * iioctl.defs: New file for network interface ioctls.
- * pfinet.defs: Remove old RPCs, fix subsystem number, add RPC for
- SIOCGIFCONF.
-
-2000-11-15 Marcus Brinkmann <marcus@gnu.org>
-
- * hurd_types.h: Doc fix reported by Neal H Walfield
- (neal@cs.uml.edu), STORAGE_NULL is actually STORAGE_ZERO.
-
-2000-01-26 Roland McGrath <roland@baalperazim.frob.com>
-
- * io_reply.defs (io_select_reply): Remove ID_TAG argument,
- which does not exist in the io_select RPC as defined in io.defs.
-
-1999-10-11 Roland McGrath <roland@baalperazim.frob.com>
-
- * fs.defs (dir_readdir): Replace dealloc with dealloc[] on out data.
-
-1999-09-13 Roland McGrath <roland@baalperazim.frob.com>
-
- * io.defs: Reverted changes related to io_map_segment.
-
-1999-09-07 Thomas Bushnell, BSG <tb@mit.edu>
-
- * io.defs (io_map_segment): New RPC.
- (io_map): Refer to io_map_segment; label as deprecated.
- (io_map_cntl, io_get_conch, io_release_conch, io_prenotify,
- io_eofnotify, io_postnotify, io_readnotify, io_readsleep,
- io_sigio): Label as deprecated.
-
-Tue May 11 13:38:50 1999 Thomas Bushnell, BSG <tb@mit.edu>
-
- * startup.defs: Doc fixes.
-
-1999-04-27 Roland McGrath <roland@baalperazim.frob.com>
-
- * hurd_types.h (EXEC_SIGTRAP): New macro.
-
-Mon Mar 15 14:48:24 1999 Thomas Bushnell, BSG <tb@mit.edu>
-
- * term.defs (term_get_peername): New RPC, suggested by Mark
- Kettenis (kettenis@wins.uva.nl).
-
-Thu Feb 18 00:29:43 1999 Thomas Bushnell, BSG <tb@mit.edu>
-
- * tioctl.defs, term.defs: Mark with INTR_INTERFACE.
-
-Tue Feb 16 04:34:02 1999 Thomas Bushnell, BSG <tb@mit.edu>
-
- * io.defs (io_revoke): New RPC.
-
-Sun Jan 31 18:21:58 1999 Thomas Bushnell, BSG <tb@mit.edu>
-
- * fs.defs (file_utimes): Extend documentation.
-
-1999-01-24 Roland McGrath <roland@baalperazim.frob.com>
-
- * Makefile: Add rules for generating prototype ?ioctl.defs files from
- a list of C headers that define the ioctl request macros.
- (DIST_FILES): Add ioctl-tmpl.sym ioctl.awk gensym.awk.
- * gensym.awk, ioctl-decode.h, ioctl-tmpl.sym, ioctl.awk: New files
- supporting those rules.
-
- * ioctls.defs: New file.
-
-1998-12-27 Roland McGrath <roland@baalperazim.frob.com>
-
- * hurd_types.h (enum file_storage_class): New values STORAGE_REMAP,
- STORAGE_COPY; moved with their comments from libstore/store.h.
-
-1998-11-29 Roland McGrath <roland@baalperazim.frob.com>
-
- * hurd_types.defs: Include <bits/utsname.h> instead of
- <utsnamelen.h>. Reported by Mark Kettenis <kettenis@phys.uva.nl>.
-
-Wed Oct 28 22:49:18 1998 Joel N. Weber II <devnull@methedrine.ai.mit.edu>
-
- * hurd_types.h: Added FSTYPE_HTTP, FSTYPE_MEMFS, and
- FSTYPE_ISO9660.
-
-Tue Aug 11 21:12:06 1998 Thomas Bushnell, BSG <tb@mit.edu>
-
- * hurd_types.h (dir_changed_type, file_changed_type): Doc fix.
-
-Thu Jul 30 10:38:30 1998 Thomas Bushnell, BSG <tb@mit.edu>
-
- * fs.defs (file_notice_changes, dir_notice_changes): Doc fix.
-
-1998-07-20 Roland McGrath <roland@baalperazim.frob.com>
-
- * process_request.defs: Delete proc_sethostid, proc_gethostid,
- proc_sethostname, and proc_gethostname.
-
- * password.defs: Fix subsystem decl and random mig syntax errors.
-
-Wed Jul 15 10:37:44 1998 Thomas Bushnell, n/BSG <tb@mit.edu>
-
- * fs.defs (dir_lookup): Update interface specification in the
- comment to reflect current reality.
-
-Tue Sep 23 15:52:35 1997 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * password.defs: New file.
- * paths.h (_SERVERS_PASSWORD): New entry.
- * subsystems: Add password at 38000.
-
-Tue Sep 16 15:24:37 1997 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * process.defs: Delete proc_sethostid, proc_gethostid,
- proc_sethostname, and proc_gethostname.
-
-1997-09-04 Miles Bader <miles@gnu.ai.mit.edu>
-
- * fsys.defs: Add INTR_INTERFACE.
-
-Thu Feb 13 19:21:03 1997 Miles Bader <miles@gnu.ai.mit.edu>
-
- * fs.defs (file_reparent): Renamed from dir_reparent.
-
-Mon Jan 20 16:34:12 1997 Miles Bader <miles@gnu.ai.mit.edu>
-
- * fs.defs (dir_reparent): Make PARENT a mach_port_t, not a file_t,
- so that libraries that do type translations of file_t won't get
- bogus arguments for ports in other filesystems.
-
-Thu Jan 9 16:44:52 1997 Miles Bader <miles@gnu.ai.mit.edu>
-
- * fs.defs (dir_reparent): New rpc.
-
-Thu Sep 26 14:21:01 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * tioctl.defs (tioctl_tiocext): Add missing "mode" arg.
-
-Tue Sep 10 11:11:20 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * Makefile (INSTHDRS): Omit `version.h'.
-
-Thu Sep 5 10:39:40 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * version.h: File removed.
-
-Wed Jul 17 14:30:36 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * Makefile: gs/install-hdrs/install-headers/g.
-
-Tue Jul 16 11:37:35 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * Makefile (INSTHDRS): Repair syntax.
- (install-hdrs install): Correctly form pathname.
-
-Sat Jul 13 20:55:59 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * Makefile: Rewritten to get the right things installed in the
- right places.
-
- * Makefile (install-hdrs): New target; eq to install.
-
-Mon Jul 1 16:28:01 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
-
- * crash.defs (crash_dump_task): Use integer_t for sigcode. Add exc,
- code, subcode, cttyid_port args.
-
-Wed Jun 12 15:56:49 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * startup_notify.defs (subsystem declaration): Use correct value
- 29500 from subsystems file.
-
-Sat May 25 17:09:00 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * msg_request.defs (msg_sig_post_request,
- msg_sig_post_untraced_request): Add SIGCODE argument.
-
-Wed May 22 18:50:14 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * process_reply.defs (proc_wait_reply): Add SIGCODE argument.
-
-Tue May 14 17:39:24 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
-
- * Makefile (install): Depend on $(includedir)/hurd and add rule to
- create it.
-
-Sat May 11 17:32:20 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
-
- * Makefile: Quick hack for installing headers prior to building libc.
- (hdrs): New variable, do wildcarding in $(srcdir).
- (DIST_FILES): Use that.
- (install): Install $(hdrs) in $(includedir)/hurd from $(srcdir).
-
-Thu May 9 12:44:43 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * Makefile (DIST_FILES): Reference *.h, instead of individual
- files.
-
- * Makefile (REMHDRS, dohdrs): Deleted targets.
-
-Tue May 7 12:54:19 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
-
- * io.defs (io_identity): Server passes back fs id port and st_ino
- value.
-
-Mon May 6 15:28:50 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * msg.defs (msg_describe_ports): New rpc.
-
- * fs.defs (file_get_storage_info): Change arguments & comment.
-
-Mon May 6 13:31:04 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * version.h (hurd_versions): Add version 0.0.
- * hurd_types.h (HURD_RELEASE): Update to 0.0.
-
- * hurd_types.h (struct procinfo): Add exitstatus and sigcode
- members.
-
- * hurd_types.h (FSTYPE_SOCKET): Doc fix.
-
- * hurd_types.h (retry_type) [FS_RETRY_REAUTH]: Doc fix.
-
- * hurd_types.h (file_storage_class): Add STORAGE_NULL,
- STORAGE_CONCAT, STORAGE_INTERLEAVE, and STORAGE_LAYER.
-
- * hurd_types.h (struct fsys_statfsbuf): Delete type.
- (fsys_statfsbuf_t): Now based upon struct statfs.
- * hurd_types.defs (fsys_statfsbuf_t): Now 16 long.
- Import <sys/statfs.h>.
-
- * fsys.defs (fsys_get_options): Add RPT.
-
- * startup_notify.defs: New file.
- * startup.defs (startup_request_notification): NOTIFY_PORT now
- mach_port_send_t. New arg NAME.
- * subsystems: Add startup_notify.
-
- * process.defs (proc_getprocinfo): Make FLAGS inout.
-
- * process.defs (proc_get_tty): New RPC.
- * process_request.defs (proc_get_tty_request): Likewise.
-
- * process.defs (proc_mark_stop, proc_mark_exit): Add SIGCODE arg.
- (proc_wait): Return SIGCODE parm too.
- * process_request.defs (proc_mark_stop_request,
- proc_mark_exit_request): Likewise.
-
- * process.defs (proc_setowner): Add CLEAR parm.
- * process_request.defs (proc_setowner_request): Likewise.
-
- * process.defs (proc_setmsgport): Return old message port with
- mach_port_send_t to permit more flexibility in proc server.
-
- * fs.defs (file_sync): New parm `omit_metadata'.
- (dir_link, dir_rename): Add parm `excl'.
-
- * io.defs (io_verify_identity): Delete RPC.
- (io_identity): New RPC.
-
-Fri May 3 16:56:22 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
-
- * hurd_types.h (EXEC_INHERITED): Macro removed.
- (EXEC_TRACED): Macro removed.
- (INIT_TRACEMASK): New enum constant.
-
- * msg.defs (msg_*_exec_flags): RPCs removed.
-
- * msg.defs (msg_sig_post, msg_sig_post_untraced): Add SIGCODE arg.
- (msg_startup_dosync): RPC removed.
-
- * io.defs (io_select): Remove ID_TAG arg.
- (io_verify_identity): New RPC.
-
- * auth.defs (auth_user_authenticate, auth_server_authenticate): Remove
- second rendezvous port arg, leaving just one, of type mach_port_send_t.
-
-Tue Apr 30 13:54:34 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
-
- * auth.defs: Mark with INTR_INTERFACE.
- (auth_user_authenticate): Remove sreplyport arg.
-
-Sun Apr 28 19:13:42 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
-
- * interrupt.defs: Remove 1 second waittime spec.
- (interrupt_operation): Add waittime arg.
- * msg.defs (msg_startup_dosync): Add waittime arg.
-
-Thu Apr 25 16:27:20 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * pfinet.defs: New file.
- * subsystems: Added pfinet.
-
-Fri Feb 9 11:30:08 1996 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * tioctl.defs: Import hurd/ioctl_types.h with <> instead of "".
-
-Thu Feb 8 20:35:34 1996 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * ioctl_types.h: Protect from multiple inclusion.
-
-Tue Dec 26 17:47:03 1995 Miles Bader <miles@gnu.ai.mit.edu>
-
- * io.defs (io_select): Fix ifdefs around the reply port decls to
- work properly when the server side ports are desired.
-
-Wed Dec 20 15:21:41 1995 Miles Bader <miles@gnu.ai.mit.edu>
-
- * process.defs (proc_getsidport): Use mach_port_send_t instead of
- mach_port_make_send_t.
-
-Tue Dec 19 18:28:35 1995 Miles Bader <miles@gnu.ai.mit.edu>
-
- * process.defs (proc_getsidport): Make SESSPORT's type
- mach_port_make_send_t, since proc always just holds a receive right.
-
-Mon Dec 11 15:21:42 1995 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * Makefile (DIST_FILES): Added netfs.h.
- (REMHDRS): Added ../libnetfs/netfs.h.
-
-Fri Dec 1 15:45:11 1995 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * tioctl.defs (tioctl_tiocsig): Needs one int arg.
-
-Tue Nov 21 09:58:13 1995 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * interrupt.defs (interrupt_operation): Include SEQNO server
- argument.
-
-Mon Nov 20 18:26:52 1995 Miles Bader <miles@gnu.ai.mit.edu>
-
- * msg_request.defs: Add skip for `Obsolete io_select_done'
- to match msg.defs.
- * msg_reply.defs: Ditto.
-
-Sat Nov 18 23:33:55 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * crash.defs (crash_dump_task): Add sreplyport arg.
- * crash_reply.defs: New file.
-
-Mon Nov 13 15:05:04 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * exec.defs (exec_startup): RPC removed; replaced with skip.
-
-Fri Nov 10 10:02:17 1995 Miles Bader <miles@gnu.ai.mit.edu>
-
- * process_request.defs: New file.
-
-Sat Nov 4 23:15:01 1995 Miles Bader <miles@gnu.ai.mit.edu>
-
- * fsys_reply.defs (fsys_startup_reply, fsys_get_options_reply): Tyop.
-
-Tue Oct 31 15:54:20 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * hurd_types.h: Add missing */.
-
-Tue Oct 31 14:14:39 1995 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * process.defs (proc_getprocinfo): New parm THREADWAITS.
-
-Tue Oct 31 02:23:55 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * msg.defs (msg_report_wait): Add string out arg.
-
-Mon Oct 30 10:41:06 1995 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * hurd_types.h (PI_FETCH_TASKINFO, PI_FETCH_THREADS,
- PI_FETCH_THREAD_BASIC, PI_FETCH_THREAD_SCHED,
- PI_FETCH_THREAD_WAITS): New flags.
- (procinfo): New (buried) members `rpc_block' and `died'.
- * msg.defs (msg_report_wait): Change second arg to be a real
- thread_t. Change returned reason from a string to an rpc code.
-
- * process.defs (proc_getprocinfo): New parm FLAGS.
-
- * hurd_types.h (enum file_storage_class): Added new classes
- STORAGE_MEMORY and STORAGE_TASK. Doc fixes. Drop all the MUTATED
- bits.
- (STORAGE_MUTATED) New flag.
- * fs.defs (file_get_storage_info): New parm FLAGS.
-
- * hurd_types.h (PI_LOGINLD, PI_WAITING, PI_TRACED, PI_GETMSG): New
- flags.
-
- * io.defs (io_select): Make sreply port also available if
- IO_SELECT_REPLY_PORT is defined.
-
-Fri Oct 27 14:43:17 1995 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * fsys.defs (fsys_startup): New parm OPENFLAGS.
-
- * hurd_types.defs (SCP): New macro.
- * io.defs (io_write, io_restrict_auth): Add SCP to incoming
- variable sized arrays.
- * socket.defs (socket_create_address, socket_setopt, socket_send):
- Likewise.
- * fs.defs (file_exec, file_set_translator): Likewise.
-
- * socket.defs (socket_create_address): Drop parm `binding'.
-
- * fs.defs: Added reply port option to all RPC's.
-
- * fsys.defs (fsys_get_options): New RPC.
- * fsys_reply.defs (fsys_get_options_reply): New stub.
- * fs.defs (file_get_fs_options): New RPC.
-
- * msg.defs (msg_report_wait): New RPC.
-
- * fs.defs (file_invoke_translator): Function deleted.
-
- * fsys_reply.defs (fsys_startup_reply, fsys_getfile_reply,
- fsys_syncfs_reply, fsys_set_options_reply, fsys_getpriv_reply,
- fsys_forward_reply): New functions, completing interface.
-
- * fsys.defs: Doc fix.
-
-Wed Oct 25 15:59:25 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * exec_startup.defs: New file.
- * subsystems: Add exec_startup at 30500.
-
-Thu Oct 12 16:56:52 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * exec.defs: Add INTR_INTERFACE marker.
-
- * fs.defs (file_exec): Remove dealloc[] keywords, and revert
- EXEC_TASK arg to task_t from mach_port_send_t. We cannot safely
- use dealloc ool or move rights with the current RPC system.
-
-Tue Oct 10 17:29:31 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * exec.defs [EXEC_IMPORTS]: Use this if defined.
- (exec_exec, exec_init, exec_setexecdata): Use file_t for receiver.
- (exec_exec): Use mach_port_send_t for FILE.
-
-Sat Oct 7 05:26:20 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * fs.defs (file_exec): Add dealloc[] flag to most args.
-
-Fri Oct 6 17:18:36 1995 Miles Bader <miles@gnu.ai.mit.edu>
-
- * fsys.defs (fsys_getpriv): Change types of returned ports to
- mach_port_send_t.
-
- * fs.defs (file_get_storage_info): Change type of ADDRESSES to
- off_array_t. Add ADDRESS_UNITS out parameter.
- (dir_link): Swap the DIR and FILE parameters.
-
- * hurd_types.defs (off_array_t, size_t, ssize_t): New types.
- * hurd_types.h (off_array_t): New type.
-
-Tue Oct 3 13:51:00 1995 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * hurd_types.h (struct fsys_statfsbuf): fsys_stb_bsize ->
- fsys_stb_iosize. fsys_stb_fsize -> fsys_stb_bsize.
-
-Tue Sep 26 11:16:56 1995 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * hurd_types.h (file_storage_class): New type.
- * fs.defs (file_get_storage_info): New RPC; use the slot that used
- to hold file_pathconf.
-
-Sun Sep 17 17:57:48 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * fs.defs (file_truncate): RPC renamed to file_set_size.
-
- * io.defs (io_pathconf): New RPC.
- * fs.defs (file_pathconf): RPC removed (replaced with skip).
-
- * hurd_types.h (EXEC_STACK_ARGS): New macro.
-
-Fri Sep 15 21:32:15 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * subsystems: core renamed to crash.
- * paths.h (_SERVERS_CRASH): New macro.
- (_SERVERS_CORE): Macro removed.
- * core.defs: Renamed to crash.defs.
- * crash.defs (crash_dump_task): Renamed from core_dump_task.
-
-Thu Aug 24 11:55:28 1995 Miles Bader <miles@churchy.gnu.ai.mit.edu>
-
- * fsys.defs (fsys_forward): New rpc.
- * subsystems: Remove tserver.
- * tserver.defs: Removed.
-
-Mon Aug 21 14:08:52 1995 Miles Bader <miles@churchy.gnu.ai.mit.edu>
-
- * tserver.defs (tserver_translate): New file.
- * subsystems: Add tserver.
-
-Mon Jul 17 15:05:16 1995 Miles Bader <miles@churchy.gnu.ai.mit.edu>
-
- * socket.defs (socket_create): Change type of SERVER to pf_t.
- (socket_create_address, socket_fabricate_address): Rename first
- arg to `server', of type mach_port_t (so it can be either pf_t or
- socket_t).
- (socket_recv): Change type of ADDR to mach_port_send_t.
- (socket_send, socket_recv): Change type of AMOUNT to
- mach_msg_type_number_t.
- * hurd_types.h (pf_t): New type.
- * hurd_types.defs (pf_t): New type.
-
-Mon Jun 26 19:23:38 1995 Michael I Bushnell <mib@duality.gnu.ai.mit.edu>
-
- * fsys_reply.defs (fsys_goaway_reply): New routine, in its proper
- place.
-
-Fri May 12 18:54:17 1995 Miles Bader <miles@churchy.gnu.ai.mit.edu>
-
- * fsys.defs (fsys_set_options, fsys_mod_readonly): Replace
- mod_readonly with the more general set_options interface.
-
-Mon Mar 20 21:44:59 1995 Michael I Bushnell <mib@duality.gnu.ai.mit.edu>
-
- * Makefile (REMHDRS): Add ../libps/ps.h.
-
-Mon Mar 6 15:25:27 1995 Miles Bader <miles@churchy.gnu.ai.mit.edu>
-
- * process.defs: Doc fix.
-
-Tue Jan 17 03:14:22 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * msg_request.defs: Fix typo reply->request.
-
- * io.defs (io_select): Add user reply port and reply timeout args.
- Make arg SELECT_TYPE inout, remove SELECT_RESULT out arg.
- * io_reply.defs: Synchronize with new io_select definition.
-
- * hurd_types.h (EXEC_INHERITED): New macro.
-
- * msg_reply.defs: Prepend `msg_' to all RPC names.
- (dir_changed, file_changed): Remove these skips.
- * msg_request.defs: Prepend `msg_' to all RPC names. Add
- msg_sig_post_untraced_reply and intervening skips.
- * msg.defs: Prepend `msg_' to all RPC names.
- (dir_changed, file_changed): RPCs moved to fs_notify.defs.
- (msg_get_exec_flags, msg_set_exec_flags,
- msg_set_some_exec_flags, msg_clear_some_exec_flags): New RPCs.
- * fs_notify.defs: New file, broken out of msg.defs.
- * subsystems: Add fs_notify at 20500.
-
- * msg_reply.defs: Add sig_post_untraced_reply, and intervening skips.
-
-Mon Jan 16 17:34:34 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * hurd_types.h (EXEC_TRACED): New macro.
- * msg.defs (sig_post_untraced): New RPC.
-
- * msg.defs (io_select_done): RPC removed, replaced with a skip.
- * io_reply.defs: Add ID_TAG arg.
- * io_request.defs (io_select_request): Remove RETURN_PORT arg.
- * io.defs (io_select): Remove RETURN_PORT arg; make ID_TAG inout.
-
-Fri Dec 9 00:35:47 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * io.defs (io_read, io_write, io_readable): Use
- mach_msg_type_number_t in place of int.
-
-Tue Sep 13 11:03:23 1994 Michael I Bushnell <mib@churchy.gnu.ai.mit.edu>
-
- * auth.defs (auth_getids, auth_server_authenticate): Reverse
- these changes; the auth server doesn't want them.
-
- * msg.defs (get_init_ports, get_init_ints, get_dtable,
- get_env_variable): Added `dealloc' to variable sized OUT parameters.
-
-Mon Sep 12 19:28:35 1994 Michael I Bushnell <mib@churchy.gnu.ai.mit.edu>
-
- * auth.defs (auth_getids, auth_server_authenticate): Added
- `dealloc' to variable sized OUT parameters.
- * fs.defs (file_getfh, dir_readdir, file_get_translator): Likewise.
- * io.defs (io_read): Likewise.
- * login.defs (login_get_location, login_get_input_devices): Likewise.
- * process.defs (proc_gethostname, proc_getallpids,
- proc_getexecdata, proc_getprocargs, proc_getprocenv,
- proc_getloginpids, proc_getsessionpgids, proc_getsessionpids,
- proc_getpgrppids): Likewise.
- * socket.defs (socket_whatis_address, socket_getopt, socket_recv):
- Likewise.
-
-Sat Sep 10 06:08:19 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * tioctl.defs (sizes_t): Rename to winsize_t; make struct, not array.
- * ioctl_types.h (sizes_t): Removed.
- (winsize_t): New typedef for struct winsize.
- (modes_t, speeds_t, cc_t): Use proper termios.h types.
-
-Tue Aug 30 04:23:25 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * fs.defs (dir_pathtrans): Renamed to dir_lookup; fixed comment.
-
-Fri Aug 26 12:45:51 1994 Michael I Bushnell <mib@geech.gnu.ai.mit.edu>
-
- * fs.defs (file_set_translator): Separate FLAGS arg into PASSIVE_FLAGS
- and ACTIVE_FLAGS; rename TRANS and EXISTING args to less confusing
- names.
- * hurd_types.h: New flag FS_TRANS_SET.
-
-Thu Aug 25 11:55:27 1994 Michael I Bushnell <mib@geech.gnu.ai.mit.edu>
-
- * auth.defs (auth_user_authenticate, auth_server_authenticate):
- Changed rend_int to be a port; mach_port_send_t on both sides.
- * io.defs (io_reauthenticate): Pass a port instead of an int
- for secondary rendezvous.
- * process.defs (proc_reauthenticate): Pass a port instead of an
- int for secondary rendezvous.
-
- * hurd_types.h (retry_type): Removed FS_RETRY_NONE; added
- explicit initializers to keep the values constant.
-
- * hurd_types.h (FSTYPE_EXT2FS): New macroo.
-
- * hurd_types.h (struct procinfo): New member `logincollection'.
-
- * fsys.defs (fsys_syncfs, fsys_mod_readonly): New RPC's.
- * fsys_reply.defs: Added two skips corresponding to new RPC's.
-
-Wed Aug 17 20:03:29 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * io.defs (io_select): Make RETURN_PORT arg mach_port_poly_t.
- * msg.defs (io_select_done): Make NOTIFY_PORT arg mach_port_poly_t.
-
-Wed Aug 17 15:23:03 1994 Michael I Bushnell <mib@geech.gnu.ai.mit.edu>
-
- * term.defs (termctty_open_terminal): New RPC.
-
-Mon Aug 15 11:49:54 1994 Michael I Bushnell <mib@geech.gnu.ai.mit.edu>
-
- * startup.defs (startup_essential_task): Add sreplyport arg.
- * startup_reply.defs: Add startup_essential_task_reply.
-
-Tue Aug 9 19:43:50 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * core.defs (core_dump_task): Add SIGERROR arg.
-
- * interrupt.defs (INTERRUPT_TIMEOUT): New macro.
- Specify `waittime' with that value.
-
-Mon Aug 8 15:49:30 1994 Michael I Bushnell <mib@churchy.gnu.ai.mit.edu>
-
- * Makefile: Rewritten in accord with new scheme.
-
-Thu Jul 21 15:44:43 1994 Michael I Bushnell <mib@geech.gnu.ai.mit.edu>
-
- * Makefile (DIST_FILES, HDRS): Name header files explicitly.
-
-Fri Jul 15 22:53:29 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
-
- * subsystems: Rename utmp to login.
- Mark begin and end of spread of subsystems used by ioctls.
- * login.defs: Renamed from utmp.defs; renamed all calls.
-
-Fri Jul 15 18:20:34 1994 Michael I Bushnell (mib@churchy.gnu.ai.mit.edu)
-
- * fsys.defs (fsys_startup): Remove DOTDOT_NODE.
- (fsys_getroot): Add arg DOTDOT_NODE.
-
-Thu Jul 14 11:46:56 1994 Michael I Bushnell (mib@churchy.gnu.ai.mit.edu)
-
- * utmp.defs: New file.
-
-Mon Jul 11 20:07:52 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
-
- * hurd_types.defs (INTR_ROUTINE): Macro removed.
- (INTR_INTERFACE): New macro.
- * fs.defs: Invoke INTR_INTERFACE. Remove all INTR_ROUTINE uses.
- * io.defs, process.defs, socket.defs: Likewise.
-
-Fri Jul 8 15:53:02 1994 Michael I Bushnell (mib@churchy.gnu.ai.mit.edu)
-
- * hurd_types.h (retry_type): Added new magical types "machtype"
- and "/".
- * fs.defs (dir_pathtrans): Doc fix.
-
- * msg.defs: Doc fix.
-
- * process.defs (proc_wait): Doc fix.
-
- * socket.defs (socket_fabricate_address): Added sockaddr_type
- arg.
-
-Fri Jul 8 15:26:19 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
-
- * fs.defs (file_invoke_translator): New RPC.
-
- * hurd_types.defs (INTR_ROUTINE): New macro.
- * socket.defs: Use INTR_ROUTINE for all interruptible RPCs.
- * process.defs: Likewise.
- * fs.defs: Likewise.
- (dir_readdir): Make this interruptible.
-
-Fri Jul 8 14:22:11 1994 Michael I Bushnell (mib@churchy.gnu.ai.mit.edu)
-
- * tioctl.defs: Remove ifdefs that were omitting most of the
- ioctls. Added RPCs for missing codes 118-123. Added
- block of skips between 99 and 100. Added INTR to appropriate
- calls.
-
-Tue Jul 5 14:46:49 1994 Michael I Bushnell (mib@churchy.gnu.ai.mit.edu)
-
- * Makefile (DIST_FILES): Added subsystems.
-
- * fsys_reply.defs: Added fsys_getroot_reply in its proper place.
-
-Wed Jun 29 13:06:42 1994 Michael I Bushnell (mib@geech.gnu.ai.mit.edu)
-
- * ifsock.defs (ifsock_setsockaddr, ifsock_assume_responsibility):
- Deleted RPCs.
-
- * msg.defs (set_init_port, set_fd): Change back to using
- mach_port_send_t instead of mach_port_t for PORT arg.
-
-Tue Jun 28 18:39:02 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
-
- * msg.defs (get_dtable, set_dtable): Add REFPORT arg.
- (get_fd, set_fd): Add REFPORT and FD args.
- (set_init_port, set_fd): Use mach_port_t instead of
- mach_port_send_t for PORT arg.
- (get_environment): Add dealloc flag to VALUE arg.
-
- * fsys.defs: Add RPT arg to all routines except fsys_init (which
- has an unconditional sreplyport arg).
-
- * hurd_types.defs (sreply_port_t): New type.
- (RPTDECL, RPT, RPTLAST): New macros (moved from io.defs).
- * io.defs (reply_port_t): Type removed.
- (RPTDECL, RPT, RPTLAST): Macros moved to hurd_types.defs.
- * auth.defs (reply_port_t): Type removed.
- (auth_user_authenticate, auth_server_authenticate): Use
- sreply_port_t in place of reply_port_t.
- * fsys.defs (fsys_init): Likewise.
-
- * msg.defs (sig_post): Likewise.
- * process.defs (proc_getmsgport, proc_setmsgport, proc_wait): Likewise.
- * startup.defs (startup_procinit, startup_authinit): Likewise.
-
-Fri Jun 24 03:54:53 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
-
- * term.defs (term_become_ctty): Renamed to term_open_ctty.
-
- * process.defs (proc_setprocargs): Renamed to proc_set_arg_locations.
- (proc_get_arg_locations): New rpc.
- * process_reply.defs: Add skip for proc_get_arg_locations.
-
-Thu Jun 23 11:59:49 1994 Michael I Bushnell (mib@churchy.gnu.ai.mit.edu)
-
- * term.defs (term_become_ctty): Delete SIGPT arg.
-
-Wed Jun 22 16:34:51 1994 Michael I Bushnell (mib@churchy.gnu.ai.mit.edu)
-
- * term.defs: Changed NEWTTY arg to be mach_port_send_t.
-
-Thu Jun 16 00:48:45 1994 Roland McGrath (roland@geech.gnu.ai.mit.edu)
-
- * hurd_types.defs (file_changed_type_t, dir_changed_type_t): New types.
- * hurd_types.h (INIT_PORT_LOGINCOLL): Removed.
- (dir_changed_type_t, file_changed_type_t): New typedefs.
-
- * fs.defs (file_check_access): Renamed from file_access, interface
- changed.
-
-Wed Jun 15 21:24:46 1994 Michael I Bushnell (mib@churchy.gnu.ai.mit.edu)
-
- * fsys.defs (fsys_getroot): New interface; similar to
- fs.defs:dir_pathtrans. This eliminates the noxious need for
- dir_pathtrans to work on null pathnames for non directories. This
- is the Right Thing.
-
- * fs.defs (file_get_translator_cntl): Return port as
- `mach_port_send_t' not `fsys_t'.
-
-Wed Jun 15 12:13:35 1994 Michael I Bushnell (mib@geech.gnu.ai.mit.edu)
-
- * fs.defs (file_access): New RPC.
-
-Tue Jun 14 13:57:18 1994 Michael I Bushnell (mib@geech.gnu.ai.mit.edu)
-
- * hurd_types.h: Reorganized; many comments fixed or improved.
-
- * hurd_types.h (enum verstype): Removed declaration.
- (enum term_bottom_type): New type.
- (TERM_ON_MACHDEV, TERM_ON_HURDIO, TERM_ON_MASTERPTY): Moved
- into enum above.
- (FSTYPE_SOCKET, FSTYPE_MISC): New macros.
-
- * msg.defs (dir_changed, file_changed): New RPCs.
- * fs.defs (dir_notice_changes, file_notice_changes): New RPCs.
- * hurd_types.h (enum dir_changed_type, enum file_changed_type):
- New declarations.
-
- * fs.defs (dir_readdir): Totally new interface.
-
-Mon Jun 13 07:14:23 1994 Roland McGrath (roland@geech.gnu.ai.mit.edu)
-
- * socket.defs: Corrected subsystem to 26000; was 20000, same as fs.
-
-Mon Jun 6 23:07:08 1994 Roland McGrath (roland@geech.gnu.ai.mit.edu)
-
- * ioctl_types.h (modes_t, speeds_t, ccs_t, sizes_t): Make these
- arrays of the appopriate sizes, not pointers.
-
-Sun Jun 5 22:41:08 1994 Roland McGrath (roland@geech.gnu.ai.mit.edu)
-
- * tioctl.defs: Fix subsystem.
-
-Fri May 27 07:53:15 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
-
- * exec.defs (exec_exec): Add `servercopy' flag to DTABLE,
- PORTARRAY, and INTARRAY args.
- (exec_startup): Add `dealloc' flag to ARGV, ENVP, PORTARRAY, and
- INTARRAY args.
- (exec_setexecdata): Add `servercopy' flag to PORTS and INTS args.
-
-Wed May 25 13:32:31 1994 Michael I Bushnell (mib@churchy.gnu.ai.mit.edu)
-
- * io_reply.defs (io_readable_reply, io_get_openmodes_reply): Fix
- typos.
-
-Thu May 12 00:43:08 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
-
- * fsys_reply.defs: New file.
- * fsys.defs (reply_port_t): Define type.
- (fsys_init): Add sreplyport arg.
-
- * process.defs (proc_setmsgport): Add sreplyport arg.
- * process_reply.defs: Add proc_setmsgport_reply.
-
- * version.h: Added multiple inclusion protection.
- (struct hurd_version): Fixed `vers' member.
- (hurd_versions): Add braces.
-
-Wed May 11 16:05:43 1994 Michael I Bushnell (mib@geech.gnu.ai.mit.edu)
-
- * startup.defs (startup_uname, startup_register_version): For
- some bizzaro reason these didn't get removed. Now they are for real.
-
-Tue May 10 18:17:41 1994 Michael I Bushnell (mib@geech.gnu.ai.mit.edu)
-
- * tioctl.defs, ioctl_types.h: New files.
-
-Mon May 9 14:28:06 1994 Michael I Bushnell (mib@geech.gnu.ai.mit.edu)
-
- * version.h: New file.
-
- * startup.defs (startup_uname, startup_register_version): Removed
- * process.defs (proc_uname, proc_register_version): New RPCs.
- * process_reply.defs: Added skips corresponding to proc_name
- and proc_register_version.
-
-Wed May 4 01:01:11 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
-
- * msg_request.defs: New file.
-
-Sun May 1 17:40:48 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
-
- * hurd_types.h (utsname_t): New typedef.
- * hurd_types.defs (utsname_t): Define type for MiG.
- Import <sys/utsname.h>.
-
-Fri Apr 29 16:19:10 1994 Michael I Bushnell (mib@churchy.gnu.ai.mit.edu)
-
- * io.defs (io_prenotify, io_postnotify): File offsets should be
- vm_offset_t.
-
- * io.defs (io_async): NOTIFY_PORT and ASYNC_ID_PORT
- should be mach_port_send_t.
- (io_get_icky_async_id): ICKY_ASYNC_ID_PORT should be
- mach_port_send_t.
- (io_map_cntl): Returned object should be mach_port_send_t.
-
- * io.defs: Added new type reply_port_t; added sreplyport of
- that type to all the stubs when REPLY_PORTS is defined.
-
- * term.defs (term_getctty): CTTY arg should be mach_port_send_t
- for the convenience of servers.
-
- * io.defs (io_readnotify): New RPC.
- * shared.h (use_readnotify_size, readnotify_size): New members.
-
- * socket.defs: Change ports returned from servers to be
- mach_port_send_t for the convenience of servers.
-
- * ifsock.defs (ifsock_assume_responsibility): Just take over the
- bootstrap port directly; this is more reliable anyway.
-
- * fs.defs (file_set_translator): EXISTING arg should be
- mach_port_send_t.
-
- * shared.h (shared_io): Added optimal_transfer_size.
-
- * hurd_types.h (HURD_RELEASE): New macro.
-
- * startup.defs (startup_uname, startup_register_version): New
- RPCs.
-
- * startup.defs (startup_essential_task): require host priv port
- for security.
-
- * exec.defs (exec_exec) : FILE arg should be mach_port_send_t.
-
-Thu Apr 28 22:58:14 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
-
- * msg.defs (reply_port_t): Define type.
- (sig_post): Use reply_port_t for sreplyport arg; remove #ifdef.
- * msg_reply.defs (reply_port_t): Define type.
- (sig_post_reply): Use reply_port_t for first arg.
-
-Wed Apr 27 06:39:46 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
-
- * msg.defs (sig_post): Put sreplyport arg inside #ifdef MSG_SREPLYPORT.
-
-Thu Apr 21 21:17:37 1994 Roland McGrath (roland@geech.gnu.ai.mit.edu)
-
- * msg.defs (get_init_port, set_init_port, get_fd, set_fd): Make
- PORT arg mach_port_send_t.
- (get_environment, set_environment,
- get_env_variable, set_env_variable): New routines.
-
-Thu Feb 17 17:59:13 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
-
- * hurd_types.defs (io_statbuf_t): Change size to 32 ints.
-
-Tue Feb 8 20:53:25 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
-
- * msg_reply.defs: Change subsystem to `msg_reply'. MiG-generated
- header files use `#ifndef _subsystem_user_' to protect against
- multiple inclusion, so two headers with the same subsystem conflict.
-
-Thu Feb 3 03:45:18 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
-
- * hurd_types.h: Include <mach/task_info.h> and <mach/thread_info.h>
- before using task_basic_info and thread_basic_info in sturct procinfo.
-
-Mon Jan 24 17:33:00 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
-
- * msg_reply.defs: New file.
-
-Tue Dec 21 01:11:04 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
-
- * socket.defs: Fix typos.
-
-Mon Dec 6 22:52:00 1993 Michael I Bushnell (mib@geech.gnu.ai.mit.edu)
-
- * Made snapshot.
-
-Mon Dec 6 22:36:33 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
-
- * hurd_types.defs (flock_t): Defined.
- * hurd_types.h (flock_t): Added typedef.
-
-Mon Dec 6 19:28:27 1993 Michael I Bushnell (mib@geech.gnu.ai.mit.edu)
-
- * process.defs (proc_get_collports): Designate as INTR, also
- return the pids.
-
-Wed Dec 1 21:41:06 1993 Michael I Bushnell (mib@geech.gnu.ai.mit.edu)
-
- * hurd_types.h: Remove deprecated information:
- INBAND_MAX_DATA, FS_LOOKUP_* bits.
- Added PI_ZOMBIE.
-
- * process.defs (proc_getmsgport): Now is INTR.
-
- * io.defs (io_get_conch, io_release_conch, io_eofnotify,
- io_prenotify, io_postnotify, io_readsleep, io_sigio):
- Remove cntl argument.
-
-Tue Nov 23 12:18:21 1993 Michael I. Bushnell (mib at ernst.gnu.ai.mit.edu)
-
- * fsys.defs (fsys_startup): control_port is now mach_port_send_t.
-
- * io.defs (io_map): remove `xx' argument.
-
- * process.defs (proc_handle_exceptions): forwardport is now
- mach_port_send_t.
-
- * auth.defs, auth_reply.defs: Removed auth_combine and extended
- auth_makeauth to take multiple auth ports.
-
- * shared.h, io.defs: Changed `it' terminology to `conch'.
-
-Mon Nov 22 22:58:59 1993 Michael I Bushnell (mib@geech.gnu.ai.mit.edu)
-
- * io.defs: Changed io_map to use mach_port_send_t.
-
- * auth.defs: Changed auth_user_authenticate arg newport to be
- mach_port_send_t.
diff --git a/hurd/console.h b/hurd/console.h
index 065ed7d2..baf03942 100644
--- a/hurd/console.h
+++ b/hurd/console.h
@@ -1,5 +1,5 @@
/* console.h -- Public interface to the console server.
- Copyright (C) 2002 Free Software Foundation, Inc.
+ Copyright (C) 2002,10 Free Software Foundation, Inc.
Written by Marcus Brinkmann.
This program is free software; you can redistribute it and/or
@@ -50,7 +50,13 @@ typedef struct
uint32_t italic : 1;
uint32_t bold : 1;
} conchar_attr_t;
-
+
+/* We support double-width characters by using an extra bit to identify the
+ continuation in the character matrix. The constants below document our
+ usage of wchar_t. */
+#define CONS_WCHAR_MASK ((wchar_t) 0x401fffff)
+#define CONS_WCHAR_CONTINUED ((wchar_t) 0x40000000)
+
typedef struct
{
wchar_t chr;
@@ -116,7 +122,7 @@ struct cons_display
ever increased by the server, so clients
can optimize scrolling. */
uint32_t scr_lines; /* Number of lines in scrollback buffer
- preceeding CUR_LINE. */
+ preceding CUR_LINE. */
uint32_t height; /* Number of lines in visible area following
(and including) CUR_LINE. */
uint32_t matrix; /* Index (in uint32_t) of the beginning of
diff --git a/hurd/hurd_types.h b/hurd/hurd_types.h
index 86b9bcbe..e1a644f1 100644
--- a/hurd/hurd_types.h
+++ b/hurd/hurd_types.h
@@ -201,7 +201,7 @@ enum term_bottom_type
remap - TY, FL, NR NR * (OFFS, LEN) - 1
(BS and SIZE are that of the child)
copy - TY, FL, SIZE - DATA -
- (DATA is preceeded by padding to the next page boundary, and is
+ (DATA is preceded by padding to the next page boundary, and is
SIZE bytes long itself)
For ileave, concat, and layer, the children are encoded following the parent.
diff --git a/hurd/iioctl.defs b/hurd/iioctl.defs
index 42c1ecaa..4efe928f 100644
--- a/hurd/iioctl.defs
+++ b/hurd/iioctl.defs
@@ -1,5 +1,5 @@
/* Definitions for interface ioctls
- Copyright (C) 2000 Free Software Foundation, Inc.
+ Copyright (C) 2000, 2007 Free Software Foundation, Inc.
This file is part of the GNU Hurd.
@@ -131,7 +131,14 @@ routine iioctl_siocgifnetmask (
inout ifnam: ifname_t;
inout netmask: sockaddr_t);
-skip; skip; skip; skip; /* 38, 39, 40, 41 unused */
+skip; /* 38 SIOCGARP -- Not implemented yet */
+
+routine iioctl_siocgifhwaddr (
+ reqport: io_t;
+ inout ifnam: ifname_t;
+ inout netmask: sockaddr_t);
+
+skip; skip; /* 40, 41 unused */
skip; skip; skip; skip; /* 42, 43, 44, 45 unused */
skip; skip; skip; skip; /* 46, 47, 48, 49 unused */
skip; /* 50 unused */
diff --git a/hurd/io.defs b/hurd/io.defs
index d30233e6..9119b05b 100644
--- a/hurd/io.defs
+++ b/hurd/io.defs
@@ -101,7 +101,7 @@ routine io_clear_some_openmodes (
when appropriate, to the designated port using sig_post. A
port is also returned which will be used as the reference port in
sending such signals (this is the "async IO ID" port). The async
- call is cancelled by deleting all refernces to the async_id_port.
+ call is cancelled by deleting all references to the async_id_port.
Each call to io_async generates a new ASYNC_ID_PORT.
*/
routine io_async (
diff --git a/hurd/pfinet.defs b/hurd/pfinet.defs
index a42b6d0c..ec0b03e3 100644
--- a/hurd/pfinet.defs
+++ b/hurd/pfinet.defs
@@ -29,7 +29,7 @@ INTR_INTERFACE
/* Return a list of interfaces as expected by the SIOCGIFCONF ioctl.
The maximum number of bytes returned can be given in AMOUNT, but if
- AMOUNT is negative, all interfaces will be returned. Always
+ AMOUNT is -1, all interfaces will be returned. Always
succeeds (and interface list will be truncated to fit into AMOUNT
space) for BSD compatibility. */
routine pfinet_siocgifconf (
diff --git a/hurd/process.defs b/hurd/process.defs
index a87cc421..43cc9f2a 100644
--- a/hurd/process.defs
+++ b/hurd/process.defs
@@ -356,7 +356,7 @@ routine proc_getpgrppids (
out pidset: pidarray_t, dealloc);
-/*** Another miscelleneous info query ***/
+/*** Other miscelleneous info queries ***/
/* Return the controlling TTY used by PID in TTY; opened without read or
write access. */
@@ -364,3 +364,9 @@ routine proc_get_tty (
calling_process: process_t;
target_process: pid_t;
out tty: mach_port_send_t);
+
+/* Return the number of Mach ports used by PID */
+routine proc_getnports (
+ process: process_t;
+ which: pid_t;
+ out nports: mach_msg_type_number_t);
diff --git a/hurd/process_request.defs b/hurd/process_request.defs
index 8669e443..80a28282 100644
--- a/hurd/process_request.defs
+++ b/hurd/process_request.defs
@@ -365,3 +365,9 @@ simpleroutine proc_get_tty_request (
process: process_t;
ureplyport reply: reply_port_t;
pid: pid_t);
+
+/* Return the number of Mach ports used by PID */
+simpleroutine proc_getnports_request (
+ process: process_t;
+ ureplyport reply: reply_port_t;
+ which: pid_t);
diff --git a/include/ChangeLog b/include/ChangeLog
deleted file mode 100644
index 1416a84c..00000000
--- a/include/ChangeLog
+++ /dev/null
@@ -1,16 +0,0 @@
-2002-05-01 Marcus Brinkmann <marcus@gnu.org>
-
- * Makefile (install): New target, same as install-headers.
-
-2002-03-10 Roland McGrath <roland@frob.com>
-
- * sys/procfs.h: New file, specifies ELF core file format details.
- * Makefile (installhdrs): New variable, list sys/procfs.h here.
- (LCLHDRS): New variable, replaces ...
- (DIST_FILES): ... this one, removed.
- (install-headers, $(includedir)/%: $(srcdir)/%): New target and
- pattern rule to install headers.
-
-Sat Jul 13 21:02:51 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * Makefile: New file.
diff --git a/include/Makefile b/include/Makefile
index b923a1a2..3dc9ba75 100644
--- a/include/Makefile
+++ b/include/Makefile
@@ -1,6 +1,6 @@
# Makefile for include subdirectory.
#
-# Copyright (C) 1996,2002 Free Software Foundation, Inc.
+# Copyright (C) 1996, 2002, 2010 Free Software Foundation, Inc.
# Written by Michael I. Bushnell, p/BSG.
#
# This file is part of the GNU Hurd.
@@ -32,3 +32,6 @@ install-headers install: $(installhdrs:%=$(includedir)/%)
$(includedir)/%: $(srcdir)/%
@$(MKINSTALLDIRS) $(@D)
$(INSTALL_DATA) $< $@
+
+lndist: $(top_srcdir)/hurd-snap/$(dir)
+ cp -r --parent $(addprefix $(srcdir)/, Makefile $(installhdrs)) $<
diff --git a/init/ChangeLog b/init/ChangeLog
deleted file mode 100644
index b8c1eda7..00000000
--- a/init/ChangeLog
+++ /dev/null
@@ -1,777 +0,0 @@
-2005-02-24 Ben Asselstine <benasselstine@gmail.com>
-
- * init.c (main): Only pass ARGP_NO_ERRS to argp_parse when invoked
- by the bootstrap filesystem.
- (flags): New variable.
-
-2002-05-07 Roland McGrath <roland@frob.com>
-
- * init.c (reboot_system): u_int -> size_t
- (reboot_system): Likewise.
- (S_msg_report_wait): int -> mach_msg_id_t
-
-2002-03-23 James A. Morrison <ja2morri@uwaterloo.ca>
-
- * init.c (reboot_mach): Use ERR, not errno.
- (run): Likewise.
- (lauch_core_servers): Likewise.
- (run_for_real): Use MACH_PORT_NULL explicitly.
- (start_child): Likewise.
-
-2002-01-02 Roland McGrath <roland@frob.com>
-
- * init.c [KERN_INVALID_LEDGER]:
- Pass extra arguments to task_create for OSF variant.
-
-2001-08-23 Roland McGrath <roland@frob.com>
-
- * init.c (main): Pass ARGP_NO_ERRS|ARGP_IN_ORDER to argp_parse.
-
-2001-08-20 Roland McGrath <roland@frob.com>
-
- * init.c [! SPLIT_INIT]: All this code removed.
- [SPLIT_INIT]: This code no longer conditional.
- (_PATH_RUNCOM, mapped_time, do_fastboot): Removed.
- * Makefile (split-init): Variable removed.
- (SRCS): Add stubs.c here unconditionally.
- [$(split-init) = no]: Conditional defns removed.
- (LCLHDRS): Variable removed.
- * ttys.c, ttys.h: Files removed.
-
- * init.c (kernel_command_line): Variable removed.
- (options, parse_opt): Remove -K option.
- (frob_kernel_process): Collect arguments from &global_argv[1]
- instead of slicing up kernel_command_line.
- (start_child): Take a second arg, if non-null more arguments for PROG.
- (launch_something): Change caller. On first try, pass &global_argv[1].
-
-2001-07-02 Roland McGrath <roland@frob.com>
-
- * init.c (reboot_system): Don't pass null pointer to RPC out param.
- Thanks to Moritz Schulte <moritz@chaosdorf.de> for finding this.
-
-2001-01-17 Neal H Walfield <neal@cs.uml.edu>
-
- * init.c (open_console): Conform to new fshelp_start_translator
- semantics.
-
-2000-12-21 Marcus Brinkmann <marcus@gnu.org>
-
- * init.c (process_rc_script): If malloc fails, return ENOMEM.
- Reported by Igor Khavkine <i_khavki@alcor.concordia.ca>.
-
-2000-03-17 Thomas Bushnell, BSG <tb@mit.edu>
-
- * init.c (launch_core_servers): Don't use MOVE_SEND in Hurd RPCs.
-
-2000-03-13 Roland McGrath <roland@baalperazim.frob.com>
-
- * stubs.c (send_signal): Don't use mach_msg_destroy, since it wants
- the local/remote ports reversed. Destroy the rights by hand instead.
-
- * stubs.c (send_signal): Make MESSAGE auto instead of static.
- Take new argument TIMEOUT, passed to mach_msg instead of zero.
- (send_signal): For MACH_SEND_TIMED_OUT failure, destroy the
- pseudo-received message to avoid leaking send rights.
-
- * init.c (process_signal): Pass new argument, timeout of 500 ms.
-
-1999-09-28 Thomas Bushnell, BSG <tb@mit.edu>
-
- * init.c (frob_kernel_process): Allocate the kernel's page in the
- actual kernel task, not in our own. I wonder how this ever
- worked. Also if we fail in that allocation, free the page we
- allocated in our own space.
-
-1999-08-24 Roland McGrath <roland@baalperazim.frob.com>
-
- * init.c (notify_shutdown): Add const to argument type.
-
-1999-07-24 Roland McGrath <roland@baalperazim.frob.com>
-
- * Makefile (split-init): Set to `yes' by default.
-
-1999-07-10 Roland McGrath <roland@baalperazim.frob.com>
-
- * init.c: Add #include <sys/mman.h> for munmap decl.
-
-1999-07-09 Thomas Bushnell, BSG <tb@mit.edu>
-
- * init.c (frob_kernel_process): Use mmap instead of vm_allocate.
-
-1999-07-03 Thomas Bushnell, BSG <tb@mit.edu>
-
- * init.c (reboot_system): Use munmap instead of vm_deallocate.
- (frob_kernel_process): Likewise.
- (kill_everyone): Likewise.
-
-1999-06-19 Roland McGrath <roland@baalperazim.frob.com>
-
- * Makefile (HURDLIBS): Add ports and fshelp only if $(split-init)!=yes.
-
- * init.c (open_console): Put this function inside [! SPLIT_INIT].
-
-1999-06-18 Roland McGrath <roland@baalperazim.frob.com>
-
- * init.c [SPLIT_INIT] (child_pid, child_task): New variables.
- (process_signal, start_child, launch_something, launch_system): New
- functions.
- [! SPLIT_INIT] (system_state, shell_pid, rc_pid, launch_single_user,
- process_rc_script, launch_multi_user, launch_system, kill_everyone,
- kill_multi_user, process_signal): Variables and functions put inside
- #ifndef SPLIT_INIT.
- * stubs.c: New file, modified from ../proc/stubs.c.
- * Makefile (SRCS): Remove ttys.c here.
- [$(split-init) = yes] (SRCS): Add stubs.c
- [$(split-init) = yes] (init-CPPFLAGS): New variable, -DSPLIT_INIT.
- [$(split-init) = no] (SRCS): Add ttys.c only here.
- [$(split-init) = no] (LDLIBS): Put defn (-lutil) under this test.
- (split-init): New variable to turn on split-init, commented out.
-
-1999-06-15 Roland McGrath <roland@baalperazim.frob.com>
-
- * init.c (booted): New variable.
- (open_console): Use that instead of system_state.
- (S_startup_essential_task): Likewise.
- (do_mach_notify_dead_name): Likewise.
- (launch_system): New function.
- (S_startup_essential_task): Call it.
-
- * init.c (global_argv): Make static.
-
- * init.c (startup_envz, startup_envz_len): New variables.
- (run, run_for_real): Use those for child environment.
- (main): Set them up from our ENVP argument.
-
-1999-06-14 Roland McGrath <roland@baalperazim.frob.com>
-
- * init.c (main): Barf if run in a normal Hurd environment (not boot).
-
- * init.c (record_essential_task): Add missing return.
-
- * ttys.c: Include "ttys.h".
-
-1999-06-13 Roland McGrath <roland@baalperazim.frob.com>
-
- * init.c (kill_multi_user): Suggest `ps -AlM' in error message.
-
- * init.c (record_essential_task): New function, broken out of
- S_startup_essential_task.
- (S_startup_essential_task): Call it.
- (frob_kernel_process): Call it for kernel task port.
- (kill_everyone): Remove special case for PID 2 (kernel task).
-
- * init.c (run): Add const to SERVER arg, PROG local.
- Don't trim directory name from PROG for argument.
-
- * ttys.c (struct terminal): Use `pid_t' for `pid' member.
- (ttys, nttys, ttyslen): Make variables static.
- (setup_terminal, add_terminal, find_line, startup_terminal,
- shutdown_terminal): Make all these functions static.
-
- Move all the /etc/ttys handling stuff into a separate source file.
- * init.c (_PATH_LOGIN, WINDOW_DELAY, struct terminal,
- nttys, ttyslen, setup_terminal, add_terminal,
- init_ttys, free_ttys, startup_terminal, startup_ttys,
- find_line, restart_terminal, shutdown_terminal, reread_ttys): Move to
- * ttys.c: ... here, new file.
- * ttys.h: New file, declare external functions in ttys.c.
- * Makefile (SRCS): Add ttys.c.
- (OBJS): Derive from $(SRCS).
- (LCLHDRS): New variable, add ttys.h.
-
-1999-06-05 Roland McGrath <roland@baalperazim.frob.com>
-
- * init.c (request_dead_name): New function.
- (S_startup_request_notification, S_startup_essential_task): Use it.
- (run): Request dead-name notification for new task.
- (main): Request dead-name notification for FSTASK.
- (do_mach_notify_dead_name): If system_state is INITIAL, recognize
- FSTASK, AUTHTASK, PROCTASK specifically and crash with appropriate msg.
-
-1999-06-04 Roland McGrath <roland@baalperazim.frob.com>
-
- * init.c (launch_core_servers): Use proc_child on the proc server task
- to register it with itself as our child. Snarf its proc port and use
- proc_mark_exec do remove that unsightly `f', as we do for the other
- bootstrap processes.
-
-1999-06-02 Roland McGrath <roland@baalperazim.frob.com>
-
- * init.c (frob_kernel_process): If no --kernel-command-line option,
- try `getenv ("MULTIBOOT_CMDLINE")' before defaulting to "(kernel)".
-
-1999-06-01 Roland McGrath <roland@baalperazim.frob.com>
-
- * init.c (CRASH_FLAGS): Macro removed.
- (crash_flags): New variable replaces it.
- (crash_mach, crash_system): Use crash_flags instead of CRASH_FLAGS.
- (options, parse_opt): Add --crash-debug/-H, to set crash_flags to
- RB_DEBUGGER.
-
- * init.c (kernel_command_line): New variable.
- (frob_kernel_process): New function.
- (S_startup_essential_task): Call it after init_stdarrays.
- (options): Add --kernel-command-line/-K option.
- (parse_opt): Grok -K, set kernel_command_line.
-
-Sat Mar 6 17:13:48 1999 Thomas Bushnell, BSG <tb@mit.edu>
-
- * init.c (do_mach_notify_dead_name): Deallocate the extra
- reference to NAME that the notification carries.
-
-Tue Feb 16 18:54:33 1999 Thomas Bushnell, BSG <tb@mit.edu>
-
- * init.c (shutdown_terminal): Revoke access to the terminal from
- existing programs.
-
-1998-10-24 Roland McGrath <roland@baalperazim.frob.com>
-
- * init.c (main): Don't bogusly clear bootstrap_args.
- Reported by OKUJI Yoshinori <okuji@kuicr.kyoto-u.ac.jp>.
-
-Tue May 12 12:03:38 1998 Thomas Bushnell, n/BSG <tb@mit.edu>
-
- * init.c (setup_terminal): Free LINE after done using it.
- (process_rc_script): Likewise free RCARGS.
- Both reported by Katusya Tanaka (wyvern@pb3.so-net.ne.jp).
-
-1997-06-30 Miles Bader <miles@gnu.ai.mit.edu>
-
- * init.c (bootstrap_args): Initialize to 0.
- (parse_opt): New function.
- (options, doc): New variables.
- (main): Parse args using argp.
- Include <argp.h>.
-
-Thu Sep 12 16:32:31 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * Makefile (HURDLIBS): New variable.
- (init): Delete special target.
-
- * Makefile (mung_msg_S.h): Put rule *after* inclusion of Makeconf.
-
-Thu Sep 5 11:12:32 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * init.c: Include <version.h>.
- (init_version): Delete variable.
- (launch_core_servers): Pass empty string as release; HURD_VERSION
- as version.
-
-Tue Aug 13 17:51:38 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * Makefile (init): Remove -lutil.
- (libutil-libsubst): Variable removed.
- (LDLIBS): New variable.
-
-Mon Aug 12 11:12:22 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * init.c (setup_terminal): Declare LINE.
- (add_terminal): Don't declare LINE.
-
-Thu Aug 8 16:34:06 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * init.c (setup_terminal): New function.
- (add_terminal): Use setup_terminal.
- (reread_ttys): When turning an existent terminal spec on, call
- setup_terminal before startup_terminal.
-
- * init.c (struct terminal): New member `read'.
- (shutdown_terminal): New function.
- (reread_ttys): Use shutdown_terminal instead of doing it by hand.
- Keep track of which ttys we used to know about are no longer in
- /etc/ttys, and treat them as now `off'.
-
- * init.c (kill_everyone): `continue' in the essential task case
- didn't go back to the main loop; fix it up correctly.
-
-Tue Jul 16 11:55:09 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * init.c (process_signal): Set WUNTRACED in call to waitpid.
-
-Sun Jul 7 21:18:10 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * init.c (init_stdarrays): Don't use unsafe MOVE_SEND in call to
- interruptible proc_setexecdata.
- (open_console): Likewise, for file_set_translator.
-
-Wed Jul 3 14:46:41 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * Makefile (init): Add libports (because libfshelp.so requires it,
- lose lose lose).
-
- * init.c (process_signal) [case SIGCHLD]: Correctly place `break'
- *outside* of for loop.
-
-Mon Jul 1 18:07:56 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * init.c (process_signal): On SIGCHLD, keep reaping children until
- we get an error; tolerate all errors silently.
-
-Mon Jun 24 16:29:24 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * init.c (kill_multi_user): Kill user tasks before doing
- notify_shutdown.
-
-Fri Jun 21 16:17:08 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * init.c (open_console): Pass correct length of argument vector
- when setting active translators.
- <maptime.h>: New include.
- (open_console): Print error messages for /dev/console failures.
- Reduce the scope of some variables.
-
-Thu Jun 20 14:51:14 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * init.c (mapped_time): New variable.
- (launch_multi_user): Initialize mapped_time.
-
- * init.c (_PATH_RUNCOM): Move to /libexec/rc.
-
-Wed Jun 19 14:49:08 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * init.c (run_for_real): Doc fix.
- (startup_terminal): Deal properly if one of the run_for_real's
- fails.
- (launch_single_user): If the shell can't be started, crash the
- system.
- (process_rc_script): Return non-zero if run_for_real fails.
- (process_signal) [SIGCHLD]: If process_rc_script fails, go back to
- single-user.
- (S_startup_essential_task): Likewise.
- (init_ttys): Return non-zero if we fail.
- (startup_terminal): Return non-zero if we don't actually start
- anything.
- (startup_ttys): Return non-zero if we fail.
- (launch_multi_user): If init_ttys fails, go back to single. If we
- go multi, actually set system_state accordingly. If startup_ttys
- fails, go back to single.
- (init_ttys, reread_ttys): Test return value of setttyent
- correctly.
-
-Mon Jun 17 14:05:33 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * Makefile (libutil-libsubst): Define (as -lutil); and link
- against -lutil.
- * init.c: Include <ttyent.h>, <argz.h>, and <utmp.h>.
- (add_terminal, init_ttys, free_ttys, startup_terminal,
- startup_ttys, find_line, reread_ttys, restart_terminal): New functions.
- (launch_multi_user): Use new functions to do things right.
- (session_pid): Delete variable.
- (kill_multi_user): Call free_ttys.
- (process_signal) [SIGHUP]: Call reread_ttys.
- [SIGCHLD/MULTI]: Call restart_terminal.
-
- * init.c (run_for_real): New arg `setsid'; only do setsid if it's
- set. All callers changed. Return the pid of the new program,
- not the task port. All callers changed.
-
- * Makefile (dir): Now init.
-
- * init.c: Include "mung_msg_S.h" instead of "msg_S.h".
- (S_msg_sig_post, S_msg_sig_post_untraced): Include SIGCODE parm.
- * Makefile (mung_msg_S.h): New rule.
-
-Mon Jun 17 00:17:37 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * init.c (run_for_real, open_console, process_signal, reboot_mach,
- run_for_real, run, reboot_system): Use error instead of fprintf.
- (notify_shutdown): Always emit terminating newline.
-
-Fri Jun 14 11:07:30 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * init.c: Include <paths.h>, <error.h>, <sys/wait.h>, and
- <hurd/msg_reply.h>.
- (S_startup_essential_task): When all core servers have
- showed up, call launch_single_user only if RB_SINGLE; otherwise
- call process_rc_script. Call init_stdarrays here.
- (open_console): New function; massaged guts taken from
- launch_single_user. Be more verbose if we do something unusual.
- (launch_single_user): Call open_console. Don't call
- init_stdarrays here.
- (system_state, default_ints): New variables.
- (main): Initialize SYSTEM_STATE and DEFAULT_INTS.
- (run_for_real): Pass default_ints.
- (run): Likewise.
- (S_startup_essential_task): Delete var INITDONE; use SYSTEM_STATE
- instead.
- (launch_single_user): Set SYSTEM_STATE to SINGLE.
- (process_rc_script): New function.
- (launch_multi_user): New function.
- (kill_everyone): New function.
- (kill_multi_user): New function.
- (do_fastboot, rc_pid, session_pid): New variables.
- (process_signal): New function; guts from S_msg_sig_post_untraced.
- Handle state transitions here when programs exit. Process
- SIGTERM, and SIGHUP appropriately.
- (_PATH_RUNCOM, _PATH_LOGIN): New macros.
- (S_msg_sig_post_untraced): Only validate signal here; use
- process_signal to do the work, but reply first.
- (S_msg_sig_post): Likewise.
- (notify_shutdown): New function.
- (reboot_system): Use notify_shutdown.
-
-Wed Jun 12 16:01:17 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * init.c (S_startup_request_notification): Fill NT->name properly.
-
-Mon May 27 11:33:53 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * init.c (launch_single_user): Open TERM RDWR.
- Use openport to get FD from TERM.
- Print errno on assertion failure for FD.
-
-Fri May 24 12:29:20 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * init.c (reboot_mach): Insert a brief pause before actually
- rebooting the kernel so that the user has a chance to see any
- messages that may be displayed.
-
-Tue May 14 11:26:49 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * init.c (S_msg_get_exec_flags, S_msg_set_all_exec_flags,
- S_msg_set_some_exec_flags, S_msg_clear_some_exec_flags): Delete
- functions.
- (S_msg_describe_ports): New function.
-
- * init.c (reboot_system): Print prettier messages for shutdown
- notifications.
-
-Fri May 10 09:25:16 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * init.c: <hurd/startup_notify.h> -> "startup_notify_U.h".
- * Makefile (OBJS): Add startup_notifyUser.o.
-
-Thu May 9 19:03:24 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * init.c (struct ntfy_task): New member `name'.
- (S_startup_request_notification): Expect and record name.
- (S_msg_startup_dosync): Delete function.
- Include <hurd/startup_notify.h>.
- (reboot_system): Use new startup_dosync interface.
-
- * init.c (init_stdarrays): Use new authentication interface.
-
-Mon May 6 14:25:02 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * init.c (init_version): Upgrade to 0.0.
-
-Mon Apr 29 16:49:18 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * init.c (reboot_system): Not quite yet, though.
-
-Sun Apr 28 19:15:30 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
-
- * init.c (reboot_system): Use 1 minute timeout on reply to
- msg_startup_dosync.
-
-Wed Apr 17 17:06:30 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * init.c (launch_single_user): Set an active, not passive,
- translator on /tmp/console, so it works with / read-only.
- * Makefile (init): Depend on libfshelp.
-
-Mon Mar 25 16:55:22 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * Makefile (init): Add explicit dependency so that
- libshouldbeinlibc is included.
- * init.c: Include <wire.h>.
- (main): Delete declarations of _etext _edata, and __data_start.
- (main): Use new wire_task_self function instead of doing it ourselves.
-
-Tue Dec 19 18:29:19 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * init.c (launch_core_servers, run_for_real): Call proc_mark_exec
- on child proc ports.
-
-Tue Dec 5 15:22:25 1995 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * init.c (launch_single_user): Change initialization of TERMINAL
- to match new term driver arg syntax. Start terminal as ordinary
- passive translator instead of special weird kludge. Deleted
- variables foobiebletchcount, foobiebletch, and termtask.
-
-Sun Nov 5 02:03:33 1995 Miles Bader <miles@gnu.ai.mit.edu>
-
- * init.c (reboot_system): Add flags, noise, & noise_len params to
- proc_getprocinfo. Deallocate NOISE if necessary.
- (S_msg_report_wait): New function.
-
-Tue Oct 24 16:49:08 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * init.c: Undo last change of 9Oct95.
-
-Mon Oct 9 04:29:39 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * init.c: Pass dealloc args in file_exec calls.
-
-Thu Jul 6 15:34:23 1995 Michael I Bushnell <mib@duality.gnu.ai.mit.edu>
-
- * init.c (S_msg_sig_post, S_msg_sig_post_untraced): Reverse order
- of these definitions.
-
- * init.c: Include <hurd/msg_server.h>.
- (reboot_mach): Insert extra parens around assignment inside while
- test.
- (launch_core_servers): Remove assignment from inside if test.
-
- * Makefile: Removed dependencies that are now automatically
- generated.
-
-Thu Feb 9 17:18:21 1995 Michael I Bushnell <mib@geech.gnu.ai.mit.edu>
-
- * init.c (S_msg_sig_post_untraced): Omit obnoxious "random child
- died" messages.
-
-Sat Jan 28 15:00:37 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * init.c: Include "msg_S.h". Prepend `msg_' to msg.defs server
- functions. Add stubs for new msg.defs functions.
-
-Thu Jan 19 01:59:30 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * init.c: Prepend `msg_' to names of msg.defs RPCs.
-
-Mon Nov 28 15:00:42 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * init.c (run_for_real): Print error msg if file_exec fails.
- (shell_pid): New variable.
- (demuxer): Also try msg_server.
- (launch_single_user): Open terminal O_RDWR and dup to 0, 1, 2.
- Set shell_pid after starting shell.
- (S_sig_post): New function; grok SIGCHLD and restart shell if
- shell_pid dies.
- * Makefile (OBJS): Add msgServer.o.
- (init.o): Depend on msg_S.h.
-
-Fri Nov 11 14:06:43 1994 Michael I Bushnell <mib@churchy.gnu.ai.mit.edu>
-
- * init.c (fakeboot): New variable.
- (STANDALONE): Deleted macro.
- (main): Set FAKEBOOT if -f was passed.
- (reboot_mach): Use FAKEBOOT flag instead of STANDALONE macro.
- (launch_core_servers): Likewise.
- (reboot_system): Likewise. Also don't exit here; let
- reboot_mach exit.
-
-Tue Nov 1 04:13:49 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * init.c (main): Use &_start for start of text to wire.
- (main): Use assert_perror in place of `assert (!err)'.
- (launch_single_user): Use _PATH_CONSOLE and _PATH_BSHELL instead
- of hardcoded strings.
- Check for error from io_stat on console, print message.
- Add #if 0'd code to prompt for shell name.
-
-Tue Sep 6 13:09:40 1994 Michael I Bushnell <mib@churchy.gnu.ai.mit.edu>
-
- * init.c (launch_single_user): Don't run device or pipes
- servers by default. Run terminal server inside /tmp if
- /dev/console isn't set up properly.
-
-Wed Aug 31 01:03:51 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * init.c (launch_single_user): Test TERMTASK as port, not boolean;
- if null, properly initialize TERM to MACH_PORT_NULL as well.
-
-Tue Aug 30 17:07:07 1994 Michael I Bushnell <mib@geech.gnu.ai.mit.edu>
-
- * init.c: Include <hurd/term.h>.
-
- * init.c (run): Use file_name_lookup instead of path_lookup.
- (launch_single_user): Likewise.
- (run_for_real): Likewise.
-
- * init.c (init_stdarrays): Use new authentication protocol.
-
-Mon Aug 22 16:44:11 1994 Michael I Bushnell <mib@geech.gnu.ai.mit.edu>
-
- * init.c (run_for_real): If CTTY is set, then also put the process
- in its own login collection.
-
-Fri Aug 19 12:16:47 1994 Michael I Bushnell <mib@geech.gnu.ai.mit.edu>
-
- * init.c (run_for_real): New arg `ctty'. All callers changed.
- If it's set, then set the new process's INIT_PORT_CTTYID
- accordingly, and change CTTY's owner to be the new process pgrp.
- (launch_single_user): Don't free TERM right away, only do it
- after we've passed it to run_for_real on the shell.
-
-Thu Aug 18 16:48:08 1994 Michael I Bushnell <mib@geech.gnu.ai.mit.edu>
-
- * init.c (main): Print informative bootstrap messages.
- (launch_core_servers): Likewise.
- (launch_single_user): Likewise.
- (run): Don't print meaningless bootstrap clutter.
-
- * init.c (launch_single_user): Use task_info; it's less intrusive
- than task_suspend/task_resume.
-
- * init.c (launch_single_user): Run pipes before shell.
-
- * init.c (launch_single_user): Pause a bit to give term a chance
- to startup.
-
- * init.c (bootstrap_args): New variable.
- (main): Set `bootstrap_args' appropriately from argv[1].
- (prompt_for_servers): Deleted variable.
- (run): Use RB_INITNAME instead of prompt_for_servers.
- Only do `pausing' hack if RB_KDB is set.
- (run_for_real): Likewise.
-
- * init.c (main): Wire text and data segment soon after starting.
-
-Wed Aug 17 19:20:51 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * init.c (run_for_real): Call proc_setsid on new proc.
-
-Wed Aug 17 14:04:18 1994 Michael I Bushnell <mib@geech.gnu.ai.mit.edu>
-
- * init.c (init_stdarrays): New function.
- (launch_single_user): Call init_stdarrays.
-
-Tue Aug 16 00:44:20 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * init.c (launch_single_user): Prompt whether to run term or dev.
-
- * init.c (main): Set default_ports[INIT_PORT_BOOTSTRAP] to STARTUP
- while running proc and auth, and then reset it to null.
-
-Mon Aug 15 23:16:24 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * init.c (launch_single_user): Use a volatile var to choose dev or
- term, so you can set it in gdb.
- (main): Set bootstrap port to MACH_PORT_NULL after fetching it.
- Don't set default_ports[INIT_PORT_BOOTSTRAP]; it should be nil.
-
-Mon Aug 15 11:40:34 1994 Michael I Bushnell <mib@geech.gnu.ai.mit.edu>
-
- * init.c (launch_core_servers): Renamed from launch_system.
- Don't start dev, term, pipes, or shell here.
- (S_startup_procinit): Call launch_core_servers instead of
- launch_system.
- (S_startup_authinit): Likewise.
- (launch_single_user): New function.
- (S_startup_essential_task): Call launch_single_user once
- all the core servers have registered themselves here.
-
-Fri Aug 12 14:05:07 1994 Michael I Bushnell <mib@geech.gnu.ai.mit.edu>
-
- * init.c (launch_system): Comment out use of dev for now.
-
-Thu Aug 11 12:25:32 1994 Michael I Bushnell <mib@geech.gnu.ai.mit.edu>
-
- * init.c (launch_system): Run dev instead of term.
-
-Thu Jul 21 17:45:45 1994 Michael I Bushnell <mib@geech.gnu.ai.mit.edu>
-
- * Makefile: Rewritten in accord with new scheme.
- * init.c: Include "startup_reply_U.h instead of "startup_reply.h".
- (demuxer): Remove S_ from references to startup_server.
-
-Tue Jul 19 20:36:30 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
-
- * init.c (run_for_real): Moved unused var BUF inside #if 0 where used.
- (launch_system): Call proc_set_arg_locations, not proc_setprocargs.
-
-Tue Jul 19 12:44:56 1994 Michael I Bushnell (mib@churchy.gnu.ai.mit.edu)
-
- * Makefile (init): Don't use variable $(link) anymore.
-
-Tue Jul 5 14:21:34 1994 Michael I Bushnell (mib@churchy.gnu.ai.mit.edu)
-
- * init.c (launch_system): After terminal driver is running,
- reopen stdin so that we always read through it. Don't do
- output, because that (for reliability) shouldn't depend
- on the terminal driver.
- (main): Open stdin separately from stdout/stderr.
-
- * Makefile (SRCS): New variable.
-
-Fri Jul 1 11:19:46 1994 Michael I Bushnell (mib@churchy.gnu.ai.mit.edu)
-
- * init.c (run_for_real): Return the task we created. All callers
- changed.
-
-Tue Jun 21 14:08:37 1994 Michael I Bushnell (mib@churchy.gnu.ai.mit.edu)
-
- * init.c (launch_system): Correct first arg to pipes.
-
-Mon Jun 20 15:06:19 1994 Michael I Bushnell (mib@churchy.gnu.ai.mit.edu)
-
- * init.c (launch_system): Look for pipes in /hurd/pipes, not
- /bin/pipes.
-
- * init.c (run_for_real): Comment out old code that prompts user;
- abandon attempt if we can't run something.
-
- * Makefile (install): Use $(INSTALL_BIN) instead of cp.
-
-Fri Jun 17 00:13:50 1994 Roland McGrath (roland@geech.gnu.ai.mit.edu)
-
- * init.c (demuxer): Use S_startup_server instead of startup_server.
-
-Wed Jun 15 18:14:59 1994 Michael I Bushnell (mib@geech.gnu.ai.mit.edu)
-
- * init.c (launch_system): Start pipes server after starting shell.
-
- * init.c (run_for_real): New parms ARGS and ARGLEN. All callers
- changed.
-
-Tue May 24 02:20:55 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
-
- * init.c (launch_system): Start the shell before doing proc_setmsgport.
-
-Tue May 24 00:05:43 1994 Michael I Bushnell (mib@churchy.gnu.ai.mit.edu)
-
- * init.c (launch_system): Call proc_setmsgport before fsys_init.
-
-Mon May 16 14:43:47 1994 Michael I Bushnell (mib@churchy.gnu.ai.mit.edu)
-
- * init.c (reboot_system): Restore bits commented out on May 12;
- the proc bug responsible has been fixed.
-
-Fri May 13 14:59:12 1994 Michael I Bushnell (mib@churchy.gnu.ai.mit.edu)
-
- * init.c (launch_system): Make sure the auth server's proc state
- is correct *before* calling startup_authinit_reply.
-
-Thu May 12 15:13:10 1994 Michael I Bushnell (mib@geech.gnu.ai.mit.edu)
-
- * init.c (reboot_system): Comment out bits checking to see
- if the procserver has died; they aren't quite right.
-
- * init.c (S_startup_essential_task): Don't take over the exception
- port of the task right now; this interferes with things too much.
-
-Thu May 12 02:22:08 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
-
- * init.c (launch_system): Don't call _hurd_proc_init; just call
- proc_setprocargs ourselves.
- (launch_system): Do proc_setmsgport last.
- (run, run_for_real): Pass argv[0] with name of program.
-
-Mon May 9 14:30:11 1994 Michael I Bushnell (mib@geech.gnu.ai.mit.edu)
-
- * init.c (init_version): New variable.
- (launch_system): Call proc_register_version; don't call
- proc_setprocargs (which is done by _hurd_proc_init). Give
- correct argument to _hurd_proc_init.
-
- * init.c (S_startup_register_version, S_startup_uname): Deleted.
-
-Fri May 6 13:01:04 1994 Michael I Bushnell (mib@geech.gnu.ai.mit.edu)
-
- * init.c (S_startup_register_version, S_startup_uname):
- New functions (temporary only).
-
-Thu May 5 19:15:39 1994 Michael I Bushnell (mib@geech.gnu.ai.mit.edu)
-
- * init.c: Include <hurd/msg.h> for prototype of startup_dosync.
- Change return types of MiG stubs to be kern_return_t.
- (S_startup_essential_task): Expect new arg CREDENTIAL and
- validate it.
-
-Thu May 5 07:44:21 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
-
- * Makefile: Change uses of $(headers) to $(includedir).
diff --git a/init/init.c b/init/init.c
index 4fed8a3f..d66bee0b 100644
--- a/init/init.c
+++ b/init/init.c
@@ -1,7 +1,7 @@
/* Start and maintain hurd core servers and system run state
- Copyright (C) 1993,94,95,96,97,98,99,2000,01,02,05
- Free Software Foundation, Inc.
+ Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+ 2005, 2008 Free Software Foundation, Inc.
This file is part of the GNU Hurd.
The GNU Hurd is free software; you can redistribute it and/or modify
@@ -253,7 +253,7 @@ reboot_system (int flags)
struct procinfo *pi = 0;
size_t pisize = 0;
char *noise;
- size_t noise_len;
+ size_t noise_len = 0;
int flags;
err = proc_getprocinfo (procserver, pp[ind], &flags,
(int **)&pi, &pisize,
diff --git a/install-sh b/install-sh
index 2c212ccf..a5897de6 100644
--- a/install-sh
+++ b/install-sh
@@ -1,19 +1,38 @@
-#! /bin/sh
-#
+#!/bin/sh
# install - install a program, script, or datafile
-# This comes from X11R5 (mit/util/scripts/install.sh).
+
+scriptversion=2006-12-25.00
+
+# This originates from X11R5 (mit/util/scripts/install.sh), which was
+# later released in X11R6 (xc/config/util/install.sh) with the
+# following copyright and license.
+#
+# Copyright (C) 1994 X Consortium
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to
+# deal in the Software without restriction, including without limitation the
+# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+# sell copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
+# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-# Copyright 1991 by the Massachusetts Institute of Technology
+# Except as contained in this notice, the name of the X Consortium shall not
+# be used in advertising or otherwise to promote the sale, use or other deal-
+# ings in this Software without prior written authorization from the X Consor-
+# tium.
#
-# Permission to use, copy, modify, distribute, and sell this software and its
-# documentation for any purpose is hereby granted without fee, provided that
-# the above copyright notice appear in all copies and that both that
-# copyright notice and this permission notice appear in supporting
-# documentation, and that the name of M.I.T. not be used in advertising or
-# publicity pertaining to distribution of the software without specific,
-# written prior permission. M.I.T. makes no representations about the
-# suitability of this software for any purpose. It is provided "as is"
-# without express or implied warranty.
+#
+# FSF changes to this file are in the public domain.
#
# Calling this script install-sh is preferred over install.sh, to prevent
# `make' implicit rules from creating a file called install from it
@@ -21,230 +40,480 @@
#
# This script is compatible with the BSD install script, but was written
# from scratch.
-#
+nl='
+'
+IFS=" "" $nl"
# set DOITPROG to echo to test this script
# Don't use :- since 4.3BSD and earlier shells don't like it.
-doit="${DOITPROG-}"
-
-
-# put in absolute paths if you don't have them in your path; or use env. vars.
-
-mvprog="${MVPROG-mv}"
-cpprog="${CPPROG-cp}"
-chmodprog="${CHMODPROG-chmod}"
-chownprog="${CHOWNPROG-chown}"
-chgrpprog="${CHGRPPROG-chgrp}"
-stripprog="${STRIPPROG-strip}"
-rmprog="${RMPROG-rm}"
-mkdirprog="${MKDIRPROG-mkdir}"
-
-transformbasename=""
-transform_arg=""
-instcmd="$mvprog"
-chmodcmd="$chmodprog 0755"
-chowncmd=""
-chgrpcmd=""
-stripcmd=""
-rmcmd="$rmprog -f"
-mvcmd="$mvprog"
-src=""
-dst=""
-dir_arg=""
-
-while [ x"$1" != x ]; do
- case $1 in
- -c) instcmd="$cpprog"
- shift
- continue;;
-
- -d) dir_arg=true
- shift
- continue;;
-
- -m) chmodcmd="$chmodprog $2"
- shift
- shift
- continue;;
-
- -o) chowncmd="$chownprog $2"
- shift
- shift
- continue;;
-
- -g) chgrpcmd="$chgrpprog $2"
- shift
- shift
- continue;;
-
- -s) stripcmd="$stripprog"
- shift
- continue;;
-
- -t=*) transformarg=`echo $1 | sed 's/-t=//'`
- shift
- continue;;
-
- -b=*) transformbasename=`echo $1 | sed 's/-b=//'`
- shift
- continue;;
-
- *) if [ x"$src" = x ]
- then
- src=$1
- else
- # this colon is to work around a 386BSD /bin/sh bug
- :
- dst=$1
- fi
- shift
- continue;;
- esac
-done
-
-if [ x"$src" = x ]
-then
- echo "install: no input file specified"
- exit 1
+doit=${DOITPROG-}
+if test -z "$doit"; then
+ doit_exec=exec
else
- true
+ doit_exec=$doit
fi
-if [ x"$dir_arg" != x ]; then
- dst=$src
- src=""
-
- if [ -d $dst ]; then
- instcmd=:
- else
- instcmd=mkdir
- fi
-else
+# Put in absolute file names if you don't have them in your path;
+# or use environment vars.
+
+chgrpprog=${CHGRPPROG-chgrp}
+chmodprog=${CHMODPROG-chmod}
+chownprog=${CHOWNPROG-chown}
+cmpprog=${CMPPROG-cmp}
+cpprog=${CPPROG-cp}
+mkdirprog=${MKDIRPROG-mkdir}
+mvprog=${MVPROG-mv}
+rmprog=${RMPROG-rm}
+stripprog=${STRIPPROG-strip}
+
+posix_glob='?'
+initialize_posix_glob='
+ test "$posix_glob" != "?" || {
+ if (set -f) 2>/dev/null; then
+ posix_glob=
+ else
+ posix_glob=:
+ fi
+ }
+'
-# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
-# might cause directories to be created, which would be especially bad
-# if $src (and thus $dsttmp) contains '*'.
+posix_mkdir=
- if [ -f $src -o -d $src ]
- then
- true
- else
- echo "install: $src does not exist"
- exit 1
- fi
-
- if [ x"$dst" = x ]
- then
- echo "install: no destination specified"
- exit 1
- else
- true
- fi
+# Desired mode of installed file.
+mode=0755
-# If destination is a directory, append the input filename; if your system
-# does not like double slashes in filenames, you may need to add some logic
+chgrpcmd=
+chmodcmd=$chmodprog
+chowncmd=
+mvcmd=$mvprog
+rmcmd="$rmprog -f"
+stripcmd=
- if [ -d $dst ]
- then
- dst="$dst"/`basename $src`
- else
- true
- fi
-fi
+src=
+dst=
+dir_arg=
+dst_arg=
-## this sed command emulates the dirname command
-dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
+copy_on_change=false
+no_target_directory=
-# Make sure that the destination directory exists.
-# this part is taken from Noah Friedman's mkinstalldirs script
+usage="\
+Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
+ or: $0 [OPTION]... SRCFILES... DIRECTORY
+ or: $0 [OPTION]... -t DIRECTORY SRCFILES...
+ or: $0 [OPTION]... -d DIRECTORIES...
-# Skip lots of stat calls in the usual case.
-if [ ! -d "$dstdir" ]; then
-defaultIFS='
-'
-IFS="${IFS-${defaultIFS}}"
+In the 1st form, copy SRCFILE to DSTFILE.
+In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
+In the 4th, create DIRECTORIES.
-oIFS="${IFS}"
-# Some sh's can't handle IFS=/ for some reason.
-IFS='%'
-set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
-IFS="${oIFS}"
+Options:
+ --help display this help and exit.
+ --version display version info and exit.
-pathcomp=''
+ -c (ignored)
+ -C install only if different (preserve the last data modification time)
+ -d create directories instead of installing files.
+ -g GROUP $chgrpprog installed files to GROUP.
+ -m MODE $chmodprog installed files to MODE.
+ -o USER $chownprog installed files to USER.
+ -s $stripprog installed files.
+ -t DIRECTORY install into DIRECTORY.
+ -T report an error if DSTFILE is a directory.
-while [ $# -ne 0 ] ; do
- pathcomp="${pathcomp}${1}"
- shift
+Environment variables override the default commands:
+ CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
+ RMPROG STRIPPROG
+"
- if [ ! -d "${pathcomp}" ] ;
- then
- $mkdirprog "${pathcomp}"
- else
- true
- fi
+while test $# -ne 0; do
+ case $1 in
+ -c) ;;
- pathcomp="${pathcomp}/"
-done
-fi
+ -C) copy_on_change=true;;
-if [ x"$dir_arg" != x ]
-then
- $doit $instcmd $dst &&
+ -d) dir_arg=true;;
- if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi &&
- if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi &&
- if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi &&
- if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi
-else
+ -g) chgrpcmd="$chgrpprog $2"
+ shift;;
-# If we're going to rename the final executable, determine the name now.
+ --help) echo "$usage"; exit $?;;
- if [ x"$transformarg" = x ]
- then
- dstfile=`basename $dst`
- else
- dstfile=`basename $dst $transformbasename |
- sed $transformarg`$transformbasename
- fi
+ -m) mode=$2
+ case $mode in
+ *' '* | *' '* | *'
+'* | *'*'* | *'?'* | *'['*)
+ echo "$0: invalid mode: $mode" >&2
+ exit 1;;
+ esac
+ shift;;
-# don't allow the sed command to completely eliminate the filename
+ -o) chowncmd="$chownprog $2"
+ shift;;
- if [ x"$dstfile" = x ]
- then
- dstfile=`basename $dst`
- else
- true
- fi
+ -s) stripcmd=$stripprog;;
+
+ -t) dst_arg=$2
+ shift;;
-# Make a temp file name in the proper directory.
+ -T) no_target_directory=true;;
- dsttmp=$dstdir/#inst.$$#
+ --version) echo "$0 $scriptversion"; exit $?;;
-# Move or copy the file name to the temp name
+ --) shift
+ break;;
- $doit $instcmd $src $dsttmp &&
+ -*) echo "$0: invalid option: $1" >&2
+ exit 1;;
- trap "rm -f ${dsttmp}" 0 &&
+ *) break;;
+ esac
+ shift
+done
-# and set any options; do chmod last to preserve setuid bits
+if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
+ # When -d is used, all remaining arguments are directories to create.
+ # When -t is used, the destination is already specified.
+ # Otherwise, the last argument is the destination. Remove it from $@.
+ for arg
+ do
+ if test -n "$dst_arg"; then
+ # $@ is not empty: it contains at least $arg.
+ set fnord "$@" "$dst_arg"
+ shift # fnord
+ fi
+ shift # arg
+ dst_arg=$arg
+ done
+fi
-# If any of these fail, we abort the whole thing. If we want to
-# ignore errors from any of these, just make sure not to ignore
-# errors from the above "$doit $instcmd $src $dsttmp" command.
+if test $# -eq 0; then
+ if test -z "$dir_arg"; then
+ echo "$0: no input file specified." >&2
+ exit 1
+ fi
+ # It's OK to call `install-sh -d' without argument.
+ # This can happen when creating conditional directories.
+ exit 0
+fi
- if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi &&
- if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi &&
- if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi &&
- if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi &&
+if test -z "$dir_arg"; then
+ trap '(exit $?); exit' 1 2 13 15
+
+ # Set umask so as not to create temps with too-generous modes.
+ # However, 'strip' requires both read and write access to temps.
+ case $mode in
+ # Optimize common cases.
+ *644) cp_umask=133;;
+ *755) cp_umask=22;;
+
+ *[0-7])
+ if test -z "$stripcmd"; then
+ u_plus_rw=
+ else
+ u_plus_rw='% 200'
+ fi
+ cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
+ *)
+ if test -z "$stripcmd"; then
+ u_plus_rw=
+ else
+ u_plus_rw=,u+rw
+ fi
+ cp_umask=$mode$u_plus_rw;;
+ esac
+fi
-# Now rename the file to the real destination.
+for src
+do
+ # Protect names starting with `-'.
+ case $src in
+ -*) src=./$src;;
+ esac
+
+ if test -n "$dir_arg"; then
+ dst=$src
+ dstdir=$dst
+ test -d "$dstdir"
+ dstdir_status=$?
+ else
+
+ # Waiting for this to be detected by the "$cpprog $src $dsttmp" command
+ # might cause directories to be created, which would be especially bad
+ # if $src (and thus $dsttmp) contains '*'.
+ if test ! -f "$src" && test ! -d "$src"; then
+ echo "$0: $src does not exist." >&2
+ exit 1
+ fi
+
+ if test -z "$dst_arg"; then
+ echo "$0: no destination specified." >&2
+ exit 1
+ fi
+
+ dst=$dst_arg
+ # Protect names starting with `-'.
+ case $dst in
+ -*) dst=./$dst;;
+ esac
- $doit $rmcmd -f $dstdir/$dstfile &&
- $doit $mvcmd $dsttmp $dstdir/$dstfile
+ # If destination is a directory, append the input filename; won't work
+ # if double slashes aren't ignored.
+ if test -d "$dst"; then
+ if test -n "$no_target_directory"; then
+ echo "$0: $dst_arg: Is a directory" >&2
+ exit 1
+ fi
+ dstdir=$dst
+ dst=$dstdir/`basename "$src"`
+ dstdir_status=0
+ else
+ # Prefer dirname, but fall back on a substitute if dirname fails.
+ dstdir=`
+ (dirname "$dst") 2>/dev/null ||
+ expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$dst" : 'X\(//\)[^/]' \| \
+ X"$dst" : 'X\(//\)$' \| \
+ X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
+ echo X"$dst" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'
+ `
+
+ test -d "$dstdir"
+ dstdir_status=$?
+ fi
+ fi
+
+ obsolete_mkdir_used=false
+
+ if test $dstdir_status != 0; then
+ case $posix_mkdir in
+ '')
+ # Create intermediate dirs using mode 755 as modified by the umask.
+ # This is like FreeBSD 'install' as of 1997-10-28.
+ umask=`umask`
+ case $stripcmd.$umask in
+ # Optimize common cases.
+ *[2367][2367]) mkdir_umask=$umask;;
+ .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
+
+ *[0-7])
+ mkdir_umask=`expr $umask + 22 \
+ - $umask % 100 % 40 + $umask % 20 \
+ - $umask % 10 % 4 + $umask % 2
+ `;;
+ *) mkdir_umask=$umask,go-w;;
+ esac
+
+ # With -d, create the new directory with the user-specified mode.
+ # Otherwise, rely on $mkdir_umask.
+ if test -n "$dir_arg"; then
+ mkdir_mode=-m$mode
+ else
+ mkdir_mode=
+ fi
-fi &&
+ posix_mkdir=false
+ case $umask in
+ *[123567][0-7][0-7])
+ # POSIX mkdir -p sets u+wx bits regardless of umask, which
+ # is incompatible with FreeBSD 'install' when (umask & 300) != 0.
+ ;;
+ *)
+ tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
+ trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
+
+ if (umask $mkdir_umask &&
+ exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
+ then
+ if test -z "$dir_arg" || {
+ # Check for POSIX incompatibilities with -m.
+ # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
+ # other-writeable bit of parent directory when it shouldn't.
+ # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
+ ls_ld_tmpdir=`ls -ld "$tmpdir"`
+ case $ls_ld_tmpdir in
+ d????-?r-*) different_mode=700;;
+ d????-?--*) different_mode=755;;
+ *) false;;
+ esac &&
+ $mkdirprog -m$different_mode -p -- "$tmpdir" && {
+ ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
+ test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
+ }
+ }
+ then posix_mkdir=:
+ fi
+ rmdir "$tmpdir/d" "$tmpdir"
+ else
+ # Remove any dirs left behind by ancient mkdir implementations.
+ rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
+ fi
+ trap '' 0;;
+ esac;;
+ esac
+ if
+ $posix_mkdir && (
+ umask $mkdir_umask &&
+ $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
+ )
+ then :
+ else
+
+ # The umask is ridiculous, or mkdir does not conform to POSIX,
+ # or it failed possibly due to a race condition. Create the
+ # directory the slow way, step by step, checking for races as we go.
+
+ case $dstdir in
+ /*) prefix='/';;
+ -*) prefix='./';;
+ *) prefix='';;
+ esac
+
+ eval "$initialize_posix_glob"
+
+ oIFS=$IFS
+ IFS=/
+ $posix_glob set -f
+ set fnord $dstdir
+ shift
+ $posix_glob set +f
+ IFS=$oIFS
+
+ prefixes=
+
+ for d
+ do
+ test -z "$d" && continue
+
+ prefix=$prefix$d
+ if test -d "$prefix"; then
+ prefixes=
+ else
+ if $posix_mkdir; then
+ (umask=$mkdir_umask &&
+ $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
+ # Don't fail if two instances are running concurrently.
+ test -d "$prefix" || exit 1
+ else
+ case $prefix in
+ *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
+ *) qprefix=$prefix;;
+ esac
+ prefixes="$prefixes '$qprefix'"
+ fi
+ fi
+ prefix=$prefix/
+ done
+
+ if test -n "$prefixes"; then
+ # Don't fail if two instances are running concurrently.
+ (umask $mkdir_umask &&
+ eval "\$doit_exec \$mkdirprog $prefixes") ||
+ test -d "$dstdir" || exit 1
+ obsolete_mkdir_used=true
+ fi
+ fi
+ fi
+
+ if test -n "$dir_arg"; then
+ { test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
+ { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
+ { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
+ test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
+ else
+
+ # Make a couple of temp file names in the proper directory.
+ dsttmp=$dstdir/_inst.$$_
+ rmtmp=$dstdir/_rm.$$_
+
+ # Trap to clean up those temp files at exit.
+ trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
+
+ # Copy the file name to the temp name.
+ (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
+
+ # and set any options; do chmod last to preserve setuid bits.
+ #
+ # If any of these fail, we abort the whole thing. If we want to
+ # ignore errors from any of these, just make sure not to ignore
+ # errors from the above "$doit $cpprog $src $dsttmp" command.
+ #
+ { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
+ { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
+ { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
+ { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
+
+ # If -C, don't bother to copy if it wouldn't change the file.
+ if $copy_on_change &&
+ old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
+ new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
+
+ eval "$initialize_posix_glob" &&
+ $posix_glob set -f &&
+ set X $old && old=:$2:$4:$5:$6 &&
+ set X $new && new=:$2:$4:$5:$6 &&
+ $posix_glob set +f &&
+
+ test "$old" = "$new" &&
+ $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
+ then
+ rm -f "$dsttmp"
+ else
+ # Rename the file to the real destination.
+ $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
+
+ # The rename failed, perhaps because mv can't rename something else
+ # to itself, or perhaps because mv is so ancient that it does not
+ # support -f.
+ {
+ # Now remove or move aside any old file at destination location.
+ # We try this two ways since rm can't unlink itself on some
+ # systems and the destination file might be busy for other
+ # reasons. In this case, the final cleanup might fail but the new
+ # file should still install successfully.
+ {
+ test ! -f "$dst" ||
+ $doit $rmcmd -f "$dst" 2>/dev/null ||
+ { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
+ { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
+ } ||
+ { echo "$0: cannot unlink or rename $dst" >&2
+ (exit 1); exit 1
+ }
+ } &&
+
+ # Now rename the file to the real destination.
+ $doit $mvcmd "$dsttmp" "$dst"
+ }
+ fi || exit 1
+
+ trap '' 0
+ fi
+done
-exit 0
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-end: "$"
+# End:
diff --git a/isofs/ChangeLog b/isofs/ChangeLog
deleted file mode 100644
index bc8c3a73..00000000
--- a/isofs/ChangeLog
+++ /dev/null
@@ -1,278 +0,0 @@
-2007-03-25 Thomas Schwinge <tschwinge@gnu.org>
-
- * isofs/inode.c (read_disknode): Correctly convert from nanoseconds to
- microseconds.
-
-2005-02-23 Alfred M. Szmidt <ams@gnu.org>
-
- * Makefile (iso9660fs.static): New target.
-
-2003-08-31 Marcus Brinkmann <marcus@gnu.org>
-
- * main.c (diskfs_readonly, diskfs_hard_readonly): Removed.
- (main): Set diskfs_readonly and diskfs_hard_readonly to one.
-
-2002-09-29 Marcus Brinkmann <marcus@gnu.org>
-
- * Makefile (target): Change to iso9660fs.
- * main.c (diskfs_server_name): Change to iso9660fs.
-
-2002-08-06 Marcus Brinkmann <marcus@gnu.org>
-
- * inode.c (use_file_start_id): Use file_start for directories, so
- the inode of the directory is used for the ".." entries in all
- sub-directories. Contrary to ChangeLog entry 2001-11-27, this is
- safe, because the ISO9660 specification mandates that the first
- entry in every directory must be ".", so a non-file_start using
- directory record can not be the first one.
-
-2002-06-08 Roland McGrath <roland@frob.com>
-
- * inode.c (diskfs_cached_lookup): Use ino_t for argument.
-
-2002-05-08 Roland McGrath <roland@frob.com>
-
- * rr.c (rrip_work): Cast pointer to uintptr_t instead of int.
-
- * main.c (diskfs_append_args): unsigned -> size_t
- * lookup.c (diskfs_get_directs): Likewise.
-
-2001-04-30 Marcus Brinkmann <marcus@gnu.org>
-
- * rr.c (rrip_work): In the MATCH_NAME case, free NMBUF if it is
- non-zero before returning.
-
-2001-04-29 Marcus Brinkmann <marcus@gnu.org>
-
- * lookup.c (diskfs_get_directs): If an RE entry is encountered,
- just decrement I again. Rearrange the code to check for a new
- logical sector in any case. Also make sure to always release RR
- before returning. This fixes some memory leaks and Debian bug
- report #63373.
-
-2001-02-25 Roland McGrath <roland@frob.com>
-
- * lookup.c: Include <stdlib.h> for abort decl.
-
-2001-02-20 Marcus Brinkmann <marcus@gnu.org>
-
- * inode.c: Include <time.h>. Reported by Arkadi E. Shishlov
- <arkadi@it.lv>.
-
-2001-01-07 Marcus Brinkmann <marcus@gnu.org>
-
- * lookup.c: Make diskfs_dirstat_size const.
-
-2000-12-21 Marcus Brinkmann <marcus@gnu.org>
-
- * rr.c (rrip_work): Use strdup instead malloc and strcpy.
- Assert that strdup and malloc (for rr->trans) succeeds.
- * pager.c: Include <errno.h>.
- (create_disk_pager): If malloc fails, exit with error.
- * main.c (read_sblock): Fail if malloc does.
- * inode.c (diskfs_cached_lookup): When allocating memory for dn or
- np fails, release spinlock, rrip (and allocated memory) and return
- ENOMEM.
- (load_inode): Likewise (but no rrip). Also, if *npp is non-zero,
- release diskfs_node_refcnt_lock before returning.
- Reported by Igor Khavkine <i_khavki@alcor.concordia.ca>.
-
-2000-11-27 Marcus Brinkmann <marcus@gnu.org>
-
- The last two changes introduced two new inode overlaps
- (file_start was not shifted by store block size, and directories'
- shifted file_start offset can be the same as the struct dirrect
- offset of their first directory entry).
-
- * inode.c (use_file_start_as_id): New function to determine
- if to use file_start or struct dirrect * as node id.
- The directory recognition code comes from read_disknode.
- (cache_inode): Use use_file_start_as_id instead doing the work
- ourselve. Shift file_start by store->log2_block_size.
- (load_inode): Likewise.
- * lookup.c (diskfs_get_directs): Likewise.
- Declare use_file_start_id.
-
-2000-11-26 Marcus Brinkmann <marcus@gnu.org>
-
- Fix hard link handling for non-zero length files.
- * inode.c: Fix comment about inode numbers.
- (node_cache): New member ID to store unique identifier.
- (inode_cache_find): Change RECORD arg into ID and compare it
- with id member of node_cache.
- (cache_inode): Swap order of args and add new arg RR (change dr
- into record along the way). Use RR to find out cache ID.
- Use id member of node_cache to look for ID. Cache ID.
- (load_inode): Call inode_cache_find with correct ID, depending
- on RR and file size. Frob arguments to cache_inode to comply with
- the new definition.
- (read_disknode): Set st_ino according depending on RR and file size.
- * lookup.c: Doc spelling fix.
- (diskfs_get_directs): Include code again that was removed by last change,
- but use it only if not symlink or zero length file.
-
-2000-11-26 Marcus Brinkmann <marcus@gnu.org>
-
- Closes Debian Bug #68417:
- * rr.c (rrip_work): In helper function add_comp set targused to
- zero after malloc, and loop over realloc in case doubling is not
- enough. After finalizing the link, set VALID_SL valid flag.
- * inode.c (read_disknode): For links use rl->target instead
- rl->name.
-
- Closes Debian Bug #69281: Don't use file_start as inode numbers,
- but the offset of the directory record in disk_image. This is what
- Linux 2.4 does.
- * isofs.h (struct disknode): New member struct dirrect *dr.
- * inode.c: Fix comment about inode numbers.
- (struct node_cache): Fix comment about file_start (it's not unique).
- In fact, file_start is invalid for symlinks, and only stored here
- for convenience. Maybe caching file_start can be avoided by
- rearranging the code.
- (inode_cache_find): Change first argument from off_t file_start
- to struct dirrect *dr and fix the doc.
- Compare cached value of DR with this argument, instead FILE_START.
- (diskfs_cached_lookup): Set DR member of DN.
- (load_inode): Call inode_cache_find with RECORD instead FILE_START.
- Set DR member of DN.
- (read_disknode): Set inode number to DR - DISK_IMAGE instead
- FILE_START.
- * lookup.c (diskfs_get_directs): Remove variable file_start.
- Don't calculate file_start. Set D_FILENO to EP - DISK_IMAGE
- instead FILE_START.
-
-2000-07-26 Mark Kettenis <kettenis@gnu.org>
-
- * Makefile (HURDLIBS): Reorder libs such that the threads lib
- comes before the ports lib. This makes sure the functions in
- libthreads properly override the stubs in libports with the new
- dynamic linker semantics in glibc 2.2.
-
-1999-11-20 Roland McGrath <roland@baalperazim.frob.com>
-
- * lookup.c (dirscanblock): Add const to type of NAME parameter.
- (isonamematch): Likewise.
- * rr.c (rrip_match_lookup): Likewise.
- (rrip_work): Likewise. Change char -> size_t for MATCH_NAMELEN.
- * rr.h: Update decls.
-
-1999-10-13 Roland McGrath <roland@baalperazim.frob.com>
-
- * main.c (diskfs_name_max): New variable.
-
-1999-09-13 Roland McGrath <roland@baalperazim.frob.com>
-
- * pager.c: Reverted changes related to io_map_segment.
-
-1999-09-07 Thomas Bushnell, BSG <tb@mit.edu>
-
- * pager.c (diskfs_get_filemap): Accept additional parameter.
-
-1999-07-10 Roland McGrath <roland@baalperazim.frob.com>
-
- * isofs.h: Add #include <sys/mman.h> for munmap decl.
-
-1999-07-09 Thomas Bushnell, BSG <tb@mit.edu>
-
- * lookup.c (diskfs_get_directs): Use mmap instead of vm_allocate.
- * pager.c (pager_read_page): Likewise.
-
-1999-07-03 Thomas Bushnell, BSG <tb@mit.edu>
-
- * lookup.c (diskfs_get_directs): Use munmap instead of
- vm_deallocate.
-
-1999-06-13 Roland McGrath <roland@baalperazim.frob.com>
-
- * lookup.c (diskfs_get_directs): Add cast to silence warning.
-
-1999-01-23 Roland McGrath <roland@baalperazim.frob.com>
-
- * main.c (main): Use diskfs_init_main.
-
-1999-01-22 Roland McGrath <roland@baalperazim.frob.com>
-
- * rr.c (rrip_work): Remove makedev macro definition.
-
-1998-12-27 Roland McGrath <roland@baalperazim.frob.com>
-
- * inode.c (diskfs_set_statfs): Remove __ from struct statfs members.
- Use bzero first instead of setting individual fields to zero.
-
-1998-12-21 Mark Kettenis <kettenis@phys.uva.nl>
-
- * inode.c (diskfs_set_statfs): Fill in statfs members with
- sensible values.
-
-Wed Oct 28 22:52:04 1998 Joel N. Weber II <devnull@methedrine.ai.mit.edu>
-
- * inode.c (read_disknode): Use FSTYPE_ISO9660.
-
-1998-09-04 Roland McGrath <roland@baalperazim.frob.com>
-
- * lookup.c (diskfs_lookup_hard): Fix defn with `const'.
- (diskfs_direnter_hard): Likewise.
- (diskfs_get_directs): Use `const' for local var NAME.
- * inode.c (diskfs_set_translator): Fix defn with `const'.
-
-1997-09-22 Miles Bader <miles@gnu.ai.mit.edu>
-
- * main.c (diskfs_append_args): New function.
-
-1997-09-19 Miles Bader <miles@gnu.ai.mit.edu>
-
- * rr.h (GNUEXT_ID): Make value a string.
- * rr.c (rrip_work): ER->lenid should be ER->len_id.
- Remove unused variable.
-
-1997-09-18 Miles Bader <miles@gnu.ai.mit.edu>
-
- * inode.c (read_disknode): RR should be RL.
- Assign 0's type-correctly to NP->dn->translator and ->translen.
- (diskfs_node_norefs): The translator field is in NP->dn, not NP.
-
-Tue Sep 16 15:34:21 1997 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * rr.c (gnuext_live): New variable.
- (rrip_work): Comprehend AU, TR, MD, and FL, all as GNU
- extensions. Recognize GNU extension id field when processing ER
- fields.
- (release_rrip): Free RR->trans if it's live.
- * inode.c (read_disknode): Interpret and install the values set by
- AU, TR, MD, and FL extensions.
- (diskfs_node_norefs): Free NP->translator if it's set.
- * isofs.h (struct disknode): New members `translen' and
- `translator'.
- * rr.h (struct gn_au, struct gn_tr, struct gn_md, struct gn_fl):
- New strucures.
- (GNUEXT_SRC, GNUEXT_DES, GNUEXT_ID, GNUEXT_VERS): New macros.
- (struct rrip_lookup): New members author, translen, trans,
- allmode, flags.
- (VALID_AU, VALID_TR, VALID_MD, VALID_FL): New macros.
-
- * Makefile (DIST_FILES): Add, referring to EXTENSIONS.
- * EXTENSIONS: New file.
-
-Wed Aug 20 14:29:11 1997 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * pager.c (diskfs_get_filemap): If pager_create fails, return
- error to caller.
-
-Tue Aug 19 14:20:09 1997 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * rr.c (rrip_work) [SL]: Component length field does not include
- the two header bytes, so add an extra two in advancing the pointer
- past the component.
-
-Thu Aug 7 16:01:29 1997 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * inode.c (read_disknode): Units of st_blocks are 512 byte chunks,
- not logical_block_size chunks.
-
-1997-07-22 Miles Bader <miles@gnu.ai.mit.edu>
-
- * Makefile (dir): Is isofs, not ufs.
-
-Mon Jul 21 16:00:04 1997 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * Makefile (LCLHDRS): Remove susp.h.
diff --git a/isofs/inode.c b/isofs/inode.c
index 091b75ba..99aca957 100644
--- a/isofs/inode.c
+++ b/isofs/inode.c
@@ -431,31 +431,20 @@ read_disknode (struct node *np, struct dirrect *dr,
{
struct timespec ts;
isodate_915 (dr->date, &ts);
- st->st_ctime = st->st_mtime = st->st_atime = ts.tv_sec;
- st->st_ctime_usec = st->st_mtime_usec = st->st_atime_usec
- = ts.tv_nsec / 1000;
+ st->st_ctim = st->st_mtim = st->st_atim = ts;
}
/* Override what we have better info for */
if (rl->valid & VALID_TF)
{
if (rl->tfflags & TF_CREATION)
- {
- st->st_ctime = rl->ctime.tv_sec;
- st->st_ctime_usec = rl->ctime.tv_nsec / 1000;
- }
+ st->st_ctim = rl->ctime;
if (rl->tfflags & TF_ACCESS)
- {
- st->st_atime = rl->atime.tv_sec;
- st->st_atime_usec = rl->atime.tv_nsec / 1000;
- }
+ st->st_atim = rl->atime;
if (rl->tfflags & TF_MODIFY)
- {
- st->st_mtime = rl->mtime.tv_sec;
- st->st_mtime_usec = rl->mtime.tv_nsec / 1000;
- }
+ st->st_mtim = rl->mtime;
}
st->st_blksize = logical_block_size;
diff --git a/isofs/lookup.c b/isofs/lookup.c
index f3e7581f..8daa5464 100644
--- a/isofs/lookup.c
+++ b/isofs/lookup.c
@@ -50,11 +50,11 @@ isonamematch (const char *dirname, size_t dnamelen,
if (dnamelen == unamelen)
return 1;
- /* User has ommitted the version number */
+ /* User has omitted the version number */
if (dirname[unamelen] == ';')
return 1;
- /* User has ommitted an empty extension */
+ /* User has omitted an empty extension */
if (dirname[unamelen] == '.'
&& (dirname[unamelen+1] == '\0' || dirname[unamelen+1] == ';'))
return 1;
diff --git a/isofs/rr.c b/isofs/rr.c
index f26d9e42..be4395d6 100644
--- a/isofs/rr.c
+++ b/isofs/rr.c
@@ -505,7 +505,7 @@ rrip_work (struct dirrect *dr, struct rrip_lookup *rr,
we got here from the exit point of the function, then
VALID_NM is actually clear. */
- /* Save these, becuase rrip_work will clear them. */
+ /* Save these, because rrip_work will clear them. */
savename = (rr->valid & VALID_NM) ? rr->name : 0;
realdir = rr->realdirent;
diff --git a/libcons/ChangeLog b/libcons/ChangeLog
deleted file mode 100644
index af2bd34a..00000000
--- a/libcons/ChangeLog
+++ /dev/null
@@ -1,223 +0,0 @@
-2005-03-05 Samuel Thibault <samuel.thibault@ens-lyon.org>
-
- * priv.h (_cons_file): Prototype moved and renamed to...
- * cons.h (cons_file): ... this.
- * init-init.c (cons_init): Updated `_cons_file' reference.
- * opts-std-startup.c (_cons_file): Renamed into `cons_file'. Updated
- reference.
-
-2005-01-06 Marco Gerards <metgerards@student.han.nl>
-
- * Makefile (SRCS): Add `vcons-move-mouse.c' and `vcons-event.c'.
- * cons.h (mouse_movement): New enum.
- (mouse_button): Likewise.
- (mouse_event): New struct.
- (mouse_event_t): New type.
- (cons_vcons_set_mousecursor_pos): New prototype.
- (cons_vcons_set_mousecursor_status): Likewise.
- (cons_vcons_move_mouse): Likewise.
- * file-changed.c (cons_S_file_changed): Generate the
- `CONS_EVT_OUTPUT' event, in case there was output.
- * opts-std-startup.c (OPT_MOUSE_SHOW, OPT_MOUSE_HIDE)
- (OPT_MOUSE_SENS, DEFAULT_MOUSE_SENS, DEFAULT_MOUSE_SENS_STRING):
- New macros.
- (_cons_show_mouse, _cons_hide_mouse, _cons_mouse_sens): New
- variables.
- (startup_options): Add the options `--mouse-show-on',
- `--mouse-hide-on' and `--mouse-sensitivity'.
- (parse_startup_opt): Parse the options that were added to
- `startup_options' using the new local function `parse_events'.
- * priv.h (CONS_EVT_MOUSE_MOVE, CONS_EVT_MOUSE_BUTTON)
- (CONS_EVT_KEYPRESS, CONS_EVT_OUTPUT): New macros.
- (_cons_show_mouse, _cons_hide_mouse, _cons_mouse_sens): New
- declarations.
- (_cons_vcons_input): New prototype.
- (_cons_vcons_console_event): Likewise.
- * vcons-event.c: New file.
- * vcons-move-mouse.c: Likewise.
- * vcons-input.c (_cons_vcons_input): New function.
- (cons_vcons_input): Rewritten to use _cons_vcons_input and report
- the `CONS_EVT_KEYPRESS' event.
- * vcons-refresh.c: Include "priv.h".
- (cons_vcons_refresh): Report the `CONS_EVT_OUTPUT' event.
- * vcons-scrollback.c: Include "priv.h".
- (cons_vcons_scrollback): Report the `CONS_EVT_OUTPUT' event.
-
-2003-08-16 Marco Gerards <metgerards@student.han.nl>
-
- * cons.h (cons_vcons_set_dimension): Fix typo.
-
-2003-08-11 Marco Gerards <metgerards@student.han.nl>
-
- * cons.h (cons_vcons_set_dimension): New prototype.
- * vcons-refresh.c (cons_vcons_refresh): Call
- cons_vcons_set_dimension instead of cons_vcons_clear.
-
-2003-08-01 Marco Gerards <metgerards@student.han.nl>
-
- * opts-std-startup.c: Include <string.h>.
- (OPT_VISUAL_BELL): New macro.
- (OPT_AUDIBLE_BELL): Likewise.
- (_cons_visual_bell): New variable.
- (_cons_audible_bell): Likewise.
- (startup_options): Added options "--visual-bell" and
- "--audible-bell" ...
- (parse_startup_opt): ...and parse those new options here.
- * priv.h (bell_type_t): New enumeration.
- (_cons_visual_bell): New external variable.
- (_cons_audible_bell): Likewise.
- * file-changed.c (cons_S_file_changed): Use the right bell.
-
-2002-10-04 Marcus Brinkmann <marcus@gnu.org>
-
- * vcons-open.c (cons_vcons_open): Add casts to silence gcc
- warning.
-
-2002-09-22 Marcus Brinkmann <marcus@gnu.org>
-
- * vcons-refresh.c (cons_vcons_refresh): Take VCONS->scrolling into
- account.
-
-2002-09-17 Marcus Brinkmann <marcus@gnu.org>
-
- * opts-std-startup.c (OPT_NO_JUMP_DOWN_ON_INPUT): New macro.
- (OPT_NO_JUMP_DOWN_ON_OUTPUT): Likewise.
- (_cons_jump_down_on_input): Default to 1.
- (startup_options): Add new options --no-jump-down-on-input and
- --no-jump-down-on-output.
- (parse_startup_opt): Handle these new options.
-
-2002-09-16 Marcus Brinkmann <marcus@gnu.org>
-
- * cons.h: Add prototype for cons_vcons_clear.
- * file-changed.c (cons_S_file_changed): Prepare all areas we write
- to with cons_vcons_clear (unless we use cons_vcons_scroll
- already).
- * vcons-refresh.c (cons_vcons_refresh): Likewise.
- * vcons-scrollback.c (_cons_vcons_scrollback): Likewise.
-
- * opts-std-startup.c (parse_startup_opt): Use argp_error instead
- argp_usage for error. Replace case for ARGP_KEY_END with case for
- ARGP_KEY_NO_ARGS.
-
-2002-09-14 Marcus Brinkmann <marcus@gnu.org>
-
- * Makefile (SRCS): Add vcons-input.c.
- * vcons-input.c: New file.
-
- * vcons-scrollback.c (_cons_vcons_scrollback): New function.
- (cons_vcons_scrollback): Reimplement in terms of
- _cons_vcons_scrollback.
- * cons.h (cons_scroll_t): New type.
- (cons_vcons_scrollback): Update prototype.
-
- * priv.h (_cons_jump_down_on_input): New extern.
- (_cons_jump_down_on_output): Likewise.
- (_cons_vcons_scrollback): New prototype.
- * opts-std-startup.c (OPT_JUMP_DOWN_ON_INPUT): New macro.
- (OPT_JUMP_DOWN_ON_OUTPUT): Likewise.
- (_cons_jump_down_on_input): New variable.
- (_cons_jump_down_on_output): Likewise.
- (startup_options): Add new options --jump-down-on-input and
- --jump-down-on-output.
- (parse_startup_opt): Handle these new options.
- * file-changed.c (cons_S_file_changed): Support the jump down on
- output option.
-
-2002-09-10 Marcus Brinkmann <marcus@gnu.org>
-
- * file-changed.c (cons_S_file_changed): Fix typo in last change.
-
- * cons.h: New prototype for cons_vcons_set_scroll_lock.
- (struct vcons): Add member FLAGS to state.
- * file-changed.c (cons_S_file_changed): Handle change of flags.
- * vcons-refresh.c (cons_vcons_refresh): Copy FLAGS field.
- Call cons_vcons_set_scroll_lock.
-
- * cons-switch.c (cons_switch): Initialize VCONS_ENTRY even if
- DELTA is negative.
-
-2002-09-09 Marcus Brinkmann <marcus@gnu.org>
-
- * Makefile (SRCS): Add vcons-scrollback.c.
- * vcons-scrollback.c: New file.
- * cons.h (struct vcons): Add SCROLLING member.
- * file-changed.c: Include <assert.h>.
- (cons_S_file_changed): Be careful to take VCONS->scrolling into
- account when doing clipping and scrolling.
-
- * cons-switch.c: Roll back to earlier version with vcons ->
- vcons_entry adjustments. The user is now expected to hold a
- reference to the VCONS.
- * cons.h: Fix prototype, too.
-
- * vcons-open.c (cons_vcons_open): Initialize VCONS->lock,
- VCONS->input and VCONS->display.
-
- * vcons-remove.c: New file.
- * Makefile (SRCS): Add vcons-destroy.c.
- * cons.h: New type vcons_list_t.
- (struct vcons_list): New structure.
- (struct cons_notify): Remove VCONS member.
- (struct vcons): Remove members NEXT, PREV and NOTIFY. Add the
- notify structure to the top to make it possible to use a vcons as
- a port. New member VCONS_ENTRY.
- (struct cons): Change type of members vcons_list and vcons_last to
- vcons_list_t. Remove member active.
- (cons_vcons_add): Change prototype to match new definition.
- (cons_vcons_remove): Likewise.
- (cons_switch): Likewise.
- (cons_lookup): Likewise.
- (cons_vcons_open): Likewise.
- (cons_vcons_destroy): New prototype.
- * cons-lookup.c (cons_lookup): Change type of R_VCONS argument
- vcons_list_t. Change type of previous_vcons and vcons variables
- to vcons_list_t. Append _entry to all these variables.
- Don't allocate and initialize a vcons_t, but a vcons_list_t.
- After this has been added to the list, call cons_vcons_add.
- * cons-switch.c: Do not include <error.h>
- (cons_switch): Add arguments ACTIVE_ID and R_VCONS. New variable
- ERR and VCONS_ENTRY. Remove variable ACTIVE. Do not keep track
- of active console. Instead, look it up using ACTIVE_ID. Lock the
- returned console. Call cons_vcons_open, not cons_vcons_activate.
- * dir-changed.c (add_one): Change VCONS to VCONS_ENTRY and its
- type from vcons_t to vcons_list_t to follow cons_lookup change.
- (lookup_one): Likewise.
- (cons_S_dir_changed): Likewise.
- * file-changed.c (cons_S_file_changed): Cast NOTIFY to VCONS.
- Check that NOTIFY->cons is not set instead that NOTIFY->vcons is.
- * init-init.c (cons_init): Pass cons_vcons_destroy as
- clean_routine to ports_create_class.
- Don't initialize CONS->active, nor DIR_NOTIFY_PORT->vcons.
- * vcons-add.c (cons_vcons_add): Change argument VCONS to CONS and
- VCONS_ENTRY. Don't do anything here (the user must implement it
- all).
- * vcons-close.c: Don't include <errno.h>, <unistd.h>, <stdio.h>,
- <sys/mman.h>, <sys/fcntl.h>, <mach.h>. Include <assert.h>,
- <hurd/ports.h> and <cthreads.h>.
- (cons_vcons_close): Clear VCONS->vcons_entry->vcons. Derefence
- and destroy VCONS.
- * vcons-open.c (cons_vcons_open): Change arguments from VCONS to
- CONS, VCONS_ENTRY and R_VCONS. New variable VCONS. Set up VCONS
- as a port, and request notification messages on that.
- * vcons-remove.c: Do not include <errno.h>.
- (cons_vcons_remove): Assert that VCONS_ENTRY does not have an open
- VCONS.
-
-2002-08-28 Marcus Brinkmann <marcus@gnu.org>
-
- * file-changed.c (cons_S_file_changed): Take NEW_CUR_LINE modulo
- VCONS->state.screen.lines where appropriate. Adapt calculation of
- SCROLLING, and limit it to the screen size.
- Only scroll at all if there is something to scroll.
- Fix calculation of scrolled-in area.
- * vcons-refresh.c (cons_vcons_refresh): Take
- VCONS->state.screen.cur_line modulo VCONS->state.screen.lines.
-
-2002-08-22 Marcus Brinkmann <marcus@gnu.org>
-
- * demuxer.c, init-init.c, init-loop.c, opts-version.c,
- extra-version.c, dir-changed.c, file-changed.c,
- opts-std-startup.c, cons-lookup.c, cons-switch.c, vcons-remove.c,
- vcons-add.c, vcons-open.c, vcons-close.c, vcons-refresh.c, priv.h,
- mutations.h, cons.h: New files.
diff --git a/libcons/Makefile b/libcons/Makefile
index f3bab3f3..38ca74a7 100644
--- a/libcons/Makefile
+++ b/libcons/Makefile
@@ -1,5 +1,5 @@
#
-# Copyright (C) 1994,95,96,97,98,99,2000,01,02,2005 Free Software Foundation, Inc.
+# Copyright (C) 1994,95,96,97,98,99,2000,01,02,2005,2010 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
@@ -24,7 +24,7 @@ SRCS= demuxer.c init-init.c init-loop.c opts-version.c extra-version.c \
cons-switch.c vcons-remove.c vcons-add.c vcons-open.c \
vcons-close.c vcons-destroy.c vcons-refresh.c vcons-scrollback.c \
vcons-input.c vcons-move-mouse.c vcons-event.c
-LCLHDRS = priv.h mutations.h
+LCLHDRS = priv.h mutations.h $(installhdrs)
installhdrs = cons.h
fs_notify-MIGSFLAGS = -imacros $(srcdir)/mutations.h
diff --git a/libdirmgt/ChangeLog b/libdirmgt/ChangeLog
deleted file mode 100644
index 28d23867..00000000
--- a/libdirmgt/ChangeLog
+++ /dev/null
@@ -1,5 +0,0 @@
-Tue Apr 11 11:14:27 1995 Michael I Bushnell <mib@duality.gnu.ai.mit.edu>
-
- * Makefile: New file.
-
-
diff --git a/libdiskfs/ChangeLog b/libdiskfs/ChangeLog
deleted file mode 100644
index 197ec5ed..00000000
--- a/libdiskfs/ChangeLog
+++ /dev/null
@@ -1,4136 +0,0 @@
-2007-04-04 Thomas Schwinge <tschwinge@gnu.org>
-
- * opts-std-startup.c (parse_startup_opt)
- <_diskfs_no_inherit_dir_group>: Swap the options into the correct
- order. Reported by Olaf Buddenhagen <olafbuddenhagen@gmx.net>.
-
-2006-06-28 Thomas Schwinge <tschwinge@gnu.org>
-
- * Makefile (HURDLIBS): Add `pager'.
-
-2006-03-15 Thomas Schwinge <tschwinge@gnu.org>
-
- * priv.h: Include <argp.h>.
-
-2006-03-05 Roland McGrath <roland@frob.com>
-
- * io-seek.c (diskfs_S_io_seek): Return EINVAL if file pointer would
- become negative.
-
-2004-02-10 Roland McGrath <roland@frob.com>
-
- * opts-runtime.c (diskfs_runtime_argp): Include <argp.h>.
-
-2003-10-11 Marcus Brinkmann <marcus@gnu.org>
-
- * notify-nosenders.c, notify-stubs.c: Delete obsolete files.
-
-2003-06-11 Ognyan Kulev <ogi@fmi.uni-sofia.bg>
-
- * dir-renamed.c (diskfs_rename_dir): Check permissions to remove
- FROMNAME before any modification could take place. Check result
- of removing the from node.
-
-2002-06-26 Marcus Brinkmann <marcus@gnu.org>
-
- * Makefile (DIST_FILES): Variable removed.
- (MIGSTUBS): Use fs_notifyUser.o, not ourfs_notifyUser.o.
- * ourfs_notify.defs: File removed.
- * diskfs.h (struct node): New members DIRMOD_TICK and
- FILEMOD_TICK.
- * node-make.c (diskfs_make_node): Initialize DIRMOD_TICK and
- FILEMOD_TICK.
- * dir-chg.c: Include "fs_notify_U.h" instead "ourfs_notify_U.h".
- (diskfs_S_dir_notice_changes): Use new dir_changed invocation
- instead nowait_dir_changed.
- (diskfs_notice_dirchange): Likewise. Increase tick number.
- Ignore send timeout error.
- * file-chg.c: Include "fs_notify_U.h" instead "ourfs_notify_U.h".
- (diskfs_S_file_notice_changes): Use new file_changed invocation
- instead nowait_file_changed.
- (diskfs_notice_filechange): Likewise. Increase tick number.
- Ignore send timeout error.
-
-2002-06-13 Roland McGrath <roland@frob.com>
-
- * dir-readdir.c (diskfs_S_dir_readdir): Revert last change.
-
-2002-06-08 Roland McGrath <roland@frob.com>
-
- * io-identity.c (diskfs_S_io_identity): Use ino_t for FILENO.
-
- * dir-readdir.c (diskfs_S_dir_readdir): Use vm_size_t for AMT.
-
- * diskfs.h (struct node): Use io_statbuf_t instead of struct stat.
- (struct node): Use ino64_t for cache_id.
- (struct node): Use loff_t instead of off_t.
- (diskfs_grow, diskfs_truncate, diskfs_node_rdwr): Likewise.
- (diskfs_notice_filechange): Likewise.
- (diskfs_cached_lookup): Use ino64_t for CACHE_ID argument.
-
-2002-05-26 Roland McGrath <roland@frob.com>
-
- * dir-unlink.c (diskfs_S_dir_unlink): Return EPERM instead of EISDIR,
- as per POSIX.
-
-2002-05-12 Roland McGrath <roland@frob.com>
-
- * dir-lookup.c (diskfs_S_dir_lookup): Fail with EACCES instead of
- EOPNOTSUPP when attempting to open a special file for io or exec.
-
-2002-05-11 Roland McGrath <roland@frob.com>
-
- * trans-callback.c (_diskfs_translator_callback1_fn): Add an assert
- that netfs_get_translator not fail with EOPNOTSUPP.
-
-2001-11-20 Neal H Walfield <neal@cs.uml.edu>
-
- * diskfs.h (diskfs_boot_filesystem): Documentation fix.
-
-2002-05-08 Roland McGrath <roland@frob.com>
-
- * sync-interval.c (diskfs_set_sync_interval): Cast int to intptr_t
- before any_t.
-
- * io-map-cntl.c (diskfs_S_io_map_cntl): u_int -> vm_address_t
-
- * disk-pager.c (fault_handler): Use %z format for sc_pc.
-
- * dir-lookup.c (diskfs_S_dir_lookup): int -> size_t
- * dir-readdir.c (diskfs_S_dir_readdir): Likewise.
- * file-get-trans.c (diskfs_S_file_get_translator): Likewise.
- * fsys-getroot.c (diskfs_S_fsys_getroot): Likewise.
-
- * diskfs.h (diskfs_append_args): unsigned -> size_t in argument type.
- (diskfs_append_std_options): Likewise.
- (diskfs_get_directs): Likewise.
- * file-exec.c (diskfs_S_file_exec): Likewise.
- * file-get-fs-opts.c (diskfs_S_file_get_fs_options): Likewise.
- * file-get-trans.c (diskfs_S_file_get_translator): Likewise.
- * file-getfh.c (diskfs_S_file_getfh): Likewise.
- * file-set-trans.c (diskfs_S_file_set_translator): Likewise.
- * fsys-getroot.c (diskfs_S_fsys_getroot): Likewise.
- * io-restrict-auth.c (diskfs_S_io_restrict_auth): Likewise.
- * opts-append-std.c (diskfs_append_std_options): Likewise.
- * opts-get.c (diskfs_append_args): Likewise.
- * dir-readdir.c (diskfs_S_dir_readdir): Likewise.
-
-2002-05-08 Roland McGrath <roland@frob.com>
-
- * io-restrict-auth.c (diskfs_S_io_restrict_auth): Remove unused var.
-
-2002-05-04 Roland McGrath <roland@frob.com>
-
- * io-restrict-auth.c (diskfs_S_io_restrict_auth): Use
- iohelp_restrict_iouser.
-
-2002-04-02 Roland McGrath <roland@frob.com>
-
- * node-make.c (diskfs_make_node): Return early if malloc fails.
-
-2002-04-30 Marcus Brinkmann <marcus@gnu.org>
-
- * priv.h: Add OPT_NO_INHERIT_DIR_GROUP and OPT_INHERIT_DIR_GROUP.
- (_diskfs_no_inherit_dir_group): New declaration.
- * node-create.c (_diskfs_no_inherit_dir_group): New variable.
- (diskfs_create_node): Implement SysV group behaviour.
- * opts-common.c (diskfs_common_options): Add
- --no-inherit-dir-group (--nogrpdir, --sysvgroups) and
- --inherit-dir-group (--grpdir, --bsdgroups).
- * opts-append-std.c (diskfs_append_std_options): Add
- --no-inherit-dir-group if set.
- * opts-std-startup.c (parse_startup_opt): Add toggle for
- _diskfs_no_inherit_dir_group.
- * opts-std-runtime.c (struct parse_hook): Add noinheritdirgroup.
- (set_opts): Handle H->noinheritdirgroup.
- (parse_opt): Initialize H->noinheritdirgroup. Handle
- OPT_NO_INHERIT_DIR_GROUP and OPT_INHERIT_DIR_GROUP.
-
-2002-03-23 James A. Morrison <ja2morri@uwaterloo.ca>
-
- * init-startup.c (_diskfs_init_completed): Use error, not
- fprintf.
-
-2002-03-25 Neal H Walfield <neal@cs.uml.edu>
-
- * peropen-make.c (diskfs_make_peropen): Instead of returning the
- peropen, return as error_t and return the peropen in the new
- parameter *PPO.
- * diskfs.h (diskfs_make_peropen): Change declaration to reflect
- new semantics.
-
- * boot-start.c (diskfs_start_bootstrap): Check the return value of
- diskfs_make_peropen using the new semantics.
- (diskfs_S_exec_startup_get_info): Likewise.
- (diskfs_execboot_fsys_startup): Likewise.
- (diskfs_S_fsys_init): Likewise.
- * dir-lookup.c (diskfs_S_dir_lookup): Likewise.
- * dir-mkfile.c (diskfs_S_dir_mkfile): Likewise.
- * file-exec.c (diskfs_S_file_exec): Likewise.
- * file-reparent.c (diskfs_S_file_reparent): Likewise.
- * fsys-getfile.c (diskfs_S_fsys_getfile): Likewise.
- * fsys-getroot.c (diskfs_S_fsys_getroot): Likewise.
- * trans-callback.c (_diskfs_translator_callback2_fn): Likewise.
- * init-startup.c (diskfs_startup_diskfs): Likewise.
-
-2002-03-12 Marcus Brinkmann <marcus@gnu.org>
-
- * opts-append-std.c (diskfs_append_std_options): Only add --sync=N
- or --no-sync option if it is not the default.
-
-2002-03-06 Roland McGrath <roland@frob.com>
-
- * dir-mkfile.c (diskfs_S_dir_mkfile): Clear OPENONLY_STATE_MODES bits
- from FLAGS, not all bits outside O_RDWR|O_EXEC.
-
-2002-03-05 Marcus Brinkmann <marcus@gnu.org>
-
- * diskfs.h: Refer to dir_lookup, not dir_pathtrans, in comment.
- * fsys-getroot.c (diskfs_S_fsys_getroot): Likewise.
- Reported by James A Morrison <ja2morri@student.math.uwaterloo.ca>.
-
-2002-01-03 Roland McGrath <roland@frob.com>
-
- * dir-lookup.c (diskfs_S_dir_lookup): Clear S_ITRANS bits in MODE.
- * dir-mkdir.c (diskfs_S_dir_mkdir): Likewise.
- * dir-mkfile.c (diskfs_S_dir_mkfile): Likewise.
-
- * file-chmod.c (diskfs_S_file_chmod): Preserve S_ITRANS bits in change.
-
-2002-01-02 Roland McGrath <roland@frob.com>
-
- * boot-start.c (diskfs_start_bootstrap) [KERN_INVALID_LEDGER]:
- Pass extra arguments to task_create for OSF variant.
-
-2001-12-31 Roland McGrath <roland@frob.com>
-
- * disk-pager.c (fault_handler): Use sc_pc instead of sc_eip.
-
-2001-12-08 Roland McGrath <roland@frob.com>
-
- * dir-lookup.c (diskfs_S_dir_lookup): Append trailing / to RETRYNAME
- returned for absolute symlink when MUSTBEDIR is set.
- Reported by Moritz Schulte <moritz@duesseldorf.ccc.de>.
- Also, bcopy -> memcpy; avoid strcat.
-
-2001-10-30 Marcus Brinkmann <marcus@gnu.org>
-
- * dir-lookup.c (diskfs_S_dir_lookup): When looking up the next
- pathname component, remove assertion for DS and allocate DS if 0.
- Allow creation of files through symlink with non-existant target.
- From Roland McGrath <roland@frob.com>.
-
-2001-10-11 Roland McGrath <roland@frob.com>
-
- * dir-renamed.c (diskfs_rename_dir): Fix bogus assert.
- From Moritz Schulte <moritz@chaosdorf.de>.
-
-2001-10-01 Marcus Brinkmann <marcus@gnu.org>
-
- * file-getfh.c (diskfs_S_file_getfh): Fix tag of diskfs_fhandle.
- Submitted by Maurizio Boriani <baux@debian.org>.
-
-2001-08-22 Neal H Walfield <neal@cs.uml.edu>
-
- * opts-std-startup.c (startup_options): New compatibility
- option: bootflags, a hidden alias to multiboot-command-line.
- (parse_startup_opt): Bug fix.
-
-2001-08-20 Roland McGrath <roland@frob.com>
-
- * opts-std-startup.c: diskfs_boot_flags -> diskfs_boot_command_line.
- (OPT_BOOT_CMDLINE): Renamed from OPT_BOOTFLAGS.
- (startup_options): --bootflags -> --multiboot-command-line
- (parse_startup_opt): Parse it.
- * diskfs.h: diskfs_boot_flags -> diskfs_boot_command_line.
- (diskfs_boot_filesystem): New macro.
- * init-main.c (diskfs_init_main): Use it.
- * init-init.c (diskfs_init_diskfs): Likewise.
- * console.c (diskfs_console_stdio): Likewise.
- * boot-start.c (_diskfs_boot_privports): Likewise.
- (diskfs_start_bootstrap): Split boot_command_line into words and pass
- those arguments to init instead of diskfs_bootflags.
-
- * opts-std-startup.c (_diskfs_boot_pause): New variable.
- (OPT_BOOT_PAUSE): New macro.
- (startup_options): Add --boot-debug-pause.
- (parse_startup_opt): Parse it.
-
- * diskfs.h: Declare it.
- * boot-start.c (diskfs_start_bootstrap, start_execserver): Use it.
-
- * boot-start.c (diskfs_boot_init_program): New variable.
- * diskfs.h: Declare it.
- * boot-start.c (default_init): Variable removed.
- (diskfs_start_bootstrap): Use diskfs_boot_init_program instead
- of default_init or prompting under -i.
- * opts-std-startup.c (OPT_BOOT_INIT_PROGRAM): New macro.
- (startup_options): Add --boot-init-program.
- (parse_startup_opt): Parse it.
-
-2001-06-21 Neal H Walfield <neal@cs.uml.edu>
-
- * file-getcontrol.c (diskfs_S_file_getcontrol): When checking
- if we can give the control port out, use fshelp_iscontroller
- rather than doing the check by hand.
-
-2001-06-19 Roland McGrath <roland@frob.com>
-
- * dir-lookup.c (diskfs_S_dir_lookup): Handle symlinks to "".
-
-2001-06-16 Roland McGrath <roland@frob.com>
-
- * file-set-trans.c (diskfs_S_file_set_translator): Add some parens.
-
-2001-04-01 Neal H Walfield <neal@cs.uml.edu>
-
- * dir-lookup.c (diskfs_S_dir_lookup): Use
- iohelp_create_empty_iouser.
- * fsys-getfile.c (diskfs_S_fsys_getfile): Use
- iohelp_create_complex_iouser.
- * io-reauthenticate.c (diskfs_S_io_reauthenticate): Use
- new iohelp_reauth semantics.
- * io-restrict-auth.c (diskfs_S_io_restrict_auth): Use
- new iohelp_create_iouser semantics.
- * protid-make.c (diskfs_finish_protid): Use
- iohelp_create_simple_iouser and new iohelp_dup_iouse
- semantics.
- * trans-callback.c (_diskfs_translator_callback2_fn):
- Use iohelp_create_simple_iouser.
-
-2001-06-15 Neal H Walfield <neal@cs.uml.edu>
-
- * file-set-trans.c (diskfs_S_file_set_translator): If
- FS_TRANS_ORPHAN is set, do not ask the active translator to go
- away, just disconnect it.
-
-2001-06-15 Roland McGrath <roland@frob.com>
-
- * Makefile (FSSRCS): Last change got botched in merging.
-
-2001-06-10 Neal H Walfield <neal@cs.uml.edu>
-
- * file-inv-trans.c: Remove this file, function no longer exists.
- * Makefile (FSSRCS): Remove reference to file-inv-trans.c.
-
-2001-05-13 Marcus Brinkmann <marcus@gnu.org>
-
- * file-exec.c: Initialize GID with st_gid rather than st_uid.
-
-2001-04-22 Neal H Walfield <neal@cs.uml.edu>
-
- * Makefile (OTHERSRCS): Add extern-inline.c.
- * diskfs.h (DISKFS_EXTERN_INLINE): New macro.
- (diskfs_spawn_first_thread): Update prototype to include the
- additional parameter, a demuxer.
- (diskfs_begin_using_protid_port): Moved and renamed function
- begin_using_protid_port from priv.h.
- (diskfs_end_using_protid_port): Moved and renamed function
- end_using_protid_port from priv.h.
- * extern-inline.c: New file.
- * fsmutations.h (FILE_INTRAN): Use new function name.
- (FILE_DESTRUCTOR): Likewise.
- (IO_INTRAN): Likewise.
- (IO_DESTRUCTOR): Likewise.
- * init-first.c: Include <hurd/ports.h>.
- (master_thread_function): Unnamed parameter is now the demuxer.
- Use that rather than diskfs_demuxer directly.
- (diskfs_spawn_first_thread): New parameter DEMUXER.
- * init-main.c (diskfs_init_main): Pass diskfs_demuxer to
- diskfs_spawn_first_thread to conform to new semantics.
- * priv.h (begin_using_protid_port): Moved to diskfs.h.
- (end_using_protid_port): Likewise.
-
-2001-04-14 Neal H Walfield <neal@cs.uml.edu>
-
- * node-create.c (diskfs_create_node): If we fail, set *NEWNODE
- to NULL; at least diskfs_S_dir_lookup depends on this behavior.
-
- * init-startup.c (diskfs_startup_diskfs): Use ERR, not errno, so
- we can actually read this variable in a debugger.
-
-2001-04-08 Neal H Walfield <neal@cs.uml.edu>
-
- * io-write.c (diskfs_S_io_write): Make local variable OFF an
- off_t and not an int.
- * io-read.c (diskfs_S_io_read): Likewise.
- * io-stat.c (diskfs_S_io_stat): Use memcpy, not bcopy.
-
-2001-04-01 Roland McGrath <roland@frob.com>
-
- * io-interrupt.c: Obsolete file removed.
- * Makefile (IOSRCS): Remove it from the list.
- Reported by Neal H Walfield <neal@cs.uml.edu>.
-
-2001-03-28 Neal H Walfield <neal@cs.uml.edu>
-
- * protid-rele.c: Doc typo fix.
-
- * shutdown.c: Move initialization of diskfs_fsys_lock from here ...
- * init-init.c: ... to here with the rest of the initialization
- code.
-
- * init-init.c: Do not initialize global variables to zero.
-
- * protid-rele: Doc fix.
- * node-nput.c: Likewise.
- * io-prenotify.c: Likewise.
-
- * dir-chg.c (diskfs_S_dir_notice_changes): Check what malloc
- returns.
- * peropen-make.c (diskfs_make_peropen): Likewise.
-
- * io-identity.c (diskfs_S_io_identity): Use INUM; that is what
- we bothered getting the lock for.
-
- * ports-noports.c, ports-clean.c, ports-soft.c, ports-idle.c,
- ports-consts.c: Dead files finally removed from cvs.
-
-2001-03-28 Marcus Brinkmann <marcus@gnu.org>
-
- * dir-lookup.c (diskfs_S_dir_lookup): New variable USER. Store new
- iouser in that variable and free it after creating the protid for
- DIRPORT.
- * trans-callback.c (_diskfs_translator_callback2_fn): Likewise.
- * io-restrict-auth.c (diskfs_S_io_restrict_auth): Likewise.
- * io-reauthenticate.c (diskfs_S_io_reauthenticate): Likewise.
-
-2001-02-25 Roland McGrath <roland@frob.com>
-
- * readonly-changed.c: New file.
- * Makefile (OTHERSRCS): Add it.
-
- * init-first.c: Include <stdlib.h> for exit decl.
-
-2001-01-30 Neal H Walfield <neal@cs.uml.edu>
-
- * diskfs.h: Fix comment (fsys_shutdown -> fsys_goaway).
-
-2001-01-07 Marcus Brinkmann <marcus@gnu.org>
-
- * diskfs.h: Make diskfs_dirstat_size const.
-
-2001-01-07 Marcus Brinkmann <marcus@gnu.org>
-
- * file-statfs.c: Include <string.h>.
-
-2000-12-26 Roland McGrath <roland@frob.com>
-
- * file-statfs.c (diskfs_S_file_statfs): Zero out the struct statfs
- before calling diskfs_set_statfs. Set f_namelen to diskfs_name_max
- after the call.
- * diskfs.h: Update comment.
-
-2000-12-02 Roland McGrath <roland@frob.com>
-
- * node-times.c (diskfs_set_node_times): Make individual flag checks
- race-proof so we don't lose any flag settings.
-
-2000-07-26 Mark Kettenis <kettenis@gnu.org>
-
- * Makefile (HURDLIBS): Reorder libs such that the threads lib
- comes before the ports lib. This makes sure the functions in
- libthreads properly override the stubs in libports with the new
- dynamic linker semantics in glibc 2.2.
-
-2000-07-18 Thomas Bushnell, BSG <tb@mit.edu>
-
- * io-seek.c (diskfs_S_io_seek): Don't use CHANGE_NODE_FIELD
- anymore; it was causing problems and was a gross hack anyway.
-
-2000-05-14 Marcus Brinkmann <Marcus.Brinkmann@ruhr-uni-bochum.de>
-
- * priv.h (DEFAULT_SYNC_INTERVAL): New macro.
- (DEFAULT_SYNC_INTERVAL_STRING): Likewise.
- (STRINGIFY): Likewise.
- (STRINGIFY_1): Likewise.
- * opts-common.h (diskfs_common_options): Use
- DEFAULT_SYNC_INTERVAL_STRING instead hardcoded value.
- * sync-default.h: Include "priv.h". Use DEFAULT_SYNC_INTERVAL
- instead hardcoded value.
-
-2000-04-29 Marcus Brinkmann <Marcus.Brinkmann@ruhr-uni-bochum.de>
-
- * init-main.c (diskfs_init_main): Dereference BOOTSTRAP before
- checking for MACH_PORT_NULL.
-
-2000-03-17 Roland McGrath <roland@baalperazim.frob.com>
-
- * file-exec.c (diskfs_S_file_exec): Fix typo and braino in last change.
- * init-startup.c (diskfs_startup_diskfs): Fix braino in last change.
-
-2000-03-17 Thomas Bushnell, BSG <tb@mit.edu>
-
- * boot-start.c (diskfs_S_fsys_init, diskfs_start_bootstrap): Don't
- use MOVE_SEND in Hurd RPC.
-
- * file-exec.c (diskfs_S_file_exec): Don't use MAKE_SEND in Hurd
- RPC.
- * init-startup.c (diskfs_startup_diskfs, _diskfs_init_completed):
- Likewise.
-
-2000-03-17 Roland McGrath <roland@baalperazim.frob.com>
-
- * dir-lookup.c (diskfs_S_dir_lookup): Use ports_get_send_right.
-
- * io-reauthenticate.c (diskfs_S_io_reauthenticate): Use
- ports_get_send_right.
-
- * boot-start.c (diskfs_start_bootstrap): Use ports_get_send_right.
- (diskfs_execboot_fsys_startup): Use ports_get_send_right.
- (diskfs_S_fsys_init): Use ports_get_send_right.
- (start_execserver): Use ports_get_send_right.
-
-2000-02-27 Roland McGrath <roland@baalperazim.frob.com>
-
- * file-exec.c (diskfs_S_file_exec): Give the new peropen for the exec
- server O_EXEC permission as well as O_READ.
-
-2000-01-25 Roland McGrath <roland@baalperazim.frob.com>
-
- * dir-lookup.c (diskfs_S_dir_lookup): Follow symlink despite flags if
- MUSTBEDIR is set (i.e. there was a trailing slash).
-
-2000-01-24 Roland McGrath <roland@baalperazim.frob.com>
-
- * rdwr-internal.c (_diskfs_rdwr_internal): Short-circuit return for
- zero-length transfer to avoid side effects, as POSIX requires.
-
-1999-12-13 Roland McGrath <roland@baalperazim.frob.com>
-
- Rewrite of a fix provided by Bill White <bill.white@griggsinst.com>:
- * fhandle.h (union diskfs_fhandle): Replaces struct diskfs_fhandle.
- Use a union element of char[28] to ensure size requirement.
- * fsys-getfile.c (diskfs_S_fsys_getfile): Update uses for new type.
- * file-getfh.c (diskfs_S_file_getfh): Likewise.
-
-1999-12-02 Mark Kettenis <kettenis@gnu.org>
-
- * io-read.c (diskfs_S_io_read): Add braces to silence gcc
- warning.
-
-1999-11-09 Roland McGrath <roland@baalperazim.frob.com>
-
- * priv.h (_diskfs_chroot_directory): Remove const from type.
- * init-startup.c (_diskfs_chroot_directory): Likewise.
-
-1999-11-08 Roland McGrath <roland@baalperazim.frob.com>
-
- * disk-pager.c (fault_handler): Put more detail in assert failures.
-
-1999-10-28 Roland McGrath <roland@baalperazim.frob.com>
-
- * node-nput.c (diskfs_nput): Call diskfs_set_node_times before
- diskfs_lost_hardrefs. This should address the late mtime update
- bug reported and investigated by Mark Kettenis.
-
-1999-10-23 Roland McGrath <roland@baalperazim.frob.com>
-
- * sync-interval.c (periodic_sync): With diskfs_fsys_lock reader lock
- held, check _diskfs_diskdirty and don't sync if not dirty.
-
-1999-10-14 Roland McGrath <roland@baalperazim.frob.com>
-
- * opts-std-startup.c (TOGGLE): Fix `off' case.
- Reported by Kalle Olavi Niemitalo <tosi@ees2.oulu.fi>.
-
-1999-10-13 Roland McGrath <roland@baalperazim.frob.com>
-
- * io-pathconf.c (diskfs_S_io_pathconf): Cap diskfs_name_max to size
- representable in struct dirent.d_namlen.
- (diskfs_S_io_pathconf): Always return 1 for _PC_NO_TRUNC, since we
- always constrain diskfs_name_max.
-
- * lookup.c (diskfs_lookup): Enforce diskfs_name_max limit for CREATE
- and RENAME, returning ENAMETOOLONG for violations.
- * io-pathconf.c (diskfs_S_io_pathconf): _PC_NO_TRUNC controlled by
- diskfs_name_max setting.
-
- * diskfs.h (diskfs_name_max): Declare new variable.
- * io-pathconf.c (diskfs_S_io_pathconf): Use it for _PC_NAME_MAX,
- capping it to 1024.
-
-1999-10-12 Roland McGrath <roland@baalperazim.frob.com>
-
- * opts-std-runtime.c (parse_opt: ARGP_KEY_INIT): Initialize H->noatime.
-
-1999-10-11 Roland McGrath <roland@baalperazim.frob.com>
-
- * dir-readdir.c (diskfs_S_dir_readdir): Take new DATA_DEALLOC param.
-
-1999-10-07 Roland McGrath <roland@baalperazim.frob.com>
-
- * lookup.c (diskfs_lookup): Rewrite code from last change, which had
- typos (and then I just decided to change the details of the string
- diddling).
-
-1999-10-06 Thomas Bushnell, BSG <tb@mit.edu>
-
- * lookup.c (diskfs_lookup): NAME is no longer const. Update
- documentation. Strip leading and trailing slashes from NAME before
- using it.
- * diskfs.h (diskfs_lookup): NAME is no longer const.
- Update documentation.
-
-1999-10-05 Thomas Bushnell, BSG <tb@mit.edu>
-
- * priv.h (CHANGE_NODE_FIELD): Use diskfs_check_readonly instead of
- directly reading diskfs_readonly.
-
-1999-09-20 Thomas Bushnell, BSG <tb@mit.edu>
-
- * node-times.c (diskfs_set_node_times): Don't implement
- _diskfs_noatime here.
- * conch-fetch.c (iohelp_fetch_shared_data): Don't update
- dn_set_atime on affected node if _diskfs_noatime.
- * rdwr-internal.c (_diskfs_rdwr_internal): Likewise.
-
-1999-09-19 Roland McGrath <roland@baalperazim.frob.com>
-
- * node-times.c (diskfs_set_node_times): If _diskfs_noatime is set and
- neither NP->dn_set_mtime nor NP->dn_set_ctime is set, clear
- NP->dn_set_atime. Short-circuit return if none of dn_set_?time set.
- * opts-common.c (diskfs_common_options): Include "priv.h".
- Add aliases --ro/--rw for -r/-w. Add alias --nosuid for --no-suid,
- --noexec for --no-exec. Move --suid-ok, --exec-ok here from ...
- * opts-std-runtime.c (std_runtime_options): ... here.
- (struct parse_hook): New member `noatime'.
- (set_opts): Use H->noatime to set _diskfs_noatime.
- (parse_opt): Grok -A and OPT_ATIME to set/clear H->noatime.
- (OPT_ATIME): New macro.
- (OPT_SUID_OK, OPT_EXEC_OK): Moved to ...
- * priv.h: ... here.
- (diskfs_common_options): Add const to decl.
- * opts-std-startup.c (parse_startup_opt): Grok OPT_SUID_OK,
- OPT_EXEC_OK, -A, and OPT_ATIME.
- * init-init.c (_diskfs_noatime): New variable.
- (_diskfs_nosuid, _diskfs_noexec): Use uninitialized defns.
- * opts-append-std.c (diskfs_append_std_options): Add --no-atime if
- _diskfs_noatime is set.
-
-1999-09-13 Roland McGrath <roland@baalperazim.frob.com>
-
- * Makefile, rdwr-internal.c, io-map.c, io-map-segment.c, diskfs.h:
- Reverted changes related to io_map_segment.
-
-1999-09-09 Thomas Bushnell, BSG <tb@mit.edu>
-
- * io-pathconf.c: Include <unistd.h>.
- (diskfs_S_io_pathconf): Provide real definition.
-
-1999-09-07 Thomas Bushnell, BSG <tb@mit.edu>
-
- * io-map-segment.c: New file. Guts from io-map.c.
- * io-map.c (diskfs_S_io_map): Just call diskfs_S_io_map_segment.
- * diskfs.h (diskfs_get_filemap): New parameter `index'.
- * rdwr-internal.c (_diskfs_rdwr_internal): Pass additional
- parameter to diskfs_get_filemap.
- * Makefile (IOSRCS): Add io-map-segment.c.
-
-1999-07-24 Roland McGrath <roland@baalperazim.frob.com>
-
- * dir-rmdir.c (diskfs_S_dir_rmdir): Fix bugs in last change.
- Replace label `out' with local inline function `done'.
- Don't try diskfs_nput (NP) when NP is null.
-
-1999-07-17 Roland McGrath <roland@baalperazim.frob.com>
-
- * dir-link.c (diskfs_S_dir_link): Fix error checks on ports.
- If DIRCRED (receiver port) is bad, return EOPNOTSUPP.
- If FILECRED (argument port) is bad, return EXDEV (after EROFS check).
-
-1999-07-11 Roland McGrath <roland@baalperazim.frob.com>
-
- * boot-start.c (diskfs_S_exec_startup_get_info): Typo in last change.
-
-1999-07-10 Roland McGrath <roland@baalperazim.frob.com>
-
- * priv.h: Add #include <sys/mman.h> for munmap decl.
-
-1999-07-09 Thomas Bushnell, BSG <tb@mit.edu>
-
- * boot-start.c (diskfs_S_exec_startup_get_info): Use mmap instead
- of vm_allocate.
- (diskfs_S_fsys_init): Likewise.
- * file-get-trans.c (diskfs_S_file_get_translator): Likewise.
- * file-getfh.c (diskfs_S_file_getfh): Likewise.
- * io-read.c (diskfs_S_io_read): Likewise.
-
-Mon Jul 5 20:03:18 1999 Thomas Bushnell, BSG <tb@mit.edu>
-
- * node-nputl.c (diskfs_nput_light): Fix typo in function
- declaration. Reported by Yamashita TAKAO
- (jargon@lares.dti.ne.jp).
-
-1999-07-03 Thomas Bushnell, BSG <tb@mit.edu>
-
- * file-get-trans.c (diskfs_S_file_get_translator): Use munmap
- instead of vm_deallocate.
- * io-read.c (diskfs_S_io_read): Likewise.
- * protid-rele.c (diskfs_protid_rele): Likewise.
-
-1999-07-01 Thomas Bushnell, BSG <tb@mit.edu>
-
- * node-nref.c: New file; guts from diskfs.h.
- * node-nput.c: Likewise.
- * node-nrele.c: Likewise.
- * node-nrefl.c: Likewise.
- * node-nputl.c: Likewise.
- * node-nrelel.c: LIkewise.
- * diskfs.h (diskfs_nref, diskfs_nput, diskfs_nrele,
- diskfs_nref_light, diskfs_nput_light, diskfs_nrele_light): Replace
- inline definitions with ordinary declarations.
- (DISKFS_EI): Removed macro.
- * diskfs.c: Deleted file.
- * Makefile (OTHERSRCS): Added node-nref.c, node-nput.c
- node-nrele.c, node-nrefl.c, node-nputl.c, node-nrelel.c. Removed
- diskfs.c.
-
-1999-06-29 Thomas Bushnell, BSG <tb@mit.edu>
-
- * dev-globals.c, dev-io.c, dev-open.c: Files removed.
-
- * lookup.c (diskfs_lookup): If we get an error from
- fshelp_checkdirmod, clear *NP as well as returning the error.
- Use diskfs_nrele instead of diskfs_nput in case *NP and DP are
- the same.
-
-1999-06-28 Thomas Bushnell, BSG <tb@mit.edu>
-
- * dir-rmdir.c (diskfs_S_dir_rmdir): Reorganized to make clearer;
- several little buglets fixed too.
-
-1999-06-27 Thomas Bushnell, BSG <tb@mit.edu>
-
- * sync-default.c (diskfs_default_sync_interval): Reduce to five
- seconds. Hardware is much different than when Unix originally
- picked thirty, plus we manage VM differently than the Unix buffer
- cache did, and tend to delay many more writes than Unix did.
-
-1999-06-13 Roland McGrath <roland@baalperazim.frob.com>
-
- * file-get-trans.c (diskfs_S_file_get_translator): Fix type cast in
- last change.
-
- * file-get-trans.c (diskfs_S_file_get_translator): If we return an
- error, vm_deallocate any vm_allocated memory.
- From Mark Kettenis <kettenis@gnu.org>.
-
-1999-06-02 Roland McGrath <roland@baalperazim.frob.com>
-
- * boot-start.c (diskfs_start_bootstrap): Pass environment collected
- from `environ' on to init. The kernel can send more parameters
- through this way without us knowing about them specifically.
-
-1999-05-19 Roland McGrath <roland@baalperazim.frob.com>
-
- * console.c (diskfs_console_stdio): If there is an fd 2 that appears
- to work, just leave it as is and dup2 it to fd 1 as well.
-
-1999-05-16 Roland McGrath <roland@baalperazim.frob.com>
-
- * file-chown.c (diskfs_S_file_chown): Fix last change: not just
- permission check, actually don't make the change if value is -1.
-
-1999-05-13 Roland McGrath <roland@baalperazim.frob.com>
-
- * file-chown.c (diskfs_S_file_chown): Either arg being -1 means don't
- change that id.
-
-Tue Apr 6 10:05:49 1999 Thomas Bushnell, BSG <tb@mit.edu>
-
- * dir-renamed.c (diskfs_rename_dir): Stage 1, if TNP == FNP, we
- have to unlock TNP with diskfs_nput and not just diskfs_nrele it.
-
-Tue Mar 16 17:20:06 1999 Thomas Bushnell, BSG <tb@mit.edu>
-
- * lookup.c (diskfs_lookup): Reformat for prettiness.
-
-1999-02-28 Roland McGrath <roland@baalperazim.frob.com>
-
- * io-revoke.c (diskfs_S_io_revoke): Use ports_class_iterate.
- * readonly.c (diskfs_set_readonly): Likewise.
-
-Mon Feb 22 04:28:56 1999 Thomas Bushnell, BSG <tb@mit.edu>
-
- * io-revoke.c (diskfs_S_io_revoke): Protect the actual revocation
- by blocking all other rpcs.
-
-Sat Feb 20 20:46:21 1999 Thomas Bushnell, BSG <tb@mit.edu>
-
- * io-revoke.c (diskfs_S_io_revoke): Release NP->lock before
- beginning iteration.
-
-1999-02-16 Roland McGrath <roland@baalperazim.frob.com>
-
- * io-revoke.c (diskfs_S_io_revoke): Fix typo in 1999-02-16 change.
-
- * init-startup.c (diskfs_startup_diskfs): Fix typo 1999-02-12 change.
-
-Tue Feb 16 05:31:23 1999 Thomas Bushnell, BSG <tb@mit.edu>
-
- * io-revoke.c: New file.
- * Makefile (IOSRCS): Add io-revoke.c.
-
-Sat Feb 13 04:29:29 1999 Thomas Bushnell, BSG <tb@mit.edu>
-
- * peropen-make.c (diskfs_make_peropen): If there is no existing
- context, then set the shadow_root iff we are a chrooted virtual
- root filesystem.
-
-1999-02-12 Gordon Matzigkeit <gord@trick.fig.org>
-
- * init-startup.c (diskfs_startup_diskfs): Release the virtual
- root's lock as soon as we've checked that it's a valid directory.
- Ignore leading slashes in _diskfs_chroot_directory.
-
-Sun Jan 31 18:24:33 1999 Thomas Bushnell, BSG <tb@mit.edu>
-
- * file-utimes.c (diskfs_S_file_utimes): Implement new semantics
- for setting to exactly present time.
-
-1999-01-27 Roland McGrath <roland@baalperazim.frob.com>
-
- * Makefile (OTHERSRCS): Add init-main.c.
-
-1999-01-22 Roland McGrath <roland@baalperazim.frob.com>
-
- * init-main.c: New file, defining new function diskfs_init_main.
- * diskfs.h: Declare diskfs_init_main.
-
- * file-set-trans.c: Remove makedev, major, minor macro definitions.
- * dir-lookup.c: Likewise.
-
-1999-01-01 Roland McGrath <roland@baalperazim.frob.com>
-
- * sync-interval.c (diskfs_set_sync_interval): Use ENOMEM, not EIEIO.
-
-1998-12-27 Roland McGrath <roland@baalperazim.frob.com>
-
- Use a struct hurd_port for the cached exec server port,
- so it is properly reference-counted and locked.
- * boot-start.c (diskfs_exec): Variable removed.
- (diskfs_start_bootstrap): Make it a local here.
- Install that port in _diskfs_exec_portcell.
- (diskfs_S_fsys_init): Use _diskfs_exec_portcell instead
- of diskfs_exec.
- * init-init.c (_diskfs_exec_portcell): New variable.
- (diskfs_init_diskfs): Initialize it.
- * priv.h: Declare it.
- * diskfs.h (diskfs_exec, diskfs_exec_ctl): Remove decls.
- * file-exec.c (diskfs_S_file_exec): Use _diskfs_exec_portcell instead
- of diskfs_exec.
-
- * init-completed.c: File removed (obsolete since 1996).
-
- * boot-start.c (diskfs_start_bootstrap): Twiddle boot-time messages.
-
-1998-12-27 Roland McGrath <roland@baalperazim.frob.com>
-
- * boot-start.c (_diskfs_boot_privports): Renamed from diskfs_*.
-
- * priv.h: Declare it.
- * console.c (diskfs_console_stdio): Change caller.
-
- * file-statfs.c (diskfs_S_file_statfs): Remove __ from struct members.
-
-1998-12-21 Mark Kettenis <kettenis@phys.uva.nl>
-
- * file-statfs.c (diskfs_S_file_statfs): Initialize mount options
- in statbuf.
-
-1998-12-27 Roland McGrath <roland@baalperazim.frob.com>
-
- * opts-std-startup.c (startup_options): Move -C above "Boot options:",
- give it a docstring. Docstrings for --bootflags, --boot-command.
- (_diskfs_boot_command): New variable.
- (startup_options, parse_startup_opt): New option --boot-command,
- consumes remaining args to set _diskfs_boot_command.
- * priv.h: Declare _diskfs_boot_command.
- * boot-start.c (diskfs_start_bootstrap): If diskfs_exec_server_task is
- null, assume we are running as the boot command and have a root with
- /servers/exec.
- If _diskfs_boot_command is set, start that command in place of init.
- If can't lookup initname, print error msg and loop to prompt.
- Put a newline before "Init name" prompt.
- After starting exec server, try to set active trans on /servers/exec.
- (diskfs_boot_getpriv): New function: if _hurd_host_priv
- is null, use fsys_getpriv on our bootstrap port.
- (parent_task): New static variable, set there with fsys_getpriv call.
- (diskfs_S_fsys_init): If diskfs_exec_server_task is null, don't do
- anything with it; instead register parent_task as our child
- and send an fsys_init to our parent on our bootstrap port.
- * console.c (diskfs_console_stdio): Call diskfs_boot_privports before
- get_privileged_ports if diskfs_boot_flags is set.
-
-1998-12-21 Roland McGrath <roland@baalperazim.frob.com>
-
- * file-exec.c (diskfs_S_file_exec): If exec server port is stale, try
- once to look up a new one.
-
-1998-12-06 Roland McGrath <roland@baalperazim.frob.com>
-
- * boot-parse.c: File removed (it has been obsolete since 1995).
-
-1998-11-29 Roland McGrath <roland@baalperazim.frob.com>
-
- * trans-callback.c (_diskfs_translator_callback1_fn): Use size_t*
- instead of int* for ARGZ_LEN arg.
-
-1998-11-25 Mark Kettenis <kettenis@phys.uva.nl>
-
- * boot-start.c (diskfs_S_fsys_init): Call _hurd_proc_init with new
- args set to zero.
-
-Wed Aug 12 23:35:59 1998 Thomas Bushnell, BSG <tb@mit.edu>
-
- * file-chflags.c (diskfs_S_file_chflags): Only set
- NP->dn_set_ctime if we actually set the flags.
-
-1998-10-26 Gordon Matzigkeit <gord@trick.fig.org>
-
- * init-startup.c (diskfs_startup_diskfs): Use diskfs_nput to free
- the old diskfs_root_node when switching to a virtual root.
-
-1998-10-20 Roland McGrath <roland@baalperazim.frob.com>
-
- * dir-lookup.c (diskfs_S_dir_lookup): Add braces to silence gcc
- warning.
- * io-identity.c (diskfs_S_io_identity): Likewise.
- * opts-append-std.c (diskfs_append_std_options): Likewise.
- * opts-std-runtime.c (set_opts): Likewise.
-
-1998-09-04 Roland McGrath <roland@baalperazim.frob.com>
-
- * diskfs.h (diskfs_lookup_hard, diskfs_lookup,
- diskfs_set_translator, diskfs_create_symlink_hook,
- diskfs_notice_dirchange, diskfs_direnter, diskfs_direnter_hard,
- diskfs_dirrewrite, diskfs_dirremove,
- diskfs_create_node, diskfs_enter_lookup_cache,
- diskfs_check_lookup_cache, dir_rename_dir, diskfs_set_options):
- Add `const' qualifier to `char *' parameters where appropriate.
- * opts-set.c (diskfs_set_options): Fix defn with `const'.
- * node-create.c (diskfs_create_node): Likewise.
- * name-cache.c (diskfs_enter_lookup_cache): Likewise.
- (diskfs_check_lookup_cache): Likewise.
- * dirremove.c (diskfs_dirremove): Likewise.
- * dirrewrite.c (diskfs_dirrewrite): Likewise.
- * lookup.c (diskfs_lookup): Likewise.
- * direnter.c (diskfs_direnter): Likewise.
- * dir-renamed.c (diskfs_rename_dir): Likewise.
- * dir-chg.c (diskfs_notice_dirchange): Likewise.
-
-1998-04-04 Roland McGrath <roland@baalperazim.frob.com>
-
- Add support for a "virtual root directory" specified at startup.
- * priv.h (_diskfs_chroot_directory): Declare new variable.
- * opts-std-startup.c (startup_options, parse_startup_opt): New
- string-valued option -C/--directory/--virtual-root/--chroot sets
- _diskfs_chroot_directory.
- * init-startup.c (_diskfs_chroot_directory): New variable.
- (diskfs_startup_diskfs): If that's set, look up the name and
- warp us to that as a virtual root directory.
- * fsys-getroot.c (diskfs_S_fsys_getroot): Initialize new peropen's
- shadow_root_parent to null, and shadow_root to either null or,
- if _diskfs_chroot_directory is set, to diskfs_root_node.
-
- * dir-lookup.c (diskfs_S_dir_lookup): Treat a shadow_root with null
- shadow_root_parent as a "virtual root".
-
-1998-08-20 Roland McGrath <roland@baalperazim.frob.com>
-
- * fsys-options.c (diskfs_S_fsys_get_options):
- fshelp_return_malloced_buffer renamed to iohelp_*.
- * file-get-fs-opts.c (diskfs_S_file_get_fs_options): Likewise.
-
-Tue Aug 11 16:17:49 1998 Thomas Bushnell, BSG <tb@mit.edu>
-
- * file-chflags.c (diskfs_S_file_chflags): Set NP->dn_set_ctime.
-
- * file-utimes.c (diskfs_S_file_utimes): Add file notifications.
-
-Sun Aug 9 21:09:24 1998 Jose M. Moya <josem@gnu.org>
-
- * diskfs.h (struct node): Add filemod_reqs member.
- (struct modreq): Rename struct dirmod to reqmod as it is used for
- directory and file notifications.
- (diskfs_notice_filechange): Add prototype.
- * dir-chg.c (diskfs_S_dir_notice_changes): Check
- nowait_dir_changed return value for errors.
- (diskfs_notice_dirchange): Remove requests when the notification
- fails.
- * file-chg.c (diskfs_S_file_notice_changes): Implement.
- (diskfs_notice_filechange): New function.
- * node-make.c (diskfs_make_node): Initialize filemod_reqs.
- * node-drop.c (free_modreqs): New function.
- (diskfs_drop_node): Free filemod_reqs.
- * file-chauthor.c (dithkfth_TH_file_chauthor): Add file
- notifications.
- * file-chflags.c (diskfs_S_file_chflags): Likewise.
- * file-chmod.c (diskfs_S_file_chmod): Likewise.
- * file-chown.c (diskfs_S_file_chown): Likewise.
- * file-set-size.c (diskfs_S_file_set_size): Likewise.
- * io-prenotify.c (diskfs_S_io_prenotify): Likewise.
- * io-write.c (diskfs_S_io_write): Likewise.
- * node-rdwr.c (diskfs_node_rdwr): Likewise.
-
-Sat Aug 8 17:01:58 1998 Thomas Bushnell, BSG <tb@mit.edu>
-
- * boot-start.c (diskfs_S_fsys_init): __vm_allocate -> vm_allocate
- and __mach_task_self -> mach_task_self. Reported by Mark Kettenis
- (kettenis@phys.uva.nl).
-
-1998-07-25 Roland McGrath <roland@baalperazim.frob.com>
-
- * shutdown.c (diskfs_shutdown): Sync and set the clean flag even if we
- don't shut down. Thus a disk that was in use but hadn't been touched
- recently needn't necessarily be checked after a system crash.
-
-1998-07-20 Roland McGrath <roland@baalperazim.frob.com>
-
- * dir-lookup.c (diskfs_S_dir_lookup: short_circuited_callback1): Fix
- type of arg `argz_len' to use size_t *.
-
-Tue Jul 14 16:27:00 1998 Thomas Bushnell, n/BSG <tb@mit.edu>
-
- * dir-lookup.c (diskfs_S_dir_lookup): Don't require the node to be
- a directory in the null pathname case. (Thus reverting one of the
- changes of June 15, 1994.)
-
-Mon Jun 29 18:54:23 1998 Thomas Bushnell, n/BSG <tb@mit.edu>
-
- * lookup.c (diskfs_lookup): If NAME is empty, return an error.
-
-Tue May 12 12:08:35 1998 Thomas Bushnell, n/BSG <tb@mit.edu>
-
- * file-get-trans.c (diskfs_S_file_get_translator) [S_ISCHR ||
- S_ISBLK]: Free BUF after using it. Reported by Katusya Tanaka
- (wyvern@pb3.so-net.ne.jp).
-
-Tue Sep 23 15:28:57 1997 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * file-reparent.c (diskfs_S_file_reparent): Use diskfs_nrele
- instead of protocol-violating up-tree lock.
- * peropen-rele.c (diskfs_release_peropen): Likewise.
-
-1997-09-18 Miles Bader <miles@gnu.ai.mit.edu>
-
- * priv.h (fs_control_port): Declaration removed.
- (_diskfs_nosuid, _diskfs_noexec): Renamed from nosuid & noexec.
- * init-init.c: Prepend "_diskfs" to uses of NOSUID & NOEXEC.
- * file-exec.c (diskfs_S_file_exec): Likewise.
- * opts-std-startup.c (parse_startup_opt): Likewise.
- * opts-std-runtime.c (set_opts): Likewise.
- (OPT_EXEC_OK, OPT_SUID_OK): Rename definitions from ..._OPT.
-
-1997-09-16 Miles Bader <miles@gnu.ai.mit.edu>
-
- * opts-append-std.c (diskfs_append_std_options): Add --no-suid and
- --no-exec options. Don't deallocate ARGZ when we get an error.
-
-Tue Sep 16 14:37:51 1997 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * opts-append-std.c (diskfs_append_std_options): Add --no-suid and
- --no-exec when appropriate.
- * priv.h (nosuid, noexec): New variables.
- * init-init.c (nosuid, noexec): New variables, initialized to zero.
- * file-exec.c (diskfs_S_file_exec): If noexec is on, then prohibit
- all execution with EACCES. If nosuid is on, then prohibit setuid
- or setgid execution by silently omitting the uid substitution.
- * opts-std-startup.c (parse_startup_opt): Implement --no-suid and
- --no-exec.
- * opts-common.c (diskfs_common_options): Add --no-suid and
- --no-exec.
- * opts-std-runtime.c (struct parse_hook): Add nosuid and noexec.
- (parse_opt) [cases 'S', 'E', OPT_SUID_OK, OPT_EXEC_OK] Understand
- --no-suid, --no-exec, --suid-ok, and --exec-ok.
- (parse_opt) [case ARGP_KEY_INIT]: Initialize H->nosuid and
- H->noexec.
- (OPT_SUID_OK, OPT_EXEC_OK): New macros.
- (std_runtime_options): Add --suid-ok and --exec-ok.
- (set_opts): Set nosuid and noexec from H->nosuid and H->noexec.
-
- * opts-common.c (diskfs_common_options): Rename --nosync to
- --no-sync; leave --nosync as an alias.
-
-Wed Aug 20 14:03:41 1997 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * diskfs.h: Doc fix.
-
- * io-map.c (diskfs_S_io_map): Cope with error return from
- diskfs_get_filemap.
- * rdwr-internal.c (_diskfs_rdwr_internal): Likewise.
-
- * disk-pager.c (service_paging_requests): New args for
- ports_manage_port_operations_multithread.
- * init-first.c (master_thread_function): Likewise.
-
-1997-08-19 Miles Bader <miles@gnu.ai.mit.edu>
-
- * filedev.c, machdev.c: Files removed.
-
-Thu Jul 24 12:57:26 1997 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * name-cache.c (find_cache): Grammar doc fix.
-
-1997-07-10 Miles Bader <miles@gnu.ai.mit.edu>
-
- * opts-std-runtime.c (parse_opt): Turn off synchronous mode when
- setting a sync interval.
-
-Mon Jul 7 16:25:49 1997 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * file-exec.c: Include <fcntl.h> instead of <fcntlbits.h>.
- Suggested by Marcus G. Daniels (marcus@cathcart.sysc.pdx.edu).
-
-Mon Jun 30 17:26:38 1997 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * diskfs.h (diskfs_hard_readonly): New variable.
- (diskfs_readonly): Doc change.
- * readonly.c (diskfs_readonly): Provide initialized declaration.
- (diskfs_check_readonly): If we cannot write the media and so we
- switch to readonly, set diskfs_hard_readonly too.
- (diskfs_set_readonly): If diskfs_hard_readonly is set, then
- inhibit any attempt to clear readonly status.
-
-1997-06-23 Miles Bader <miles@gnu.ai.mit.edu>
-
- * peropen-make.c (diskfs_make_peropen): Initialize the
- ROOT_PARENT, SHADOW_ROOT, and SHADOW_ROOT_PARENT fields.
-
-1997-06-09 Miles Bader <miles@gnu.ai.mit.edu>
-
- * io-stat.c (diskfs_S_io_stat): Use fshelp_translated rather than
- fshelp_fetch_control.
-
-Fri Jun 6 11:42:14 1997 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * Makefile (LCLHDRS): Add fhandle.h.
-
-Tue May 27 11:55:56 1997 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * file-chmod.c (diskfs_S_file_chmod): Turn off S_ITRANS bits too.
-
-Mon Feb 24 17:22:05 1997 Miles Bader <miles@gnu.ai.mit.edu>
-
- * io-identity.c (diskfs_S_io_identity): Pass CRED's shadow root
- inode number to fshelp_get_identity when creating a shadow root
- fsid, not INUM.
-
-Mon Feb 24 14:40:02 1997 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * dir-rmdir.c (diskfs_S_dir_rmdir): Check EBUSY-when-translated
- error before ENOTDIR-when-not-dir.
-
-Sat Feb 22 00:00:32 1997 Miles Bader <miles@gnu.ai.mit.edu>
-
- * io-stat.c (diskfs_S_io_stat): Mark shadow roots with S_IROOT.
- * io-identity.c (diskfs_S_io_identity): Return different fsys ids
- for different shadow roots.
-
- * peropen-rele.c (diskfs_release_peropen): Don't deadlock if PO's
- shadow_root is also it's node.
- * file-reparent.c (diskfs_S_file_reparent): Don't release a
- reference to any old shadow_root if it was == NODE. Don't aquire
- a new reference for NODE.
-
-Fri Feb 21 17:12:04 1997 Miles Bader <miles@gnu.ai.mit.edu>
-
- * dir-init.c (diskfs_init_dir): Use CRED->po as LOOKUPCRED's po,
- so that root detection works (and doesn't crash).
-
-Thu Feb 20 00:43:38 1997 Miles Bader <miles@gnu.ai.mit.edu>
-
- * io-read.c (diskfs_S_io_read): Support reading from sylinks.
- * dir-lookup.c (diskfs_S_dir_lookup): Allow symlinks to be opened
- for O_READ.
-
-Thu Feb 13 19:27:16 1997 Miles Bader <miles@gnu.ai.mit.edu>
-
- * dir-rename.c (diskfs_S_dir_rename): Return EXDEV if FROMCRED and
- TOCRED are in different shadow trees.
-
- * file-reparent.c (diskfs_S_file_reparent): New function, from
- dir-reparent.c.
- * dir-reparent.c: File removed.
- * Makefile (FSSRCS): dir-reparent.c replaced by file-reparent.c.
-
-Wed Feb 12 14:23:15 1997 Miles Bader <miles@gnu.ai.mit.edu>
-
- * peropen-make.c (diskfs_make_peropen): Add & use CONTEXT param.
- Remove DOTDOT & DEPTH params.
- * fsys-getroot.c (diskfs_S_fsys_getroot): Pass a prototype peropen
- instead of the dotdotport and depth to diskfs_make_peropen.
- * fsys-getfile.c (diskfs_S_fsys_getfile): Likewise.
- * file-exec.c (diskfs_S_file_exec): Likewise.
- * dir-reparent.c (diskfs_S_dir_reparent): Likewise.
- * dir-mkfile.c (diskfs_S_dir_mkfile): Likewise.
- * dir-lookup.c (diskfs_S_dir_lookup): Likewise.
- * boot-start.c (diskfs_start_bootstrap): Likewise.
- (diskfs_S_exec_startup_get_info): Likewise.
- (diskfs_execboot_fsys_startup): Likewise.
- (diskfs_S_fsys_init): Likewise.
- * trans-callback.c (_diskfs_translator_callback2_fn): Pass COOKIE
- directly to diskfs_make_peropen instead of unpacking each arg.
- * priv.h (struct diskfs_trans_callback_cookie2): Type removed.
- * dir-lookup.c (diskfs_S_dir_lookup): Use DIRCRED->po as the
- cookie for fshelp_fetch_root instead of a local structure.
- * diskfs.h (diskfs_lookup): Remove DEPTH & NEW_DEPTH params.
- * dir-lookup.c (diskfs_S_dir_lookup): Get rid of DEPTH variable.
- Get rid of depth parameters to diskfs_lookup.
- Deal properly with EAGAIN return from diskfs_lookup.
- Replace references to dotdotport with root_parent.
- * dir-unlink.c (diskfs_S_dir_unlink): Don't pass depth args to
- diskfs_lookup.
- * dir-rmdir.c (diskfs_S_dir_rmdir): Likewise.
- * dir-renamed.c (diskfs_rename_dir, checkpath): Likewise.
- * dir-rename.c (diskfs_S_dir_rename): Likewise.
- * dir-mkdir.c (diskfs_S_dir_mkdir): Likewise.
- * dir-link.c (diskfs_S_dir_link): Likewise.
- * dir-init.c (diskfs_init_dir): Likewise.
- * dir-clear.c (diskfs_clear_directory): Likewise.
- * lookup.c (diskfs_lookup): Remove DEPTH & NEW_DEPTH params.
- Check CRED->po->shadow_root for root traversals, and get rid of assert
- that EAGAIN isn't returned from diskfs_lookup_hard.
- * diskfs.h (struct peropen):
- Add shadow_root_parent & shadow_root fields.
- Removed depth field.
- Rename dotdotnode field to root_parent.
- * peropen-rele.c (diskfs_release_peropen): Finalize new state.
-
- * dir-lookup.c (diskfs_S_dir_lookup): Remove O_EXLOCK & O_SHLOCK
- from FLAGS mask, now that they're included in O_HURD.
-
-Thu Feb 6 02:17:35 1997 Miles Bader <miles@gnu.ai.mit.edu>
-
- * io-write.c (diskfs_S_io_write): Check OFF for validity and
- return EINVAL if it's bogus.
- * io-read.c (diskfs_S_io_read): Likewise.
-
- * dir-mkfile.c (diskfs_S_dir_mkfile): New file's depth is one
- greater than CRED's.
-
- * file-getfh.c (diskfs_S_file_getfh): Implement (code from ufs).
- * fsys-getfile.c (diskfs_S_fsys_getfile): Likewise.
- * fhandle.h: New file.
-
-Wed Feb 5 16:06:26 1997 Miles Bader <miles@gnu.ai.mit.edu>
-
- * dir-reparent.c (diskfs_S_dir_reparent): Implement.
-
- * lookup.c (diskfs_lookup): Add DEPTH & NEW_DEPTH arguments.
- Implement new fs-root detection using them.
- * diskfs.h (diskfs_lookup): Add DEPTH & NEW_DEPTH arguments.
- * dir-link.c (diskfs_S_dir_link): Supply DEPTH & NEW_DEPTH
- arguments to diskfs_lookup.
- * dir-clear.c (diskfs_clear_directory): Likewise.
- * dir-init.c (diskfs_init_dir): Likewise.
- * dir-renamed.c (checkpath, diskfs_rename_dir): Likewise.
- * dir-rename.c (diskfs_S_dir_rename): Likewise.
- * dir-mkdir.c (diskfs_S_dir_mkdir): Likewise.
- * dir-rmdir.c (diskfs_S_dir_rmdir): Likewise.
- * dir-unlink.c (diskfs_S_dir_unlink): Likewise.
- * dir-lookup.c (diskfs_S_dir_lookup): Likewise.
- Add DEPTH variable.
- * dir-link.c (diskfs_S_dir_link): Translate EAGAIN (meaning root's
- parent) to EINVAL.
- * dir-rename.c (diskfs_S_dir_rename): Likewise.
-
- * diskfs.h (struct peropen): Add DEPTH field.
- (diskfs_make_peropen): Add DEPTH argument.
- * peropen-make.c (diskfs_make_peropen): Add & use DEPTH argument.
- * boot-start.c (diskfs_start_bootstrap,
- diskfs_S_exec_startup_get_info, diskfs_execboot_fsys_startup,
- diskfs_S_fsys_init): Supply DEPTH argument to diskfs_make_peropen.
- * fsys-getroot.c (diskfs_S_fsys_getroot): Likewise.
- * file-exec.c (diskfs_S_file_exec): Likewise.
- * dir-mkfile.c (diskfs_S_dir_mkfile): Likewise.
- * dir-lookup.c (diskfs_S_dir_lookup): Likewise.
- * priv.h (struct diskfs_trans_callback_cookie2): New type.
- * trans-callback.c (_diskfs_translator_callback2_fn): Expect
- COOKIE2 to be a pointer to a struct diskfs_trans_callback_cookie2,
- and use that to pass args to diskfs_make_peropen.
- * fsys-getroot.c (diskfs_S_fsys_getroot): Pass new type of cookie2 to
- fshelp_fetch_root, as expected by _diskfs_translator_callback2.
- * dir-lookup.c (diskfs_S_dir_lookup): Likewise.
-
-Mon Jan 20 16:18:00 1997 Miles Bader <miles@gnu.ai.mit.edu>
-
- * dir-reparent.c (diskfs_S_dir_reparent): New file.
- * Makefile (FSSRCS): Add dir-reparent.c.
-
- * disk-pager.c (preemptor): Renamed from `preempter'; type & init
- changed as well.
- (diskfs_start_disk_pager): `preempter' -> `preemptor'.
- * diskfs-pager.h: Doc fix.
-
-Tue Nov 19 18:21:12 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * diskfs.h (struct node): Add author_tracks_uid field.
- * file-chown.c (diskfs_S_file_chown): If NP->author_tracks_uid,
- modify NP->dn_stat.st_author as well.
- * node-create.c (diskfs_create_node): Likewise.
-
-Mon Nov 18 17:02:22 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * diskfs.h (struct node): Remove istranslated field.
- * io-stat.c (diskfs_S_io_stat): Set S_IATRANS & S_IROOT bits in
- st_mode field of returned buffer if appropiate.
- * dir-lookup.c (diskfs_S_dir_lookup): Use S_IPTRANS bit in dn_stat
- st_mode field rather than istranslated field.
- * file-get-trans.c (diskfs_S_file_get_translator): Likewise.
- * file-set-trans.c (diskfs_S_file_set_translator): Likewise.
- * file-inv-trans.c (diskfs_S_file_invoke_translator): Likewise.
- * fsys-getroot.c (diskfs_S_fsys_getroot): Likewise.
- * node-drop.c (diskfs_drop_node): Likewise.
- * trans-callback.c (_diskfs_translator_callback1_fn): Likewise.
- * dir-rmdir.c (diskfs_S_dir_rmdir): Likewise.
-
- * file-get-transcntl.c (diskfs_S_file_get_translator_cntl): Use
- MACH_MSG_TYPE_MOVE_SEND to return *ctl, rather than COPY.
- (diskfs_S_file_get_translator_cntl): Correctly test for errors
- from fshelp_fetch_control.
-
-Fri Nov 15 14:06:16 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * protid-make.c (diskfs_finish_protid): Fix typo.
-
- * file-chown.c (diskfs_S_file_chown): Look for UID, not CRED in
- the uid set.
-
- * dir-lookup.c (diskfs_S_dir_lookup): Make the unauthenticated
- port correctly.
-
-Thu Nov 14 13:07:37 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * dir-init.c (diskfs_init_dir): New vars VEC and USER; fabricate
- LOOKUPCRED to correspond to new structure definitions.
-
- * io-restrict-auth.c (diskfs_S_io_restrict_auth): Declare I and
- add a missing semicolon.
-
- * fsys-getroot.c (diskfs_S_fsys_getroot): Eliminate PSEUDOCRED
- entirely. Fix unrelated typo.
-
- * file-chauthor.c (dithkfth_TH_file_chauthor): Fix first arg in
- call to fthhelp_ithowner.
-
-Tue Nov 12 22:45:07 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * diskfs.h: Correctly close comment.
-
-Thu Nov 7 14:49:19 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * io-restrict-auth.c (diskfs_S_io_restrict_auth): If CRED has
- root, use the requested id sets verbatim.
-
-Thu Nov 7 01:03:11 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * protid-rele.c (diskfs_protid_rele): Free CRED->user.
-
-Wed Nov 6 17:55:17 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * diskfs.h (diskfs_isuid, diskfs_groupmember, diskfs_isowner,
- diskfs_access, diskfs_checkdirmod): Delete functions.
- * fsys-getroot.c (diskfs_S_fsys_getroot): Replace PSEUDOCRED with
- a real iouser and specify that in the relevant calls.
- * io-restrict-auth.c (diskfs_S_io_restrict_auth): Reworked to use
- idvecs.
- * file-chmod.c (diskfs_S_file_chmod): diskfs_isuid ->
- idvec_contains.
- * file-chown.c (diskfs_S_file_chown): Likewise.
- * file-getcontrol.c (diskfs_S_file_getcontrol): Likewise.
- * file-chmod.c (diskfs_S_file_chmod): diskfs_groupmember ->
- idvec_contains.
- * file-chown.c (diskfs_S_file_chown): Likewise.
- * node-create.c (diskfs_create_node): Likewise.
- * dir-lookup.c (diskfs_S_dir_lookup): diskfs_isowner ->
- fshelp_isowner.
- * file-chflags.c (diskfs_S_file_chflags): Likewise.
- * file-chmod.c (diskfs_S_file_chmod): Likewise.
- * file-chown.c (diskfs_S_file_chown): Likewise.
- * file-get-transcntl.c (diskfs_S_file_get_translator_cntl):
- Likewise.
- * file-set-trans.c (diskfs_S_file_set_translator): Likewise.
- * file-utimes.c (diskfs_S_file_utimes): Likewise.
- * fsys-getroot.c (diskfs_S_fsys_getroot): Likewise.
- * lithp.h (dithkfth_ithowner): Deleted macro.
- (fthhelp_ithowner, uther): New macros.
- * file-chauthor.c (dithkfth_TH_file_chauthor): dthkfth_ithowner ->
- fthhelp_ithowner.
- * dir-lookup.c (diskfs_S_dir_lookup): diskfs_access ->
- fshelp_access.
- * dir-mkfile.c (diskfs_S_dir_mkfile): Likewise.
- * file-access.c (diskfs_S_file_check_access): Likewise.
- * file-exec.c (diskfs_S_file_exec): Likewise (in dead code).
- * fsys-getroot.c (diskfs_S_fsys_getroot): Likewise.
- * ifsock.c (diskfs_S_ifsock_getsockaddr): Likewise.
- * lookup.c (diskfs_lookup): Likewise.
- (diskfs_lookup): diskfs_checkdirmod -> fshelp_checkdirmod.
- * dir-lookup.c (diskfs_S_dir_lookup): New arg format for
- fshelp_fetch_root.
- * fsys-getroot.c (diskfs_S_fsys_getroot): Likewise.
- * diskfs.h, protid-make.c (diskfs_create_protid): Delete args
- `uids', `gids', `nuids', and `ngids'. Replace with new arg
- `user'. All callers changed.
- (diskfs_finish_protid): Likewise.
- * file-inv-trans.c (diskfs_S_file_invoke_translator): Use
- CRED->user instead of old fields.
- * io-restrict-auth.c (diskfs_S_io_restrict_auth): Likewise.
- * node-create.c (diskfs_create_node): Likewise.
- * file-exec.c (diskfs_S_file_exec): Likewise. Use idvec_merge
- instead of idvec_merge_ids, now that it's convenient.
- * io-reauthenticate.c (diskfs_S_io_reauthenticate): Use new
- iohelp_reauthenticate.
-
-Tue Nov 5 21:10:18 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * diskfs.h: Include <idvec.h>.
- (struct protid): Delete members `uids', `gids', `nuids' and
- `ngids'. New member `user'.
-
-Thu Oct 24 15:56:30 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * opts-std-startup.c (store_argp_children, startup_argp_children):
- New variables.
- (store_argp_parents, startup_argp_children): Variable removed.
- (diskfs_store_startup_argp): Use STORE_ARGP_CHILDREN instead of
- STORE_ARGP_PARENTS.
- (diskfs_startup_argp): Use STARTUP_ARGP_CHILDREN instead of
- STARTUP_ARGP_PARENTS.
- * opts-std-runtime.c (children): New variable.
- (parents): Variable removed.
- (diskfs_std_runtime_argp): Use CHILDREN instead of PARENTS.
-
-Mon Oct 21 21:54:34 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * diskfs.h: Add extern inline protection.
- * diskfs.c: New file.
- * Makefile (OTHERSRCS): Add diskfs.c.
-
-Fri Oct 11 21:55:45 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * dir-lookup.c (diskfs_S_dir_lookup): Temporarily add O_EXLOCK and
- O_SHLOCK to the set of retained flags, until they get added to O_HURD.
- Turn off OPENONLY_STATE_MODES bits in the flags we pass to
- diskfs_make_peropen, not everything *but* them!
- * priv.h (OPENONLY_STATE_MODES): Add O_EXLOCK & O_SHLOCK.
-
-Thu Oct 10 17:22:06 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * dir-lookup.c (diskfs_S_dir_lookup): Frob lock in NEWPI->po, not PO.
- Free NEWPI if we get an error trying to lock it.
- <sys/file.h>: New include.
-
-Thu Oct 10 17:11:05 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * dir-lookup.c (diskfs_S_dir_lookup): Implement O_SHLOCK and
- O_EXLOCK directly here.
-
-Thu Oct 10 10:53:28 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * peropen-rele.c (diskfs_release_peropen): Before freeing PO,
- release any user lock it's holding.
- <sys/file.h>: New include.
-
-Tue Oct 8 15:01:32 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * ifsock.c (diskfs_S_ifsock_getsockaddr): Write permission governs
- access to sockets, not read permission.
-
-Mon Oct 7 14:50:04 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * dir-rmdir.c (diskfs_S_dir_rmdir): Return ENOTDIR if NP isn't a dir.
-
-Tue Sep 24 23:51:37 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * opts-version.c (_print_version): Follow version string with newline.
-
-Thu Sep 19 17:59:37 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * Makefile (HURDLIBS): Add store.
-
-Wed Sep 18 15:02:31 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * opts-version.c (_print_version): Change to use new version
- format from the coding standards.
-
- * opts-std-runtime.c (std_runtime_options): Change --remount to
- --update (keep --remount as a deprecated alias).
- <argp.h>: New include.
- * opts-append-std.c <stdio.h>: New include.
- * dir-lookup.c <stdio.h>: New include.
-
-Fri Sep 13 19:15:45 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * file-get-fs-opts.c (diskfs_S_file_get_fs_options): Free ARGZ if
- diskfs_append_args returns an error.
- * fsys-options.c (diskfs_S_fsys_get_options): Likewise.
-
-1996-09-12 Miles Bader <miles@gnu.ai.mit.edu>
-
- * diskfs.h (diskfs_disk_name): New declaration.
- * readonly.c (diskfs_check_readonly): Use DISKFS_DISK_NAME
- instead of DISKFS_DEVICE_ARG.
- * init-startup.c (_diskfs_init_completed): Likewise.
-
-Wed Sep 11 17:25:14 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * disk-pager.c (diskfs_start_disk_pager): Renamed from
- setup_disk_pager.
- Add PAGER_BUCKET, IMAGE, and SIZE arguments.
- Pass in PAGER_BUCKET to thread routine, and don't create it.
- (diskfs_disk_pager): Renamed from disk_pager.
- (disk_image): Variable removed.
- (pager_bucket): Declaration removed.
- (service_paging_requests): Get PAGER_BUCKET from argument.
- * diskfs-pager.h (diskfs_start_disk_pager): Renamed from
- disk_pager_setup.
- Add PAGER_BUCKET, IMAGE, and SIZE arguments.
- (diskfs_disk_pager): Renamed from disk_pager.
- (disk_image, pager_bucket): Declarations removed.
-
-Mon Sep 9 10:54:58 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * fsys-options.c (diskfs_S_fsys_get_options): Initialize ARGZ &
- ARGZ_LEN to the program name, and call diskfs_append_args instead
- of diskfs_get_options.
- * file-get-fs-opts.c (diskfs_S_file_get_fs_options): Likewise.
- <argz.h>: New include.
- * diskfs.h (diskfs_append_args): Renamed from diskfs_get_options.
- * opts-get.c (diskfs_append_args): Likewise.
- * opts-std-startup.c <hurd/store.h>: New include.
- (store_argp_parents): Use diskfs_startup_argp, not
- diskfs_std_startup_argp.
- * Makefile (libdiskfs.so): Depend on libstore.so.
-
- * opts-version.c <argp.h>, <stdio.h>: New includes.
- (_print_version): Test diskfs_extra_version against 0 too.
- * io-version.c <stdio.h>: New include.
- (diskfs_S_io_server_version): Use snprintf instead of sprintf.
-
-Sun Sep 8 18:19:50 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * diskfs.h <argp.h>: Include removed.
- (struct argp): New (incomplete) declaration.
- (diskfs_get_file_device, diskfs_get_mach_device): Declarations removed.
- (diskfs_startup_argp): Renamed from diskfs_std_startup_argp.
- (diskfs_store_startup_argp): Renamed from
- diskfs_std_device_startup_argp.
- (diskfs_device_arg, diskfs_use_mach_device, diskfs_device_open,
- diskfs_device, diskfs_device_name, diskfs_device_start,
- diskfs_device_size, diskfs_device_block_size,
- diskfs_log2_device_block_size, diskfs_log2_device_blocks_per_page,
- diskfs_device_write_sync, diskfs_device_read_sync): Declarations
- removed.
- * opts-std-startup.c (diskfs_use_mach_device, diskfs_device_arg,
- dev_startup_options, dev_startup_argp_parents,
- diskfs_std_device_startup_argp): Variables removed.
- (parse_dev_startup_opt): Function removed.
- (diskfs_startup_argp): Renamed from diskfs_std_startup_argp.
- * Makefile (OTHERSRCS): Remove filedev.c, machdev.c, dev-open.c,
- dev-io.c, & dev-globals.c.
-
-Thu Sep 12 16:22:27 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * Makefile: New variable.
- (libdiskfs.so): Delete special depedency.
-
-Thu Sep 5 11:13:54 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * io-version.c (diskfs_S_io_server_version): Only fill in
- SERVER_NAME; ignore the rest.
-
- * diskfs.h (diskfs_major_version, diskfs_minor_version,
- diskfs_edit_version): Delete variables.
- (diskfs_server_version, diskfs_extra_version): New variables.
- * boot-start.c (diskfs_S_fsys_init): Register version from
- diskfs_server_version; pass empty string as release.
- * extra-version.c: New file.
- * Makefile (OTHERSRCS): Add extra-version.c.
- * opts-version.c: Include <version.h>.
- (diskfs_extra_version): Delete special declaration.
- (_print_version): Use the user's provided version number, and also
- give it our (libdiskfs) version number.
-
-Tue Sep 3 10:48:05 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * name-cache.c (diskfs_enter_lookup_cache): Cache `.' and `..'
- just like other nodes.
- (diskfs_check_lookup_cache): If we get a cache hit on `..', then
- do the inverse locking semantic, and only return success if things
- are stable around the call.
-
-Fri Aug 30 21:57:18 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * lookup.c (cache_misses): New variable, to find out what sort of
- thing all the cache misses are.
- (cm_lock): New variable.
- (diskfs_lookup): Keep track of cache misses in cache_misses.
-
- * name-cache.c (MAXCACHE): 200 now. After experimentation, this
- appears to be a pretty good value. Very little benefit after
- this.
-
-Fri Aug 30 20:41:27 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * name-cache.c (struct lookup_cache): Delete member `hits'.
- New member `stati'.
- (diskfs_enter_lookup_cache): Don't initialize C->hits.
- (find_cache): Set C->stati before returning.
- (build_partial): Delete function.
- (diskfs_check_lookup_cache): Delete calls to build_partial.
- Register all statistics through register_neg_hit,
- register_pos_hit, and register_miss.
- (MAXCACHE): 2000 now.
-
-Wed Aug 28 12:20:53 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * name-cache.c (MAXCACHE): 500 for now.
-
-Mon Aug 26 15:10:55 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * name-cache.c (MAXCACHE): Increase to 50000.
- (struct lookup_cache): New member `hits'.
- (statistics): Name struct type `struct stats'.
- (diskfs_enter_lookup_cache): Initialize C->hits.
- (PARTIAL_THRESH, NPARTIALS): New macros.
- (partial_stats): New variable.
- (build_partial): New function.
- (diskfs_check_lookup_cache): Call build_partial after statistics
- frobbing.
-
- * name-cache.c (diskfs_check_lookup_cache): Increment members of
- statistics while still holding CACHE_LOCK.
-
-Fri Aug 16 18:23:25 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * name-cache.c (diskfs_check_lookup_cache): Keep track of negative
- hits properly.
- * lookup.c (diskfs_lookup): On LOOKUPs that fail to find the node,
- enter a negative cache entry.
-
-Thu Aug 15 16:07:23 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * opts-version.c (diskfs_extra_version): New (weak) reference.
- (_print_version): Use DISKFS_EXTRA_VERSION. Tweak edit version.
- Fix type of EV.
-
-Thu Aug 15 16:38:41 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * io-identity.c (diskfs_S_io_identity): Don't hold lock around
- call to fshelp_get_identity.
-
-Mon Aug 12 15:54:27 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * opts-version.c (_print_version): Print the edit version too if
- it's non-zero.
-
-Thu Aug 8 18:18:09 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * readonly.c: Include <error.h>.
-
-Wed Aug 7 13:53:56 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * readonly.c (diskfs_check_readonly): If we get an error from
- diskfs_hypermetadata, then switch to readonly.
- * diskfs.h (diskfs_set_hypermetadata): Require an error code return.
- * dev-io.c (diskfs_device_write_sync): If we get D_READ_ONLY, then
- return EROFS to the caller instead of EIO.
-
- * node-create.c (diskfs_create_node): New files always copy GID
- from their parent; that's NetBSD's behavior, and it's good enough
- for me.
-
-Thu Aug 1 17:24:08 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * file-get-transcntl.c (diskfs_S_file_get_translator_cntl): Don't
- diskfs_nput NP; we've never created a reference. Just unlock it.
- (And bother to lock it in the first place.)
-
-Sat Jul 27 20:05:17 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * lookup.c (diskfs_lookup): Don't nput *NP if we didn't find a file.
-
- * init-startup.c (diskfs_S_startup_dosync): Clean up after ourselves.
- Don't sync if DISKFS_READONLY.
- * file-syncfs.c (diskfs_S_file_syncfs): Don't sync if DISKFS_READONLY.
- * fsys-syncfs.c (diskfs_S_fsys_syncfs): Likewise.
- * sync-interval.c (periodic_sync): Likewise.
- * shutdown.c (diskfs_shutdown): Likewise.
-
-Fri Jul 26 14:52:23 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * file-exec.c (diskfs_S_file_exec): Unlock NP before we attempt to
- do setuid/setgid (which otherwise can deadlock during port reauth).
- Pay attention to the error code returned by fshelp_exec_reauth,
- and don't make NEWPI if it's an error.
- Initialize ERR.
-
-Tue Jul 23 16:05:55 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * opts-version.c (_print_version): Make return type void.
-
-Fri Jul 19 21:19:42 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * filedev.c (diskfs_get_file_device): INTS[3] contains the number
- of runs, not the number of offsets (which is 2*NUM_RUNS).
- Don't deallocate the device port we've fetched.
-
- * opts-std-startup.c (startup_options, parse_startup_opt): Remove
- the --version option, which is handled elsewhere now.
-
-Thu Jul 18 23:05:56 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * protid-make.c (diskfs_start_protid): Use noinstall version of
- ports_create_port.
- (diskfs_finish_protid): Install port right into port set here.
-
-Mon Jul 15 21:37:12 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * diskfs.h (diskfs_checkdirmod): diskfs_isowner returns error or
- zero, so invert sense of tests.
-
- * lookup.c (diskfs_lookup): If we get an error from
- diskfs_checkdirmod, diskfs_nput the node we picked up; the caller
- won't want it.
-
- * dir-renamed.c (diskfs_rename_dir): When unlocking FDP, only do
- it if we FDP != TDP. Also, only do step two (changing .. in the
- directory being moved) if FDP != TDP.
-
-Sat Jul 13 20:05:27 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * io-reauthenticate.c (diskfs_S_io_reauthenticate): Repeat
- diskfs_start_protid and auth_server_authenticate for as we get
- EINTR.
-
-Sun Jul 7 21:07:53 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * boot-start.c (diskfs_S_fsys_init): Don't use unsafe MOVE_SEND in
- call to exec_init.
- * io-reauthenticate.c (diskfs_S_io_reauthenticate): Don't use
- unsafe MOVE_SEND in auth_server_authenticate.
-
-Sun Jul 7 10:27:37 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * opts-version.c (_print_version): Include HURD_RELEASE in default.
-
-Sat Jul 6 16:27:01 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * opts-version.c: New file.
- * Makefile (OTHERSRCS): Add opts-version.c.
-
-Sat Jul 6 13:32:58 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * node-drop.c (diskfs_drop_node): If this might be a special
- symlink, then truncate it even though NP->allocsize might be
- clear.
-
-Wed Jul 3 11:22:58 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * io-identity.c (diskfs_S_io_identity): Fetch identity using
- fshelp_get_identity rather than creating it ourselves.
- * diskfs.h (struct node): Remove member `identity'.
- * node-drop.c (diskfs_drop_node): Don't deallocate NP->identity.
- * node-make.c (diskfs_make_node): Don't initialize NP->identity.
-
-Thu Jun 27 10:07:03 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * init-startup.c (diskfs_startup_diskfs): Don't call
- diskfs_readonly_changed here anymore.
-
- * disk-pager.c (disk_pager_setup): Check diskfs_readonly variable
- instead of calling diskfs_check_readonly.
-
- * Makefile (LCLHDRS): Add diskfs-pager.h.
-
-Tue Jun 25 21:55:24 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * opts-std-runtime.c (parse_opt): Add hair to share arg parsing
- state between two parsers that use the same parse_opt function at
- the same time.
-
-Mon Jun 24 14:55:50 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * init-startup.c (diskfs_S_startup_dosync): Don't crash the
- filesystem, just do a clean sync.
- * node-drop.c (diskfs_drop_node): Call diskfs_check_readonly
- before making mods.
- * priv.h (_diskfs_diskdirty): New variable.
- * diskfs.h (diskfs_check_readonly): New function.
- * readonly.c (_diskfs_diskdirty): New var.
- (diskfs_check_readonly): New function.
- (diskfs_set_readonly): After clean sync, clear _diskfs_diskdirty.
- * rdwr-internal.c (_diskfs_rdwr_internal): Use
- diskfs_check_readonly instead of diskfs_readonly.
- * node-create.c (diskfs_create_node): Likewise.
- * fsys-getroot.c (diskfs_S_fsys_getroot): Likewise.
- * file-set-trans.c (diskfs_S_file_set_translator): Likewise.
- * disk-pager.c (disk_pager_setup): Likewise.
- * dir-unlink.c (diskfs_S_dir_unlink): Likewise.
- * dir-rmdir.c (diskfs_S_dir_rmdir): Likewise.
- * dir-rename.c (diskfs_S_dir_rename): Likewise.
- * dir-mkfile.c (diskfs_S_dir_mkfile): Likewise.
- * dir-mkdir.c (diskfs_S_dir_mkdir): Likewise.
- * dir-lookup.c (diskfs_S_dir_lookup): Likewise.
- * dir-link.c (diskfs_S_dir_link): Likewise.
- * conch-fetch.c (iohelp_fetch_shared_data): Likewise.
- * remount.c (diskfs_remount): Likewise.
-
- * io-reauthenticate.c (diskfs_S_io_reauthenticate): If
- auth_server_authenticate fails, then fill with empty IDs. We
- can't permit interruption, because this is a simpleroutine.
-
- * file-set-trans.c (diskfs_S_file_set_translator): Validate rdev
- change before making it.
- * file-chflags.c (diskfs_S_file_chflags): Validate flags change
- before making it.
- * lithp.h (dithkfth_validate_author_change): New macro.
- * file-chauthor.c (dithkfth_TH_file_chauthor): Validate new author
- before changing it.
- * node-create.c (diskfs_create_node): Validate group change before
- making it.
- * file-chown.c (diskfs_S_file_chown): Likewise.
- * node-create.c (diskfs_create_node): Validate mode change before
- making it.
- * file-set-trans.c (diskfs_S_file_set_translator): Likewise
- * file-chmod.c (diskfs_S_file_chmod): Likewise.
- * node-create.c (diskfs_creade_node): Validate owner change before
- making it.
- * file-chown.c (diskfs_S_file_chown): Likewise.
- * Makefile (OTHERSRCS): Add validate-mode.c, validate-group.c,
- validate-author.c, validate-flags.c, validate-rdev.c, and
- validate-owner.c.
- * validate-mode.c, validate-group.c, validate-author.c,
- validate-flags.c, validate-rdev.c, validate-owner.c: New files.
- * diskfs.h (diskfs_validate_mode_change,
- diskfs_validate_owner_change, diskfs_validate_group_change,
- diskfs_validate_author_change, diskfs_validate_flags_change,
- diskfs_validate_rdev_change): New decls.
-
-Fri Jun 21 00:18:16 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * fsys-options.c (diskfs_S_fsys_get_options): Use
- fshelp_return_malloced_buffer to setup the return data.
- * file-get-fs-opts.c (diskfs_S_file_get_fs_options): Likewise.
- * opts-set.c (diskfs_set_options): Supply INPUT arg to
- fshelp_set_options.
-
- * opts-append-std.c (diskfs_append_std_options): Use argz_add
- instead of rolling our own. Deal with errors.
- <argz.h>: New include.
-
-Wed Jun 19 21:57:46 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * init-startup.c (diskfs_S_startup_dosync): Pass HANDLE to
- ports_lookup_port. Declare ERR.
-
- * opts-get.c (diskfs_get_options): Call diskfs_append_std_options to
- do most of the work.
- * opts-append-std.c: New file.
- * opts-set.c: New file (old version renamed).
- * opts-std-runtime.c: Renamed from opts-set.c.
- (diskfs_set_options): Function removed.
- (struct parse_hook): New type.
- (set_opts, parse_opt): New functions.
- (common_argp, parents, diskfs_std_runtime_argp): New variables.
- * diskfs.h (diskfs_parse_runtime_options): Decl removed.
- (diskfs_std_startup_argp): Renamed from diskfs_startup_argp, now a
- structure decl, not a pointer decl.
- (diskfs_std_device_startup_argp): Renamed from
- diskfs_device_startup_argp, now a structure decl, not a pointer
- decl.
- (diskfs_set_options): Update decl (now takes argz & argz_len).
- (diskfs_runtime_arg): New declaration.
- (diskfs_std_runtime_argp, diskfs_append_std_options): New declarations.
- * opts-runtime-parse.c, opts-runtime-unparse.c: Files removed.
- * opts-std-startup.c (parse_dev_startup_opt): Use argp_error.
- (diskfs_startup_arg, diskfs_device_startup_arg): Variables removed.
- (diskfs_std_startup_argp): Renamed from startup_argp, exported.
- (diskfs_std_device_startup_argp): Renamed from dev_startup_argp,
- exported.
- * fsys-options.c (diskfs_S_fsys_set_options): Don't split
- arguments, just call diskfs_set_options with what we got.
- * opts-runtime.c: New file.
- * Makefile (OTHERSRCS): Add opts-std-runtime.c, opts-append-std.c,
- opts-runtime.c. Remove opts-runtime-parse.c, opts-runtime-unparse.c
-
-Thu Jun 13 10:05:51 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * Makefile (MIGSTUBS): Add startup_notifyServer.o.
- * init-startup.c (diskfs_S_startup_dosync): Uncomment function.
- * demuxer.c (diskfs_demuxer): Call diskfs_startup_notify_server.
- * init-startup.c (_diskfs_init_completed): NOTIFY doesn't need
- deallocation.
-
- * boot-start.c (diskfs_S_fsys_init): Build version string
- correctly.
-
-Tue May 14 11:14:12 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * Makefile (OTHERSRCS): Remove init-completed.c.
-
- * node-drop.c (diskfs_drop_node): Fix typo.
-
-Sat May 11 01:11:19 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * opts-std-startup.c (parse_dev_startup_opt, parse_startup_opt):
- Use ARGP_ERR_UNKNOWN instead of EINVAL.
- * opts-set.c (diskfs_set_options): Likewise.
-
-Fri May 10 17:15:51 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * io-identity.c: New file.
- * Makefile (IOSRCS): Add io-identity.c.
- * diskfs.h (diskfs_fsys_identity): New variable.
- (struct node): New member `identity'.
- * init-init.c (diskfs_fsys_identity): New variable.
- (diskfs_init_diskfs): Initialize diskfs_fsys_identity.
- * node-make.c (diskfs_make_node): Initialize NP->identity.
- * node-drop.c (diskfs_drop_node): Free NP->identity if it's been
- allocated.
-
-Thu May 9 11:52:52 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * protid-make.c (diskfs_make_protid): Delete function.
- * diskfs.h (diskfs_make_protid): Delete declaration.
-
- * init-startup.c (_diskfs_init_completed): Don't need to insert
- right any more now that it's a poly arg.
- Provide helpful name to init.
-
- * fsys-options.c (diskfs_S_fsys_get_options): Accept and ignore
- replyport parameters.
-
- * file-sync.c (diskfs_S_file_sync): Accept and ignore new parm
- OMITMETADATA.
-
- * priv.h: ioserver.h -> iohelp.h.
- * diskfs.h: Likewise.
- * file-sync.c (diskfs_S_file_sync): s/ioserver/iohelp/g
- * io-prenotify.c (diskfs_S_io_prenotify): Likewise.
- * io-get-conch.c (diskfs_S_io_get_conch): Likewise.
- * io-modes-off.c (diskfs_S_io_clear_some_openmodes): Likewise.
- * io-modes-on.c (diskfs_S_io_set_some_openmodes): Likewise.
- * io-modes-set.c (diskfs_S_io_set_all_openmodes): Likewise.
- * io-read.c (diskfs_S_io_read): Likewise.
- * io-readable.c (diskfs_S_io_readable): Likewise.
- * io-rel-conch.c (diskfs_S_io_release_conch): Likewise.
- * io-seek.c (diskfs_S_io_seek): Likewise.
- * io-stat.c (diskfs_S_io_stat): Likewise.
- * io-write.c (diskfs_S_io_write): Likewise.
- * conch-fetch.c (iohelp_fetch_shared_data): Likewise.
- * conch-set.c (iohelp_put_shared_data): Likewise.
- * node-make.c (diskfs_make_node): Likewise.
- * node-rdwr.c (diskfs_node_rdwr): Likewise.
- * Makefile (libdiskfs.so): Likewise.
-
- * dir-rename.c (diskfs_S_dir_rename): Understand new parm EXCL and
- do the right thing with it.
- * dir-link.c (diskfs_S_dir_link): Likewise.
-
-Thu May 9 12:12:41 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
-
- * io-reauthenticate.c (diskfs_S_io_reauthenticate): Don't pass CRED
- port in auth_server_authenticate.
-
- * io-select.c (diskfs_S_io_select): Removed TAG arg.
-
-Thu May 9 11:42:53 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * filedev.c (diskfs_get_file_device): Deallocate most things we
- got back from file_get_storage_info even if we didn't get an error.
-
- * filedev.c (diskfs_get_file_device): Fix type of DATA & _DATA.
- BLOCKSIZE -> BLOCK_SIZE. Copy name from DATA, not DEV_NAME_BUF.
-
-Mon May 6 20:12:34 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * filedev.c (diskfs_get_file_device): Enable new version.
-
-Fri May 3 15:55:44 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * filedev.c [0] (diskfs_get_file_device): Rewrite to use new interface.
-
-Tue Apr 30 14:39:06 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * init-startup.c: Include <string.h> and <hurd/startup.h>.
- (diskfs_startup_diskfs): If not bootstrap filesystem, call
- _diskfs_init_completed here.
- (diskfs_S_startup_dosync): New function (commented out).
- (_diskfs_init_completed): New function.
- * init-completed.c: Delete file.
- * init-init.c (diskfs_shutdown_notification_class): New variable.
- (diskfs_init_diskfs): Initialize diskfs_shutdown_notification_class.
- * diskfs.h (diskfs_shutdown_notification_class): New variable.
- * boot-start.c (diskfs_S_fsys_init): diskfs_init_completed ->
- _diskfs_init_completed.
- * priv.h (_diskfs_init_completed): New declaration.
- * diskfs.h (diskfs_init_completed): Delete function.
-
-Mon Apr 29 15:42:23 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * name-cache.c (struct lookup_cache): Add HDR, remove NEXT & PREV.
- (lookup_cache): Change type to struct cacheq.
- (mru_cache, lru_cache): Variables removed.
- (make_mru, make_lru, init_lookup_cache): Functions removed.
- (find_cache, diskfs_purge_lookup_cache,
- diskfs_check_lookup_cache): Use cacheq functions.
-
-Sun Apr 28 15:22:30 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
-
- * protid-make.c: Add obsolescence link warning.
-
-Tue Apr 23 11:05:04 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * node-drop.c (diskfs_drop_node): Don't do anything special for
- socket naming points.
- * Makefile (OTHERSRCS): Add dead-name.c.
- * dead-name.c: New file.
- * ifsock.c (diskfs_S_ifsock_getsockaddr): Request notification for
- new SOCKADDR; count that notification as a reference.
-
-Fri Apr 12 15:56:48 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * name-cache.c (diskfs_enter_lookup_cache): Never cache . or ..
-
-Thu Apr 11 17:59:18 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * console.c: Include <hurd.h>.
-
- * Makefile (fsys-MIGSFLAGS, fs-MIGSFLAGS, io-MIGSFLAGS,
- ifsock-MIGSFLAGS): Reference fsmutations.h in $(srcdir).
-
- * boot-start.c (diskfs_start_bootstrap): Print helpful message
- before doing anything else.
-
-Wed Apr 10 16:47:21 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * name-cache.c (struct lookup_cache): Add NEXT & PREV fields.
- Rename LEN back to NAME_LEN.
- (lru_cache, mru_cache): New variables.
- (first_cache, last_cache): Variables removed.
- (make_mru, make_lru, find_cache, init_lookup_cache): New functions.
- (diskfs_enter_lookup_cache, diskfs_purge_lookup_cache,
- diskfs_check_lookup_cache): Rewrite to use the linked list. Deal
- with negative entries.
-
-Tue Apr 9 12:59:02 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * lookup.c (diskfs_lookup): Deal with DS or NP being 0.
- * name-cache.c (diskfs_check_lookup_cache): Correctly handle the
- case where the lookup returns DIR itself.
-
- * diskfs.h (diskfs_enter_lookup_cache, diskfs_purge_lookup_cache,
- diskfs_check_lookup_cache): Renamed from versions without `lookup_'.
- * name-cache.c (diskfs_enter_lookup_cache, diskfs_purge_lookup_cache,
- diskfs_check_lookup_cache): Likewise.
- * direnter.c (diskfs_direnter): Similarly, rename use.
- * dirrewrite.c (diskfs_dirrewrite): Likewise.
- * dirremove.c (diskfs_dirremove): Likewise.
- * lookup.c (diskfs_lookup): Likewise.
-
-Sun Apr 7 15:29:02 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * name-cache.c (diskfs_check_cache): Declare I.
- (struct lookup_cache, diskfs_enter_cache): Change NAMELEN field to LEN.
-
-Wed Apr 3 16:02:45 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * node-drop.c (diskfs_drop_node): Don't call
- _diskfs_purge_cache_deletion.
- * name-cache.c (_diskfs_purge_cache_deletion): Delete function.
-
- * diskfs.h (diskfs_cached_lookup): New declaration.
- (struct node): New member `cache_id'.
-
-Tue Apr 2 12:50:31 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * name-cache.c (diskfs_enter_cache): Don't set LC->next->prev if
- LC->next is null.
- (diskfs_purge_cache): If freeing node at LOOKUP_CACHE_TAIL, bump
- LOOKUP_CACHE_TAIL back itself too.
- (_diskfs_purge_cache_deletion): Likewise.
-
- * lookup.c (diskfs_lookup): When doing diskfs_checkdirmod check,
- don't return success when we should return ENOENT, just because
- checkdirmod won. Also enter successful lookups for CREATE or
- LOOKUP in the name cache.
-
-Fri Mar 29 13:57:37 1996 Roland McGrath <roland@charlie-brown.gnu.ai.mit.edu>
-
- * io-map-cntl.c: Initialize shared page magic number.
-
-Mon Mar 25 09:30:31 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * name-cache.c (statistics): New variable.
- (diskfs_check_cache): Keep statistics on cache performance.
-
-Fri Mar 22 17:51:51 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * opts-runtime-parse.c (diskfs_parse_runtime_options): Supply new
- argument to argp_parse.
-
-Fri Mar 22 15:44:10 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * lookup.c (diskfs_lookup): Dereference NP in call to
- diskfs_checkdirmod.
- * direnter.c (diskfs_direnter): Don't fall off end.
- * diskfs.h (diskfs_enter_cache, diskfs_purge_cache,
- diskfs_check_cache): Add declarations.
- * dir-rename.c (diskfs_S_dir_rename): Use new args for
- diskfs_dirrewrite and diskfs_dirremove.
- * dir-renamed.c (diskfs_rename_dir): Likewise.
- * dir-clear.c (diskfs_clear_directory): Use new diskfs_dirremove
- args.
- * dir-rmdir.c (diskfs_S_dir_rmdir): Likewise.
- * dir-unlink.c (diskfs_S_dir_unlink): Likewise.
-
- * Makefile (OTHERSRCS): Add direnter.c, dirrewrite.c, dirremove.c,
- and lookup.c.
-
-Wed Mar 20 14:34:22 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * diskfs.h (diskfs_lookup_hard): Remove mention of ENOTDIR and
- EACCES errors.
- * diskfs.h (diskfs_null_dirstat): New function.
- * dir-lookup.c (diskfs_S_dir_lookup): Don't check cache here.
- * dir-unlink.c (diskfs_S_dir_unlink): Don't frob cache here.
- * dir-rmdir.c (diskfs_S_dir_rmdir): Likewise.
- * dir-clear.c (diskfs_clear_directory): Likewise.
- * node-create.c (diskfs_create_node): Likewise.
- * dir-renamed.c (diskfs_rename_dir): Likewise.
- * dir-rename.c (diskfs_S_dir_rename): Likewise.
- * dir-link.c (diskfs_S_dir_link): Likewise.
- * direnter.c: New file.
- * dirrewrite.c: Likewise.
- * dirremove.c: Likewise.
- * lookup.c: Likewise.
- * diskfs.h (diskfs_lookup): Renamed to be diskfs_lookup_hard.
- (diskfs_direnter): Renamed to be diskfs_direnter_hard.
- (diskfs_dirrewrite): Renamed to be diskfs_dirrewrite_hard.
- (diskfs_dirremove): Renamed to be diskfs_dirremove_hard.
- (diskfs_lookup, diskfs_direnter, diskfs_dirrewrite, diskfs_dirremove):
-
-Tue Mar 19 14:55:46 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * name-cache.c: New file.
- * Makefile (OTHERSRCS): Add name-cache.c.
- * dir-lookup.c (diskfs_S_dir_lookup): Check cache before normal
- diskfs_lookup call.
- * node-drop.c (diskfs_drop_node): Call
- _diskfs_purge_cache_deletion before releasing node structure with
- diskfs_node_norefs.
- * dir-clear.c (diskfs_clear_directory): Call
- diskfs_purge_cache_node before diskfs_dirremove.
- * dir-rename.c (diskfs_S_dir_rename): Likewise.
- * dir-renamed.c (diskfs_rename_dir): Likewise.
- * dir-rmdir.c (diskfs_S_dir_rmdir): Likewise.
- * dir-unlink.c (diskfs_S_dir_unlink): Likewise.
- * dir-init.c (diskfs_init_dir): Doc fix.
- * dir-rename.c (diskfs_S_dir_rename): Call diskfs_purge_cache
- before diskfs_dirrewrite for old node.
- * dir-renamed.c (diskfs_rename_dir): Likewise.
- * node-create.c (diskfs_create_node): Call diskfs_enter_cache if
- diskfs_direnter is successful.
- * dir-link.c (diskfs_S_dir_link): Likewise.
- * dir-rename.c (diskfs_S_dir_rename): Call diskfs_enter_cache if
- diskfs_direnter/diskfs_dirrewrite is successful.
- * dir-renamed.c (diskfs_rename_dir): Likewise.
-
-Fri Mar 15 23:10:57 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * dir-lookup.c (diskfs_S_dir_lookup): Don't leak a send right to
- the anonymous handle on DNP when calling fetch_root.
-
-Tue Mar 12 14:36:10 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * file-set-trans.c (diskfs_S_file_set_translator): Deallocate ref
- on CONTROL when we are done with it.
-
-Thu Mar 7 16:45:02 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * readonly.c (diskfs_set_readonly): Don't sleep(1) after syncing.
-
-Thu Feb 29 14:29:20 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * Makefile (OTHERSRCS): Change `opts-runtime-def.c' to
- `opts-runtime-parse.c'. Add `opts-runtime-unparse.c'.
-
-Wed Feb 21 06:10:05 1996 Roland McGrath <roland@charlie-brown.gnu.ai.mit.edu>
-
- * file-set-trans.c (diskfs_S_file_set_translator): Add EROFS check.
-
-Sun Feb 18 00:08:27 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * init-init.c (diskfs_init_diskfs): Use maptime_map.
- * node-times.c (diskfs_set_node_times): Use maptime_read.
-
-Fri Feb 16 13:48:08 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * opts-runtime-def.c (diskfs_parse_runtime_options): STANDARD_ARGP
- is const.
-
-Thu Feb 15 16:59:04 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * diskfs.h (diskfs_nput): It's not valid to touch *NP (by
- `mutex_unlock (&np->lock);') after we have called
- diskfs_drop_node. So don't do it in that case.
-
-Wed Feb 7 22:42:22 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * diskfs.h (diskfs_nput): Before bumping NP->references (which
- precedes diskfs_try_dropping_softrefs), *lock*
- diskfs_node_refcnt_lock, not mutant unlock.
- (diskfs_nrele): Likewise.
-
-Wed Feb 7 16:22:31 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * diskfs.h (diskfs_parse_runtime_options): Make STANDARD_ARGP const.
- (diskfs_startup_argp, diskfs_device_startup_argp): Make const.
- * opts-common.c (diskfs_common_options): Make const.
- * opts-std-startup.c (startup_options, dev_startup_options,
- dev_start_argp_parents, dev_startup_argp, startup_common_argp,
- startup_argp_parents, startup_argp, diskfs_startup_argp): Make const.
- * opts-set.c (std_runtime_options): Make const.
- (diskfs_set_options): Make argp structures const.
-
-Wed Feb 7 13:39:09 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * dir-lookup.c (diskfs_S_dir_lookup): Revert last change.
-
-Tue Feb 6 15:56:04 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * dir-lookup.c (diskfs_S_dir_lookup): Make the new peropen we'll
- pass as dotdot to the fetch_root with the same flags as DIRCRED->po.
-
-Wed Jan 31 00:27:10 1996 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * node-rdwr.c (diskfs_node_rdwr): Handle null AMTREAD.
-
-Tue Jan 30 21:20:13 1996 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * fsys-options.c (diskfs_S_fsys_set_options): Use
- rwlock_writer_lock instead of rwlock_reader_lock in DO_CHILDREN case.
-
-Tue Jan 30 15:03:35 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * peropen-rele.c (diskfs_release_peropen): Free dotdotport when
- deallocating peropen.
-
-Wed Jan 24 18:14:28 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * dir-lookup.c (diskfs_S_dir_lookup): Use diskfs_create_protid instead
- of diskfs_make_protid, and deal with an error return.
- * dir-mkfile.c (diskfs_S_dir_mkfile): Likewise.
- * file-exec.c (diskfs_S_file_exec): Likewise.
- * file-inv-trans.c (diskfs_S_file_invoke_translator): Likewise.
- * fsys-getroot.c (diskfs_S_fsys_getroot): Likewise.
- * io-duplicate.c (diskfs_S_io_duplicate): Likewise.
- * io-restrict-auth.c (diskfs_S_io_restrict_auth): Likewise.
- * trans-callback.c (_diskfs_translator_callback2_fn): Likewise.
- * boot-start.c (diskfs_start_bootstrap, diskfs_S_exec_startup_get_info,
- diskfs_execboot_fsys_startup, diskfs_S_fsys_init): Likewise.
- * protid-make.c (diskfs_start_protid): Return an error now, and use
- ports_create_port instead of ports_allocate_port.
- (diskfs_create_protid): New function.
- (diskfs_make_protid): Call diskfs_create_protid.
- * diskfs.h (diskfs_start_protid): Update declaration.
- (diskfs_create_protid): New declaration.
- * io-reauthenticate.c (diskfs_S_io_reauthenticate): Use new version of
- diskfs_start_protid.
- * file-getcontrol.c (diskfs_S_file_getcontrol): Use ports_create_port
- instead of ports_allocate_port.
- * boot-start.c (start_execserver, diskfs_start_bootstrap): Likewise.
- * init-startup.c (diskfs_startup_diskfs): Likewise.
- * sync-interval.c (diskfs_set_sync_interval): Likewise.
- (periodic_sync): Pass in the MSG_ID arg to ports_begin_rpc, and
- deal with any error returned.
-
- * readonly.c (diskfs_set_readonly): Deal with ports_inhibit_class_rpcs
- returning an error.
- * remount.c (diskfs_remount): Likewise.
- * shutdown.c (diskfs_shutdown): Likewise.
- * sync-interval.c (diskfs_set_sync_interval): Likewise.
-
- * dir-readdir.c: Include <fcntl.h>.
-
-Tue Jan 23 16:28:47 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * opts-std-startup.c (startup_options): Put boot options in a
- separate group with a header.
-
-Thu Jan 18 14:05:51 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * dir-readdir.c (diskfs_S_dir_readdir): Require read permission
- before succeeding.
-
- * fsys-getroot.c (diskfs_S_fsys_getroot): Deallocate ref to dotdot
- after diskfs_make_peropen, because the latter does not eat a
- reference.
-
- * fsys-getroot.c (diskfs_S_fsys_getroot): In symlink case, use
- MOVE_SEND to return the dotdot port to the user.
-
-Thu Jan 11 22:09:05 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
-
- * diskfs-pager.h (struct disk_image_user): New type.
- (diskfs_catch_exception, diskfs_end_catch_exception): Use it to
- maintain a linked list of catchers instead of just one.
-
-Sat Jan 6 11:49:02 1996 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * Makefile (installhdrs): Add diskfs-pager.h.
- (OTHERSRCS): Add disk-pager.c.
-
-Fri Jan 5 17:06:42 1996 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * io-write.c: Return errors regardless of *AMT--writes are all or
- nothing.
- * io-read.c: Return errors regardless of *DATALEN--reads are all or
- nothing.
-
-Thu Jan 4 16:11:35 1996 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * disk-pager.c, diskfs-pager.h: New files.
- * exc.c: File removed.
- * Makefile (OTHERSRCS): Remove exc.c.
- * diskfs.h (diskfs_catch_exception, diskfs_end_catch_exception):
- Macros removed.
- (diskfs_register_memory_fault_area,
- diskfs_unregister_memory_fault_area): Decls removed.
-
- * diskfs.h: Use size_t instead of int for amounts in
- diskfs_node_rdwr prototype.
- * node-rdwr.c (diskfs_node_rdwr): Pass AMTREAD read/write to
- _diskfs_rdwr_internal, instead of assuming it wrote the whole amount.
- Update the node if anything was transferred, regardless of ERR.
- * rdwr-internal.c (_diskfs_rdwr_internal): Rewritten using
- pager_memcpy.
- Fix types of args: OFFSET to off_t, make AMT read/write size_t *.
- * priv.h: Fix args in _diskfs_rdwr_internal prototype.
- * io-write.c: Pass AMT read/write to _diskfs_rdwr_internal, and
- return success if any bytes were written.
- * io-read.c: Likewise.
-
-Mon Jan 1 15:45:33 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * file-exec.c (diskfs_S_file_exec): Use fshelp_exec_reauth().
- (setid, scan_ids): Functions deleted.
-
-Thu Dec 28 14:21:42 1995 Miles Bader <miles@gnu.ai.mit.edu>
-
- * file-exec.c (diskfs_S_file_exec): Always reauth the proc port,
- as exec does not do it, even in the secure case. Set the proc's
- owner too.
-
- * file-exec.c (setid): Don't touch the return params unless we succeed.
- Add SETID parameter, and just copy old into new unless it's set.
- Handle the NOLDGENIDS == 0 case correctly.
- (diskfs_S_file_exec): Use the new setid() properly. Make sure that
- {GEN,AUX}{UIDS,GIDS} are always in a state where they can be freed.
-
-Thu Dec 28 00:24:29 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * priv.h (end_using_protid_port): Don't calls ports_port_deref if
- CRED is null.
-
-Wed Dec 27 17:32:21 1995 Miles Bader <miles@gnu.ai.mit.edu>
-
- * file-exec.c (setid): New function.
- (scan_ids): Moved out of diskfs_S_file_exec.
- (diskfs_S_file_exec): Move duplicated code into setid(). Make the
- bogus auth port case work correctly. Deleted old ifdefed-out code.
- Enable setuid code.
-
- * exc.c (diskfs_register_memory_fault_area): Register both
- preempter1 and preempter2 in REC instead of preempter1 twice.
-
-Sat Dec 23 14:49:22 1995 Michael I. Bushnell p/BSG <mib@gnu.ai.mit.edu>
-
- * exc.c: Entire file rewritten to use libc signal preemption
- facility.
-
-Wed Dec 20 14:49:29 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * boot-start.c (diskfs_S_fsys_init): Call proc_mark_exec on
- EXECPROCESS.
-
-Tue Dec 19 13:19:19 1995 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * file-exec.c (diskfs_S_file_exec): Better attempt at
- setuid/setgid execution; still not entirely right, but mostly so.
- Will move this code to libfshelp before turning it on.
-
-Thu Dec 14 15:51:19 1995 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * diskfs.h (diskfs_checkdirmod): Correctly return error code for
- failure, not 1.
-
-Mon Dec 4 17:07:20 1995 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * dir-unlink.c (diskfs_S_dir_unlink): Don't call fsys_goaway until
- we've released our lock.
-
-Mon Dec 4 16:57:28 1995 Miles Bader <miles@gnu.ai.mit.edu>
-
- * dir-unlink.c (diskfs_S_dir_unlink): Delete vestigial fetch_control.
-
-Tue Nov 21 13:54:14 1995 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * rdwr-internal.c (_diskfs_rdwr_internal): Declare PROT volatile.
-
- * init-first.c (master_thread_function): Declare to be `static
- any_t'.
-
- * fsys-options.c: Include <string.h>.
-
- * diskfs.h (diskfs_get_options): Bother providing declaration.
-
- * file-get-fs-opts.c: Include <string.h>.
- (diskfs_S_file_get_fs_options): Dereference DATA_LEN in call to
- vm_allocate.
-
-Sat Nov 18 09:01:28 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * boot-start.c (diskfs_S_exec_startup_get_info): Renamed from
- diskfs_S_exec_startup, slightly different protocol. Unused exec
- server stubs removed.
- * Makefile (MIGSTUBS): Replaced execServer.o with exec_startupServer.o.
-
-Mon Nov 13 17:13:40 1995 Miles Bader <miles@gnu.ai.mit.edu>
-
- * demuxer.c (diskfs_demuxer):
- diskfs_exec_server --> diskfs_exec_startup_server.
-
-Mon Nov 13 16:28:27 1995 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * file-lock-stat.c (diskfs_S_file_lock_stat): Lock around reads to
- make sure they are mutually consistent.
-
- * io-readable.c (diskfs_S_io_readable): Set *AMOUNT to zero if
- filepointer is past the end of the file.
-
-Thu Nov 9 12:33:53 1995 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * dir-link.c (diskfs_S_dir_link): Now that args are swapped,
- deallocate port ref on FILECRED instead of DIRCRED.
-
-Sun Nov 5 10:49:26 1995 Miles Bader <miles@gnu.ai.mit.edu>
-
- * Makefile (OTHERSRCS): Add opts-get.c.
- (FSSRCS): Add file-get-fs-opts.c.
- * file-get-fs-opts.c (diskfs_S_file_get_fs_options): New function.
- * fsys-options.c (diskfs_S_fsys_get_options): New function.
- * opts-get.c (diskfs_get_options): New function.
-
- * sync-interval.c (diskfs_sync_interval): New variable.
- (diskfs_set_sync_interval): Set DISKFS_SYNC_INTERVAL.
-
-Sat Nov 4 23:17:50 1995 Miles Bader <miles@gnu.ai.mit.edu>
-
- * file-get-trans.c (diskfs_S_file_get_translator): Initialize ERROR.
-
- * trans-callback.c (_diskfs_translator_callback2_fn):
- UNDERLYING_TYPE should be a pointer. As should the UIDS & GIDS
- args to diskfs_make_protid.
-
- * fsys-getroot.c (diskfs_S_fsys_getroot): Pass both callback args
- to fshelp_fetch_root.
-
- * filedev.c (diskfs_get_file_device): Give FLAGS argument to
- file_get_storage_info.
-
- * dir-lookup.c (diskfs_S_dir_lookup): Fix various typos.
- (short_circuited_callback1): Dereference ARGZ & ARGZ_LEN.
- Include <hurd/paths.h>
-
-Wed Nov 1 15:56:45 1995 Miles Bader <miles@gnu.ai.mit.edu>
-
- * dir-lookup.c (diskfs_S_dir_lookup): Add new callback arg to
- fshelp_fetch_root call. Change short_circuited_callback1 to
- reflect the split into two callbacks (we use the global diskfs
- callback for the other_).
- * trans-callback.c (_diskfs_translator_callback1_fn,
- _diskfs_translator_callback2_fn): New functions, replacing the
- single original.
- (_diskfs_translator_callback1, _diskfs_translator_callback2):
- New variables, replacing the single original.
- * priv.h (_diskfs_translator_callback1, _diskfs_translator_callback2):
- Declare.
-
- * boot-start.c (diskfs_execboot_fsys_startup): Add FLAGS arg; use.
- * fsys-startup.c (diskfs_S_fsys_startup): Ditto.
- * init-startup.c (diskfs_startup_diskfs): Ditto.
- * diskfs.h (diskfs_startup_diskfs, diskfs_execboot_fsys_startup):
- Add FLAGS arg.
-
-Mon Oct 30 13:20:12 1995 Miles Bader <miles@gnu.ai.mit.edu>
-
- * dir-lookup.c (diskfs_S_dir_lookup): Move code for starting
- short-circuited translators here, from _diskfs_translator_callback_fn.
- Inline code from node_is_translated.
- (node_is_translated): Function removed.
- (major, minor): New macros -- temporarily here until libc exports them.
-
-Thu Oct 26 18:41:23 1995 Miles Bader <miles@gnu.ai.mit.edu>
-
- * trans-callback.c (_diskfs_translator_callback_fn): Deal with
- short-circuited translators.
- * dir-lookup.c (node_is_translated): New function.
- (diskfs_S_dir_lookup): Use node_is_translated() instead of
- np->istranslated to see whether NP has a passive translator.
-
- * file-set-trans.c (diskfs_S_file_set_translator): Add missing else.
- Use makedev macro instead of doing it by hand.
- (makedev): New macro -- temporarily here until libc exports one.
-
-Thu Oct 19 12:43:47 1995 Miles Bader <miles@gnu.ai.mit.edu>
-
- * fsys-options.c (diskfs_S_fsys_set_options): Only hold
- DISKFS_FSYS_LOCK for writing while setting our own options; we
- hold it for reading while setting our children's.
-
- * rdwr-internal.c (_diskfs_rdwr_internal): Get rid of CRED argument.
- * priv.h (_diskfs_rdwr_internal): Ditto.
- * node-rdwr.c (diskfs_node_rdwr): Ditto.
- * io-write.c (diskfs_S_io_write): Ditto.
- * io-read.c (diskfs_S_io_read): Ditto.
-
-Wed Oct 18 15:52:53 1995 Miles Bader <miles@gnu.ai.mit.edu>
-
- * diskfs.h (diskfs_get_filemap): Add prot parameter.
- (diskfs_max_user_pager_prot): New declaration.
- * rdwr-internal.c (_diskfs_rdwr_internal): Add argument CRED, and
- use it to decide how to setup the mapped i/o.
- * io-write.c (diskfs_S_io_write): Pass CRED to _diskfs_rdwr_internal.
- * io-read.c (diskfs_S_io_read): Ditto.
- * node-rdwr.c (diskfs_node_rdwr): Ditto.
- * io-map.c (diskfs_S_io_map): Pass the appropiate vm protection to
- diskfs_get_filemap. If this node isn't O_RDWR, only return the
- appropiate memobj.
- Include <fcntl.h>.
- * priv.h (_diskfs_rdwr_internal): Add cred parameter.
-
- * boot-start.c (diskfs_execboot_fsys_startup): Open exec's
- realnode read-only for now, since we know it doesn't matter and
- having gratuitously writable nodes around prevents us from
- starting up or going read-only.
- (diskfs_S_fsys_init): Don't make the cwdir/crdir right with O_WRITE.
- * trans-callback.c (_diskfs_translator_callback_fn): Ditto for
- other translators. The fsys_startup interface should change very
- soon and make this irrelevant.
-
- * readonly.c (diskfs_set_readonly): Return EBUSY if necessary.
- Add hack to try and work around pagers-can't-wait bug.
-
- * opts-common.c (diskfs_common_options): New variable.
- * priv.h (diskfs_common_options): New declaration.
- * opts-std-startup.c (startup_options): Remove options common to
- both runtime and startup.
- (startup_common_argp, startup_argp_parents): New variables.
- (startup_argp): Include parents.
- * opts-set.c (std_runtime_options): Remove options common to
- both runtime and startup.
- (diskfs_set_options): Use the common options.
- * Makefile (OTHERSRCS): Add opts-common.c.
-
- * diskfs.h (diskfs_fsys_lock): Change to a struct rwlock.
- Include <rwlock.h>
- * shutdown.c (diskfs_fsys_lock): Now a rwlock.
- (diskfs_shutdown): Lock DISKFS_FSYS_LOCK for writing.
- * fsys-getroot.c (diskfs_S_fsys_getroot): Hold DISKFS_FSYS_LOCK
- for reading.
- * sync-interval.c (periodic_sync): Hold DISKFS_FSYS_LOCK for
- reading while syncing.
- * fsys-syncfs.c (diskfs_S_fsys_syncfs): Ditto.
- * fsys-options.c (diskfs_S_fsys_set_options): Hold DISKS_FSYS_LOCK
- for writing.
- Dereference PT even when a child filesystem returns an error.
- * opts-set.c (diskfs_set_options): Don't hold DISKS_FSYS_LOCK (our
- caller should).
-
- * machdev.c (diskfs_get_mach_device): SIZE is in blocks.
-
-Wed Oct 18 14:00:58 1995 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * file-exec.c (diskfs_S_file_exec): Return EACCES for attempts to
- execute a directory. Dike out totally bogus set[ug]id code.
- Bother to lock NP around critical section.
-
-Tue Oct 17 14:32:41 1995 Miles Bader <miles@gnu.ai.mit.edu>
-
- * init-startup.c (diskfs_startup_diskfs): Call diskfs_readonly_changed
- if we're starting up writable.
- * diskfs.h (diskfs_readonly_changed, diskfs_reload_global_state,
- diskfs_node_reload, diskfs_set_readonly, diskfs_remount): New
- declarations.
- (diskfs_main_request_loop): Declaration removed.
- * Makefile (OTHERSRCS): Add readonly.c, remount.c.
- * readonly.c (diskfs_set_readonly): New function.
- * remount.c (diskfs_remount): New function.
-
- * opts-set.c (diskfs_set_options): Rework readonly transition &
- remounting. Hold diskfs_fsys_lock.
-
- * diskfs.h (diskfs_fsys_lock): Renamed from diskfs_shutdown_lock.
- * shutdown.c (diskfs_shutdown): diskfs_shutdown_lock -->
- diskfs_fsys_lock.
-
-Fri Oct 13 14:51:42 1995 Miles Bader <miles@gnu.ai.mit.edu>
-
- * diskfs.h (diskfs_start_bootstrap): Get rid of ARGV argument.
- (diskfs_argv): New declaration.
- * boot-start.c (saved_argv): Variable removed.
- (diskfs_argv): New variable. Should get set by default arg parser.
- (diskfs_start_bootstrap): Get rid of ARGV argument.
- (diskfs_S_fsys_init): Use DISKFS_ARGV instead of SAVED_ARGV.
- * opts-std-startup.c (parse_startup_opt): Set DISKFS_ARGV.
- * init-startup.c (diskfs_startup_diskfs): Call diskfs_start_bootstrap
- if we're the bootstrap file system.
-
- * dev-globals.c (diskfs_device, diskfs_device_name,
- diskfs_device_start, diskfs_device_size, diskfs_device_block_size,
- diskfs_log2_device_block_size, diskfs_log2_device_blocks_per_page):
- New variables.
- * dev-io.c (diskfs_device_write_sync, diskfs_device_write_sync):
- New functions.
- * dev-open.c (diskfs_device_open): New function, new file.
- * diskfs.h (diskfs_device, diskfs_device_name,
- diskfs_device_start, diskfs_device_size, diskfs_device_block_size,
- diskfs_log2_device_block_size, diskfs_log2_device_blocks_per_page,
- diskfs_device_write_sync, diskfs_device_write_sync,
- diskfs_device_open, diskfs_console_stdio): New declarations.
- * console.c (diskfs_console_stdio): New function.
- * Makefile (OTHERSRCS): Add dev-open.c, dev-io.c, dev-globals.c,
- console.c.
- * opts-std-startup.c (diskfs_use_mach_device, diskfs_device_arg,
- dev_startup_options, dev_startup_argp_parents, dev_startup_argp,
- diskfs_device_startup_argp): New variables.
- (parse_dev_startup_opt): New function.
-
-Thu Oct 12 16:11:22 1995 Miles Bader <miles@gnu.ai.mit.edu>
-
- * boot-start.c (diskfs_execboot_fsys_startup): Fix args to dir_lookup.
- Declare PATHBUF and RETRY.
-
- * boot-start.c (diskfs_S_fsys_init): Put the contents of
- diskfs_init_completed in here, freeing that routine for user-use.
-
- * init-completed.c (diskfs_init_completed): Now empty.
-
- * opts-set.c (std_runtime_options): Renamed from long_options,
- convert to argp format.
- (SHORT_OPTIONS): Removed.
- (diskfs_set_options): Converted to use argp.
- * diskfs.h (diskfs_parse_runtime_options,
- diskfs_standard_startup_argp): Use argp, not options.
- Include <argp.h> instead of <options.h>.
- * opts-runtime-def.c (diskfs_parse_runtime_options): Use argp
- instead of options.
- * opts-std-startup.c (std_startup_options): Renamed from
- std_long_options; converted to argp format.
- (std_startup_argp): Renamed from std_startp_argp, converted argp fmt.
- (diskfs_standard_startup_argp): Renamed from
- diskfs_standard_startup_options.
-
-Thu Oct 12 03:25:09 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * boot-start.c (diskfs_execboot_fsys_startup): Use dir_lookup
- instead of hurd_file_name_lookup to open /servers/exec.
-
-Mon Oct 9 03:42:49 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * boot-start.c (diskfs_execboot_fsys_startup): Pass back a port to
- /servers/exec in *REAL.
-
-Sat Oct 7 20:51:06 1995 Miles Bader <miles@gnu.ai.mit.edu>
-
- * init-completed.c (diskfs_init_completed): New function.
- * diskfs.h (diskfs_init_completed): must --> may.
- Add necessary includes.
-
- * Makefile (OTHERSRCS): Add init-completed.c.
-
-Sat Oct 7 05:07:42 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * Makefile (libdiskfs.so): Depend on libpager, libioserver,
- libfshelp, libthreads.
-
-Fri Oct 6 17:26:51 1995 Miles Bader <miles@gnu.ai.mit.edu>
-
- * diskfs.h (diskfs_get_file_device, diskfs_get_mach_device): New funcs.
- (diskfs_boot_flags): New variable.
- (diskfs_bootflags, diskfs_bootflagarg): Variables deleted.
-
- * boot-start.c (diskfs_S_fsys_getpriv): Add the port type parameters.
-
- * Makefile (MIGSFLAGS): Variable deleted.
- (fs-MIGSFLAGS, io-MIGSFLAGS, ifsock-MIGSFLAGS): New variables.
- (fsys-MIGSFLAGS): Also import fsmutations.h.
-
- * dir-link.c (diskfs_S_dir_link): Swap first two arguments.
-
- * filedev.c (diskfs_get_file_device): Use new block_size return
- value from file_get_storage_info.
-
-Thu Oct 5 15:10:34 1995 Miles Bader <miles@gnu.ai.mit.edu>
-
- * Makefile (OTHERSRCS): Remove boot-parse.c; add filedev.c & machdev.c.
- * diskfs.h (diskfs_host_priv, diskfs_master_device): Variables deleted.
- (diskfs_parse_bootargs): Function deleted.
- (diskfs_init_diskfs): Now returns error_t.
- * init-init.c (diskfs_init_diskfs): Always use get_privileged_ports.
- Now return error_t.
- * machdev.c (diskfs_get_mach_device): Use get_privileged_ports
- instead of diskfs_master_device.
- * boot-start.c (diskfs_S_fsys_getpriv): Use get_privileged_ports
- to get the privileged ports.
- (diskfs_start_bootstrap): Use diskfs_boot_flags instead of
- diskfs_bootflagarg.
- (diskfs_start_bootstrap, start_execserver): Look for flags
- directly in diskfs_boot_flags, instead of using the old
- diskfs_bootflags.
- * boot-start.c (diskfs_S_exec_startup): Use get_console to get the
- console device.
- (get_console): New function.
- * opts-std-startup.c (OPT_BOOTFLAGS, OPT_EXEC_SERVER_TASK,
- OPT_HOST_PRIV_PORT, OPT_DEVICE_MASTER_PORT): New defines.
- (std_long_opts, parse_std_startup_opt): Add the
- --device-master-port, --host-priv-port, --exec-server-task, and
- --bootflags options.
-
-Thu Oct 5 00:46:09 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * sync-interval.c (periodic_sync_lock): Variable removed.
- (diskfs_set_sync_interval): Use ports_inhibit_port_rpcs on `pi'
- instead of the spin lock.
- (periodic_sync): Don't use the lock.
- Put ports_begin_rpc before check of periodic_sync_thread.
-
-Wed Sep 27 20:11:09 1995 Miles Bader <miles@gnu.ai.mit.edu>
-
- * filedev.c (diskfs_get_file_device): New file, new function.
- * machdev.c (diskfs_get_mach_device): New file, new function.
-
-Mon Sep 18 14:21:29 1995 Miles Bader <miles@churchy.gnu.ai.mit.edu>
-
- * io-pathconf.c (diskfs_S_io_pathconf): Renamed from
- file_pathconf.c:diskfs_S_file_pathconf.
- * Makefile (FSSRCS): Deleted file-pathconf.c.
- (IOSRCS): Added io-pathconf.c.
-
-Sun Sep 17 18:04:10 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * boot-start.c (diskfs_S_exec_startup): Don't pass an argument
- string. Set *FLAGS to EXEC_STACK_ARGS.
-
- * file-set-size.c: Renamed from file-trunate.c.
- (diskfs_S_file_set_size): Renamed from diskfs_s_file_truncate.
- If SIZE exceeds the file size, extend the file.
- * Makefile (FSSRCS): Rename file-truncate.c to file-set-size.c.
-
-Sat Sep 16 13:10:21 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * ourfs_notify.defs: New file.
- * Makefile (DIST_FILES): Added ourfs_notify.defs.
- (ourfs_notify_U.h ourfs_notifyUser.c, ourfs_notify.defs): Targets
- removed.
-
-Wed Sep 13 12:36:26 1995 Michael I. Bushnell, p/BSG <mib@duality.gnu.ai.mit.edu>
-
- * diskfs.h (diskfs_lookup): Doc fix.
- * dir-clear.c (diskfs_clear_directory): Set the fourth arg in
- REMOVE lookup calls in accord with change in rules for the lookup
- call.
-
-Wed Sep 6 11:30:24 1995 Miles Bader <miles@churchy.gnu.ai.mit.edu>
-
- * demuxer.c (diskfs_demuxer): Use ports_notify_server and
- ports_interrupt_server instead of our own versions.
- * Makefile (SRCS): Removed $(NOTIFYSRCS) and $(INTSRCS).
- (NOTIFYSRCS, INTSRCS, notify-MIGSFLAGS): Removed.
- (MIGSTUBS): Removed notifyServer.o and interruptServer.o.
- * interrupt.c: File deleted.
-
-Tue Aug 29 14:22:58 1995 Michael I. Bushnell, p/BSG <mib@duality.gnu.ai.mit.edu>
-
- * io-select.c (diskfs_S_io_select): Don't check open modes or
- return EBADF.
-
-Fri Aug 25 15:02:19 1995 Miles Bader <miles@churchy.gnu.ai.mit.edu>
-
- * Makefile (FSYSSRCS): Add fsys-forward.c.
-
-Fri Aug 25 09:44:43 1995 Michael I. Bushnell, p/BSG <mib@mole.gnu.ai.mit.edu>
-
- * file-truncate.c (diskfs_S_file_truncate): Bother to check the
- return value of diskfs_truncate.
-
-Wed Aug 23 14:39:07 1995 Miles Bader <miles@churchy.gnu.ai.mit.edu>
-
- * Makefile (REMHDRS): Removed.
- Rules dealing with ../lib removed.
-
-Sat Jul 29 10:34:38 1995 Miles Bader <miles@churchy.gnu.ai.mit.edu>
-
- * ifsock.c (diskfs_S_ifsock_getsockaddr): Don't loop infinitely if
- we fail to get a reasonable PF_LOCAL server.
-
-Fri Jul 28 14:59:45 1995 Miles Bader <miles@churchy.gnu.ai.mit.edu>
-
- * ifsock.c (diskfs_S_ifsock_getsockaddr): Try to restart the
- PF_LOCAL server if it dies.
-
- * node-drop.c (diskfs_drop_node): Don't actually drop the node if
- it is a socket naming point, unless it also has no links.
-
-Sat Jul 22 13:54:48 1995 Michael I Bushnell <mib@geech.gnu.ai.mit.edu>
-
- * file-getcontrol.c (diskfs_S_file_getcontrol): Fix typo.
- * boot-start.c (start_execserver): Likewise.
-
-Fri Jul 21 12:37:36 1995 Michael I Bushnell <mib@geech.gnu.ai.mit.edu>
-
- * trans-callback.c (_diskfs_translator_callback_fn): Use correct
- sense of diskfs_readonly flag.
-
- * boot-start.c (diskfs_start_bootstrap): Free initial reference
- created by diskfs_make_protid.
- (diskfs_S_exec_startup): Likewise.
- (diskfs_S_fsys_init): Likewise.
- * dir-lookup.c (diskfs_S_dir_lookup): Likewise. (Two places.)
- * dir-mkfile.c (diskfs_S_dir_mkfile): Likewise.
- * file-exec.c (diskfs_S_file_exec): Likewise.
- * file-inv-trans.c (diskfs_S_file_invoke_translator): Likewise.
- * fsys-getroot.c (diskfs_S_fsys_getroot): Likewise.
- * io-duplicate.c (diskfs_S_io_duplicate): Likewise.
- * io-restrict-auth.c (diskfs_S_io_restrict_auth): Likewise.
- * trans-callback.c (_diskfs_translator_callback_fn): Likewise.
-
- * io-reauthenticate.c (diskfs_S_io_reauthenticate): Free initial
- reference created by diskfs_start_protid.
-
- * boot-start.c (diskfs_start_bootstrap): Free initial reference
- created by ports_allocate_port.
- (start_execserver): Likewise.
- * file-getcontrol.c (diskfs_S_file_getcontrol): Likewise.
- * init-startup.c (diskfs_startup_diskfs): Likewise.
-
- * dir-lookup.c (diskfs_S_dir_lookup): Examine the active
- translator on NP, not on diskfs_root_node, to see if translator
- usage is necessary.
-
- * file-set-trans.c (diskfs_S_file_set_translator): Only validate
- PASSIVELEN if PASSIVE is set.
-
-Tue Jul 18 16:12:20 1995 Michael I Bushnell <mib@geech.gnu.ai.mit.edu>
-
- * init-first.c (thread_timeout, server_timeout): New vars.
- (THREAD_TIMEOUT, SERVER_TIMEOUT): Delete macros.
- (master_thread_function): Use vars instead of macros.
-
- * file-get-trans.c (diskfs_S_file_get_translator): Conform to new
- memory semantic of diskfs_get_translator.
-
-Wed Jul 12 16:39:24 1995 Michael I Bushnell <mib@duality.gnu.ai.mit.edu>
-
- * shutdown.c (diskfs_shutdown): Call ports_resume_class_rpcs for
- diskfs_protid_class before return EBUSY.
-
-Thu Jul 6 15:34:59 1995 Michael I Bushnell <mib@duality.gnu.ai.mit.edu>
-
- * Makefile (ourfs_notify_U.h ourfs_notifyUser.c): Use
- ourfs_notify.defs instead of directly out of the include
- directory.
- (ourfs_notify.defs): New target.
-
- * Makefile: Removed dependencies that are now automatically
- generated.
-
-Mon Jun 26 15:38:07 1995 Michael I Bushnell <mib@duality.gnu.ai.mit.edu>
-
- * fsys-goaway.c (diskfs_S_fsys_goaway): Include "fsys_S.h" and
- "fsys_reply_U.h". New parms REPLY and REPLY_TYPE. Send
- fsys_goaway reply message before exit.
- * Makefile (fsys-MIGSFLAGS): New variable.
- * fsys-startup.c (diskfs_S_fsys_startup): New parms REPLY and
- REPLYTYPE.
- * fsys-getroot.c (diskfs_S_fsys_getroot): Likewise.
- * fsys-options.c (diskfs_S_fsys_set_options): Likewise.
- * boot-start.c (diskfs_S_fsys_getpriv): Likewise.
- * fsys-syncfs.c (diskfs_S_fsys_syncfs): Likewise.
- * fsys-getfile.c (diskfs_S_fsys_getfile): Include "fsys_S.h". New
- parms REPLY and REPLYTYPE.
-
- * sync-interval.c (periodic_sync_thread, periodic_sync_lock):
- Declare static.
- (control): Delete var.
- (pi): New var.
- (diskfs_set_sync_interval): Set PI instead of CONTROL.
- (periodic_sync): Do sync by hand; use ports routines around it
- properly.
-
- * shutdown.c (diskfs_shutdown): Fix parentheses on bitwise tests.
-
- * fsys-goaway.c (diskfs_S_fsys_goaway): If diskfs_shutdown returns
- zero, then exit here.
- * shutdown.c (diskfs_shutdown): Don't actually exit; return zero
- instead.
- * init-first.c (master_thread_function): Exit when shutdown
- returns zero.
-
- * file-set-trans.c (diskfs_S_file_set_translator): Ignore harmless
- errors from fsys_goaway.
- * shutdown.c (diskfs_shutdown): Ignore harmless errors from
- fsys_goaway.
- * fsys-options.c (diskfs_S_fsys_set_options/helper): Ignore
- harmless errors from fsys_set_options.
-
- * file-set-trans.c (diskfs_S_file_set_translator): Fix parentheses
- on first active EXCL check.
-
-Fri Jun 23 15:43:55 1995 Michael I Bushnell <mib@duality.gnu.ai.mit.edu>
-
- * fsys-options.c (diskfs_S_fsys_set_options) [helper]: Unlock NP
- around fsys call.
- * file-syncfs.c (diskfs_S_file_syncfs) [helper]: Likewise.
- * fsys-syncfs.c (diskfs_S_fsys_syncfs) [helper]: Likewise.
- * shutdown.c (diskfs_shutdown) [helper]: Likewise.
-
-Thu Jun 22 14:48:46 1995 Michael I Bushnell <mib@duality.gnu.ai.mit.edu>
-
- * priv.h (_diskfs_translator_callback): Must be extern to force
- inclusion of trans-callback.c.
-
- * dir-lookup.c (diskfs_S_dir_lookup): Correctly parethenize
- O_NOTRANS flags test.
-
-Tue Jun 20 11:52:24 1995 Michael I Bushnell <mib@duality.gnu.ai.mit.edu>
-
- * node-make.c (diskfs_make_node): Fix function name
- fshelp_init_transbox -> fshelp_transbox_init.
-
- * file-syncfs.c: Include <hurd/fsys.h>.
- * fsys-syncfs.c: Likewise.
-
- * file-syncfs.c (diskfs_S_file_syncfs) [helper]: First arg to
- fshelp_fetch_control should be &NP->transbox, not NP.
- * fsys-options.c (diskfs_S_fsys_set_options) [helper]: Likewise.
- * fsys-syncfs.c (diskfs_S_fsys_syncfs) [helper]: Likewise.
- * shutdown.c (diskfs_shutdown) [helper]: Likewise.
-
- * file-set-trans.c (diskfs_S_file_set_translator): Remove
- assignment from if test.
- * node-rdwr.c (diskfs_node_rdwr): Likewise.
-
-Mon Jun 19 16:32:12 1995 Michael I Bushnell <mib@duality.gnu.ai.mit.edu>
-
- * diskfs.h (diskfs_node_iterate): New (user-provided) function.
- * fsys-syncfs.c (diskfs_S_fsys_syncfs): Use diskfs_node_iterate
- instead of diskfs_sync_translators.
- * file-syncfs.c (diskfs_S_file_syncfs): Likewise.
- * shutdown.c (diskfs_shutdown): Likewise.
- * fsys-options.c (diskfs_S_fsys_set_options): Likewise.
-
- * dir-rmdir.c (diskfs_S_dir_rmdir): Don't attempt anything for
- translated directories here; just return EBUSY.
- * dir-unlink.c (diskfs_S_dir_unlink): Don't do massively
- complicated fsys_goaway. Instead, call it at the end (but only if
- this was the last link) and ignore errors.
-
- * fsys-startup.c (diskfs_S_fsys_startup): Strip out support for
- translators; fshelp now does that itself.
-
- * file-set-trans.c: Include <hurd/fsys.h>.
-
- * file-set-trans.c (diskfs_S_file_set_translator): Use new
- translator interface throughout.
- * dir-lookup.c (diskfs_S_dir_lookup): Use new translator startup
- interface.
-
-Fri Jun 16 17:42:44 1995 Michael I Bushnell <mib@duality.gnu.ai.mit.edu>
-
- * file-get-transcntl.c (diskfs_S_file_get_translator_cntl): Use
- fshelp_fetch_control instead of old interface.
-
-Wed Jun 14 15:52:30 1995 Michael I Bushnell <mib@duality.gnu.ai.mit.edu>
-
- * node-drop.c (diskfs_drop_node): Call fshelp_drop_transbox
- instead of fshelp_kill_translator; do it *after* the truncate.
- * node-make.c (diskfs_make_node): Initialize TRANSBOX member using
- new function. Drop initialization of TRANSLATOR member.
- * fsys-getroot.c (diskfs_S_fsys_getroot): Use new translator
- startup interface.
- * Makefile (OTHERSRCS): Removed trans-start.c, trans-destroy.c,
- and trans-sync.c. Added trans-callback.c.
- * trans-start.c, trans-destroy,c, trans-sync.c: Deleted files.
- * trans-callback.c: New file.
- * priv.h (_diskfs_translator_callback): New declaration.
- * diskfs.h (diskfs_start_translator, diskfs_destroy_translator,
- diskfs_sync_translators):
- Delete declarations.
- (struct node): Replace TRANSLATOR member with new TRANSBOX member.
- (diskfs_get_translator): Specify new calling interface.
-
-Fri Jun 9 15:48:30 1995 Michael I Bushnell <mib@duality.gnu.ai.mit.edu>
-
- * rdwr-internal.c (_diskfs_rdwr_internal): Cast __VM_PAGE_SIZE in
- comparisen.
- * io-write.c (diskfs_S_io_write): Cast DATALEN to off_t in
- comparisons.
- * io-read.c (diskfs_S_io_read): Cast MAKREAD to off_t in
- comparison.
- * io-prenotify.c (diskfs_S_io_prenotify): Cast END to off_t in
- comparison.
- * file-get-trans.c (diskfs_S_file_get_translator): Declare
- variable `buflen' and various variables `len' to be unsigned.
- * file-exec.c (diskfs_S_file_exec): Declare both variables `i' to
- be unsigned int.
-
- * io-async-icky.c (diskfs_S_io_get_icky_async_id): Validate CRED.
-
- * interrupt.c (diskfs_S_interrupt_operation): Bother to implement.
-
- * init-init.c (diskfs_init_diskfs): Pass null second argument in
- calls to ports_create_class.
-
- * fsys-options.c (diskfs_S_fsys_set_options): Bother validating
- FSYS and implementing DO_CHILDREN.
-
- * dir-lookup.c (diskfs_S_dir_lookup): Initialize GIDS, NUIDS, and
- NGIDS to avoid warning.
-
- * boot-start.c: Provide unused attributes where appropriate.
- * file-chg.c (diskfs_S_file_notice_changes): Mark parameters as
- unused.
- * file-getfh.c (diskfs_S_file_getfh): Likewise.
- * file-inv-trans.c (diskfs_S_file_invoke_translator): Likewise.
- * fsys-getfile.c (diskfs_S_fsys_getfile): Likewise.
- * init-init.c (_diskfs_control_clean): Likewise.
- * io-async.c (diskfs_S_io_async): Likewise.
- * notify-stubs.c: Likewise.
- * file-pathconf.c (diskfs_S_file_pathconf): Declare NAME to be
- unused.
- * io-select.c (diskfs_S_io_select): Declare ATTRIBUTE unused.
- * io-stubs.c (diskfs_S_io_postnotify): Declare parms START and END
- unused.
- * io-prenotify.c (diskfs_S_io_prenotify): Declare parm START
- unused.
-
- * diskfs.h (diskfs_transboot_class): Delete var.
- * init-init.c (diskfs_transboot_class): Delete var.
- (diskfs_init_diskfs): Don't initialize it.
-
- * dir-rename.c (diskfs_S_dir_rename): After renaming directory,
- synchronize relevant state if DISKFS_SYNCHRONOUS.
-
-Thu Jun 8 19:01:25 1995 Michael I Bushnell <mib@duality.gnu.ai.mit.edu>
-
- * diskfs.h (diskfs_pager_users): New function.
- * shutdown.c (diskfs_shutdown): Rewrote to use new ports interface
- adequately.
-
-Tue Jun 6 13:50:13 1995 Michael I Bushnell <mib@duality.gnu.ai.mit.edu>
-
- * init-first.c (diskfs_spawn_first_thread): Call our own
- thread function instead of the ports one directly.
- (master_thread_function): New function.
-
- * notify-nosenders.c (diskfs_do_seqnos_mach_notify_no_senders):
- Don't help support pagers here at all.
- * demuxer.c (diskfs_demuxer): Don't call pager_demuxer.
-
- * boot-start.c (diskfs_start_bootstrap): Use new args for
- ports_allocate_port.
- (start_execserver): Likewise.
- * init-startup.c (diskfs_startup_diskfs): Likewise.
- * protid-make.c (diskfs_start_protid): Likewise.
- * file-getcontrol.c (diskfs_S_file_getcontrol): Likewise.
- * sync-interval.c (diskfs_set_sync_interval): Likewise.
-
- * boot-start.c (diskfs_S_exec_startup): Use ports_lookup_port and
- ports_port_deref instead of ports_check_port_type and
- ports_done_with_port.
- (diskfs_execboot_fsys_startup): Likewise.
- (diskfs_S_fsys_init): Likewise.
- (diskfs_S_fsys_getpriv): Likewise.
- * fsys-getroot.c (diskfs_S_fsys_getroot): Likewise.
- * fsys-goaway.c (diskfs_S_fsys_goaway): Likewise
- * fsys-startup.c (diskfs_S_fsys_startup): Likewise.
- * fsys-syncfs.c (diskfs_S_fsys_syncfs): Likewise.
- * notify-nosenders.c (diskfs_do_seqnos_mach_notify_no_senders):
- Likewise.
- * priv.h (begin_using_protid_port): Use ports_lookup_port.
- (end_using_protid_port): Use ports_port_deref.
-
- * trans-start.c (fshelp_transboot_port_type): Deleted var.
- * priv.h (enum porttype): Delete.
- * demuxer.c: Renamed from ports-demuxer.c.
- (diskfs_demuxer): Renamed from ports_demuxer.
- * init-init.c (diskfs_protid_class, diskfs_transboot_class,
- diskfs_control_class, diskfs_initboot_class,
- diskfs_execboot_class, diskfs_port_bucket): New vars.
- (diskfs_init_diskfs): Don't call libports_initialize.
- Initialize diskfs_protid_class, diskfs_transboot_class,
- diskfs_control_class, diskfs_initboot_class,
- diskfs_execboot_class, and diskfs_port_bucket.
- * diskfs.h: (diskfs_shutdown_soft_ports): Deleted decl.
- (ports_demuxer): Deleted decl.
- (diskfs_demuxer): New decl.
- (diskfs_protid_class, diskfs_transboot_class, diskfs_control_class,
- diskfs_initboot_class,diskfs_execboot_class, diskfs_port_bucket):
- New decls.
- * ports-noports.c, ports-clean.c, ports-soft.c, ports-idle.c,
- ports-consts.c, pager-consts.c, init-loop.c: Deleted files.
- * Makefile (OTHERSRCS): Deleted ports-noports.c, ports-clean.c,
- ports-soft.c, ports-consts, pager-consts.c, init-loop.c, and
- ports-idle.c.
- Replace ports-demuxer.c with demuxer.c.
-
-Mon May 22 13:52:16 1995 Miles Bader <miles@churchy.gnu.ai.mit.edu>
-
- * opts-set.c (diskfs_set_options): Don't fall through to the error
- case from the 's' one!
- Use ARG instead of the global OPTARG.
-
-Sat May 20 01:11:05 1995 Miles Bader <miles@churchy.gnu.ai.mit.edu>
-
- * file-getcontrol.c (diskfs_S_file_getcontrol): Unlock
- _diskfs_control_lock lock instead of locking it again!
-
-Fri May 19 21:22:14 1995 Miles Bader <miles@churchy.gnu.ai.mit.edu>
-
- * opts-set.c (diskfs_set_options): New function in new file.
- * opts-runtime-def.c (diskfs_parse_runtime_options): Ditto.
- * opts-std-startup.c (diskfs_standard_startup_options): New
- exported variable in new file.
- * fsys-options.c (diskfs_S_fsys_set_options): Extract the argument
- vector and call diskfs_set_options.
- * diskfs.h: (diskfs_standard_startup_options): Declare new variable.
- (diskfs_set_options): Declare new function.
- (diskfs_parse_runtime_options): Ditto.
- Include <options.h> (currently in ../lib).
- * Makefile (OTHERSRCS): Add opts-set.c, opts-std-startup.c, and
- opts-runtime-def.c.
- (OBJS): Add argz.o & options.o.
- (REMHDRS): Add argz.h & options.h.
-
-Tue May 16 17:36:46 1995 Miles Bader <miles@churchy.gnu.ai.mit.edu>
-
- * init-first.c (diskfs_spawn_first_thread): Don't start syncing here.
- * init-startup.c (diskfs_startup_diskfs): Do it here instead.
-
-Mon May 15 15:18:25 1995 Miles Bader <miles@churchy.gnu.ai.mit.edu>
-
- * diskfs.h (diskfs_set_options): Declare.
- * fsys-options.c (diskfs_S_fsys_set_options): Extract argc & argv,
- and call diskfs_set_options.
- * def-set-options.c: New file (contains a default diskfs_set_options).
-
- * Makefile (OBJS): Add argz.o (from ../lib). It shouldn't hurt to
- have this in libdiskfs, since we need it...
- (CPPFLAGS): Add -I../lib, to get argz.h, + $(CPPFLAGS-$(notdir $<))
- Set the vpath for %.c to ../lib, so we get argz.c.
- (OTHERSRCS): Add def-set-options.c.
-
-Sat May 13 03:08:35 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * boot-parse.c (diskfs_execserver_task): New variable.
- (diskfs_parse_bootargs): Take a third integer arg before the
- device name, our name for the task port of the exec server, which
- is loaded and ready to run but suspended.
- * boot-start.c (start_execserver): Don't create and load a task;
- the exec server file is no longer linked into the filesystem.
- Just set the bootstrap port of diskfs_execserver_task and resume
- it.
-
-Fri May 12 16:22:33 1995 Miles Bader <miles@churchy.gnu.ai.mit.edu>
-
- * fsys-readonly.c (diskfs_S_fsys_set_options,
- diskfs_S_fsys_mod_readonly): Change from mod_readonly to
- set_options. This file is now actually called fsys-options.c.
- * Makefile (FSYSSRCS): Rename fsys-readonly.c to fsys-options.c.
-
- * sync-interval.c (diskfs_set_sync_interval): New function (in a
- new file) that establishes a thread to periodically sync the
- filesystem.
- * Makefile (OTHERSRCS): Add sync-interval.c and sync-default.c.
- * diskfs.h: Add declarations of diskfs_set_sync_interval and
- diskfs_default_sync_interval.
-
- * init-first.c (diskfs_spawn_first_thread): Start background syncing.
- * sync-default.c (diskfs_default_sync_interval): A new variable
- that defines a default initial sync interval.
-
-Fri May 12 15:45:43 1995 Michael I Bushnell <mib@duality.gnu.ai.mit.edu>
-
- * io-read.c (diskfs_S_io_read): If the offset is past the end of
- the file, then return EOF.
-
-Thu Apr 27 20:01:16 1995 Michael I Bushnell <mib@geech.gnu.ai.mit.edu>
-
- * node-drop.c (diskfs_drop_node): Deal cleanly with errors in
- diskfs_truncate.
-
- * diskfs.h (diskfs_nrele, diskfs_nput): We need to hold a real
- reference around the call to diskfs_try_dropping_softrefs, because
- that's a user-supplied routine that might itself rely on the
- reference counting system.
-
-Thu Apr 20 18:54:26 1995 Miles Bader <miles@churchy.gnu.ai.mit.edu>
-
- * node-create.c (diskfs_create_node): Return EROFS if diskfs_readonly.
-
-Tue Apr 4 20:20:40 1995 Michael I Bushnell <mib@geech.gnu.ai.mit.edu>
-
- * dir-unlink.c (diskfs_S_dir_unlink): Do fsys_goaway for
- translated nodes being unlinked.
- * dir-rmdir.c (diskfs_S_dir_rmdir): Likewise.
-
-Tue Apr 4 18:33:35 1995 Miles Bader <miles@churchy.gnu.ai.mit.edu>
-
- * file-exec.c (diskfs_S_file_exec): However, replacing *MAKE_SEND*
- with COPY_SEND just doesn't work...
-
-Tue Apr 4 14:31:51 1995 Michael I Bushnell <mib@geech.gnu.ai.mit.edu>
-
- * file-exec.c (diskfs_S_file_exec): Using MOVE_SEND in call to
- exec_exec loses, because it consumes a reference, which will be
- consumed again by mach_msg_server if we return an error. So use
- COPY_SEND instead, and deallocate the rights ourselves only when
- we are to return success.
-
-Fri Mar 31 12:25:57 1995 Michael I Bushnell <mib@geech.gnu.ai.mit.edu>
-
- * file-set-trans.c (diskfs_S_file_set_translator): Only destroy
- existing active translator if ACTIVE_FLAGS will change it. If the
- existing active translator is provided then don't do anything.
-
-Fri Mar 17 11:36:40 1995 Michael I Bushnell <mib@duality.gnu.ai.mit.edu>
-
- * io-stat.c (diskfs_S_io_stat): Typo.
-
- * diskfs.h: Back out changes to protid and associated permission
- checking functions.
- * file-chmod.c (diskfs_S_file_chmod): Likewise.
- * file-chown.c (diskfs_S_file_chown): Likewise.
- * file-getcontrol.c (diskfs_S_file_getcontrol): Likewise.
-
- * dir-link.c (diskfs_S_dir_link): Fix typo.
-
- * diskfs.h (_diskfs_idcheckdirmod): `diskfs_hasuid' ->
- diskfs_idhasuid.
- * priv.h (CHANGE_NODE_FIELD): Remove trailing space on backslashed
- line.
-
- * diskfs.h (_diskfs_idcheckdirmod): `cred' -> `id'.
- (diskfs_idhasgid): Likewise.
-
- * dir-clear.c (diskfs_clear_directory): Don't do
- diskfs_synchronous here.
- * dir-init.c (diskfs_init_dir): Likewise.
- * dir-rmdir.c (diskfs_S_dir_rmdir): Repair implementation of
- diskfs_syncronous.
- * dir-renamed.c (diskfs_rename_dir): If we are synchronous,
- sync the one node our parent doesn't have access to.
- * dir-mkdir.c (diskfs_S_dir_mkdir): Implement diskfs_synchronous.
- * dir-mkfile.c (diskfs_S_dir_mkfile): Likewise.
- * dir-lookup.c (diskfs_S_dir_lookup): Likewise.
- * io-read.c (diskfs_S_io_read): Likewise.
- * fsys-syncfs.c (diskfs_S_fsys_syncfs): Likewise.
- * node-drop.c (diskfs_drop_node): Likewise.
- * node-rdwr.c (diskfs_node_rdwr): Likewise.
-
-Wed Mar 15 11:54:12 1995 Michael I Bushnell <mib@churchy.gnu.ai.mit.edu>
-
- * conch-fetch.c (ioserver_fetch_shared_data): Implement
- diskfs_synchronous.
- * dir-clear.c (diskfs_clear_directory): Likewise.
- * dir-init.c (diskfs_init_dir): Likewise.
- * dir-renamed.c (diskfs_rename_dir): Likewise.
-
-Wed Mar 8 16:36:04 1995 Michael I Bushnell <mib@duality.gnu.ai.mit.edu>
-
- * diskfs.h (diskfs_synchronous): New variable.
- * priv.h (CHANGE_NODE_FIELD): If DISKFS_SYNCHRONOUS, then sync
- node after possibly changing it.
- * io-seek.c: Prevent diskfs_synchronous from having its usual
- effect here.
- * dir-link.c (diskfs_S_dir_link): Implement diskfs_synchronous.
- * dir-rename.c (diskfs_S_dir_rename): Likewise.
- * dir-rmdir.c (diskfs_S_dir_rmdir): Likewise
- * dir-unlink.c (diskfs_S_dir_unlink): Likewise.
- * file-sync.c (diskfs_S_file_sync): Likewise.
- * file-syncfs.c (diskfs_S_file_syncfs): Likewise.
- * io-prenotify.c (diskfs_S_io_prenotify): Likewise.
- * io-stat.c (diskfs_S_io_stat): Likewise.
- * io-write.c (diskfs_S_io_write): Likewise.
- * io-sigio.c (diskfs_S_io_sigio): Likewise.
-
-Tue Mar 7 15:21:09 1995 Michael I Bushnell <mib@geech.gnu.ai.mit.edu>
-
- * diskfs.h (struct userid): New type.
- (struct protid): Replace UIDS, GIDS, NUIDS, and NGIDS with ID.
- (diskfs_isuid): Replace with new function diskfs_idhasuid.
- (diskfs_groupmember): Replace with new function diskfs_idhasgid.
- (_diskfs_idisowner, _diskfs_idaccess, _diskfs_idcheckdirmod):
- New functions.
- (diskfs_isowner): Check each ID in the chain with
- _diskfs_idisowner.
- (diskfs_access): Check each ID in the chain with _diskfs_idaccess.
- (diskfs_checkdirmod): Check each ID in the chain with
- _diskfs_idcheckdirmod.
- * file-chmod.c (diskfs_S_file_chmod): Perform the permission
- check for each ID in the chain.
- * file-chown.c (diskfs_S_file_chown): Likewise.
- * file-getcontrol.c (diskfs_S_file_getcontrol): Likewise.
-
- * boot-parse.c (diskfs_parse_bootargs): Use assert_perror instead
- of assert where appropriate.
- * boot-start.c (diskfs_start_bootstrap): Likewise.
- (diskfs_S_fsys_init): Likewise.
- * io-reauthenticate.c (diskfs_S_io_reauthenticate): Likewise.
- * rdwr-internal.c (_diskfs_rdwr_internal): Likewise.
-
-Thu Jan 19 02:04:34 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * Makefile (ourfs_notify_U.h ourfs_notifyUser.c): Make this
- instead of ourmsg_U.h. All references changed.
- * dir-chg.c: Undo renaming. Includ ourfs_notify_U.h instead of
- ourmsg_U.h.
-
- * io-select.c: Updated to new io_select protocol.
-
- * dir-chg.c (diskfs_S_dir_notice_changes): Call
- nowait_msg_dir_changed instead of nowait_dir_changed.
-
-Sat Dec 10 20:03:07 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * boot-start.c (start_execserver): When aligning bss size for
- vm_allocate, don't include bss start alignment fixup offset.
-
-Fri Dec 9 02:06:35 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * io-read.c (diskfs_S_io_read): Don't check for MAXREAD<0.
-
- * io-write.c: Use mach_msg_type_number_t in place of unsigned int
- and int.
- * io-readable.c: Likewise.
- * io-read.c: Likewise.
-
-Wed Nov 23 00:26:48 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * ports-demuxer.c (ports_demuxer): Call
- diskfs_seqnos_notify_server, not seqnos_notify_server.
-
-Fri Nov 11 13:11:35 1994 Michael I Bushnell <mib@churchy.gnu.ai.mit.edu>
-
- * io-read.c (diskfs_S_io_read): If OFF is past the end of the
- file, don't set MAXREAD to a negative number; that will crash
- rdwr_internal.
-
-Wed Nov 9 01:46:18 1994 Michael I Bushnell <mib@geech.gnu.ai.mit.edu>
-
- * file-exec.c: Include <hurd/paths.h>.
- (diskfs_S_file_exec): If diskfs_exec isn't already
- set, try to open it here. (Later, we should also deal if
- exec_exec returns that the previous server died.)
-
-Tue Nov 8 00:06:56 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * file-get-trans.c: Include <stdio.h> for asprintf decl.
-
-Wed Nov 2 16:16:57 1994 Michael I Bushnell <mib@geech.gnu.ai.mit.edu>
-
- * priv.h (CHANGE_NODE_FIELD): Don't call diskfs_node_update here.
-
-Fri Oct 28 18:26:15 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * boot-parse.c (diskfs_parse_bootargs): Make stdout line buffered.
- (diskfs_parse_bootargs): Use getline instead of scanf.
- * boot-start.c (diskfs_start_bootstrap): Likewise.
- (diskfs_S_fsys_init): Create a root port with two send right refs
- and install it as crdir and cwdir.
-
-Tue Oct 25 14:16:50 1994 Michael I Bushnell <mib@churchy.gnu.ai.mit.edu>
-
- * boot-start.c (diskfs_start_bootstrap): Renamed variable ARGV
- to be EXEC_ARGV and ARGVLEN to be EXEC_ARGVLEN.
-
-Fri Oct 7 01:30:12 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * boot-parse.c (diskfs_parse_bootargs): Open console for reading too.
-
- * boot-start.c (saved_argv): New static variable.
- (diskfs_start_bootstrap): Take arg ARGV; store it in saved_argv.
- (diskfs_S_fsys_init): Construct a portarray and call _hurd_init.
- Or, if _hurd_ports is already allocated, call _hurd_proc_init.
- * diskfs.h (diskfs_start_bootstrap): Update prototype.
-
-Thu Oct 6 17:47:42 1994 Michael I Bushnell <mib@geech.gnu.ai.mit.edu>
-
- * boot-start.c (diskfs_S_fsys_init): Allocate a reference on
- authhandle before allowing the library to consume one.
-
-Wed Oct 5 13:00:46 1994 Michael I Bushnell <mib@geech.gnu.ai.mit.edu>
-
- * node-drop.c (diskfs_drop_node): Clear passive translator
- if we are releasing the inode.
-
-Thu Sep 29 18:12:31 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * boot-parse.c (diskfs_parse_bootargs): If we have a bootstrap
- port, talk to the CMU default pager on it, then clear it.
-
-Fri Sep 23 00:15:52 1994 Michael I Bushnell <mib@churchy.gnu.ai.mit.edu>
-
- * diskfs.h (diskfs_lost_hardrefs): Doc fix.
- (diskfs_try_dropping_softrefs): New declaration.
- (diskfs_nput): Always call diskfs_lost_hardrefs if the last
- hardref goes away; call diskfs_try_dropping_softrefs if the
- link count has vanished too.
- (diskfs_nrele): Likewise.
- (diskfs_nref): Lock node during call to diskfs_new_hardrefs.
-
-Thu Sep 22 21:20:40 1994 Michael I Bushnell <mib@churchy.gnu.ai.mit.edu>
-
- * diskfs.h (struct node): New member `istranslated'.
- (diskfs_node_translated): Deleted function.
- * dir-lookup.c (diskfs_S_dir_lookup): Use istranslated field
- instead of diskfs_node_translated.
- * file-get-trans.c (diskfs_S_file_get_translator): Likewise.
- * file-inv-trans.c (diskfs_S_file_invoke_translator): Likewise.
- * file-set-trans.c (diskfs_S_file_set_translator): Likewise.
- * fsys-getroot.c (diskfs_S_fsys_getroot): Likewise.
-
-Fri Sep 16 11:53:04 1994 Michael I Bushnell <mib@churchy.gnu.ai.mit.edu>
-
- * file-set-trans.c (diskfs_S_file_set_translator): Use new
- lock on translator fields; don't hold it and the NP lock
- simultaneously.
- * trans-destroy.c (diskfs_destroy_translator): Doc fix.
-
- * dir-lookup.c (diskfs_S_dir_lookup): Turn off *all* flags
- in call to getroot if we aren't the last component.
-
-Thu Sep 15 13:01:21 1994 Michael I Bushnell <mib@churchy.gnu.ai.mit.edu>
-
- * init-init.c (diskfs_init_diskfs): Restore commented-out
- initialization of diskfs_auth_server_port.
-
-Mon Sep 12 14:38:54 1994 Michael I Bushnell <mib@churchy.gnu.ai.mit.edu>
-
- * fsys-getroot.c (diskfs_S_fsys_getroot): Clear translator
- port if we get MIG_SERVER_DIED, as with MACH_SEND_INVALID_DEST.
-
-Sun Sep 11 23:30:13 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * dir-lookup.c (diskfs_S_dir_lookup): Copy PATHBUF into RETRYNAME
- properly when symlink target begins with a slash.
-
-Sat Sep 10 08:36:08 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * Makefile (OTHERSRCS): Add init-startup.c.
- * init-init.c (_diskfs_dotdot_file): Variable removed.
- (diskfs_init_diskfs): Take no args; return void.
- Don't do fsys_startup here.
- * init-startup.c (diskfs_startup_diskfs): New file, new function.
- Do fsys_startup here instead.
- * diskfs.h (diskfs_init_diskfs): Update prototype.
- (diskfs_startup_diskfs): Declare it.
-
- * dir-lookup.c (diskfs_S_dir_lookup): Use error_t for ERROR.
- Retry when fsys_getroot returns MIG_SERVER_DIED, as with
- MACH_SEND_INVALID_DEST.
-
-Fri Sep 9 13:04:36 1994 Michael I Bushnell <mib@churchy.gnu.ai.mit.edu>
-
- * dir-lookup.c (diskfs_S_dir_lookup) [EAGAIN]: Only copy
- into RETRYNAME if this isn't the last component.
-
- * fsys-getroot.c (diskfs_S_fsys_getroot): Set *RETRY
- and *RETRYNAME properly on normal return.
-
- * init-init.c (diskfs_init_diskfs): Don't attempt to continue
- if fsys_startup fails. Deallocate BOOTSTRAP after using it.
-
-Wed Sep 7 09:52:52 1994 Michael I Bushnell <mib@churchy.gnu.ai.mit.edu>
-
- * trans-start.c (diskfs_start_translator): Don't give write
- access to underlying node if it's not IFREG.
-
- * dir-lookup.c (diskfs_S_dir_lookup): When returning a port
- passed back from fsys_getroot, use MACH_MSG_TYPE_MOVE_SEND,
- not the local default of MAKE_SEND.
-
- * trans-start.c (diskfs_start_translator): Removed assert.
-
-Tue Sep 6 15:30:59 1994 Michael I Bushnell <mib@churchy.gnu.ai.mit.edu>
-
- * dir-lookup.c (diskfs_S_dir_lookup): Translator startup code
- rewritted to be more robust and use new locking protocol
- on translink structures.
- * trans-start.c (diskfs_start_translator): Don't pass LOCK arg
- to diskfs_start_translator. Unlock NP around call to
- diskfs_start_translator. Don't expect DIR to be deallocated.
-
-Thu Sep 1 12:28:03 1994 Michael I Bushnell <mib@geech.gnu.ai.mit.edu>
-
- * trans-start.c (diskfs_start_translator): Expect right
- on DIR and NPPORT to be consumed by fshelp_start_translator.
- * fsys-getroot.c (diskfs_S_fsys_getroot): Allocate additional
- send-right for DOTDOT to be consumed by diskfs_start_translator.
- Be careful to deallocate DOTDOT when appropriate.
- * dir-lookup.c (diskfs_S_dir_lookup): Create DIRFILE from
- DNP, not NP. Create local reference for dirfile to use
- in call to fsys_getroot.
-
- * boot-start.c (diskfs_start_bootstrap): Give the
- library values for current working and root directories.
-
- * trans-start.c (diskfs_start_translator): Fix and enable.
- * diskfs.h (diskfs_start_translator): Add new third arg to
- prototype.
- * dir-lookup.c (diskfs_S_dir_lookup): Provide third arg to
- diskfs_start_translator.
- * fsys-getroot.c (diskfs_S_fsys_getroot): Likewise.
-
-Wed Aug 31 12:04:51 1994 Michael I Bushnell <mib@geech.gnu.ai.mit.edu>
-
- * file-exec.c (diskfs_S_file_exec) [reauth]: Destroy REF after
- using it.
-
- * file-get-trans.c (diskfs_S_file_get_translator)
- [S_ISCHR || S_ISBLK]: Correct cast of second arg to vm_allocate.
-
- * Makefile (FSYSSRCS): Added fsys-readonly.c and fsys-syncfs.c.
- * fsys-readonly.c, fsys-syncfs.c: New files.
-
-Wed Aug 31 01:50:07 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * boot-parse.c (diskfs_parse_bootargs): Fix scanf format for
- bootstrap filesystem device name.
-
- * file-exec.c (diskfs_S_file_exec): For S_ISUID|S_ISGID, create
- new auth handle and reauthenticate passed ports properly.
-
-Tue Aug 30 13:44:29 1994 Michael I Bushnell <mib@geech.gnu.ai.mit.edu>
-
- * file-exec.c (diskfs_S_file_exec): Don't bother setting
- EXEC_NEWTASK for non-readable execs; it doesn't really work
- anyhow.
-
- * init-init.c: Call ports_get_right with the result of
- ports_allocate_port in call to fsys_startup.
-
- * trans-sync.c (diskfs_sync_translators): Use fsys_syncfs
- instead of old ugly method.
-
- * init-init.c: Include <hurd/fsys.h>.
-
- * boot-start.c (diskfs_start_bootstrap): Check to make sure return
- from fsys_getroot and dir_lookup is FS_RETRY_NORMAL with empty
- retry_name instead of old FS_RETRY_NONE.
- * dir-lookup.c (diskfs_S_dir_lookup): Initialize return values with
- FS_RETRY_NORMAL and empty retryname instead of old FS_RETRY_NONE.
-
- * Makefile (FSSRCS): Remove dir-pathtrans.c; add dir-lookup.c.
- * dir-lookup.c: Renamed from dir-pathtrans.c.
- * dir-pathtrans.c (diskfs_S_dir_lookup): Renamed from
- diskfs_S_dir_pathtrans.
- * boot-start.c (diskfs_start_bootstrap): Call dir_lookup instead
- of dir_pathtrans.
- * ifsock.c (diskfs_S_ifsock_getsockaddr): Call file_name_lookup
- instead of path_lookup.
-
-Mon Aug 29 12:51:42 1994 Michael I Bushnell <mib@geech.gnu.ai.mit.edu>
-
- * io-reauthenticate.c (diskfs_S_io_reauthenticate): Use new
- protocol for auth_server_authenticate.
-
-Fri Aug 26 12:49:09 1994 Michael I Bushnell <mib@geech.gnu.ai.mit.edu>
-
- * file-set-trans.c (diskfs_S_file_set_translator): Rename args;
- split flags arg into two. Interpret flags according to new
- scheme.
-
-Thu Aug 18 12:58:44 1994 Michael I Bushnell <mib@geech.gnu.ai.mit.edu>
-
- * boot-parse.c (diskfs_parse_bootargs): Print informative
- bootstrap message.
- * boot-start.c (diskfs_start_bootstrap): Likewise.
- (start_execserver): Likewise.
-
- * boot-start.c (diskfs_start_bootstrap): Only do `pausing'
- hack if RB_KDB was in bootstrap args.
- (start_execserver): Likewise.
-
- * io-select.c (diskfs_S_io_select): Add new `porttype' arg.
-
-Thu Aug 11 13:05:40 1994 Michael I Bushnell <mib@geech.gnu.ai.mit.edu>
-
- * dir-pathtrans.c (diskfs_S_dir_pathtrans): Set retry stuff
- correctly if there are more components after translator
- fsys_getroot.
-
-Sat Jul 23 02:25:54 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * Makefile (notify-MIGSFLAGS): New variable: -DSEQNOS.
-
- * ports-demuxer.c (ports_demuxer): Prepend diskfs_ to Hurd
- interface server functions.
-
-Fri Jul 22 10:54:23 1994 Michael I Bushnell <mib@geech.gnu.ai.mit.edu>
-
- * Makefile: Changed to use new scheme.
- * boot-start.c: Include "fsys_reply_U.h" instead of "fsys_reply.h".
- * dir-chg.c: Include "ourmsg_U.h" instead of "msg.h".
- * fsmutations.h SERVERPREFIX): Delete macro.
-
- * diskfs.h (struct thread_stuff, diskfs_catch_exception,
- diskfs_end_catch_exception): Moved here from diskfs_machdep.
- Delete inclusion of diskfs_machdep.
-
- * dir-pathtrans.c (diskfs_S_dir_pathtrans): Skip leading
- slashes instead of returning an error.
-
-Tue Jul 19 22:12:29 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
-
- * dir-pathtrans.c (diskfs_S_dir_pathtrans): Fix fsys_getroot call:
- MACH_MSG_TYPE_MOVE_SEND instead of MACH_PORT_RIGHT_MOVE_SEND.
-
-Tue Jul 19 18:37:52 1994 Michael I Bushnell (mib@churchy.gnu.ai.mit.edu)
-
- * boot-start.c (diskfs_start_bootstrap): Create root port
- before calling fsys_getroot on exec server. Pass root port
- as exec server's dotdot node.
- (diskfs_execboot_fsys_startup): Deleted dotdot args.
- * diskfs.h (diskfs_execboot_fsys_startup): Deleted dotdot args.
- * dir-pathtrans.c (diskfs_S_dir_pathtrans) [translator startup]:
- Set dirfile always, not just when invoking the passive translator.
- Pass dirfile to fsys_getroot. Clean up deallocate of dirfile.
- * file-inv-trans.c (diskfs_S_file_invoke_translator): Comment
- out code; this function should vanish.
- * priv.h (_diskfs_dotdot_file): Deleted variable.
- * fsys-getroot.c (diskfs_S_fsys_getroot): Use new arg `dotdot'
- in place of _diskfs_dotdot_file. Pass dotdot in call to
- fsys_getroot.
- * trans-sync.c (diskfs_sync_translators): Pass grunge as dotdot
- arg in call to fsys_getroot.
- * fsys-startup.c (diskfs_S_fsys_startup): Deleted dotdot args;
- don't pass them in calls to helper functions.
- * init-init.c (diskfs_init_diskfs): Don't expect dotdot arg
- from fsys_getroot; don't set _diskfs_dotdot_file.
-
-Mon Jul 18 15:24:30 1994 Michael I Bushnell (mib@churchy.gnu.ai.mit.edu)
-
- * file-inv-trans.c: New file.
- * Makefile (FSSRCS): Added file-inv-trans.c.
-
- * fsys-getroot.c (diskfs_S_fsys_getroot): Dereference
- returned_port in check for null.
- * dir-pathtrans.c (diskfs_S_dir_pathtrans): Likewise.
-
- * dir-pathtrans.c (diskfs_S_dir_pathtrans): After
- diskfs_start_translator, set var `control'.
-
- * fsys-getroot.c (diskfs_S_fsys_getroot): After getting
- MACH_SEND_INVALID_DEST from the translator, set error to zero
- so that the user's open completes normally. Do other fixes
- from Jul 7 that were made in dir-pathtrans.c for translator
- startup.
-
- * ports-idle.c (ports_notice_idle): New file.
- * Makefile (OTHERSRCS): Added ports-idle.c.
-
- * node-times.c (diskfs_set_node_times): Set old stat structure
- times until the header file gets changed.
-
- * ifsock.c (diskfs_S_ifsock_getsockaddr): Provide type argument
- in call to socket_fabricate_address.
-
-Fri Jul 15 12:00:38 1994 Michael I Bushnell (mib@churchy.gnu.ai.mit.edu)
-
- * dir-pathtrans.c (diskfs_S_dir_pathtrans): Use
- DIRCRED->po->dotdotport instead of diskfs_dotdot_file.
-
- * diskfs.h (diskfs_read_symlink_hook): New variable.
- * dir-pathtrans.c (diskfs_S_dir_pathtrans): Don't permit symlinks
- to be opened for reading or writing (just like other special file
- types). Try using diskfs_read_symlink_hook before reading
- from file data.
-
- * fsys-getroot.c (diskfs_S_fsys_getroot): Try using
- diskfs_read_symlink_hook before reading from file data.
- * file-get-trans.c (diskfs_S_file_get_translator): Likewise.
-
-Thu Jul 14 14:39:08 1994 Michael I Bushnell (mib@churchy.gnu.ai.mit.edu)
-
- * diskfs.h (diskfs_create_symlink_hook): New variable.
- (diskfs_truncate): Doc fix.
- * file-set-trans.c (diskfs_S_file_set_translator): Try
- diskfs_create_symlink_hook first, before writing ourselves.
- Return errors to user properly.
-
- * node-times.c (diskfs_set_node_times): Use new stat structures
- with struct timespec instead of old definitions.
-
-Wed Jul 13 14:26:37 1994 Michael I Bushnell (mib@churchy.gnu.ai.mit.edu)
-
- * shutdown.c (diskfs_shutdown): Check UNLINK bit first to avoid
- dumping translators if we end up returning an error.
-
- * ports-noports.c: New file.
- * ports-soft.c: New file.
- * diskfs.h (diskfs_shutdown_soft_ports): New declaration.
- * Makefile (OTHERSRCS): Added ports-noports.c and ports-soft.c.
-
- * diskfs.h (diskfs_init_diskfs): New arg `bootstrap'; add return
- value. Call fsys_getroot if bootstrap is set.
-
- * diskfs.h (diskfs_dotdot_file): Deleted variable.
- (struct peropen): New member `dotdotnode'.
- (diskfs_make_peropen): New arg DOTDOTPORT.
- * peropen-make.c (diskfs_make_peropen): Set PO->dotdotport;
- allocate reference if necessary.
- * priv.h (_diskfs_dotdot_file): New variable.
- * init-init.c (_diskfs_dotdot_file): New definition.
- * boot-start.c (diskfs_start_bootstrap): dotdot for created
- peropen to root should be null (we are *the* root directory in this
- case).
- (diskfs_S_exec_startup): Likewise.
- * dir-mkfile.c (diskfs_S_dir_mkfile): Inherit dotdot for
- new peropen from CRED->po.
- * file-exec.c (diskfs_S_file_exec): Likewise.
- * dir-pathtrans.c (diskfs_S_dir_pathtrans): Inherit dotdot for
- new peropens from DIRCRED->po.
- * fsys-getroot.c (diskfs_S_fsys_getroot): Set dotdot
- from _diskfs_dotdot_file.
-
- * diskfs.h (diskfs_control_port): Deleted variable.
- * priv.h (_diskfs_control_lock, _diskfs_ncontrol_ports): New vars.
- (_diskfs_control_clean): New declaration.
- * ports-clean.c (ports_cleanroutines[PT_CTL]): Use
- _diskfs_control_clean.
- * init-init.c (diskfs_init_diskfs): Don't create control port here.
- (_diskfs_control_lock, _diskfs_ncontrol_ports): New declarations.
- * file-getcontrol.c (diskfs_S_file_getcontrol): Always create
- a new control port structure.
-
- * io-write.c (diskfs_S_io_write): Honor O_FSYNC bit.
- * conch-set.c (ioserver_put_shared_data): Set do_sigio if
- user set O_FSYNC.
- * io-stubs.c (diskfs_S_io_sigio): Removed function.
- * io-sigio.c: New file.
- * Makefile (IOSRCS): Added io-sigio.c
-
- * io-write.c (diskfs_S_io_write): Eliminate pointless test for
- !err before _diskfs_rdwr_internal; only increment filepointer if
- there was no error.
-
- * priv.h (_diskfs_rdwr_internal): New arg NOTIME.
- * rdwr-internal.c (_diskfs_rdwr_internal): New arg NOTIME.
- * io-read.c (diskfs_S_io_read): Don't set atime if O_NOATIME is on.
- * dir-pathtrans.c (diskfs_S_dir_pathtrans): Don't allow non-owner
- to set O_NOATIME.
- * fsys-getroot.c (diskfs_S_fsys_getroot): Likewise.
-
- * priv.h (HONORED_STATE_MODES): Add O_NOATIME.
- (OPENONLY_STATE_MODES): New macro.
- * dir-pathtrans.c (diskfs_S_dir_pathtrans): Use
- OPENONLY_STATE_MODES to turn off appropriate bits.
- * fsys-getroot.c (diskfs_S_fsys_getroot): Likewise.
-
- * dir-pathtrans.c (diskfs_S_dir_pathtrans): At start, turn
- off all the bits not in O_HURD; we ignore all those and don't
- keep track of them in any way.
- * fsys-getroot.c (diskfs_S_fsys_getroot): Likewise.
-
- * file-get-trans.c (diskfs_S_file_get_translator): Return
- shortcircuited translators for IFCHR, IFBLK, IFIFO, and IFSOCK.
-
- * file-set-trans.c (diskfs_S_file_set_translator): In computing
- rdev, 377 should be *octal*, not hex.
-
- * dir-rename.c (diskfs_S_dir_rename): Deallocate received
- send-right for TOCRED any time we return success.
-
- * dir-link.c (diskfs_S_dir_link): Don't assume that NP is a
- non-directory before checking it.
-
- * boot-start.c (diskfs_start_bootstrap): New variable
- `initnamebuf' which is allocated and then not changed; free
- it rather than freeing `initname'.
-
-Mon Jul 11 18:16:25 1994 Michael I Bushnell (mib@churchy.gnu.ai.mit.edu)
-
- * dir-pathtrans.c (diskfs_S_dir_pathtrans): Symlinks to pathnames
- beginning with `/' sholud return FS_RERTY_MAGICAL (but the
- retry name is stils the same).
- * fsys-getroot.c (diskfs_S_fsys_getroot): Likewise.
-
-Fri Jul 8 13:34:25 1994 Michael I Bushnell (mib@churchy.gnu.ai.mit.edu)
-
- * dir-pathtrans.c (diskfs_S_dir_pathtrans): After getting
- MACH_SEND_INVALID_DEST from the translator, set error to zero
- so that the user's open completes normally.
- (diskfs_S_dir_pathtrans): Call mach_port_mod_refs correctly.
- (diskfs_S_dir_pathtrans): In call to fsys_getroot, turn off
- O_NOLINK for !lastcomp, not for lastcomp.
-
-Thu Jul 7 14:46:46 1994 Michael I Bushnell (mib@churchy.gnu.ai.mit.edu)
-
- * dir-pathtrans.c (diskfs_S_dir_pathtrans): Deal correctly
- with the sendright on the translator control port avoiding
- races while the node is unlocked.
-
- * dir-pathtrans.c (diskfs_S_dir_pathtrans): At translator
- lookup time, if there is an active translator, release the
- lock on DNP just like we do in the start-passive case. Also
- after fsys_getroot, release reference and clear DNP so that
- code at out: doesn't get it wrong.
- (diskfs_S_dir_pathtrans): Call fshelp_translator_drop instead
- of setting it to null ourselves.
- * trans-destroy.c (diskfs_destroy_translator): Likewise.
-
-Wed Jul 6 14:43:55 1994 Michael I Bushnell (mib@churchy.gnu.ai.mit.edu)
-
- * ports-demuxer.c (ports_demuxer): Only call ifsock_server
- if diskfs_shortcut_ifsock is set.
-
-Tue Jul 5 14:15:32 1994 Michael I Bushnell (mib@churchy.gnu.ai.mit.edu)
-
- * Makefile (TAGSHDRS): New variable.
-
-Thu Jun 30 11:35:43 1994 Michael I Bushnell (mib@churchy.gnu.ai.mit.edu)
-
- * fsmutations.h (IFSOCK_IMPORTS): New macro.
-
- * ports-demuxer.c (ports_demuxer): Call ifsock_server.
-
-Wed Jun 29 17:07:17 1994 Michael I Bushnell (mib@geech.gnu.ai.mit.edu)
-
- * diskfs.h (struct node): New member `sockaddr'.
- * node-make.c (diskfs_make_node): Initialize NP->sockaddr.
- * node-drop.c (diskfs_drop_node): Deallocate NP->sockaddr
- if it's been set.
- * ifsock.c: New file.
- * Makefile (IFSOCKSRCS): New variable.
- (SRCS): Added $(IFSOCKSRCS).
- (MIGSTUBS): Added ifsockServer.o.
- (ifsock_S.h ifsockServer.c): New rule.
- (ifsock_S.h): Depended on by IFSOCKSRCS generated objects.
-
- * dir-pathtrans.c (diskfs_S_dir_pathtrans): Detect the case
- where the server has died by looking for MACH_SEND_INVALID_DEST
- as a return from fsys_getroot. Rearrange lock/unlock and
- reference counting of NP and DNP because we may need them back
- if we have to repeat the call.
-
- * fsys-getroot.c (diskfs_S_fsys_getroot): Likewise.
-
-Fri Jun 24 15:52:52 1994 Michael I Bushnell (mib@churchy.gnu.ai.mit.edu)
-
- * dir-link.c (diskfs_S_dir_link): The port_info struct member
- is `port_right', not `port'.
-
-Tue Jun 21 13:25:15 1994 Michael I Bushnell (mib@churchy.gnu.ai.mit.edu)
-
- * dir-link.c (diskfs_S_dir_link): Deallocate received send
- right for DIRCRED anytime we return success.
-
- * dir-chg.c (diskfs_S_dir_notice_changes): New var `np'. Return
- ENOTDIR if call is made on a non-directory.
-
-Mon Jun 20 16:40:37 1994 Michael I Bushnell (mib@churchy.gnu.ai.mit.edu)
-
- * node-drop.c (diskfs_drop_node): Free structures holding
- dirmod requests.
- * node-make.c (diskfs_make_node): Initialize NP->dirmod_reqs
- to zero.
-
-Fri Jun 17 13:16:18 1994 Michael I Bushnell (mib@geech.gnu.ai.mit.edu)
-
- * fsys-getroot.c (diskfs_S_fsys_getroot): Initialize ERROR.
-
-Fri Jun 17 11:21:25 1994 Roland McGrath (roland@geech.gnu.ai.mit.edu)
-
- * trans-sync.c: Include <fcntl.h>.
-
- * Makefile (boot-start.o): Depend on fsys_reply.h.
-
-Thu Jun 16 11:31:46 1994 Michael I Bushnell (mib@geech.gnu.ai.mit.edu)
-
- * Makefile (msg.h, msgUser.c): New rules.
- (MIGSTUBS): Added msgUser.o.
- (dir-chg.o): Depends on msg.h.
- * dir-chg.c: Include "msg.h".
-
- * diskfs.h (diskfs_start_translator): Second arg DIR is now
- file_t. Changed locking rules.
- * dir-pathtrans.c (diskfs_S_dir_pathtrans): Call
- diskfs_start_translator the new way; clean up lock releases.
-
- * fshelp-dropnode.c: Deleted file.
- * fshelp-getnode.c: Deleted file.
- * Makefile (OTHERSRCS): Removed fshelp-dropnode.c and fshelp-getnode.c.
-
- * boot-start.c (diskfs_start_bootstrap): Use new fsys_getroot
- interface.
-
- * fsys-getroot.c: Include <fcntl.h> for O_ bits. Include
- <hurd/fsys.h> for fsys_startup prototype.
-
- * boot-start.c (diskfs_start_bootstrap, diskfs_S_exec_startup):
- Delete obsolete assignments to INIT_PORT_LOGINCOLL.
-
- * diskfs.h (struct node) [dirmod_reqs]: New member.
- (struct dirmod): New type.
- (diskfs_dirrewrite, diskfs_dirremove, diskfs_direnter): Doc fix.
- (diskfs_notice_dirchange): New prototype.
- * dir-chg.c (diskfs_S_dir_notice_changes): Implement call.
- (diskfs_notice_dirchange): New function.
-
- * diskfs.h (diskfs_get_directs): Doc fix.
-
- * file-access.c (diskfs_S_file_check_access): Renamed from
- diskfs_S_file_access. Return allowable operations in *TYPE
- rather than checking those explicitly asked for. Use O_ bits
- instead of _OK bits. Include <fcntl.h>.
-
-Wed Jun 15 21:26:14 1994 Michael I Bushnell (mib@churchy.gnu.ai.mit.edu)
-
- * dir-pathtrans.c (diskfs_S_dir_pathtrans): Require lookup of
- empty pathname to fail if not made on a directory.
-
- * fsys-getroot.c (diskfs_S_fsys_getroot): Rewritten to implement
- the new fsys_getroot interface.
-
- * dir-pathtrans.c (diskfs_S_dir_pathtrans): Don't implement
- O_TRUNC here anymore.
-
- * dir-pathtrans.c (diskfs_S_dir_pathtrans): Use the new
- fsys_getroot interface for translator startup.
-
- * io-modes-set.c (diskfs_S_io_set_all_openmodes): Only let
- the user set the user-setable bits.
-
- * file-get-transcntl.c (diskfs_S_file_get_translator_cntl): New
- arg CTLTYPE; set appropriately.
-
-Wed Jun 15 12:18:16 1994 Michael I Bushnell (mib@geech.gnu.ai.mit.edu)
-
- * file-chg.c (diskfs_S_file_notice_changes): Declare return type.
-
- * file-access.c: New file.
- * Makefile (FSSRCS): Added file-access.c.
-
-Tue Jun 14 14:06:36 1994 Michael I Bushnell (mib@geech.gnu.ai.mit.edu)
-
- * diskfs.h (diskfs_get_dirents): New declaration.
- * dir-readdir.c (diskfs_S_dir_readdir): Implement new
- interface using diskfs_get_directs.
-
- * dir-chg.c, file-chg.c: New files.
- * Makefile (FSSRCS): Added dir-chg.c and file-chg.c.
-
-Thu Jun 9 13:39:25 1994 Michael I Bushnell (mib@churchy.gnu.ai.mit.edu)
-
- * dir-pathtrans.c (diskfs_S_dir_pathtrans): Release lock on NP
- during call to fsys_getroot; stash control port and uid info in
- new local variables. Reacquire lock before return (because
- common code at label OUT expects NP to be locked).
-
-Mon Jun 6 18:54:50 1994 Michael I Bushnell (mib@churchy.gnu.ai.mit.edu)
-
- * dir-pathtrans.c (diskfs_S_dir_pathtrans): In translator
- startup check, test O_NOTRANS in flags correctly.
-
- * dir-renamed.c (diskfs_rename_dir): Don't call diskfs_nrele on
- TMPNP after SPEC_DOTDOT calls; the spec says that SPEC_DOTDOT
- with RENAME does not allocate a new reference.
-
-Sun Jun 5 05:51:11 1994 Roland McGrath (roland@geech.gnu.ai.mit.edu)
-
- * io-reauthenticate.c (diskfs_S_io_reauthenticate): Fix
- initialization of {GEN,AUX}_{UIDS,GIDS}.
-
-Fri Jun 3 18:19:22 1994 Michael I Bushnell (mib@churchy.gnu.ai.mit.edu)
-
- * file-set-trans.c (diskfs_S_file_set_translator): Use
- fshelp_set_control instead of doing it ourselves.
-
-Thu Jun 2 12:00:51 1994 Michael I Bushnell (mib@churchy.gnu.ai.mit.edu)
-
- * diskfs.h (struct node): New member `light_references'.
- (diskfs_nref, diskfs_nput, diskfs_nrele, diskfs_make_node): Doc fix.
- (diskfs_nref_light, diskfs_nput_light, diskfs_nrele_light):
- New functions.
- (diskfs_nrele, diskfs_nput): Only call diskfs_drop_node if both
- NP->references *and* NP->light_references are zero.
- (diskfs_new_hardrefs, diskfs_lost_hardrefs): New declarations.
- (diskfs_nref): Call diskfs_new_hardrefs when appropriate.
- (diskfs_nput, diskfs_nrele): Call diskfs_lost_hardrefs when
- appropriate.
-
- * node-make.c (diskfs_make_node): Initialize NP->light_references.
- Doc fix.
-
-Wed Jun 1 18:24:11 1994 Michael I Bushnell (mib@churchy.gnu.ai.mit.edu)
-
- * dir-pathtrans.c (diskfs_S_dir_pathtrans): Skip over multiple
- slashes in pathnames by incrementing NEXTNAME after setting it.
- Also, if after we do this we discover that there is no last
- component, then set LASTCOMP and clear NEXTNAME and CREATE
- entirely, and set (new variable) MUSTBEDIR. Then check for
- MUSTBEDIR after the node has been fetched. Make var TYPE
- function-global and set it always, not just when NEWNODE is unset.
-
-Fri May 27 08:47:46 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
-
- * boot-start.c (diskfs_S_exec_exec, diskfs_S_exec_setexecdata):
- Add missing args.
- (diskfs_S_exec_startup): Don't point *ARGVP to EXEC_DATA local
- storage. Instead, copy EXEC_DATA to *ARGVP if *ARGVLEN allows;
- otherwise vm_allocate new space and copy into there.
-
-Thu May 26 15:33:57 1994 Michael I Bushnell (mib@churchy.gnu.ai.mit.edu)
-
- * diskfs.h (diskfs_nrele): Acquire lock if we are releasing
- the last reference.
-
- * node-drop.c (diskfs_drop_node): If we are truncating, then
- go back to normal user state and do the truncate; the next
- time through we will do the dealloc for real.
- Semantics change: now this routine is responsible for
- unlocking diskfs_node_refcnt_lock. All callers changed.
-
-Wed May 25 20:34:17 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
-
- * io-write.c (diskfs_S_io_write): Don't check for *AMT < 0; AMT is
- an out-only parameter.
-
-Wed May 25 12:23:25 1994 Michael I Bushnell (mib@churchy.gnu.ai.mit.edu)
-
- * ports-consts.c (ports_use_multiple_threads): Deleted definition.
- * init-first.c (diskfs_spawn_first_thread): Fork
- ports_manage_port_operations_multithread instead of
- ports_maange_port_operations.
- * init-loop.c (diskfs_main_request_loop): Likewise.
-
- * dir-pathtrans.c (diskfs_S_dir_pathtrans): Reference node in
- lookup of empty path case so that common code at the out: label
- doesn't free an extra one.
-
-Mon May 23 23:13:51 1994 Michael I Bushnell (mib@churchy.gnu.ai.mit.edu)
-
- * boot-start.c (diskfs_S_fsys_init): Start exec_init after
- proc_child.
-
-Thu May 19 12:48:53 1994 Michael I Bushnell (mib@geech.gnu.ai.mit.edu)
-
- * io-reauthenticate.c (diskfs_S_io_reauthenticate): Unlock
- node after calling diskfs_finish_protid.
-
-Thu May 12 14:23:29 1994 Michael I Bushnell (mib@geech.gnu.ai.mit.edu)
-
- * Makefile (clean): Add fsys_reply.h and *User.c.
-
-Thu May 12 03:45:38 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
-
- * Makefile (fsys_reply.h fsys_replyUser.c): New rule.
- (MIGSTUBS): Add fsys_replyUser.o.
- * boot-start.c: Include fsys_reply.h.
- (diskfs_S_fsys_init): Take new reply port args.
- Send reply msg as soon as verified, before doing anything.
-
-Mon May 9 16:58:24 1994 Michael I Bushnell (mib@geech.gnu.ai.mit.edu)
-
- * diskfs.h (diskfs_init_completed): New function declaration.
- * boot-start.c (diskfs_S_fsys_init): Don't call _hurd_proc_init.
- Do call diskfs_init_completed.
-
-Thu May 5 13:04:43 1994 Michael I Bushnell (mib@geech.gnu.ai.mit.edu)
-
- * dir-pathtrans.c (diskfs_S_dir_pathtrans): Behave properly
- if nextname is null. Copy nextname to the end of the symlink
- target rather than vice versa. Don't punt to the caller before
- doing the append.
- (diskfs_S_dir_pathtrans): O_NOTRANS should prevent symlink
- interpretation.
- (diskfs_S_dir_pathtrans): If a symlink traversal was the last
- component, then clear CREATE (symlinks to nothing don't honor
- O_CREAT) and clear LASTCOMP (because it isn't true any longer).
-
- * dir-pathtrans.c (diskfs_S_dir_pathtrans): Fix mangled check
- for O_NOLINK.
- (diskfs_S_dir_pathtrans): Repair furtherly mangled check for
- O_NOLINK.
-
- * conch-set.c (ioserver_put_shared_data): Set
- optimal_transfer_size from the same thing we return in stat.
-
- * io-async.c (diskfs_S_io_async): Just return EOPNOTSUPP without
- doing anything more at all.
-
-Thu May 5 06:32:10 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
-
- * io-prenotify.c (diskfs_S_io_prenotify): Make START and END args
- type vm_offset_t.
-
- * io-map-cntl.c (diskfs_S_io_map_cntl): Take 3rd result arg
- for msg type of *CTLOBJ; set it to copy-send.
-
- * io-async.c (diskfs_S_io_async): Take 3rd result arg for msg type
- of *IDPORT; set it to copy-send. Return 0 instead of EOPNOTSUPP;
- should not be deallocating NOTIFY if returning an error.
-
- * io-async-icky.c (diskfs_S_io_get_icky_async_id): Take 3rd result arg
- for msg type of *IDPORT; set it to copy-send.
-
- * conch-set.c (ioserver_put_shared_data): Temporarily #if 0
- setting of optimal_transfer_size from bogus undeclared variable.
-
- * protid-make.c: Include <string.h> to get bcopy declared.
-
- * {file,dir,io,fsys}-*.c: Changed return type of all RPC server
- functions to kern_return_t. error_t is not compatible with the
- declarations in the mig-generated header files.
-
- * Makefile: Change uses of $(headers) to $(includedir).
-
- * file-exec.c (diskfs_S_file_exec): Fix msg type arg in exec_exec call.
-
- * dir-pathtrans.c (diskfs_S_dir_pathtrans): Add missing close paren.
-
- * boot-start.c (diskfs_start_bootstrap): Pass msg type arg for
- FILE arg to exec_exec.
- (diskfs_S_fsys_getpriv): Change return type to kern_return_t.
- error_t is not compatible with the declarations in the
- mig-generated header files.
- (diskfs_S_fsys_init): Likewise.
- (exec_stack_base, exec_stack_size): New variables.
- (diskfs_S_exec_startup): Use those for stack values in reply.
- (start_execserver): Pass them to mach_setup_thread to be initialized.
-
-Mon May 2 16:32:22 1994 Michael I Bushnell (mib@geech.gnu.ai.mit.edu)
-
- * dir-pathtrans.c: Test for O_NOLINK flag was mangled.
-
-Fri Apr 29 16:44:08 1994 Michael I Bushnell (mib@churchy.gnu.ai.mit.edu)
-
- * io-stubs.c (diskfs_S_io_readnotify): New function.
-
- * conch-set.c (ioserver_put_shared_data): Set new fields
- optimal_transfer_size (to sblock->fs_bsize) and
- use_readnotify_size (to zero).
-
- * file-exec.c (diskfs_S_file_exec): Change call to exec_exec in
- accord with interface change in exec.defs.
-
-Mon Feb 14 11:26:26 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
-
- * boot-start.c: #include <hurd.h>.
- (start_execserver): Call _hurd_setup_thread in place of start_thread.
diff --git a/libdiskfs/boot-start.c b/libdiskfs/boot-start.c
index ad3cf1a4..e73e4d37 100644
--- a/libdiskfs/boot-start.c
+++ b/libdiskfs/boot-start.c
@@ -1,5 +1,5 @@
/*
- Copyright (C) 1993,94,95,96,97,98,99,2000,01,02
+ Copyright (C) 1993,94,95,96,97,98,99,2000,01,02,10
Free Software Foundation, Inc.
This file is part of the GNU Hurd.
@@ -194,6 +194,9 @@ diskfs_start_bootstrap ()
diskfs_exec_ctl = MACH_PORT_NULL; /* Not used after this. */
}
+ /* Cache the exec server port for file_exec to use. */
+ _hurd_port_set (&_diskfs_exec_portcell, diskfs_exec);
+
if (_diskfs_boot_command)
{
/* We have a boot command line to run instead of init. */
@@ -276,9 +279,6 @@ diskfs_start_bootstrap ()
mach_port_deallocate (mach_task_self (), startup_pt);
mach_port_deallocate (mach_task_self (), bootpt);
assert_perror (err);
-
- /* Cache the exec server port for file_exec to use. */
- _hurd_port_set (&_diskfs_exec_portcell, diskfs_exec);
}
/* We look like an execserver to the execserver itself; it makes this
diff --git a/libdiskfs/dir-lookup.c b/libdiskfs/dir-lookup.c
index 56c9587e..7e092908 100644
--- a/libdiskfs/dir-lookup.c
+++ b/libdiskfs/dir-lookup.c
@@ -1,6 +1,6 @@
/* libdiskfs implementation of fs.defs:dir_lookup
- Copyright (C) 1992,93,94,95,96,97,98,99,2000,01,02
- Free Software Foundation, Inc.
+ Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
+ 2002, 2008 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
@@ -53,8 +53,8 @@ diskfs_S_dir_lookup (struct protid *dircred,
int mustbedir = 0;
size_t amt;
int type;
- struct protid *newpi;
- struct peropen *newpo;
+ struct protid *newpi = 0;
+ struct peropen *newpo = 0;
if (!dircred)
return EOPNOTSUPP;
@@ -257,8 +257,8 @@ diskfs_S_dir_lookup (struct protid *dircred,
if (! error)
{
error = diskfs_create_protid (newpo, user, &newpi);
- if (error)
- diskfs_release_peropen (newpo);
+ if (! error)
+ newpo = 0;
}
iohelp_free_iouser (user);
@@ -269,6 +269,7 @@ diskfs_S_dir_lookup (struct protid *dircred,
dirport = ports_get_send_right (newpi);
ports_port_deref (newpi);
+ newpi = 0;
if (np != dnp)
mutex_unlock (&dnp->lock);
@@ -460,28 +461,24 @@ diskfs_S_dir_lookup (struct protid *dircred,
dircred->po, &newpo);
if (! error)
- {
- error = diskfs_create_protid (newpo, dircred->user, &newpi);
- if (error)
- diskfs_release_peropen (newpo);
- }
+ error = diskfs_create_protid (newpo, dircred->user, &newpi);
if (! error)
{
+ newpo = 0;
if (flags & O_EXLOCK)
error = fshelp_acquire_lock (&np->userlock, &newpi->po->lock_status,
&np->lock, LOCK_EX);
else if (flags & O_SHLOCK)
error = fshelp_acquire_lock (&np->userlock, &newpi->po->lock_status,
&np->lock, LOCK_SH);
- if (error)
- ports_port_deref (newpi); /* Get rid of NEWPI. */
}
if (! error)
{
*returned_port = ports_get_right (newpi);
ports_port_deref (newpi);
+ newpi = 0;
}
out:
@@ -495,5 +492,10 @@ diskfs_S_dir_lookup (struct protid *dircred,
if (dnp)
diskfs_nput (dnp);
+ if (newpi)
+ ports_port_deref (newpi);
+ if (newpo)
+ diskfs_release_peropen (newpo);
+
return error;
}
diff --git a/libdiskfs/dir-rename.c b/libdiskfs/dir-rename.c
index 6fc7e0f5..867e395d 100644
--- a/libdiskfs/dir-rename.c
+++ b/libdiskfs/dir-rename.c
@@ -1,5 +1,7 @@
/* libdiskfs implementation of fs.defs: dir_rename
- Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997 Free Software Foundation
+
+ Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 2007
+ Free Software Foundation
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
@@ -17,6 +19,7 @@
#include "priv.h"
#include "fs_S.h"
+#include <string.h>
/* To avoid races in checkpath, and to prevent a directory from being
simultaneously renamed by two processes, we serialize all renames of
@@ -42,6 +45,10 @@ diskfs_S_dir_rename (struct protid *fromcred,
if (! tocred)
return EXDEV;
+ if (!strcmp (fromname, ".") || !strcmp (fromname, "..")
+ || !strcmp (toname, ".") || !strcmp (toname, ".."))
+ return EINVAL;
+
if (tocred->po->shadow_root != fromcred->po->shadow_root)
/* Same translator, but in different shadow trees. */
return EXDEV;
@@ -138,6 +145,7 @@ diskfs_S_dir_rename (struct protid *fromcred,
{
diskfs_drop_dirstat (tdp, ds);
diskfs_nrele (fnp);
+ diskfs_nput (tnp);
mutex_unlock (&tdp->lock);
return EISDIR;
}
@@ -149,6 +157,8 @@ diskfs_S_dir_rename (struct protid *fromcred,
{
diskfs_drop_dirstat (tdp, ds);
diskfs_nput (fnp);
+ if (tnp)
+ diskfs_nput (tnp);
mutex_unlock (&tdp->lock);
return EMLINK;
}
diff --git a/libdiskfs/dir-renamed.c b/libdiskfs/dir-renamed.c
index ce8f4153..79381b2c 100644
--- a/libdiskfs/dir-renamed.c
+++ b/libdiskfs/dir-renamed.c
@@ -32,7 +32,6 @@ checkpath(struct node *source,
error_t err;
struct node *np;
- np = target;
for (np = target, err = 0;
/* nothing */;
/* This special lookup does a diskfs_nput on its first argument
diff --git a/libdiskfs/diskfs.h b/libdiskfs/diskfs.h
index 70ce1e3f..9a61964c 100644
--- a/libdiskfs/diskfs.h
+++ b/libdiskfs/diskfs.h
@@ -1,5 +1,7 @@
/* Definitions for fileserver helper functions
- Copyright (C) 1994,95,96,97,98,99,2001,02 Free Software Foundation, Inc.
+
+ Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2002, 2007, 2008,
+ 2009 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
@@ -79,7 +81,7 @@ struct node
/* Stat has been modified if one of the following four fields
is nonzero. Also, if one of the dn_set_?time fields is nonzero,
- the appropriate dn_stat.st_?time field needs to be updated. */
+ the appropriate dn_stat.st_?tim field needs to be updated. */
int dn_set_ctime;
int dn_set_atime;
int dn_set_mtime;
@@ -715,7 +717,7 @@ struct node *diskfs_make_node (struct disknode *dn);
This function is a wrapper for diskfs_lookup_hard.
*/
error_t diskfs_lookup (struct node *dp,
- char *name, enum lookup_type type,
+ const char *name, enum lookup_type type,
struct node **np, struct dirstat *ds,
struct protid *cred);
@@ -864,7 +866,11 @@ error_t diskfs_clear_directory (struct node *dp, struct node *pdp,
error_t
diskfs_init_dir (struct node *dp, struct node *pdp, struct protid *cred);
-/* If NP->dn_set_ctime is set, then modify NP->dn_stat.st_ctime
+/* If disk is not readonly and the noatime option is not enabled, set
+ NP->dn_set_atime. */
+void diskfs_set_node_atime (struct node *np);
+
+/* If NP->dn_set_ctime is set, then modify NP->dn_stat.st_ctim
appropriately; do the analogous operation for atime and mtime as well. */
void diskfs_set_node_times (struct node *np);
diff --git a/libdiskfs/file-utimes.c b/libdiskfs/file-utimes.c
index b87aa18e..39fac504 100644
--- a/libdiskfs/file-utimes.c
+++ b/libdiskfs/file-utimes.c
@@ -32,7 +32,8 @@ diskfs_S_file_utimes (struct protid *cred,
np->dn_set_atime = 1;
else
{
- np->dn_stat.st_atime = atime.seconds;
+ np->dn_stat.st_atim.tv_sec = atime.seconds;
+ np->dn_stat.st_atim.tv_nsec = atime.microseconds * 1000;
np->dn_set_atime = 0;
}
@@ -40,7 +41,8 @@ diskfs_S_file_utimes (struct protid *cred,
np->dn_set_mtime = 1;
else
{
- np->dn_stat.st_mtime = mtime.seconds;
+ np->dn_stat.st_mtim.tv_sec = mtime.seconds;
+ np->dn_stat.st_mtim.tv_nsec = mtime.microseconds * 1000;
np->dn_set_mtime = 0;
}
diff --git a/libdiskfs/fsys-getroot.c b/libdiskfs/fsys-getroot.c
index 54ba0a58..e083032e 100644
--- a/libdiskfs/fsys-getroot.c
+++ b/libdiskfs/fsys-getroot.c
@@ -186,10 +186,9 @@ diskfs_S_fsys_getroot (fsys_t controlport,
diskfs_release_peropen (newpo);
}
- mach_port_deallocate (mach_task_self (), dotdot);
-
if (! error)
{
+ mach_port_deallocate (mach_task_self (), dotdot);
*retry = FS_RETRY_NORMAL;
*retryname = '\0';
*returned_port = ports_get_right (newpi);
diff --git a/libdiskfs/io-pathconf.c b/libdiskfs/io-pathconf.c
index b851f9b1..38e277c3 100644
--- a/libdiskfs/io-pathconf.c
+++ b/libdiskfs/io-pathconf.c
@@ -41,6 +41,7 @@ diskfs_S_io_pathconf (struct protid *cred,
case _PC_PIPE_BUF:
case _PC_VDISABLE:
case _PC_SOCK_MAXBUF:
+ case _PC_PATH_MAX:
*value = -1;
break;
diff --git a/libdiskfs/io-reauthenticate.c b/libdiskfs/io-reauthenticate.c
index fd427e20..3c5da52d 100644
--- a/libdiskfs/io-reauthenticate.c
+++ b/libdiskfs/io-reauthenticate.c
@@ -53,9 +53,9 @@ diskfs_S_io_reauthenticate (struct protid *cred,
{
diskfs_finish_protid (newcred, user);
iohelp_free_iouser (user);
+ mach_port_deallocate (mach_task_self (), rend_port);
}
- mach_port_deallocate (mach_task_self (), rend_port);
mach_port_deallocate (mach_task_self (), newright);
mutex_unlock (&cred->po->np->lock);
diff --git a/libdiskfs/lookup.c b/libdiskfs/lookup.c
index d81a053e..1f2a2588 100644
--- a/libdiskfs/lookup.c
+++ b/libdiskfs/lookup.c
@@ -82,7 +82,7 @@ static spin_lock_t cm_lock = SPIN_LOCK_INITIALIZER;
This function is a wrapper for diskfs_lookup_hard. */
error_t
-diskfs_lookup (struct node *dp, char *name, enum lookup_type type,
+diskfs_lookup (struct node *dp, const char *name, enum lookup_type type,
struct node **np, struct dirstat *ds, struct protid *cred)
{
error_t err;
diff --git a/libdiskfs/node-times.c b/libdiskfs/node-times.c
index fa3a20a7..67f0142e 100644
--- a/libdiskfs/node-times.c
+++ b/libdiskfs/node-times.c
@@ -1,5 +1,7 @@
-/* Process st_?time updates marked for a diskfs node.
- Copyright (C) 1994,96,99,2000 Free Software Foundation, Inc.
+/* Process st_?tim updates marked for a diskfs node.
+
+ Copyright (C) 1994, 1996, 1999, 2000, 2007, 2009 Free Software Foundation,
+ Inc.
This file is part of the GNU Hurd.
@@ -22,7 +24,16 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#include "priv.h"
#include <maptime.h>
-/* If NP->dn_set_ctime is set, then modify NP->dn_stat.st_ctime
+/* If disk is not readonly and the noatime option is not enabled, set
+ NP->dn_set_atime. */
+void
+diskfs_set_node_atime (struct node *np)
+{
+ if (!_diskfs_noatime && !diskfs_check_readonly ())
+ np->dn_set_atime = 1;
+}
+
+/* If NP->dn_set_ctime is set, then modify NP->dn_stat.st_ctim
appropriately; do the analogous operation for atime and mtime as well. */
void
diskfs_set_node_times (struct node *np)
@@ -41,37 +52,22 @@ diskfs_set_node_times (struct node *np)
the update will happen at the next call. */
if (np->dn_set_mtime)
{
-#ifdef notyet
- np->dn_stat.st_mtimespec.ts_sec = t.tv_sec;
- np->dn_stat.st_mtimespec.ts_nsec = t.tv_usec * 1000;
-#else
- np->dn_stat.st_mtime = t.tv_sec;
- np->dn_stat.st_mtime_usec = t.tv_usec;
-#endif
+ np->dn_stat.st_mtim.tv_sec = t.tv_sec;
+ np->dn_stat.st_mtim.tv_nsec = t.tv_usec * 1000;
np->dn_stat_dirty = 1;
np->dn_set_mtime = 0;
}
if (np->dn_set_atime)
{
-#ifdef notyet
- np->dn_stat.st_atimespec.ts_sec = t.tv_sec;
- np->dn_stat.st_atimespec.ts_nsec = t.tv_usec * 1000;
-#else
- np->dn_stat.st_atime = t.tv_sec;
- np->dn_stat.st_atime_usec = t.tv_usec;
-#endif
+ np->dn_stat.st_atim.tv_sec = t.tv_sec;
+ np->dn_stat.st_atim.tv_nsec = t.tv_usec * 1000;
np->dn_stat_dirty = 1;
np->dn_set_atime = 0;
}
if (np->dn_set_ctime)
{
-#ifdef notyet
- np->dn_stat.st_ctimespec.ts_sec = t.tv_sec;
- np->dn_stat.st_ctimespec.ts_nsec = t.tv_usec * 1000;
-#else
- np->dn_stat.st_ctime = t.tv_sec;
- np->dn_stat.st_ctime_usec = t.tv_usec;
-#endif
+ np->dn_stat.st_ctim.tv_sec = t.tv_sec;
+ np->dn_stat.st_ctim.tv_nsec = t.tv_usec * 1000;
np->dn_stat_dirty = 1;
np->dn_set_ctime = 0;
}
diff --git a/libdiskfs/priv.h b/libdiskfs/priv.h
index de8c747a..07464d56 100644
--- a/libdiskfs/priv.h
+++ b/libdiskfs/priv.h
@@ -1,5 +1,7 @@
/* Private declarations for fileserver library
- Copyright (C) 1994,95,96,97,98,99,2001,2006 Free Software Foundation, Inc.
+
+ Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2006, 2009 Free
+ Software Foundation, Inc.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
@@ -33,7 +35,7 @@
/* These inhibit setuid or exec. */
extern int _diskfs_nosuid, _diskfs_noexec;
-/* This relaxes the requirement to set `st_atime'. */
+/* This relaxes the requirement to set `st_atim'. */
extern int _diskfs_noatime;
/* This enables SysV style group behaviour. New nodes inherit the GID
diff --git a/libfshelp/ChangeLog b/libfshelp/ChangeLog
deleted file mode 100644
index b646c06d..00000000
--- a/libfshelp/ChangeLog
+++ /dev/null
@@ -1,648 +0,0 @@
-2006-06-28 Thomas Schwinge <tschwinge@gnu.org>
-
- * Makefile (HURDLIBS): Add `iohelp' and `ports'.
-
-2004-02-10 Roland McGrath <roland@frob.com>
-
- * start-translator-long.c (service_fsys_startup): Move mach_msg_type_t
- const variables inside the function, make them auto so they are
- optimized away to integer constants.
- Use a union instead of casts to do efficient type checking.
-
-2002-06-26 Marcus Brinkmann <marcus@gnu.org>
-
- * lock-acquire.c (fshelp_acquire_lock): Also wait for exclusive
- locks which might have been acquired while we were waiting for
- shared locks to finish.
-
-2002-06-07 Roland McGrath <roland@frob.com>
-
- * fshelp.h: Use io_statbuf_t in place of struct stat throughout.
- (fshelp_get_identity): ino_t -> ino64_t
-
-2002-05-10 Roland McGrath <roland@frob.com>
-
- * exec-reauth.c (fshelp_exec_reauth): Always set *SECURE if nonnull,
- as the comment says we do.
-
-2002-05-07 Roland McGrath <roland@frob.com>
-
- * fetch-root.c (fshelp_fetch_root): int -> size_t
- * delegate.c (fshelp_delegate_translation): Likewise.
-
-2002-03-05 Marcus Brinkmann <marcus@gnu.org>
-
- * fshelp.h: Refer to dir_lookup, not dir_pathtrans, in comment.
- Reported by James A Morrison <ja2morri@student.math.uwaterloo.ca>.
-
-2002-01-02 Roland McGrath <roland@frob.com>
-
- * start-translator-long.c (fshelp_start_translator_long)
- [KERN_INVALID_LEDGER]: Pass extra args to task_create for OSF variant.
-
-2001-06-21 Neal H Walfield <neal@cs.uml.edu>
-
- * fshelp.h (fshelp_iscontroller): Declare new function.
- * perms-iscontroller.c: New file.
- * Makefile (SRCS): Add it.
-
-2001-01-17 Neal H Walfield <neal@cs.uml.edu>
-
- * fshelp.h: Add two new parameters to fshelp_open_fn_t:
- a port to the new task and a cookie.
- Add a new parameter, cookie, to fshelp_start_translator and
- fshelp_start_translator_long that will be passed to
- fshelp_open_fn_t.
-
- * fetch-root.c (fshelp_fetch_root): Conform to new
- fshelp_start_translator_long semantics.
- * start-translator-long.c (service_fsys_startup): Likewise.
- (fshelp_start_translator_long): Likewise.
- * start-translator.c (fshelp_start_translator): Likewise.
-
-2000-03-20 Roland McGrath <roland@baalperazim.frob.com>
-
- * delegate.c (fshelp_delegate_translation): Add const to arg type.
- * fshelp.h: Fix decl.
-
-2000-03-17 Thomas Bushnell, BSG <tb@mit.edu>
-
- * fetch-root.c (fshelp_fetch_root): Don't use MAKE_SEND in Hurd
- RPC.
-
-2000-03-13 Roland McGrath <roland@baalperazim.frob.com>
-
- * start-translator-long.c (service_fsys_startup): If mach_msg fails
- with MACH_SEND_INTERRUPTED, clean up the send right in the
- pseudo-received request message.
-
-1999-10-07 Thomas Bushnell, BSG <tb@mit.edu>
-
- * start-translator-long.c (fshelp_start_translator_long): Doc fix.
- * fshelp.h (fshelp_start_translator_long): Document OWNER_UID.
-
-1999-10-07 Roland McGrath <roland@baalperazim.frob.com>
-
- * start-translator-long.c (fshelp_start_translator_long): Take new
- argument OWNER_UID. Get child's proc port and do proc_setowner on it.
- * fshelp.h: Update decl.
- * start-translator.c (fshelp_start_translator): Pass new arg to
- fshelp_start_translator_long with value from geteuid ().
- * fetch-root.c (fshelp_fetch_root): Pass UID as new arg to
- fshelp_start_translator_long.
-
-1999-09-12 Roland McGrath <roland@baalperazim.frob.com>
-
- * delegate.c (fshelp_delegate_translation): Free ARGZ after RPC.
-
-1999-07-11 Thomas Bushnell, BSG <tb@mit.edu>
-
- * set-options.c (fshelp_set_options): Explicitly cast first arg to
- argz_extract to keep GCC quiet.
-
-1999-07-01 Thomas Bushnell, BSG <tb@mit.edu>
-
- * translated.c: New file; guts from fshelp.h.
- * perms-isowner.c: Likewise.
- * perms-access.c: Likewise.
- * prems-checkdirmod.c: Likewise.
- * touch.c: Likewise.
- * fshelp.h (fshelp_translated, fshelp_isowner, fshelp_access,
- fshelp_checkdirmod, fshelp_touch): Replace inline definitions with
- ordinary declarations.
- (FSHELP_EI): Removed macro.
- * fshelp.c: Deleted file.
- * Makefile (SRCS): Added translated.c, perms-isowner.c,
- perms-access.c, perms-checkdirmod.c, touch.c. Removed fshelp.c.
-
-Wed Apr 28 03:06:19 1999 Thomas Bushnell, BSG <tb@mit.edu>
-
- * fetch-root.c (fshelp_fetch_root): Don't deallocate the
- INIT_PORT_CWDIR after starting the passive translator; we still
- need to keep our reference around until the getroot call happens.
- Reported by Marcus Brinkmann (Marcus.Brinkmann@ruhr-uni-bochum.de).
-
-Tue Apr 20 21:43:20 1999 Thomas Bushnell, BSG <tb@mit.edu>
-
- * fetch-root.c (fshelp_fetch_root): When starting a passive
- translator, set cwd to be DOTDOT instead of our own cwd.
-
-Sat Mar 6 17:03:02 1999 Thomas Bushnell, BSG <tb@mit.edu>
-
- * start-translator-long.c (service_fsys_startup): Doc fixes, and
- omit unused member `dead' from REQUEST.
-
-1999-02-28 Roland McGrath <roland@baalperazim.frob.com>
-
- * get-identity.c (fshelp_get_identity): Use ports_class_iterate.
-
-1998-12-19 Roland McGrath <roland@baalperazim.frob.com>
-
- * fetch-root.c (fshelp_fetch_root): Cope when we have a null auth
- server port (pass our own ports).
-
-1998-09-04 Roland McGrath <roland@baalperazim.frob.com>
-
- * fshelp.h (fshelp_set_options): Use `const' for `char *' parameter.
- * set-options.c (fshelp_set_options): Fix defn.
-
-1998-08-21 Roland McGrath <roland@baalperazim.frob.com>
-
- * Makefile (SRCS): Remove return-buffer.c.
-
-1998-08-20 Roland McGrath <roland@baalperazim.frob.com>
-
- * fshelp.h: Moved fshelp_return_malloced_buffer to libiohelp.
- * return-buffer.c: Moved to ../libiohelp/return-buffer.c.
- (fshelp_return_malloced_buffer): Renamed to iohelp_*.
-
-Tue Jul 1 16:45:27 1997 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * exec-reauth.c (fshelp_exec_reauth): If the new set of eff_uids
- is empty, then still do proc_setowner, but this time to set it to
- "unowned" status.
-
-1997-06-12 Miles Bader <miles@gnu.ai.mit.edu>
-
- * fshelp.h (fshelp_touch): New function.
- (TOUCH_ATIME, TOUCH_MTIME, TOUCH_CTIME): New macros.
- Include <maptime.h>.
-
-1997-06-11 Miles Bader <miles@gnu.ai.mit.edu>
-
- * fshelp.h (fshelp_fetch_root_callback1_t): Chage ARGZ_LEN to type
- size_t.
-
-Fri Nov 15 14:43:44 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * fshelp.h (fshelp_access): Uh, shift bits the right direction.
-
-Tue Nov 12 22:07:41 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * fetch-root.c (fshelp_fetch_root): Name idvec members correctly.
-
- * fshelp.h: <iohelp.h> -> <hurd/iohelp.h>.
- Include <sys/stat.h>.
- (fshelp_access): Declare `gotit'.
-
-Wed Nov 6 17:49:33 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * fshelp.h (fshelp_fetch_root): Delete args `uids', `gids',
- `uids_len', and `gids_len'. New arg `user'.
- * fetch-root.c (fshelp_fetch_root): Ditto.
-
- * fshelp.h: Include <iohelp.h>.
- (fshelp_access, fshelp_isowner, fshelp_checkdirmod): New
- functions.
-
-Mon Oct 21 21:55:21 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * fshelp.h: Add extern inline protection.
- * fshelp.c: New file.
- * Makefile (SRCS): Add fshelp.c.
-
-Sun Oct 13 21:46:18 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * lock-acquire.c (fshelp_acquire_lock): Return success, not EBADF,
- when unlocking a file which we don't have locked; this is netbsd's
- behavior.
-
-Thu Oct 10 17:12:19 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * lock-acquire.c (fshelp_acquire_lock): Use hurd_condition_wait so
- we are properly interruptible.
-
-Thu Sep 12 16:21:51 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * Makefile (HURDLIBS): New variable.
- (libfshelp.so): Delete special dependency.
-
-Tue Jul 16 11:30:42 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * lock-acquire.c (EWOULDBLOCK): Define, to work around new libc
- bug.
-
-Sun Jul 7 21:26:02 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * start-translator.c (fshelp_start_translator): Don't use unsafe
- MOVE_SEND in call to fshelp_start_translator_long.
- * fetch-root.c (fshelp_fetch_root): Don't use unsafe MOVE_SEND in
- call to fshelp_start_translator_long.
-
-Thu Jul 4 15:38:36 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * get-identity.c (fshelp_get_identity): Bother to initialize
- I->fileno.
-
-Wed Jul 3 11:29:49 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * get-identity.c: New file.
- * fshelp.h (struct port_bucket): Mention name in global scope.
- (fshelp_get_identity): New declaration.
- * Makefile (SRCS): Add get-identity.c.
-
-Thu Jun 27 17:56:44 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * Makefile (LCLHDRS): Add trans.h.
-
-Mon Jun 24 16:00:48 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * fetch-root.c (fshelp_fetch_root): Deal properly with errors from
- auth_makeauth.
-
-Fri Jun 21 00:07:26 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * set-options.c (fshelp_set_options): Add & use INPUT arg.
- * fshelp.h (fshelp_set_options): Add INPUT argument.
- (fshelp_return_malloced_buffer): New declaration.
- * return-buffer.c: New file.
- * Makefile (SRCS): Add return-buffer.c.
-
-Wed Jun 19 18:50:01 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * set-options.c: New file.
- * fshelp.h: Add fshelp_set_options.
- * Makefile (SRCS): Add set-options.c.
-
-Fri May 10 16:12:50 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * delegate.c (fshelp_delegate_translation): Don't cast ARGV when
- calling arg_create.
-
-Thu May 9 11:17:08 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * exec-reauth.c (fshelp_exec_reauth): Provide new third arg to
- proc_setowner.
-
- * delegate.c (fshelp_delegate_translation): Cast first arg to
- argz_create appropriately.
-
- * fetch-root.c (fshelp_fetch_root) [reauth]: Use new args for
- auth_user_authenticate.
-
-Fri Apr 26 18:51:07 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * start-translator-long.c (service_fsys_startup): Make mach_msg
- calls interruptible.
-
-Wed Feb 21 17:09:12 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * set-active.c (fshelp_set_active): When EXCL, make sure the
- active translator is really active.
-
- * fetch-root.c (fshelp_fetch_root): Make sure the returned fsys control
- port is valid.
-
-Wed Feb 14 16:42:31 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * start-translator-long.c (fshelp_start_translator_long):
- Terminate TASK if the exec fails.
-
-Mon Jan 29 15:32:54 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * fetch-root.c (fshelp_fetch_root): Use hurd_condition_wait
- instead of condition_wait.
-
- * set-active.c (fshelp_set_active): Deal correctly with the case
- where a passive translator is being started.
-
-Fri Jan 26 17:56:08 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * fetch-root.c (fshelp_fetch_root): If io_reauthenticate returns
- an error, just return MACH_PORT_NULL instead of aborting (the
- server probably died; not a good sign for the health of the
- translator, but it's better than dying ourselves...).
-
-Tue Jan 2 15:36:28 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * exec-reauth.c (fshelp_exec_reauth): Don't setgid the uids.
-
-Mon Jan 1 17:13:25 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * exec-reauth.c (fshelp_exec_reauth): New function.
- * fshelp.h (fshelp_exec_reauth): New declaration.
- * Makefile (SRCS): Added exec-reauth.c
-
-Mon Nov 6 13:37:52 1995 Miles Bader <miles@gnu.ai.mit.edu>
-
- * start-translator-long.c (service_fsys_startup): Don't pass the
- address of reply.realnodeType.msgt_name -- it's not really an int,
- although the compiler pretends it is.
-
- * fetch-root.c (fshelp_fetch_root): When PORT_TYPE is
- MACH_MSG_TYPE_MAKE_SEND, make the right *before* using it.
- (fshelp_fetch_root): Don't bother reauthenticating the underlying
- node returned by CALLBACK2 -- it already has the right ids. This
- also gets rid of a problem with giving away our auth port prematurely.
-
-Wed Nov 1 16:14:08 1995 Miles Bader <miles@gnu.ai.mit.edu>
-
- * fetch-root.c (fshelp_fetch_root): Uses two callbacks now. Pass
- an appropiate function to fshelp_start_translator_long instead of
- the actual underlying node.
- * fshelp.h (fshelp_fetch_root_callback1_t,
- fshelp_fetch_root_callback2_t): New types replacing fshelp_callback_t.
- (fshelp_fetch_root): Takes two callback args now.
-
- * start-translator.c (fshelp_start_translator): Change to use a
- callback function instead of passing the actual node.
- * start-translator-long.c (fshelp_start_translator_long,
- service_fsys_startup): Ditto.
- (service_fsys_startup): Support the open flags coming from the
- translator.
- (struct fsys_startup_request): Add the flags field.
- (flagsCheck): New variable.
- * fshelp.h (fshelp_open_fn_t): New type.
- (fshelp_start_translator, fshelp_start_translator_long): Now take
- a function that opens the underlying node instead of the node itself.
-
-Fri Oct 13 16:52:43 1995 Miles Bader <miles@gnu.ai.mit.edu>
-
- * start-translator-long.c (fshelp_start_translator_long): Undo
- last change to file_exec args.
-
-Sat Oct 7 20:20:26 1995 Miles Bader <miles@gnu.ai.mit.edu>
-
- * start-translator-long.c (fshelp_start_translator_long): Add
- values for the dealloc parameters to file_exec (all false).
- Give away our send right to TASK when we do file_exec.
- Initialize BOOTSTRAP & TASK so the cleanup code doesn't get confused.
-
-Fri Sep 29 17:44:00 1995 Miles Bader <miles@gnu.ai.mit.edu>
-
- * transbox-init.c (fshelp_transbox_init): Initialize the flags field.
-
-Tue Sep 5 18:25:24 1995 Miles Bader <miles@churchy.gnu.ai.mit.edu>
-
- * fshelp.h (fshelp_delegate_translation): New declaration.
- * delegate.c (fshelp_delegate_translation): New file, new function.
-
-Fri Sep 1 12:01:06 1995 Miles Bader <miles@churchy.gnu.ai.mit.edu>
-
- * Makefile (SRCS): Add delegate.c.
- (REMHDRS): Removed.
-
-Tue Jul 11 14:11:24 1995 Michael I Bushnell <mib@duality.gnu.ai.mit.edu>
-
- * start-translator-long.c (fshelp_start_translator_long): If
- PORTS_TYPE is MACH_MSG_TYPE_COPY_SEND, then drop our right on
- bootstrap after the call, because we are pretending we haven't
- changed the calling user's state. For the same reason, save the
- old BOOTSTRAP port value, and restore it after the call.
-
-Thu Jul 6 15:35:23 1995 Michael I Bushnell <mib@duality.gnu.ai.mit.edu>
-
- * Makefile: Removed dependencies that are now automatically
- generated.
-
-Mon Jun 26 15:36:21 1995 Michael I Bushnell <mib@duality.gnu.ai.mit.edu>
-
- * fetch-root.c (fshelp_fetch_root): Wakeup other blocked calls
- *before* returning errors provided by fshelp_start_translator_long
- or CALLBACK.
-
-Fri Jun 23 14:25:52 1995 Michael I Bushnell <mib@duality.gnu.ai.mit.edu>
-
- * fetch-root.c (fshelp_fetch_root): Parenthesize assert test
- correctly.
- * start-translator-long.c (service_fsys_startup): Parenthesize
- construction of flags arg correctly.
-
-Thu Jun 22 17:06:51 1995 Michael I Bushnell <mib@duality.gnu.ai.mit.edu>
-
- * fetch-root.c (fshelp_fetch_root) [reauth]: If PORT is null, then
- just return it.
-
- * fetch-root.c (fshelp_fetch_root): Pass type and length
- parameters in the right order in calls to auth_makeauth and
- fshelp_start_translator_long.
-
-Wed Jun 21 13:19:44 1995 Michael I Bushnell <mib@duality.gnu.ai.mit.edu>
-
- * fetch-root.c (fshelp_fetch_root): Pass new third arg to
- fshelp_set_active.
-
-Mon Jun 19 16:41:51 1995 Michael I Bushnell <mib@duality.gnu.ai.mit.edu>
-
- * fetch-control.c (fshelp_fetch_control): Only frob refs if
- control is non-null.
-
- * fshelp.h (fshelp_set_active): New parm EXCL.
- * set-active.c (fshelp_set_active): Implement new interface.
-
- * fetch-control.c (fshelp_fetch_control): Don't frob obsolete
- innerlock.
- * transbox-init.c (fshelp_transbox_init): Don't init obsolete
- innerlock. Do init TRANSBOX->wakeup.
- * set-active.c (fshelp_set_active): Don't frob obsolete innerlock.
- * fetch-root.c (fshelp_fetch_root): Reduce levels of loops. Only
- change ACTIVE when we are holding the lock. Use condition
- mechanism to serialize attempts to start the passive translator.
- * fshelp.h (struct transbox): Delete member `innerlock'. Add
- members `flags' and `wakeup'; and define values for flags.
-
-Wed Jun 14 13:06:17 1995 Michael I Bushnell <mib@duality.gnu.ai.mit.edu>
-
- * fshelp.h (fshelp_fetch_root): New arg COOKIE.
- (fshelp_callback_t): COOKIE->COOKIE1. New arg COOKIE2.
- * fetch-root.c (fshelp_fetch_root): Take new arg COOKIE and pass
- it to CALLBACK. Free ARGZ after we're done with them. Never
- consume the right on DOTDOT.
- * Makefile (LCLHDRS): Removed trans.h.
- * handle-startup.c, init-trans.c, start-trans.c,
- transboot-clean.c, kill-trans.c, trans-iter.c, trans-cntl.c,
- trans-drop.c, trans.h: Deleted files.
-
- * Makefile (SRCS): Remove translated.c.
- * fshelp.h (fshelp_fetch_root): Don't actually need ROOT_TYPE.
- UIDS and GIDS should be arrays.
- (fshelp_callback_t): Should be error_t.
-
-Tue Jun 13 15:59:08 1995 Michael I Bushnell <mib@duality.gnu.ai.mit.edu>
-
- Brand new translator support routines
- * fshelp.h: Deleted `struct translink', fshelp_transboot_port_type,
- fshelp_init_trans_link, fshelp_set_control,
- fshelp_start_translator, fshelp_handle_fsys_startup,
- fshelp_transboot_clean, fshelp_translator_iterate,
- fshelp_translator_drop, fshelp_kill_translator.
- * fshelp.h: Added fshelp_start_translator_long,
- fshelp_start_translator, `struct transbox', fshelp_fetch_root,
- fshelp_transbox_init, fshelp_callback_t, fshelp_translated,
- fshelp_set_active, fshelp_fetch_control, fshelp_drop_transbox.
- * Makefile (SRCS): Removed handle-startup.c, init-trans.c,
- start-trans.c, transboot-clean.c, kill-trans.c, trans-iter.c,
- trans-cntl.c, trans-drop.c. Added start-translator-long.c,
- start-translator.c, fetch-root.c, transbox-init.c, translated.c,
- set-active.c, fetch-control.c, and drop-transbox.c.
- (OBJS): Replaced with computation from $(SRCS).
- * start-translator.c, fetch-root.c, transbox-init.c, set-active.c,
- fetch-control.c, drop-transbox.c: New files.
- * start-translator-long.c: Adapted from ../lib/start-trans.c.
- Include "fshelp.h" and <assert.h>.
- (service_fsys_startup): Declare static. Only pass
- MACH_RCV_TIMEOUT if TIMEOUT is nonzero. New parm `node_type'.
- (fshelp_start_translator_long): Renamed from start_translator.
- Lookup up executable at NAME instead of ARGZ. Delete vars
- INIT_PORTS, FD_PORTS, INIT_INTS, I, and CHILD_PROC. Don't set any
- of the ports, fds, or ints, with the exception of the bootstrap
- port. Don't bother getting the child's proc server port.
- Don't use __USEPORT. If we fail before calling file_exec,
- then deallocate the ports ourselves, if they were MOVE_SEND.
-
-Fri Oct 28 18:37:56 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * start-trans.c: Change `assert (!err)' to `assert_perror (err)'
- throughout.
- (fshelp_start_translator): Add assert_perror for io_reauthenticate
- return.
-
-Mon Sep 19 20:58:35 1994 Michael I Bushnell <mib@churchy.gnu.ai.mit.edu>
-
- * trans-iter.c (fshelp_translator_iterate): Bother to attach
- ITEM onto LIST as it's constructed.
-
-Sat Sep 10 08:42:00 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * transboot-clean.c (fshelp_transboot_clean): Use EDIED, not EINVAL.
-
-Wed Sep 7 10:34:13 1994 Michael I Bushnell <mib@churchy.gnu.ai.mit.edu>
-
- * start-trans.c (fshelp_start_translator): RETRY label belongs
- *after* initial lock of LINK. Unlock LINK before returning.
-
-Tue Sep 6 14:52:49 1994 Michael I Bushnell <mib@churchy.gnu.ai.mit.edu>
-
- * fshelp.h (struct trans_link): New member `lock'.
- (fshelp_start_translator): Omit `lock' arg.
- * trans.h (struct transboot): Omit member `lock'.
- * init-trans.c (fshelp_init_trans_link): Initialize LINK->lock.
- * start-trans.c (fshelp_start_translator): Don't set TB->lock.
- Omit `lock' arg; use LINK->lock instead.
- (fshelp_start_translator): Don't deallocate DIR.
- * handle-startup.c (fshelp_handle_fsys_startup): Lock
- TB->link->lock instead of TB->lock.
- * transboot-clean.c (fshelp_transboot_clean): Likewise.
-
-Thu Sep 1 16:46:53 1994 Michael I Bushnell <mib@geech.gnu.ai.mit.edu>
-
- * fshelp.h (fshelp_start_translator): Doc fix.
- * start-trans.c (fshelp_start_translator): Don't reauthenticate
- NODE argument; expect fully authenticated node.
-
-Wed Aug 31 14:28:25 1994 Michael I Bushnell <mib@geech.gnu.ai.mit.edu>
-
- * start-trans.c (fshelp_start_translator): Before call to
- proc_reauthenticate, CALL mach_reply_port, not just refer to
- confusing CPP macro.
-
- * start-trans.c (fshelp_start_translator): Call proc_setowner
- for new process.
-
-Tue Aug 30 16:19:45 1994 Michael I Bushnell <mib@geech.gnu.ai.mit.edu>
-
- * start-trans.c: Include <string.h>.
-
- * start-trans.c (fshelp_start_translator): Use new
- reauthentication protocol throughout.
-
- * start-trans.c (fshelp_start_translator): Use
- hurd_file_name_lookup instead of hurd_path_lookup.
-
-Wed Aug 17 16:03:49 1994 Michael I Bushnell <mib@geech.gnu.ai.mit.edu>
-
- * start-trans.c (fshelp_start_translator): Designate the new
- process as our child; then make sure it's under its own
- authentication. As long as we've gotten the proc port for
- this operation, might as well pass it too.
- (fshelp_start_translator): Zero init ints and init ports.
-
- * transboot-clean.c (fshelp_transboot_clean): Only set an error
- if we haven't gotten fsys_startup yet.
-
-Mon Aug 15 12:24:47 1994 Michael I Bushnell <mib@geech.gnu.ai.mit.edu>
-
- * start-trans.c (fshelp_start_translator): Set LINK->starting
- before blocking.
- * handle-startup.c (fshelp_handle_fsys_startup): Clear
- LINK->starting before waking up blocks.
-
- * fshelp.h (struct trans_link): New member `error'.
- * transboot-clean.c (fshelp_transboot_clean): Wakeup blocked
- users with error.
- * trans-cntl.c (fshelp_set_control): Clear LINK->error.
- * init-trans.c (fshelp_init_trans_link): Likewise.
-
- * start-trans.c (fshelp_start_translator): Fix
- auth_user_authenticate to use the correct rendezvous port in
- producing realnode from node..
-
-Fri Jul 22 12:03:14 1994 Michael I Bushnell <mib@geech.gnu.ai.mit.edu>
-
- * Makefile: Rewritten in accord with new scheme.
-
-Wed Jul 20 13:31:39 1994 Michael I Bushnell <mib@geech.gnu.ai.mit.edu>
-
- * start-trans.c (fshelp_start_translator): Missing first arg
- to mach_port_deallocate of `dir'.
-
-Tue Jul 19 18:44:53 1994 Michael I Bushnell (mib@churchy.gnu.ai.mit.edu)
-
- * fshelp.h (fshelp_start_translator): Doc fix.
- (fshelp_handle_fsys_startup): Deleted dotdot args.
- * trans.h (struct transboot): Removed member `dir'.
- * start-trans.c (fshelp_start_translator): Don't initialize
- TB->dir.
- (fshelp_start_translator): Deallocate DIR arg when we're
- done with it.
- * handle-startup.c (fshelp_handle_fsys_startup): Deleted
- dotdot args.
- * transboot-clean.c (fshelp_transboot_clean): Don't free
- no-longer-existent TB->dir.
-
-Fri Jul 8 12:58:54 1994 Michael I Bushnell (mib@churchy.gnu.ai.mit.edu)
-
- * trans-cntl.c: Include <assert.h>.
-
-Thu Jul 7 18:08:49 1994 Michael I Bushnell (mib@churchy.gnu.ai.mit.edu)
-
- * trans-drop.c: New file.
- * fshelp.h (fshelp_translator_drop): New declaration.
- * Makefile (OBJS): Added trans-drop.o.
- (SRCS): ADded trans-drop.c.
-
-Tue Jul 5 14:14:53 1994 Michael I Bushnell (mib@churchy.gnu.ai.mit.edu)
-
- * Makefile (DIST_FILES): New variable.
-
-Thu Jun 16 16:27:39 1994 Michael I Bushnell (mib@geech.gnu.ai.mit.edu)
-
- * fshelp.h (fshelp_get_node_port, fshelp_done_with_node): Deleted
- prototypes.
- (fshelp_start_translator): Changed types of DIR and NODE to be
- file_t.
- * trans.h (struct transboot): Deleted members UID and GID.
- Changed types of DIR and NODE to be file_t.
- * transboot-clean.c (fshelp_transboot_clean): Deallocate ports
- TB->node and TB->dir instead of calling fshelp_done_with_node.
- * start-trans.c (fshelp_start_translator): Changed types of
- DIR and MODE to be file_t. Rewritten to behave correctly in
- numerous ways.
- * handle-startup.c (fshelp_handle_fsys_startup): Return REAL
- and DIR from ports in TB instead of calling fshelp_get_node_port.
-
-Fri Jun 3 18:13:04 1994 Michael I Bushnell (mib@churchy.gnu.ai.mit.edu)
-
- * fshelp.h (fshelp_set_control): New declaration.
- * trans-cntl.c: New file.
- * Makefile (SRCS): Added trans-cntl.c.
- (OBJS): Added trans-cntl.o.
- trans-cntl.o: Depend on trans.h.
-
-Thu May 5 07:46:00 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
-
- * Makefile: Change uses of $(headers) to $(includedir).
-
-Mon Feb 14 11:32:59 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
-
- * Makefile (install): New target.
diff --git a/libfshelp/exec-reauth.c b/libfshelp/exec-reauth.c
index 3df375d5..d9a82974 100644
--- a/libfshelp/exec-reauth.c
+++ b/libfshelp/exec-reauth.c
@@ -108,7 +108,7 @@ fshelp_exec_reauth (int suid, uid_t uid, int sgid, gid_t gid,
if (suid && !err)
err = idvec_setid (eff_uids, avail_uids, uid, &_secure);
if (sgid && !err)
- err = idvec_setid (eff_uids, avail_uids, gid, &_secure);
+ err = idvec_setid (eff_gids, avail_gids, gid, &_secure);
if (err)
goto abandon_suid;
diff --git a/libfshelp/fshelp.h b/libfshelp/fshelp.h
index 5c43c54c..9f4fa677 100644
--- a/libfshelp/fshelp.h
+++ b/libfshelp/fshelp.h
@@ -38,7 +38,7 @@
or the ports library. */
/* A callback used by the translator starting functions, which should be a
- function that given some open flags, opens the appropiate file, and
+ function that given some open flags, opens the appropriate file, and
returns the node port. */
typedef error_t (*fshelp_open_fn_t) (int flags,
file_t *node,
@@ -253,7 +253,7 @@ error_t fshelp_access (io_statbuf_t *st, int op, struct iouser *user);
/* Check to see whether USER is allowed to modify DIR with respect to
existing file ST. (If there is no existing file, pass 0 for ST.)
- If the access is permissable return 0; otherwise return an
+ If the access is permissible return 0; otherwise return an
appropriate error code. */
error_t fshelp_checkdirmod (io_statbuf_t *dir, io_statbuf_t *st,
struct iouser *user);
diff --git a/libfshelp/perms-access.c b/libfshelp/perms-access.c
index 91ad9da8..67e52812 100644
--- a/libfshelp/perms-access.c
+++ b/libfshelp/perms-access.c
@@ -30,7 +30,7 @@ fshelp_access (struct stat *st, int op, struct iouser *user)
{
int gotit;
if (idvec_contains (user->uids, 0))
- gotit = 1;
+ gotit = (op != S_IEXEC) || !S_ISREG(st->st_mode) || (st->st_mode & (S_IXUSR | S_IXGRP | S_IXOTH));
else if (user->uids->num == 0 && (st->st_mode & S_IUSEUNK))
gotit = st->st_mode & (op << S_IUNKSHIFT);
else if (!fshelp_isowner (st, user))
diff --git a/libfshelp/perms-checkdirmod.c b/libfshelp/perms-checkdirmod.c
index db4b2e43..823c9f63 100644
--- a/libfshelp/perms-checkdirmod.c
+++ b/libfshelp/perms-checkdirmod.c
@@ -23,7 +23,7 @@
/* Check to see whether USER is allowed to modify DIR with respect to
existing file ST. (If there is no existing file, pass 0 for ST.)
- If the access is permissable return 0; otherwise return an
+ If the access is permissible return 0; otherwise return an
appropriate error code. */
error_t
fshelp_checkdirmod (struct stat *dir, struct stat *st, struct iouser *user)
diff --git a/libfshelp/perms-iscontroller.c b/libfshelp/perms-iscontroller.c
index 456da2a2..0adfdf22 100644
--- a/libfshelp/perms-iscontroller.c
+++ b/libfshelp/perms-iscontroller.c
@@ -1,5 +1,5 @@
/* see whether a user should be considered a controller of the filesystem
- Copyright (C) 2001 Free Software Foundation, Inc.
+ Copyright (C) 2001, 2008 Free Software Foundation, Inc.
Written by Neal H Walfield <neal@cs.uml.edu>.
This file is part of the GNU Hurd.
@@ -30,7 +30,7 @@ fshelp_iscontroller (struct stat *st, struct iouser *user)
{
/* Permitted if USER has the superuser uid, the owner uid or if the
USER has authority over the process's effective id. */
- if (idvec_contains (user->uids, st->st_uid)
+ if (idvec_contains (user->uids, 0)
|| idvec_contains (user->uids, st->st_uid)
|| idvec_contains (user->uids, geteuid ()))
return 0;
diff --git a/libfshelp/touch.c b/libfshelp/touch.c
index c254bfbf..00d90edd 100644
--- a/libfshelp/touch.c
+++ b/libfshelp/touch.c
@@ -1,5 +1,6 @@
/*
- Copyright (C) 1999 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2007 Free Software Foundation, Inc.
+
Written by Thomas Bushnell, BSG.
This file is part of the GNU Hurd.
@@ -32,17 +33,17 @@ fshelp_touch (struct stat *st, unsigned what,
if (what & TOUCH_ATIME)
{
- st->st_atime = tv.tv_sec;
- st->st_atime_usec = tv.tv_usec;
+ st->st_atim.tv_sec = tv.tv_sec;
+ st->st_atim.tv_nsec = tv.tv_usec * 1000;
}
if (what & TOUCH_CTIME)
{
- st->st_ctime = tv.tv_sec;
- st->st_ctime_usec = tv.tv_usec;
+ st->st_ctim.tv_sec = tv.tv_sec;
+ st->st_ctim.tv_nsec = tv.tv_usec * 1000;
}
if (what & TOUCH_MTIME)
{
- st->st_mtime = tv.tv_sec;
- st->st_mtime_usec = tv.tv_usec;
+ st->st_mtim.tv_sec = tv.tv_sec;
+ st->st_mtim.tv_nsec = tv.tv_usec * 1000;
}
}
diff --git a/libftpconn/ChangeLog b/libftpconn/ChangeLog
deleted file mode 100644
index 409e6b0a..00000000
--- a/libftpconn/ChangeLog
+++ /dev/null
@@ -1,291 +0,0 @@
-2002-10-19 Roland McGrath <roland@frob.com>
-
- * unix.c (ftp_conn_unix_start_get_stats): Pass dirname a copy of NAME
- instead of the original pointer.
-
-2002-06-08 Roland McGrath <roland@frob.com>
-
- * ftpconn.h (ftp_conn_add_stat_fun_t) [_FILE_OFFSET_BITS != 64]:
- Use struct stat64 in place of struct stat.
-
-2002-05-07 Roland McGrath <roland@frob.com>
-
- * xfer.c (ftp_conn_start_open_actv_data): size_t -> socklen_t
- (ftp_conn_finish_open_actv_data): Likewise.
-
-2002-04-13 Moritz Schulte <moritz@chaosdorf.de>
-
- * unix.c: Include <libgen.h>.
- (struct get_stats_state): New member: searched_name.
- (ftp_conn_unix_start_get_stats): Return EINVAL if trying to list
- the root node without listing its content; set searched_name to
- the dirname.
- (ftp_conn_unix_cont_get_stats): If searching for the list info of
- one entry, skip all other entries.
-
-2001-12-22 Roland McGrath <roland@frob.com>
-
- * ftpconn.h (ftp_conn_validate_syshooks): Don't make this extern
- inline defn conditional on [__OPTIMIZE__].
-
-1999-08-11 Thomas Bushnell, BSG <tb@mit.edu>
-
- * open.c (ftp_conn_sysify): Handle REPLY_NO_LOGIN from "syst".
- (ftp_conn_open): Ignore error from ftp_conn_sysify; it's ok if we
- can't successfully deal. If we didn't sysify successfully before
- login, then try again afterwards.
-
-1998-10-20 Roland McGrath <roland@baalperazim.frob.com>
-
- * unix.c (ftp_conn_unix_cont_get_stats): Add braces to silence gcc
- warning.
- * open.c (ftp_conn_sysify): Likewise.
- (ftp_conn_login): Likewise.
- * cwd.c (ftp_conn_cdup): Likewise.
- (ftp_conn_cwd): Likewise.
- (_cache_cwd): Likewise.
- * addr.c (ftp_conn_send_actv_addr): Likewise.
- (ftp_conn_get_pasv_addr): Likewise.
-
-1997-09-04 Miles Bader <miles@gnu.ai.mit.edu>
-
- * ftpconn.h [!FTP_CONN_EI] (FTP_CONN_EI): New macro.
- (ftp_conn_validate_syshooks): Use FTP_CONN_EI instead of
- `static inline'.
- Protect with __OPTIMIZE__.
-
- * ftpconn.h (struct ftp_conn): Remove ACTV_DATA_CONN_QUEUE field.
- * create.c (ftp_conn_create): Don't initialize
- CONN->actv_data_conn_queue.
- * open.c (ftp_conn_close): Don't cleanup CONN->actv_data_conn_queue.
- * xfer.c (ftp_conn_start_open_actv_data): Always generate a new data
- connection (it doesn't work to always listen on a single address).
- (ftp_conn_finish_open_actv_data): Close the listen queue after
- looking for a connection.
- (ftp_conn_abort_open_actv_data): Close the data queue socket.
-
-1997-09-02 Miles Bader <miles@gnu.ai.mit.edu>
-
- * xfer.c (ftp_conn_start_open_actv_data): If necessary, reopen the
- control connection for getsockname.
-
-1997-08-27 Miles Bader <miles@gnu.ai.mit.edu>
-
- * ftpconn.h (struct ftp_conn): Add the ACTV_DATA_ADDR and
- ACTV_DATA_CONN_QUEUE fields.
- * create.c (ftp_conn_free): Free the ACTV_DATA_ADDR field.
- (ftp_conn_create): Initialiaze the ACTV_DATA_ADDR &
- ACTV_DATA_CONN_QUEUE fields.
- * open.c (ftp_conn_close): Close CONN->actv_data_conn_queue if necessary.
- * xfer.c (ftp_conn_start_open_actv_data): Renamed ftp_conn_open_actv_data.
- Correctly generate data address.
- (ftp_conn_start_open_data): Renamed from ftp_conn_open_data.
- (ftp_conn_finish_open_data, ftp_conn_finish_open_actv_data): New
- functions.
- (ftp_conn_start_transfer): Use ftp_conn_start_open_data and
- ftp_conn_finish_open_data instead of ftp_conn_open_data.
-
-1997-08-26 Miles Bader <miles@gnu.ai.mit.edu>
-
- * xfer.c (ftp_conn_open_actv_data): New function.
- (ftp_conn_open_data): Use an active data connection if passive
- doesn't work.
- * ftpconn.h (struct ftp_conn): Add USE_PASSIVE field.
- * create.c (ftp_conn_create): Initialize USE_PASSIVE field.
-
- * open.c (ftp_conn_open): Set SIN_LEN field correctly.
-
-1997-08-19 Miles Bader <miles@gnu.ai.mit.edu>
-
- * create.c (ftp_conn_create): Initialize the SYSHOOKS_VALID field.
-
-1997-08-15 Miles Bader <miles@gnu.ai.mit.edu>
-
- * fname.c (ftp_conn_append_name, ftp_conn_basename): Make sure
- CONN's SYSHOOKS field is valid before using it.
- * ftpconn.h (struct ftp_conn): Add SYSHOOKS_VALID field.
- (ftp_conn_validate_syshooks): New inline function.
- * open.c (ftp_conn_sysify): Set SYSHOOKS_VALID.
-
- * set-type.c (ftp_conn_set_type): If there's no connection, don't
- open a new one, just save the type for later.
-
-1997-08-09 Miles Bader <miles@gnu.ai.mit.edu>
-
- * names.c (ftp_conn_cont_get_names): Check for interrupts.
- * unix.c (ftp_conn_unix_cont_get_stats): Likewise.
- * reply.c (ftp_conn_getline): Likewise.
- * ftpconn.h (struct ftp_conn_hooks): Add INTERRUPT_CHECK field.
-
-1997-08-08 Miles Bader <miles@gnu.ai.mit.edu>
-
- * rmt.c (ftp_conn_rmt_transfer): If we get an error, close SRC_CONN
- instead of aborting it, to avoid problems with some ftp servers.
-
- * create.c (ftp_conn_create): Don't open the connection here.
-
- * names.c (ftp_conn_cont_get_names): Use BASENAME hook instead of
- FIX_NLIST_NAME.
- (ftp_conn_start_get_names): Don't set DIR field.
- (struct get_names_state): Remove DIR field.
- (ftp_conn_cont_get_names): Don't free DIR field.
-
- * ftpconn.h (struct ftp_conn_syshooks): Add APPEND_NAME and
- BASENAME fields; remove FIX_NLIST_NAME field.
- (ftp_conn_unix_append_name, ftp_conn_unix_basename): New declarations.
- (ftp_conn_unix_fix_nlist_name): Declaration removed.
- (ftp_conn_append_name, ftp_conn_basename): New declarations.
- * unix.c (ftp_conn_unix_cont_get_stats): Pass only directory-
- relative names to the callback function.
- (ftp_conn_unix_append_name, ftp_conn_unix_basename): New functions.
- (ftp_conn_unix_fix_nlist_name): Function removed.
- (struct ftp_conn_unix_syshooks): Initialize APPEND_NAME and
- BASENAME fields; remove FIX_NLIST_NAME initialization.
- * fname.c: New file.
- * Makefile (SRCS): Add fname.c
-
-1997-08-07 Miles Bader <miles@gnu.ai.mit.edu>
-
- * ftpconn.h (struct ftp_conn_syshooks): Add FIX_NLIST_NAME field.
- (ftp_conn_unix_fix_nlist_name): New declaration.
- * names.c (ftp_conn_cont_get_names): Support FIX_NLIST_NAME hook.
- Free S->dir if necessary. Close or abort connection when done.
- (struct get_names_state): Add DIR field.
- (ftp_conn_start_get_names): Fill in S->dir field if necessary.
-
- * unix.c (ftp_conn_unix_fix_nlist_name): New function.
- (ftp_conn_unix_syshooks): Add ftp_conn_unix_fix_nlist_name.
-
-1997-08-06 Miles Bader <miles@gnu.ai.mit.edu>
-
- * open.c (ftp_conn_sysify): Handle REPLY_UNIMP_CMD for "syst".
-
- * unix.c (parse_dir_entry): Re-enable mktime calls.
-
-1997-08-04 Miles Bader <miles@gnu.ai.mit.edu>
-
- * unix.c (ftp_conn_unix_cont_get_stats): If returning with an
- error, ignore any return from ftp_conn_finish_transfer.
-
-Wed Jun 4 14:17:30 1997 Miles Bader <miles@gnu.ai.mit.edu>
-
- * Makefile (ftpcp, ftpdir): Rules removed.
- * ftpcp.c, ftpdir.c: Files removed.
-
-Thu May 29 17:24:40 1997 Miles Bader <miles@gnu.ai.mit.edu>
-
- * ftpcp.c (doc): Update.
- (econnect, eopen_wr, eopen_rd, efinish): New functions.
- (struct epoint): Remove FD field.
- Rename RMT_FILE & RMT_HOST to FILE & HOST.
- (main): Remove array of epoints & loops, & just use RD & WR,
- calling the e* functions above.
- Support DST being a directory.
-
-Wed May 14 15:22:17 1997 Miles Bader <miles@gnu.ai.mit.edu>
-
- * open.c (ftp_conn_login): Correct defaulting of username.
-
-Tue May 13 16:37:18 1997 Miles Bader <miles@gnu.ai.mit.edu>
-
- * unix.c (ftp_conn_unix_cont_get_stats): Clean up our ftp transfer
- when we're done.
-
-Mon May 12 10:57:54 1997 Miles Bader <miles@gnu.ai.mit.edu>
-
- * unix.c (ftp_conn_unix_cont_get_stats): Only abort when
- necessary.
- (ftp_conn_unix_start_get_stats): Allocate enough memory for REQ.
-
- * cmd.c (ftp_conn_abort): Use ftp_conn_get_raw_reply instead of
- ftp_conn_get_reply. Accept REPLY_ABORT_OK as a final reply.
- * reply.c (ftp_conn_get_raw_reply): Renamed from ftp_conn_get_reply.
- (ftp_conn_get_reply): New function.
- * ftpconn.h (ftp_conn_get_raw_reply): New declaration.
-
-Fri May 9 17:55:25 1997 Miles Bader <miles@gnu.ai.mit.edu>
-
- * priv.h (REPLY_ABORT_OK): New macro.
-
- * ftpdir.c (ftpdir2): Deal with new semantics of CONTENTS argument
- to ftp_conn_get_stats.
- * unix.c (struct get_stats_state): Add ADDED_SLASH field.
- (ftp_conn_unix_start_get_stats): Don't use asprintf.
- Set ADDED_SLASH field.
- (ftp_conn_unix_cont_get_stats): Remove any initial `./' we added.
- Abort CONN if we return an error.
-
-Thu May 8 14:22:08 1997 Miles Bader <miles@gnu.ai.mit.edu>
-
- * open.c (ftp_conn_open): Cast 2nd arg in connect call to `struct
- sockaddr *'.
- * cmd.c: Include <string.h>.
-
- * stats.c (ftp_conn_start_get_stats, ftp_conn_get_stats):
- Rename FORCE_DIR argument to CONTENTS.
- * ftpconn.h (ftp_conn_get_stats, ftp_conn_start_get_stats,
- ftp_conn_unix_start_get_stats): Rename FORCE_DIR argument to CONTENTS.
- (struct ftp_conn_syshooks): Rename FORCE_DIR argument of
- START_GET_STATS field type to CONTENTS.
- * unix.c (struct get_stats_state): Add CONTENTS field.
- (ftp_conn_unix_start_get_stats): Initialize it.
- Change FORCE_DIR argument to CONTENTS.
- Pass -A flag.
- Prepend ./ to NAME if it doesn't contain a slash.
- Reject names containg possible meta-characters.
-
- * unix.c: Only include <hurd/hurd_types.h> if
- HAVE_HURD_HURD_TYPES_H is defined.
- (parse_dir_entry): Only set stat->st_fstype if FSTYPE_FTP is defined.
- Only set stat->st_author if HAVE_STAT_ST_AUTHOR is defined.
- * Makefile (CPPFLAGS): Add -DHAVE_HURD_HURD_TYPES_H.
-
-Wed May 7 12:35:21 1997 Miles Bader <miles@gnu.ai.mit.edu>
-
- * Makefile (SRCS): ftpconn.c replaced by resulting split files.
- * errs.c: New file.
- * ftpconn.c (ftp_conn_poss_file_errs): Moved to errs.c.
- * open.c: New file.
- * ftpconn.c (ftp_conn_login, ftp_conn_hello, ftp_conn_set_syshooks,
- ftp_conn_choose_syshooks, ftp_conn_sysify, ftp_conn_open,
- ftp_conn_close): Functions moved to open.c.
- * ftpconn.c (ftp_conn_poss_file_errs): Renamed from
- poss_file_errs; all references changed.
- Made not static.
- * xfer.c: New file.
- * ftpconn.c (ftp_conn_finish_transfer, ftp_conn_start_transfer,
- ftp_conn_open_data, ftp_conn_start_retrieve, ftp_conn_start_list,
- ftp_conn_start_dir, ftp_conn_start_store): Functions moved to xfer.c.
- * addr.c: New file.
- * ftpconn.c p(ftp_conn_get_pasv_addr, ftp_conn_send_actv_addr):
- Functions moved to addr.c.
- * create.c: New file.
- * ftpconn.c (ftp_conn_create, ftp_conn_free): Functions moved to create.c.
- * priv.h: New file.
- * xinl.c: New file.
- * ftpconn.c (unexpected_reply): Function moved to priv.h.
- (REPLY_*): Macros moved to priv.h.
- * rmt.c: New file.
- * ftpconn.c (ftp_conn_rmt_copy, ftp_conn_rmt_transfer): Functions
- moved to rmt.c.
- * cwd.c: New file.
- * ftpconn.c (ftp_conn_cdup, ftp_conn_cwd, ftp_conn_get_cwd,
- _cache_cwd): Functions moved to cwd.c.
- * set-type.c: New file.
- * ftpconn.c (ftp_conn_set_type): Function moved to set-type.c.
- * stats.c: New file.
- * ftpconn.c (ftp_conn_start_get_stats, ftp_conn_cont_get_stats,
- ftp_conn_get_stats): Functions moved to stats.c.
-
- * names.c: New file.
- * ftpconn.h (ftp_conn_add_name_fun_t): New type.
- (ftp_conn_start_get_names, ftp_conn_cont_get_names,
- ftp_conn_get_names): New functions.
-
- * unix.c (struct get_stats_state): Add NAME_LEN & NAME_ALLOCED fields.
- (ftp_conn_unix_cont_get_stats): Retain S's name buffer between
- entries, only growing it when needed; leave any copying to the client.
- * ftpconn.h (ftp_conn_add_stat_fun_t): Make first 3 params const.
- Update comment to say they should be copied if retained.
-
- * Makefile (installhdrsubdir): New variable.
diff --git a/libftpconn/fname.c b/libftpconn/fname.c
index afa0852b..3be6eeec 100644
--- a/libftpconn/fname.c
+++ b/libftpconn/fname.c
@@ -23,7 +23,7 @@
#include "ftpconn.h"
/* Give a name which refers to a directory file, and a name in that
- directory, this should return in COMPOSITE the composite name refering to
+ directory, this should return in COMPOSITE the composite name referring to
that name in that directory, in malloced storage. */
error_t
ftp_conn_append_name (struct ftp_conn *conn,
diff --git a/libftpconn/ftpconn.h b/libftpconn/ftpconn.h
index e445130e..558ff8f9 100644
--- a/libftpconn/ftpconn.h
+++ b/libftpconn/ftpconn.h
@@ -91,7 +91,7 @@ struct ftp_conn_syshooks
ftp_conn_add_stat_fun_t add_stat, void *hook);
/* Give a name which refers to a directory file, and a name in that
- directory, this should return in COMPOSITE the composite name refering
+ directory, this should return in COMPOSITE the composite name referring
to that name in that directory, in malloced storage. */
error_t (*append_name) (struct ftp_conn *conn,
const char *dir, const char *name,
@@ -371,7 +371,7 @@ error_t ftp_conn_get_names (struct ftp_conn *conn, const char *name,
ftp_conn_add_name_fun_t add_name, void *hook);
/* Give a name which refers to a directory file, and a name in that
- directory, this should return in COMPOSITE the composite name refering to
+ directory, this should return in COMPOSITE the composite name referring to
that name in that directory, in malloced storage. */
error_t ftp_conn_append_name (struct ftp_conn *conn,
const char *dir, const char *name,
diff --git a/libftpconn/reply.c b/libftpconn/reply.c
index 4f30f751..d39cdb02 100644
--- a/libftpconn/reply.c
+++ b/libftpconn/reply.c
@@ -78,7 +78,7 @@ ftp_conn_getline (struct ftp_conn *conn, const char **line, size_t *line_len)
offs = nl + 1 - l; /* Consume the line */
/* Null terminate the result by overwriting the newline; if
- there's a CR preceeding it, get rid of that too. */
+ there's a CR preceding it, get rid of that too. */
if (nl > *line && nl[-1] == '\r')
nl--;
*nl = '\0';
diff --git a/libftpconn/unix.c b/libftpconn/unix.c
index e2a460c7..28efefdd 100644
--- a/libftpconn/unix.c
+++ b/libftpconn/unix.c
@@ -510,12 +510,13 @@ drwxrwxrwt 7 34 archive 512 May 1 14:28 /tmp
else
tm.tm_year = PARSE_INT () - 1900;
- stat->st_mtime = mktime (&tm);
- if (stat->st_mtime == (time_t)-1)
+ stat->st_mtim.tv_sec = mktime (&tm);
+ if (stat->st_mtim.tv_sec == (time_t)-1)
return EGRATUITOUS;
/* atime and ctime are the same as mtime. */
- stat->st_atime = stat->st_ctime = stat->st_mtime;
+ stat->st_atim.tv_sec = stat->st_ctim.tv_sec = stat->st_mtim.tv_sec;
+ stat->st_atim.tv_nsec = stat->st_ctim.tv_nsec = stat->st_mtim.tv_nsec = 0;
/* Update *LINE to point to the filename. */
SKIP_WS ();
@@ -731,7 +732,7 @@ finished:
}
/* Give a name which refers to a directory file, and a name in that
- directory, this should return in COMPOSITE the composite name refering to
+ directory, this should return in COMPOSITE the composite name referring to
that name in that directory, in malloced storage. */
error_t
ftp_conn_unix_append_name (struct ftp_conn *conn,
diff --git a/libhurdbugaddr/ChangeLog b/libhurdbugaddr/ChangeLog
deleted file mode 100644
index 32c47aec..00000000
--- a/libhurdbugaddr/ChangeLog
+++ /dev/null
@@ -1,21 +0,0 @@
-2003-09-29 Marcus Brinkmann <marcus@gnu.org>
-
- * bugaddr.c: Fix last change.
-
-2003-09-17 Alfred M. Szmidt <ams@kemisten.nu>
-
- * bugaddr.c: Update to "<bug-hurd@gnu.org>".
-
-Sun Jul 5 21:23:58 1998 Thomas Bushnell, n/BSG <tb@mit.edu>
-
- * bugaddr.c: Update to bug-hurd@gnu.org. Reported by Joel
- N. Weber II (devnull@gnu.org).
-
-Tue Sep 3 14:48:26 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * bugaddr.c: Specify correct bug-reporting address.
-
-Sun Sep 1 21:42:11 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * Makefile, bugaddr.c: New files.
-
diff --git a/libihash/ChangeLog b/libihash/ChangeLog
deleted file mode 100644
index 22e40def..00000000
--- a/libihash/ChangeLog
+++ /dev/null
@@ -1,82 +0,0 @@
-2006-07-11 Samuel Thibault <samuel.thibault@ens-lyon.org>
-
- * ihash.c (add_one): Cast VALUE with (hurd_ihash_locp_t *) instead of
- (hurd_ihash_locp_t).
-
-2004-04-21 Marcus Brinkmann <marcus@gnu.org>
-
- * ihash.h (HURD_IHASH_ITERATE): Don't use increment operator in
- assignment, but just add one. Reported by Ognyan Kulev.
-
-2004-04-01 Marco Gerards <metgerards@student.han.nl>
-
- * ihash.c (hurd_ihash_remove): Don't look for the index when the
- hashtable is empty.
-
- * ihash.h (HURD_IHASH_ITERATE): Doc fix.
-
-2004-03-07 Marcus Brinkmann <marcus@gnu.org>
-
- * ihash.h (HURD_IHASH_NO_LOCP): Change to INTPTR_MIN.
- (struct hurd_ihash): Change type of locp_offset from off_t to
- intptr_t.
- (hurd_ihash_init): Likewise in prototype.
- (hurd_ihash_create): Likewise in prototype.
- * ihash.c (hurd_ihash_init): Likewise in definition.
- (hurd_ihash_create): Likewise in definition.
-
-2003-08-17 Marcus Brinkmann <marcus@gnu.org>
-
- * ihash.c: Rewritten.
- * ihash.h: Rewritten.
- * Makefile (SRCS): Remove sizes.c.
- (LCLHDRS): Remove priv.h.
- * primes.c, sizes.c, priv.h: Files removed.
-
-2001-08-15 Roland McGrath <roland@frob.com>
-
- * sizes.c: New file, a list of prime numbers useful for table sizes.
- * priv.h (_ihash_sizes, _ihash_nsizes): Declare.
- (_ihash_nextprime): Don't.
- * ihash.c (ihash_add): Select sizes from the _ihash_sizes array
- instead of using _ihash_nextprime.
- * Makefile: Clean up whitespace, reorder all the variable definitions.
- (SRCS): Remove primes.c, add sizes.c instead.
- (OBJS): Define dynamically.
-
-1999-03-07 Roland McGrath <roland@baalperazim.frob.com>
-
- * primes.c: Fix last change.
-
-Fri Mar 5 17:13:04 1999 Thomas Bushnell, BSG <tb@mit.edu>
-
- * primes.c (_ihash_nextprime): Use a dynamically-sized array for
- `seive' instead of alloca, so that if we are looping we won't
- allocate more stack than necessary. Suggested by wesommer@mit.edu
- (Bill Sommerfeld).
-
-1997-06-20 Miles Bader <miles@gnu.ai.mit.edu>
-
- * ihash.c (ihash_create): Initialize CLEANUP & CLEANUP_ARG fields.
-
-Thu Apr 11 15:26:18 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * ihash.c: Include "priv.h".
- * primes.c: Likewise.
- * priv.h: New file.
- * Makefile (LCLHDRS): Add priv.h.
- * primes.c (_ihash_nextprime): Renamed from nextprime.c. All
- callers changed.
-
-Thu Mar 7 15:01:46 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * primes.c: Include <spin_lock.h>.
- (table_lock): New variable.
- (nextprime): Lock table_lock around operation of routine.
-
-Sun Aug 6 15:23:13 1995 Miles Bader <miles@churchy.gnu.ai.mit.edu>
-
- * ihash.c (ihash_locp_remove): Get rid of the optimization to use
- HASH_EMPTY instead of HASH_DEL when the next position on the chain
- is empty -- different hash chains may share this cell, and have
- different next positions.
diff --git a/libiohelp/ChangeLog b/libiohelp/ChangeLog
deleted file mode 100644
index 3916e351..00000000
--- a/libiohelp/ChangeLog
+++ /dev/null
@@ -1,146 +0,0 @@
-2002-11-01 Roland McGrath <roland@frob.com>
-
- * shared.c (iohelp_fetch_shared_data, iohelp_put_shared_data): Put
- __attribute__((weak)) directly in the defns.
-
-2002-05-11 Marcus Brinkmann <marcus@gnu.org>
-
- * handle_io_release_conch.c (iohelp_handle_io_release_conch):
- New variable USER_SH. Hold USER_SH->lock while checking conch
- status.
-
-2002-05-07 Roland McGrath <roland@frob.com>
-
- * iouser-reauth.c (iohelp_reauth): u_int -> size_t
-
-2002-05-04 Roland McGrath <roland@frob.com>
-
- * iouser-create.c (iohelp_create_complex_iouser): Add const to args.
- * iohelp.h: Update decl.
-
- * iouser-restrict.c: New file.
- * Makefile (SRCS): Add it.
- * iohelp.h: Declare iohelp_restrict_iouser.
-
-2001-04-21 Neal H Walfield <neal@cs.uml.edu>
-
- * iohelp.h (iohelp_create_iouser): Change declaration
- such that as error_t is now returned and the iouser is
- a parameter.
- (iohelp_create_empty_iouser): New funtion.
- (iohelp_create_simple_iouser): New function.
- (iohelp_create_complex_iouser): New funtion.
- * iouser-create.c (iohelp_create_iouser): Implement new
- semantics.
- (iohelp_create_empty_iouser): Implement new function.
- (iohelp_create_simple_iouser): Implement new function.
- (iohelp_create_complex_iouser): Implement new function.
- * iouser-dup.c (iohelp_dup_iouser): Implement new semantics.
- * iouser-reauth.c (iohelp_reauth): Implement new semantics.
-
-1999-07-11 Thomas Bushnell, BSG <tb@mit.edu>
-
- * return-buffer.c: Include <sys/mman.h>.
-
- * iouser-reauth.c (iohelp_reauth): Cast first arg to munmap
- correctly.
-
-1999-07-10 Roland McGrath <roland@baalperazim.frob.com>
-
- * iouser-reauth.c: Add #include <sys/mman.h> for munmap decl.
-
-1999-07-09 Thomas Bushnell, BSG <tb@mit.edu>
-
- * return-buffer.c (iohelp_return_malloced_buffer): Use mmap
- instead of vm_allocate.
-
-1999-07-03 Thomas Bushnell, BSG <tb@mit.edu>
-
- * iouser-reauth.c (iohelp_reauth): Use munmap instead of
- vm_deallocate.
-
-1998-08-21 Roland McGrath <roland@baalperazim.frob.com>
-
- * Makefile (SRCS): Add return-buffer.c.
-
-1998-08-20 Roland McGrath <roland@baalperazim.frob.com>
-
- * return-buffer.c (iohelp_return_malloced_buffer): Moved here from
- ../libfshelp/return-buffer.c and renamed from fshelp to iohelp.
- * iohelp.h (iohelp_return_malloced_buffer): Declare it.
-
-Mon Nov 18 16:37:59 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * iouser-reauth.c: Include <hurd/auth.h>.
-
-Sat Nov 16 17:54:50 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * Makefile (SRCS): Add shared.c.
- * shared.c: New file.
-
-Fri Nov 15 13:39:46 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * iouser-create.c (iohelp_create_iouser): Set NEW->hook to zero.
- * iouser-dup.c (iohelp_dup_iouser): Likewise.
-
-Tue Nov 12 21:51:29 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * iohelp.h: Include <idvec.h>.
-
-Wed Nov 6 19:26:14 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * Makefile (SRCS): Add iouser-create.c, iouser-dup.c
- iouser-reauth.c, and iouser-free.c.
- (OBJS): Compute automatically.
-
- * iohelp.h (iohelp_create_user): New function.
- * iouser-create.c: New file.
-
-Tue Nov 5 21:51:24 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * iohelp.h (struct iouser): New type.
- (iohelp_dup_iouser, iohelp_free_iouser, iohelp_reauth): New
- functions.
- * iouser-dup.c, iouser-reauth.c, iouser-free.c: New files.
-
-Thu Sep 12 16:18:46 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * Makefile (HURDLIBS): New variable.
- (libfshelp.so): Delete special dependency.
-
-Thu May 9 12:42:51 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * Makefile: All occurrences of `ioserver' replaced with `iohelp'.
-
-Mon May 6 16:27:20 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * iohelp.h: Renamed from `ioserver.h'. All local includes
- updated.
- * get_conch.c: All occurrences of `ioserver' replaced with
- `iohelp'.
- * handle_io_get_conch.c: Likewise.
- * handle_io_release_conch.c: Likewise.
- * initialize_conch.c: Likewise.
- * verify_user_conch.c: Likewise.
- * iohelp.h: Likewise.
-
-Mon Oct 9 14:57:48 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * Makefile: Specify shared library dependencies.
-
-Thu Jul 6 15:35:56 1995 Michael I Bushnell <mib@duality.gnu.ai.mit.edu>
-
- * Makefile: Removed dependencies that are now automatically
- generated.
-
-Fri Jul 22 11:43:56 1994 Michael I Bushnell <mib@geech.gnu.ai.mit.edu>
-
- * Makefile: Converted to new scheme.
-
-Tue Jul 5 14:13:09 1994 Michael I Bushnell (mib@churchy.gnu.ai.mit.edu)
-
- * Makefile (TAGSHDRS): New variable.
-
-Thu May 5 07:48:45 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
-
- * Makefile: Change uses of $(headers) to $(includedir).
diff --git a/libiohelp/Makefile b/libiohelp/Makefile
index 54fb4343..ba73282b 100644
--- a/libiohelp/Makefile
+++ b/libiohelp/Makefile
@@ -1,5 +1,5 @@
-#
-# Copyright (C) 1993,94,95,96,98,2002 Free Software Foundation, Inc.
+# Copyright (C) 1993, 1994, 1995, 1996, 1998, 2002, 2008 Free Software
+# Foundation, Inc.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
@@ -24,7 +24,7 @@ SRCS = get_conch.c handle_io_get_conch.c handle_io_release_conch.c \
shared.c return-buffer.c
OBJS = $(SRCS:.c=.o)
LCLHDRS = iohelp.h
-HURDLIBS = threads
+HURDLIBS = threads shouldbeinlibc
libname = libiohelp
installhdrs = iohelp.h
diff --git a/libnetfs/ChangeLog b/libnetfs/ChangeLog
deleted file mode 100644
index da9b28c9..00000000
--- a/libnetfs/ChangeLog
+++ /dev/null
@@ -1,752 +0,0 @@
-2006-06-15 Thomas Schwinge <tschwinge@gnu.org>
-
- * io-seek.c (netfs_S_io_seek): Return EINVAL if file pointer would
- become negative.
-
-2004-09-12 Marco Gerards <metgerards@student.han.nl>
-
- * io-select.c: Include <hurd/ports.h>.
- (netfs_S_io_select): Add arguments `reply' and `replytype'.
- * mutations.h (IO_SELECT_REPLY_PORT): New macro.
-
-2004-07-27 Roland McGrath <roland@frob.com>
-
- * misc.h (OPENONLY_STATE_MODES): Remove O_NONBLOCK.
-
-2004-02-10 Roland McGrath <roland@frob.com>
-
- * runtime-argp.c (netfs_runtime_argp): Include <argp.h>.
-
-2002-06-13 Roland McGrath <roland@frob.com>
-
- * dir-readdir.c (netfs_S_dir_readdir): Revert last change.
-
-2002-06-08 Roland McGrath <roland@frob.com>
-
- * io-identity.c (netfs_S_io_identity): Use ino_t for FILENO.
-
- * dir-readdir.c (netfs_S_dir_readdir): Use vm_size_t for AMT.
-
-2002-06-07 Roland McGrath <roland@frob.com>
-
- * netfs.h (struct node): Use io_statbuf_t instead of struct stat.
- (netfs_attempt_statfs): Use fsys_statfsbuf_t instead of struct statfs.
- (struct peropen): Use loff_t instead of off_t.
- (netfs_attempt_read, netfs_attempt_write): Likewise.
- (netfs_attempt_set_size, netfs_file_get_storage_info): Likewise.
-
-2002-05-23 Marcus Brinkmann <marcus@gnu.org>
-
- * io-read.c (netfs_S_io_read): If desired amount is larger than
- symlink length, truncate amount. Actually use WHOLE_LINK to store
- link target temporarily. When reading the link target directly,
- update *DATALEN.
-
-2002-05-13 Roland McGrath <roland@frob.com>
-
- * netfs.h (struct node): New member `nn_translated'.
- * dir-lookup.c (netfs_S_dir_lookup): Examine that in place of
- nn_stat.st_mode to decide if there is a passive translator.
-
-2002-05-13 Marcus Brinkmann <marcus@gnu.org>
-
- * io-version.c: New file.
- * Makefile (IOSRCS): Add io-version.c.
- * fsstubs.c (netfs_S_io_server_version): Function removed.
- * netfs.h (netfs_server_name, netfs_server_version): New external
- variables to be defined by the user.
-
-2002-05-11 Roland McGrath <roland@frob.com>
-
- * trans-callback.c (_netfs_translator_callback1_fn): Add an assert
- that netfs_get_translator not fail with EOPNOTSUPP.
-
-2002-05-07 Roland McGrath <roland@frob.com>
-
- * fsys-getroot.c (netfs_S_fsys_getroot): Fix arg type in decl.
- * append-std-options.c (netfs_append_std_options): Likewise.
-
- * file-exec.c (netfs_S_file_exec): u_int -> size_t in decl.
- * netfs.h (netfs_append_args): unsigned -> size_t in decl.
-
-2002-05-04 Roland McGrath <roland@frob.com>
-
- * io-restrict-auth.c (netfs_S_io_restrict_auth): Use
- iohelp_restrict_iouser.
-
-2002-03-9 James A. Morrison <ja2morri@uwaterloo.ca>
-
- * init-startup (netfs_startup): Use err, not errno.
-
-2001-12-22 Roland McGrath <roland@frob.com>
-
- * priv.h (begin_using_protid_port): Change extern inline decl
- into static inline with __attribute__ ((unused))
- (end_using_protid_port): Likewise.
-
-2001-08-31 Marcus Brinkmann <marcus@gnu.org>
-
- * file-get-translator.c (netfs_S_file_get_translator): If
- asprintf() fails, set ERR to errno.
- * dir-lookup.c (netfs_S_dir_lookup): Catch if asprintf() fails and
- return ENOMEM. If netfs_make_protid() fails, set ERROR to errno,
- not ENOMEM. Do this before freeing USER.
- * dir-mkfile.c (netfs_S_dir_mkfile): If netfs_make_protid() fails,
- set ERROR to errno and free USER.
- * file-exec.c (netfs_S_file_exec): Likewise.
- Reported by Igor Khavkine <i_khavki@alcor.concordia.ca>.
-
-2001-06-21 Neal H Walfield <neal@cs.uml.edu>
-
- * file-getcontrol.c (netfs_S_file_getcontrol): When checking if
- we can give the control port out, use fshelp_iscontroller rather
- than doing the check by hand.
-
-2001-04-01 Neal H Walfield <neal@cs.uml.edu>
-
- * dir-lookup.c (netfs_S_dir_lookup): Use
- iohelp_create_empty_iouser. Use iohelp_dup_iouser
- as per the new semantics.
- * dir-mkfile.c (netfs_S_dir_mkfile): Use iohelp_dup_iouser
- as per the new semantics.
- * file-exec.c (netfs_S_file_exec): Likewise.
- * file-reparent.c (netfs_S_file_reparent): Likewise.
- * fsys-getroot.c (netfs_S_fsys_getroot): Use
- iohelp_create_complex_iouser.
- * fsys-syncfs.c (netfs_S_fsys_syncfs): Use
- iohelp_create_simple_iouser.
- * io-duplicate.c (netfs_S_io_duplicate): Use iohelp_dup_iouser
- as per the new semantics.
- * io-reauthenticate.c (netfs_S_io_reauthenticate): Use
- iohelp_reauth as per the new semantics.
- * io-restrict-auth.c (netfs_S_io_restrict_auth): Use
- iohelp_create_complex_iouser. Check return values.
- * trans-callback.c (_netfs_transcallback2_fn): Use
- iohelp_create_simple_iouser.
-
-2001-06-15 Neal H Walfield <neal@cs.uml.edu>
-
- * file-set-translator.c (netfs_S_file_set_translator): If
- FS_TRANS_ORPHAN is set, do not ask the active translator to go
- away, just disconnect it.
-
-2001-04-01 Roland McGrath <roland@frob.com>
-
- * Makefile (FSYSSRCS): Add fsys-goaway.c.
- * fsys-goaway.c: Don't include "priv.h" here.
-
-2001-03-31 Neal H Walfield <neal@cs.uml.edu>
-
- * fsysstubs.c (netfs_S_fsys_goaway): Moved to ...
- * fsys-goaway.c: New file. Actually implement it.
- * shutdown.c (netfs_shutdown): Likewise.
- * Makefile (fsys-MIGSFLAGS): Add -DREPLY_PORTS, which we want for
- netfs_S_fsys_goaway.
- * fsys-get-options.c (netfs_S_fsys_getoptions): Add reply port
- arguments to declaration.
- * fsys-getroot.c (netfs_S_fsys_getroot): Likewise.
- * fsys-set-options.c (netfs_S_fsys_set_options): Likewise.
- * fsys-syncfs.c (netfs_S_fsys_syncfs): Likewise.
- * fsysstubs.c (netfs_S_fsys_getfile): Likewise.
- (netfs_S_fsys_getpriv): Likewise.
- (netfs_S_fsys_forward): Likewise.
- (netfs_S_fsys_startup): Likewise.
-
- * Makefile (MIGSTUBS): Add fsys_replyUser.o.
-
-2001-01-15 Neal H Walfield <neal@cs.uml.edu>
-
- * netfs.h: Added netfs_get_storage_info.
- * file-get-storage-info.c (netfs_S_get_storage_info): Calls
- netfs_get_storage_info instead of providing default response.
- * file-get-storage-info-default.c: New file.
- (netfs_get_storage_info): Provides default response.
-
-2001-01-30 Neal H Walfield <neal@cs.uml.edu>
-
- * netfs.h: Fix comment for netfs_nref (finally).
-
-2001-01-14 Neal H Walfield <neal@cs.uml.edu>
-
- * netfs.h: Documentation fixes.
-
-2000-12-30 Marcus Brinkmann <marcus@gnu.org>
-
- * netfs.h: Revert doc "fix" of netfs_attempt_chmod.
-
-2000-12-30 Marcus Brinkmann <marcus@gnu.org>
-
- * netfs.h: Merge Neals words into documentation of netfs_nput,
- netfs_nrele, netfs_nref.
-
-2000-12-30 Marcus Brinkmann <marcus@gnu.org>
-
- * netfs.h: Adjust comment fixes by last change to be more in line
- with similar comments elsewhere.
- * make-node.c (netfs_make_node): Return 0 if malloc does.
- Reported by Neal H Walfield <neal@cs.uml.edu>.
-
-2000-12-29 Neal H Walfield <neal@cs.uml.edu>
-
- * dir-lookup.c (netfs_S_dir_lookup): Do not bother zeroing np, it
- happens later anyway. Replace bcopy with memcpy.
- * file-get-translator.c (netfs_S_file_get_translator): Replace
- bcopy with memcpy.
- * io-seek.c (netfs_S_io_seek): Only get the lock if we need it.
- * io-stat.c (netfs_S_io_stat): Replace bcopy with memcpy.
- * io-write.c (netfs_S_io_write): Wait until the lock is needed.
- * netfs.h: Complete documentation revision. The locking protocol
- is now very explicit.
- * nput.c (netfs_nput): Added comment.
- * nrele.c (netfs_nrele): Likewise.
- * set-get-trans.c: Likewise.
-
-2000-03-17 Roland McGrath <roland@baalperazim.frob.com>
-
- * file-exec.c (netfs_S_file_exec): Fix typo and braino in last change.
-
-2000-03-17 Thomas Bushnell, BSG <tb@mit.edu>
-
- * file-exec.c (netfs_S_file_exec): Don't use MAKE_SEND in Hurd RPC.
- * init-startup.c (netfs_startup): Likewise.
-
-2000-03-17 Roland McGrath <roland@baalperazim.frob.com>
-
- * io-reauthenticate.c (netfs_S_io_reauthenticate): Use
- ports_get_send_right.
-
- * dir-lookup.c (netfs_S_dir_lookup): Use ports_get_send_right.
- Deallocate DIRPORT after fshelp_fetch_root.
-
-2000-01-25 Roland McGrath <roland@baalperazim.frob.com>
-
- * dir-lookup.c (netfs_S_dir_lookup): Follow symlink despite flags if
- MUSTBEDIR is set (i.e. there was a trailing slash).
-
-1999-10-11 Roland McGrath <roland@baalperazim.frob.com>
-
- * dir-readdir.c (netfs_S_dir_readdir): Take new DATA_DEALLOC parameter.
-
-1999-09-13 Roland McGrath <roland@baalperazim.frob.com>
-
- * iostubs.c: Reverted changes related to io_map_segment.
-
-1999-09-09 Thomas Bushnell, BSG <tb@mit.edu>
-
- * fsstubs.c (netfs_S_io_pathconf): Delete function.
- * io-pathconf.c: New file.
- * Makefile (IOSRCS): Add io-pathconf.c.
-
-1999-09-07 Thomas Bushnell, BSG <tb@mit.edu>
-
- * iostubs.c (netfs_S_io_map_segment): New function.
-
-1999-07-11 Roland McGrath <roland@baalperazim.frob.com>
-
- * file-get-storage-info.c: Add #include <sys/mman.h>.
- * file-get-translator.c: Likewise.
-
-1999-07-10 Roland McGrath <roland@baalperazim.frob.com>
-
- * io-read.c: Add #include <sys/mman.h> for munmap decl.
- * release-protid.c: Likewise.
-
-1999-07-09 Thomas Bushnell, BSG <tb@mit.edu>
-
- * file-get-storage-info.c (netfs_S_file_get_storage_info): Use
- mmap instead of vm_allocate.
- * file-get-translator.c (netfs_S_file_get_translator): Likewise.
- * io-read.c (netfs_S_io_read): Likewise.
-
-1999-07-03 Thomas Bushnell, BSG <tb@mit.edu>
-
- * io-read.c (netfs_S_io_read): Use munmap instead of
- vm_deallocate.
- * release-protid.c (netfs_release_protid): Likewise.
-
-1999-07-01 Thomas Bushnell, BSG <tb@mit.edu>
-
- * nref.c: New file; guts from netfs.h.
- * nrele.c: Likewise.
- * nput.c: Likewise.
- * netfs.h (netfs_nref, netfs_nrele, netfs_nput): Replace inline
- definitions with normal declarations.
- (NETFS_EI): Remove macro.
- * netfs.c: Deleted file.
- * Makefile (OTHERSRCS): Add nref.c, nrele.c, nput.c. Remove
- netfs.c.
-
-Thu Mar 4 07:18:21 1999 Joel N. Weber II <devnull@theobromine.ai.mit.edu>
-
- * dir-lookup.c (netfs_S_dir_lookup): Only set newnode to 1 if the
- lookup does not need to be retried as a result of getting EEXIST.
-
-1999-02-28 Roland McGrath <roland@baalperazim.frob.com>
-
- * io-revoke.c (netfs_S_io_revoke): Use ports_class_iterate.
-
-Mon Feb 22 04:30:18 1999 Thomas Bushnell, BSG <tb@mit.edu>
-
- * io-revoke.c (netfs_S_io_revoke): Protect the revocation by
- blocking other rpcs.
-
-Sat Feb 20 20:54:26 1999 Thomas Bushnell, BSG <tb@mit.edu>
-
- * io-revoke.c (netfs_S_io_revoke): Release lock before iteration.
-
-1999-02-16 Roland McGrath <roland@baalperazim.frob.com>
-
- * io-revoke.c (netfs_S_io_revoke): Fix typos.
-
-Tue Feb 16 05:37:03 1999 Thomas Bushnell, BSG <tb@mit.edu>
-
- * io-revoke.c: New file.
- * Makefile (IOSRCS): Add iorevoke.c.
-
-Sun Jan 31 18:27:42 1999 Thomas Bushnell, BSG <tb@mit.edu>
-
- * file-utimes.c (netfs_S_file_utimes): Understand new semantics
- for setting to current time.
- * netfs.h (netfs_attempt_utimes): Update documentation.
-
-1999-01-22 Roland McGrath <roland@baalperazim.frob.com>
-
- * file-set-translator.c: Remove makedev, major, minor macro definition.
- * dir-lookup.c: Likewise.
-
-1998-08-20 Roland McGrath <roland@baalperazim.frob.com>
-
- * file-get-fs-options.c (netfs_S_file_get_fs_options):
- fshelp_return_malloced_buffer renamed to iohelp_*.
- * fsys-get-options.c (netfs_S_fsys_get_options): Likewise.
-
-Tue Jul 14 16:30:48 1998 Thomas Bushnell, n/BSG <tb@mit.edu>
-
- * dir-lookup.c (netfs_S_dir_lookup): Don't require the node to be
- a directory in the null pathname case.
-
-1997-09-09 Miles Bader <miles@gnu.ai.mit.edu>
-
- * dir-lookup.c (netfs_S_dir_lookup): Fix type signature of
- short_circuited_callback1.
-
-1997-09-05 Miles Bader <miles@gnu.ai.mit.edu>
-
- * dir-lookup.c (netfs_S_dir_lookup): Re-aquire the lock on DNP when
- looping to follow a symlink.
-
-1997-08-29 Miles Bader <miles@gnu.ai.mit.edu>
-
- * file-reparent.c (netfs_S_file_reparent): Use a copy of
- CRED->user when creating NEW_CRED.
-
-1997-08-28 Miles Bader <miles@gnu.ai.mit.edu>
-
- * dir-lookup.c (netfs_S_dir_lookup): Don't lock DNP or assume it's
- locked when it shouldn't be.
-
-Wed Aug 20 14:05:38 1997 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * init-loop.c (netfs_server_loop): New args for
- ports_manage_port_operations_multithread.
-
-Mon Jul 7 16:25:49 1997 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * file-exec.c: Include <fcntl.h> instead of <fcntlbits.h>.
- Suggested by Marcus G. Daniels (marcus@cathcart.sysc.pdx.edu).
-
-1997-06-11 Miles Bader <miles@gnu.ai.mit.edu>
-
- * trans-callback.c, set-get-trans.c: New files.
- * Makefile (OTHERSRCS): Add trans-callback.c & set-get-trans.c.
-
-1997-06-09 Miles Bader <miles@gnu.ai.mit.edu>
-
- * netfs.h (struct node): Remove istranslated field.
- (netfs_get_translator): New declaration.
-
- * dir-lookup.c (netfs_S_dir_lookup): Use S_IPTRANS bit in nn_stat
- st_mode field rather than istranslated field.
- * fsys-getroot.c (netfs_S_fsys_getroot): Likewise.
- * file-set-translator.c (netfs_S_file_set_translator): Likewise.
- * io-stat.c (netfs_S_io_stat): Set S_IATRANS & S_IROOT bits in
- st_mode field of returned buffer if appropriate.
-
- * init-startup.c (netfs_startup): Supply program name with error
- messages.
-
-Tue May 27 11:55:17 1997 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * file-chmod.c (netfs_S_file_chmod): Turn off any read-only bits.
-
-Fri Feb 28 21:14:20 1997 Miles Bader <miles@gnu.ai.mit.edu>
-
- * file-reparent.c (netfs_S_file_reparent): Implement.
-
-Sun Feb 23 16:27:34 1997 Miles Bader <miles@gnu.ai.mit.edu>
-
- * dir-mkfile.c (netfs_S_dir_mkfile): Pass context arg to
- netfs_make_peropen instead of parent node.
- * file-exec.c (netfs_S_file_exec): Likewise.
- * dir-lookup.c (netfs_S_dir_lookup): Implement shadow root
- .. traversal.
- Use context po argument to netfs_make_peropen & as cookie to
- fshelp_fetch_root, instead of parent node.
- * fsys-getroot.c (netfs_S_fsys_getroot): Add PEROPEN_CONTEXT
- variable, and pass it to netfs_make_peropen & fshelp_fetch_root.
- * netfs.h (struct peropen): Add shadow_root_parent & shadow_root
- fields.
- Removed depth field. Rename dotdotnode field to root_parent.
- (netfs_make_peropen): Add and use CONTEXT parameter.
- * make-peropen.c (netfs_make_peropen): Add and use CONTEXT parameter.
- * release-peropen.c (netfs_release_peropen): Finalize new state.
-
-Wed Feb 19 23:58:40 1997 Miles Bader <miles@gnu.ai.mit.edu>
-
- * io-read.c (netfs_S_io_read): Support reading from symlinks.
-
-Fri Feb 14 12:34:11 1997 Miles Bader <miles@gnu.ai.mit.edu>
-
- * file-reparent.c (diskfs_S_file_reparent): New function, from
- dir-reparent.c.
- * dir-reparent.c: File removed.
- * Makefile (FSSRCS): dir-reparent.c replaced by file-reparent.c.
-
-Mon Jan 20 16:40:02 1997 Miles Bader <miles@gnu.ai.mit.edu>
-
- * dir-reparent.c (netfs_S_dir_reparent): New file.
- * Makefile (FSSRCS): Add dir-reparent.c.
-
-Sat Nov 23 16:24:04 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * file-set-translator.c (netfs_S_file_set_translator): Delete var I.
-
-Wed Nov 20 17:13:13 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * fsys-syncfs.c (netfs_S_fsys_syncfs): Use iohelp_create_iouser, not
- iohelp_make_iouser.
-
-Mon Nov 18 17:06:39 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * netfs.h (netfs_report_access): Return error_t.
- * file-check-access.c (netfs_S_file_check_access): Deal with
- errors from netfs_report_access.
-
-Sat Nov 16 17:17:50 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * io-restrict-auth.c (netfs_S_io_restrict_auth): Fix several typos.
-
- * fsys-getroot.c (netfs_S_fsys_getroot): iohelp_make_iouser ->
- iohelp_create_iouser. New arg syntax for fshelp_fetch_root.
-
-Fri Nov 15 13:39:03 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * netfs.h (struct protid): Replace member `credential' with `user'
- of new type. All uses of old `credential' member changed to
- use `user' member.
- Change all functions that used to take `struct netcred' args to
- take `struct iouser' args. All callers changed.
- (netfs_copy_credential, netfs_dropy_credential,
- netfs_make_credential): Delete functions.
- * dir-lookup.c (netfs_S_dir_lookup): netfs_copy_credential ->
- iohelp_dup_iouser.
- * dir-mkfile.c (netfs_S_dir_mkfile): Likewise.
- * file-exec.c (netfs_S_file_exec): Likewise.
- * io-duplicate.c (netfs_S_io_duplicate): Likewise.
- * release-protid.c (netfs_release_protid): netfs_drop_credential
- -> iohelp_free_iouser.
- * dir-lookup.c (netfs_S_dir_lookup): Omit uses of
- netfs_interpret_credential; do it with new structures.
- * file-exec.c (netfs_S_file_exec): Likewise.
- * file-getcontrol.c (netfs_S_file_getcontrol): Likewise.
- * file-set-translator.c (netfs_S_file_set_translator): Likewise;
- using fshelp_isowner for permission check.
- * io-restrict-auth.c (netfs_S_io_restrict_auth): Likewise; guts
- rewritten.
- * dir-lookup.c (netfs_S_dir_lookup): netfs_make_credential ->
- iohelp_make_iouser.
- * fsys-getroot.c (netfs_S_fsys_getroot): Likewise.
- * fsys-syncfs.c (netfs_S_fsys_syncfs): Likewise.
- * io-reauthenticate.c (netfs_S_io_reauthenticate): Use
- iohelp_reauth instead of doing it by hand.
-
-Mon Oct 21 21:56:33 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * netfs.h: Add extern inline protection.
- * netfs.c: New file.
- * Makefile (OTHERSRCS): Add netfs.c.
-
-Wed Sep 18 12:56:05 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * std-runtime-argp.c <argp.h>: New include.
- * std-startup-argp.c <argp.h>: New include.
- * fsys-get-options.c (netfs_S_fsys_get_options): Initialize ARGZ
- with the program name, and call netfs_append_args instead of
- netfs_get_options.
- * file-get-fs-options.c (netfs_S_file_get_fs_options): Likewise.
- * append-std-options.c (netfs_append_std_options): Doc fix.
- * netfs.h (netfs_append_args): New declaration.
- (netfs_get_options): Declaration removed.
- <argp.h>: Include removed.
- * append-args.c (netfs_append_args): New file.
- * Makefile (OTHERSRCS): Replace get-options.c with append-args.c
-
- * file-get-translator.c <stdio.h>: New include.
-
-Fri Aug 16 19:20:22 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * priv.h (end_using_protid_port): Only call ports_port_deref if
- CRED is set.
-
-Fri Jul 26 14:34:11 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * file-exec.c (netfs_S_file_exec): Unlock NP before we attempt to
- do setuid/setgid (which otherwise can deadlock during port reauth).
- Pay attention to the error code returned by fshelp_exec_reauth,
- and don't make NEWPI if it's an error.
-
-Tue Jul 23 14:28:33 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * file-utimes.c (netfs_S_file_utimes): `struct timespec' now uses
- a field prefix of `tv_'.
-
-Thu Jul 18 23:09:54 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * io-reauthenticate.c (netfs_S_io_reauthenticate): After attaching
- credential to NEWPI, install it in NETFS_PORT_BUCKET->portset.
- * make-protid.c (netfs_make_protid): If CRED is null, use
- noinstall version of ports_create_port.
-
-Sat Jul 13 20:10:02 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * io-reauthenticate.c (netfs_S_io_reauthenticate): Repeat
- auth_server_authenticate for as long as we get EINTR. Tolerate
- other errors without crashing as well.
-
-Sun Jul 7 21:28:54 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * io-reauthenticate.c (netfs_S_io_reauthenticate): Don't use
- unsafe MOVE_SEND in call to auth_server_authenticate.
-
-Thu Jul 4 16:56:53 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * io-write.c (netfs_S_io_write): Bother implementing O_APPEND.
-
- * io-identity.c (netfs_S_io_identity): Don't take address of ID in
- call to fshelp_get_identity.
-
-Wed Jul 3 11:54:46 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * dir-mkfile.c (netfs_S_dir_mkfile): Return right with MAKE_SEND,
- not COPY_SEND.
-
- * io-identity.c (netfs_S_io_identity): Use fshelp_get_identity
- instead of creating port ourselves.
- * netfs.h (struct node): Delete member identity.
- * make-node.c (netfs_make_node): Don't initialize NP->identity.
- * drop-node.c (netfs_drop_node): Don't deallocate NP->identity.
-
-Thu Jun 27 17:57:30 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * Makefile (LCLHDRS): Add execserver.h.
-
-Thu Jun 27 00:24:57 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * append-std-options.c: New file.
- * Makefile (OTHERSRCS): Add append-std-options.c.
-
-Wed Jun 26 15:57:13 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * netfs.h: Change options parsing interface to match libdiskfs's:
- (netfs_set_options, netfs_get_options): Updated to inew interface.
- (netfs_runtime_argp, netfs_std_runtime_argp, netfs_std_startup_arg):
- New variables.
- (netfs_append_std_options): New declaration.
- (netfs_parse_runtime_options, netfs_unparse_runtime_options):
- Functions removed.
- * set-options.c (std_runtime_options): Variable removed.
- (parse_runtime_opt): Function removed.
- (netfs_set_options): Change to use fshelp_set_options.
- * fsys-set-options.c (netfs_S_fsys_set_options): Don't convert
- options string into argv vector.
- * fsys-get-options.c (netfs_S_fsys_get_options): Use
- fshelp_return_malloced_buffer to prepare return value.
- * file-get-fs-options.c (netfs_S_file_get_fs_options): Likewise.
- * get-options.c (netfs_get_options): Call netfs_append_std_options.
- * std-startup-argp.c, std-runtime-argp.c, runtime-argp.c: New files.
- * parse-runtime-options.c, unparse-runtime-options.c: Files removed.
- * Makefile (OTHERSRCS): Add runtime-argp.c, std-runtime-argp.c,
- & std-startup-argp.c. Remove parse-runtime-options.c &
- unparse-runtime-options.c.
-
-Tue May 14 14:05:33 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * init-init.c (netfs_fsys_identity): New variable.
- (netfs_init): Initialize netfs_fsys_identity.
- * drop-node.c (netfs_drop_node): Destroy NP->identity if it's set.
- * make-node.c (netfs_make_node): Initialize NP->identity.
- * netfs.h (struct node): New member `identity'.
- (netfs_fsys_identity): New variable.
- * Makefile (IOSRCS): Add io-identity.c.
- * io-identity.c: New file.
-
-Sat May 11 01:24:31 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * startup-argp.c (parse_startup_opt): Use ARGP_ERR_UNKNOWN instead
- of EINVAL.
-
-Thu May 9 18:54:11 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * file-get-storage-info.c (netfs_S_file_get_storage_info): fixup
-
-Thu May 9 18:15:40 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * file-get-storage-info.c (netfs_S_file_get_storage_info): Change
- to new interface.
-
-Thu May 9 11:53:49 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * make-protid.c (netfs_make_protid): Use new ports interface; if
- it fails return zero.
-
- * io-select.c (netfs_S_io_select): No longer has TAG arg.
-
- * io-reauthenticate.c (netfs_S_io_reauthenticate): Don't pass
- right for USER to auth_server_authenticate.
-
- * file-sync.c (netfs_S_file_sync): Accept and ignore new omitmeta
- arg.
-
- * dir-rename.c (netfs_S_dir_rename): Accept and pass through excl
- flag.
- * dir-link.c (netfs_S_dir_link): Likewise.
- * netfs.h (netfs_attempt_link): Add excl parm.
- (netfs_attempt_rename): Likewise.
-
- * netfs.h (netfs_attempt_statfs): Use struct statfs, not old
- deprecated structure.
- * file-statfs.c (netfs_S_file_statfs): Use new struct statfs.
-
- * netfs.h: ioserver.h -> iohelp.h.
-
-Mon Apr 29 16:27:37 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * file-getcontrol.c (netfs_S_file_getcontrol): Use correct args to
- ports_create_port.
-
-Sat Apr 27 06:02:03 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
-
- * file-getcontrol.c: Use ports_create_port instead of
- ports_allocate_port, and notice the error.
-
-Wed Apr 24 16:02:51 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * io-seek.c (netfs_S_io_seek): Bother to set *NEWOFFSET.
-
-Fri Apr 12 16:21:53 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * file-exec.c (netfs_S_file_exec): Copy credential using
- netfs_copy_credential before handing it off to netfs_make_protid.
-
- * dir-lookup.c (netfs_S_dir_lookup): netfs_make_protid's second
- arg must be a real credential; the unauthenticated port creation
- frob now makes a genuine (but empty) credential.
-
-Thu Apr 11 18:10:29 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * Makefile (fsys-MIGSFLAGS, fs-MIGSFLAGS, io-MIGSFLAGS,
- ifsock-MIGSFLAGS): Find mutations.h in $(srcdir).
-
-Wed Apr 3 14:47:37 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * io-reauthenticate.c (netfs_S_io_reauthenticate): In check for
- deallocation of aux_gids; check against AGBUF, not AUBUF.
-
-Tue Apr 2 09:14:30 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * io-write.c: Include <fcntl.h>.
- (netfs_S_io_write): Verify that the user has the file open for
- writing.
- * io-read.c: Include <fcntl.h>.
- (netfs_S_io_read): Verify that the user has the file open for
- reading.
-
-Mon Apr 1 16:02:29 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * fsstubs.c (netfs_S_file_exec): Remove stub.
- * Makefile (FSSRCS): Add file-exec.c.
- * execserver.h: New file.
- * file-exec.c: New file.
-
-Mon Apr 1 14:21:12 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * parse-runtime-options.c (netfs_parse_runtime_options): Pass new
- arg to arg_parse.
-
-Tue Mar 19 14:12:32 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * Makefile (LCLHDRS): Add callbacks.h misc.h modes.h mutations.h
- priv.h.
-
-Mon Mar 18 11:09:05 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * netfs.h (netfs_startup): Add declaration.
-
- * netfs.h (netfs_protid_class, netfs_control_class,
- netfs_port_bucket, netfs_root_node, netfs_auth_server_port): Make
- this extern.
-
- * fsys-getroot.c: Include "callbacks.h".
-
- * file-set-translator.c (makedev): New macro.
-
-Thu Mar 14 16:47:14 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * netfs.h (netfs_attempt_mkdev): Don't pass dev_t in pieces.
- * file-set-translator.c (netfs_S_file_set_translator): In call to
- netfs_attempt_mkdev don't pass MAJOR and MINOR in pieces.
-
-Tue Mar 12 14:57:26 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * fsys-getroot.c (netfs_S_fsys_getroot): Add translator linkage
- code.
- * dir-lookup.c (netfs_S_dir_lookup): Fix up and enable translator
- linkage code.
-
- * netfs.h (netfs_attempt_chmod): Doc fix.
- (netfs_attempt_mksymlink, netfs_attempt_mkdev,
- netfs_set_translator): New declarations.
- * file-set-translator.c: New file.
- * fsstubs.c (netfs_S_file_set_translator): Delete function.
- * Makefile (FSSRCS): Add file-set-translator.c.
-
-Mon Mar 11 16:44:08 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * fsstubs.c (netfs_S_file_get_translator): Remove function.
- * file-get-translator.c: New file.
- * Makefile (FSSRCS): Add file-get-translator.c.
-
-Mon Mar 4 13:36:36 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * fsys-set-options.c, fsys-get-options.c, file-get-fs-options.c:
- New files.
- * netfs.h (netfs_startup_argp, netfs_get_options,
- netfs_set_options, netfs_parse_runtime_options,
- netfs_unparse_runtime_options): New declarations.
- * Makefile (OTHERSRCS): Add startup-argp.c, set-options.c,
- get-options.c, parse-runtime-options.c, & unparse-runtime-options.c.
- (FSYSSRCS): Add fsys-set-options.c & fsys-get-options.c.
- (FSSRCS): Add file-get-fs-options.c.
- * unparse-runtime-options.c (netfs_unparse_runtime_options): Add
- comment, and remove bogus semi.
- * fsysstubs.c (netfs_S_fsys_set_options, netfs_S_fsys_get_options):
- Functions removed.
- * fsstubs.c (netfs_S_file_get_fs_options): Function removed.
- * parse-runtime-options.c: Include "netfs.h", not "priv.h".
- * set-options.c: Likewise.
- (parse_runtime_opt): New function.
- * priv.h: Include <hurd/hurd_types.h>
-
-Tue Apr 11 11:15:30 1995 Michael I Bushnell <mib@duality.gnu.ai.mit.edu>
-
- * Makefile: New file.
diff --git a/libnetfs/Makefile b/libnetfs/Makefile
index 27881676..d6a991df 100644
--- a/libnetfs/Makefile
+++ b/libnetfs/Makefile
@@ -1,5 +1,7 @@
#
-# Copyright (C) 1995,96,97,99,2001,02 Free Software Foundation
+# Copyright (C) 1995, 1996, 1997, 1999, 2001, 2002, 2008 Free Software
+# Foundation
+#
# Written by Michael I. Bushnell.
#
# This file is part of the GNU Hurd.
@@ -22,6 +24,8 @@ dir := libnetfs
makemode := library
libname = libnetfs
+HURDLIBS = fshelp iohelp threads ports shouldbeinlibc
+
FSSRCS= dir-link.c dir-lookup.c dir-mkdir.c dir-mkfile.c \
dir-notice-changes.c dir-readdir.c dir-rename.c \
dir-rmdir.c dir-unlink.c file-chauthor.c \
diff --git a/libnetfs/file-get-translator.c b/libnetfs/file-get-translator.c
index 3108acd7..7edc8fd0 100644
--- a/libnetfs/file-get-translator.c
+++ b/libnetfs/file-get-translator.c
@@ -1,5 +1,5 @@
/*
- Copyright (C) 1996, 1999, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1999, 2000, 2008 Free Software Foundation, Inc.
Written by Michael I. Bushnell, p/BSG.
This file is part of the GNU Hurd.
@@ -71,8 +71,8 @@ netfs_S_file_get_translator (struct protid *user,
(S_ISCHR (np->nn_stat.st_mode)
? _HURD_CHRDEV
: _HURD_BLKDEV),
- '\0', (np->nn_stat.st_rdev >> 8) & 0377,
- '\0', (np->nn_stat.st_rdev) & 0377);
+ '\0', major (np->nn_stat.st_rdev),
+ '\0', minor (np->nn_stat.st_rdev));
if (buflen < 0)
err = ENOMEM;
else
diff --git a/libnetfs/io-pathconf.c b/libnetfs/io-pathconf.c
index 78244bcd..2fd3f5bc 100644
--- a/libnetfs/io-pathconf.c
+++ b/libnetfs/io-pathconf.c
@@ -39,6 +39,7 @@ netfs_S_io_pathconf (struct protid *user,
case _PC_PIPE_BUF:
case _PC_VDISABLE:
case _PC_SOCK_MAXBUF:
+ case _PC_PATH_MAX:
*value = -1;
break;
diff --git a/libpager/ChangeLog b/libpager/ChangeLog
deleted file mode 100644
index f5f59d9b..00000000
--- a/libpager/ChangeLog
+++ /dev/null
@@ -1,501 +0,0 @@
-2002-05-13 Marcus Brinkmann <marcus@gnu.org>
-
- * demuxer.c (pager_demuxer): Lookup INP->msgh_local_port, rather
- than the remote port, as the kernel swaps them in transit.
-
-2002-05-07 Roland McGrath <roland@frob.com>
-
- * data-request.c (_pager_seqnos_memory_object_data_request): Use %z
- format modifier for vm_size_t argument.
- * data-return.c (_pager_do_write_request): Likewise.
- * data-unlock.c (_pager_seqnos_memory_object_data_unlock): Likewise.
-
-2002-04-10 Neal H Walfield <neal@cs.uml.edu>
-
- * pager-memcpy.c (pager_memcpy): Pass not the block but the byte
- offset of the page in question to pager_get_error.
-
-2002-04-10 Neal H Walfield <neal@cs.uml.edu>
-
- * pager-memcpy.c (VMCOPY_BETTER_THAN_MEMCPY): New macro.
- (pager_memcpy): Rewritten to use vmcopy.
-
-2002-04-01 Neal H Walfield <neal@cs.uml.edu>
-
- * data-request.c (_pager_seqnos_memory_object_data_request): Must
- hold P->interlock when calling _pager_allow_termination.
-
-2002-01-19 Roland McGrath <roland@frob.com>
-
- * demuxer.c (pager_demuxer): Fix last change so it works. Add comment.
-
-2001-01-16 Marcus Brinkmann <marcus@gnu.org>
-
- * demuxer.c (pager_demuxer): If the message was not accepted by
- one of the servers, acquire a reference to the pager and its lock,
- and wait until all previous messages have been processed. This
- makes sure that the next message that arrives can proceed.
- Reported by Neal H Walfield <neal@cs.uml.edu>
-
-2001-12-29 Roland McGrath <roland@frob.com>
-
- * data-init.c, object-create.c: Removed obsolete files.
-
-2001-02-25 Roland McGrath <roland@frob.com>
-
- * pager-memcpy.c: Include <string.h> for memcpy decl.
-
-2000-07-25 Thomas Bushnell, BSG <tb@mit.edu>
-
- * priv.h (PM_WRITEWAIT): New pagemap bit.
- * data-return.c (_pager_do_write_request): Don't proceed with a
- pageout if one is already in progress. Once we finish, wake up
- any potential PM_WRITEWAIT waiters.
-
- * priv.h (PM_INIT): Provide value again.
- * data-return.c (_pager_do_write_request): Track PM_INIT again.
-
- * priv.h (struct pager): Make pagemap consist of 16-bit elements
- instead of only 8 bits.
- * data-request.c (_pager_seqnos_memory_object_data_request):
- Make PM_ENTRY a short pointer.
- * data-return.c (_pager_do_write_request): Make PM_ENTRIES a short
- pointer.
- * lock-object.c (_pager_lock_object): Make PM_ENTRIES a short
- pointer.
- * mark-error.c (_pager_mark_next_request_error): Make P a short
- pointer.
- (_pager_mark_object_error): Likewise.
- * offer-page.c (pager_offer_page): Make PM_ENTRY a short pointer.
- * object-terminate.c (_pager_free_structure): Interpret
- pagemapsize correctly.
- * pagemap.c (_pager_pagemap_resize): Likewise.
-
-2000-01-24 Roland McGrath <roland@baalperazim.frob.com>
-
- * pager-memcpy.c (pager_memcpy): Short-circuit return for zero size.
-
-1999-07-10 Roland McGrath <roland@baalperazim.frob.com>
-
- * priv.h: Add #include <sys/mman.h> for munmap decl.
- * pager-memcpy.c: Likewise.
-
-1999-07-09 Thomas Bushnell, BSG <tb@mit.edu>
-
- * pagemap.c (_pager_pagemap_resize): Use mmap instead of vm_allocate.
-
-1999-07-03 Thomas Bushnell, BSG <tb@mit.edu>
-
- * data-return.c (_pager_do_write_request): Use munmap instead of
- vm_deallocate.
- * object-terminate.c (_pager_free_structure): Likewise.
- * pagemap.c (_pager_pagemap_resize): Likewise.
- * pager-memcpy.c (pager_memcpy): Likewise.
-
- * pager.h (pager_write_page): Doc adjustment.
-
-Wed Aug 20 14:47:38 1997 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * pager.h: Doc fix.
-
-Thu Feb 6 12:01:36 1997 Miles Bader <miles@gnu.ai.mit.edu>
-
- * pagemap.c (_pager_pagemap_resize): Return errors.
- * offer-page.c (pager_offer_page): Rewrite for clarity.
- Deal with _pager_pagemap_resize failing.
- * data-request.c (_pager_seqnos_memory_object_data_request): Deal
- with _pager_pagemap_resize failing.
- * lock-object.c (_pager_lock_object): Likewise.
- * mark-error.c (pager_get_error): Likewise.
- * priv.h (_pager_pagemap_resize): Returns an error_t.
-
-Mon Jan 20 16:25:39 1997 Miles Bader <miles@gnu.ai.mit.edu>
-
- * pager-memcpy.c (pager_memcpy): `preempter' -> `preemptor'.
-
-Thu Sep 12 16:21:14 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * Makefile (HURDLIBS): New variable.
- (libpager.so): Delete special depedency.
-
-Tue Aug 13 10:47:47 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * object-terminate.c (_pager_free_structure): Don't bother calling
- mach_port_deallocate if the cells are already null; set the cells
- to null after the deallocation is done.
- (_pager_seqnos_memory_object_terminate): Destroy the rights passed
- in for control and name.
-
-Thu May 9 11:10:11 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * pager-create.c: Get rid of link warning.
-
- * pager-create.c (pager_create): ports_allocate_port ->
- ports_create_port; if we get an error return a null structure.
-
-Thu May 2 11:17:17 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * offer-page.c (pager_offer_page): Make sure we hold lock across
- operation. Also set incore bit when operation is complete.
-
-Tue Apr 30 12:40:33 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * lock-object.c (_pager_lock_object): Eliminate spurious extra
- lock acquisition around pagemap frobbing.
-
-Sun Apr 28 15:46:12 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
-
- * pager-create.c (pager_create): Add link warning.
-
-Thu Apr 18 13:03:55 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * data-return.c (_pager_do_write_request): If kernel didn't keep a
- copy, turn off INCORE bit. Don't track INIT bit for now.
- * lock-object.c (_pager_lock_object): If SYNC and SHOULD_FLUSH,
- then turn off PM_INCORE bits when flush is complete.
- * data-request.c (_pager_seqnos_memory_object_data_request): Set
- PM_INCORE.
- * priv.h (PM_INIT): Comment out.
- (PM_INCORE): New bit.
- * offer-page.c: New file.
- * Makefile (SRCS): Add offer-page.c.
- * pager.h (pager_offer_page): New function.
-
-Thu Apr 11 17:50:57 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * pager-memcpy.c (pager_memcpy [copy]): Return error_t so that
- this function has the proper type as an arg for
- hurd_catch_signal.
- (pager_memcpy): Cast FAULT to proper type in call to
- hurd_catch_signal.
-
-Tue Mar 26 15:38:06 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * lock-completed.c: Include <stdio.h>.
-
- * data-return.c (_pager_do_write_request): Delete unused label
- `out'.
-
- * pager-sync.c (pager_sync, pager_sync_some): Ask for RETURN_ALL
- and not just RETURN_DIRTY, because we treat precious pages as
- dirty in this library.
- * pager-return.c (pager_return, pager_return_some): Likewise.
-
-Mon Mar 18 13:10:32 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * pager.h (pager_return, pager_return_some): New declarations.
- * Makefile (SRCS): Add pager-return.c.
- * pager-return.c: New file.
-
- * pager-flush.c (pager_flush): Lock request should be
- VM_PROT_NO_CHANGE, not VM_PROT_NONE.
- (pager_flush_some): Likewise.
-
-Wed Mar 6 17:53:20 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * lock-object.c (_pager_lock_object): Correctly remove LR from
- P's linked list of lock requests.
- * pager-attr.c (pager_change_attributes): Likewise for attributes.
-
- * lock-object.c (_pager_lock_object): Don't barf anymore.
- * lock-completed.c (_pager_seqnos_memory_object_lock_completed): Ditto.
- * Makefile (SRCS): Remove barf.c.
-
-Wed Feb 21 14:15:26 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * lock-completed.c (_pager_seqnos_memory_object_lock_completed):
- Get rid of bletcherous semi.
- Make barf more voluminous.
-
- * lock-completed.c (_pager_seqnos_memory_object_lock_completed):
- Be picky about always releasing SEQNO.
- * object-init.c (_pager_seqnos_memory_object_init): Likewise.
-
-Tue Feb 20 17:44:59 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * lock-object.c (_pager_lock_object): Use barf instead of printf.
- * lock-completed.c (_pager_seqnos_memory_object_lock_completed): Ditto.
- * Makefile (SRCS): Add barf.c.
-
- * data-return.c (_pager_do_write_request): Always wait for and
- release SEQNO if OBJECT is a valid pager.
- * data-request.c (_pager_seqnos_memory_object_data_request): Likewise.
- * object-terminate.c (_pager_seqnos_memory_object_terminate): Likewise.
-
-Tue Feb 20 16:05:42 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * lock-object.c (_pager_lock_object): Print debugging message when
- SYNC.
- * lock-completed.c (_pager_seqnos_memory_object_lock_completed):
- Print a notice when an incoming lock completion corresponds to no
- outstanding lock request.
-
-Tue Feb 20 15:10:29 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * lock-object.c (_pager_lock_object): Remove `sync = 0'.
-
-Fri Jan 5 17:09:43 1996 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * pager-memcpy.c: New file.
- * Makefile (SRCS): Add pager-memcpy.c.
-
-Thu Jan 4 15:37:21 1996 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * pager.h: Declare pager_memcpy.
-
-Mon Oct 9 14:57:48 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * priv.h: Declare _pager_page_errors extern, not common.
-
- * Makefile: Specify shared library dependencies.
-
-Wed Sep 13 14:49:53 1995 Michael I. Bushnell, p/BSG <mib@duality.gnu.ai.mit.edu>
-
- * lock-completed.c (_pager_seqnos_memory_object_lock_completed):
- Don't push the locks_pending field negative in the case where the
- pager was terminated before we get called.
-
-Tue Sep 5 15:50:12 1995 Miles Bader <miles@churchy.gnu.ai.mit.edu>
-
- * chg-compl.c (_pager_seqnos_memory_object_change_completed):
- Don't push the attrs_pending field negative in the case where the
- pager was terminated before we get called.
-
-Wed Aug 23 15:00:46 1995 Miles Bader <miles@churchy.gnu.ai.mit.edu>
-
- * Makefile (SRCS): Make this the main list of files, from which
- the others are derived.
- (COBJS, REMHDRS): Removed.
- (OBJS): Derived mostly from $(SRCS).
-
-Fri Jul 21 16:43:19 1995 Michael I Bushnell <mib@geech.gnu.ai.mit.edu>
-
- * object-create.c (_pager_seqnos_memory_object_create): Drop
- initial reference created by ports_intern_external_reference when
- we're done with P.
-
-Thu Jul 6 15:36:36 1995 Michael I Bushnell <mib@duality.gnu.ai.mit.edu>
-
- * Makefile: Removed dependencies that are now automatically
- generated.
-
-Mon Jun 26 20:15:03 1995 Michael I Bushnell <mib@duality.gnu.ai.mit.edu>
-
- * get-upi.c: New file.
- * pager.h (pager_get_upi): New function.
- * Makefile (COBJS): Add get-upi.o.
-
-Thu Jun 22 11:43:15 1995 Michael I Bushnell <mib@duality.gnu.ai.mit.edu>
-
- * object-init.c (_pager_seqnos_memory_object_init): Rather than an
- empty `if' body and an unconditional return, how about a real
- test?
-
- * notify-stubs.c: New file.
- * Makefile (COBJS): Add notify-stubs.o.
-
-Tue Jun 20 12:44:22 1995 Michael I Bushnell <mib@duality.gnu.ai.mit.edu>
-
- * chg-compl.c (_pager_seqnos_memory_object_change_completed): Use
- new ports routines.
- * pager-shutdown.c (pager_shutdown): Likewise.
- * object-terminate.c (_pager_free_structure): Likewise.
- * object-init.c (_pager_seqnos_memory_object_init): Likewise.
- * lock-completed.c (_pager_seqnos_memory_object_lock_completed):
- Likewise.
- * data-unlock.c (_pager_seqnos_memory_object_data_unlock): Likewise.
- * data-return.c (_pager_do_write_request): Likewise.
- * data-request.c (_pager_seqnos_memory_object_data_request):
- Likewise.
- * pager-create.c (pager_create): New parm BUCKET. Allocate port
- using new ports interface. Arrange to have _pager_class
- initialized at startup.
- * clean.c, dropweak.c: New files.
- * no-senders.c: Rename pager_no_senders to
- _pager_do_seqnos_mach_notify_no_senders. Lookup up port right
- ourselves. Remove function pager_clean (now in clean.c).
- * priv.h (_pager_class): New var.
- (_pager_clean, _pager_real_dropweak): New decls.
- * Makefile (COBJS): Delete reference.o. Add clean.o and dropweak.o
- (OBJS): Add notifyServer.o.
- (demuxer.o): Depend on notify_S.h.
- * demuxer.c: Include "notify_S.h".
- (pager_demuxer): Declare and use _pager_seqnos_notify_server.
- * pager.h: Include <hurd/ports.h>.
- (pager_no_senders, pager_reference, pager_unreference,
- pager_port_type, pager_clean): Remove declarations.
- (pager_create): New parm BUCKET.
- (pager_clean): Doc fix.
- (pager_dropweak): New decl.
- * reference.c: Deleted file.
-
-Thu May 11 11:19:44 1995 Miles Bader <miles@churchy.gnu.ai.mit.edu>
-
- * priv.h (PM_NEXTERROR, SET_PM_NEXTERROR): Mask 2-bit error code
- with 0x3, not 0x2!
-
- * mark-error.c (_pager_mark_next_request_error,
- _pager_mark_object_error): Put the error code in the correct place
- in the pagemap rather than always at the beginning.
- (pager_get_error): Get the error code from the pagemap rather than
- just using the pagemap offset!
-
-Wed Nov 23 00:28:19 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * demuxer.c (pager_demuxer): Call
- _pager_seqnos_memory_object_server, not
- seqnos_memory_object_server.
-
-Tue Nov 8 14:15:01 1994 Michael I Bushnell <mib@geech.gnu.ai.mit.edu>
-
- * lock-object.c (_pager_lock_object): Hammer SYNC to zero for now;
- there's some deadlock bug in noticing when the sync finishes.
-
-Tue Aug 30 17:55:34 1994 Michael I Bushnell <mib@geech.gnu.ai.mit.edu>
-
- * data-return.c: Include <assert.h>.
- (_pager_seqnos_memory_object_data_return): Use return correctly.
-
-Mon Aug 29 17:30:52 1994 Michael I Bushnell <mib@geech.gnu.ai.mit.edu>
-
- * priv.h (PM_INIT): New pagemap bit.
- * data-return.c (_pager_do_write-request): Set PM_INIT for
- affected pages. New var `omitdata' hold a bitmap of the
- pages that we are not actually writing. Set accordingly
- while looking through pagemap before starting I/O. Don't
- actually call I/O on these pages or frob the page map with them
- later.
-
- * data-return.c (_pager_seqnos_memory_object_data_return): Split
- into two functions; _pager_do_write_request does the real work
- now.
-
- * object-create.c: New file.
- * data-init.c: New file.
-
-Fri Jul 22 11:54:05 1994 Michael I Bushnell <mib@geech.gnu.ai.mit.edu>
-
- * Makefile: Rewritten to use new scheme.
- * data-request.c: Include "memory_object_S.h" instead of
- "memory_object.h".
- * data-return.c: Likewise.
- * data-unlock.c: Likewise.
- * lock-completed: Likewise.
- * stubs.c: Likewise.
- * object-init.c: Likewise.
- * demuxer.c: Likewise.
- * object-terminate.c: Likewise.
-
-Tue Jul 5 14:14:17 1994 Michael I Bushnell (mib@churchy.gnu.ai.mit.edu)
-
- * Makefile (TAGSHDRS): New variable.
-
-Wed Jun 1 11:41:24 1994 Michael I Bushnell (mib@churchy.gnu.ai.mit.edu)
-
- * pager-attr.c (pager_change_attributes): Return immediately
- if we are already in the requested state.
-
- * lock-completed.c (_pager_seqnos_memory_object_lock_completed):
- Call ports_done_with_port before returning to free reference
- created by ports_check_port_type.
- * chg-compl.c (_pager_seqnos_memory_object_change_completed):
- Likewise.
-
- * seqnos.c (_pager_release_seqno): New second arg SEQNO.
- Set p->seqno here. All callers changed.
- (_pager_wait_for_seqno): Don't set p->seqno here; then it
- might get released before we actually call _pager_release_seqno.
- * priv.h (_pager_release_seqno): Declare new second arg.
-
- * priv.h (KERNEL_INIT_RACE): New compilation option. All the
- changes in this block are conditionalized by this macro.
- * priv.h (struct pager): New members init_head and init_tail.
- (struct pending_init): New type.
- * object-init.c (_pager_seqnos_memory_object_init): If the object
- is not ready for init, then queue the init for later processing.
- * object-terminate.c (_pager_seqnos_memory_object_terminate): If
- there is a pending init, return it here.
- * no-senders.c (pager_clean): Destroy all pending inits here.
-
- * object-terminate.c (_pager_free_structure): Don't unlock
- interlock or free the seqno here.
- (_pager_seqnos_memory_object_terminate): Unlock interlock and
- free seqno after calling _pager_free_structure.
- * no-senders.c (pager_clean): Unlock interlock after calling
- _pager_free_structure. Don't free seqno here at all.
-
-Tue May 24 15:25:54 1994 Michael I Bushnell (mib@churchy.gnu.ai.mit.edu)
-
- * data-return.c (_pager_seqnos_memory_object_data_return): New
- vars NPAGES, I, and PAGERRS. Rename var PM_ENTRY to be
- PM_ENTRIES. Deal with multiple-page data_return calls by dealing
- with multiple pagemap slots and calling pager_write_page multiple
- times.
-
- * data-return.c (_pager_seqnos_memory_object_data_return): Fix
- printf messages; include length in bogus length messages.
-
- *data-unlock (_pager_seqnos_memory_object_data_unlock): Likewise.
-
-Mon May 23 13:06:31 1994 Michael I Bushnell (mib@churchy.gnu.ai.mit.edu)
-
- * data-request.c (_pager_seqnos_memory_object_data_request):
- Report length in bogus arg messages; terminate messages with
- newlines.
-
- * chg-compl.c: Include <stdio.h>.
-
- * priv.h (struct pager [may_cache, copy_strategy]): New members.
- * pager.h (pager_create_pager): Added new args MAY_CACHE and
- COPY_STRATEGY.
- (pager_report_attributes): Deleted declaration.
- * object-init.c (_pager_seqnos_memory_object_init): Set attributes
- from values in P rather than by calling pager_report_attributes.
- * pager-attr.c (pager_change_attributes): Don't panic if the
- pager isn't yet initialized by the kernel; record the provided
- values in may_cache and copy_strategy.
-
- * pager-attr.c: Spelling fix.
- Include <assert.h>.
- * Makefile (COBJS): Added pager-attr.o.
-
-Fri May 20 15:41:12 1994 Michael I Bushnell (mib@geech.gnu.ai.mit.edu)
-
- * lock-completed.c (_pager_seqnos_memory_object_lock_completed):
- Delete unneeded variable wakeup. Break out of loop as soon
- as we find the right record. Call condition_broadcast only
- if we need bother.
-
- * pager.h (pager_change_attributes, pager_report_attributes):
- New declarations.
- * priv.h (struct attribute_request): New structure.
- (struct pager [attribute_requests]): New member.
- * pager-create.c (pager_create): Initialize new member.
- * object-init.c (_pager_seqnos_memory_object_init): Call
- pager_report_attributes for correct args to memory_object_ready.
- * pager-attr.c: New file.
- * object-terminate.c (_pager_free_structure): Wakeup pending
- pager_change_attribute requests.
- * stubs.c (_pager_seqnos_memory_object_change_completed): Deleted
- function.
- * chg-compl.c: New file.
- * Makefile (COBJS): Added chg-compl.o.
-
-Thu May 5 07:49:21 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
-
- * stubs.c (_pager_seqnos_memory_object_supply_completed): Change
- RESULT arg to type kern_return_t; error_t is not compatible.
-
- * demuxer.c (pager_demuxer): Declare seqnos_memory_object_server.
-
- * stubs.c, lock-completed.c: Changed return type of all RPC server
- functions to kern_return_t. error_t is not compatible with the
- declarations in the mig-generated header files.
-
- * Makefile: Change uses of $(headers) to $(includedir).
-
-Tue Apr 26 15:08:57 1994 Michael I Bushnell (mib@geech.gnu.ai.mit.edu)
-
- * object-init.c (_pager_seqnos_memory_object_init): Only check
- for inits of active objects AFTER waiting for seqno; otherwise we
- could race against a prior terminate.
diff --git a/libpager/data-request.c b/libpager/data-request.c
index f5bbfb5b..36725b11 100644
--- a/libpager/data-request.c
+++ b/libpager/data-request.c
@@ -1,5 +1,5 @@
/* Implementation of memory_object_data_request for pager library
- Copyright (C) 1994,95,96,97,2000,02 Free Software Foundation
+ Copyright (C) 1994,95,96,97,2000,02,10 Free Software Foundation
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
@@ -67,14 +67,12 @@ _pager_seqnos_memory_object_data_request (mach_port_t object,
if (p->pager_state != NORMAL)
{
printf ("pager in wrong state for read\n");
- _pager_release_seqno (p, seqno);
- mutex_unlock (&p->interlock);
- goto allow_term_out;
+ goto allow_release_out;
}
err = _pager_pagemap_resize (p, offset + length);
if (err)
- goto release_out; /* Can't do much about the actual error. */
+ goto allow_release_out; /* Can't do much about the actual error. */
/* If someone is paging this out right now, the disk contents are
unreliable, so we have to wait. It is too expensive (right now) to
@@ -140,6 +138,8 @@ _pager_seqnos_memory_object_data_request (mach_port_t object,
ports_port_deref (p);
return 0;
+ allow_release_out:
+ _pager_allow_termination (p);
release_out:
_pager_release_seqno (p, seqno);
mutex_unlock (&p->interlock);
diff --git a/libpager/pager.h b/libpager/pager.h
index d3f1162c..99fb3845 100644
--- a/libpager/pager.h
+++ b/libpager/pager.h
@@ -151,7 +151,7 @@ pager_memcpy (struct pager *pager, memory_object_t memobj,
/* The user must define this function. For pager PAGER, read one
page from offset PAGE. Set *BUF to be the address of the page,
and set *WRITE_LOCK if the page must be provided read-only.
- The only permissable error returns are EIO, EDQUOT, and ENOSPC. */
+ The only permissible error returns are EIO, EDQUOT, and ENOSPC. */
error_t
pager_read_page (struct user_pager_info *pager,
vm_offset_t page,
@@ -160,7 +160,7 @@ pager_read_page (struct user_pager_info *pager,
/* The user must define this function. For pager PAGER, synchronously
write one page from BUF to offset PAGE. In addition, mfree
- (or equivalent) BUF. The only permissable error returns are EIO,
+ (or equivalent) BUF. The only permissible error returns are EIO,
EDQUOT, and ENOSPC. */
error_t
pager_write_page (struct user_pager_info *pager,
diff --git a/libpipe/ChangeLog b/libpipe/ChangeLog
deleted file mode 100644
index caafc582..00000000
--- a/libpipe/ChangeLog
+++ /dev/null
@@ -1,186 +0,0 @@
-2006-07-25 Stefan Siegl <stesie@brokenpipe.de>
-
- * pq.c (packet_write): Only dereference AMOUNT if it is not the null
- pointer and document the change.
- * pq.h (packet_write): Document the change.
-
-2002-04-22 Marcus Brinkmann <marcus@gnu.org>
-
- * pq.c (packet_set_ports): Correctly replace old ports buffer with
- new one. Take size of mach_port_t rather than pointer to it.
- (packet_read_ports): Take size of mach_port_t rather than pointer
- to it.
- (pq_queue): Update PACKET->num_ports, PACKET->buf_start and
- PACKET->buf_end for reused packets as well.
- Submitted by Ognyan Kulev <ogi@fmi.uni-sofia.bg>.
-
-1999-07-10 Roland McGrath <roland@baalperazim.frob.com>
-
- * pq.c: Add #include <sys/mman.h> for munmap decl.
-
-1999-07-09 Thomas Bushnell, BSG <tb@mit.edu>
-
- * pq.c (packet_realloc): Use mmap instead of vm_allocate.
- (packet_read_ports): Likewise.
- (packet_read): Likewise.
-
-1999-07-03 Thomas Bushnell, BSG <tb@mit.edu>
-
- * pq.c (free_packets): Use munmap instead of vm_deallocate.
-
-1998-10-20 Roland McGrath <roland@baalperazim.frob.com>
-
- * pq.c (free_packets): Add braces to silence gcc warning.
- (packet_realloc): Likewise.
- * pipe.c (pipe_send): Likewise.
- (pipe_recv): Likewise.
-
-Mon Oct 21 21:58:03 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * pipe.h: Add extern inline protection.
- * pq.h: Likewise.
- * pipe-funcs.c, pq-funcs.c: New files.
- * Makefile (SRCS): Add pipe-funcs.c and pq-funcs.c.
-
-Thu Sep 12 16:24:41 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * Makefile (HURDLIBS): New variable.
- (libpipe.so): Delete special dependency.
-
-Tue Jul 16 11:33:34 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * pipe.h (EWOULDBLOCK): Define to work around new libc bug.
-
-Mon Jul 1 17:29:07 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * pq.c (pq_queue): Initialize PACKET->buf_vm_alloced.
-
-Tue Jan 23 12:44:40 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * pq.h (packet_ensure, packet_ensure_efficiently): Use packet_fit().
- (packet_fit): New function.
- * pq.c (packet_read): If there's lots of empty space at the
- beginning of a vm_alloced buffer, deallocate it.
-
-Mon Jan 22 17:12:39 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * pq.c (packet_realloc): Reflect in the new values of BUF_START &
- BUF_END that we've removed any empty space at the beginning of BUF.
-
-Sat Jan 13 13:56:13 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * pq.h (packet_ensure, packet_ensure_efficiently): Use
- packet_new_size() instead of packet_size_adjust().
- (packet_size_adjust): Declaration removed.
- (packet_new_size): New declaration.
- * pq.c (packet_size_adjust): Function removed.
- (packet_new_size): New function.
-
- * pq.c (packet_read): Re-arrange to be slightly less confusing.
- Reverse start-past-buf-beginning test that may have leaked memory.
-
- * pipe.c (pipe_send): For non-blocking writes, avoid writing more
- than the user requested.
-
-Fri Jan 12 12:15:06 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * pq.c (pq_queue): Initialize the ports_alloced field.
- (packet_read): When a page-aligned read consumes the whole buffer,
- but there's a non-page-multiple amount available, don't let
- buf_len become negative.
-
-Mon Oct 9 14:57:48 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * Makefile: Specify shared library dependencies.
-
-Thu Sep 7 09:08:30 1995 Miles Bader <miles@churchy.gnu.ai.mit.edu>
-
- * pq.c (packet_read): Don't leave PACKET in a fucked up state when
- it's vm_allocate'd but doesn't a page-multiple amount of data and
- we're reading everything.
-
- * pipe.c (_pipe_no_readers): REALLY wake up writers when the pipe
- breaks.
-
-Fri Sep 1 10:42:03 1995 Miles Bader <miles@churchy.gnu.ai.mit.edu>
-
- * pipe.c (_pipe_no_readers): Wake up write selects too when the
- pipe breaks.
-
-Thu Aug 31 14:39:21 1995 Miles Bader <miles@churchy.gnu.ai.mit.edu>
-
- * pipe.c (pipe_send): Make writes blockable.
- (pipe_recv): Wakeup blocked writers.
- (pipe_kick): Function deleted.
- (pipe_create): Make connection-oriented pipes start out broken.
- (_pipe_first_reader): New function.
- (_pipe_first_writer): Don't check whether PIPE is connection-
- oriented before clearing PIPE_BROKEN, as otherwise it will never
- be set.
- (pipe_pair_select): New function.
- (pipe_multiple_lock): New variable.
- * pipe.h (pipe_wait): Renamed to `pipe_wait_readable'.
- (pipe_select): Renamed to `pipe_select_readable'.
- (pipe_writable, pipe_wait_writable, pipe_select_writable): New funcs.
- (pipe_acquire_reader): Call _pipe_first_reader if necessary.
- (_pipe_first_reader): New declaration.
- (struct pipe): New fields: `write_limit', `write_atomic',
- `pending_writes', `pending_write_selects'.
- (struct pipe): `pending_selects' changed to `pending_read_selects'.
- (pipe_pair_select): New declaration.
-
-Tue Aug 29 14:37:49 1995 Miles Bader <miles@geech.gnu.ai.mit.edu>
-
- * pipe.c (pipe_send): Use condition_broadcast, not condition_signal.
- * pipe.h (pipe_select): New function.
-
- * pipe.h (struct pipe): Remove interrupt_seq_num field.
- (pipe_wait): Use hurd_condition_wait to detect interrupts instead
- of previous ad-hoc mechanism.
-
- * pipe.c (pipe_create): Don't initialize interrupt_seq_num field.
-
- * pipe.h (pipe_acquire_reader, pipe_acquire_writer,
- pipe_add_reader, pipe_add_writer): `aquire' -> `acquire'.
-
-Fri Aug 11 18:35:32 1995 Miles Bader <miles@churchy.gnu.ai.mit.edu>
-
- * pipe.c (pipe_create): Initialize READERS & WRITERS, not REFS.
- (_pipe_first_writer): New function.
- (_pipe_no_writers, _pipe_no_writers): New function.
- (pipe_break): Function deleted.
-
-Wed Aug 9 12:53:05 1995 Miles Bader <miles@geech.gnu.ai.mit.edu>
-
- * pipe.h (struct pipe): Keep separate ref counts for readers and
- writers.
- (pipe_aquire_reader, pipe_aquire_writer): New functions.
- (pipe_release_reader, pipe_release_writer): New functions.
- (pipe_add_reader, pipe_add_writer): New functions.
- (pipe_remove_reader, pipe_remove_writer): New functions.
- (_pipe_first_writer): New function decl.
- (_pipe_no_writers, _pipe_no_writers): New function decl.
- (pipe_aquire, pipe_release): Function deleted.
- (pipe_break): Function decl deleted.
-
-Tue Aug 1 12:37:27 1995 Miles Bader <miles@churchy.gnu.ai.mit.edu>
-
- * pipe.c (pipe_recv): Get rid of code to deal with getting the
- source address from the control packet if there is no data packet,
- since pipe_write always writes a data packet.
-
-Mon Jul 31 14:50:00 1995 Miles Bader <miles@churchy.gnu.ai.mit.edu>
-
- * pipe.c (pipe_recv): Assert that a control packet should only
- have a source address if there is no corresponding data packet.
- (pipe_send): Change the test to determine whether we should write
- a control packet, so that we only do so if we need to. Also,
- don't record the source address in control packets, as it's
- recorded in the following data packet anyway, and this prevents it
- from being dealloc'd twice.
-
-Fri Jul 28 23:03:27 1995 Miles Bader <miles@churchy.gnu.ai.mit.edu>
-
- * pipe.h (stream_pipe_class, dgram_pipe_class, seqpack_pipe_class):
- Make these declarations extern so they don't fuck up initialization.
- (seqpacket_pipe_class): Renamed to `seqpack_pipe_class'.
diff --git a/libpipe/pipe.h b/libpipe/pipe.h
index d6c5ae8f..701cc918 100644
--- a/libpipe/pipe.h
+++ b/libpipe/pipe.h
@@ -98,7 +98,7 @@ struct pipe
PACKET_TYPE_CONTROL. Each data packet represents one datagram for
protocols that maintain record boundaries. Control packets always
represent the control information to be returned from one read
- operation, and will be returned in conjuction with the following data
+ operation, and will be returned in conjunction with the following data
packet (if any). Reads interested only in data just skip control
packets until they find a data packet. */
struct pq *queue;
@@ -139,7 +139,7 @@ pipe_is_readable (struct pipe *pipe, int data_only)
return (packet != NULL);
}
-/* Waits for PIPE to be readable, or an error to occurr. If NOBLOCK is true,
+/* Waits for PIPE to be readable, or an error to occur. If NOBLOCK is true,
this operation will return EWOULDBLOCK instead of blocking when no data is
immediately available. If DATA_ONLY is true, then `control' packets are
ignored. */
@@ -156,7 +156,7 @@ pipe_wait_readable (struct pipe *pipe, int noblock, int data_only)
return 0;
}
-/* Waits for PIPE to be readable, or an error to occurr. This call only
+/* Waits for PIPE to be readable, or an error to occur. This call only
returns once threads waiting using pipe_wait_readable have been woken and
given a chance to read, and if there is still data available thereafter.
If DATA_ONLY is true, then `control' packets are ignored. */
diff --git a/libpipe/pq.h b/libpipe/pq.h
index 3a26aa80..2f8311ef 100644
--- a/libpipe/pq.h
+++ b/libpipe/pq.h
@@ -219,8 +219,8 @@ pq_tail (struct pq *pq, unsigned type, void *source)
int pq_dequeue (struct pq *pq);
/* Returns the next available packet in PQ, without removing it from the
- queue, or NULL if there is none, or the next packet isn't appropiate.
- A packet is inappropiate if SOURCE is non-NULL its source field doesn't
+ queue, or NULL if there is none, or the next packet isn't appropriate.
+ A packet is inappropriate if SOURCE is non-NULL its source field doesn't
match it, or TYPE is non-NULL and the packet's type field doesn't match
it. */
PQ_EI struct packet *
diff --git a/libports/ChangeLog b/libports/ChangeLog
deleted file mode 100644
index d3ccd710..00000000
--- a/libports/ChangeLog
+++ /dev/null
@@ -1,581 +0,0 @@
-2004-11-03 Ognyan Kulev <ogi@fmi.uni-sofia.bg>
-
- * resume-all-rpcs.c (ports_resume_all_rpcs): Fix check for block
- condition.
- * resume-bucket-rpcs.c (ports_resume_bucket_rpcs): Likewise.
- * resume-class-rpcs.c (ports_resume_class_rpcs): Likewise.
- * resume-port-rpcs.c (ports_resume_port_rpcs): Likewise.
-
-2003-08-17 Marcus Brinkmann <marcus@gnu.org>
-
- * ports.h (struct port_bucket): Change type of HTABLE to struct
- hurd_ihash.
- (struct port_info): Change type of HENTRY to hurd_ihash_locp_t.
- * lookup-port.c (ports_lookup_port): Use hurd_ihash_find instead
- ihash_find.
- * bucket-iterate.c (_ports_bucket_class_iterate): Use
- HURD_IHASH_ITERATE instead ihash_iterate.
- * inhibit-all-rpcs.c (ports_inhibit_all_rpcs): Likewise.
- * inhibit-bucket-rpcs.c (ports_inhibit_bucket_rpcs): Likewise.
- * create-internal.c (_ports_create_port_internal): Use
- hurd_ihash_add instead ihash_add.
- * import-port.c (ports_import_port): Likewise.
- * reallocate-from-external.c (ports_reallocate_from_external):
- Likewise.
- * reallocate-port.c (ports_reallocate_port): Likewise.
- * transfer-right.c (ports_transfer_right): Likewise.
- * create-bucket.c: Include <stddef.h>.
- (ports_create_bucket): Use hurd_ihash_init instead hurd_ihash_create.
- * class-iterate.c: Do not include <hurd/ihash.h>.
- * claim-right.c (ports_claim_right): Call hurd_ihash_locp_remove
- instead ihash_locp_remove.
- * complete-deallocate.c (_ports_complete_deallocate): Likewise.
- * destroy-right.c (ports_destroy_right): Likewise.
- * reallocate-from-external.c (ports_reallocate_from_external):
- Likewise.
- * reallocate-port.c (ports_reallocate_port): Likewise.
- * transfer-right.c (ports_transfer_right): Likewise.
-
-2001-03-29 Neal H Walfield <neal@cs.uml.edu>
-
- * claim-right.c (ports_claim_right): Include errno.h and
- assert.h. Add assertions. Clean up the logic.
-
- * create-bucket.c (ports_create_bucket): Include errno.h
- and stdlib.h. Do not include assert.h. Turn assertions
- into errors that set errno and return NULL.
- * create-class.c (ports_create_class): Likewise.
-
- * create-internal.c (_ports_create_internal): On error, do
- not deallocate a send right, but a receive right.
-
- * init.c: Do not initialize global variables to 0.
- * interrupt-notified-rpcs.c: Likewise.
-
- * port-deref.c (ports_port_deref): Simplify logic.
-
- * reallocate-port.c (ports_reallocate_port): Assert return from
- mach_port_move_member.
- * transfer-right.c (ports_transfer_right): Likewise.
-
-2001-03-26 Roland McGrath <roland@frob.com>
-
- * intern-external-port.c, allocate-port.c: Dead files removed
- from cvs. Reported by Neal H Walfield <neal@cs.uml.edu>.
-
-2000-07-25 Mark Kettenis <kettenis@gnu.org>
-
- * inhibit-all-rpcs.c (ports_inhibit_all_rpcs): Avoid calling
- hurd_thread_cancel on the current thread.
- * inhibit-class-rpcs.c (ports_inhibit_class_rpcs): Likewise.
- * inhibit-bucket-rpcs.c (ports_inhibit_bucket_rpcs): Likewise.
- * inhibit-port-rpcs.c (ports_inhibit_port_rpcs): Likewise.
-
-2000-03-17 Roland McGrath <roland@baalperazim.frob.com>
-
- * get-send-right.c: New file.
- * ports.h: Declare ports_get_send_right.
- * Makefile (SRCS): Add get-send-right.c.
-
- * get-right.c (gdb_loses): Remove global variable.
- (ports_get_right): Use a local instead.
-
-Sat Mar 6 17:05:45 1999 Thomas Bushnell, BSG <tb@mit.edu>
-
- * notify-dead-name.c (ports_do_mach_notify_dead_name): Deallocate
- newly created reference to DEAD_NAME.
-
-1999-02-28 Roland McGrath <roland@baalperazim.frob.com>
-
- * destroy-right.c (ports_destroy_right): Return error_t (always 0).
- * ports.h: Update decl.
-
- * bucket-iterate.c (_ports_bucket_class_iterate): New function,
- transmorgified from ports_bucket_iterate.
- (ports_bucket_iterate): Now just call that to do the work.
- * class-iterate.c: New file.
- (ports_class_iterate): New function.
- * ports.h: Declare ports_class_iterate and _ports_bucket_class_iterate.
- * Makefile (SRCS): Add class-iterate.c.
-
-Thu Feb 25 10:31:57 1999 Thomas Bushnell, BSG <tb@mit.edu>
-
- * end-rpc.c (ports_end_rpc): Signal ports_block anytime an rpc
- ends and someone is waiting on an inhibition.
-
-1999-01-01 Roland McGrath <roland@baalperazim.frob.com>
-
- * interrupt-on-notify.c (ports_interrupt_self_on_notification): Use
- assert to check we are in an rpc; don't return EIEIO (not appropriate).
-
-1997-08-14 Miles Bader <miles@gnu.ai.mit.edu>
-
- * interrupt-rpcs.c (ports_interrupt_rpcs): Put RPC into the
- interrupted list.
- * end-rpc.c (ports_end_rpc): Call ports_self_interrupted to remove
- the current thread from the interrupted list.
- * ports.h (ports_self_interrupted): New declaration.
- (struct rpc_info): Add interrupted_next field.
- * Makefile (SRCS): Add interrupted.c.
-
-Wed Aug 20 13:56:40 1997 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * manage-multithread.c (ports_manage_port_operations_multithread):
- Drop parms `wire_cthreads' and `wire_threads'. Add parm `hook'.
- (thread_function): Call HOOK instead of cthread_wire and/or
- thread_wire.
- * ports.h (ports_manage_port_operations_multithread): Adjust
- declaration.
-
-Fri Feb 14 00:51:32 1997 Miles Bader <miles@gnu.ai.mit.edu>
-
- * create-bucket.c (ports_create_bucket): Initialize rpcs, flags, &
- count fields in RET.
-
-Thu Sep 12 16:19:35 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * Makefile (HURDLIBS): New variable.
- (libports.so): Delete special depedency.
-
-Wed Aug 7 15:28:48 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * ports.h (_ports_create_port_internal,
- ports_create_port_noinstall): New declarations.
-
-Thu Jul 18 22:59:14 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * Makefile (SRCS): Add create-port-noinstall.c and create-internal.c.
- * create-port-noinstall.c: New file.
- * create-port.c (ports_create_port): Guts deleted; call new work
- function.
- * create-internal.c: New file; all the guts from create-port.c.
-
-Wed Jul 3 14:13:53 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * get-right.c (ports_get_right): Supply correct sync value in
- notification request.
-
-Mon May 6 16:33:55 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * ports.h (ports_allocate_port, ports_intern_external_port):
- Delete obsolete declarations.
- * allocate-port.c, intern-external-port.c: Delete files.
- * Makefile (SRCS): Delete `intern-external-port.c' and
- `allocate-port.c'.
-
-Sun Apr 28 15:22:58 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
-
- * allocate-port.c: Add obsolescence link warning.
- * intern-external-port.c: Add obsolescence link warning.
-
-Fri Mar 29 15:21:31 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * end-rpc.c (ports_end_rpc): Acquire _PORTS_LOCK before calling
- _ports_remove_notified_rpc.
-
-Fri Mar 29 09:04:53 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * reallocate-from-external.c (ports_reallocate_from_external):
- Require port to have a current port right.
- * reallocate-port.c (ports_reallocate_port): Likewise.
-
- * complete-deallocate.c (_ports_complete_deallocate): Only drop
- port right if it isn't already null.
-
- * transfer-right.c: New file.
- * Makefile (SRCS): Add transfer-right.c.
- * ports.h (ports_claim_right): Doc fix.
- (ports_transfer_right): New function.
-
-Thu Mar 28 10:47:58 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * claim-right.c (ports_claim_right): Take right out of port
- bucket.
-
- * manage-multithread.c (ports_manage_port_operations_multithread):
- Fill in meaningful statuses and errors rather than just zero.
- * manage-one-thread.c (ports_manage_port_operations_one_thread):
- Likewise.
-
- * begin-rpc.c (ports_begin_rpc): Return EOPNOTSUPP, not EDIED, if
- receive right is gone.
-
- * manage-one-thread.c (ports_manage_port_operations_one_thread):
- Fill in default reply before doing work; we might return 0 and
- mach_msg_server expects us to fill in a reply decently no matter
- what.
- (ports_manage_port_operations_multithread): Likewise.
-
- * claim-right.c (ports_claim_right): Hold lock until sendright
- frobbing is finished.
-
-Wed Mar 20 13:32:13 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * destroy-right.c (ports_destroy_right): Don't do anything if port
- has already been destroyed.
-
- * ports.h (ports_claim_right): New declaration.
- * claim-right.c: New file.
- * Makefile (SRCS): Add `claim-right.c'.
-
-Tue Mar 5 17:28:54 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * get-right.c (ports_get_right): Check mach_port_request_notification
- for error returns, against all odds.
-
-Mon Feb 26 17:10:38 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * interrupt-on-notify.c (ports_interrupt_rpc_on_notification):
- Only set _PORTS_NOTIFICATIONS->prevp if _PORTS_NOTIFICATIONS != 0.
- Likewise for PN->prev_req_p.
-
-Fri Jan 26 00:45:58 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * inhibit-class-rpcs.c (ports_inhibit_class_rpcs): Whoops, we
- still have the lock when hurd_condition_wait gets cancelled.
- * import-port.c (ports_import_port): Likewise.
- * create-port.c (ports_create_port): Likewise.
- * inhibit-bucket-rpcs.c (ports_inhibit_bucket_rpcs): Likewise.
- * inhibit-all-rpcs.c (ports_inhibit_all_rpcs): Likewise.
- * inhibit-port-rpcs.c (ports_inhibit_port_rpcs): Likewise.
-
- * import-port.c (ports_import_port): Don't lose a send right on
- PORT when we return an error.
- * create-port.c (ports_create_port): Delete the receive right, not
- the send right when we return an error.
-
-Thu Jan 25 12:10:48 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * manage-multithread.c (ports_manage_port_operations_multithread):
- Pass INP->msgh_id, not INP to ports_begin_rpc.
- * manage-one-thread.c (ports_manage_port_operations_one_thread): Ditto.
-
-Wed Jan 24 14:02:30 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * inhibit-all-rpcs.c (ports_inhibit_all_rpcs): Be interruptable;
- return EINTR if interrupted, or EBUSY if already inhibited.
- * inhibit-class-rpcs.c (ports_inhibit_class_rpcs): Likewise.
- * inhibit-port-rpcs.c (ports_inhibit_port_rpcs): Likewise.
- * inhibit-bucket-rpcs.c (ports_inhibit_bucket_rpcs): Likewise.
- * begin-rpc.c (ports_begin_rpc): Be interruptable.
- * create-port.c (ports_create_port): New function.
- * import-port.c (ports_import_port): New function.
- * allocate-port.c (ports_allocate_port): Call ports_create_port.
- * intern-external-port.c (ports_intern_external_port): Call
- ports_import_port.
- * ports.h (ports_create_port, ports_import_ports): New declarations.
- (PORTS_INHIBITED, PORTS_BLOCKED, PORTS_INHIBIT_WAIT, PORTS_NO_ALLOC,
- PORTS_ALLOC_WAIT): New macros (global values for common flags).
- (PORT_BLOCKED, PORT_INHIBITED, PORT_INHIBIT_WAIT,
- PORT_BUCKET_INHIBITED, PORT_BUCKET_BLOCKED, PORT_BUCKET_INHIBIT_WAIT,
- PORT_BUCKET_NO_ALLOC, PORT_BUCKET_ALLOC_WAIT, PORT_CLASS_INHIBITED,
- PORT_CLASS_BLOCKED, PORT_CLASS_INHIBIT_WAIT, PORT_CLASS_NO_ALLOC,
- PORT_CLASS_ALLOC_WAIT, _PORTS_INHIBITED, _PORTS_BLOCKED,
- _PORTS_INHIBIT_WAIT): Redefine using global flag values.
- (ports_inhibit_port_rpcs, ports_inhibit_all_rpcs,
- ports_inhibit_class_rpcs, ports_inhibit_bucket_rpcs): Return error_t.
- (ports_interupt_rpcs): Renamed from port_interrupt_rpc.
-
- * begin-rpc.c (ports_begin_rpc): Take new MSG_ID arg, and use it to
- see if the particular rpc shouldn't be inhibitable.
- * manage-multithread.c (ports_manage_port_operations_multithread):
- Pass INP to ports_begin_rpc, and only call DEMUXER if it returns 0.
- * manage-one-thread.c (ports_manage_port_operations_one_thread): Ditto.
- * ports.h (ports_begin_rpc): Add MSG_ID arg.
- (struct port_class): Add uninhibitable_rpcs field.
- (struct ports_msg_id_range): New structure.
- (ports_default_uninhibitable_rpcs): New declaration.
- * create-class.c (ports_create_class): Initialize the
- uninhibitable_rpcs field.
- * default-uninhibitable-rpcs.c (interrupt_operation_ids,
- ports_default_uninhibitable_rpcs): New variables.
- * Makefile (SRCS): Add default-uninhibitable-rpcs.c.
-
- * interrupt-rpcs.c (ports_interrupt_rpcs): Renamed from
- ports_interrupt_rpc.
- * Makefile (SRCS): Rename interrupt-rpc.c to interrupt-rpcs.c.
- * interrupt-operation.c (ports_S_interrupt_operation): Use
- ports_interrupt_rpcs instead of ports_interrupt_rpc.
- * no-senders.c (ports_no_senders): Likewise.
-
- * manage-multithread.c (ports_manage_port_operations_multithread):
- Fix spelling of cancel_threshold (was cancel_threshhold).
- * interrupt-operation.c (ports_S_interrupt_operation): Likewise.
- * ports.h (struct port_info): Likewise.
- * reallocate-from-external.c (ports_reallocate_from_external): Ditto.
- * reallocate-port.c (ports_reallocate_port): Likewise.
-
-Wed Jan 17 13:08:49 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * no-senders.c (ports_no_senders): Interrupt RPCs on PI too. Only
- do the ports_interrupt_notified_rpcs() if we're actually losing a ref.
-
-Fri Jan 5 16:40:34 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * interrupt-on-notify.c (ports_interrupt_rpc_on_notification):
- If PORT is dead or bogus, interrupt RPC immediately, and don't add
- a new request.
-
-Thu Dec 28 14:27:41 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * interrupt-on-notify.c (ports_interrupt_rpc_on_notification): If
- NEW_REQ is not needed, put it on the free list, don't call free on it.
-
-Thu Dec 28 11:04:06 1995 Miles Bader <miles@gnu.ai.mit.edu>
-
- * ports.h (ports_interrupt_self_on_port_death): New macro.
-
- * interrupt-notified-rpcs.c (ports_interrupt_notified_rpcs): Only
- bother to lock _PORTS_LOCK if there are notifications.
-
-Wed Dec 27 16:27:47 1995 Miles Bader <miles@gnu.ai.mit.edu>
-
- * ports.h (struct rpc_info): Get rid of next_notified/prev_notified_p.
- (struct rpc_notify): Get rid of port, what, next fields, and add
- rpc, notify, next, pending, next_req, and prev_req_p fields.
- (struct ports_notify): New structure.
- (_ports_notified_rpcs): Declaration removed.
- (_ports_notifications): New declaration.
- (_ports_free_ports_notifies): New declaration.
- Include <mach/notify.h>.
- * interrupt-on-notify.c (ports_interrupt_rpc_on_notification):
- Mostly rewrite to use new scheme.
- * interrupt-notified-rpcs (_ports_notified_rpcs): Variable removed.
- (_ports_notifications, _ports_free_ports_notifications): New variables.
- (ports_interrupt_notified_rpcs): Rewrite to use new scheme.
- (_ports_remove_notified_rpc): Ditto.
- (cancel_notification): Function removed.
- (remove_req): New function.
-
-Tue Dec 26 14:39:51 1995 Miles Bader <miles@gnu.ai.mit.edu>
-
- * interrupt-notified-rpcs.c (_ports_notified_rpcs,
- _ports_free_rpc_notifies): New variables.
- (ports_interrupt_notified_rpcs, cancel_notification,
- _ports_remove_notified_rpc): New functions.
- * interrupt-on-notify.c (ports_interrupt_rpc_on_notification,
- ports_interrupt_self_on_notification): New functions, new file.
- * ports.h (struct rpc_notify): New structure.
- (struct rpc_info): Add rpc_notifies, rpc_next_notified, and
- prev_notified_p fields.
- (_ports_notified_rpcs, _ports_free_rpc_notifies,
- _ports_remove_notified_rpc, ports_interrupt_rpc_on_notification,
- ports_interrupt_notified_rpcs, ports_interrupt_self_on_notification):
- New declarations.
- * begin-rpc.c (ports_begin_rpc): Initialize the notifies field.
- * end-rpc.c (ports_end_rpc): Get rid of any rpc notifications.
- * no-senders.c (ports_no_senders): Interrupt any rpcs requesting such.
- * dead-name.c (ports_dead_name): New function.
- * notify-dead-name.c (ports_do_mach_notify_dead_name): Call
- ports_dead_name().
- * Makefile (SRCS): Add interrupt-on-notify.c,
- interrupt-notified-rpcs.c, and dead-name.c.
-
-Tue Nov 21 22:04:28 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * manage-multithread.c: Don't wire timeouts to zero.
-
-Tue Nov 21 09:42:00 1995 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * ports.h (ports_do_mach_notify_dead_name): Declare `extern
- kern_return_t'.
- (ports_do_mach_notify_msg_accepted): Likewise.
- (ports_do_mach_notify_no_senders): Likewise.
- (ports_do_mach_notify_port_deleted): Likewise.
- (ports_do_mach_notify_port_destroyed): Likewise.
- (ports_do_mach_notify_send_once): Likewise.
- * notify-send-once.c: Include "notify_S.h".
- * notify-port-deleted.c: Likewise.
- * notify-msg-accepted.c: Likewise.
- * notify-port-destroyed.c: Likewise.
- * notify-no-senders.c: Likewise.
- * notify-dead-name.c: Likewise.
-
- * ports.h (struct port_info): New member `cancel_threshhold'.
- (ports_S_interrupt_operation): Include seqno arg; declare extern
- kern_return_t.
- * interrupt-operation.c: Include "interrupt_S.h".
- (ports_S_interrupt_operation): Set PI->cancel_threshhold if the
- incoming seqno is greater than the current threshhold.
- * manage-multithread.c
- (ports_manage_port_operations_multithread/internal_demuxer): If
- the incoming RPC has already been cancelled, then call
- hurd_thread_cancel before the user's demuxer.
- * manage-one-thread.c (ports_manage_port_operations_one_thread):
- Doc fix.
- * intern-external-port.c (ports_intern_external_port): Initialize
- PI->cancel_threshhold.
- * allocate-port.c (ports_allocate_port): Likewise.
- * reallocate-from-external.c (ports_reallocate_from_external):
- Clear PI->cancel_threshhold.
- * reallocate-port.c (ports_reallocate_port): Likewise.
-
-Sat Nov 18 08:50:13 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * inhibit-all-rpcs.c: If calling thread is serving an RPC, don't
- block waiting for that RPC to finish.
- * inhibit-class-rpcs.c: Likewise.
- * inhibit-bucket-rpcs.c: Likewise.
- * inhibit-port-rpcs.c: Likewise.
-
- * inhibit-all-rpcs.c (ports_inhibit_all_rpcs): Renamed from
- inhibit_all_rpcs.
-
-Tue Oct 24 13:32:39 1995 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * manage-multithread.c
- (ports_manage_port_operations_multithread/internal_demuxer): Don't
- attempt RPC if we can't get a valid port struct.
- * manage-one-thread.c
- (ports_manage_port_operations_one_thread/internal_demuxer): Likewise.
-
-Mon Oct 9 14:57:48 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * Makefile: Specify shared library dependencies.
-
-Fri Sep 22 10:19:17 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * ports.h: Include hurd.h.
-
-Fri Sep 8 14:44:03 1995 Michael I. Bushnell, p/BSG <mib@duality.gnu.ai.mit.edu>
-
- * end-rpc.c (ports_end_rpc): Call hurd_check_cancel.
-
-Wed Sep 6 11:20:20 1995 Miles Bader <miles@churchy.gnu.ai.mit.edu>
-
- * ports.h (ports_interrupt_server, ports_S_interrupt_operation):
- New declarations.
- * Makefile (OBJS): Add interruptServer.o.
- (SRCS): Add interrupt-operation.c.
- * interrupt-operation.c: New file.
-
- * ports.h (ports_notify_server, ports_do_mach_notify_*): New decls.
- * Makefile (MIGCOMSFLAGS): New variable.
- (OBJS): Added notifyServer.o.
- (SRCS): Added notify-dead-name.c, notify-no-senders.c,
- notify-port-destroyed.c, notify-msg-accepted.c,
- notify-port-deleted.c, and notify-send-once.c.
- * notify-dead-name.c: New file.
- * notify-no-senders.c: New file.
- * notify-port-destroyed.c: New file.
- * notify-msg-accepted.c: New file.
- * notify-port-deleted.c: New file.
- * notify-send-once.c: New file.
-
-Wed Aug 30 16:00:36 1995 Miles Bader <miles@geech.gnu.ai.mit.edu>
-
- * inhibit-port-rpcs.c (inhibit_port_rpcs): Renamed to
- `ports_inhibit_port_rpcs'.
-
-Tue Aug 29 15:59:49 1995 Michael I. Bushnell, p/BSG <mib@duality.gnu.ai.mit.edu>
-
- * manage-multithread.c (ports_manage_port_operations_multithread):
- Hammer WIRE_CTHREADS on for now.
-
-Thu Aug 24 10:25:52 1995 Miles Bader <miles@churchy.gnu.ai.mit.edu>
-
- * inhibit-port-rpcs.c (inhibit_port_rpcs): thread_cancel ->
- hurd_thread_cancel. Include <hurd.h>.
- * inhibit-class-rpcs.c (ports_inhibit_class_rpcs): Ditto.
- * inhibit-bucket-rpcs.c (ports_inhibit_bucket_rpcs): Ditto.
- * interrupt-rpc.c (ports_interrupt_rpc): Ditto.
- * inhibit-all-rpcs.c (inhibit_all_rpcs): Ditto.
-
- * Makefile (OBJS): Use :.c=.o notation.
-
-Wed Aug 23 15:03:11 1995 Miles Bader <miles@churchy.gnu.ai.mit.edu>
-
- * Makefile (REMHDRS): Removed.
- Order changed a bit.
-
-Fri Jul 21 11:45:22 1995 Michael I Bushnell <mib@geech.gnu.ai.mit.edu>
-
- * get-right.c (ports_get_right): If the right is null (because we
- are closing down), then just return null. (This helps in a race
- in ufs/ex2fs).
-
- * complete-deallocate.c (_ports_complete_deallocate): Clear
- PI->port_right; and do it before releasing _ports_lock.
-
- * manage-multithread.c (ports_manage_port_operations_multithread):
- For now, wire GLOBAL_TIMEOUT and THREAD_TIMEOUT to zero.
-
-Tue Jul 18 14:29:49 1995 Michael I Bushnell <mib@geech.gnu.ai.mit.edu>
-
- * manage-multithread.c (ports_manage_port_operations_multithread)
- [thread_function]: Return int. Don't cthread_exit child threads;
- just let them return normally.
-
-Wed Jul 12 13:32:22 1995 Michael I Bushnell <mib@duality.gnu.ai.mit.edu>
-
- * resume-class-rpcs.c (ports_resume_class_rpcs): Clear blocked
- flag using correct name.
-
- * manage-multithread.c (ports_manage_port_operations_multithread)
- [internal_demuxer]: Increment NREQTHREADS and TOTALTHREADS
- *before* forking newthread.
- [thread_function]: Don't increment NREQTHREADS and TOTALTHREADS here.
- Initialize NREQTHREADS and TOTALTHREADS in main body of function.
-
-Sat Jul 8 15:10:50 1995 Miles Bader <miles@churchy.gnu.ai.mit.edu>
-
- * allocate-port.c (ports_allocate_port): Properly add PI to
- CLASS's port list when the list is empty (why did this work before?).
- * intern-external-port.c (ports_intern_external_port): Ditto.
- * begin-rpc.c (ports_begin_rpc): Ditto adding INFO to PI's
- current_rpcs list.
- * create-class.c (ports_create_class): Initialize the PORTS and
- COUNT fields.
-
-Thu Jul 6 15:36:57 1995 Michael I Bushnell <mib@duality.gnu.ai.mit.edu>
-
- * Makefile: Removed dependencies that are now automatically
- generated.
-
-Tue Jun 27 15:28:54 1995 Michael I Bushnell <mib@duality.gnu.ai.mit.edu>
-
- * Makefile (SRCS): Add it *back*.
- * stubs.c: New file.
-
-Mon Jun 26 16:51:42 1995 Michael I Bushnell <mib@duality.gnu.ai.mit.edu>
-
- * ports.h: Fix spelling error.
-
- * manage-multithread.c (ports_manage_port_operations_multithread):
- Declare NREQTHREADS asd TOTALTHREADS volatile.
-
- * manage-multithread.c
- (ports_manage_port_operations_multithread/thread_function): Don't
- hold lock while setting TIMEOUT.
- When master goes back to wait for messages, it should unlock LOCK.
- Declare ERR inside THREAD_FUNCTION so it doesn't get shared by
- multiple threads.
-
-Thu Jun 22 11:28:56 1995 Michael I Bushnell <mib@duality.gnu.ai.mit.edu>
-
- * get-right.c (ports_get_right): Parenthesize flag test correctly.
- * reallocate-from-external.c (ports_reallocate_from_external):
- Likewise.
-
- * enable-bucket.c (ports_enable_bucket): Clean flag correctly.
-
- * lookup-port.c (ports_lookup_port): UNlock port lock at exit of
- function.
-
- * bucket-iterate.c: Include <hurd/ihash.h> and <cthreads.h>.
- (ports_bucket_iterate): Fix decl of NXT.
-
-Wed Jun 21 14:25:04 1995 Michael I Bushnell <mib@duality.gnu.ai.mit.edu>
-
- * Makefile (SRCS): Added bucket-iterate.c.
- * bucket-iterate.c: New file.
- * ports.h (port_bucket_iterate): New decl.
-
-Tue Jun 20 12:35:44 1995 Michael I Bushnell <mib@duality.gnu.ai.mit.edu>
-
- * enable-bucket.c: Include <cthreads.h>.
- * enable-class.c: Likewise.
- * count-bucket.c: Likewise.
-
- * libports/lookup-port.c (ports_lookup_port): Remove assignment
- from if test.
diff --git a/libports/bucket-iterate.c b/libports/bucket-iterate.c
index d376e6f8..e439cb19 100644
--- a/libports/bucket-iterate.c
+++ b/libports/bucket-iterate.c
@@ -31,7 +31,7 @@ _ports_bucket_class_iterate (struct port_bucket *bucket,
error_t (*fun)(void *))
{
/* This is obscenely ineffecient. ihash and ports need to cooperate
- more closely to do it effeciently. */
+ more closely to do it efficiently. */
struct item
{
struct item *next;
diff --git a/libports/create-internal.c b/libports/create-internal.c
index 5db71129..7a9b1cb0 100644
--- a/libports/create-internal.c
+++ b/libports/create-internal.c
@@ -100,7 +100,7 @@ _ports_create_port_internal (struct port_class *class,
err = mach_port_move_member (mach_task_self (), pi->port_right,
bucket->portset);
if (err)
- goto lose;
+ goto lose_unlocked;
}
*(void **)result = pi;
@@ -110,6 +110,7 @@ _ports_create_port_internal (struct port_class *class,
err = EINTR;
lose:
mutex_unlock (&_ports_lock);
+ lose_unlocked:
err = mach_port_mod_refs (mach_task_self (), port,
MACH_PORT_RIGHT_RECEIVE, -1);
assert_perror (err);
diff --git a/libports/manage-multithread.c b/libports/manage-multithread.c
index 553a6444..6ec1e49f 100644
--- a/libports/manage-multithread.c
+++ b/libports/manage-multithread.c
@@ -157,8 +157,6 @@ ports_manage_port_operations_multithread (struct port_bucket *bucket,
return 0;
}
- thread_timeout = global_timeout = 0; /* XXX */
-
nreqthreads = 1;
totalthreads = 1;
thread_function (1);
diff --git a/libports/manage-one-thread.c b/libports/manage-one-thread.c
index 57b8a9a9..4ea740b2 100644
--- a/libports/manage-one-thread.c
+++ b/libports/manage-one-thread.c
@@ -69,7 +69,7 @@ ports_manage_port_operations_one_thread (struct port_bucket *bucket,
}
else
{
- /* No need to check cancel threshhold here, because
+ /* No need to check cancel threshold here, because
in a single threaded server the cancel is always
handled in order. */
status = demuxer (inp, outheadp);
diff --git a/libps/ChangeLog b/libps/ChangeLog
deleted file mode 100644
index 79885024..00000000
--- a/libps/ChangeLog
+++ /dev/null
@@ -1,983 +0,0 @@
-2003-08-17 Marcus Brinkmann <marcus@gnu.org>
-
- * ps.h (struct ps_context): Change type of members procs, ttys,
- ttys_by_cttyid and users to struct hurd_ihash.
- * context.c (ps_context_create): Remove variables err_procs,
- err_ttys, err_ttys_by_cttyid and err_users. Use hurd_ihash_init
- instead of ihash_create. Call hurd_ihash_set_cleanup and the
- hurd_ihash_cleanup_t type instead of ihash_set_cleanup.
- (ps_context_free): Call hurd_ihash_destroy instead of ihash_free.
- (lookup): Call hurd_ihash_find instead ihash_find, hurd_ihash_add
- instead ihash_add.
- (ps_context_find_proc_stat): Take pointer of hash object.
- (ps_context_find_tty): Likewise.
- (ps_context_find_tty_by_cttyid): Likewise.
- (ps_context_find_user): Likewise.
-
-2002-06-09 Roland McGrath <roland@frob.com>
-
- * Makefile (installhdrs): List just ps.h, not common.h as well.
-
-2002-06-05 Roland McGrath <roland@frob.com>
-
- * procstat.c (fetch_procinfo): Use PI_FETCH_TASKEVENTS.
- (add_preconditions): PSTAT_TASK_EVENTS no longer needs PSTAT_TASK.
- (PSTAT_PROCINFO_TASK): Add PSTAT_TASK_EVENTS to the mask.
- (PSTAT_PROCINFO_MERGE): Here too.
- (proc_stat_set_flags): Don't use task_info for PSTAT_TASK_EVENTS.
-
-2002-06-04 James A. Morrison <ja2morri@uwaterloo.ca>
-
- * spec.c (sprint_frac_value): Added case for values between 1000 and
- 1023. Make VALUE, FRAC size_t's and return a value of type size_t.
- (ps_emit_nice_int): Removed function. Replaced by ...
- (ps_emit_nice_size_t): ... this. New Function.
- (ps_cmp_size_ts): New function.
- (ps_vsize_getter): Return a size_t instead of an int.
- (ps_rsize_getter): Likewise.
- (ps_get_rmem_frac): MEM_SIZE is now a size_t.
- (specs): Use ps_emit_nice_size_t instead of ps_emit_nice_int and use
- ps_cmp_size_ts instead of ps_cmp_ints for RSize and VSize.
-
-2002-05-13 Roland McGrath <roland@frob.com>
-
- * ps.h (proc_stat_state_tags): Make decl extern, not common.
-
-2002-05-07 Roland McGrath <roland@frob.com>
-
- * context.c (ps_context_find_tty_by_cttyid): int -> mach_port_t
- * proclist.c (proc_stat_list_add_all): unsigned -> size_t
- (proc_stat_list_add_login_coll): Likewise.
- (proc_stat_list_add_session): Likewise.
- (proc_stat_list_add_fn_pids): Likewise.
- (proc_stat_list_add_id_fn_pids): Likewise.
-
- * host.c (ps_host_basic_info): int -> size_t
- (ps_host_basic_info, ps_host_load_info): Likewise.
- * ps.h: Update decls.
- (struct proc_stat): unsigned -> size_t for task_events_info_size,
- args_len, env_len.
- * procstat.c (summarize_thread_waits): Fix argument type.
-
-2001-12-31 Roland McGrath <roland@frob.com>
-
- * host.c (ps_get_host): Use mach_port_t instead of host_t.
- * ps.h: Update decl.
-
-2001-12-22 Roland McGrath <roland@frob.com>
-
- * spec.c (ps_emit_wait): Remove local extern decls for functions
- actually defined static.
-
-2001-10-01 Marcus Brinkmann <marcus@gnu.org>
-
- * filters.c (ps_own_filter): Add const to type.
- (ps_not_leader_filter): Likewise.
- (ps_unorphaned_filter): Likewise.
- (ps_ctty_filter): Likewise.
- (ps_parent_filter): Likewise.
- (ps_alive_filter): Likewise.
- Submitted by Maurizio Boriani <baux@debian.org>.
-
-2001-03-29 Neal H Walfield <neal@cs.uml.edu>
-
- * host.c: Fix comments.
- (ps_host_basic_info): Make INITIALIZED static; otherwise
- we never cache BUF. Do not initalize static variables to 0.
- (ps_host_sched_info): Likewise.
- * ps.h: Doc fix.
-
-2001-02-25 Roland McGrath <roland@frob.com>
-
- * user.c: Include <string.h> for decls of built-ins.
-
-2000-02-11 Roland McGrath <roland@baalperazim.frob.com>
-
- * context.c (ps_context_find_tty_by_cttyid): Use the ttys_by_cttyid
- hash table, not the ttys hash table.
-
-2000-01-25 Roland McGrath <roland@baalperazim.frob.com>
-
- * tty.c (struct ps_tty_abbrev): Add const to member types.
- (ps_tty_abbrevs): Make const.
- (ps_tty_short_name): Clean up type usage, add consts.
- Include null terminator in calculation for short_name allocation size.
- Save lengths and use memcpy instead of using strcpy and strcat.
-
-1999-12-22 Roland McGrath <roland@baalperazim.frob.com>
-
- * Makefile (HURDLIBS): Add shouldbeinlibc.
-
-1999-07-10 Roland McGrath <roland@baalperazim.frob.com>
-
- * common.h: Add #include <sys/mman.h> for munmap decl.
-
-1999-07-03 Thomas Bushnell, BSG <tb@mit.edu>
-
- * common.h (VMFREE): Use munmap instead of vm_deallocate.
- * procstat.c (merge_procinfo): Likewise.
-
-1999-06-02 Roland McGrath <roland@baalperazim.frob.com>
-
- * ps.h (PSTAT_ENV): New macro.
- (struct proc_stat): New members `env', `env_len', `env_vm_alloced'.
- (proc_stat_env, proc_stat_env_len): New accessor macros.
- (PSTAT_USER_BASE): Increase value to leave more room for additions.
- * procstat.c (proc_stat_set_flags): Handle environment.
- (_proc_stat_free): Likewise.
- * spec.c (ps_get_env, ps_env_getter): New function and constant.
- (specs): New spec "Env" using ps_env_getter and ps_emit_args.
-
-1999-05-29 Roland McGrath <roland@baalperazim.frob.com>
-
- * spec.c (ps_emit_past_time, ps_emit_minutes): Fix return type of
- getter fn (int to void).
-
- * context.c (ps_context_free): Don't call ihash_free on PC->procs
- twice! Instead, call it on ttys, ttys_by_cttyid, and users.
-
- * spec.c (ps_get_start_time, ps_start_time_getter): New function and
- constant to report task_basic_info.creation_time time stamp via
- "start_time" spec.
- (specs): Add "Start" fmt for it.
-
-1998-10-19 Roland McGrath <roland@baalperazim.frob.com>
-
- * fmt.c (_fmt_create): Add braces to silence gcc warning.
- * procstat.c (summarize_thread_waits): Likewise.
- (proc_stat_set_flags): Likewise.
- (proc_stat_set_flags): Likewise.
- (proc_stat_set_flags): Likewise.
-
-Sat Jun 7 21:35:37 1997 Miles Bader <miles@gnu.ai.mit.edu>
-
- * spec.c (ps_emit_wait): Provide slightly better abbreviations for
- various port types.
-
-Fri May 23 13:13:18 1997 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * procstat.c (summarize_thread_basic_info): Don't include the
- kernel's idle threads in the summation.
- (summarize_thread_sched_info): Likewise.
- (summarize_thread_states): Likewise.
- (summarize_thread_waits): Likewise.
-
-Fri Feb 28 18:11:28 1997 Miles Bader <miles@gnu.ai.mit.edu>
-
- * fmt.c (ps_fmt_squash): Deal with FIELD->spec being NULL when
- advancing over a field.
-
-Fri Nov 15 19:14:28 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * procstat.c (proc_stat_set_flags): Allow the user fetch hook to
- turn on non-user bits, even if they've already failed in the
- standard code.
-
-Wed Oct 9 14:20:08 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * spec.c (ps_nominal_string): New function.
- (ps_emit_args, ps_emit_string): Use `-' for empty values.
- (specs): Use ps_nominal_string for `Args' and `Arg0' fields.
-
-Tue Oct 8 13:21:55 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * procstat.c (proc_stat_set_flags): Get rid of INAPP macro.
- Fix preconditions of PSTAT_SUSPEND_COUNT.
-
- * spec.c (ps_emit_seconds, ps_emit_minutes): Interpret
- PS_FMT_FIELD_COLON_MOD flag to mean `print zero as "-"'.
-
- * procstat.c (set_procinfo_flags): Set bits in PS->inapp as appropriate.
- (PSTAT_PROCINFO_THREAD, PSTAT_PROCINFO_TASK): New macro.
- (PSTAT_PROCINFO_TASK_THREAD_DEP): Renamed from PSTAT_PROCINFO_THREAD.
- (PSTAT_PROCINFO): Redefined.
- (count_threads): Use PSTAT_PROCINFO_TASK_THREAD_DEP.
- (proc_stat_set_flags): Don't use NEED macro for PSTAT_STATE.
-
-Mon Oct 7 17:40:21 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * ps.h (struct ps_fmt): Add ERROR field, and rename INVAL to INAPP.
- * fmt.c (_fmt_create): Initialize INAPP & ERROR fields.
- (ps_fmt_clone): Propagate them.
- (ps_fmt_write_proc_stat): Use them.
- * procstat.c (proc_stat_set_flags): Add NEED & INAPP macros, and
- use them to set the inapp field as well as the failed field.
- (_proc_stat_create): Initialize INAPP field.
- (proc_stat_thread_create): Initialize FAILED and INAPP fields.
-
-Sun Oct 6 18:42:52 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * ps.h (struct ps): Add INAPP field.
-
- * spec.c (ps_emit_wait): Correct mapping of init ports.
-
-Mon Sep 30 23:15:42 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * write.c (noise_write, noise_len): Correctly calculate the length
- of a character printed using an octal escape.
-
-Thu Sep 12 16:23:47 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * Makefile (HURDLIBS): New variable.
- (libps.so): Delete special depedency.
-
-Fri Aug 2 15:12:19 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * procstat.c (set_procinfo_flags): Pass HAVE to count_threads.
- (count_threads): Take new argument HAVE, and use different thread
- counting method depending on whether we have thread detail info.
-
-Thu Jul 18 18:54:07 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * tty.c (ps_tty_abbrevs): Add an entry for /dev/comX -> cX.
-
-Thu Jul 18 00:45:25 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * Makefile (LCLHDRS): Remove ps_msg.h and ps_term.h.
-
-Wed Jul 10 22:49:39 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * procstat.c (set_procinfo_flags): Don't use fake "*" wait value
- if there's no msgport.
-
-Mon Jul 8 21:39:58 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * write.c (_ps_stream_write_field): If a field is truncatable
- (MAX_WIDTH >= 0), take some of our spacing deficit out of it.
-
-Tue Jul 2 14:43:39 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * procstat.c (proc_stat_set_flags): Pass PS->task_events_info to
- task_info, not its address.
-
-Thu Jun 27 18:32:27 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * Makefile (LCLHDRS): Add common.h.
-
-Thu Jun 27 12:33:41 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * ps.h (struct ps_fmt): Add SRC_LEN field.
- (proc_stat_list_clone, ps_fmt_clone): New declarations.
- * fmt.c (_fmt_create): Set NEW_FMT->src_len. Use strdup.
- (ps_fmt_clone): New function.
- * proclist.c (proc_stat_list_clone): New function.
-
-Mon Jun 3 10:17:43 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * spec.c (ps_emit_wait): Never truncate what we write.
-
- * user.c (ps_user_passwd): Check return value of install_passwd
- correctly (it's an error_t).
-
- * ps.h (struct proc_stat): Add PROC_INFO_VM_ALLOCED,
- THREAD_WAITS_VM_ALLOCED, and ARGS_VM_ALLOCED fields,
- * procstat.c (merge_procinfo) Take a struct proc_stat as an arg,
- not all the individual fields. Correctly set OLD_PI_HDR.
- Correctly calculate REALLY_NEED.
- (set_procinfo_flags): Use new calling merge_procinfo calling convention.
- (_proc_stat_free): Use explicit VM_ALLOCED flag for MFREEMEM.
- (proc_stat_set_flags): Try mallocing a buffer for PS->args.
- Move second call to set_procinfo_flags after msgport suppress test.
- Add TEST_MSGPORT_FLAGS variable, & use it.
- Be more picky about when we call set_procinfo_flags.
-
-Sat Jun 1 11:18:58 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * procstat.c (set_procinfo_flags): New function.
- (proc_stat_set_flags): Use it, to get msgport validity testing right.
- (merge_procinfo): Take and return HAVE instead of using a
- reference parameter. Clean up malloced storage if we get an error.
-
- * spec.c (struct ps_fmt_spec_block): New type.
- (specs_add_alias): Use a linked list of ps_fmt_spec_blocks instead of
- reallocing a vector of specs.
- (ps_fmt_specs_find): Change searching accordingly.
- * ps.h (struct ps_fmt_specs): The EXPANSIONS field now points to a
- struct ps_fmt_spec_block. Delete EXPANSIONS_ALLOCED field.
-
- * procstat.c (merge_procinfo): Correctly test for malloc failure.
-
-Fri May 31 18:36:18 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * procstat.c (MFREEMEM): New macro combining MFREEM & MFREEVM.
- (MFREEM, MFREEVM): Macros deleted.
- (merge_procinfo): Do mem allocation more efficiently and correctly.
- (fetch_procinfo): Do conversion for PI_SIZE from/to units of
- sizeof (int), so no one else has to deal with it.
- (PROCINFO_MALLOC_SIZE, WAITS_MALLOC_SIZE): New macros.
-
- * procstat.c (proc_stat_set_flags): After fetching number of
- threads to guess whether we need wait info, put it in PS->num_threads.
- (merge_procinfo): Avoid vm_allocing a procinfo buffer each time if
- we can help it.
- Correctly reflect newly fetched info.
- (PSTAT_PROCINFO_MERGE, PSTAT_PROCINFO_REFETCH): New macros.
-
-Wed May 29 11:31:31 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * procstat.c (MP_MGET): Only disable msgport on timeout.
- (get_thread_wait): Decrement N in loop.
-
- * ps.h: Renumber PSTAT_ values to remove dup.
-
- * procstat.c (merge_procinfo): Don't die if WAITS == 0.
- (summarize_thread_waits): Correctly advance NEXT_WAIT.
- Skip threads marked `itimer'.
- (proc_stat_set_flags): Consider processes with less than 4 threads
- to be candidates for a meaningful process wait status.
- (get_thread_wait): Use strnlen instead of memchr.
- (PSTAT_PROCINFO): Typo: PSTAT_THREAD_WAIT --> PSTAT_THREAD_WAITS.
- (PSTAT_USES_MSGPORT): Add PSTAT_THREAD_WAIT.
-
-Tue May 28 16:36:17 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * fmt.c (_fmt_create): Make NAME termination work for posix-mode.
-
- * fmt.c (ps_fmt_write_proc_stat): Call the output function correctly.
- (_fmt_create): Get FIELD's precision, not width, from its spec.
-
-Fri May 24 13:33:14 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * procstat.c (fetch_procinfo): Always turn on PSTAT_PROC_INFO if
- proc_getprocinfo returns successfully.
- (merge_procinfo): Update *HAVE with PSTAT_PROC_INFO from
- REALLY_HAVE here.
-
-Wed May 22 19:55:04 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * fmt.c (_fmt_create): Increment SRC when reading modifiers.
- Recognize '^' modifier.
-
-Sun May 12 13:33:16 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * procstat.c (PSTAT_PROCINFO, PSTAT_PROCINFO_THREAD): Add
- PSTAT_THREAD_WAITS.
- (proc_stat_set_flags): Be more careful about when we fetch
- thread_wait information, and synthesize a process-summary thread_wait
- value for lots of threads.
- (summarize_thread_waits): Only give a real summary if there's but
- a single user thread.
- (fetch_procinfo): Use PSTAT_THREAD_WAITS instead of PSTAT_THREAD_WAIT.
- * ps.h (PSTAT_THREAD_WAITS): New macro.
-
- * procstat.c (merge_procinfo, fetch_procinfo): Change HAVE to be an
- input/output parameter.
- (proc_stat_set_flags): Change accordingly.
-
- * procstat.c (get_thread_wait): Correctly advance WAIT.
-
- * spec.c (specs): Give runtime specs 2 fraction digits by default.
-
-Thu May 9 17:03:37 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * procstat.c (fetch_procinfo): Pass a reference to PI_FLAGS in
- call to fetch_procinfo.
-
-Mon May 6 16:28:54 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * proclist.c (proc_stat_list_spec_nominal): Take a spec again.
- * ps.h (proc_stat_list_spec_nominal): Change FIELD arg to SPEC.
-
- * user.c (install_passwd): New function.
- (ps_user_passwd): Use it.
- (ps_user_uname_create, ps_user_passwd_create): New functions.
- * ps.h (ps_user_uname_create, ps_user_passwd_create): New declarations.
- (ps_fmt_set_output_width): New declaration.
-
- * spec.c (ps_emit_user_name): New function.
-
- * ps.h (struct ps_fmt_spec): Remove keep field, add flags field.
- (struct ps_fmt_field): Remove at_mod, colon_mod, & keep fields,
- add flags field.
- (PS_FMT_FIELD_AT_MOD, PS_FMT_FIELD_COLON_MOD, PS_FMT_FIELD_KEEP,
- PS_FMT_FIELD_UPCASE_TITLE): New macros.
- * spec.c (specs): Initialize flags field, not keep field.
- (specs_add_alias): Pass on flags field.
- * fmt.c (_fmt_create): Use flags fields, and implement global
- flags, and add upcase flag (^).
- (ps_fmt_write_titles): Implement PS_FMT_FIELD_UPCASE_TITLE.
- * proclist.c (proc_stat_list_spec_nominal): Use flags field, not
- keep field.
-
- * ps.h (struct proc_stat): Remove exec_flags field.
- (PSTAT_EXEC_FLAGS): Macro removed.
- * procstat.c (add_preconditions, proc_stat_set_flags): Remove
- references to exec_flags.
-
-Sun May 5 00:22:01 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * proclist.c (proc_stat_list_spec_nominal): Take a field, not a spec.
- If the field has the keep flag set, don't nominalize it.
- * fmt.c (_fmt_create): Change syntax of fields. Add support for
- precision and `@', `:', `?', & `!' modifiers.
- Add POSIX argument, and support for posix-style format strings.
- When using the field name as the title, use the defn, not the user's.
- (ps_fmt_squash): Call FN with the field, not the field's spec.
- (ps_fmt_squash_flags): Appropiately modify the function we use.
- (ps_fmt_create, ps_fmt_creation_error): Add POSIX argument.
- * ps.h (struct ps_fmt_spec): Add precision & keep fields.
- Change args to OUTPUT_FN.
- (struct ps_fmt_field): Add precision, keep, at_mod, & colon_mod fields.
- (proc_stat_list_spec_nominal): Change SPEC arg to FIELD.
- (ps_fmt_squash): Call FN on the field, not the spec.
- (ps_fmt_create, ps_fmt_creation_error): Add POSIX arg.
- * spec.c (specs): Add precision & keep fields.
- (FG): New macro.
- (ps_emit_*): Take FIELD argument instead of WIDTH.
-
-Thu May 2 00:12:19 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * ps.h (ps_fmt_creation_error): New declaration.
-
-Tue Apr 30 18:54:57 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * fmt.c (_fmt_create): New function (was ps_fmt_create).
- (ps_fmt_create): Call _fmt_create.
- (ps_fmt_creation_error): New function.
-
- * spec.c (ps_emit_past_time): Implement.
-
-Mon Apr 29 12:59:08 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * spec.c (ps_emit_seconds): Use new args to fmt_seconds.
- (ps_emit_minutes): Use new args to fmt_minutes.
-
-Tue Apr 23 13:38:06 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * ps.h (PSTAT_STATE_P_ATTRS): Fix names of individual flags.
-
- * spec.c (state_shadows): If a process has no parent don't show
- various process attributes (that are likely to be noise).
-
-Thu Apr 11 18:05:16 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * Makefile (MIGCOMUFLAGS): Delete variable.
-
- * spec.c (ps_emit_past_time): Return zero.
-
-Wed Mar 27 15:19:40 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * Makefile (msg-MIGUFLAGS, term-MIGUFLAGS): Add a user prefix of `ps_'.
- * procstat.c (proc_stat_set_flags): Use new prefix.
- Include "ps_msg.h".
- * tty.c (ps_tty_name): Use new prefix.
- Include "ps_term.h".
-
-Mon Mar 25 11:35:48 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * ...just about everything...: Get rid of mega typedefs, and just
- use structure pointers like other hurd libraries. Other misc cleanups.
-
- * ps.h (struct ps_fmt_specs): Add EXPANSIONS & EXPANSIONS_ALLOCED.
- * spec.c (ps_fmt_specs_find): Use new alias expansion method.
- (specv_find, specs_add_alias): New functions.
-
-Mon Mar 11 16:27:14 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * write.c (noise_write): Keep track of amount printed correctly.
-
-Sat Mar 9 15:52:55 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * write.c (iscntl): New macro.
- (noise_write, noise_len): Correctly handle MAX < 0 case.
- (noise_write): Use new arguments for flush.
- (flush): Moved to file scope. Remove END argument and use NEW - 1.
- (noise_write): Make T of type unsigned char * so that chars with
- the high bit set print correctly.
-
-Thu Mar 7 19:08:00 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * write.c (iscntl): New macro.
- (noise_write, noise_len, flush): New functions.
- (ps_stream_write, _ps_stream_write_field): Use noise functions.
-
-Thu Feb 15 00:02:53 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * spec.c (specs): Right-align the TTY column.
-
-Wed Feb 14 17:49:17 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * write.c (ps_stream_write): Don't screw up on negative spaces.
-
- * proclist.c (proc_stat_list_add_pids): Add and support new return
- parameter PROC_STATS.
- (proc_stat_list_add_pid): Add and support new return parameter PS.
- (proc_stat_list_add_fn_pids, proc_stat_list_add_id_fn_pids,
- proc_stat_list_add_all, proc_stat_list_add_login_coll,
- proc_stat_list_add_session, proc_stat_list_add_pgrp):
- Add and support new return parameters PROC_STATS & NUM_PROCS.
- * ps.h (proc_stat_list_add_pids, proc_stat_list_add_pid,
- proc_stat_list_add_all, proc_stat_list_add_login_coll,
- proc_stat_list_add_session, proc_stat_list_add_pgrp):
- Update declarations.
-
- * filters.c (ps_alive_filter): New variable.
- (ps_alive_p): New function.
- * ps.h (ps_alive_filter): New declaration.
-
-Mon Feb 12 14:34:22 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * spec.c (ps_emit_wait): For rpcs, put the port first.
-
-Fri Feb 9 15:55:35 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * ps.h (struct proc_stat): Add thread_wait, thread_waits, &
- thread_waits_len fields.
- (PSTAT_THREAD_WAIT): Renamed from PSTAT_THREAD_RPC.
- (proc_stat_thread_wait): New macro.
- (ps_stream_write_trunc_field): New declaration.
- * procstat.c (fetch_procinfo, merge_procinfo): Return wait strings.
- (summarize_thread_waits): Return both wait and rpc info.
- (get_thread_wait): New function.
- (proc_stat_set_flags): Support finding wait info.
- Change occurances of PSTAT_THREAD_RPC to PSTAT_THREAD_WAIT.
- * spec.c (specs): Change `Rpc' entry to `Wait'.
- (ps_emit_wait): New function.
- (ps_emit_string, ps_emit_string0): Use ps_stream_write_trunc_field.
- (ps_get_wait): Renamed from ps_get_rpc; calling convention changed.
- (ps_wait_getter): Renamed from ps_rpc_getter & contents changed accord.
- (get_syscall_name, get_rpc_name): New stub functions.
- * write.c (ps_stream_write_field): Call _ps_stream_write_field.
- (ps_stream_write_trunc_field): New function.
- (_ps_stream_write_field): New function, from ps_stream_write_field.
-
-Sat Feb 3 22:22:01 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * spec.c (specs, state_shadows, ps_pid_getter,
- ps_thread_index_getter, ps_owner_getter, ps_owner_uid_getter,
- ps_ppid_getter, ps_pgrp_getter, ps_session_getter,
- ps_login_col_getter, ps_num_threads_getter, ps_args_getter,
- ps_state_getter, ps_rpc_getter, ps_vsize_getter, ps_rsize_getter,
- ps_cur_priority_getter, ps_base_priority_getter,
- ps_max_priority_getter, ps_usr_time_getter, ps_sys_time_getter,
- ps_tot_time_getter, ps_rmem_frac_getter, ps_cpu_frac_getter,
- ps_sleep_getter, ps_susp_count_getter, ps_proc_susp_count_getter,
- ps_thread_susp_count_getter, ps_tty_getter, ps_page_faults_getter,
- ps_cow_faults_getter, ps_pageins_getter, ps_msgs_sent_getter,
- ps_msgs_rcvd_getter, ps_zero_fills_getter): Make const.
- * ps.h (ps_getter_t, ps_filter_t, struct ps_filter,
- ps_not_leader_filter, ps_ctty_filter, ps_unorphaned_filter,
- ps_parent_filter, ps_std_fmt_specs): Make const.
-
-Mon Jan 15 16:32:31 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * procstat.c (summarize_thread_basic_info): If there are any
- running threads, then only average priority from them.
-
-Sun Jan 14 00:24:55 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * spec.c (state_shadows): Don't reflect a suspended thread in the
- process state display if any thread isn't suspended.
-
-Sun Dec 24 14:24:52 1995 Miles Bader <miles@gnu.ai.mit.edu>
-
- * Makefile (installhdrsubdir): New macro (put ps.h in <>, not <hurd/>).
-
-Sat Dec 23 21:50:58 1995 Miles Bader <miles@gnu.ai.mit.edu>
-
- * fmt.c (ps_fmt_set_output_width): New function.
-
-Fri Dec 22 12:21:04 1995 Miles Bader <miles@gnu.ai.mit.edu>
-
- * ps.h (struct ps_user_hooks): New structure.
- (PSTAT_HOOK, PSTAT_USER_BASE, PSTAT_USER_MASK): New macros.
- (struct ps_context): Add USER_HOOKS field.
- * procstat.c (_proc_stat_free): Call user cleanup hook.
- (proc_stat_set_flags, add_preconditions): Deal with user bits.
- * context.c (ps_context_create): Initialize USER_HOOKS field.
-
-Thu Dec 21 12:04:24 1995 Miles Bader <miles@gnu.ai.mit.edu>
-
- * spec.c (ps_get_usr_time, ps_get_sys_time, ps_get_tot_time):
- Return a struct timeval instead of mach time_value_t.
- (ps_cmp_times): New function.
- (ps_emit_seconds, ps_emit_minutes): Use timefmt functions.
- (append_fraction, sprint_long_time, ps_emit_nice_seconds): Deleted.
- Include <timefmt.h>.
-
- * ps.h (struct ps_fmt_spec): Add TITLE field. Renamed
- DEFAULT_WIDTH field to WIDTH, and move to after TITLE.
- (ps_fmt_spec_width): Renamed from ps_fmt_spec_default_width()..
- (ps_fmt_spec_title): New macro.
- (struct ps_fmt): Add INVAL field.
- (ps_fmt_inval): New macro.
- * spec.c (specs): Rearrange to use new field layout.
-
- * fmt.c (ps_fmt_create): Use the new spec fields.
- (ps_fmt_write_proc_stat): Support new inval field in FMT.
-
- * spec.c (ps_fmt_specs_find): Renamed from find_ps_fmt_spec; now
- uses a struct ps_fmt_specs instead of an array of specs.
- (specs): Renamed from ps_std_fmt_specs;
- (ps_std_fmt_specs): Now of type struct ps_fmt_specs, pointing to specs.
- * ps.h (ps_fmt_specs_t): New typedef.
- (struct ps_fmt_specs): New structure.
- (ps_std_fmt_specs): Now of type struct ps_fmt_specs.
- (ps_fmt_specs_find): Renamed from find_ps_fmt_spec; now uses a
- struct ps_fmt_specs instead of an array of specs.
- (ps_fmt_create): Now takes a ps_fmt_specs_t structure instead of
- an array of specs.
-
- * fmt.c (ps_fmt_create): Now takes a ps_fmt_specs_t instead of an
- array of specs. Also fixup call to ps_fmt_specs_find().
-
- * ps.h (struct proc_stat): Add failed and hook fields.
- * procstat.c (proc_stat_set_flags): Support the failed field.
- (_proc_stat_create): Initialize the failed and hook fields.
-
-Wed Dec 20 12:49:24 1995 Miles Bader <miles@gnu.ai.mit.edu>
-
- * spec.c (ps_emit_nz_int): Write `-' when the value is 0, rather
- than mangling the output.
-
-Sun Dec 17 03:09:31 1995 Miles Bader <miles@gnu.ai.mit.edu>
-
- * procstat.c (proc_stat_set_flags): If there's no owner, set the
- uid to -1 (and the owner to null), instead of failing.
- * spec.c (ps_emit_uid): Use an int uid, and emit "-" for none.
- (ps_emit_uname, ps_cmp_uids, ps_cmp_unames, ps_nominal_user):
- Handle NULL users.
-
- * filters.c (ps_not_leader_p): Renamed from ps_not_sess_leader_p.
- (ps_not_leader_filter): Renamed from ps_not_sess_leader_filter.
- (ps_unorphaned_p): Include login leaders as well as session leaders.
- * ps.h (ps_not_leader_filter): Renamed from ps_not_sess_leader_filter.
-
-Sat Dec 16 23:42:27 1995 Miles Bader <miles@gnu.ai.mit.edu>
-
- * ps.h (proc_stat_owner_uid): New macro.
- (PSTAT_OWNER_UID): New macro.
- (struct proc_stat): Add owner_uid field.
- * procstat.c (proc_stat_set_flags): Add support for PROC_OWNER_UID.
- (add_preconditions): Add preconditions for owner_uid (& owner).
- * spec.c (ps_owner_uid_getter): New variable.
- (ps_get_owner_uid, ps_nominal_uid): New functions.
- (ps_std_fmt_specs): Make "UID" use owner_uid rather than owner.
- (own_uid): New variable (was function local).
- * filters.c (ps_own_filter): Depend on PSTAT_OWNER_UID.
- (ps_own_p): Account for there being no uid.
-
-Thu Nov 16 12:51:34 1995 Miles Bader <miles@gnu.ai.mit.edu>
-
- * write.c (ps_stream_write_field): Trim spaces from BUF.
-
-Wed Nov 15 18:55:26 1995 Miles Bader <miles@gnu.ai.mit.edu>
-
- * ps.h (ps_fmt_write_titles, ps_fmt_write_proc_stat,
- proc_stat_list_fmt, ps_emit_int, ps_emit_nz_int, ps_emit_priority,
- ps_emit_percent, ps_emit_num_blocks, ps_emit_nice_int,
- ps_emit_nice_seconds, ps_emit_seconds, ps_emit_uid, ps_emit_uname,
- ps_emit_string0, ps_emit_string, ps_emit_tty_name, ps_emit_state,
- ps_stream_write, ps_stream_space, ps_stream_pad,
- ps_stream_newline, ps_stream_write_field, ps_stream_write_int_field):
- Use new STREAM parameter instead of old one and count.
- (ps_stream_write): Renamed from ps_write_string.
- (ps_stream_space): Renamed from ps_write_spaces.
- (ps_stream_pad): Renamed from ps_write_padding.
- (ps_stream_write_field): Renamed from ps_write_field.
- (ps_stream_write_int_field): Renamed from ps_write_int_field.
- (ps_stream_newline): New declaration.
-
- * fmt.c (ps_fmt_write_titles, ps_fmt_write_proc_stat): Use new
- write function names. Use new STREAM parameter instead of old one
- and count.
- * proclist.c (proc_stat_list_fmt): Ditto.
- * spec.c (ps_emit_int, ps_emit_nz_int, ps_emit_priority,
- ps_emit_percent, ps_emit_num_blocks, ps_emit_nice_int,
- ps_emit_nice_seconds, ps_emit_seconds, ps_emit_uid, ps_emit_uname,
- ps_emit_string0, ps_emit_string, ps_emit_tty_name, ps_emit_state):
- Ditto.
- (ps_emit_seconds): Remove leading spaces from what we print.
-
- * write.c (ps_stream_write): Renamed from ps_write_string.
- (ps_stream_space): Renamed from ps_write_spaces.
- (ps_stream_pad): Renamed from ps_write_padding.
- (ps_stream_write_field): Renamed from ps_write_field.
- (ps_stream_write_int_field): Renamed from ps_write_int_field.
- (ps_stream_write, ps_stream_space, ps_stream_pad,
- ps_stream_newline, ps_stream_write_field, ps_stream_write_int_field):
- Use new STREAM parameter instead of old one and count.
- Use new function names.
- (ps_stream_write, ps_stream_space): Support negative spaces.
- (ps_stream_newline): New function.
- (ps_stream_pad, ps_stream_write_field): Use negative spaces.
-
-Tue Nov 7 17:43:48 1995 Miles Bader <miles@gnu.ai.mit.edu>
-
- * spec.c (ps_base_priority_getter, ps_cur_priority_getter,
- ps_get_base_priority, ps_get_cur_priority): Get this info using
- PSTAT_THREAD_BASIC instead of PSTAT_THREAD_SCHED.
- * procstat.c (summarize_thread_basic_info): Summarize available
- priority info too.
- (summarize_thread_sched_info): Do max_ & depress_priority too.
-
- * procstat.c (proc_stat_set_flags): Initialize the proc_info and
- proc_info_size fields if they've never been set before.
- Always update proc_getprocinfo fields, even if we already had them.
- (add_preconditions): Correct preconditions for PSTAT_STATE.
- (PSTAT_TEST_MSGPORT): Renamed from SHOULD_SUPPRESS_MSGPORT_FLAGS.
- (PSTAT_USES_MSGPORT): New macro.
- (SUPPRESS_MSGPORT_FLAGS): Use PSTAT_USES_MSGPORT, not PSTAT_MSGPORT.
- (proc_stat_set_flags): Use PSTAT_TEST_MSGPORT.
- (merge_procinfo): Only copy old task info if we actually had it.
- (proc_stat_set_flags): Don't unnecessarily grab procinfo stuff.
-
-Tue Oct 31 14:03:53 1995 Miles Bader <miles@gnu.ai.mit.edu>
-
- * spec.c (ps_rpc_getter): New variable.
- (ps_get_rpc): New function.
- (ps_std_fmt_specs): Add "RPC" entry.
- (ps_emit_nz_int): New function.
-
- * ps.h (PSTAT_STATE_P_LOGINLDR, PSTAT_STATE_P_WAIT,
- PSTAT_STATE_P_GETMSG): New flags.
- * procstat.c (add_preconditions): Don't require PSTAT_EXEC_FLAGS for
- getting the state anymore (but do require PSTAT_{TASK,THREAD}_BASIC).
- (proc_stat_state_tags): Update to reflect new flags.
- (proc_stat_set_flags): Set new flags.
-
- * procstat.c (PSTAT_PROCINFO, PSTAT_PROCINFO_THREAD): New macros.
- (fetch_procinfo, merge_procinfo): New functions.
- (SHOULD_SUPPRESS_MSGPORT_FLAGS): Change to use more accurate flags.
- (should_suppress_msgport): Use new fields.
- (summarize_thread_basic_info, summarize_thread_sched_info,
- summarize_thread_states, summarize_thread_rpcs, count_threads):
- New functions.
- (proc_stat_set_flags): Support the new division of PSTAT_INFO into
- individual flags, and support getting thread information by
- using the thread's origin proc_stat.
- (_proc_stat_free): Free the thread_basic_info and
- thread_sched_info fields if necessary.
- (proc_stat_thread_create): Don't require that the source process
- have thread information around; it will be fetched later if necessary.
-
- * spec.c (ps_ppid_getter, ps_pgrp_getter, ps_session_getter,
- ps_login_col_getter): Use PSTAT_PROC_INFO, not PSTAT_INFO.
- (ps_get_ppid, ps_get_pgrp, ps_get_session, ps_get_login_col): Use
- proc_stat_proc_info, not proc_stat_info.
- (ps_vsize_getter, ps_rsize_getter, ps_rmem_frac_getter,
- ps_proc_susp_count_getter): Use PSTAT_TASK_BASIC, not PSTAT_INFO.
- (ps_get_vsize, ps_get_rsize, ps_get_rmem_frac, ps_get_proc_susp_count):
- Use proc_stat_task_basic_info, not proc_stat_info.
- (ps_cur_priority_getter, ps_base_priority_getter,
- ps_max_priority_getter): Use PSTAT_THREAD_SCHED, not PSTAT_THREAD_INFO.
- (ps_usr_time_getter, ps_sys_time_getter, ps_tot_time_getter,
- ps_cpu_frac_getter, ps_sleep_getter):
- Use PSTAT_THREAD_BASIC, not PSTAT_THREAD_INFO.
-
- * filters.c (ps_own_filter): Use PSTAT_PROC_INFO, not PSTAT_INFO.
- (ps_own_p): Use proc_stat_proc_info, not proc_stat_info.
-
- * ps.h (proc_stat_num_threads): Use the num_threads field.
- (proc_stat_thread_sched_info, proc_stat_thread_basic_info): Don't
- take the address, now that the fields used are pointers themselves.
- (proc_stat_thread_rpc, proc_stat_task_basic_info): New macros.
- (proc_stat_proc_info): Renamed from proc_stat_info.
- (PSTAT_PROC_INFO): Renamed from PSTAT_INFO.
- (PSTAT_TASK_BASIC, PSTAT_THREAD_BASIC, PSTAT_THREAD_SCHED,
- PSTAT_THREAD_RPC): New macros.
- (struct proc_stat): info & info_len --> proc_info & proc_info_len.
- Add the num_threads, task_basic_info, and thread_rpc fields.
- thread_basic_info & thread_sched_info are now pointers.
-
-Mon Oct 9 14:57:48 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * Makefile: Specify shared library dependencies.
-
-Fri Aug 25 18:55:51 1995 Miles Bader <miles@churchy.gnu.ai.mit.edu>
-
- * ps.h (ps_std_fmt_specs): Declare extern.
-
-Wed Aug 23 15:04:51 1995 Miles Bader <miles@churchy.gnu.ai.mit.edu>
-
- * Makefile (OBJS): Just put the migs stubs directly in here.
- (REMHDRS, MIGSTUBS): Removed.
-
-Sat Aug 19 11:49:06 1995 Miles Bader <miles@churchy.gnu.ai.mit.edu>
-
- * procstat.c (proc_stat_set_flags): Actually set the P_STOP bit.
-
-Fri Aug 18 16:43:41 1995 Miles Bader <miles@churchy.gnu.ai.mit.edu>
-
- * ps.h (PSTAT_STATE_*): All proc state flags reorganized and
- renamed to PSTAT_STATE_P_* for process-global bits, and
- PSTAT_STATE_T_* for per-thread bits.
- * procstat.c (proc_stat_state_tags): Reordered to reflect the new
- ordering of the state bits.
- (thread_state, proc_stat_set_flags): Use the new state bits.
- * spec.c (ps_emit_state): Rearrange things to reflect the new
- state bits.
- (state_shadows): New variable.
- (ps_emit_state): Use the state_shadows list to turn off some states.
- * filters.c (ps_not_sess_leader_p, ps_unorphaned_p, ps_parent_p):
- Use the new state bits.
-
-Sat Jul 8 13:34:20 1995 Miles Bader <miles@churchy.gnu.ai.mit.edu>
-
- * tty.c (ps_tty_short_name): That assignment around which extra
- parents were put was actually supposed to be a test! Make it so...
-
-Thu Jul 6 22:25:20 1995 Michael I Bushnell <mib@duality.gnu.ai.mit.edu>
-
- * tty.c (ps_tty_short_name): Put extra parens around assignment
- inside if test.
-
-Thu Jul 6 15:36:04 1995 Miles Bader <miles@geech.gnu.ai.mit.edu>
-
- * Makefile: Remove include dependencies.
-
-Thu Jun 29 15:29:05 1995 Miles Bader <miles@geech.gnu.ai.mit.edu>
-
- * Makefile (REMHDRS): New variable.
- ($(OBJS)): depend on ../libihash/ihash.h.
- * ps.h: Include hurd/ihash.h instead of ihash.h.
-
-Wed May 31 13:09:04 1995 Miles Bader <miles@churchy.gnu.ai.mit.edu>
-
- * fmt.c (ps_fmt_create): Don't mutate the format spec name in the
- fmt_spec list we're passed just to get correctly capitalized
- titles. Instead, do things correctly by making enough room to
- store our own version of the title string, which we can do with
- what we please.
-
- * ps.h (ps_own_filter, ps_not_sess_leader_filter, ps_ctty_filter,
- ps_unorphaned_filter, ps_parent_filter): Declare these as extern
- so that the linker will bring in the initialized version (it's not
- doing so otherwise may be a bug).
-
-Thu May 4 20:01:32 1995 Miles Bader <miles@churchy.gnu.ai.mit.edu>
-
- * procstat.c (proc_stat_set_flags): If a msg port call times out,
- disable use of that msg port.
- * Makefile (MIGSTUBS, term-MIGUFLAGS, msg-MIGUFLAGS): Compile our
- own msg & term user stubs to add msg timeouts.
-
-Wed May 3 11:32:52 1995 Miles Bader <miles@churchy.gnu.ai.mit.edu>
-
- * proclist.c (proc_stat_list_for_each): New function for iterating
- over proc_stat_lists.
- (proc_stat_list_spec_nominal): New function for deciding if a
- particular spec is always nominal.
- * ps.h: Add entries for proc_stat_list_for_each and
- proc_stat_list_spec_nominal.
-
- * fmt.c (ps_fmt_squash, ps_fmt_squash_flags): Recalculate the set
- of ps flags needed by the fmt in ps_fmt_squash.
-
-Tue May 2 12:25:57 1995 Miles Bader <miles@geech.gnu.ai.mit.edu>
-
- * ps.h (ps_fmt_squash): Rename to ps_fmt_squash_flags.
- * fmt.c (ps_fmt_squash, ps_fmt_squash_flags): Rename ps_fmt_squash to
- ps_fmt_squash_flags, moving most of the guts into a new more
- general ps_fmt_squash, which is usable for other things than flags.
-
- * ps.h (struct ps_fmt_spec): Add the nominal_fn field, which will
- be used to decide whether values are `unexciting'.
- * spec.c (ps_std_fmt_specs): Add values for the nominal_fn field.
- (ps_nominal_zint, ps_nominal_user, ps_nominal_pri, ps_nominal_nth):
- Possible nominal funs.
-
- * ps.h (struct proc_stat): Add the suspend_count field, along with
- PSTAT_SUSPEND_COUNT, and proc_stat_suspend_count(ps).
- * procstat.c (proc_stat_set_flags, add_preconditions): Add support for
- the suspend_count field.
- * spec.c (ps_std_fmt_specs): Add the Susp (task/thread suspend count),
- PSusp (task suspend count), and TSusp (thread suspend count) output
- specs.
-
- * procstat.c (add_preconditions): A new function that calculates inter-
- flag dependencies; code moved here from from proc_stat_set_flags.
- (should_suppress_msgport): A new function that returns true when
- there's some condition indicating that we shouldn't use a process's msg
- port.
- (proc_stat_set_flags): Avoid using a process's msg port when it may be
- unusable.
-
- * ps.h (PSTAT_STATE_FORKED): A new flag to replace PSTAT_STATE_EXECED;
- we want to the flags to mark exceptional conditions, and this is rarer.
- * procstat.c (proc_stat_set_flags): Set PSTAT_STATE_FORKED instead of
- PSTAT_STATE_EXECED.
- (proc_stat_state_tags): Change the user state letter to "f" from "e".
-
-Sun Apr 23 15:38:39 1995 Miles Bader <miles@geech.gnu.ai.mit.edu>
-
- * Makefile: Set libname.
-
-Fri Apr 7 11:12:15 1995 Miles Bader <miles@churchy.gnu.ai.mit.edu>
-
- * proclist.c (proc_stat_list_sort1): Always keep threads after their
- process when sorting!
-
- * spec.c (ps_emit_state): If a process is marked as stopped, then
- don't mention sleeping or idle threads' status (as that's presumably
- the signal thread).
-
- * ps.h: Add decls for proc_stat_list_add_pgrp & ps_tty_short_name.
-
- * proclist.c (proc_stat_list_add_all, proc_stat_list_add_login_coll,
- proc_stat_list_add_session): Move most of the functionality into
- proc_stat_list_add_[id_]fn_pids.
- (proc_stat_list_add_pgrp): New function, adds pids for a pgrp.
-
- * tty.c (ps_tty_short_name): New function; functionality used to be in
- spec.c
- (ps_tty_create, ps_tty_free): Add short_name fields.
- * spec.c (ps_emit_tty_name): Move guts into into ps_tty_short_name.
-
- * Just about everything: tighten up types used (i.e., don't use int
- for everything).
-
-Wed Apr 5 22:42:24 1995 Miles Bader <miles@churchy.gnu.ai.mit.edu>
-
- * spec.c (ps_std_fmt_specs): Add the `Arg0' spec, which is the
- same as `Args', but only prints the first one. Change MsgsIn
- and MsgsOut to MsgIn and MsgOut.
-
-Tue Apr 4 20:13:55 1995 Miles Bader <miles@churchy.gnu.ai.mit.edu>
-
- * ps.h: Add the PSTAT_NO_MSGPORT flag, which when set disables any
- use of the process's message port.
- * procstat.c (proc_stat_set_flags): If PSTAT_NO_MSGPORT is set,
- don't use the msg port.
-
-Wed Mar 29 15:36:43 1995 Miles Bader <miles@churchy.gnu.ai.mit.edu>
-
- * procstat.c (proc_stat_set_flags): Don't barf if a process has
- zero threads.
-
-Tue Mar 28 10:33:08 1995 Miles Bader <miles@duality.gnu.ai.mit.edu>
-
- * ps.h: Add the exec_flags field to the proc_stat structure, and
- add PSTAT_STATE_TRACED.
- * procstat.c (proc_stat_set_flags): Add support for the exec_flags
- field, and make the state bits calculation use that to support the
- PSTAT_STATE_TRACED bit.
-
-Mon Mar 20 20:51:51 1995 Michael I Bushnell <mib@duality.gnu.ai.mit.edu>
-
- * user.c (ps_user_passwd) [COUNT, COPY]: Use `if' statement.
- * spec.c (ps_emit_num_blocks): Use int format for int arg.
- (sprint_frac_value): Likewise.
- * write.c (ps_write_int_field): Likewise.
- * host.c (ps_host_basic_info): Cast third arg to host_info.
- (ps_host_sched_info): Likewise.
- (ps_host_load_info): Likewise.
-
- * filters.c: Include <unistd.h>.
- * context.c: Include <hurd/term.h>.
- * tty.c: Likewise.
- * spec.c: Include <string.h>.
- * procstat.c: Likewise.
-
- * host.c: Don't include "pshost.h".
- * spec.c: Likewise.
-
- * ps.h: Include <errno.h>.
- (ps_get_host, ps_host_basic_info, ps_host_sched_info,
- ps_host_load_info): Copied here from pshost.h.
- (ps_write_string, ps_write_spaces, ps_write_padding,
- ps_write_field, ps_write_int_field): Copied here from pswrite.h
- * pshost.h, pswrite.h: Delete files.
-
- * New ChangeLog, moved into canonical directory structure.
- Old ChangeLog is in .../hurd/utils/ps.ChangeLog.
diff --git a/libps/fmt.c b/libps/fmt.c
index eae08ffe..0465555d 100644
--- a/libps/fmt.c
+++ b/libps/fmt.c
@@ -194,7 +194,9 @@ _fmt_create (char *src, int posix, struct ps_fmt_specs *fmt_specs,
while (*src != '\0' && *src != stop)
src++;
}
- *src++ = '\0'; /* NUL terminhate NAME. */
+
+ if (*src)
+ *src++ = '\0'; /* NUL terminate NAME. */
}
else
/* A gnu-style field spec: `NAME' or `NAME:TITLE'. */
@@ -368,8 +370,8 @@ ps_fmt_clone (struct ps_fmt *fmt, struct ps_fmt **copy)
return 0;
}
-/* Write an appropiate header line for FMT, containing the titles of all its
- fields appropiately aligned with where the values would be printed, to
+/* Write an appropriate header line for FMT, containing the titles of all its
+ fields appropriately aligned with where the values would be printed, to
STREAM (without a trailing newline). If count is non-NULL, the total
number number of characters output is added to the integer it points to.
If any fatal error occurs, the error code is returned, otherwise 0. */
@@ -459,9 +461,9 @@ ps_fmt_write_proc_stat (struct ps_fmt *fmt, struct proc_stat *ps, struct ps_stre
}
/* Remove those fields from FMT for which the function FN, when called on the
- field, returns true. Appropiate inter-field characters are also removed:
+ field, returns true. Appropriate inter-field characters are also removed:
those *following* deleted fields at the beginning of the fmt, and those
- *preceeding* deleted fields *not* at the beginning. */
+ *preceding* deleted fields *not* at the beginning. */
void
ps_fmt_squash (struct ps_fmt *fmt, int (*fn)(struct ps_fmt_field *field))
{
@@ -538,8 +540,8 @@ ps_fmt_squash (struct ps_fmt *fmt, int (*fn)(struct ps_fmt_field *field))
}
/* Remove those fields from FMT which would need the proc_stat flags FLAGS.
- Appropiate inter-field characters are also removed: those *following*
- deleted fields at the beginning of the fmt, and those *preceeding* deleted
+ Appropriate inter-field characters are also removed: those *following*
+ deleted fields at the beginning of the fmt, and those *preceding* deleted
fields *not* at the beginning. */
void
ps_fmt_squash_flags (struct ps_fmt *fmt, ps_flags_t flags)
diff --git a/libps/procstat.c b/libps/procstat.c
index e8eeb668..ba923780 100644
--- a/libps/procstat.c
+++ b/libps/procstat.c
@@ -109,20 +109,22 @@ fetch_procinfo (process_t server, pid_t pid,
struct procinfo **pi, size_t *pi_size,
char **waits, size_t *waits_len)
{
+ static const struct { ps_flags_t ps_flag; int pi_flags; } map[] =
+ {
+ { PSTAT_TASK_BASIC, PI_FETCH_TASKINFO },
+ { PSTAT_TASK_EVENTS, PI_FETCH_TASKEVENTS },
+ { PSTAT_NUM_THREADS, PI_FETCH_THREADS },
+ { PSTAT_THREAD_BASIC, PI_FETCH_THREAD_BASIC | PI_FETCH_THREADS },
+ { PSTAT_THREAD_SCHED, PI_FETCH_THREAD_SCHED | PI_FETCH_THREADS },
+ { PSTAT_THREAD_WAITS, PI_FETCH_THREAD_WAITS | PI_FETCH_THREADS },
+ { 0, }
+ };
int pi_flags = 0;
+ int i;
- if ((need & PSTAT_TASK_BASIC) && !(*have & PSTAT_TASK_BASIC))
- pi_flags |= PI_FETCH_TASKINFO;
- if ((need & PSTAT_TASK_EVENTS) && !(*have & PSTAT_TASK_EVENTS))
- pi_flags |= PI_FETCH_TASKEVENTS;
- if ((need & PSTAT_NUM_THREADS) && !(*have & PSTAT_NUM_THREADS))
- pi_flags |= PI_FETCH_THREADS;
- if ((need & PSTAT_THREAD_BASIC) && !(*have & PSTAT_THREAD_BASIC))
- pi_flags |= PI_FETCH_THREAD_BASIC | PI_FETCH_THREADS;
- if ((need & PSTAT_THREAD_SCHED) && !(*have & PSTAT_THREAD_SCHED))
- pi_flags |= PI_FETCH_THREAD_SCHED | PI_FETCH_THREADS;
- if ((need & PSTAT_THREAD_WAITS) && !(*have & PSTAT_THREAD_WAITS))
- pi_flags |= PI_FETCH_THREAD_WAITS | PI_FETCH_THREADS;
+ for (i = 0; map[i].ps_flag; i++)
+ if ((need & map[i].ps_flag) && !(*have & map[i].ps_flag))
+ pi_flags |= map[i].pi_flags;
if (pi_flags || ((need & PSTAT_PROC_INFO) && !(*have & PSTAT_PROC_INFO)))
{
@@ -137,16 +139,9 @@ fetch_procinfo (process_t server, pid_t pid,
/* Update *HAVE to reflect what we've successfully fetched. */
{
*have |= PSTAT_PROC_INFO;
- if (pi_flags & PI_FETCH_TASKINFO)
- *have |= PSTAT_TASK_BASIC;
- if (pi_flags & PI_FETCH_THREADS)
- *have |= PSTAT_NUM_THREADS;
- if (pi_flags & PI_FETCH_THREAD_BASIC)
- *have |= PSTAT_THREAD_BASIC;
- if (pi_flags & PI_FETCH_THREAD_SCHED)
- *have |= PSTAT_THREAD_SCHED;
- if (pi_flags & PI_FETCH_THREAD_WAITS)
- *have |= PSTAT_THREAD_WAITS;
+ for (i = 0; map[i].ps_flag; i++)
+ if ((pi_flags & map[i].pi_flags) == map[i].pi_flags)
+ *have |= map[i].ps_flag;
}
return err;
}
@@ -293,7 +288,7 @@ add_preconditions (ps_flags_t flags, struct ps_context *context)
flags |= PSTAT_PROC_INFO;
if (flags & PSTAT_SUSPEND_COUNT)
/* We just request the resources require for both the thread and task
- versions, as the extraneous info won't be possible to aquire anyway. */
+ versions, as the extraneous info won't be possible to acquire anyway. */
flags |= PSTAT_TASK_BASIC | PSTAT_THREAD_BASIC;
if (flags & (PSTAT_CTTYID | PSTAT_CWDIR | PSTAT_AUTH | PSTAT_UMASK)
&& !(flags & PSTAT_NO_MSGPORT))
@@ -779,7 +774,7 @@ proc_stat_set_flags (struct proc_stat *ps, ps_flags_t flags)
/* Returns true if (1) FLAGS is in NEED, and (2) the appropriate
preconditions PRECOND are available; if only (1) is true, FLAG is added
- to the INAPP set if appropiate (to distinguish it from an error), and
+ to the INAPP set if appropriate (to distinguish it from an error), and
returns false. */
#define NEED(flag, precond) \
({ \
@@ -966,7 +961,7 @@ proc_stat_set_flags (struct proc_stat *ps, ps_flags_t flags)
when creating a file. */
MP_MGET (PSTAT_UMASK, PSTAT_TASK,
ps_msg_get_init_int (ps->msgport, ps->task, INIT_UMASK,
- &ps->umask));
+ (int *) &ps->umask));
if (NEED (PSTAT_OWNER_UID, PSTAT_PROC_INFO))
{
@@ -995,6 +990,10 @@ proc_stat_set_flags (struct proc_stat *ps, ps_flags_t flags)
if (ps_context_find_tty_by_cttyid (ps->context, ps->cttyid, &ps->tty) == 0)
have |= PSTAT_TTY;
+ /* The number of Mach ports in the task. */
+ MGET (PSTAT_NUM_PORTS, PSTAT_PID,
+ proc_getnports (server, ps->pid, &ps->num_ports));
+
/* Update PS's flag state. We haven't tried user flags yet, so don't mark
them as having failed. We do this before checking user bits so that the
user fetch hook sees PS in a consistent state. */
@@ -1050,7 +1049,7 @@ _proc_stat_free (ps)
MFREEPORT (PSTAT_AUTH, auth);
/* free any allocated memory pointed to by PS */
- MFREEMEM (PSTAT_PROCINFO, proc_info, ps->proc_info_size,
+ MFREEMEM (PSTAT_PROC_INFO, proc_info, ps->proc_info_size,
ps->proc_info_vm_alloced, 0, char);
MFREEMEM (PSTAT_THREAD_BASIC, thread_basic_info, 0, 0, 0, 0);
MFREEMEM (PSTAT_THREAD_SCHED, thread_sched_info, 0, 0, 0, 0);
@@ -1058,6 +1057,8 @@ _proc_stat_free (ps)
MFREEMEM (PSTAT_ENV, env, ps->env_len, ps->env_vm_alloced, 0, char);
MFREEMEM (PSTAT_TASK_EVENTS, task_events_info, ps->task_events_info_size,
0, &ps->task_events_info_buf, char);
+ MFREEMEM (PSTAT_THREAD_WAITS, thread_waits, ps->thread_waits_len,
+ ps->thread_waits_vm_alloced, 0, char);
FREE (ps);
}
@@ -1089,7 +1090,7 @@ _proc_stat_create (pid_t pid, struct ps_context *context, struct proc_stat **ps)
resulting proc_stat isn't fully functional -- most flags can't be set in
it. It also contains a pointer to PS, so PS shouldn't be freed without
also freeing THREAD_PS. If N was out of range, EINVAL is returned. If a
- memory allocation error occured, ENOMEM is returned. Otherwise, 0 is
+ memory allocation error occurred, ENOMEM is returned. Otherwise, 0 is
returned. */
error_t
proc_stat_thread_create (struct proc_stat *ps, unsigned index, struct proc_stat **thread_ps)
diff --git a/libps/ps.h b/libps/ps.h
index 27f2e787..91fdc70b 100644
--- a/libps/ps.h
+++ b/libps/ps.h
@@ -261,6 +261,8 @@ struct proc_stat
/* Virtual memory statistics for the process, as returned by task_info;
see <mach/task_info.h> for a description of task_events_info_t. */
+ /* FIXME: we are actually currently storing it into proc_info, see
+ fetch_procinfo. */
task_events_info_t task_events_info;
task_events_info_data_t task_events_info_buf;
size_t task_events_info_size;
@@ -301,6 +303,8 @@ struct proc_stat
char *env;
/* The length of ENV. */
size_t env_len;
+
+ unsigned num_ports;
};
/* Proc_stat flag bits; each bit is set in the FLAGS field if that
@@ -338,6 +342,7 @@ struct proc_stat
#define PSTAT_OWNER_UID 0x200000 /* The uid of the the proc's owner */
#define PSTAT_UMASK 0x400000 /* The proc's current umask */
#define PSTAT_HOOK 0x800000 /* Has a non-zero hook */
+#define PSTAT_NUM_PORTS 0x4000000 /* Number of Mach ports in the task */
/* Flag bits that don't correspond precisely to any field. */
#define PSTAT_NO_MSGPORT 0x1000000 /* Don't use the msgport at all */
@@ -441,6 +446,7 @@ extern char *proc_stat_state_tags;
#define proc_stat_umask(ps) ((ps)->umask)
#define proc_stat_tty(ps) ((ps)->tty)
#define proc_stat_task_events_info(ps) ((ps)->task_events_info)
+#define proc_stat_num_ports(ps) ((ps)->num_ports)
#define proc_stat_has(ps, needs) (((ps)->flags & needs) == needs)
/* True if PS refers to a thread and not a process. */
@@ -454,7 +460,9 @@ error_t _proc_stat_create (pid_t pid, struct ps_context *context,
/* Frees PS and any memory/ports it references. Users shouldn't use this
routine; proc_stats are normally freed only when their ps_context goes
- away. */
+ away. Insubordinate users will make sure they free the thread proc_stats
+ before they free the corresponding process proc_stat since the thread_wait
+ fields of the former may reference the latter. */
void _proc_stat_free (struct proc_stat *ps);
/* Adds FLAGS to PS's flags, fetching information as necessary to validate
@@ -467,7 +475,7 @@ error_t proc_stat_set_flags (struct proc_stat *ps, ps_flags_t flags);
PS (N should be between 0 and the number of threads in the process). The
resulting proc_stat isn't fully functional -- most flags can't be set in
it. If N was out of range, EINVAL is returned. If a memory allocation
- error occured, ENOMEM is returned. Otherwise, 0 is returned. */
+ error occurred, ENOMEM is returned. Otherwise, 0 is returned. */
error_t proc_stat_thread_create (struct proc_stat *ps, unsigned n,
struct proc_stat **thread_ps);
@@ -761,7 +769,7 @@ struct ps_fmt
this procstat. */
char *inapp;
- /* The string displayed by default for fields which are appropiate, but
+ /* The string displayed by default for fields which are appropriate, but
couldn't be fetched due to some error. */
char *error;
};
@@ -814,7 +822,7 @@ void ps_fmt_free (struct ps_fmt *fmt);
instance, you would like squash a format without destroying the original. */
error_t ps_fmt_clone (struct ps_fmt *fmt, struct ps_fmt **copy);
-/* Write an appropiate header line for FMT, containing the titles of all its
+/* Write an appropriate header line for FMT, containing the titles of all its
fields appropiately aligned with where the values would be printed, to
STREAM (without a trailing newline). If count is non-NULL, the total
number number of characters output is added to the integer it points to.
@@ -829,14 +837,14 @@ error_t ps_fmt_write_proc_stat (struct ps_fmt *fmt, struct proc_stat *ps,
struct ps_stream *stream);
/* Remove those fields from FMT for which the function FN, when called on the
- field, returns true. Appropiate inter-field characters are also removed:
+ field, returns true. Appropriate inter-field characters are also removed:
those *following* deleted fields at the beginning of the fmt, and those
- *preceeding* deleted fields *not* at the beginning. */
+ *preceding* deleted fields *not* at the beginning. */
void ps_fmt_squash (struct ps_fmt *fmt, int (*fn)(struct ps_fmt_field *field));
/* Remove those fields from FMT which would need the proc_stat flags FLAGS.
- Appropiate inter-field characters are also removed: those *following*
- deleted fields at the beginning of the fmt, and those *preceeding* deleted
+ Appropriate inter-field characters are also removed: those *following*
+ deleted fields at the beginning of the fmt, and those *preceding* deleted
fields *not* at the beginning. */
void ps_fmt_squash_flags (struct ps_fmt *fmt, ps_flags_t flags);
diff --git a/libps/spec.c b/libps/spec.c
index da1e372a..b34a2343 100644
--- a/libps/spec.c
+++ b/libps/spec.c
@@ -349,6 +349,14 @@ ps_get_zero_fills (struct proc_stat *ps)
const struct ps_getter ps_zero_fills_getter =
{"zero_fills", PSTAT_TASK_EVENTS, (vf) ps_get_zero_fills};
+static int
+ps_get_num_ports (struct proc_stat *ps)
+{
+ return proc_stat_num_ports (ps);
+}
+const struct ps_getter ps_num_ports_getter =
+{"num_ports", PSTAT_NUM_PORTS, (vf) ps_get_num_ports};
+
/* ---------------------------------------------------------------- */
/* some printing functions */
@@ -571,7 +579,7 @@ ps_emit_user_name (struct proc_stat *ps, struct ps_fmt_field *field,
if (pw == NULL)
{
char buf[20];
- sprintf (buf, "(UID %d)", pw->pw_uid);
+ sprintf (buf, "(UID %d)", u->uid);
return ps_stream_write_field (stream, buf, width);
}
else
@@ -1155,6 +1163,8 @@ static const struct ps_fmt_spec specs[] =
&ps_msgs_sent_getter, ps_emit_int, ps_cmp_ints, ps_nominal_zint},
{"ZFills", 0, -5, -1, 0,
&ps_zero_fills_getter, ps_emit_int, ps_cmp_ints, ps_nominal_zint},
+ {"Ports", 0, -5, -1, 0,
+ &ps_num_ports_getter, ps_emit_int, ps_cmp_ints, 0},
{0}
};
diff --git a/libshouldbeinlibc/ChangeLog b/libshouldbeinlibc/ChangeLog
deleted file mode 100644
index 930b79a7..00000000
--- a/libshouldbeinlibc/ChangeLog
+++ /dev/null
@@ -1,1398 +0,0 @@
-2007-02-04 Thomas Schwinge <tschwinge@gnu.org>
-
- * maptime.h: Fix a comment.
-
-2004-10-23 Marcus Brinkmann <marcus@gnu.org>
-
- * ugids-xinl.c (__OPTIMIZE__): Define to 1 instead of nothing.
-
-2003-08-03 Marco Gerards <metgerards@student.han.nl>
-
- * idvec-verify.c: Include <crypt.h>.
- (crypt): Removed prototype.
-
-2002-05-12 Marcus Brinkmann <marcus@gnu.org>
-
- * idvec-impgids.c (_merge_implied_gids): Free CACHE on failure.
- Submitted by Neal H Walfield <neal@cs.uml.edu>.
-
-2002-05-08 Roland McGrath <roland@frob.com>
-
- * portinfo.c (print_port_info): Use %z formats for port names.
- * xportinfo.c (print_xlated_port_info): Likewise.
-
- * idvec-verify.c (verify_passwd): Cast to intptr_t before int.
-
- * idvec-auth.c (idvec_merge_auth): int -> size_t.
-
- * portxlate.c (port_name_xlator_xlate): Use mach_msg_type_name_t
- instead of mach_port_type_t, to match RPC prototype.
-
- * wire.c: Use ElfW(TYPE) in place of Elf32_TYPE throughout.
-
-2002-02-06 Roland McGrath <roland@frob.com>
-
- * Makefile (CFLAGS): Don't add -DHAVE_LINEWRAP_H -DHAVE_CTHREADS_H.
-
-2001-06-24 Mark Kettenis <kettenis@gnu.org>
-
- * idvec-impgids.c (_merge_implied_gids) [HAVE_GETGROUPLIST]:
- Conditionally enable code that calls getgrouplist. Use `int'
- instead of `size_t' for number of groups.
- [!HAVE_GETGROUPLIST]: Add #warning about missing getgrouplist.
-
-2001-03-31 Roland McGrath <roland@frob.com>
-
- * ugids.h: Fix obsolescent #endif syntax.
-
-2001-03-29 Neal H Walfield <neal@cs.uml.edu>
-
- * idvec-auth.c (idvec_merge_auth): Really allow parameters
- to be NULL.
-
-2001-02-25 Roland McGrath <roland@frob.com>
-
- * idvec.h: Include <string.h> for memcmp decl.
-
- * wire.c (map_extent): Add dead return stmt to silence gcc warning.
-
-2001-02-20 Marcus Brinkmann <marcus@gnu.org>
-
- * timefmt.c: Include <time.h>. Reported by Arkadi E. Shishlov
- <arkadi@it.lv>.
-
-2000-10-30 Marcus Brinkmann <marcus@gnu.org>
-
- * wire.c: Include <error.h>.
-
-2000-10-29 Roland McGrath <roland@frob.com>
-
- * wire.c (map_extent): Pass second arg of RTLD_NOLOAD to dlopen.
- (RTLD_NOLOAD): Define macro to zero if undefined.
-
- * wire.c (map_extent): Rewrite using dlsym on library's _end symbol.
-
-2000-03-17 Roland McGrath <roland@baalperazim.frob.com>
-
- * options.c, options.h: Ancient unused files removed.
-
-2000-03-17 Thomas Bushnell, BSG <tb@mit.edu>
-
- * exec-reauth.c (exec_reauth): Always destroy REF, even when we
- get errors.
-
-2000-01-29 Roland McGrath <roland@baalperazim.frob.com>
-
- * maptime.h: Include <errno.h> for error_t decl.
-
-1999-10-29 Roland McGrath <roland@baalperazim.frob.com>
-
- * wire.c: Use a weak reference to _DYNAMIC.
-
-1999-09-29 Mark Kettenis <kettenis@gnu.org>
-
- * idvec.c (idvec_setid): Switch last two arguments in call to
- idvec_insert_only.
- * idvec.h: Doc fix.
-
-1999-09-27 Thomas Bushnell, BSG <tb@mit.edu>
-
- * idvec.c (idvec_setid): Implement Posix saved set-user id
- correctly.
- (idvec_insert_only): Doc fix.
- Reported by Mark Kettenis <kettenis@wins.uva.nl>.
-
-1999-08-23 Roland McGrath <roland@baalperazim.frob.com>
-
- * wire.c (map_extent): Use p_memsz instead of p_filesz.
- (loaded): Return zero if _DYNAMIC has address zero (i.e., static link).
-
-1999-08-19 Roland McGrath <roland@baalperazim.frob.com>
-
- * mktime.c: File removed. Current libc code is good.
- * Makefile (SRCS): Remove mktime.c.
-
-1999-07-11 Roland McGrath <roland@baalperazim.frob.com>
-
- * portinfo.h: Don't include <sys/types.h>, <sys/mman.h>.
- This is an exported header, and its decls don't need them.
- * portinfo.c: Include them here instead.
- * xportinfo.c: And here.
-
-1999-07-11 Thomas Bushnell, BSG <tb@mit.edu>
-
- * ugids-argp.c (parse_opt): Clarify if-then-else structure by
- adding more braces.
-
- * portinfo.h: Include <sys/types.h>.
- * portxlate.c: Likewise.
- * portinfo.c: (print_port_info): Cast first arg of munmap correctly.
- (print_task_ports_info): Likewise.
- * xportinfo.c (print_xlated_task_ports_info): Likewise.
- * idvec-auth.c (idvec_merge_auth): Likewise.
- * portxlate.c (port_name_xlator_create): Likewise.
- (port_name_xlator_free): Likewise.
-
-1999-07-10 Roland McGrath <roland@baalperazim.frob.com>
-
- * portinfo.h: Add #include <sys/mman.h> for munmap decl.
- * fsysops.c: Likewise.
- * idvec-auth.c: Likewise.
- * portxlate.c: Likewise.
-
-1999-07-03 Thomas Bushnell, BSG <tb@mit.edu>
-
- * fsysops.c (fsys_get_readonly): Use munmap instead of vm_deallocate.
- * idvec-auth.c (idvec_merge_auth): Likewise.
- * portinfo.c (print_port_info): Likewise.
- (print_task_ports_info): Likewise.
- * portxlate.c (port_name_xlator_create): Likewise.
- (port_name_xlator_free): Likewise.
- * xportinfo.c (print_xlated_task_ports_info): Likewise.
-
-1999-05-23 Roland McGrath <roland@baalperazim.frob.com>
-
- * idvec-verify.c (SHADOW_PASSWORD_STRING): New macro.
- (verify_id): Check for shadow password immediately after getpwuid_r
- call, and replace PW->pw_passwd pointer with SP->sp_pwdp.
- This is ok since the only use will be later in the function,
- and we give the lookup buffer function scope.
- (verify_passwd): Don't call CHECK_SHADOW for main passwd,
- only when rechecking for wheel-group hack.
-
-1999-05-20 Roland McGrath <roland@baalperazim.frob.com>
-
- * idvec-verify.c (verify_passwd): Avoid nonreentrant getpwuid.
- If pw_passwd is "x", use getspnam_r and use its sp_pwdp if it succeeds.
-
-1998-12-21 Mark Kettenis <kettenis@phys.uva.nl>
-
- * ugids-verify-auth.c: Include <hurd/password.h> again and remove
- temporary definitions of password_check_user and
- password_check_group.
-
-1998-11-29 Mark Kettenis <kettenis@phys.uva.nl>
-
- * idvec-verify.c (verify_passwd): Grant access when the password
- in the passwd DB is empty.
- (verify_id): Also call verify_fn when the password in the password
- DB is empty.
-
-1999-02-12 Gordon Matzigkeit <gord@trick.fig.org>
-
- * Makefile (LCLHDRS): Purge argp-fmtstream.h and argp-namefrob.h.
-
-1998-11-30 Mark Kettenis <kettenis@phys.uva.nl>
-
- * ugids-verify-auth.c (svma_state_add_auths): Allocate correct
- number of bytes for new auth port array.
- (server_verify_make_auth): Set check to password_check_group if
- is_group is true and to password_check_user if not. Not the other
- way around.
-
-1998-09-26 Mark Kettenis <kettenis@phys.uva.nl>
-
- * cacheq.c (cacheq_set_length): Fix the limit of the destination
- entries. Decide that there is no following entry if the current
- entry is equal or greater than this limit.
-
-1998-10-20 Roland McGrath <roland@baalperazim.frob.com>
-
- * idvec-verify.c (verify_id): Add braces to silence gcc warning.
-
-1998-10-19 Roland McGrath <roland@baalperazim.frob.com>
-
- * exec-reauth.c (exec_reauth): Add braces to silence gcc warning.
- * idvec-rep.c (idvec_rep): Likewise.
- * idvec-verify.c (verify_id): Likewise.
- * portinfo.c (print_port_info): Likewise.
- * ugids-verify-auth.c (ugids_verify_make_auth): Likewise.
-
-1998-09-04 Roland McGrath <roland@baalperazim.frob.com>
-
- * ugids-verify-auth.c (ugids_verify_make_auth): Fix typos in
- svma_state change of 1998-08-11.
-
- * idvec.c, idvec-auth.c (id_t): Remove typedef; use uid_t everywhere.
- The name `id_t' is coopted in libc now for the SVID `waitid' interface.
-
- * Makefile (SRCS): Remove argz-replace.c and argp-*.c from the list.
- (installhdrs): Remove argp.h from the list.
-
-1998-08-12 Roland McGrath <roland@baalperazim.frob.com>
-
- * argz-replace.c: Removed, now in libcwhereitshouldbe.
-
- * argp-ba.c, argp-eexst.c, argp-ex1.c, argp-ex2.c, argp-ex3.c,
- argp-ex4.c, argp-fmtstream.c, argp-fmtstream.h argp-fs-xinl.c,
- argp-help.c, argp-namefrob.h argp-parse.c, argp-pv.c, argp-pvh.c,
- argp-test.c, argp-xinl.c, argp.h: Removed, now in libcwhereitshouldbe.
-
-1998-08-11 Roland McGrath <roland@baalperazim.frob.com>
-
- * ugids-verify-auth.c: Leave #include <hurd/password.h> there, but
- commented out for the time being.
- (password_check_user, password_check_group): Make symbols weak; these
- are temporary defns until we get back in synch with libc.
-
- * ugids-verify-auth.c (ugids_verify_make_auth): Properly initialize
- SVMA_STATE members if they will be used.
-
-Wed Jul 29 16:25:50 1998 Thomas Bushnell, BSG <tb@mit.edu>
-
- * ugids-verify-auth.c: Don't include <hurd/password.h> for now.
-
-1997-09-26 Miles Bader <miles@gnu.ai.mit.edu>
-
- * idvec-verify.c (verify_passwd, get_passwd): New functions.
- (idvec_verify): Change type of GETPASS_FN arg.
- Add GETPASS_HOOK, VERIFY_FN, and VERIFY_HOOK args & use them.
- (verify_id): Change type of GETPASS_FN arg.
- Add GETPASS_HOOK, VERIFY_FN, and VERIFY_HOOK args.
- Remove WHEEL_UID arg.
- Use VERIFY_FN & VERIFY_HOOK instead of doing password comparison
- ourselves.
- * ugids.h (ugids_verify_make_auth): New declaration.
- (ugids_verify): Change type of GETPASS_FN arg.
- Add GETPASS_HOOK, VERIFY_FN, and VERIFY_HOOK args.
- (ugids_make_auth): Change FROM arg into an array, & add NUM_FROM.
- * ugids-verify.c (ugids_verify): Change type of GETPASS_FN arg.
- Add GETPASS_HOOK, VERIFY_FN, and VERIFY_HOOK args.
- * ugids-verify-auth.c: New file.
- * ugids-auth.c (ugids_make_auth): Change FROM arg into an array, &
- add NUM_FROM arg.
- * Makefile (SRCS): Add ugids-verify-auth.c.
-
-1997-09-25 Miles Bader <miles@gnu.ai.mit.edu>
-
- * idvec.h (idvec_verify): Change type of GETPASS_FN arg.
- Add GETPASS_HOOK, VERIFY_FN, and VERIFY_HOOK args.
-
-1997-08-18 Miles Bader <miles@gnu.ai.mit.edu>
-
- * mktime.c: A copy of libc's time/mktime.c with the
- overflow-detection code ifdefd out, to avoid problems with
- floating point.
- * Makefile (SRCS): Add mktime.c (temporarily).
-
-1997-07-28 Miles Bader <miles@gnu.ai.mit.edu>
-
- * ugids-posix.c (ugids_set_posix_user): Ignore errors from
- idvec_merge_implied_gids.
- * ugids.c (ugids_add_user): Likewise.
- * idvec-impgids.c (idvec_merge_implied_gids): Do all ids in UIDS
- even if one returns an error.
-
-1997-07-23 Miles Bader <miles@gnu.ai.mit.edu>
-
- * maptime.c (maptime_map): Allow MTIME to be mapped anywhere.
-
-1997-07-22 Miles Bader <miles@gnu.ai.mit.edu>
-
- * maptime.c (maptime_map): For the device-file case, don't use
- wierd file_get_storage_info method for getting device port, just
- use io_map to get a memory object directly from the file.
-
- * argz-replace.c: New file (until the libc version is more widely available).
- * Makefile (SRCS): Add argz-replace.c (temporarily).
-
-1997-06-21 17:35 Ulrich Drepper <drepper@cygnus.com>
-
- * argp.h: Remove extra #endif. Pretty print.
-
-1997-06-13 10:06 Richard Henderson <rth@tamu.edu>
-
- * argp-parse.c: [_LIBC] <libc-lock.h> -> <bits/libc-lock.h>.
- * argp-fmtstream.h: Standardize the multiple-include protect (for libc).
- * argp.h: Likewise.
-
-1997-06-13 Miles Bader <miles@gnu.ai.mit.edu>
-
- * argp-parse.c (argp_version_parser): Include `(PROGRAM ERROR)' in
- the no-version error text to indicate that something's fucked.
- [!_] (N_): New macro.
- (argp_default_options, argp_version_options): Wrap doc strings in N_().
-
-1997-06-12 Miles Bader <miles@gnu.ai.mit.edu>
-
- * argp-parse.c (parser_parse_opt): Detect and report unhandled
- options here.
- (parser_parse_args): Function removed.
- (parser_parse_arg): Handle ARGP_KEY_ARGS here.
- Adjust NEXT pointer back if we fail to parse any args.
- (parser_parse_next): Don't use parser_parse_args. Leave state
- NEXT frobbing to parser_parse_arg.
-
-1997-06-12 21:22 Ulrich Drepper <drepper@cygnus.com>
-
- * argp-help.c (argp_args_usage): Don't modify `fdoc' value since
- it is used to distinguish filtered strings from unmodifed strings.
-
-1997-06-12 Miles Bader <miles@gnu.ai.mit.edu>
-
- * maptime.h: Include <sys/time.h>.
-
-1997-06-11 Miles Bader <miles@gnu.ai.mit.edu>
-
- * argp.h (ARGP_KEY_ARGS, ARGP_KEY_FINI): New macros.
- * argp-parse.c (parser_parse_next): Try parser_parse_args if other
- methods fail.
- (parser_parse_arg): New function.
- (parser_finalize): Do another pass over the parsers with ARGP_KEY_FINI.
-
-Wed Jun 4 15:05:10 1997 Miles Bader <miles@gnu.ai.mit.edu>
-
- * argp.h, argp-help.c, argp-parse.c: Sync with libc version (there
- were minor whitespace differences, etc).
-
- * argp-help.c (_help): Use uparams.usage_indent instead of the
- USAGE_INDENT macro.
-
-Thu May 29 15:00:07 1997 Miles Bader <miles@gnu.ai.mit.edu>
-
- * idvec-verify.c (idvec_verify): Fix detection of multiple ids.
-
-Tue May 27 14:16:08 1997 Miles Bader <miles@gnu.ai.mit.edu>
-
- * argp-help.c (argp_args_usage): Supply correct argp to filter_doc.
-
-Sun May 25 21:57:08 1997 Miles Bader <miles@gnu.ai.mit.edu>
-
- * argp-parse.c (parser_init): For the special case where no
- parsing function is supplied for an argp, propagate its input to
- its first child, if any.
-
- * argp.h (struct argp_state): `argp' field renamed to `root_argp'.
- * argp-help.c (__argp_state_help, argp_args_usage, hol_help):
- Replace references to STATE->argp with STATE->root_argp.
- * argp-parse.c (parser_init): Likewise.
-
-Fri May 23 10:23:51 1997 Miles Bader <miles@gnu.ai.mit.edu>
-
- * idvec.h (idvec_contains): Now an inline function.
- (idvec_equal): New inline function.
- * idvec.c (idvec_tail): Function removed (now inline in idvec.h).
- * ugids-imply.c, ugids-posix.c: New files.
- * Makefile (SRCS): Add ugids-imply.c & ugids-posix.c.
-
-Thu May 22 11:38:01 1997 Miles Bader <miles@gnu.ai.mit.edu>
-
- * idvec.c (idvec_subtract, idvec_keep): New functions.
- (idvec_contains, idvec_tail_contains): Make IDVEC arg const.
- (idvec_tail_contains): Rewrite.
- (idvec_set_ids, idvec_merge_ids): Make IDS arg const.
- (idvec_set, idvec_merge): Make NEW arg const.
- * idvec.h (idvec_subtract, idvec_keep, idvec_rep, idvec_uids_rep,
- idvec_gids_rep, idvec_merge_implied_gids, idvec_verify):
- New declarations.
- (idvec_fini): New macro.
- (idvec_contains, idvec_tail_contains): Make IDVEC arg const.
- (idvec_set_ids, idvec_merge_ids): Make IDS arg const.
- (idvec_set, idvec_merge): Make NEW arg const.
- (idvec_is_empty): New function.
- (IDVEC_INIT): New macro.
- * idvec-impgids.c, idvec-verify.c, idvec_rep.c: New files.
- * ugids.h, ugids.c, ugids-subtract.c, ugids-verify.c,
- ugids-argp.c, ugids-rep.c, ugids-auth.c, ugids-xinl.c,
- ugids-merge.c: New files.
- * Makefile (SRCS): Add idvec-impgids.c, idvec-verify.c,
- idvec-rep.c, ugids.c, ugids-subtract.c, ugids-verify.c,
- ugids-argp.c, ugids-rep.c, ugids-auth.c, ugids-xinl.c,
- & ugids-merge.c.
- (installhdrs): Add ugids.h.
-
-Wed May 21 17:53:30 1997 Miles Bader <miles@gnu.ai.mit.edu>
-
- * argp-help.c (hol_add_cluster): Initialize CL->depth.
-
-Tue May 20 14:01:00 1997 Miles Bader <miles@gnu.ai.mit.edu>
-
- * argp-help.c (_help): Supply STATE to argp_args_usage.
- (argp_args_usage): Add filtering of the args doc string.
- (comma): Print cluster headers for the first entry too.
- * argp.h (ARGP_KEY_HELP_ARGS_DOC): New macro.
-
-1997-04-09 01:24 Ulrich Drepper <drepper@cygnus.com>
-
- * argp-fmtstream.c: Add casts to prevent warnings.
- * argp-fmtstream.h: Likewise.
- * argp-help.c: Likewise.
-
-1997-02-27 16:26 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
-
- * argp-parse.c (parser_finalize): Always set *END_INDEX if
- supplied.
-
-Thu May 8 17:15:31 1997 Miles Bader <miles@gnu.ai.mit.edu>
-
- * argp.h [!__error_t_defined] (__error_t_defined): Define.
- * argp-help.c (canon_doc_option): Correct ctype tests.
-
-Wed Mar 5 16:49:51 1997 Miles Bader <miles@gnu.ai.mit.edu>
-
- * argp-help.c (__argp_state_help): Use ARGP_ERR_EXIT_STATUS when
- exiting due to an error.
- * argp.h (argp_err_exit_status): New variable.
- * argp-eexst.c: New file.
- * Makefile (SRCS): Add argp-eexst.c.
-
-Fri Feb 21 10:41:02 1997 Miles Bader <miles@gnu.ai.mit.edu>
-
- * argp.h (OPTION_NO_USAGE): New macro.
- * argp-help.c (usage_long_opt, usage_argful_short_opt,
- add_argless_short_opt): Implement OPTION_NO_USAGE.
-
-Thu Feb 20 15:56:16 1997 Miles Bader <miles@gnu.ai.mit.edu>
-
- * idvec.c (idvec_insert_only): Handle POS >= IDVEC->num correctly.
- (idvec_insert, idvec_remove): Handle POS > IDVEC->num correctly.
-
- * argp-fmtstream.c (__argp_fmtstream_update): Account for case
- where NEXTLINE points one past the end of the active buffer.
-
- * argp-help.c <stddef.h>: New include.
- (__argp_failure): Only exit if STATE says it's ok.
- (print_header, hol_entry_help): Use UPARAMS fields rather than
- constants.
- (_help): Call fill_in_uparams if necessary.
- (struct hol_help_state): New type.
- (struct pentry_state): Add hhstate field. Remove prev_entry &
- sep_groups fields.
- (hol_entry_help): Add HHSTATE parameter. Remove prev_entry &
- sep_groups parameters.
- Suppress duplicate arguments if requested, and note the fact.
- (print_header, comma): Use PEST->hhstate fields.
- (hol_help): Add HHSTATE variable & pass to hol_entry_help.
- Remove LAST_ENTRY & SEP_GROUPS variables.
- If any suplicate arguments were suppressed, print explanatory note.
- (filter_doc): Replace PEST parameter with STATE.
- (struct uparams): New type.
- (uparams): New variable.
- (struct uparam_name): New type.
- (uparam_names): New variable.
- (fill_in_uparams): New function.
- (__argp_failure, __argp_error, __argp_state_help): Make STATE
- parameter const.
- * argp.h (argp_state_help, __argp_state_help, argp_usage,
- __argp_usage, argp_error, __argp_error, argp_failure,
- __argp_failure): Make STATE parameter const.
- (ARGP_KEY_HELP_DUP_ARGS_NOTE): New macro.
-
- * argp.h (argp_program_bug_address): Make const.
-
-Wed Feb 19 18:48:15 1997 Miles Bader <miles@gnu.ai.mit.edu>
-
- * argp-pv.c (argp_program_version): Make const.
- * argp-ba.c (argp_program_bug_address): Make const.
- * argp-ex2.c, argp-ex3.c, argp-ex4.c (argp_program_version,
- argp_program_bug_address): Make const.
-
- * argp-parse.c (argp_default_parser): Set STATE->name for OPT_PROGNAME.
- (parser_init): Use the basename for PARSER->state.name.
- * argp-help.c (__argp_error, __argp_failure, __argp_state_help):
- Use PROGRAM_INVOCATION_SHORT_NAME instead of PROGRAM_INVOCATION_NAME.
-
- * argp-parse.c (parser_init): Set PARSER->state.flags.
- Make check whether PARSER has the prog name in argv[0] at the
- proper place.
-
-Mon Feb 17 13:33:11 1997 Miles Bader <miles@gnu.ai.mit.edu>
-
- * argp-parse.c (parser_parse_next, parser_init): Remove __
- prefixes from references to getopt functions variables (OPT*).
- (argp_version_parser, parser_finalize): Use _ instead of gettext.
- (gettext): Macro removed.
- * argp-namefrob.h (__getopt_long, __getopt_long_only, __optind,
- __optarg, __opterr, __optopt): Macros removed.
-
-Sun Feb 16 00:04:07 1997 Miles Bader <miles@gnu.ai.mit.edu>
-
- * argp-help.c (space): New function.
- (usage_argful_short_opt): Use space.
- (argp_doc): Deal with help filters. Add STATE param.
- (argp_hol): Passin ARGP to make_hol, not ARGP->options.
- (struct hol_entry): Add argp field.
- (make_hol): Make this first parameter ARGP instead of OPT. Set
- each entry's argp field.
- (filter_doc): New function.
- (print_header): Filter STR if necesary.
- (hol_add_cluster): Add ARGP argument.
- (argp_hol): Pass ARGP to hol_add_cluster.
- (struct hol_cluster): Add argp field.
- (hol_entry_help): Add STATE param. Do user filtering if necessary.
- (struct pentry_state): Add state field.
- (hol_help): Add STATE param.
- (_help): Renamed from __argp_help. Add STATE argument, which pass
- on appropiately.
- (__argp_help): Now a wrapper that calls _help.
- (__argp_state_help): Call _help instead of __argp_help.
-
- * argp-parse.c (parser_init): Set PARSER->state.pstate.
- (struct group): Add argp field.
- (convert_options): Set it.
- (__argp_input): New function.
- * argp-namefrob.h (__argp_input): New macro.
-
-Sat Feb 15 22:00:42 1997 Miles Bader <miles@gnu.ai.mit.edu>
-
- * argp.h (struct argp): Add help_filter field.
- (struct argp_state): Add pstate field.
-
-Fri Feb 14 18:00:52 1997 Miles Bader <miles@gnu.ai.mit.edu>
-
- * argp-help.c, argp-parse.c [!_] (_): New macro.
- [!_ && HAVE_LIBINTL_H] <libintl.h>: New include.
- * argp-help.c (hol_entry_help, __argp_help, argp_args_usage, argp_doc,
- usage_long_opt, arg, hol_entry_help): Call gettext in appropriate
- places.
- * argp-parse.c (parser_finalize, argp_version_parser): Likewise.
-
- * argp-help.c: Incorporate gettext changes from drepper.
-
-Thu Feb 13 16:46:59 1997 Miles Bader <miles@gnu.ai.mit.edu>
-
- * argp-parse.c, argp-help.c, argp-fmtstream.c, argp-pvh.c,
- argp-test.c, argp-fs-xinl.c, argp-xinl.c
- [HAVE_CONFIG_H] <config.h>: New include.
-
-Wed Feb 12 00:35:21 1997 Miles Bader <miles@gnu.ai.mit.edu>
-
- * argp-fmtstream.c (_GNU_SOURCE): New macro.
- <ctype.h>: New include.
- [!isblank] (isblank): New macro.
- * argp-fmtstream.h <ctype.h>: Include removed.
-
- * argp-parse.c (parser_parse_next): Decrement PARSER->state.next
- if we consumed an arg we didn't end up parsing.
- Set ARG_EBADKEY ourselves in all cases.
- (parser_parse_arg, parser_parse_opt): Get rid of ARG_EBADKEY param.
-
- * argp-parse.c (__progname, __progname_full): Decls removed.
- (argp_default_parser): Use PROGRAM_INVOCATION_NAME &
- PROGRAM_INVOCATION_SHORT_NAME, not __PROGNAME_FULL & __PROGNAME.
-
- * argp-help.c (__progname, __progname_full): Decls removed.
- (__argp_failure, __argp_error, __argp_state_help): Use
- PROGRAM_INVOCATION_NAME instead of __PROGNAME_FULL.
- (__argp_error): Use STATE->name if it's available.
- * argp-namefrob.h (__progname_full): Macro removed.
-
- * argp.h (ARGP_KEY_END, ARGP_KEY_NO_ARGS, ARGP_KEY_INIT,
- ARGP_KEY_SUCCESS, ARGP_KEY_ERROR): Change values.
-
- * argp-help.c (make_hol): Initalize clusters field.
- (argp_args_usage): Don't trash memory.
-
-Tue Feb 11 19:16:39 1997 Miles Bader <miles@gnu.ai.mit.edu>
-
- * argp-help.c (argp_args_levels): New function.
- (argp_args_usage): Add LEVELS & ADVANCE arguments, and implement
- multi-pattern output.
- (__argp_help): Print multiple argument patterns if there are any.
- * argp-test.c (args_doc): Add an alternative args pattern.
- (parse_opt): Enforce it.
-
- * argp-parse.c: Largely rewritten to clean up the code, avoid
- using nested functions, and adapt namespace and locking in
- preparation for moving into libc.
-
- * argp-help.c (make_hol): Make static.
- Increment default group for option headers.
- (until_short): Return correct key.
- (group_cmp): Put group 0 before other groups, not in the middle.
- (hol_entry_cmp): Use __strcasecmp instead of strcasecmp.
- (hol_entry_cmp, usage_argful_short_opt, usage_long_opt):
- Don't use ?: operator.
- (__argp_help): Renamed from argp_help.
- (__argp_state_help): Renamed from argp_state_help.
- (__argp_error): Renamed from argp_error.
- (__argp_failure): Renamed from argp_failure.
- [weak_alias] (argp_help, argp_state_help, argp_error, argp_failure):
- New weak aliases.
- (__progname, __progname_full): New declarations.
- (__argp_state_help, __argp_error, __argp_failure): Use
- __PROGNAME_FULL instead of PROGRAM_INVOCATION_NAME.
- "argp-namefrob.h": New include.
-
- * argp.h [HAVE_CONFIG_H] <config.h>: New include.
- [__GNU_LIBRARY__] <sys/cdefs.h>: New include.
- [!__const] (__const): New macro.
- (struct argp_option, struct argp, struct argp_child, struct
- argp_state): Use __const instead of const.
- (__argp_parse, __argp_help, __argp_state_help, __argp_error,
- __argp_usage, __argp_failure, __option_is_short, __option_is_end):
- New declarations.
- (argp_parse, argp_help, argp_state_help, argp_error,
- argp_usage, argp_failure, _option_is_short, _option_is_end):
- Use __P macro for function declarations.
- (argp_usage, _option_is_end, _option_is_short): Inline definitions
- replaced by __-prefixed versions, and protected by __OPTIMIZE__.
- [__OPTIMIZE__ && !_LIBC] (__argp_usage, __argp_state_help,
- __option_is_short, __option_is_end): Add redefs (& later undefs)
- of __ versions of inline definitions so they define the correct
- name for the environment (libc vs. non-libc).
-
- * argp-fmtstream.c, argp-fmtstream.h, argp-fs-xinl.c, argp-xinl.c,
- argp-namefrob.h, argp-test.c: New files.
- * argp.c: File removed.
- * Makefile (SRCS): Add argp-fmtstream.c, argp-fs-xinl.c, and argp-xinl.c.
- Remove argp.c.
- (installhdrs): Define explicitly.
- (LCLHDRS): Define in terms of $(installhdrs) + others.
- (CFLAGs): Add -DHAVE_LINEWRAP_H & -DHAVE_CTHREADS_H.
-
-Mon Feb 10 22:19:46 1997 Miles Bader <miles@gnu.ai.mit.edu>
-
- * argp-help.c (indent_to, arg, struct pentry_state, print_header,
- comma, hol_entry_help, hol_help, usage_argful_short_opt,
- usage_long_opt, hol_usage, argp_args_usage, argp_doc, argp_help):
- Use argp_fmtstream_t & associated functions instead of stdio
- streams.
- "argp-fmtstream.h": New include.
- <linewrap.h>: Include removd.
-
- * argp-help.c (hol_append): Use memcpy instead of bcopy.
- (argp_doc): Use strchr instead of index.
- (make_hol): Make static.
- * argp-parse.c (argp_default_parser): Use strrchr instead of rindex.
- (argp_parse): Use strchr instead of index, memset instead of bzero.
- * argp-parse2.c (parser_init, argp_parse): Use memset instead of bzero.
- (argp_default_parser): Use strrchr instead of rindex.
- (parser_parse_opt): Use strchr instead of index.
-
-Sun Feb 9 10:53:20 1997 Miles Bader <miles@gnu.ai.mit.edu>
-
- * argp.h (ARGP_LONG_ONLY, ARGP_HELP_LONG_ONLY): New macros.
- * argp-parse.c (argp_parse): Support ARGP_LONG_ONLY.
- * argp-parse2.c (parser_parse_next): Likewise.
- * argp-help.c (argp_state_help): Add ARGP_HELP_LONG_ONLY to FLAGS
- if STATE has ARGP_LONG_ONLY set.
-
- * argp-help.c (hol_entry_help): Correctly output odoc options.
- Use un-nested helper functions, with state block.
- (arg, print_header, comma): New functions (were nested in
- hol_entry_help)
- (struct pentry_state): New type.
- (add_argless_short_opt, usage_argful_short_opt, usage_long_opt):
- New functions (were nested in hol_usage).
- (hol_usage): Use un-nested functions.
- * argp-help.c (hol_entry_short_iterate, hol_entry_long_iterate):
- Add COOKIE argument, also to signature of FUNC.
- (until_short): Add COOKIE argument.
-
-Sat Feb 8 17:18:43 1997 Miles Bader <miles@gnu.ai.mit.edu>
-
- * argp.h (OPTION_DOC): New macro.
- * argp-parse.c (argp_parse): Don't parse OPTION_DOC options.
- * argp-parse2.c (convert_options): Likewise.
- * argp-help.c (odoc): New macro.
- (oshort): Exclude options for which odoc is true.
- (canon_doc_option): New function.
- (hol_entry_cmp): Correctly place odoc options.
-
- * argp-help.c (hol_entry_qcmp): New function.
- (hol_sort): Remove cmp and use hol_entry_qcmp instead.
- (until_short): New function, from old nested function func1 in
- hol_entry_first_short. Only return short key when oshort is true.
- (hol_entry_first_short): Remove func1 and use until_short insteadd.
-
-Tue Nov 12 19:22:58 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * idvec.h (idvec_set, idvec_set_ids): New functions.
- * idvec.c (idvec_set, idvec_set_ids): Ditto.
-
-Tue Nov 5 21:16:10 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * idvec.h (idvec_setid): Doc fix.
-
-Thu Oct 24 15:15:27 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * argp-help.c (hol_entry_help: comma): Only print cluster headers for
- real clusters.
- Emit a newline after cluster headers.
-
-Wed Oct 23 13:58:22 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * argp-help.c (argp_args_usage, argp_doc): Use the new type of
- argp child vector.
-
-Tue Oct 22 15:35:56 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * argp-help.c (make_hol): Accept new CLUSTER argument,
- and fill in the corresponding entry fields with it.
- (hol_sort): Use hol_entry_cmp.
- (hol_entry_cmp, group_cmp, hol_cluster_cmp, hol_cluster_base,
- hol_add_cluster): New functions.
- (hol_free): Free clusters.
- (hol_append): Deal with clusters.
- Always use hol_free to free MORE, and just mark it's entries as
- invalid if we steal them.
- (argp_hol): Add, and use the new CLUSTER argument.
- Use the new type of argp child vector, and make clusters.
- (argp_help): Pass new CLUSTER argument to argp_hol.
- (hol_entry_help): Add gunk to print cluster headers.
- * argp.h (struct argp_child): New type.
- (struct argp): Change type of CHILDREN field to `struct argp_child *'.
- * argp-parse.c (argp_parse): Convert to use the new type of argp
- children vectors.
-
-Mon Oct 21 22:00:44 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * argp.h: Add extern inline protection.
- * idvec.h: Likewise.
- * maptime.h: Likewise.
- * argp.c, idvec-funcs.c, maptime-funcs.c: New files.
- * Makefile (SRCS): Add argp.c, idvec-funcs.c, and
- maptime-funcs.c.
-
-Mon Oct 14 18:06:19 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * argp-parse.c (argp_parse): Don't consume non-option arguments
- that aren't recognized by any parser.
- Allocate enough space for TOP_ARGP's parent list to include the
- version parser.
-
-Thu Sep 19 17:48:14 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * fsysops.c (fsys_update): Renamed from fsys_remount.
- Use --update, not --remount.
-
-Fri Aug 30 20:44:44 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * argp-help.c (argp_help): Print documentation only according to
- the ARGP_HELP_*_DOC bits in FLAGS.
- Possibly print bug report address if ARGP_HELP_BUG_ADDR is set.
- Replace FIRST by ANYTHING (sense inverted).
- * argp.h (ARGP_HELP_PRE_DOC, ARGP_HELP_POST_DOC, ARGP_HELP_DOC,
- ARGP_HELP_BUG_ADDR): New macros.
- (ARGP_HELP_STD_HELP): Include ARGP_HELP_DOC & ARGP_HELP_BUG_ADDR.
- (argp_program_bug_address): New declaration.
- (ARGP_HELP_EXIT_ERR, ARGP_HELP_EXIT_OK): Values changed.
- * Makefile (SRCS): Add argp-ba.c.
-
-Tue Aug 20 17:12:42 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * argp-help.c (argp_doc): Add FIRST_ONLY argument.
- Don't output a blank line for empty post-docs.
- (argp_help): Use it. Move first call to argp_doc after newline.
-
-Mon Aug 19 14:45:30 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * argp-help.c (argp_help): Add note about --usage to `Try...' msg.
- Supply new args to argp_doc, and additional call before arg help.
- (argp_doc): Add the POST and PRE_BLANK arguments, & return val.
-
-Wed Jul 31 15:24:09 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * wire.c (_start): No longer declared as weak, now that everything
- is getting recompiled anyway.
-
-Fri Jul 26 20:57:53 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * timefmt.c (fmt_past_time): Always use WIDTH+1 as strftime's limit.
-
-Thu Jul 25 23:10:35 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * timefmt.c (fmt_past_time): Terminate SEPS.
-
- * argp-help.c (hol_entry_help): Never return without restoring margins.
-
-Mon Jul 22 23:41:38 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * timefmt.c (fmt_past_time): Try several separators when
- concatenating dates & times.
-
-Fri Jul 19 17:23:18 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * argp-help.c (hol_usage): Allocate enough space in
- SHORT_NO_ARG_OPTS for the '\0' terminator.
-
-Tue Jul 16 00:24:18 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * argp-help.c (argp_help): Set the lmargin after printing the
- start of the usage message, so that it won't get indented.
-
-Wed Jul 10 12:16:57 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * argp-parse.c (argp_version_options, argp_version_parser): Use an
- uppercase 'V' for short version option.
-
- * argp-help.c (argp_help): "OPTIONS..." -> "OPTION...".
-
-Sat Jul 6 16:17:53 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * argp-parse.c (argp_version_parser): Output ARGP_PROGRAM_VERSION
- to STATE->out_stream, not stdout. Supply that stream and STATE to
- ARGP_PROGRAM_VERSION_HOOK.
- * argp.h (argp_program_version_hook): Add argument types.
- * argp-pv.c (argp_program_version): Doc updated.
- * argp-pvh.c (argp_program_version_hook): Type & doc updated.
- "argp.h": New include.
-
-Fri Jul 5 17:13:12 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * timefmt.c (fmt_past_time): Get rid of extraneous `f' in fmt string.
-
-Thu Jun 27 17:09:30 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * argp-parse.c (argp_parse): Zero the CHILD_INPUTS vector.
-
-Fri Jun 21 17:15:31 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * argp-parse.c (argp_parse): Use group_parse instead of calling
- group parser directly for long options.
-
-Wed Jun 19 13:11:15 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * fsysops.c: New file.
- * Makefile (SRCS): Add fsysops.c.
-
-Tue Jun 18 21:09:52 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * argp-help.c (argp_failure): If FMT is 0, don't print `: MSG'.
-
-Sun Jun 16 19:25:10 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * Makefile (SRCS): Remove line.c.
- (LCLHDRS): Remove line.h.
-
- * argp-help.c (argp_help, argp_state_help, argp_error, argp_failure):
- Handle null streams.
-
- * argp.h (struct argp_state): Add NAME, ERR_STREAM, & OUT_STREAM
- fields.
- (argp_failure): New declaration.
- (ARGP_NO_HELP, ARGP_NO_EXIT): Fix values (were hex, but with
- decimal value!).
- (argp_help): Add NAME argument.
- * argp-parse.c (argp_default_parser): Output to STATE->out_stream.
- (argp_parse): Initialize new fields in STATE.
- Output errors to STATE.err_stream. Handle null streams.
-
- * argp-help.c (argp_help): Add and use NAME argument.
- (argp_error): Use STATE->err_stream instead of STDERR.
- (argp_state_help): Supply NAME argument to argp_help.
- (argp_failure): New function.
-
-Thu May 30 18:10:35 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * argp-help.c (indent_to): Terminate.
-
-Tue May 28 18:05:40 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * timefmt.c (fmt_seconds): Don't print two decimal points.
-
-Wed May 22 00:11:24 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * argp-parse.c (argp_default_parser): Break after --HANG.
-
- * argp-help.c (hol_usage): Prefix each option desc with a space.
- Do manual wrapping of descs with an embedded space.
- Don't set wrap margin (done elsewhere now).
- (argp_args_usage): Do manual line wrapping because of embedded spaces.
- (argp_help): Set wrap & left margins when printing usage.
-
- * argp-parse.c (argp_parse): Only print a `Try...' message if the
- error was a parsing error.
-
-Tue May 14 21:59:43 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * timefmt.c (add_field): Correctly decrement *SECS by amount printed.
-
- * timefmt.c (fmt_named_interval): Use fraction digit in more cases.
- Always pick the last suffix if we can't find any that fits.
- Use new tv_ functions.
- (tv_is_zero, tv_is_ge): New functions.
-
-Fri May 10 23:17:38 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * argp.h (ARGP_ERR_UNKNOWN): New define.
- * argp-parse.c (EBADKEY): New define.
- (argp_default_parser, argp_version_parser, argp_parse): Use
- EBADKEY instead of EINVAL. Turn any EBADKEY that makes it to the
- end back into EINVAL.
-
-Thu May 9 11:30:47 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * maptime.c (maptime_map): Use new file_get_storage_info interface.
-
- * argp-help.c (argp_help): Just assign STREAM instead of using 2 vars.
-
-Thu May 9 11:00:52 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * exec-reauth.c (exec_reauth): Use new args to
- auth_user_authenticate.
-
- * timefmt.c (fmt_past_time): Cast arg to localtime appropriately.
-
- * argp-help.c (argp_args_usage): add_usage_item -> fprintf.
- (argp_help): Don't shadow arg; change parm STREAM to be STREAMARG
- and adjust initialization of STREAM variable to use the renamed
- parm.
-
-Tue May 7 14:58:48 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * timefmt.c (fmt_past_time): Suppress leading noise in some formats.
-
- * argp-help.c (hol_usage): Set the wmargin, not the lmargin.
- (hol_help): Set the wmargin as well as the lmargin.
- * argp-help.c <linewrap.h>: New include.
- (lmargin): Function deleted.
- (hol_entry_help, hol_usage): Use line_wrap_set_lmargin instead.
-
-Mon May 6 12:46:16 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * argp-help.c <line.h>: Include removed.
- (lmargin, indent_to): New functions.
- (argp_usage_arg): Function removed.
- (hol_entry_help, hol_help, hol_usage, argp_args_usage, argp_doc,
- argp_help): Use stdio streams and line_wrap_ functions instead of
- line_ functions.
-
-Sat May 4 05:32:28 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
-
- * rwlock.h: Moved to ../libthreads.
- * Makefile (LCLHDRS): Remove rwlock.h.
-
-Fri May 3 18:10:41 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
-
- * path-lookup.c: File removed.
- * Makefile (SRCS): Remove path-lookup.c.
-
- * argz.c, argz.h, envz.c, envz.h: Files removed.
- * Makefile (SRCS): Remove argz.c, envz.c.
- (LCLHDRS): Remove argz.h, envz.h.
-
-Thu May 2 00:31:32 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * argp-parse.c (_argp_hang): New variable.
- (OPT_HANG): New macro.
- (argp_default_options, argp_default_parser): Add hidden --HANG option.
- (argp_default_parser): New function.
- (argp_version_options, argp_version_argp): New variables.
- (argp_parse): Use ARGP_VERSION_ARGP when appropiate.
- * argp.h (argp_program_version, argp_program_version_hook): New decls.
- * Makefile (SRCS): Add argp-pv.c & argp-pvh.c.
- * argp-pv.c, argp-pvh.c: New files.
-
-Tue Apr 30 20:25:12 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * timefmt.c (fmt_past_time): New function.
- (fmt_minutes, fmt_seconds): New args, rewrite.
- (add_field): New function.
- (fmt_frac_value, append_fraction): Functions removed.
- * timefmt.h (fmt_past_time): New declaration.
- (fmt_minutes, fmt_seconds): Update.
-
- * argp-parse.c (argp_parse): Work with ARGP == 0.
-
-Mon Apr 29 15:34:00 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * cacheq.c, cacheq.h: New files.
- * Makefile (SRCS): Add cacheq.c.
- (LCLHDRS): Add cacheq.h.
-
-Thu Apr 25 00:09:48 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
-
- * idvec.c (idvec_free_contents): New function.
- * idvec.h (idvec_free_contents): Declare it.
-
-Thu Apr 11 15:23:15 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * wire.c (wire_segment_internal): Cast values nicely in `poke'
- loop.
-
-Wed Apr 3 12:57:39 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * argp.h (argp_parse): Change HOOK argument to INPUT.
- (struct argp_state): Rename HOOK & CHILD_HOOKS to INPUT & CHILD_INPUTS;
- add HOOK field again.
- * argp-parse.c (argp_parse): Change HOOK argument to INPUT.
- Don't propagate back return values when we're done.
- (struct group): Rename HOOK & CHILD_HOOKS to INPUT & CHILD_INPUTS;
- add HOOK field again.
- (group_parse): Restore and save value of GROUP's hook field into
- STATE around calling the parser. Don't save changed value of INPUT.
-
-Tue Apr 2 18:25:51 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * lcm.c: New file.
- * Makefile (SRCS): Add lcm.c.
-
-Thu Mar 28 19:06:12 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * portinfo.c, xportinfo.c, portinfo.h: New files.
- * portxlate.c, portxlate.h: New files.
- * Makefile (LCLHDRS): Add portinfo.h, portxlate.h.
- (SRCS): Add portinfo.c, xportinfo.c, portxlate.c.
-
-Tue Mar 26 17:43:51 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * wire.c: Add a weak reference to _start, so we don't have to
- compile all users of this library.
-
-Mon Mar 25 18:38:23 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * timefmt.c (fmt_named_interval): Rationalize WIDTH.
-
-Mon Mar 25 16:11:49 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * wire.h, wire.c: New files.
- * Makefile (SRCS): Add wire.c.
- (LCLHDRS): Add wire.h.
-
-Mon Mar 25 16:06:40 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * envz.c (envz_merge): NEW_LEN is a size, not a char.
-
-Mon Mar 18 14:09:18 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * argp.h (struct argp_state): Add HOOK and CHILD_HOOKS fields.
- Rename the PARENTS field to be CHILDREN (the most common use is
- initialization, so this change shouldn't have much effect).
- (ARGP_KEY_BEGIN, ARGP_KEY_ERROR): New macros.
- * argp-parse.c (struct group): Add PARENT, PARENT_INDEX, HOOK, and
- CHILD_HOOKS fields.
- (argp_parse): Add HOOK argument.
- Implement passing hook values to parsers, and propagating them
- between parents and children.
- * argp-help.c (argp_doc, argp_args_usage, argp_hol): Rename
- PARENTS field to CHILDREN.
-
- * argp-help.c (argp_error): Take an argp_state instead of an argp,
- and only doing anything if ARGP_NO_ERRS isn't set in it.
- (argp_state_help): New function.
- (argp_help): Don't interpret exiting options anymore.
- * argp-parse.c (argp_default_options): Add --usage option.
- (argp_default_parser): Use argp_state_help, so we don't need to
- screw with exit options anymore.
- Add usage option.
- (argp_parse): When printing `too many arguments', test
- ARGP_NO_ERRS instead of ARGP_NO_HELP.
- * argp.h (argp_state_help): New function.
- (argp_usage, argp_error): Change arguments.
-
-Fri Mar 1 18:59:40 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * argp-help.c (hol_entry_help): Don't print extraneous blank lines.
-
-Wed Feb 28 18:44:38 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * argp-parse.c (argp_parse): Print an error message if appropiate
- when we know there are too many arguments.
-
- * argp-help.c (hol_entry_help): Handle null group headers nicely.
-
-Wed Feb 28 16:09:27 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * maptime.c (maptime_map): mapped_time_value arg is volatile data.
- * maptime.h (maptime_map): Likewise.
-
-Sat Feb 17 21:34:18 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * shared-dom.c, localhost.c: New file.
- * Makefile (SRCS): Add shared-dom.c and localhost.c.
-
-Fri Feb 16 15:54:22 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * maptime.c, maptime.h: New files.
- * Makefile (SRCS, LCLHDRS): Add maptime.c and maptime.h respectively.
-
- * timefmt.c (fmt_named_interval): Correct backwards comparison.
-
-Thu Feb 15 15:18:34 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * canon-host.c: New file.
- * Makefile (SRCS): Add canon-host.c.
-
- * argp-parse.c (argp_parse): Correctly deal with errors from
- getopt, and allow the user to use '?' as a short option.
- (KEY_ERR): New macro.
- (argp_default_options, argp_default_parser): Use -? as the short
- option for --help.
-
-Wed Feb 14 14:33:48 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * argp-parse.c (argp_parse): Make things a bit more readable by
- using the TRY_GETOPT variable in place of opt == EOF.
- Use KEY_END, KEY_ARG, and QUOTE.
- Clear STATE.quoted if STATE.next has been moved back before it.
- (KEY_END): New macro, in place of EOF.
- (KEY_ARG, QUOTE): New macros.
-
-Mon Feb 12 15:08:33 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * argp-parse.c (argp_parse): Don't parse args in order by
- default. Honor ARGP_NO_ARGS.
- Deal correctly when the user turns a non-option arg into an option
- in re-ordering mode.
- * argp.h (struct argp_state): Add `quoted' field.
-
-Thu Feb 8 19:35:49 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * argp-parse.c (argp_parse): When a non-option arg fails to be
- parsed with EINVAL, set ARG_EINVAL true, and leave ERR as is until
- just before we return.
- Put process_arg() in the right scope.
-
-Wed Feb 7 23:08:33 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * argp-parse.c (argp_parse): Deal with getopt returning EOF early
- because of `--'.
-
- * argp-parse.c (argp_parse): Make STATE.arg_num per-group.
- (struct group): Renamed process_arg field to args_processed (a count).
-
-Mon Feb 5 13:39:57 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * argp.h (struct argp_state): Add ARG_NUM field.
- * argp-parse.c (argp_parse): Implement the ARG_NUM field.
-
- * argp.h (struct argp, struct argp_state, argp_parse, argp_help,
- argp_usage, argp_error, _option_is_short, _option_is_end): Add `const'
- where appropriate.
- * argp-parse.c (argp_default_options, argp_default_argp,
- argp_parse, find_long_option): Likewise.
- * argp-help.c (struct hol_entry, make_hol,
- hol_entry_short_iterate, hol_entry_long_iterate,
- hol_entry_first_short, hol_entry_first_long, hol_find_entry,
- hol_sort, hol_entry_help, argp_hol, argp_args_usage, argp_doc,
- argp_help, argp_error): Likewise.
- * line.h (line_write, line_fill, line_puts): Likewise.
- * line.c (line_write, line_fill): Likewise.
-
-Sat Feb 3 02:00:06 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * idvec.c (idvec_merge_ids): Correctly add all IDS, even if some
- duplicates are avoided.
-
-Tue Jan 23 15:02:03 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * argp-help.c (hol_entry_help): Correctly print group headers, and
- precede them with a blank line.
- (hol_set_group): Renamed from hol_set_sort_class.
- (argp_help): Use hol_set_group instead of hol_set_sort_class.
- (struct hol_entry, make_hol, hol_sort, hol_set_group): Rename the
- `set_class' field to be `group'.
- (hol_help, hol_entry_help): After a group header has been printed,
- separate subsequent groups with a blank line.
-
-Mon Jan 15 11:01:15 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * path-lookup.c (hurd_file_name_path_lookup, file_name_path_lookup):
- Add PREFIXED_NAME (return) argument.
- (file_name_path_scan): New function.
- (hurd_file_name_path_lookup): Use file_name_path_scan().
-
-Tue Jan 2 01:24:57 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * argp-parse.c (argp_default_options, argp_default_parser): Add
- --program-name (hidden) option.
- (OPT_PROGNAME): New macro.
-
- * idvec.c (idvec_merge_ids): Preserve duplicates internal to IDS.
- (idvec_ensure): Alloc NUM ids, not NUM chars!
- (idvec_remove): Correctly copy ids when deleting.
- * idvec.h (idvec_merge, idvec_delete): New declarations.
-
- * idvec-auth.c (idvec_merge_auth): Fix various small typos.
-
- * argz.c (argz_delete): If the result is empty, free it.
-
- * exec-reauth.c (exec_reauth): Doc fix.
-
- * argz.h (argz_delete): Renamed from argz_remove.
- * argz.c (argz_delete): Ditto.
- (argz_insert): Deref ARGZ where necessary.
- * envz.c (envz_merge): Rename argz_remove to argz_delete.
-
-Mon Jan 1 17:48:34 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * idvec.c (idvec_remove, idvec_insert_only): New functions.
- (idvec_setid): Use idvec_insert_only() instead of idvec_insert_new().
- * idvec.h (idvec_remove, idvec_insert_only): New declarations.
-
- * Makefile (SRCS): Add exec-reauth.c.
-
- * idvec.c (idvec_free_wrapper, idvec_free, idvec_ensure,
- idvec_grow, idvec_tail_contains, idvec_add_new, idvec_insert_new,
- idvec_merge_ids, idvec_setid): New functions.
- (idvec_insert): Rewritten to use idvec_grow().
- * idvec-auth.c (idvec_merge_auth): New function.
- * idvec.h (idvec_free_wrapper, idvec_free, idvec_ensure,
- idvec_grow, idvec_tail_contains, idvec_add_new, idvec_insert_new,
- idvec_merge_ids, idvec_setid, idvec_merge_auth): New declarations.
- * Makefile (SRCS): Added idvec-auth.c.
-
-Fri Dec 29 12:15:00 1995 Miles Bader <miles@gnu.ai.mit.edu>
-
- * argp-parse.c (_argp_unlock_xxx): New function.
-
-Thu Dec 21 10:18:04 1995 Miles Bader <miles@gnu.ai.mit.edu>
-
- * idvec.h (struct idvec): Renamed from struct ivec. `ints' field
- renamed to `ids'.
- (make_idvec, idvec_insert, idvec_add, idvec_contains):
- All renamed from the corresponding `ivec' declaration, and types,
- variable names, etc, changed accordingly.
- * idvec.c (make_idvec, idvec_insert, idvec_add, idvec_contains):
- All renamed from the corresponding `ivec' routine, and types,
- variable names, etc, changed accordingly.
- * Makefile (SRCS): Remove options.c. Rename ivec.c to idvec.c.
- (LCLHDRS): Remove options.h. Rename ivec.h to idvec.h.
-
-Wed Dec 20 13:05:00 1995 Miles Bader <miles@gnu.ai.mit.edu>
-
- * argz.c (argz_insert): Instead of an integer position N, take a
- pointer BEFORE into ARGZ to insert before.
- * argz.h (argz_insert): Instead of an integer position N, take a
- pointer BEFORE into ARGZ to insert before.
- (argz_next): New inline function.
-
-Tue Dec 19 13:52:52 1995 Miles Bader <miles@gnu.ai.mit.edu>
-
- * argp.h (struct argp_option): Add the GROUP field. Twiddle doc.
- (_option_is_end): Be more pessimistic about what constitutes `the end'.
- * argp-help.c (make_hol): Use the new GROUP field in struct
- argp_option to initialize sort_classes.
- (HEADER_COL): New macro.
- (hol_entry_help): Deal with group headers.
- * argp-parse.c (argp_default_options): Put --help in group -1.
-
-Sun Dec 17 00:18:58 1995 Miles Bader <miles@gnu.ai.mit.edu>
-
- * ivec.c: New file.
- * ivec.h: New file.
- * Makefile (LCLHDRS): Add ivec.h.
- (SRCS): Add ivec.c.
-
-Sat Dec 16 17:42:27 1995 Miles Bader <miles@gnu.ai.mit.edu>
-
- * termsize.c (deduce_term_size): New function, new file.
- * Makefile (SRCS): Add termsize.c.
-
- * argz.c (argz_insert): New function.
- (argz_remove, argz_append, argz_add): New functions, were in envz.c.
- * argz.h (argz_insert): New declaration.
-
-Thu Dec 14 18:04:48 1995 Miles Bader <miles@gnu.ai.mit.edu>
-
- * argz.h (argz_append, argz_add, argz_remove): New functions.
-
-Wed Dec 13 14:28:12 1995 Miles Bader <miles@gnu.ai.mit.edu>
-
- * envz.c: New file.
- * envz.h: New file.
- * Makefile (SRCS): Add envz.c.
- (LCLHDRS): Add envz.h
-
-Wed Dec 6 15:05:43 1995 Miles Bader <miles@gnu.ai.mit.edu>
-
- * argp.h (struct argp_state): Rename the INDEX field to be NEXT.
- * argp-parse.c (argp_parse): Change uses of that field.
-
- * argz.c (argz_stringify): Add the SEP argument.
- * argz.h (argz_stringify): Ditto.
-
-Tue Dec 5 18:38:40 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * Makefile (SRCS, LCLHDRS): Removed error.c and error.h.
- (CPPFLAGS-error.c): Variable removed.
- * error.c, error.h: Files removed.
-
-Thu Oct 19 18:39:59 1995 Miles Bader <miles@gnu.ai.mit.edu>
-
- * argp.h (argp_usage, argp_error): New declarations.
- (argp_usage): New inline function.
- * argp-help.c (argp_error): New function.
-
-Fri Oct 13 19:28:28 1995 Miles Bader <miles@gnu.ai.mit.edu>
-
- * argp.h (ARGP_HELP_STD_ERR): Doesn't print a usage message.
- (ARGP_HELP_STD_USAGE): ... whereas this does.
-
-Thu Oct 12 15:57:18 1995 Miles Bader <miles@gnu.ai.mit.edu>
-
- * argp-parse.c (argp_parse): Correctly mark short options as optional.
- (argp_parse): If an option alias doesn't have a key, use the real key.
-
-Wed Oct 11 13:54:18 1995 Miles Bader <miles@gnu.ai.mit.edu>
-
- * argp-help.c (hol_find_entry): Don't increment ENTRY prematurely.
-
- * argp-parse.c (argp_parse): Update STATE.argp when adding a
- wrapper to implement the --help option.
- In general, use the version of variables that are in STATE.
- Update STATE.index in the case where getopt returns EOF.
- (argp_parse): Correctly translate options.
-
- * line.c (line_write): New function.
- (line_puts): Function deleted.
- (line_fill): Use line_write instead of line_printf.
- * line.h (line_write): New declaration.
- (line_puts): Rewrite in terms of line_write.
-
- * argp-help.c (hol_entry_help): Print the right documentation
- string for each entry.
-
- * argp-parse.c (argp_default_parser, argp_parse): Rename uses of
- argp_usage* to argp_help*.
-
- * argp-help.c (argp_help): Renamed from argp_usage.
- * argp.h (ARGP_HELP_*, argp_help): Renamed from ARGP_USAGE_* &c.
-
- * argp.h (ARGP_USAGE_STD_HELP): Use ARGP_USAGE_SHORT_USAGE instead
- of ARGP_USAGE_USAGE.
-
- * argp-help.c (make_hol): Deal with a null value of OPT. If there
- are no entries, don't define the ENTRIES or SHORT_OPTIONS fields.
- (hol_free): Don't free ENTRIES or SHORT_OPTIONS unless there are any.
- (hol_sort): Don't sort unless there are some entries.
- (hol_usage): Don't do anything unless there are some entries.
- (hol_sort): Sort int he correct order.
- (argp_usage): Add the ARGP_USAGE_SHORT_USAGE case.
-
- * argp-parse.c (argp_parse): Deal with null parser or option fields.
- If an argp has neither a parser or any options, don't put it in GROUPS.
- Use comparison with EGROUP, rather than testing the parser field,
- the end test for iteration over GROUPS.
-
- * argp-help.c (hol_append): Implement.
-
- * argp-parse.c (argp_parse): Pass in the right value for GROUPS to
- convert_options.
-
- * Makefile (SRCS): Add argp-parse.c, argp-help.c, and line.c
- (LCLHDRS): Add line.h and argp.h.
-
-Tue Oct 10 17:58:14 1995 Miles Bader <miles@gnu.ai.mit.edu>
-
- * argp.h: Doc fixes.
-
- * argp.h: (ARGP_KEY_NO_ARGS): New macro.
- * argp-parse.c (argp_parse): Add support for ARGP_KEY_NO_ARGS.
- Put all the group attributes into structures which get stored in
- the GROUPS array, rather than having a separate array for each.
-
-Sat Oct 7 03:32:51 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * rwlock.h: Protect against multiple inclusion.
- Include cthreads.h and assert.h.
-
-Wed Sep 27 17:37:08 1995 Miles Bader <miles@gnu.ai.mit.edu>
-
- * options.c (options_parse): Use 0 as the tag for non-option args.
- * options.h: Ditto.
-
-Sat Sep 23 14:15:01 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * rwlock.h (RWLOCK_INITIALIZER): New macro.
-
-Sat Sep 16 13:40:22 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * Makefile (lndist, $(srcdir)/hurd-snap/$(dir)/error.[ch]):
- Targets removed.
-
-Thu Aug 24 11:49:13 1995 Miles Bader <miles@churchy.gnu.ai.mit.edu>
-
- * options.c: Include "options.h" instead of <options.h>.
diff --git a/libshouldbeinlibc/cacheq.c b/libshouldbeinlibc/cacheq.c
index eb41c6e9..5649903a 100644
--- a/libshouldbeinlibc/cacheq.c
+++ b/libshouldbeinlibc/cacheq.c
@@ -106,7 +106,7 @@ cacheq_set_length (struct cacheq *cq, int length)
th->next = next_th;
}
- /* Call user hooks as appropiate. */
+ /* Call user hooks as appropriate. */
if (fh && th)
{
if (cq->move_entry)
diff --git a/libshouldbeinlibc/idvec-auth.c b/libshouldbeinlibc/idvec-auth.c
index 90452974..bb7f4afd 100644
--- a/libshouldbeinlibc/idvec-auth.c
+++ b/libshouldbeinlibc/idvec-auth.c
@@ -1,6 +1,8 @@
/* Idvec functions that interact with an auth server
- Copyright (C) 1995,98,99,2001,02 Free Software Foundation, Inc.
+ Copyright (C) 1995, 1998, 1999, 2001, 2002, 2008
+ Free Software Foundation, Inc.
+
Written by Miles Bader <miles@gnu.org>
This program is free software; you can redistribute it and/or
@@ -70,13 +72,13 @@ idvec_merge_auth (struct idvec *eff_uids, struct idvec *avail_uids,
/* Deallocate any out-of-line memory we got back. */
if (_eff_uids != eff_uid_buf)
- munmap ((caddr_t) _eff_uids, num_eff_uids);
+ munmap ((caddr_t) _eff_uids, num_eff_uids * sizeof (uid_t));
if (_avail_uids != avail_uid_buf)
- munmap ((caddr_t) _avail_uids, num_avail_uids);
+ munmap ((caddr_t) _avail_uids, num_avail_uids * sizeof (uid_t));
if (_eff_gids != eff_gid_buf)
- munmap ((caddr_t) _eff_gids, num_eff_gids);
+ munmap ((caddr_t) _eff_gids, num_eff_gids * sizeof (gid_t));
if (_avail_gids != avail_gid_buf)
- munmap ((caddr_t) _avail_gids, num_avail_gids);
+ munmap ((caddr_t) _avail_gids, num_avail_gids * sizeof (gid_t));
return err;
}
diff --git a/libshouldbeinlibc/idvec-verify.c b/libshouldbeinlibc/idvec-verify.c
index 55d20e2c..981f86ac 100644
--- a/libshouldbeinlibc/idvec-verify.c
+++ b/libshouldbeinlibc/idvec-verify.c
@@ -1,6 +1,7 @@
/* Verify user passwords
- Copyright (C) 1996,97,98,99,2002 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997, 1998, 1999, 2002, 2008
+ Free Software Foundation, Inc.
Written by Miles Bader <miles@gnu.org>
This program is free software; you can redistribute it and/or
@@ -258,7 +259,7 @@ verify_id (uid_t id, int is_group, int multiple,
/* VERIFY_FN should have been defaulted in idvec_verify if necessary. */
assert (verify_fn);
- if (id >= 0)
+ if (id != (uid_t) -1)
do
{
if (is_group)
diff --git a/libshouldbeinlibc/idvec.c b/libshouldbeinlibc/idvec.c
index 692c4788..24adeb8f 100644
--- a/libshouldbeinlibc/idvec.c
+++ b/libshouldbeinlibc/idvec.c
@@ -202,7 +202,7 @@ idvec_merge (struct idvec *idvec, const struct idvec *new)
return idvec_merge_ids (idvec, new->ids, new->num);
}
-/* Remove any occurances of ID in IDVEC after position POS.
+/* Remove any occurrences of ID in IDVEC after position POS.
Returns true if anything was done. */
int
idvec_remove (struct idvec *idvec, unsigned pos, uid_t id)
diff --git a/libshouldbeinlibc/idvec.h b/libshouldbeinlibc/idvec.h
index 41441259..3c70a5d7 100644
--- a/libshouldbeinlibc/idvec.h
+++ b/libshouldbeinlibc/idvec.h
@@ -131,7 +131,7 @@ int idvec_subtract (struct idvec *idvec, const struct idvec *sub);
anything was changed. */
int idvec_keep (struct idvec *idvec, const struct idvec *keep);
-/* Remove any occurances of ID in IDVEC after position POS> Returns true if
+/* Remove any occurrences of ID in IDVEC after position POS> Returns true if
anything was done. */
int idvec_remove (struct idvec *idvec, unsigned pos, uid_t id);
diff --git a/libshouldbeinlibc/localhost.c b/libshouldbeinlibc/localhost.c
index f0c67541..f0225116 100644
--- a/libshouldbeinlibc/localhost.c
+++ b/libshouldbeinlibc/localhost.c
@@ -39,18 +39,27 @@ localhost ()
errno = 0;
if (buf) {
+ char *new;
buf_len += buf_len;
- buf = realloc (buf, buf_len);
+ new = realloc (buf, buf_len);
+ if (! new)
+ {
+ free (buf);
+ buf = 0;
+ errno = ENOMEM;
+ return 0;
+ }
+ else
+ buf = new;
} else {
buf_len = 128; /* Initial guess */
buf = malloc (buf_len);
+ if (! buf)
+ {
+ errno = ENOMEM;
+ return 0;
+ }
}
-
- if (! buf)
- {
- errno = ENOMEM;
- return 0;
- }
} while ((gethostname(buf, buf_len) == 0 && !memchr (buf, '\0', buf_len))
|| errno == ENAMETOOLONG);
diff --git a/libshouldbeinlibc/ugids-argp.c b/libshouldbeinlibc/ugids-argp.c
index 809da784..dc076d27 100644
--- a/libshouldbeinlibc/ugids-argp.c
+++ b/libshouldbeinlibc/ugids-argp.c
@@ -1,6 +1,6 @@
/* Parse user and group ids
- Copyright (C) 1997, 1999 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1999, 2008 Free Software Foundation, Inc.
Written by Miles Bader <miles@gnu.ai.mit.edu>
@@ -83,13 +83,24 @@ parse_opt (int key, char *arg, struct argp_state *state)
else
{
struct passwd _pw, *pw;
- if (getpwnam_r (arg, &_pw, id_lookup_buf, sizeof id_lookup_buf, &pw)
- == 0)
- uid = pw->pw_uid;
+ int err;
+ err = getpwnam_r (arg, &_pw, id_lookup_buf,
+ sizeof id_lookup_buf, &pw);
+ if (err == 0)
+ {
+ if (pw == NULL)
+ {
+ argp_failure (state, 10, 0, "%s: Unknown user", arg);
+ return EINVAL;
+ }
+
+ uid = pw->pw_uid;
+ }
else
{
- argp_failure (state, 10, 0, "%s: Unknown user", arg);
- return EINVAL;
+ argp_failure (state, 12, err,
+ "Could not get uid for user: %s", arg);
+ return err;
}
}
@@ -121,14 +132,24 @@ parse_opt (int key, char *arg, struct argp_state *state)
else
{
struct group _gr, *gr;
- if (getgrnam_r (arg, &_gr, id_lookup_buf, sizeof id_lookup_buf, &gr)
- == 0)
- return ugids_add_gid (ugids, gr->gr_gid, key == 'G');
- else
+ int err = getgrnam_r (arg, &_gr, id_lookup_buf,
+ sizeof id_lookup_buf, &gr);
+ if (err == 0)
{
- argp_failure (state, 11, 0, "%s: Unknown group", arg);
- return EINVAL;
+ if (gr == NULL)
+ {
+ argp_failure (state, 11, 0, "%s: Unknown group", arg);
+ return EINVAL;
+ }
+
+ return ugids_add_gid (ugids, gr->gr_gid, key == 'G');
}
+ else
+ {
+ argp_failure (state, 13, err,
+ "Could not get gid for group: %s", arg);
+ return err;
+ }
}
default:
diff --git a/libshouldbeinlibc/ugids.c b/libshouldbeinlibc/ugids.c
index 057dcf81..2b9b6b71 100644
--- a/libshouldbeinlibc/ugids.c
+++ b/libshouldbeinlibc/ugids.c
@@ -49,7 +49,7 @@ ugids_add_gid (struct ugids *ugids, gid_t gid, int avail)
error_t err =
idvec_add_new (avail ? &ugids->avail_gids : &ugids->eff_gids, gid);
if (! err)
- /* Since this gid is now explicit, remove it from the appropiate implied
+ /* Since this gid is now explicit, remove it from the appropriate implied
set. */
idvec_remove (avail ? &ugids->imp_avail_gids : &ugids->imp_eff_gids,
0, gid);
@@ -70,7 +70,7 @@ ugids_add_user (struct ugids *ugids, uid_t uid, int avail)
idvec_merge_implied_gids (&imp_gids, &uids);
/* Now remove any gids we already know about from IMP_GIDS. For gids
- that weren't in the appropiate implied set before, this will
+ that weren't in the appropriate implied set before, this will
ensure that they remain out after we merge IMP_GIDS into it, and
ones that *were*, they will remain so. */
idvec_subtract (&imp_gids, gids);
diff --git a/libstore/ChangeLog b/libstore/ChangeLog
deleted file mode 100644
index b915becb..00000000
--- a/libstore/ChangeLog
+++ /dev/null
@@ -1,1275 +0,0 @@
-2005-09-24 Roland McGrath <roland@frob.com>
-
- * store.h (STORE_STD_CLASS): Use __attribute_used__ macro
- instead of `unused' attribute.
-
-2004-09-03 Alfred M. Szmidt <ams@kemisten.nu>
-
- * store.h (__start_store_std_classes, __stop_store_std_classes):
- Declare using __attribute__ ((weak)).
- * typed.c (store_find_class): Removed `#pragma weak' for
- `__stop_store_std_classes' and `__start_store_std_classes'.
-
-2003-08-05 Marcus Brinkmann <marcus@gnu.org>
-
- * zero.c: Do not include <assert.h>.
-
-2003-07-21 Ognyan Kulev <ogi@mfmi.uni-sofia.bg>
-
- * rdwr.c (store_write): Return EINVAL when LEN is not aligned to
- STORE->block_size, instead of raising assertion failure.
- (store_read): Likewise.
-
-2003-08-04 Roland McGrath <roland@frob.com>
-
- * typed.c (store_find_class): Use dlopen/dlclose on the names found by
- looking through the list instead of passing list elements directly to
- dlsym, which is not kosher.
-
-2003-08-02 Ognyan Kulev <ogi@fmi.uni-sofia.bg>
-
- * module.c (store_module_open): NAME that doesn't contain ':' is
- not considered invalid argument, but a class name without
- class-specific portion.
- * typed.c (store_typed_open): When NAME is empty string, don't
- invoke store_open (name + 1, ...).
-
-2002-10-01 Ludovic Courtès <ludovic.courtes@utbm.fr>
-
- * store.h: New type store_set_size_meth_t: New type. New
- prototype store_set_size.
- (struct store_class): Added a set_size () method.
- * rdwr.c (store_set_size): New function.
- * file.c (file_store_set_size): New function.
- (store_file_class): Add file_store_set_size.
- * concat.c (concat_set_size): New function.
- (store_concat_class): concat_set_size.
- * copy.c (copy_set_size): New function.
- (store_copy_class): copy_set_size.
- * device.c (device_set_size): New function.
- (store_device_class): device_set_size.
- * memobj.c (memobj_set_size): New function.
- (store_memobj_class): memobj_set_size.
- * mvol.c (mvol_set_size): New function.
- (store_mvol_class): mvol_set_size.
- * nbd.c (nbd_set_size): New function.
- (store_nbd_class): nbd_set_size.
- * remap.c (remap_set_size): New function.
- (store_remap_class): remap_set_size.
- * stripe.c (stripe_set_size): New function.
- (store_stripe_class): stripe_set_size.
- * unknown.c (unknown_set_size): New function.
- (store_unknown_class): unknown_set_size.
- * zero.c (zero_set_size): New function.
- (store_zero_class): zero_set_size.
-
-2002-11-03 Neal H. Walfield <neal@cs.uml.edu>
-
- * kids.c: Do not include <malloc.h>.
- Include <stdlib.h>.
- (store_set_children): Use memcpy, not bcopy.
- Calculate SIZE correctly: STORE->children is a struct store **,
- not a struct store_run *.
- Reported by Moritz Schulte <moritz@duesseldorf.ccc.de>.
-
-2002-06-07 Roland McGrath <roland@frob.com>
-
- * store.h (struct store_enc): Use loff_t instead of off_t.
- (store_enc_init, store_enc_return, store_return): Likewise.
-
- * encode.c (store_std_leaf_encode): Do a sizeof comparison to get
- `too_big' optimized out when store_enc starts using 64 bit offsets.
-
-2002-05-20 Ognyan Kulev <ogi@fmi.uni-sofia.bg>
-
- * Makefile: Move inclusion of ../Makeconf before using $(srcdir).
-
-2002-05-16 Roland McGrath <roland@frob.com>
-
- * device.c (enforced): Use dev_status_data_t for SIZES.
- (store_device_create): Likewise.
- (dev_write): Do some silly magic since device.defs uses int.
-
-2002-05-07 Roland McGrath <roland@frob.com>
-
- * module.c (open_class): Add cast to int for %* arg.
-
- * kids.c (store_open_children): Dereference pointer in isalnum call.
-
- * set.c (store_set_runs): Fix argument type.
- * kids.c (store_set_children): Likewise.
-
-2002-03-15 Roland McGrath <roland@frob.com>
-
- * Makefile (OBJS): Remove hack for part.o.
- (parted.o parted_p.o parted_pic.o): Targets removed.
-
-2002-03-14 Roland McGrath <roland@frob.com>
-
- * Makefile (cleantarg): Append $(store-types:%=libstore_%.a) here.
- (all): Depend on that list too.
- (install): Depend on those files in $(libdir).
- ($(store-types:%=$(libdir)/libstore_%.a): $(libdir)/%: %): New static
- pattern rule to install them.
-
-2002-03-13 Roland McGrath <roland@frob.com>
-
- * Makefile ($(store-types:%=libstore_%.a)): Create object files with
- the undefined symbol rather than linker scripts.
-
-2002-03-14 Marcus Brinkmann <marcus@gnu.org>
-
- * unzipstore.c (unzip_store): New variable IN_BUF_SIZE to hold
- allocated space for IN_BUF. Use that instead IN_BUF_LEN for that
- purpose if appropriate. Always update IN_BUF_LEN after a read.
-
-2002-03-11 Roland McGrath <roland@frob.com>
-
- * unzipstore.c: New file, broken out of bunzip2.c.
- * bunzip2.c: Most code moved to unzipstore.c, which we #include.
- (DO_UNZIP, UNZIP): New function, macro.
- * gunzip.c: Most code deleted, now in unzipstore.c, which we #include.
- (DO_UNZIP, UNZIP): New function, macro.
- * Makefile (DIST_FILES): New variable, list unzipstore.c here.
-
- * Makefile (module-CPPFLAGS): New variable.
- * module.c (STORE_SONAME_SUFFIX): Macro removed.
-
- * Makefile (store-types): Add missing types here.
- (SRCS): Remove all those from here and use $(store-types:=.c) instead.
-
-2002-02-08 Roland McGrath <roland@frob.com>
-
- * Makefile (store-types): New variable.
- (all): Depend on $(store-types:%=libstore_%.a).
- (libstore_%.so.$(hurd-version)): New pattern rule.
- ($(store-types:%=libstore_%.a): libstore_%.a): New static pattern rule
- to create `-lstore_TYPE' pseudo-objects (linker scripts) for each type.
- (libstore.so-LDLIBS): New variable, adds -ldl.
- (GUNZIP_OBJS, BUNZIP2_OBJS): New variables.
- (UNZIP_OBJS): Variable removed, replaced by those two.
- (OBJS): Update use.
- (libstore_gunzip.so.$(hurd-version)): Depend on PIC $(GUNZIP_OBJS).
- (libstore_bunzip2.so.$(hurd-version)): Depend on PIC $(BUNZIP2_OBJS).
- * unknown.c: Add STORE_STD_CLASS decl.
- * bunzip2.c: Likewise.
- * copy.c: Likewise.
- * device.c: Likewise.
- * file.c: Likewise.
- * gunzip.c: Likewise.
- * memobj.c: Likewise.
- * module.c: Likewise.
- * mvol.c: Likewise.
- * nbd.c: Likewise.
- * open.c: Likewise.
- * part.c: Likewise.
- * remap.c: Likewise.
- * stripe.c: Likewise.
- * stripe.c: Likewise.
- * task.c: Likewise.
- * typed.c: Likewise.
- * typed.c: Likewise.
- * unknown.c: Likewise.
- * url.c: Likewise.
- * zero.c: Likewise.
-
- * argp.c (DEFAULT_STORE_TYPE): Macro removed.
- (DEFAULT_STORE_CLASS): New macro replaces it.
- (parse_opt): Update the use.
-
-2002-01-19 Roland McGrath <roland@frob.com>
-
- * url.c (find_url_class): Function removed.
- (store_url_open): Use store_typed_open after validating syntax.
- (store_url_decode): Use store_find_class and store_module_find_class.
-
- * typed.c (store_find_class): New function.
- (store_typed_open): Use it.
-
- * url.c (url_decode): Renamed to store_url_decode, made public.
- (store_url_open_class): Changed use.
- * store.h: Declare store_url_decode.
- * decode.c (store_decode): Call store_url_decode for STORAGE_NETWORK
- as a special case.
-
-2001-12-28 Roland McGrath <roland@frob.com>
-
- * Makefile (SRCS): Remove std.c.
-
- * module.c: New file.
- * store.h (store_module_open, store_module_find_class,
- store_module_decode): Declare them.
- * argp.c (parse_opt): Leave PARSED->classes null here instead
- of defaulting to store_std_classes.
- (find_class): Default null class-list parameter to store_std_classes
- here instead. If no matches when defaulted, try calling
- store_module_open_class too.
- * typed.c (store_typed_open): If no match when search list is
- store_std_classes, try calling store_module_open_class too.
- * url.c (find_url_class): Likewise.
- * decode.c (store_decode): If no match when search list is
- store_std_classes, try calling store_module_decode too.
-
- * store.h (store_concat_class_vectors): Remove decl of nonexistent fn.
-
-2002-03-14 Marcus Brinkmann <marcus@gnu.org>
-
- * rdwr.c (store_read): Truncate amount to be read to size of
- store. Use memcpy rather than bcopy.
- (store_write): Return EIO if caller tries to write over the end of
- the store.
- * copy.c (copy_read): Do not multiply LEN returned from vm_read
- with vm_page_size.
-
-2002-03-11 Marcus Brinkmann <marcus@gnu.org>
-
- * stripe.c (store_concat_class): Add store_concat_open.
- (store_concat_create): Do not multiply NUM_STORES with 2 to get
- the number of runs.
- * kids.c (store_allocate_child_encodings): Call allocate_encoding
- on child store K, not on STORE.
- (store_encode_children): Likewise.
- * decode.c (store_std_leaf_decode): Increment ENC->cur_data by
- NAME_LEN and MISC_LEN as appropriate.
-
-2002-03-05 Roland McGrath <roland@frob.com>
-
- * device.c (dev_map): Pass proper OFFSET and SIZE params to device_map.
-
-2002-01-19 Roland McGrath <roland@frob.com>
-
- Support explicit open of unknown store (with no name), i.e. -Tunknown.
- * unknown.c (unknown_allocate_encoding): Return EOPNOTSUPP
- if STORE->hook is null.
- (unknown_encode): Likewise.
- (unknown_cleanup): Do nothing if STORE->hook if is null.
- (unknown_clone): Likewise.
- (unknown_validate_name, unknown_open): New functions.
- (store_unknown_class): Use them.
-
-2002-01-01 Roland McGrath <roland@frob.com>
-
- * nbd.c (htonll): Make this a macro using bswap_64 from <byteswap.h>.
-
-2001-12-31 Roland McGrath <roland@frob.com>
-
- * url.c (url_decode): Don't clobber *ENC in the dummy run.
-
- * nbd.c (store_nbd_open): Make sure the store's name always
- starts with the "nbd://" prefix.
-
-2001-12-30 Roland McGrath <roland@frob.com>
-
- * nbd.c (nbd_read): Request multiple chunks of up to NBD_IO_MAX each.
- Handle needing multiple io_read calls to receive a single chunk.
-
-2001-12-29 Roland McGrath <roland@frob.com>
-
- * nbd.c (nbdopen): Fix in last change.
- (nbd_read): Let LEN receive the result count from io_read.
-
- * nbd.c (NBD_IO_MAX): New macro.
- (nbd_write): Write in chunks no larger than NBD_IO_MAX.
- (nbd_read): Cap AMOUNT to NBD_IO_MAX.
-
- * nbd.c (nbd_validate_name): Skip : before port number.
- (nbdopen): Fix test after connect loop.
- Use multiple read calls as needed to get the whole connection header.
-
-2001-12-26 Roland McGrath <roland@frob.com>
-
- * unknown.c: New file.
- * Makefile (SRCS): Add it.
- * store.h (store_unknown_class, store_unknown_decode): Declare them.
- * create.c (store_create): If store_decode fails with EINVAL,
- and we were called with the STORE_NO_FILEIO flag bit set,
- then use store_unknown_decode.
-
-2001-12-23 Roland McGrath <roland@frob.com>
-
- * kids.c (store_set_child_flags): Move decrement to avoid ill-defined
- C behavior that gets a warning.
- (store_clear_child_flags): Likewise.
-
-2001-10-14 Roland McGrath <roland@frob.com>
-
- * Makefile (SRCS): Add url.c to the list.
-
- * url.c: New file.
- (store_url_open): New function.
- (store_url_open_class): New const variable.
- * store.h: Declare them.
- * std.c (store_std_classes): Add &store_url_open_class to the list,
- move &store_nbd_class after it.
-
- * nbd.c (nbd_validate_name): Accept an optional "nbd://" prefix.
- (nbdopen): Likewise.
-
-2001-10-06 Neal H Walfield <neal@cs.uml.edu>
-
- * memobj.c: Include "store.h", not <hurd/store.h>.
- * nbd.c: Likewise.
- * part.c: Likewise.
-
-2001-10-01 Marcus Brinkmann <marcus@gnu.org>
-
- * part.c: Add const to type.
- Reported by Jeroen Dekkers.
-
-2001-10-01 Marcus Brinkmann <marcus@gnu.org>
-
- * device.c (dev_error): Add a break to silence gcc warning.
- (store_device_class): Add const to type.
- * typed.c (store_typed_open_class): Likewise.
- * file.c (store_file_class): Likewise.
- * stripe.c (store_concat_class): Likewise.
- (store_ileave_class): Likewise.
- * zero.c (store_zero_class): Likewise.
- * open.c (store_open_class): Likewise.
- * remap.c (store_remap_class): Likewise.
- * task.c (store_task_class): Likewise.
- * copy.c (store_copy_class): Likewise.
- * gunzip.c (store_gunzip_class): Likewise.
- * bunzip2.c (store_bunzip2_class): Likewise.
- * mvol.c (store_mvol_class): Likewise.
- * memobj.c (store_memobj_class): Likewise.
- * nbd.c (store_nbd_class): Likewise.
- Submitted by Maurizio Boriani <baux@debian.org>.
-
-2001-09-30 Roland McGrath <roland@frob.com>
-
- * memobj.c: New file.
- * Makefile (SRCS): Add it.
- * store.h (store_memobj_class, store_memobj_create): Declare them.
-
-2001-09-29 Roland McGrath <roland@frob.com>
-
- * nbd.c (struct nbd_startup): Replace sizehi, sizelo with just size.
- (nbdopen): Changed use.
-
-2001-09-28 Roland McGrath <roland@frob.com>
-
- * decode.c (store_std_leaf_decode): Actually copy data into MISC.
- Don't call malloc for it when MISC_LEN is zero, just store null.
-
-2001-09-27 Roland McGrath <roland@frob.com>
-
- * nbd.c (store_nbd_open): Divide reported size by block size.
-
- * std.c (store_std_classes): Add store_nbd_class.
- * store.h: Declare it.
-
- * nbd.c: New file.
- * Makefile (SRCS): Add it.
- * store.h (store_nbd_open, _store_nbd_create): Declare them.
-
-2001-09-16 Roland McGrath <roland@frob.com>
-
- * std.c (store_std_classes): Only include store_part_class
- if [HAVE_PARTED_PARTED_H].
-
-2001-08-25 Roland McGrath <roland@frob.com>
-
- * part.c (store_part_create): Do a run-time check on ped_get_version.
-
-2001-08-25 Neal H Walfield <neal@cs.uml.edu>
-
- * part.c: New file.
- * std.c (store_std_classes): Add store_part_class.
- * store.h (store_part_create): New prototype.
- (store_part_open): Likewise.
-
-2001-08-25 Roland McGrath <roland@frob.com>
-
- * Makefile (parted.o, parted_pic.o): Pass -nostdlib.
-
-2001-08-25 Neal H Walfield <neal@cs.uml.edu>
-
- * Makefile (libstore.so-LDFLAGS): Renamed from LDFLAGS-libstore.so.
-
-2001-08-24 Roland McGrath <roland@frob.com>
-
- * Makefile (SRCS): Add part.c here.
- (OBJS): Mutate part.o -> parted.o here.
- (parted.o, parted_p.o, parted_pic.o): New targets.
- (LDFLAGS-libstore.so): Set to $(PARTED_LIBS).
-
-2001-08-12 Neal H Walfield <neal@cs.uml.edu>
-
- * copy.c (copy_read): The protocol dictates that *LEN is in
- bytes, not pages.
- (copy_write): Be sure that the buffer passed to vm_read is
- page-aligned. When determining how much to copy, use LEN, not the
- uninitialized *AMOUNT.
- (copy_clone): Use memcpy, not bcopy.
- * derive.c: Include <sys/types.h> and <mach.h>.
- (_store_derive): Initialize STORE->wrap_src.
-
- * set.c: Do not include <malloc.h>.
- Include <stdlib.h>, <errno.h> and <mach.h>.
- (store_set_runs): Use memcpy, not bcopy.
- (store_set_name): Use strdup, not a strlen, malloc and strcpy.
- * zero.c (zero_read): When checking if mmap failed, compare
- against MAP_FAILED, not -1.
- Use memset, not bzero.
-
-2001-08-03 Roland McGrath <roland@frob.com>
-
- * Makefile (HURDLIBS): Define it so we link in libshouldbeinlibc.
-
-2001-04-26 Marcus Brinkmann <marcus@gnu.org>
-
- * set.c: Use explicit comparison to MACH_PORT_NULL.
-
-2001-03-07 Roland McGrath <roland@frob.com>
-
- * store.h (store_write, store_write_meth_t): Make buffer arg const*.
- * copy.c (copy_write): Likewise.
- * device.c (dev_write): Likewise.
- * file.c (file_write): Likewise.
- (file_byte_write): Likewise.
- * rdwr.c (store_write): Likewise.
- * remap.c (remap_write): Likewise.
- * stripe.c (stripe_write): Likewise.
- * task.c (task_write): Likewise.
- * zero.c (zero_write): Likewise.
- * mvol.c (zero_write): Likewise.
-
-2001-01-16 Roland McGrath <roland@frob.com>
-
- * store.h (struct store_argp_params): Add member `store_optional'.
- * argp.c (parse_opt): If store_optional is set, don't make it an error
- when there are no store arguments and the type doesn't validate that.
-
-2001-01-14 Roland McGrath <roland@frob.com>
-
- * encode.c (too_big): New static function.
- (store_std_leaf_encode): Use it to return EOVERFLOW if a run
- does not fit in an off_t.
-
-2001-01-09 Marcus Brinkmann <marcus@gnu.org>
-
- * device.c (store_device_create): Protect code of last change with
- #ifdef DEV_GET_RECORDS, and set sizes_len again before second try.
- (enforce): Likewise. Move definition of variable err up to top
- level.
-
-2001-01-09 Marcus Brinkmann <marcus@gnu.org>
-
- * device.c (enforce): First try DEV_GET_RECORDS, and only fall
- back to DEV_GET_STORE if this fails with D_INVALID_OPERATION.
- (store_device_create): Likewise, but fall back for any failure.
-
-2001-01-08 Marcus Brinkmann <marcus@gnu.org>
-
- * zero.c (zero_remap): Change type of variables length, old_length
- to store_offset_t.
- (zero_decode): Change type of variable size to store_offset_t.
- (zero_open): Likewise. Use strtoull instead strtoul to parse
- size argument from name. Use store_offset_t for max_offs and
- its calculation.
- (store_zero_create): Use store_offset_t type for size argument.
-
- * derive.c (_store_derive): Use store_offset_t as type for
- variable last_part_base.
-
- * stripe.c (addr_adj): Change types of addr argument and return
- value to store_offset_t.
- (store_ileave_create): Change type of interleave argument and
- variables min_end and end to store_offset_t, but type of variable
- block_size to size_t.
- (store_concat_create): Change type of variable block_size to
- size_t.
-
- * make.c (_store_create): Change end argument type to store_offset_t.
-
- * store.h: New type store_offset_t, define to off64_t.
- (struct store_run): Change type of start and length to
- store_offset_t.
- (struct store): Change type of end, wrap_src, wrap_dst, blocks,
- size to store_offset_t.
- Change type of addr arg in store_read_meth_t and
- store_write_meth_t to store_offset_t, as well as in declarations
- for store_read and store_write.
- Change type of argument end in _store_create declaration to
- store_offset_t.
- Change type of argument size in store_zero_create to
- store_offset_t. Change type of argument interleace in
- store_ileace_create to store_offset_t.
-
- * rdwr.c (store_find_first_run): Change type of return value, addr
- and *base arguments, and variables wrap_src and run_blocks to
- store_offset_t.
- (store_next_run): Change type of *base argument to store_offset_t.
- (store_write): Change type of addr argument and variable base to
- store_offset_t.
- (store_read): Likewise, also for addr argument of local function seg_read.
- Change type of len argument to size_t.
-
- * copy.c (copy_read): Change type of addr argument to store_offset_t.
- (copy_write): Likewise.
- * device.c (dev_read): Likewise.
- (dev_write): Likewise.
- * file.c (file_read): Likewise.
- (file_write): Likewise.
- (file_byte_read): Likewise.
- (file_byte_write): Likewise.
- * mvol.c (mvol_read): Likewise.
- (mvol_write): Likewise.
- * remap.c (remap_read): Likewise.
- (remap_write): Likewise.
- * stripe.c (stripe_read): Likewise.
- (stripe_write): Likewise.
- * task.c (task_read): Likewise.
- (task_write): Likewise.
- * zero.c (zero_read): Likewise.
- (zero_write): Likewise.
-
- * remap.c (store_remap_runs): Change type of addr and len
- arguments of local function add_run and of local variables addr,
- length, baddr, blen and len to store_offset_t.
- (remap_open): Cast -1 to store_offset_t, not off_t.
-
- * argp.c (struct store_parsed): Change type of interleave from
- off_t to store_offset_t.
- (store_parsed_append_args): Use %Ld instead %ld to print
- interleave value.
- (store_parsed_name): Likewise.
-
-2001-01-07 Marcus Brinkmann <marcus@gnu.org>
-
- * copy.c: Include <mach.h>. New macro page_aligned.
- (copy_write): Cast buf to vm_address_t in call to vm_write.
- Dereference amount for memcpy.
- (copy_read): Add len parameter to vm_read, remove redundant following
- len assignment.
-
-2000-12-20 Roland McGrath <roland@frob.com>
-
- * zero.c (zero_open): Check for END being null after strtoul call.
- If character following number (*END) is b, multiply size by 512;
- k or K, by 1024; m or M by 1024*1024; g or G by 1024*1024*1024.
-
- * store.h (struct store_class): Fix typo in comment.
-
- * copy.c (copy_read): When reading whole aligned pages, use vm_read.
- Use MAP_FAILED in place of (void *) -1. Use memcpy in place of bcopy.
- (copy_write): When reading whole aligned pages, use vm_write.
- Use memcpy in place of bcopy.
-
-1999-11-20 Roland McGrath <roland@baalperazim.frob.com>
-
- * store.h (struct store_class): Add const to type of `name' member.
-
-1999-11-14 Roland McGrath <roland@baalperazim.frob.com>
-
- * device.c (dev_error): New static function.
- Translate all expected D_* codes into POSIX codes.
- (dev_read, dev_write, dev_open): Use it.
-
-1999-10-07 Roland McGrath <roland@baalperazim.frob.com>
-
- * rdwr.c (store_read, store_write): Fix asserts in last change.
-
-1999-10-03 Roland McGrath <roland@baalperazim.frob.com>
-
- * rdwr.c (store_read, store_write): Fix calculations broken in last
- change, so they again properly account for starting intrarun offset.
-
-1999-09-09 Roland McGrath <roland@baalperazim.frob.com>
-
- * rdwr.c (store_write, store_read): Carefully avoid scaling run
- lengths from blocks to bytes except when we're already sure the
- run's size in bytes won't overflow size_t.
-
-1999-07-11 Thomas Bushnell, BSG <tb@mit.edu>
-
- * argp.c (store_parsed_open): Add more braces to clarify if-else
- structure.
-
- * encode.c: Include <sys/mman.h>
- * zero.c: Likewise.
-
- * encode.c (store_encode): Repair syntax.
- * copy.c (copy_read): Likewise.
-
- * enc.c (store_enc_dealloc): Cast first arg of munmap correctly.
-
-1999-07-10 Roland McGrath <roland@baalperazim.frob.com>
-
- * rdwr.c: Add #include <sys/mman.h> for munmap decl.
- * enc.c: Likewise.
- * copy.c: Likewise.
- * gunzip.c: Likewise.
- * bunzip2.c: Likewise.
-
-1999-07-09 Thomas Bushnell, BSG <tb@mit.edu>
-
- * bunzip2.c (bunzip2): Use mmap instead of vm_allocate.
- * copy.c (copy_read): Likewise.
- (copy_clone): Likewise.
- * encode.c (store_encode): Likewise.
- * gunzip.c (gunzip): Likewise.
- * rdwr.c (store_read): Likewise.
- * zero.c (zero_read): Likewise.
-
-1999-07-08 Roland McGrath <roland@baalperazim.frob.com>
-
- * remap.c (remap_open): Recognize "N+" syntax in block list as from
- block N through the end of the store.
-
-1999-07-03 Thomas Bushnell, BSG <tb@mit.edu>
-
- * bunzip2.c (bunzip2): Use munmap instead of vm_deallocate.
- (store_bunzip2_create): Likewise.
- * rdwr.c (store_read): Likewise.
- * gunzip.c (gunzip): Likewise.
- (store_gunzip_create): Likewise.
- * enc.c (store_enc_dealloc): Likewise.
- * copy.c (copy_cleanup): Likewise.
-
-1999-05-23 Roland McGrath <roland@baalperazim.frob.com>
-
- * remap.c (remap_open): Don't multiply by 512. Offsets and sizes are
- in blocks, not bytes.
-
- * stripe.c (concat_decode): Add __attribute__((unused)) to suppress
- warning.
- (ileave_decode): Likewise.
-
- * bunzip2.c: Add extern decl for do_bunzip2.
-
-1999-05-16 Roland McGrath <roland@baalperazim.frob.com>
-
- * remap.c (remap_decode): Add attribute((unused)) to suppress warning.
-
-1999-05-14 Roland McGrath <roland@baalperazim.frob.com>
-
- * remap.c (remap_open, remap_validate_name): New functions, to support
- parsing block lists a la GRUB.
- (store_remap_class): Initialize those slots.
-
-1999-05-01 Mark Kettenis <kettenis@gnu.org>
-
- * device.c (store_device_create): Deal with devices that return
- sucessfully from device_get_status, but do not return any sensible
- information.
-
-1998-09-06 OKUJI Yoshinori <okuji@kuicr.kyoto-u.ac.jp>
-
- * bunzip2.c: New file.
- * store.h (store_bunzip2_create): New declarations.
- (store_bunzip2_open): Likewise.
- (store_bunzip2_class): Likewise.
- * std.c (store_std_classes): Add store_bunzip2_class.
- * Makefile (SRCS): Add bunzip2.c.
- (UNZIP_OBJS): Add do-bunzip2.o.
-
-1998-12-27 Roland McGrath <roland@baalperazim.frob.com>
-
- * store.h: Remove defns of STORAGE_*, now in <hurd/hurd_types.h>.
-
-1998-12-21 Roland McGrath <roland@baalperazim.frob.com>
-
- * open.c (store_open): Like file.c:fiopen, catch EACCES or EROFS
- and try to open read-only.
-
- * file.c (fiopen): Treat EROFS same as EACCES.
-
-1998-10-20 Roland McGrath <roland@baalperazim.frob.com>
-
- * flags.c (store_clear_flags): Add braces to silence gcc warning.
-
-1998-10-19 Roland McGrath <roland@baalperazim.frob.com>
-
- * rdwr.c (store_read): Add braces to silence gcc warning.
- * flags.c (store_set_flags): Likewise.
- * typed.c (store_typed_open): Likewise.
- * decode.c (store_decode): Likewise.
- * argp.c (store_parsed_append_args): Likewise.
- (store_parsed_name): Likewise.
- (store_parsed_open): Likewise.
-
-1998-09-05 Roland McGrath <roland@baalperazim.frob.com>
-
- * argp.c (store_parsed_append_args): Use %d for layer, which is int.
- Cast to int for %* field width arg.
-
-1997-09-22 Miles Bader <miles@gnu.ai.mit.edu>
-
- * encode.c (store_encode): Allocate the correct amount of memory
- for the encoding vectors.
-
- * make.c (_store_create): Initialize NEW->misc_len.
-
- * mvol.c (store_mvol_class): Set correct members.
- (store_mvol_create): Declare PHYS correctly.
- <stdio.h>: New include.
- * store.h (store_mvol_create): Declare PHYS correctly.
- * Makefile (SRCS): Add mvol.c.
-
-1997-08-11 Miles Bader <miles@gnu.ai.mit.edu>
-
- * store.h (store_mvol_create): New declaration.
- (store_mvol_class): New declaration.
- * mvol.c: New file.
-
-1997-07-24 Miles Bader <miles@gnu.ai.mit.edu>
-
- * device.c (store_device_create): Treat devices that can't do
- device_get_status as zero-length.
- (dev_map): Pass 0 for OFFSET and SIZE arguments to device_map --
- mach ignores them, and we often can't supply meaningful values.
- * make.c (_store_create): If BLOCK_SIZE is zero, make sure there
- are no runs.
- * derive.c (_store_derive): Let BSIZE be zero.
-
-1997-07-21 Miles Bader <miles@gnu.ai.mit.edu>
-
- * argp.c (store_parsed_append_args): Correctly unparse complex
- type names.
-
-1997-07-18 Miles Bader <miles@gnu.ai.mit.edu>
-
- * map.c (store_map): If we can't map STORE directly, and it has a
- source file, try to map that instead.
- * remap.c (store_remap): If we are mutating SOURCE, close any
- source port it has.
- * store.h (store_map_source): Declaration removed.
-
-1997-07-17 Miles Bader <miles@gnu.ai.mit.edu>
-
- * store.h (store_map): New declaration.
- (struct store_class): Add map field.
- * device.c (dev_map): New function.
- (store_device_class): Use dev_map.
- * zero.c (zero_map): New function.
- (store_zero_class): Use zero_map.
- * file.c (file_map): New function.
- (store_file_class): Use file_map.
- * map.c: New file.
- * Makefile (SRCS): Add map.c.
-
- * device.c (dev_read, dev_write): Remove debugging grot.
-
-1997-07-07 Miles Bader <miles@gnu.ai.mit.edu>
-
- * kids.c (store_open_children): Support factored type notation.
-
-1997-07-05 Miles Bader <miles@gnu.ai.mit.edu>
-
- * file.c (file_read, file_write, file_byte_read, file_byte_write):
- Remove debugging noise.
-
-1997-06-30 Miles Bader <miles@gnu.ai.mit.edu>
-
- * store.h: Doc fix.
-
-1997-06-27 Miles Bader <miles@gnu.ai.mit.edu>
-
- * file.c (store_file_open): Use fiopen to open the file.
- Set name of newly created store.
- (fiopen, ficlose, enforced, file_set_flags, file_clear_flags): New
- functions.
- (store_file_class): Use new functions.
- (store_file_byte_class): Fill in rest of functions.
- * device.c (enforced): Move some checking here from dev_set_flags,
- and correct the check for the number of stores.
- (dev_set_flags): Move enforcement checking code to enforce.
-
-1997-06-26 Miles Bader <miles@gnu.ai.mit.edu>
-
- * argp.c (parse_type): Fill in name_prefix field.
- (store_parsed_open): Apply it to any names we open.
-
-1997-06-22 Miles Bader <miles@gnu.ai.mit.edu>
-
- * argp.c (parse_type): New function.
- (parse_opt): Use parse_type to parse the -T option.
- (struct store_parsed): Add NAME_PREFIX field.
- (store_parsed_free): Free it.
- (store_parsed_append_args): Emit it.
- (store_parsed_open): Use it in opens.
-
- * typed.c (store_typed_open): If NAME doesn't contain a `:'
- separator, try to use it as either a class name or a file name.
- Interpret a trailing or leading `:' as unambiguously referring to
- a class-name or a filename, respectively.
-
-1997-06-19 Miles Bader <miles@gnu.ai.mit.edu>
-
- * rdwr.c (store_read): Limit reads to the amount available.
-
- * store.h (store_typed_open_class): Renamed from store_typed_class.
- * std.c (store_std_classes): Use store_typed_open_class instead of
- store_typed_class.
-
- * Makefile (SRCS): Remove storeread.c & storecat.c.
- (storeread, storecat): Rules removed.
- * storeread.c, storecat.c: Moved to ../utils.
-
-1997-06-18 Miles Bader <miles@gnu.ai.mit.edu>
-
- * store.h (struct store): BLOCKS & SIZE are off_t, not size_t.
- (store_zero_create): SIZE is off_t, not size_t.
- * zero.c (store_zero_create, zero_open): Likewise.
-
- * storecat.c (main): Update use of argp.
- * storeread.c (main): DATA is void *.
-
- * Makefile (UTILS_OBJS): Variable removed.
- (UNZIP_OBJS): New variable.
- (OBJS): Don't use $(UTILS_OBJS). Do use $(UNZIP_OBJS).
- (VPATH, CPPFLAGS): Search for stuff in ../exec for unzip junk.
-
- * derive.c: Include <assert.h>
- (_store_derive): Assert that block_size & blocks_per_page are
- powers of two (which should be enforced elsewhere).
-
- * make.c (_store_create): Renamed from _make_store.
- Return an error_t code, and add an additional argument STORE to
- return the new store; all uses changed.
- * store.h (_make_store): Likewise.
-
- * Makefile (SRCS): Add typed.c, copy.c, and gunzip.c.
-
- * typed.c: New file
- * store.h (store_gunzip_class, store_typed_class): New declarations.
- * std.c (store_std_classes): Add store_copy_class,
- store_gunzip_class, and store_typed_class.
-
- * kids.c (store_open_children, store_children_name): New functions.
- * stripe.c (store_concat_open): New function.
- (store_concat_create): Set the store name if possible.
- * store.h (store_concat_open, store_children_name,
- store_open_children): New declaration.
- * rdwr.c (store_read): Deallocate memory returned when reading
- part of a multiple-segment read.
-
-1997-06-17 Miles Bader <miles@gnu.ai.mit.edu>
-
- * copy.c, gunzip.c: New files.
- * store.h (store_copy_class): New declaration.
- (store_copy_create, store_copy_open, store_buffer_create,
- store_gunzip_create, store_gunzip_open): New declarations.
-
- * decode.c (store_decode): Pass the original value of CLASSES to
- any decode method, not our search tail.
-
- * device.c (dopen): If *MOD_FLAGS already contains
- STORE_HARD_READONLY, don't ever try to open for reading.
-
-Fri Feb 21 23:31:34 1997 Miles Bader <miles@gnu.ai.mit.edu>
-
- * device.c (dopen): Add MOD_FLAGS param, and detect read-only devices.
- (dev_clear_flags, store_device_open): Use MOD_FLAGS arg to dopen.
-
-Wed Feb 19 15:40:18 1997 Miles Bader <miles@gnu.ai.mit.edu>
-
- * storeread.c (doc): Make doc string come after options.
-
- * device.c (dev_set_flags): Correctly check for unenforcable runs.
-
- * task.c: New file.
- * Makefile (SRCS): Add task.c.
- * store.h (store_task_class): New declaration.
- (store_task_create, _store_task_create, store_open): New declarations.
- * std.c (store_std_classes): Add &STORE_TASK_CLASS.
-
- * xinl.c: Renamed from store.c.
- * Makefile (SRCS): Change store.c to xinl.c.
-
-Mon Oct 21 22:03:19 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * store.h: Add extern inline protection.
- * store.c: New file.
- * Makefile (SRCS): Add store.c.
-
-Tue Oct 8 14:31:51 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * kids.c (store_set_child_flags, store_clear_child_flags): New funcs.
- * store.h (store_set_child_flags, store_clear_child_flags): New decls.
- * stripe.c (stripe_set_flags, stripe_clear_flags): Remove functions.
- * remap.c (store_remap_class): Init set_flags & clear_flags fields.
- * stripe.c (store_ileave_class, store_concat_class): Likewise.
-
- * clone.c (store_clone): Copy name field.
-
-Mon Oct 7 14:56:27 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * device.c (dev_set_flags, dev_clear_flags): New functions.
- (store_device_class): Add dev_set_flags & dev_clear_flags.
- (dopen, dclose, enforced): New functions.
- (store_device_open): Use dopen.
- * store.h <fcntl.h>: New include.
- * stripe.c (stripe_set_flags, stripe_clear_flags): New functions.
- (store_ileave_create, store_concat_create): Add common backend
- flags from children to parent's flags.
-
-Sat Oct 5 00:23:45 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * create.c (store_create): Add special handling of STORE_INACTIVE
- in FLAGS.
-
-Fri Oct 4 23:44:51 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * create.c (store_create): Free *STORE when store_set_flags fails.
-
- * store.h (STORE_INNOCUOUS, STORE_INACTIVE): New macros.
- (store_is_securely_returnable): New function.
- * zero.c (store_zero_create): Set STORE_INNOCUOUS flags.
-
-Fri Sep 27 17:01:07 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * remap.c (store_remap): Zero SOURCE->end before calling _store_derive.
- Turn off STORE_ENFORCED flag in source if munging it.
-
- * device.c (store_device_open): Set *STORE's name appropriately.
-
-Tue Sep 24 15:15:27 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * zero.c <limits.h>: New include.
- (zero_open): When no size is specified, use the maximum off_t
- value, not the maximum size_t value.
-
-Mon Sep 23 12:55:43 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * storecat.c (main): Use new PARAMS var for passing args to STORE_ARGP.
-
-Thu Sep 19 11:12:44 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * argp.c (parse_opt): Correctly check for non-default type.
-
- * kids.c (store_decode_children): Change CLASSES to **.
- * encode.c (store_encode): Make CLASS var const.
- * file.c (_store_file_create): Make CLASS arg const.
- * store.h (struct store): Make CLASS field const.
- (_make_store): Make CLASS arg const.
- * make.c (_make_store): Make CLASS arg const.
- * stripe.c (ileave_decode, concat_decode): Make CLASSES arg const.
- * remap.c (remap_decode): Likewise.
- * create.c (store_create): Likewise.
-
-Wed Sep 18 15:14:51 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * argp.c (struct store_parsed): Change CLASSES field to be a pointer to
- a vector of class pointers.
- (find_class): Change CLASSES to be a vector of class pointers.
- * decode.c (store_decode): Change CLASSES to be a vector of class
- pointers.
- * store.h (struct store_class, struct store_argp_params, store_create,
- store_open, store_decode, store_decode_children): Change CLASSES args
- to be a pointer to a vector of class pointers.
- (_store_add_std_class): Declaration removed.
- (STORE_STD_CLASS): Macro removed.
- * std.c (store_std_classes): Make an initialized array.
- (_store_add_std_class): Function removed.
- * device.c (store_device_class): Renamed from dev_class; export.
- * file.c (store_file_class): Renamed from file_class; export.
- (store_file_byte_class): Renamed from file_byte_class; export.
- * zero.c (store_zero_class): Renamed from zero_class; export.
- * remap.c (store_remap_class): Renamed from remap_class; export.
- * open.c (store_query_class): Renamed from query_class; export.
- * stripe.c (store_ileave_class): Renamed from ileave_class; export.
- (store_concat_class): Renamed from concat_class; export.
-
- * zero.c (zero_open, zero_validate_name): New functions.
- (zero_class): Use them.
-
- * argp.c (store_parsed_open): Remove CLASSES argument.
- (struct store_parsed): Make some fields const.
- * store.h (store_parsed_open): Remove CLASSES argument.
-
-Tue Sep 17 14:48:48 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * store.h (struct store_class): Add OPEN and PARSE fields.
- (store_open): Make NAME const.
- (struct store_argp_params): New type.
- * device.c (dev_open): New function.
- (dev_class): Point to it.
- * file.c (fhile_open): New function.
- (file_class): Point to it.
- * argp.c (options, parse_opt): Add --store-type/-T & (hidden)
- --machdev/-m options, remove --device/-d option.
- (struct store_parsed): Rmove DEVICE field, add TYPE, DEFAULT_TYPE
- and CLASSES fields.
- (store_parsed_free): Free PARSED->type if it exists.
- (store_parsed_append_args): Use --store-type=... instead of --device.
- (store_parsed_open): When --store-type is specified, search
- CLASSES for that type, and call it's open function.
- * open.c (store_open): Make NAME const.
- (query_class): New variable.
-
-Fri Sep 13 14:33:24 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * argp.c (store_parsed_append_args, store_parsed_open, struct
- store_parsed): Use `device' instead of `machdev'.
-
- * encode.c (store_return): Only call store_enc_dealloc upon failure.
- (store_std_leaf_allocate_encoding): NUM_OFFSETS is NUM_RUNS * 2.
-
- * enc.c (store_enc_return): Don't call store_enc_dealloc.
-
-Thu Sep 12 17:23:35 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * storecat.c (main): Limit reads to 1M, and iterate until done.
- Use store_parsed_name to get store name for errors.
- Add program description.
-
- * store.h (STORAGE_REMAP, STORAGE_ZERO): New macros (temporary, to
- avoid touching hurd/hurd_types.h).
-
-1996-09-12 Miles Bader <miles@gnu.ai.mit.edu>
-
- * remap.c (store_remap): Call _store_derive after changing runs.
-
- * argp.c (store_parsed_name): New function.
-
-Wed Sep 11 12:38:44 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * decode.c (store_with_decoded_runs): New function.
- (store_std_leaf_decode): Call it.
- * store.h (store_with_decoded_runs): New declaration.
-
- * stripe.c (ileave_class, concat_class): Initialize the REMAP field.
- (stripe_remap): New function.
- * store.h (store_remap_create): New declaration.
- * zero.c (zero_remap): New function.
- (zero_class): Initialize remap field with zero_remap.
- * Makefile (SRCS): Add remap.c.
-
- * zero.c: New file, from null.c.
- * null.c: File removed.
- * store.h (store_zero_create): Renamed from store_null_create.
- * Makefile (SRCS): Replace null.c by zero.c.
-
-Tue Sep 10 17:05:03 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * remap.c: New file.
- * store.h (struct store_class): Add remap field.
- (store_remap): New declaration.
-
- * encode.c (store_return): New function.
- * enc.c (store_enc_return, store_return): New functions.
- * store.h (store_enc_return, store_return): New declarations.
-
-Mon Sep 9 12:32:11 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * rdwr.c (store_write, store_read): Use void * for buffers, not char *.
- * device.c (dev_write, dev_read): Likewise.
- * file.c (file_read, file_write, file_byte_read, file_byte_write):
- Likewise.
- * stripe.c (stripe_read, stripe_write): Likewise.
- * null.c (null_read, null_write): Likewise.
- * store.h (store_write_meth_t, store_read_meth_t, store_read,
- store_write): Make type of buffer void *, not char *.
-
-Sun Sep 8 14:14:05 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * device.c (dev_read, dev_write): Don't print debugging messages.
- * argp.c (options, parse_opt): Change short option names around.
-
-Wed Sep 4 13:01:19 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * argp.c (parse_opt): --layer isn't implemented, so say so.
-
- * storeread.c (main): Add new args to store_*_create calls.
- * storecat.c (main): Use new interface to store_argp.
-
-Wed Sep 3 11:00:00 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * argp.c (struct store_parsed): New type.
- (store_parsed_free, store_parsed_append_args, store_parsed_open):
- New functions.
- (parse_opt): Use new store_parsed structure instead of the old
- store_pars_hook, and just fill in the names rather than doing the
- open here. Don't take a struct store_argp_params as input any
- more; instead just take the address of a location in which to
- return a store_parsed structure.
- (struct store_parse_hook): Type removed.
- (free_hook, open_file): Functions removed.
- <assert.h>: New include.
- <stdlib.h>, <fcntl.h>: Includes removed.
- (options): --machdev/-m renamed to --device/-D.
- * store.h (struct store): Make log2_* fields unsigned.
- (STORE_NO_FILEIO): New macro.
- (STORE_HARD_READONLY, STORE_ENFORCED): Values changed.
- (STORE_GENERIC_FLAGS): Add STORE_NO_FILEIO.
- (struct store_argp_params): Type removed.
- (store_parsed_Free, store_parsed_open, store_parsed_append_args):
- New declarations.
- (struct store_parsed): New incomplete type.
-
-Mon Sep 2 18:56:26 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * store.h (store_open): New declaration.
- * open.c: New file.
- * Makefile (SRCS): Add open.c.
-
-Wed Aug 21 14:40:15 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * device.c (store_device_open): Don't call store_device_create if
- device_open fails.
-
-Tue Aug 20 14:37:33 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * argp.c (free_hook): Free H->params->args if necessary.
- (parse_opt): Initialize and fill in H->params->args when appropriate.
- <argz.h>: New include.
-
-Mon Aug 19 14:31:33 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * store.h (struct store_argp_params): Add return_args, args, &
- args_len fields.
-
-Fri Jul 19 16:16:46 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * decode.c (store_std_leaf_decode): Decode name too.
- Deal with NAME_LENGTH being 0.
-
-Sun Jun 16 22:49:55 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * argp.c (parse_opt): Use argp_failure.
-
-Thu May 23 10:54:06 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * argp.c (parse_opt): Honor ARGP_NO_ERRS.
- <error.h>: New include.
-
-Wed May 22 00:14:18 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * argp.c (parse_opt): Use error instead of ERR for non-parsing errors.
- Rename ERR to PERR.
-
-Tue May 21 00:01:02 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * storecat.c (main): Delete most everything and use store arg parsing.
- (options, doc, args_doc): Variables removed.
-
- * create.c (store_create): Add FLAGS & CLASSES params.
- * rdwr.c (store_write): Return an error if STORE is readonly.
- * decode.c (store_decode): Add CLASSES param, use it instead of big
- hardwired switch statement.
- (store_default_leaf_decode): Use typedef for CREATE param. Pass in
- FLAGS arg when calling it.
- * encode.c (store_std_leaf_allocate_encoding): Renamed from
- store_default_leaf_allocate_encoding. Make STORE const.
- (store_std_leaf_encode): Renamed from store_default_leaf_encode.
- Make STORE const. Get class id from store->class->id.
- (store_encode): Use CLASS field instead of METHS field.
- * clone.c (store_clone): Copy the flags by passing them to _make_store.
- Use CLASS field instead of METHS field.
- * file.c (store_file_open, file_decode): New functions.
- (store_file_create): Always set STORE_ENFORCED.
- (file_class): Renamed from file_meths. Add more fields. Make std
- with _STORE_STD_CLASS.
- (file_byte_class): Renamed from file_byte_meths.
- <fcntl.h>, <hurd.h>: New includes.
- * device.c (store_device_open, dev_decode): New functions.
- (store_device_create): Always set STORE_ENFORCED.
- (device_class): Renamed from device_meths. Add more fields. Make std
- with _STORE_STD_CLASS.
- <hurd.h>: New include.
- * stripe.c (ileave_allocate_encoding, ileave_encode, ileave_decode,
- concat_allocate_encoding, concat_encode, concat_decode): New functions.
- (concat_class): New variable.
- (ileave_class): Renamed from stripe_class. More fields added.
- * store.h (struct store): Remove CLASS field. METHS field renamed
- CLASS.
- (STORE_IMMUTABLE_FLAGS, STORE_GENERIC_FLAGS, STORE_BACKEND_SPEC_BASE,
- STORE_BACKEND_FLAGS, STORE_READONLY, STORE_HARD_READONLY,
- STORE_ENFORCED): New macros.
- (struct store_class): Renamed from store_meths; all uses changed.
- Add ID, NAME, DECODE, SET_FLAGS, CLEAR_FLAGS, and NEXT fields.
- (store_std_leaf_decode): Renamed from store_default_leaf_decode.
- (store_std_leaf_create_t): New type.
- (_STORE_STD_CLASS): New macro.
- (struct store_argp_params): READONLY field deleted, FLAGS field added.
- (store_allocate_child_encodings, store_encode_children,
- store_decode_children, store_set_flags, store_clear_flags,
- store_file_open, store_device_open, store_null_create,
- store_std_classes, _store_add_std_class,
- store_allocate_child_encodings, store_encode_children,
- store_decode_children): New declarations
- (store_decode, store_create, store_device_create, _store_device_create,
- store_file_create, _store_file_create, store_ileave_create,
- store_concat_create, _make_store): Declarations updated.
- * make.c (_make_store): CLASS param removed, METHS param renamed
- CLASS; all callers changed. FLAGS param added.
- * stripe.c (store_ileave_create, store_concat_create): Likewise.
- * file.c (store_file_create, _store_file_create): Likewise.
- * device.c (store_device_create, _store_device_create): Likewise.
- * argp.c (open_machdev): Function removed.
- (parse_opt): Use store_device_open instead of open_machdev.
- (open_file, parse_opt): Add FLAGS arg to various function calls.
- * set.c (store_set_children): Function moved to kids.c.
- * null.c, flags.c, std.c, kids.c: New files.
- * Makefile (SRCS): Add null.c, flags.c, std.c, & kids.c.
-
-Sun May 12 10:12:24 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * argp.c (store_parse_opt): Put result in the passed-in params struct.
- Pass hook to open_{file,machdev}.
- (open_machdev): Use params to determine readonly-ness.
- (open_file): New function.
- * store.h (store_argp): New declaration.
- (struct store_argp_params): New type.
- * Makefile (SRCS): Add argp.c.
-
- * create.c (store_create): Steal SOURCE instead of cloning it.
-
-Sat May 11 01:17:39 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * argp.c: New file.
-
- * storeread.c (parse_opt): Use ARGP_ERR_UNKNOWN instead of EINVAL.
- * storecat.c (parse_opt): Likewise.
-
-Fri May 10 13:23:36 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * store.h (struct store_run): New type.
- (struct store): RUNS is a vector of runs, not offsets.
- (_store_device_create, _store_file_create, _make_store,
- store_set_runs, store_default_leaf_decode): Update declaration.
- * rdwr.c (store_find_first_run, store_next_run, store_write,
- store_read): Use store_run, not off_t, vectors; tweak accordingly.
- Rename variables called `RUNS' to `RUN', because although they're
- always vectors, they're used more often for their first element.
- * derive.c (_store_derive): Use store_run, not off_t, vectors; tweak
- accordingly.
- * device.c (store_device_create, _store_device_create): Likewise.
- * set.c (store_set_runs): Likewise.
- * storecat.c (main): Likewise.
- * storeread.c (main): Likewise.
- * make.c (_make_store): Likewise.
- * stripe.c (store_ileave_create, store_concat_create): Likewise.
- * file.c (store_file_create, _store_file_create): Likewise.
- * decode.c (store_default_leaf_decode): Convert the slice of the
- offset vector we're using into a vector of store_runs to pass to
- CREATE. Change type of CREATE accordingly.
- * encode.c (store_default_leaf_encode): Convert from the store_run
- vector to a off_t vector for encoding.
-
- * create.c (store_create): Use the real file_get_storage_info.
- (fgsi): Function removed.
-
- * store.h (struct store): Add CHILDREN & NUM_CHILDREN fields.
- Rename RUNS_LEN to NUM_RUNS (all uses changed).
- (store_set_children): New declaration.
- * make.c (_make_store): Initialize CHILDREN & NUM_CHILDREN.
- (store_free): Free all children too.
- * clone.c (store_clone): Clone children too.
- * set.c (store_set_children): New function.
- * stripe.c (store_ileave_create, store_concat_create): Use
- store_set_children.
- (stripe_clone): Function removed.
- (stripe_read, stripe_write): Get stripes from CHILDREN, not HOOK.
-
- * Makefile (storeread, storecat): Remove explicit dependency on
- program object file.
- Put include of ../Makeconf before dependencies.
-
-Mon May 6 15:20:53 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * store.h: Move big comment describing file_get_storage_info
- encoding to <hurd/hurd_types.h>.
diff --git a/libstore/Makefile b/libstore/Makefile
index f407ce61..56c1fdfd 100644
--- a/libstore/Makefile
+++ b/libstore/Makefile
@@ -28,6 +28,10 @@ SRCS = create.c derive.c make.c rdwr.c set.c \
open.c xinl.c typed.c map.c url.c unknown.c \
stripe.c $(filter-out ileave.c concat.c,$(store-types:=.c))
+# This has to be evaluated after config.make has been included;
+# as a consequence, using 'ifneq' or similar is not an option.
+maybe_part = $(and $(PARTED_LIBS),part)
+
store-types = \
bunzip2 \
concat \
@@ -40,11 +44,12 @@ store-types = \
module \
mvol \
nbd \
+ $(maybe_part) \
remap \
task \
zero
-libstore.so-LDLIBS += -ldl
+libstore.so-LDLIBS += $(PARTED_LIBS) -ldl
LCLHDRS=store.h
installhdrs=store.h
diff --git a/libstore/argp.c b/libstore/argp.c
index 9af7ae57..6ed79964 100644
--- a/libstore/argp.c
+++ b/libstore/argp.c
@@ -365,7 +365,7 @@ parse_opt (int opt, char *arg, struct argp_state *state)
break;
case ARGP_KEY_ERROR:
- /* Parsing error occured, free everything. */
+ /* Parsing error occurred, free everything. */
store_parsed_free (parsed); break;
case ARGP_KEY_SUCCESS:
diff --git a/libstore/kids.c b/libstore/kids.c
index f254bcd3..901a7f85 100644
--- a/libstore/kids.c
+++ b/libstore/kids.c
@@ -103,7 +103,7 @@ store_decode_children (struct store_enc *enc, int num_children,
return err;
}
-/* Set FLAGS in all children of STORE, and if successfull, add FLAGS to
+/* Set FLAGS in all children of STORE, and if successful, add FLAGS to
STORE's flags. */
error_t
store_set_child_flags (struct store *store, int flags)
@@ -127,7 +127,7 @@ store_set_child_flags (struct store *store, int flags)
return err;
}
-/* Clear FLAGS in all children of STORE, and if successfull, remove FLAGS from
+/* Clear FLAGS in all children of STORE, and if successful, remove FLAGS from
STORE's flags. */
error_t
store_clear_child_flags (struct store *store, int flags)
diff --git a/libstore/nbd.c b/libstore/nbd.c
index 8bd00c4d..3138af01 100644
--- a/libstore/nbd.c
+++ b/libstore/nbd.c
@@ -1,5 +1,5 @@
/* "Network Block Device" store backend compatible with Linux `nbd' driver
- Copyright (C) 2001, 2002 Free Software Foundation, Inc.
+ Copyright (C) 2001, 2002, 2008 Free Software Foundation, Inc.
This file is part of the GNU Hurd.
@@ -199,7 +199,7 @@ nbd_read (struct store *store,
/* Read the first piece, which can go directly into the caller's buffer. */
databuf = *buf;
- databuflen = *len;
+ piecelen = databuflen = *len;
err = request_chunk (&databuf, &piecelen);
if (err)
return err;
diff --git a/libstore/part.c b/libstore/part.c
index a1ddc5c0..439340be 100644
--- a/libstore/part.c
+++ b/libstore/part.c
@@ -25,11 +25,14 @@
#include <cthreads.h>
#include <parted/parted.h>
-#include <parted/device_gnu.h>
+/*#include <parted/device_gnu.h>*/
#include <string.h>
#include <error.h>
#define NEED_PARTED_VERSION "1.5.4"
+#ifndef PED_SECTOR_SIZE
+#define PED_SECTOR_SIZE PED_SECTOR_SIZE_DEFAULT
+#endif
/* Return a new store in STORE which contains a remap store of partition
PART from the contents of SOURCE; SOURCE is consumed. */
@@ -141,7 +144,7 @@ store_part_create (struct store *source, int index, int flags,
out_with_disk:
assert (ped_device_close (dev) != 0);
- assert (ped_disk_destroy (disk));
+ ped_disk_destroy (disk);
out_with_dev:
ped_device_destroy (dev);
out:
diff --git a/libstore/store.h b/libstore/store.h
index 5b48504c..fd250448 100644
--- a/libstore/store.h
+++ b/libstore/store.h
@@ -262,11 +262,11 @@ error_t store_set_flags (struct store *store, int flags);
/* Remove FLAGS from STORE's currently set flags. */
error_t store_clear_flags (struct store *store, int flags);
-/* Set FLAGS in all children of STORE, and if successfull, add FLAGS to
+/* Set FLAGS in all children of STORE, and if successful, add FLAGS to
STORE's flags. */
error_t store_set_child_flags (struct store *store, int flags);
-/* Clear FLAGS in all children of STORE, and if successfull, remove FLAGS from
+/* Clear FLAGS in all children of STORE, and if successful, remove FLAGS from
STORE's flags. */
error_t store_clear_child_flags (struct store *store, int flags);
diff --git a/libthreads/ChangeLog b/libthreads/ChangeLog
deleted file mode 100644
index 0155c06e..00000000
--- a/libthreads/ChangeLog
+++ /dev/null
@@ -1,501 +0,0 @@
-2007-06-13 Samuel Thibault <samuel.thibault@ens-lyon.org>
-
- TLS support for libthreads.
-
- * libthreads/cprocs.c (cproc_create): Call into glibc to allocate
- static TLS block.
- * libthreads/cthread_internals.h (tcbhead_t): New structure; as in
- glibc.
- (cproc_setup): Take TCB parameter.
- (_dl_allocate_tls): Declare; from glibc.
- * libthreads/alpha/thread.c (cproc_setup): Compile-time warning for
- missing TLS support.
- * libthreads/i386/thread.c (cproc_setup): Imlement TLS support.
-
-2002-08-26 Roland McGrath <roland@frob.com>
-
- * cthreads.c (cthread_body) [HAVE_USELOCALE]: Call uselocale to
- initialize the thread to the global locale.
-
-2002-07-29 Marcus Brinkmann <marcus@gnu.org>
-
- * stack.c (stack_init): Put back in setting of the
- __hurd_threadvar_stack_mask and __hurd_threadvar_stack_offset
- variables (which got lost in the merge).
-
- * cthreads.c (cthread_init): Move cthread_alloc call before
- cproc_init call (lost in merge).
-
-2002-05-28 Roland McGrath <roland@frob.com>
-
- * cthreads.h: Do not define WAIT_DEBUG to affect inlines.
- * options.h: Not here either.
-
- * cprocs.c (cproc_block): Can't be static, called from cancel-cond.c.
-
- * cthreads.h (hurd_condition_wait, condition_implies,
- condition_unimplies): Restore decls lost in merge.
- (mutex_clear): Define as mutex_init instead of bogon (lost in merge).
-
- * cthreads.c (cthread_fork_prepare, cthread_fork_parent,
- cthread_fork_child): Don't call malloc_fork_* (lost in merge).
-
- * lockfile.c: Use __attribute__ magic instead of #pragma magic
- for alias definitions. Don't bother to make them weak.
-
-2002-05-26 Roland McGrath <roland@frob.com>
-
- Changes merged from CMU MK83a version:
- * cthreads.h, options.h: Various cleanups.
- * call.c, cthread_data.c, sync.c, mig_support.c, stack.c: Likewise.
- * i386/cthreads.h, i386/thread.c, i386/lock.s: Likewise.
- * cthread_internals.h: Add decls for internal functions.
- (struct cproc): Use vm_offset_t for stack_base and stack_size members.
- Use natural_t for context member.
- * cprocs.c: Use prototypes for all defns.
- * cthreads.c: Likewise.
- (cthread_exit): Cast any_t to integer_t before int.
-
- * alpha/thread.c: #if 0 out the silly bzero decl.
-
- * alpha/cthreads.h, alpha/thread.c, alpha/csw.S, alpha/lock.S:
- New files, verbatim from CMU release MK83a user/threads/alpha.
-
-2002-05-08 Roland McGrath <roland@frob.com>
-
- * cthreads.c (cthread_exit): Cast any_t to long before int.
-
- * cthread_internals.h: int -> void * for `busy' member.
- * cprocs.c (cthread_mach_msg): Don't cast to int when setting it.
- * cprocs.c (cthread_mag_active): Likewise.
-
-2002-05-07 Roland McGrath <roland@frob.com>
-
- * cprocs.c (cproc_list_lock): Declare type as spin_lock_t.
-
- * cthreads.h (cthread_sp): Cast to vm_address_t instead of int.
- (mutex_unlock): Cast to void * instead of int.
-
-2002-03-24 Roland McGrath <roland@frob.com>
-
- * libthreads.map: Use GLIBC_2.2.6 set instead of GLIBC_2.2.
-
-2001-12-22 Roland McGrath <roland@frob.com>
-
- * i386/thread.c (cthread_sp): Use __thread_stack_pointer.
-
-2001-08-23 Roland McGrath <roland@frob.com>
-
- * lockfile.c: Rewritten to use macros now defined by libc.
-
-2001-03-31 Roland McGrath <roland@frob.com>
-
- * cthreads.h: Fix obsolescent #endif syntax.
- * cthread_internals.h: Likewise.
- * cancel-cond.c: Likewise.
- * stack.c: Likewise.
- * cthreads.c: Likewise.
- * cprocs.c: Likewise.
- * call.c: Likewise.
- * i386/thread.c: Likewise.
- * cthread_data.c: Likewise.
-
-2001-02-25 Roland McGrath <roland@frob.com>
-
- * i386/thread.c: Remove superfluous bzero decl,
- just include <strings.h> instead.
-
-2000-05-25 Mark Kettenis <kettenis@gnu.org>
-
- * libthreads.map: Update comment to reflect Roland's 2000-03-30
- change, and my change to the toplevel configure.in that disables
- versioning for the old stdio-using libc.
-
-2000-03-30 Roland McGrath <roland@baalperazim.frob.com>
-
- * libthreads.map: Define HURD_CTHREADS_0.3 version set,
- putting all symbols there except the lockfile symbols.
- * lockfile.c: Nit fixes.
-
-2000-03-27 Roland McGrath <roland@baalperazim.frob.com>
-
- Locking support for stdio streams with glibc-2.2 libio. EXPERIMENTAL!
- * lockfile.c: New file.
- * libthreads.map: New file.
- * Makefile (SRCS): Add lockfile.c.
- [$(VERSIONING) = yes] ($(libname).so.$(hurd-version)): Depend
- on $(srcdir)/$(libname).map to get version script into the link.
-
-2000-02-28 Roland McGrath <roland@baalperazim.frob.com>
-
- * i386/csw.S: #undef __ELF__ before defining it, since
- it is usually predefined.
-
-2000-01-10 Mark Kettenis <kettenis@gnu.org>
-
- * cprocs.c: Include <assert.h>
-
-2000-01-09 Roland McGrath <roland@baalperazim.frob.com>
-
- * cprocs.c (cproc_alloc): Initialize P->wired and P->msg here (code
- from cthread_wire).
- (cthread_wire): Reduce to just an assert, cthreads always wired.
- (chtread_unwire): Abort if called.
-
-1999-06-13 Roland McGrath <roland@baalperazim.frob.com>
-
- * cthreads.h (MACRO_BEGIN, MACRO_END): #undef before unconditionally
- redefining. Use GCC extension for statement expression with value 0.
-
-1999-05-29 Roland McGrath <roland@baalperazim.frob.com>
-
- * cthreads.h (mutex_clear): Change again, to call mutex_init.
-
- * cthreads.h (mutex_clear): Change from syntax error to no-op (with
- warning avoidance).
-
-1998-11-12 Mark Kettenis <kettenis@phys.uva.nl>
-
- * cthreads.c (cthread_init): Move cthread_alloc call before
- cproc_init call, since cthread_alloc uses malloc, and malloc won't
- work between initializing the new stack and switching over to it.
-
-1998-07-20 Roland McGrath <roland@baalperazim.frob.com>
-
- * i386/csw.S (cproc_prepare): Take address of cthread_body as third
- arg, so we don't have to deal with PIC magic to find its address
- without producing a text reloc.
- * cprocs.c (cproc_create): Pass &cthread_body to cproc_prepare.
-
-Tue Jun 9 13:50:09 1998 Thomas Bushnell, n/BSG <tb@mit.edu>
-
- * cthreads.c (cthread_fork_prepare): Don't call
- malloc_fork_prepare since we are no longer providing our own
- malloc in this library.
- (cthread_fork_parent): Likewise, for malloc_fork_parent.
- (cthread_fork_child): Likewise, for malloc_fork_child.
-
-Wed Aug 20 15:39:44 1997 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * cthreads.c (cthread_body): Wire self before calling user work
- function. This way all cthreads will be wired, which the ports
- library (and hurd_thread_cancel, etc.) depend on.
-
-Fri Aug 8 13:21:17 1997 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * Makefile (SRCS): Delete malloc.c; libc now has a thread safe
- malloc.
- (malloc.c): Delete file.
-
-Mon Jun 9 21:18:46 1997 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * cthreads.c (cthread_fork): Delete debugging oddity that crept
- into source.
-
-Thu Apr 3 20:29:27 1997 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * i386/csw.S: Define __ELF__ too.
-
-Wed Feb 19 23:29:55 1997 Miles Bader <miles@gnu.ai.mit.edu>
-
- * stack.c (__hurd_threadvar_stack_mask,
- __hurd_threadvar_stack_offset, __hurd_threadvar_max): Make extern.
-
-Tue Feb 18 16:28:36 1997 Miles Bader <miles@gnu.ai.mit.edu>
-
- * i386/thread.c (cproc_setup): Correctly leave space at top of
- stack for GNU per-thread variables.
-
-Mon Nov 18 16:36:56 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * cprocs.c (cproc_create): Cast CHILD in assignment.
-
-Mon Oct 21 22:05:48 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * i386/csw.S (CALL_MCOUNT): New macro.
- (cproc_swtich, cproc_start_wait, cproc_prepare): Use CALL_MCOUNT.
-
- * rwlock.h: Change extern inline protection to use new canonical
- method.
- * rwlock.c: Rewritten.
-
-Wed Sep 4 09:06:09 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * Makefile (VPATH): Look in $(asm_syntax) instead of old
- $(machine); Hurd configure now folds equivalent CPU types into
- asm_syntax.
-
-Thu Aug 29 12:50:37 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * i386/csw.S: Include <mach/i386/asm.h> instead of <i386/asm.h>.
- Define ELF before inclusion.
-
-Sat Jul 20 15:47:24 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * Makefile (lndist-i386-files): Look for I386SRCS and I386HDRS in
- $(srcdir).
-
-Thu Jun 6 07:29:31 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * malloc.c (more_memory): Use assert_perror instead of MACH_CALL.
- "cthread_internals.h": Include removed.
-
-Thu May 9 11:13:42 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * Makefile (installhdrs, installhdrsubdir): Install headers using
- the generic technique, now that installhdrsubdir is available.
-
- * rwlock.h: If _RWLOCK_DEFINE_FUNCTIONS is defined, then clear
- _EXTERN_INLINE, but *after* header files have been included.
- * rwlock.c (_RWLOCK_DEFINE_FUNCTIONS): New macro; use in place of
- clearing _EXTERN_INLINE, which conflicts with machine-sp.h.
-
-Sat May 4 05:33:57 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
-
- * cthreads.h [lint] (NEVER): Spurious global variable removed.
- [!lint] (NEVER): Useless macro removed.
-
- * Makefile (SRCS): Add rwlock.c.
- (LCLHDRS): Add rwlock.h.
- (install): Depend on $(includedir)/rwlock.h.
- ($(includedir)/%.h: %.h): New rule.
- ($(includedir)/cthreads.h): Target removed, obviated by that rule.
- * rwlock.h: Moved to libthreads from libshouldbeinlibc.
- (_EXTERN_INLINE): New macro.
- Use it for all the inline defns.
- * rwlock.c: New file.
-
-Thu Apr 11 17:55:24 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * Makefile (CFLAGS): Turn off -Wall.
-
- * Makefile (VPATH): Fix up for new configure reality.
-
-Thu Mar 7 15:52:38 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * malloc.c (realloc): Use LOG2_MIN_SIZE.
- (LOG2_MIN_SIZE): New macro.
-
- * malloc.c (realloc): Don't bother allocating a new block if the
- new size request fits in the old one and doesn't waste any space.
- Only free the old block if we successfully got a new one.
-
-Wed Mar 6 18:05:57 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * malloc.c [MCHECK] (struct header): New type.
- (union header): Only define if !MCHECK.
- (HEADER_SIZE, HEADER_NEXT, HEADER_FREE, HEADER_CHECK): New macros.
- [MCHECK] (MIN_SIZE): Add correct definition for this case.
- (more_memory, malloc, free, realloc): Use above macros, and add
- appropiate checks & frobs in MCHECK case.
-
-Wed Jan 31 20:05:57 1996 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * cancel-cond.c: Add assert to check for signal bug.
-
-Wed Jan 24 13:38:11 1996 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * cthreads.h: Use prototypes for functions of zero args.
-
-Sun Dec 10 08:41:36 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * stack.c (addr_range_check, probe_stack): Functions #if 0'd out.
- (stack_init): Don't call probe_stack or frob old stack at all.
- Default cthread_stack_size to 16 pages if it is zero.
-
-Wed Dec 6 14:48:37 1995 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * cprocs.c (condition_unimplies): Take address of (*impp)->next in
- assignment to IMPP on loop step instruction.
-
-Wed Oct 4 16:22:27 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * i386/csw.S (JUMPTARGET): New macro, versions for [PIC] and not.
- Use it in place of EXT.
- * Makefile (csw_pic.o): Bogus braindead target from hell removed.
- Bushnell will be shot.
-
-Fri Sep 22 13:51:22 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * cprocs.c: Include hurd/threadvar.h.
-
-Sat Sep 16 13:42:02 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * Makefile (CPPFLAGS): Variable removed.
- (lndist-i386-files): Use $(top_srcdir) in place of $(srcdir).
-
-Wed Sep 13 15:49:17 1995 Michael I. Bushnell, p/BSG <mib@duality.gnu.ai.mit.edu>
-
- * cthreads.h (CONDITION_INITIALIZER): Provide initial zero for
- IMPLICATIONS member.
- (condition_init): Bother initializing NAME and IMPLICATIONS members.
-
-Wed Aug 30 11:10:27 1995 Michael I. Bushnell, p/BSG <mib@duality.gnu.ai.mit.edu>
-
- * cthreads.h (condition_implies, condition_unimplies): New
- functions.
- (struct condition): New member `implications'.
- (cond_imp): New structure.
- (cond_signal): Return int now.
- (condition_broadcast): Always call cond_broadcast if this
- condition has implications.
- (condition_signal): Always call cond_signal if this condition has
- implications.
- * cprocs.c (cond_signal): If this condition has implications,
- see if one of them needs to be signalled when we have no waiters.
- (cond_broadcast): Signal the implications list too.
- (condition_implies, condition_unimplies): New functions.
-
- * cthreads.h (hurd_condition_wait): Provide declaration.
-
-Tue Aug 29 10:48:59 1995 Michael I. Bushnell, p/BSG <mib@duality.gnu.ai.mit.edu>
-
- * cthread_internals.h (cproc_block): Provide decl.
-
-Sat Aug 26 14:08:15 1995 Miles Bader <miles@churchy.gnu.ai.mit.edu>
-
- * cancel-cond.c (hurd_condition_wait_cancel): Name changed to
- `hurd_condition_wait'.
-
-Tue Aug 22 19:26:38 1995 Miles Bader <miles@churchy.gnu.ai.mit.edu>
-
- * Makefile (SRCS): Add a backslash.
-
-Mon Aug 21 12:52:38 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * Makefile (SRCS): Add cancel-cond.c.
- * cancel-cond.c: New file.
-
-Thu Jul 6 13:39:25 1995 Michael I Bushnell <mib@duality.gnu.ai.mit.edu>
-
- * Makefile (install): Don't *always* install cthreads.h; do it
- only if it's new.
-
- * Makefile: Removed dependencies that are now automatically
- generated.
-
- * Makefile (csw_pic.o): Provide slightly cheating rule.
-
-Fri May 12 14:25:35 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * i386/csw.S: Use EXT macro instead of explicit underscores.
- * i386/asm.h: File removed; it is installed by libc.
- * Makefile (I386HDRS): Variable removed.
- ($(OBJS)): Don't depend on i386/asm.h.
-
- * Makefile (CPPFLAGS): Use $(srcdir) instead of $(hurdsource).
-
-Wed Apr 12 14:33:06 1995 Michael I Bushnell <mib@duality.gnu.ai.mit.edu>
-
- * Makefile (lndist, lndist-i386-files): Change $(hurdsource) to
- $(srcdir).
- ($(hurdsource)/hurd-snap/$(dir)/i386): Likewise.
-
-Tue Apr 4 17:04:45 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * Makefile (CPPFLAGS): Define.
- ($(OBJS) rule): Fix typo in target.
- (install-cthreads.h): Use $(INSTALL_DATA).
-
- * cthreads.h (mutex_lock, mutex_unlock): Use __ names for *_solid.
- * cprocs.c (mutex_lock_solid, mutex_unlock_solid): Renamed to __*.
- (_cthread_mutex_lock_routine, _cthread_mutex_unlock_routine): Variables
- removed.
-
-Fri Jul 22 10:47:51 1994 Michael I Bushnell <mib@geech.gnu.ai.mit.edu>
-
- * Makefile: Rewritten in accord with new scheme.
-
-Tue Jul 19 12:22:01 1994 Michael I Bushnell (mib@churchy.gnu.ai.mit.edu)
-
- * Makefile (generic-sources): Restored malloc.c.
- (malloc-sources, malloc-objects): Deleted variables.
- (DIST_FILES): Deleted $(malloc-sources)
- (all): Deleted libmalloc.a.
- (libmalloc.a): Delted target.
- ($(hurdinst)/lib/libmalloc.a): Deleted target.
- (install): Deleted $(hurdinst)/lib/libmalloc.a.
- (clean): Deleted libmalloc.a.
-
-Tue Jul 5 14:17:28 1994 Michael I Bushnell (mib@churchy.gnu.ai.mit.edu)
-
- * Makefile (SRCS, TAGSHDRS): New variables.
- (TAGS): Deleted local definition; now it's in Makeconf.
-
-Thu May 19 00:54:54 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
-
- * cprocs.c (_cthread_mutex_lock_routine,
- _cthread_mutex_unlock_routine): New variables.
-
-Thu May 5 19:33:49 1994 Michael I Bushnell (mib@geech.gnu.ai.mit.edu)
-
- * Makefile: (generic-sources): Removed malloc.c.
- (malloc-sources, malloc-objects): new variables.
- (DIST_FILES): added $(malloc-sources).
- (libmalloc.a, $(hurdinst)/lib/libmalloc.a): New targets.
- ($(hurdinst)/lib/malloc.o): Deleted target.
- (all): added libmalloc.a.
- (install): Changed $(hurdinst)/lib/malloc.o to
- $(hurdinst)/lib/libmalloc.a
- (clean): Added libmaloc.a.
-
-Thu May 5 04:30:34 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
-
- * cthreads.c (cthread_init): Pass STACK instead of P to mig_init.
-
- * cprocs.c (cproc_create): Pass normal offset value to
- cproc_stack_base. Explicitly store CHILD ptr at base of its stack.
-
- * stack.c (stack_init): Set __hurd_threadvar_stack_mask to find
- the lowest address of the stack segment.
- [STACK_GROWTH_UP]: Set __hurd_threadvar_stack_offset to
- sizeof(ur_cthread_t*).
- [! STACK_GROWTH_UP]: Set __hurd_threadvar_stack_offset to the size
- of the stack minus space for the cproc_self ptr and thread variables.
-
- * malloc.c (malloc, free, realloc): Change declarations to
- standard types, so as not to conflict with the declarations in
- <stdlib.h>.
-
- * cthread_internals.h: #if 0 out declaration of malloc.
- (struct cproc): #if 0 out `reply_port' member; libc implements that.
- * cprocs.c (cproc_alloc): #if 0 out initialization of P->reply_port.
-
- * Makefile (generic-sources): Omit sync.c. libc implements that.
-
- * cprocs.c (cproc_block): Add __hurd_threadvar_max * sizeof (long
- int) to 2nd arg to cproc_stack_base.
-
- * stack.c: Include <hurd/threadvar.h>.
- (__hurd_threadvar_stack_mask, __hurd_threadvar_stack_offset,
- __hurd_threadvar_max): Define variables (uninitialized).
- (stack_init): Set __hurd_threadvar_stack_mask to cthread_stack_mask.
- Set __hurd_threadvar_stack_offset to point past the cproc_self ptr.
- Add __hurd_threadvar_max * sizeof (long int) to 2nd arg to
- cproc_stack_base.
-
- * cthreads.h: #if 0 include of <machine/cthreads.h>.
- Instead, include <machine-sp.h>.
- (cthread_sp): Define using __thread_stack_pointer.
- #if 0 out spin_lock definitions. Just include <spin-lock.h> instead.
- (struct mutex): Move `held' member to be first in the structure.
-
-Wed May 4 14:55:15 1994 Michael I Bushnell (mib@churchy.gnu.ai.mit.edu)
-
- * i386/thread.c: Changed inclusions because we aren't using
- -I flags the way CMU's makefiles do.
-
- * i386/csw.S: Convert comment character to /* */ pairs.
-
- * Renamed csw.s to csw.S so that GCC knows to run cpp on it.
- * Makefile (machine-sources): Change csw.s to csw.S.
-
-Wed May 4 07:11:46 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
-
- * Makefile (GEN_SRCS): Renamed generic-sources.
- (I386_SRCS): Replaced with machine-sources, omitting directory.
- (SRCS): Renamed sources. Include $(machine-sources) and prepend
- $(machine)/ directory name.
- (headers): Define variable.
- (OBJS): Renamed objects.
- (VPATH): Define to $(machine).
diff --git a/libthreads/Makefile b/libthreads/Makefile
index ee862366..e9fa571b 100644
--- a/libthreads/Makefile
+++ b/libthreads/Makefile
@@ -1,5 +1,5 @@
#
-# Copyright (C) 1994,95,96,97,2000 Free Software Foundation, Inc.
+# Copyright (C) 1994,95,96,97,2000,2010 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
@@ -57,4 +57,9 @@ ifeq ($(VERSIONING),yes)
# where ld will read it as a linker script.
$(libname).so.$(hurd-version): $(srcdir)/$(libname).map
+lndist: lndist-map-file
+
+lndist-map-file: $(top_srcdir)/hurd-snap/$(dir)
+ ln $(addprefix $(srcdir)/,$(libname).map) $<
+
endif
diff --git a/libthreads/cthread_internals.h b/libthreads/cthread_internals.h
index 84264004..81e3b91c 100644
--- a/libthreads/cthread_internals.h
+++ b/libthreads/cthread_internals.h
@@ -28,7 +28,21 @@
* 26-Oct-94 Johannes Helander (jvh) Helsinki University of Technology
* Defined WAIT_DEBUG and initialized wait_enum
*
- * $Log: cthread_internals.h,v $
+ * $Log: cthread_internals.h,v $
+ * Revision 1.6 2002/05/27 02:50:10 roland
+ * 2002-05-26 Roland McGrath <roland@frob.com>
+ *
+ * Changes merged from CMU MK83a version:
+ * * cthreads.h, options.h: Various cleanups.
+ * * call.c, cthread_data.c, sync.c, mig_support.c: Likewise.
+ * * i386/cthreads.h, i386/thread.c, i386/lock.s: Likewise.
+ * * cthread_internals.h: Add decls for internal functions.
+ * (struct cproc): Use vm_offset_t for stack_base and stack_size members.
+ * Use natural_t for context member.
+ * * cprocs.c: Use prototypes for all defns.
+ * * cthreads.c: Likewise.
+ * (cthread_exit): Cast any_t to integer_t before int.
+ *
* Revision 2.17 93/05/10 21:33:36 rvb
* Context is a natural_t. Assumming, that is, that on
* some future architecture one word might be enough.
@@ -268,6 +282,8 @@ extern vm_offset_t cproc_init(void);
extern void cproc_waiting(cproc_t _waiter);
+extern void cproc_block(void);
+
extern cproc_t cproc_create(void);
extern void cproc_fork_prepare(void);
diff --git a/libthreads/cthreads.h b/libthreads/cthreads.h
index d3b6c290..d937dcca 100644
--- a/libthreads/cthreads.h
+++ b/libthreads/cthreads.h
@@ -269,6 +269,11 @@ typedef void *any_t; /* XXX - obsolete, should be deleted. */
#define FALSE 0
#endif
+/* Enable mutex holder debugging */
+/* #define WAIT_DEBUG */
+/* Record function name instead of thread pointer */
+/* #define WAIT_FUNC_DEBUG */
+
/*
* C Threads package initialization.
*/
@@ -377,9 +382,26 @@ typedef struct mutex {
const char *name;
struct cthread_queue queue;
/* holder is for WAIT_DEBUG. Not ifdeffed to keep size constant. */
+#ifdef WAIT_FUNC_DEBUG
+ const char *fname;
+#else /* WAIT_FUNC_DEBUG */
struct cthread *holder;
+#endif /* WAIT_FUNC_DEBUG */
} *mutex_t;
+#ifdef WAIT_DEBUG
+#ifdef WAIT_FUNC_DEBUG
+#define WAIT_CLEAR_DEBUG(m) (m)->fname = 0
+#define WAIT_SET_DEBUG(m) (m)->fname = __FUNCTION__
+#else /* WAIT_FUNC_DEBUG */
+#define WAIT_CLEAR_DEBUG(m) (m)->holder = 0
+#define WAIT_SET_DEBUG(m) (m)->holder = cthread_self()
+#endif /* WAIT_FUNC_DEBUG */
+#else /* WAIT_DEBUG */
+#define WAIT_CLEAR_DEBUG(m) (void) 0
+#define WAIT_SET_DEBUG(m) (void) 0
+#endif /* WAIT_DEBUG */
+
/* Rearranged accordingly for GNU: */
#define MUTEX_INITIALIZER { SPIN_LOCK_INITIALIZER, SPIN_LOCK_INITIALIZER, 0, QUEUE_INITIALIZER, }
#define MUTEX_NAMED_INITIALIZER(Name) { SPIN_LOCK_INITIALIZER, SPIN_LOCK_INITIALIZER, Name, QUEUE_INITIALIZER, }
@@ -390,36 +412,20 @@ typedef struct mutex {
spin_lock_init(&(m)->lock); \
cthread_queue_init(&(m)->queue); \
spin_lock_init(&(m)->held); \
- (m)->holder = 0; \
+ WAIT_CLEAR_DEBUG(m); \
MACRO_END
#define mutex_set_name(m, x) ((m)->name = (x))
#define mutex_name(m) ((m)->name != 0 ? (m)->name : "?")
#define mutex_clear(m) mutex_init(m)
#define mutex_free(m) free((m))
-#define mutex_try_lock(m) spin_try_lock(&(m)->held)
-#if defined(WAIT_DEBUG)
-#define mutex_lock(m) \
- MACRO_BEGIN \
- if (!spin_try_lock(&(m)->held)) { \
- __mutex_lock_solid(m); \
- } \
- (m)->holder = cthread_self(); \
- MACRO_END
-#define mutex_unlock(m) \
- MACRO_BEGIN \
- if (spin_unlock(&(m)->held), \
- cthread_queue_head(&(m)->queue, vm_offset_t) != 0) { \
- __mutex_unlock_solid(m); \
- } \
- (m)->holder = 0; \
- MACRO_END
-#else /* defined(WAIT_DEBUG */
+#define mutex_try_lock(m) (spin_try_lock(&(m)->held) ? WAIT_SET_DEBUG(m), 1 : 0)
#define mutex_lock(m) \
MACRO_BEGIN \
if (!spin_try_lock(&(m)->held)) { \
__mutex_lock_solid(m); \
} \
+ WAIT_SET_DEBUG(m); \
MACRO_END
#define mutex_unlock(m) \
MACRO_BEGIN \
@@ -427,8 +433,8 @@ typedef struct mutex {
cthread_queue_head(&(m)->queue, vm_offset_t) != 0) { \
__mutex_unlock_solid(m); \
} \
+ WAIT_CLEAR_DEBUG(m); \
MACRO_END
-#endif /* defined(WAIT_DEBUG) */
/*
* Condition variables.
*/
diff --git a/libthreads/i386/cthreads.h b/libthreads/i386/cthreads.h
index d7202df6..694387b6 100644
--- a/libthreads/i386/cthreads.h
+++ b/libthreads/i386/cthreads.h
@@ -26,6 +26,13 @@
/*
* HISTORY
* $Log: cthreads.h,v $
+ * Revision 1.3 2007/03/03 23:57:37 sthibaul
+ * 2006-03-04 Samuel Thibault <samuel.thibault@ens-lyon.org>
+ *
+ * * libpthread/sysdeps/i386/machine-sp.h (thread_stack_pointer):
+ * Optimize esp read.
+ * * libpthread/i386/cthreads.h (cthread_sp): Likewise.
+ *
* Revision 1.2 2002/05/27 02:50:10 roland
* 2002-05-26 Roland McGrath <roland@frob.com>
*
@@ -91,14 +98,14 @@ typedef volatile int spin_lock_t;
({ register int _u__ ; \
__asm__ volatile("xorl %0, %0; \n\
xchgl %0, %1" \
- : "=&r" (_u__), "=m" (*(p)) ); \
+ : "=&r" (_u__), "=m" (*(p)) :: "memory" ); \
0; })
#define spin_try_lock(p)\
(!({ boolean_t _r__; \
__asm__ volatile("movl $1, %0; \n\
xchgl %0, %1" \
- : "=&r" (_r__), "=m" (*(p)) ); \
+ : "=&r" (_r__), "=m" (*(p)) :: "memory" ); \
_r__; }))
#define cthread_sp() \
diff --git a/libthreads/mig_support.c b/libthreads/mig_support.c
index 01e5deb0..cd0d4124 100644
--- a/libthreads/mig_support.c
+++ b/libthreads/mig_support.c
@@ -53,7 +53,7 @@
* Revision 2.3 90/08/07 14:27:48 rpd
* When we recycle the global reply port by giving it to the first
* cthread, clear the global reply port. This will take care of
- * someone accidently calling this twice.
+ * someone accidentally calling this twice.
* [90/08/07 rwd]
*
* Revision 2.2 90/06/02 15:14:04 rpd
diff --git a/libtrivfs/ChangeLog b/libtrivfs/ChangeLog
deleted file mode 100644
index d363943c..00000000
--- a/libtrivfs/ChangeLog
+++ /dev/null
@@ -1,1037 +0,0 @@
-2003-10-11 Marcus Brinkmann <marcus@gnu.org>
-
- * nosenders.c, notify-stubs.c: Remove obsolete files.
-
-2003-02-15 Roland McGrath <roland@frob.com>
-
- * Makefile (installhdrs): Add generated headers only ifndef no_deps.
-
-2002-06-13 Roland McGrath <roland@frob.com>
-
- * dir-chg.c: Don't include stub header, trivfs.h now gets those decls.
- * dir-link.c: Likewise.
- * dir-lookup.c: Likewise.
- * dir-mkdir.c: Likewise.
- * dir-mkfile.c: Likewise.
- * dir-readdir.c: Likewise.
- * dir-rename.c: Likewise.
- * dir-rmdir.c: Likewise.
- * dir-unlink.c: Likewise.
- * file-access.c: Likewise.
- * file-chauthor.c: Likewise.
- * file-chflags.c: Likewise.
- * file-chg.c: Likewise.
- * file-chmod.c: Likewise.
- * file-chown.c: Likewise.
- * file-get-fs-options.c: Likewise.
- * file-get-storage-info.c: Likewise.
- * file-get-trans.c: Likewise.
- * file-get-transcntl.c: Likewise.
- * file-getcontrol.c: Likewise.
- * file-getfh.c: Likewise.
- * file-getlinknode.c: Likewise.
- * file-lock.c: Likewise.
- * file-reparent.c: Likewise.
- * file-set-size.c: Likewise.
- * file-set-trans.c: Likewise.
- * file-statfs.c: Likewise.
- * file-sync.c: Likewise.
- * file-syncfs.c: Likewise.
- * file-utimes.c: Likewise.
- * fsys-forward.c: Likewise.
- * fsys-get-options.c: Likewise.
- * fsys-getroot.c: Likewise.
- * fsys-goaway.c: Likewise.
- * fsys-set-options.c: Likewise.
- * fsys-stubs.c: Likewise.
- * fsys-syncfs.c: Likewise.
- * io-async-icky.c: Likewise.
- * io-async.c: Likewise.
- * io-duplicate.c: Likewise.
- * io-identity.c: Likewise.
- * io-map.c: Likewise.
- * io-modes-get.c: Likewise.
- * io-modes-off.c: Likewise.
- * io-modes-on.c: Likewise.
- * io-owner-get.c: Likewise.
- * io-owner-mod.c: Likewise.
- * io-pathconf.c: Likewise.
- * io-read.c: Likewise.
- * io-readable.c: Likewise.
- * io-reauthenticate.c: Likewise.
- * io-restrict-auth.c: Likewise.
- * io-revoke.c: Likewise.
- * io-seek.c: Likewise.
- * io-select.c: Likewise.
- * io-stat.c: Likewise.
- * io-stubs.c: Likewise.
- * io-write.c: Likewise.
-
- * Makefile (mig-sheader-prefix): New variable.
- (installhdrs): Add trivfs_*_S.h for fs, io, fsys (server stub headers).
- ($(MIGSTUBS:%Server.o=%.sdefsi)): Give dep $(srcdir)/fsmutations.h.
- * priv.h: All declarations moved to ...
- * trivfs.h: ... here. #include those server stub headers.
- * fsmutations.h (FILE_IMPORTS, IO_IMPORTS, FSYS_IMPORTS):
- Use <hurd/trivfs.h> instead of "priv.h" here.
-
- * io-version.c (trivfs_S_io_server_version): Fix receiver arg type.
-
- * file-exec.c (trivfs_S_file_exec): Add reply port args.
-
- * dir-readdir.c (trivfs_S_dir_readdir): Revert last change.
-
-2002-06-08 Roland McGrath <roland@frob.com>
-
- * io-identity.c (trivfs_S_io_identity): Use ino_t for FILENO.
-
- * dir-readdir.c (trivfs_S_dir_readdir): Use vm_size_t for AMOUNT.
-
-2002-06-07 Roland McGrath <roland@frob.com>
-
- * trivfs.h (trivfs_modify_stat):
- Use io_statbuf_t instead of struct stat.
-
-2002-05-28 Roland McGrath <roland@frob.com>
-
- * dir-readdir.c (trivfs_S_dir_readdir): u_int -> size_t
- * file-get-trans.c (trivfs_S_file_get_translator): Likewise.
- * file-set-trans.c (trivfs_S_file_set_translator): Likewise.
- * file-getfh.c (trivfs_S_file_getfh): Likewise.
- * fsys-getroot.c (trivfs_S_fsys_getroot): Likewise.
- * io-restrict-auth.c (trivfs_S_io_restrict_auth): Likewise
- * fsys-stubs.c (trivfs_S_fsys_getfile): Likewise.
- (trivfs_S_fsys_startup): Fix argument type.
-
-2001-04-01 Neal H Walfield <neal@cs.uml.edu>
-
- * dir-lookup.c (trivfs_S_dir_lookup): Use iohelp_dup_iouser as
- per the new semantics.
- * fsys-getroot.c (trivfs_S_fsys_getroot): Use
- iohelp_create_complex_iouser.
- * io-reauthenticate.c (trivfs_S_io_reauthenticate):
- Use iohelp_reauth as per the new semantics.
- * io-restrict-auth.c (trivfs_S_io_restrict_auth):
- Use iohelp_create_complex_iouser. Check return values.
- * protid-dup.c (trivfs_protid_dup): Use iohelp_dup_iouser
- as per the new semantics.
-
-2001-06-10 Neal H Walfield <neal@cs.uml.edu>
-
- * file-inv.c: Remove this file, function no longer exists.
- * Makefile (FSSRCS): Remove reference to file-inv.c.
-
-2000-03-17 Thomas Bushnell, BSG <tb@mit.edu>
-
- * startup.c (trivfs_startup): Don't use MAKE_SEND in Hurd RPC.
-
-2000-03-17 Roland McGrath <roland@baalperazim.frob.com>
-
- * io-reauthenticate.c (trivfs_S_io_reauthenticate): Use
- ports_get_send_right.
-
-1999-11-08 Roland McGrath <roland@baalperazim.frob.com>
-
- * io-write.c: Include <fcntl.h>.
-
- * fsys-getroot.c (trivfs_S_fsys_getroot): Fix typo.
-
- * io-write.c (trivfs_S_io_write): Return EBADF if trivfs_allow_open
- doesn't include O_WRITE.
-
- * io-modes-get.c (trivfs_S_io_get_openmodes): Remove assert.
- The default implementation ought to be fine for this.
-
- * io-owner-get.c (trivfs_S_io_get_owner): Remove asserts.
- It is entirely reasonable to have EOPNOTSUPP be the default
- implementation for these calls that files are not obligated to provide.
- * io-owner-mod.c (trivfs_S_io_mod_owner): Likewise.
- * io-map.c (trivfs_S_io_map): Likewise.
- * io-async.c (trivfs_S_io_async): Likewise.
- * io-async-icky.c (trivfs_S_io_get_icky_async_id): Likewise.
-
- * fsys-getroot.c (trivfs_S_fsys_getroot): Return EROFS or EACCES for a
- disallowed open attempt, instead of EOPNOTSUPP. EOPNOTSUPP results in
- the confusing result of ENOTDIR being delivered to the user.
-
-1999-10-11 Roland McGrath <roland@baalperazim.frob.com>
-
- * dir-readdir.c (trivfs_S_dir_readdir): Take DATA_DEALLOC parameter.
-
- * dir-lookup.c (trivfs_S_dir_lookup): Duplicate CRED->user to pass it
- to trivfs_open. Add ref to CRED->realnode when used by trivfs_open.
-
- * trivfs.h (trivfs_open_hook): New variable.
- * fsys-getroot.c (trivfs_S_fsys_getroot): Use it.
-
-1999-09-13 Roland McGrath <roland@baalperazim.frob.com>
-
- * Makefile, io-map.c, io-map-segment.c: Reverted changes related to
- io_map_segment.
-
-1999-09-07 Thomas Bushnell, BSG <tb@mit.edu>
-
- * io-map-segment.c (trivfs_S_io_map): New file.
- * io-map.c (trivfs_S_io_map): Just call trivfs_S_io_map_segment.
- * Makefile (IOSRCS): Add io-map-segment.c.
-
-Mon Mar 15 14:36:33 1999 Thomas Bushnell, BSG <tb@mit.edu>
-
- * migsupport.c (trivfs_begin_using_protid): In first branch,
- protect work against PI being null, and call ports_port_deref with
- the proper value.
- (trivfs_begin_using_control): Likewise.
- Reported by Mark Kettenis (kettenis@wins.uva.nl).
-
-1999-02-06 Mark Kettenis <kettenis@gnu.org>
-
- * trivfs.h (trivfs_check_access_hook): New variable.
- * fsys-getroot.c (trivfs_S_fsys_getroot): Use
- trivfs_check_acces_hook.
- * dir-lookup.c (trivfs_S_dir_lookup): Likewise.
- * file-access.c (trivfs_S_file_check_access): Likewise.
-
-1999-02-16 Roland McGrath <roland@baalperazim.frob.com>
-
- * io-revoke.c: Add reply, reply_type args.
-
-Tue Feb 16 05:47:57 1999 Thomas Bushnell, BSG <tb@mit.edu>
-
- * io-revoke.c: New file.
- * Makefile (IOSRCS): Add io-revoke.c.
-
-1999-02-12 Gordon Matzigkeit <gord@trick.fig.org>
-
- * open.c (trivfs_open): Add missing `=' from last change.
-
-1999-02-05 Mark Kettenis <kettenis@gnu.org>
-
- * open.c (trivfs_open): Correctly initialize NEW->isroot.
-
-Sun Jan 31 18:29:22 1999 Thomas Bushnell, BSG <tb@mit.edu>
-
- * times.c (trivfs_set_atime, trivefs_set_mtime): Take advantage of
- new semantics for file_utimes.
-
-1998-08-20 Roland McGrath <roland@baalperazim.frob.com>
-
- * file-get-fs-options.c (trivfs_S_file_get_fs_options):
- fshelp_return_malloced_buffer renamed to iohelp_*.
- * fsys-get-options.c (trivfs_S_fsys_get_options): Likewise.
-
-1998-07-20 Roland McGrath <roland@baalperazim.frob.com>
-
- * dir-lookup.c (trivfs_S_dir_lookup): Fix brainos in last change.
-
-Tue Jul 14 16:47:28 1998 Thomas Bushnell, n/BSG <tb@mit.edu>
-
- * dir-lookup.c (trivfs_S_dir_lookup): In null-pathname case, this
- should work even for non-directories, so actually do it, making
- this a simpler case of trivfs_S_fsys_getroot.
-
-Thu Feb 20 13:13:13 1997 Miles Bader <miles@gnu.ai.mit.edu>
-
- * protid-classes.c (trivfs_protid_portclasses,
- trivfs_protid_nportclasses): Make common.
- * cntl-classes.c (trivfs_cntl_portclasses,
- trivfs_cntl_nportclasses): Likewise.
-
-Tue Feb 18 19:47:16 1997 Miles Bader <miles@gnu.ai.mit.edu>
-
- * cntl-create.c (trivfs_create_control): Put the actual port
- creation call back in!
-
-Fri Feb 14 02:10:50 1997 Miles Bader <miles@gnu.ai.mit.edu>
-
- * dyn-classes.c: New file.
- * cntl-create.c (trivfs_create_control): Possibly allocate and add
- the port classes/buckets to the list of ones recognized by trivfs.
- * migsupport.c
- (trivfs_begin_using_protid): Support dynamic protid port classes.
- (trivfs_begin_using_control): Support dynamic control port classes.
- * cntl-clean.c (trivfs_clean_cntl): Clean up dynamic port
- classes/buckets.
- * trivfs.h (trivfs_add_control_port_class,
- trivfs_add_protid_port_class, trivfs_add_port_bucket,
- trivfs_remove_control_port_class, trivfs_remove_protid_port_class,
- trivfs_remove_port_bucket): New declarations.
- Doc fixes.
- * priv.h (trivfs_dynamic_protid_port_classes,
- trivfs_num_dynamic_protid_port_classes,
- trivfs_dynamic_control_port_classes,
- trivfs_num_dynamic_control_port_classes,
- trivfs_dynamic_port_buckets, trivfs_num_dynamic_port_buckets):
- New declarations.
- * Makefile (OTHERSRCS): Add dyn-classes.c, protid-classes.c, &
- cntl-classes.c.
-
-Thu Feb 13 18:30:45 1997 Miles Bader <miles@gnu.ai.mit.edu>
-
- * trivfs.h (trivfs_getroot_hook): New declaration.
- * fsys-getroot.c (trivfs_S_fsys_getroot): Use trivfs_getroot_hook.
- * Makefile (FSSRCS): Replace dir-reparent.c by file-reparent.c.
-
-Mon Jan 20 16:37:04 1997 Miles Bader <miles@gnu.ai.mit.edu>
-
- * dir-reparent.c (trivfs_S_dir_reparent): New file.
- * Makefile (FSSRCS): Add dir-reparent.c.
-
-Tue Nov 19 22:36:49 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * io-stat.c (trivfs_S_io_stat): Clear S_ITRANS and set S_IROOT in
- ST->st_mode (before calling trivfs_modify_stat).
-
-Mon Nov 18 18:13:42 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * io-stat.c (trivfs_S_io_stat): Make the mode specify IFCHR by
- default.
-
-Sat Nov 16 17:20:15 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * Makefile (HURDLIBS): Add `iohelp'.
-
-Thu Nov 14 13:13:10 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * io-restrict-auth.c (trivfs_S_io_restrict_auth): idvec_set ->
- idvec_set_ids. Fix unrelated typos.
-
- * protid-dup.c (trivfs_protid_dup): Use iouser_dup_iouser instead
- of copying old arrays by hand.
- * protid-clean.c (trivfs_clean_protid): Free CRED->user instead of
- CRED->uids and CRED->gids.
- * io-reauthenticate.c (trivfs_S_io_reauthenticate): Args for
- io_restrict_auth now come from the new structure definitions.
- * open.c (trivfs_open): Pass correct first arg to idvec_contains.
-
- * open.c (trivfs_open): Delete variable I.
-
- * trivfs.h: Include <hurd/iohelp.h>
-
-Thu Nov 7 17:05:02 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * io-restrict-auth.c (trivfs_S_io_restrict_auth): If CRED has
- root, use the requested id sets verbatim.
-
-Thu Nov 7 01:01:05 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * io-restrict-auth.c (trivfs_S_io_restrict_auth): Rewrite to use
- idvecs.
-
-Wed Nov 6 23:40:50 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * trivfs.h (struct trivfs_protid): Delete members `uids', `gids',
- `nuids', and `ngids'. Replace with `user'.
- (trivfs_check_open_hook): Delete args `uids', `nuids', `gids',
- `ngids'. Replace with new arg `user'. All callers changed.
- (trivfs_open): Likewise.
- * open.c (trivfs_open): Change to match new declaration.
-
- * trivfs.h (struct trivfs_protid): Delete members `uids', `gids',
- * io-reauthenticate.c (trivfs_S_io_reauthenticate): Use new
- iohelp_reauth call.
-
-Thu Sep 26 14:25:29 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * file-access.c (trivfs_S_file_check_access): Return
- CRED->realnode's access bits rather than always 0.
-
-Mon Sep 23 17:20:08 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * file-get-fs-options.c <argz.h>: New include.
-
- * trivfs.h (trivfs_append_args): Make ARGZ_LEN `size_t *'.
- * append-args.c (trivfs_append_args): Likewise.
-
-Thu Sep 19 18:00:42 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * Makefile (HURDLIBS): Add shouldbeinlibc.
-
-Wed Sep 18 12:47:54 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * fsys-get-options.c (trivfs_S_fsys_get_options): Initialize ARGZ
- with the program name, and call trivfs_append_args instead of
- trivfs_get_options.
- * file-get-fs-options.c (trivfs_S_file_get_fs_options): Likewise.
- * trivfs.h (trivfs_append_args): New declaration.
- (trivfs_get_options): Declaration removed.
- * Makefile (OTHERSRCS): Replace get-options.c with apend-args.c.
- * append-args.c (trivfs_append_args): New file.
-
-Thu Sep 12 16:23:15 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * Makefile (HURDLIBS): New variable.
- (libtrivfs.so): Delete special depedency.
-
-Fri Aug 16 19:24:45 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * migsupport.c (trivfs_end_using_protid): Only call
- ports_port_deref if CRED is set.
- (trivfs_end_using_control): Likewise.
-
-Thu Aug 15 16:14:33 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * io-pathconf.c (trivfs_S_io_pathconf): Implement by calling
- underlying node.
-
-Thu Jul 18 23:14:44 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * io-reauthenticate.c (trivfs_S_io_reauthenticate): Use noinstall
- version of ports_create_port. Put it in the port set after the
- node has been fully initialized.
-
-Sat Jul 13 20:15:56 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * io-reauthenticate.c (trivfs_S_io_reauthenticate): Repeat
- ports_create_port, auth_server_authenticate, io_restrict_auth, and
- *trivfs_protid_create_hook for as long as we get EINTR. Deal with
- other errors without crashing.
-
-Sun Jul 7 16:06:37 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * io-reauthenticate.c (trivfs_S_io_reauthenticate): Don't use
- MACH_MSG_TYPE_MOVE_SEND; it's unreliable.
-
-Thu Jun 20 22:54:01 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * file-get-fs-options.c (trivfs_S_file_get_fs_options):
- Call trivfs_get_options, and package up the results.
- * fsys-get-options.c (trivfs_S_fsys_get_options): Likewise.
- * fsys-set-options.c (trivfs_S_fsys_set_options): Call
- trivfs_set_options.
- * set-options.c, get-options.c: New files.
- * trivfs.h: Add trivfs_set_options & trivfs_get_options.
- * Makefile (OTHERSRCS): Add set-options.c & get-options.c.
-
-Wed Jun 19 21:29:45 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * trivfs.h (trivfs_runtime_argp): New declaration.
- * fsys-set-options.c (trivfs_S_fsys_set_options): Use
- trivfs_runtime_argp to parse options.
- * runtime-argp.c: New file.
- * Makefile (OTHERSRCS): Add runtime-argp.c.
-
-Sat Jun 15 19:50:37 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * fsys-stubs.c (trivfs_S_fsys_set_options, trivfs_S_fsys_get_options,
- trivfs_S_file_get_fs_options): Functions removed.
- * fsys-set-options.c, fsys-get-options.c, file-get-fs-options.c:
- New files.
- * Makefile (FSSRCS): Add file-get-fs-options.c
- (FSYSSRCS): Add fsys-set-options.c & fsys-get-options.c.
-
-Thu May 9 20:03:28 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * io-identity.c: New file.
- * Makefile (IOSRCS): Add io-identity.c.
- * cntl-clean.c (trivfs_clean_cntl): Destroy filesys_id and file_id
- members.
- * cntl-create.c (trivfs_create_control): Initialize filesys_id and
- file_id members of new control.
- * trivfs.h (trivfs_control): New members `filesys_id' and
- `file_id'.
-
-Thu May 9 16:58:31 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * file-get-storage-info.c (trivfs_S_file_get_storage_info): Change
- to new interface.
-
-Thu May 9 15:32:38 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * io-reauthenticate.c (trivfs_S_io_reauthenticate): Don't send
- right for CRED to auth_server_authenticate.
-
- * fsys-stubs.c (trivfs_S_fsys_get_options): Expect (and ignore)
- reply port args.
-
- * file-syncfs.c (trivfs_S_file_syncfs): Provide new third arg to
- file_sync.
- * fsys-syncfs.c (trivfs_S_fsys_syncfs): Likewise.
- * file-sync.c (trivfs_S_file_sync): Accept and pass through new
- omitmeta parm.
-
- * file-statfs.c (trivfs_S_file_statfs): Use new struct statfs
- format.
-
- * dir-rename.c (trivfs_S_dir_rename): Accept new excl parm.
- * dir-link.c (trivfs_S_dir_link): Likewise.
-
- * Makefile (OTHERSRCS): Delete handle-port.c.
- * trivfs.h (trivfs_handle_port): Delete declaration.
- * handle-port.c: Delete file.
-
-Thu May 9 12:16:38 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * io-select.c (trivfs_S_io_select): Remove TAG arg.
-
-Tue May 7 16:14:10 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * file-get-storage-info.c (trivfs_S_file_get_storage_info): Swap
- PORTS_TYPE and NUM_PORTS args.
-
-Mon May 6 20:16:20 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * file-get-storage-info.c (trivfs_S_file_get_storage_info):
- Rewrite for new interface.
-
-Mon Apr 29 15:19:26 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * handle-port.c: Comment out warning addition.
-
-Sun Apr 28 15:22:16 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
-
- * handle-port.c: Add obsolescence link warning.
-
-Thu Apr 11 18:03:31 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * Makefile (MIGSFLAGS): Reference fsmutations.h in $(srcdir).
-
-Thu Jan 25 16:19:29 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * cntl-create.c (trivfs_create_control): New function.
- * trivfs.h (trivfs_create_control): New declaration.
- * startup.c (trivfs_startup): Use trivfs_create_control.
- * handle-port.c (trivfs_handle_port): Likewise.
- * Makefile (OTHERSRCS): Add cntl-create.c.
-
- * open.c (trivfs_open): Use ports_create_port instead of
- ports_allocate_port, and return any error.
- * protid-dup.c (trivfs_protid_dup): Likewise.
- * io-reauthenticate.c (trivfs_S_io_reauthenticate): Likewise.
- * io-restrict-auth.c (trivfs_S_io_restrict_auth): Likewise.
-
-Mon Jan 15 12:02:49 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * protid-clean.c (trivfs_clean_protid): Don't hold
- CRED->po->cntl->lock while calling TRIVFS_PEROPEN_DESTROY_HOOK.
-
-SUN Nov 5 00:01:53 1995 Miles Bader <miles@gnu.ai.mit.edu>
-
- * fsys-stubs.c (trivfs_S_fsys_get_options,
- trivfs_S_file_get_fs_options): New functions.
-
- * file-get-storage-info.c (trivfs_S_file_get_storage_info): Add
- FLAGS arg.
-
- * dir-chg.c (trivfs_S_dir_notice_changes): Waste some time adding
- reply port args that no one will use.
- * dir-link.c (trivfs_S_dir_link): Ditto.
- * dir-lookup.c (trivfs_S_dir_lookup): Ditto.
- * file-utimes.c (trivfs_S_file_utimes): Ditto.
- * file-statfs.c (trivfs_S_file_statfs)Ditto.
- * file-set-trans.c (trivfs_S_file_set_translator): Ditto.
- * file-lock.c (trivfs_S_file_lock, trivfs_S_file_lock_stat): Ditto.
- * file-getlinknode.c (trivfs_S_file_getlinknode): Ditto.
- * file-getfh.c (trivfs_S_file_getfh): Ditto.
- * file-get-transcntl.c (trivfs_S_file_get_translator_cntl): Ditto.
- * file-get-trans.c (trivfs_S_file_get_translator): Ditto.
- * file-get-storage-info.c (trivfs_S_file_get_storage_info): Ditto.
- * file-chown.c (trivfs_S_file_chown): Ditto.
- * file-chflags.c (trivfs_S_file_chflags): Ditto.
- * file-chg.c (trivfs_S_file_notice_changes): Ditto.
- * dir-unlink.c (trivfs_S_dir_unlink): Ditto.
- * dir-rmdir.c (trivfs_S_dir_rmdir): Ditto.
- * dir-rename.c (trivfs_S_dir_rename): Ditto.
- * dir-readdir.c (trivfs_S_dir_readdir): Ditto.
- * dir-mkfile.c (trivfs_S_dir_mkfile): Ditto.
- * dir-mkdir.c (trivfs_S_dir_mkdir): Ditto.
- * file-chmod.c (trivfs_S_file_chmod): Ditto.
- * file-chauthor.c (trivfs_S_file_chauthor): Ditto.
-
-Wed Nov 1 15:53:38 1995 Miles Bader <miles@gnu.ai.mit.edu>
-
- * startup.c (trivfs_startup): Add FLAGS arg, passed to fsys_startup.
- * trivfs.h (trivfs_startup): Add FLAGS arg.
- * fsys-stubs.c (trivfs_S_fsys_startup): Ditto.
-
-Sat Oct 7 05:04:02 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * fsys-stubs.c (trivfs_S_fsys_getpriv): Add poly args.
-
- * Makefile (libtrivfs.so): Depend on ../libports/libports.so.
-
-Fri Oct 6 17:44:08 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * migsupport.c: Remove leading _ from function names.
- * fsmutations.h: Likewise.
- * trivfs.h (trivfs_{begin,end}_using_{protid,control}): Declare them.
-
-Fri Oct 6 17:28:07 1995 Miles Bader <miles@gnu.ai.mit.edu>
-
- * dir-link.c (trivfs_S_dir_link): Swap first two arguments.
-
- * file-get-storage-info.c (trivfs_S_file_get_storage_info): Change
- type of RUNS to off_t **, and add the BLOCK_SIZE parameter.
-
-Thu Oct 5 00:41:33 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * Makefile (FSSRCS): Add file-get-storage-info.c.
- * file-get-storage-info.c: New file.
-
-Mon Sep 18 14:29:37 1995 Miles Bader <miles@churchy.gnu.ai.mit.edu>
-
- * file-set-size.c (trivfs_S_file_set_size): Renamed from
- file-truncate.c:trivfs_s_file_truncate.
- * io-pathconf.c (trivfs_S_io_pathconf): Renamed from
- file-pathconf.c:trivfs_S_file_pathconf.
- (trivfs_S_io_pathconf): Add reply port to args.
- * Makefile (FSSRCS): Remove file-pathconf.c.
- (IOSRCS): Add io-pathconf.c.
- (FSSRCS): Rename file-truncate.c to file-set-size.c.
-
-Wed Sep 6 10:33:03 1995 Miles Bader <miles@churchy.gnu.ai.mit.edu>
-
- * demuxer.c (trivfs_demuxer): Use ports_notify_server and
- ports_interrupt_server instead of our own versions.
- * Makefile (SRCS): Removed $(NOTIFYSRCS) and $(INTSRCS).
- (NOTIFYSRCS, INTSRCS): Removed.
- (MIGSTUBS): Removed notifyServer.o and interruptServer.o.
- * interrupt.c: File deleted.
-
-Fri Aug 25 12:11:26 1995 Miles Bader <miles@churchy.gnu.ai.mit.edu>
-
- * interrupt.c (trivfs_S_interrupt_operation): Use ports_interrupt_rpc.
-
-Thu Aug 24 11:46:19 1995 Miles Bader <miles@churchy.gnu.ai.mit.edu>
-
- * fsys-forward.c (trivfs_S_fsys_forward): New file.
-
-Wed Aug 23 15:09:31 1995 Miles Bader <miles@churchy.gnu.ai.mit.edu>
-
- * Makefile (REMHDRS): Removed.
- (FSYSSRCS): Added fsys-forward.c.
-
-Mon Aug 21 15:25:36 1995 Miles Bader <miles@churchy.gnu.ai.mit.edu>
-
- * handle-port.c (trivfs_handle_port): Initialize the hook field.
- * io-stat.c (trivfs_S_io_stat): Pass CRED to trivfs_modify_stat.
- * fsys-goaway.c (trivfs_S_fsys_goaway): Use new args for trivfs_goaway.
- * trivfs.h (struct trivfs_control): Add the hook field.
- (trivfs_goaway): Pass the control structure directly instead of
- random fields from it.
- (trivfs_modify_stat): Pass in the node as well.
-
-Mon Aug 21 10:51:24 1995 Michael I. Bushnell, p/BSG <mib@duality.gnu.ai.mit.edu>
-
- * protid-dup.c: Doc fix.
-
-Fri Aug 11 14:01:41 1995 Miles Bader <miles@churchy.gnu.ai.mit.edu>
-
- * open.c (trivfs_open): Actually set the PO field to what we create.
- * Makefile (OTHERSRCS): Add protid-dup.c and open.c.
-
-Tue Aug 8 14:07:04 1995 Miles Bader <miles@geech.gnu.ai.mit.edu>
-
- * open.c: New file, containing trivfs_open.
- * fsys-getroot.c (trivfs_S_fsys_getroot): Guts (except for
- protection check) moved into trivfs_open.
- * protid-dup.c: New file, containing trivfs_protid_dup.
- * io-duplicate.c (trivfs_S_io_duplicate): Guts moved into
- trivfs_protid_dup.
-
- * trivfs.h (trivfs_protid_create_hook, trivfs_peropen_create_hook):
- Change the declarations now that these return an error code.
- * fsys-getroot.c (trivfs_S_fsys_getroot): Allow
- trivfs_protid_create_hook and trivfs_peropen_create_hook to return
- an error code, and abort if either does.
- * protid-clean.c (trivfs_clean_protid): Only call
- trivfs_protid_destroy_hook hook on CRED if it was fully initialized.
- * io-duplicate.c (trivfs_S_io_duplicate): Allow
- trivfs_protid_create_hook to return an error code.
- * io-reauthenticate.c (trivfs_S_io_reauthenticate): Ditto.
- * io-restrict-auth.c (trivfs_S_io_restrict_auth): Ditto.
-
-Fri Jul 21 17:01:12 1995 Michael I Bushnell <mib@geech.gnu.ai.mit.edu>
-
- * fsys-getroot.c (trivfs_S_fsys_getroot): Free initial reference
- created by ports_allocate_port.
- * handle-port.c (trivfs_handle_port): Likewise.
- * io-duplicate.c (trivfs_S_io_duplicate): Likewise.
- * io-reauthenticate.c (trivfs_S_io_reauthenticate): Likewise.
- * io-restrict-auth.c (trivfs_S_io_restrict_auth): Likewise.
-
-Sun Jul 16 13:00:44 1995 Miles Bader <miles@churchy.gnu.ai.mit.edu>
-
- * trivfs.h: Protect against including twice, and add includes that
- we depend on.
-
-Thu Jul 6 15:38:48 1995 Michael I Bushnell <mib@duality.gnu.ai.mit.edu>
-
- * Makefile: Removed dependencies that are now automatically
- generated.
-
-Tue Jun 27 10:55:16 1995 Michael I Bushnell <mib@duality.gnu.ai.mit.edu>
-
- * fsys-goaway.c (trivfs_S_fsys_goaway): Call trivfs_goaway the new
- way.
- * startup.c (trivfs_startup): New parms CONTROL_BUCKET and
- PROTID_BUCKET; pass them to trivfs_handle_port. Use new ports
- interface.
- * protid-clean.c (trivfs_clean_protid): Use new ports interface.
- Use PREdecrement in reference counting check.
- * nosenders.c (trivfs_do_mach_notify_no_senders): Use new ports
- interface.
- * migsupport.c (_trivfs_begin_using_protid,
- _trivfs_end_using_protid, _trivfs_begin_using_oontrol,
- _trivfs_end_using_control): Use new ports interface.
- * io-restrict-auth.c (trivfs_S_io_restrict_auth): Use new ports
- interface.
- * io-reauthenticate.c (trivfs_S_io_reauthenticate): Use new ports
- interface.
- * io-duplicate.c (trivfs_S_io_duplicate): Use new ports interface.
- * handle-port.c (trivfs_handle_port): Take new parms; use new
- ports interface; initialize CNTL->protid_bucket.
- * fsys-getroot.c (trivfs_S_fsys_getroot): Use new form of
- ports_allocate_port call.
- * trivfs.h (trivfs_protid_portclasses): Renamed from
- trivfs_protid_porttypes. Change type to `struct port_class *'.
- (trivfs_protid_nportclasses): Renamed from trivfs_protid_nporttypes.
- (trivfs_cntl_portclasses): Renamed from trivfs_cntl_porttypes. Change
- type to `struct port_class *'.
- (trivfs_cntl_nportclasses): Renamed from trivfs_cntl_nporttypes.
- (trivfs_startup): Pass port classes instead of integer types. New
- parms CONTROL_BUCKET and PROTID_BUCKET.
- (trivfs_handle_port): Pass port classes instead of integer types.
- New parms CONTROL_BUCKET and PROTID_BUCKET.
- (trivfs_goaway): Pass port classes instead of integer types.
- (struct trivfs_control): Renamed member `protid_types' to be
- `protid_class' and changed type to be `stroct port_class *'.
- New member `protid_bucket'.
-
-Fri May 12 19:05:46 1995 Miles Bader <miles@churchy.gnu.ai.mit.edu>
-
- * fsys-stubs.c (trivfs_S_fsys_set_options,
- trivfs_S_fsys_mod_readonly): Change from mod_readonly to set_options.
-
-Sun Apr 9 00:36:36 1995 Miles Bader <miles@churchy.gnu.ai.mit.edu>
-
- * io-stat.c (trivfs_S_io_stat): Before calling trivfs_modify_stat,
- set the st_fstype & st_fsid fields to trivfs_fstype & trivfs_fsid.
- But first, if trivfs_fsid is zero, set it to our process id, which
- should be a nice unique value.
- * file-statfs.c (trivfs_S_file_statfs): Ditto about the PID.
-
- * startup.c (trivfs_startup): New function, which implements a
- common sequence of steps when starting up a new trivfs.
- * trivfs.h: Declare trivfs_startup.
- * Makefile (OTHERSRCS): Add startup.c.
-
-Thu Mar 30 12:27:59 1995 Michael I Bushnell <mib@geech.gnu.ai.mit.edu>
-
- * trivfs.h (trivfs_check_open_hook): Doc fix.
- (trivfs_complete_open): Delete declaration.
- (struct trivfs_control): Delete members `openshead' and
- `openstail'.
- * fsys-getroot.c (trivfs_S_fsys_getroot): Strip out old
- hack for blocking.
- (struct pending_open): Delete type.
- (trivfs_complete_open): Delete function.
-
- * trivfs.h (struct trivfs_control): New member `lock'.
- * handle-port.c (trivfs_handle_port): Initialize CNTL->lock.
- * io-duplicate.c (trivfs_S_io_duplicate): Lock
- CRED->po->cntl->lock around relevant code.
- * io-reauthenticate.c (trivfs_S_io_reauthenticate): Likewise.
- * io-restrict-auth.c (trivfs_S_io_restrict_auth): Likewise.
- * protid-clean.c (trivfs_clean_protid): Likewise.
-
-Tue Jan 17 19:00:28 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * io-select.c: Updated for new io_select interface.
-
-Fri Dec 9 01:35:54 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * io-write.c: Use mach_msg_type_number_t in place of unsigned int
- and int.
- * io-read.c: Likewise.
- * io-readable.c: Likewise.
-
-Tue Oct 25 10:54:06 1994 Michael I Bushnell <mib@churchy.gnu.ai.mit.edu>
-
- * fsys-getroot.c (trivfs_S_fsys_getroot): Don't clear O_NONBLOCK.
-
-Tue Aug 30 13:23:55 1994 Michael I Bushnell <mib@geech.gnu.ai.mit.edu>
-
- * fsys-syncfs.c: New file.
- * Makefile (FSYSSRCS): Added fsys-syncfs.c.
- * fsys-stubs.c (trivfs_S_fsys_mod_readonly): New function.
-
- * Makefile (FSSRCS): Remove dir-pathtrans.c; add dir-lookup.c.
- * dir-lookup.c: Renamed from dir-pathtrans.c
- * dir-pathtrans.c (trivfs_S_dir_lookup): Renamed from
- trivfs_S_dir_pathtrans.
-
- * fsys-getroot.c (trivfs_S_fsys_getroot): Use FS_RETRY_NORMAL
- instead of FS_RETRY_NONE.
- (trivfs_complete_open): Likewise.
-
- * file-set-trans.c (trivfs_S_file_set_translator): Change to args
- as for new file_set_translator procotol.
-
-Mon Aug 29 12:52:43 1994 Michael I Bushnell <mib@geech.gnu.ai.mit.edu>
-
- * io-reauthenticate.c (trivfs_S_io_reauthenticate): Use new
- authentication protocol.
-
-Wed Aug 17 20:11:29 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * io-select.c (trivfs_S_io_select): Take poly arg for notify port.
-
-Thu Aug 11 11:58:48 1994 Michael I Bushnell <mib@geech.gnu.ai.mit.edu>
-
- * io-version.c (trivfs_S_io_server_version): Fix typo in name.
-
-Fri Jul 22 12:41:55 1994 Michael I Bushnell <mib@geech.gnu.ai.mit.edu>
-
- * fsys-goaway.c: Include fsys_S.h with " not with <>.
- * handle-port.c: Include priv.h with " not with <>.
-
- * Makefile: Converted to use new scheme.
- * fsmutations.h (SERVERPREFIX): Deleted macro.
- * fsys-getroot.c: Include "fsys_reply_U.h" instead of "fsys_reply.h".
-
-Wed Jul 20 15:59:36 1994 Michael I Bushnell <mib@geech.gnu.ai.mit.edu>
-
- * file-inv.c: New file.
- * Makefile (FSSRCS): Added file-inv.c.
-
-Tue Jul 19 19:23:33 1994 Michael I Bushnell (mib@churchy.gnu.ai.mit.edu)
-
- * fsys-stubs.c (trivfs_S_fsys_startup): Deleted dotdot args.
- * fsys-getroot.c (trivfs_S_fsys_getroot): New arg `dotdot';
- don't do anything with it.
-
-Mon Jul 11 14:49:03 1994 Michael I Bushnell (mib@churchy.gnu.ai.mit.edu)
-
- * trivfs.h (trivfs_set_atime, trivfs_set_mtime): New functions.
- * times.c: New file.
- * Makefile (OTHERSRCS): Added `times.c'.
-
-Thu Jul 7 10:39:04 1994 Michael I Bushnell (mib@churchy.gnu.ai.mit.edu)
-
- * Makefile (DIST_FILES): Add priv.h.
-
-Tue Jul 5 13:24:59 1994 Michael I Bushnell (mib@churchy.gnu.ai.mit.edu)
-
- * Makefile (DIST_FILES): Added fsmutations.h.
- (TAGSHDRS): New variable.
-
- * fsys-getroot.c: Include "fsys_reply.h".
- (trivfs_S_fsys_getroot, trivfs_complete_open):
- Uncomment code now that we have reply ports.
- (struct pending_open): Delete USERS_PORT, add CRED.
- (trivfs_S_fsys_getroot): When creating PENDO, don't call
- ports_get_right, call ports_port_ref; store CRED in PENDO.
- (trivfs_complete_open): Deal with errors properly. When sending
- port to user, call ports_get_right. Always call
- ports_done_with_port when freeing pending open struct.
- * Makefile (MIGSTUBS): Added fsys_replyUser.o.
- (fsys_reply.h fsys_replyUser.c): New rule.
- (fsys-getroot.c): Add dependency on fsys_reply.h.
-
- * fsmutations.h (REPLY_PORTS): New macro, affecting io and fsys
- interfaces.
- * io-async-icky.c (trivfs_S_io_get_icky_async_id): Added new
- REPLY and REPLYTYPE args.
- * io-async.c (trivfs_S_io_async): Likewise.
- * io-duplicate.c (trivfs_S_io_duplicate): Likewise.
- * io-map.c (trivfs_S_io_map): Likewise.
- * io-modes-get.c (trivfs_S_io_get_openmodes): Likewise.
- * io-modes-off.c (trivfs_S_io_clear_some_openmodes): Likewise.
- * io-modes-on.c (trivfs_S_io_set_some_openmodes): Likewise.
- * io-modes-set.c (trivfs_S_io_set_all_openmodes): Likewise.
- * io-owner-get.c (trivfs_S_io_get_owner): Likewise.
- * io-owner-mod.c (trivfs_S_io_mod_owner): Likewise.
- * io-read.c (trivfs_S_io_read): Likewise.
- * io-readable.c (trivfs_S_io_readable): Likewise.
- * io-reauthenticate.c (trivfs_S_io_reauthenticate): Likewise.
- * io-restrict-auth.c (trivfs_S_io_restrict_auth): Likewise.
- * io-seek.c (trivfs_S_io_seek): Likewise.
- * io-select.c (trivfs_S_io_select): Likewise.
- * io-stat.c (trivfs_S_io_stat): Likewise.
- * io-stubs.c (trivfs_S_io_map_cntl): Likewise.
- (trivfs_S_io_get_conch): Likewise.
- (trivfs_S_io_release_conch): Likewise.
- (trivfs_S_io_eofnotify): Likewise.
- (trivfs_S_io_prenotify): Likewise.
- (trivfs_S_io_postnotify): Likewise.
- (trivfs_S_io_readsleep): Likewise.
- (trivfs_S_io_sigio): Likewise.
- (trivfs_S_io_readnotify): Likewise.
- * io-write.c (trivfs_S_io_write): Likewise.
- * io-version.c (trivfs_S_trivfs_io_server_version): Likewise.
- * fsys-getroot.c (trivfs_S_fsys_getroot): Likewise.
- * fsys-goaway.c (trivfs_S_fsys_goaway): Likewise.
- * fsys-stubs.c (trivfs_S_fsys_startup): Likewise.
- (trivfs_S_fsys_getpriv): Likewise.
- (trivfs_S_fsys_init): Likewise.
- (trivfs_S_fsys_getfile): Likewise.
-
-Wed Jun 29 13:02:17 1994 Michael I Bushnell (mib@geech.gnu.ai.mit.edu)
-
- * io-read.c (trivfs_S_io_read): Always return EOPNOTSUPP.
- * io-write.c (trivfs_S_io_write): Likewise.
- * file-truncate.c (trivfs_S_file_truncate): Likewise.
- * io-readable.c (trivfs_S_io_readable): Likewise.
- * io-select.c (trivfs_S_io_select): Likewise.
-
- * fsys-getroot.c (trivfs_S_fsys_getroot): Use trivfs_allow_open
- instead of trivfs_support_* vars.
-
- * trivfs.h (trivfs_allow_open): New variable.
-
- * dir-pathtrans.c (trivfs_S_dir_pathtrans): Delete unused var
- `newcred'.
-
-Mon Jun 27 15:05:06 1994 Michael I Bushnell (mib@churchy.gnu.ai.mit.edu)
-
- * fsys-getroot.c: Comment out code for blocking opens; don't
- permit trivfs_check_open_hook to return EWOULDBLOCK.
-
-Thu Jun 23 12:28:49 1994 Michael I Bushnell (mib@churchy.gnu.ai.mit.edu)
-
- * fsys-getroot.c (trivfs_S_fsys_getroot): Don't call
- ports_done_with_port for CNTL; the MiG destructor function does
- that for us.
-
- * fsys-getroot.c (trivfs_S_fsys_getroot): Call trivfs_check_open_hook
- to allow trivfs users to block or restrict opens.
- * trivfs.h (trivfs_check_open_hook, trivfs_complete_open): New
- declarations.
- (struct trivfs_control): New members `openshead' and `openstail'.
-
-Wed Jun 22 14:49:00 1994 Michael I Bushnell (mib@churchy.gnu.ai.mit.edu)
-
- * fsys-getroot.c (trivfs_S_fsys_getroot): Initialize both hook
- members to 0.
- * io-duplicate.c (trivfs_S_io_duplicate): Copy NEWCRED->hook
- from CRED->hook.
- * io-reauthenticate.c (trivfs_S_io_reauthenticate): Likewise.
- * io-restrict-auth.c (trivfs_S_io_restrict_auth): Likewise.
-
- * fsys-getroot.c (trivfs_S_fsys_getroot): Don't force read/write
- systems to redefine this function. If O_foo is set, but
- trivfs_support_foo isn't, then return EACCES. Call
- io_restrict_auth at the front so we can check open permission
- using the result. Initialise CRED->po->openmodes.
-
- * trivfs.h (trivfs_peropen): New member `openmodes'.
- * io-modes-get.c (trivfs_S_io_get_openmodes): Set bits from
- CRED->po->openmodes, but only if we are not a read/write
- server; otherwise the server might be hiding bits elsewhere.
-
- * dir-pathtrans.c (trivfs_S_dir_pathtrans): Strip out code; always
- return ENOTDIR.
-
-Tue Jun 21 13:21:07 1994 Michael I Bushnell (mib@churchy.gnu.ai.mit.edu)
-
- * file-access.c: New file.
- * dir-chg.c: New file.
- * file-chg.c: New file.
- * Makefile (FSSRCS): Added file-access.c, dir-chg.c, and file-chg.c.
-
-Mon Jun 20 14:42:12 1994 Michael I Bushnell (mib@churchy.gnu.ai.mit.edu)
-
- * dir-readdir.c (trivfs_S_dir_readdir): Declare args in accord
- with fs.defs interface change.
- * fsys-getroot.c (trivfs_S_fsys_getroot): Likewise. Set
- DO_RETRY and RETRY_NAME appropriately.
- * file-get-transcntl.c (trivfs_S_file_get_translator_cntl):
- CNTL_TYPE is a pointer.
-
-Fri Jun 17 11:23:47 1994 Roland McGrath (roland@geech.gnu.ai.mit.edu)
-
- * file-get-transcntl.c (trivfs_S_file_get_translator_cntl): Add
- missing poly arg.
-
-Wed Jun 15 21:27:20 1994 Michael I Bushnell (mib@churchy.gnu.ai.mit.edu)
-
- * dir-pathtrans.c: Include <string.h> for bcopy.
- * fsys-getroot.c: Likewise.
- * io-duplicate.c: Likewise.
- * io-reauthenticate.c: Likewise.
- * io-restrict-auth.c: Likewise.
-
-Wed Jun 15 16:58:02 1994 Michael I Bushnell (mib@geech.gnu.ai.mit.edu)
-
- * trivfs.h (trivfs_goaway): New args REALNODE, CNTLTYPE,
- PROTIDTYPE. All callers changed.
-
- * fsmutations.h (FSYS_DESTRUCTOR, FSYS_INTRAN): New macros.
- * priv.h (trivfs_control_t): New type.
- (_trivfs_begin_using_control, _trivfs_end_using_control): New
- declarations.
- * migsupport.c (_trivfs_begin_using_control,
- _trivfs_end_using_control): New functions.
- * fsys-getroot.c (trivfs_S_fsys_getroot): First arg is now
- `struct trivfs_control *'; don't call ports_check_port_type
- ourselves or ports_done_with_port.
- * fsys-goaway.c (trivfs_S_fsys_goaway): Likewise.
- * fsys-stubs.c (trivfs_S_fsys_startup, trivfs_S_fsys_getpriv,
- trivfs_S_fsys_init, trivfs_S_fsys_getfile): Declare first
- arg as `struct trivfs_control *'.
-
- * trivfs.h (trivfs_protid_porttype, trivfs_cntl_porttype):
- Deleted vars.
- (trivfs_protid_porttypes, trivfs_cntl_porttypes,
- trivfs_protid_nporttypes, trivfs_cntl_nporttypes): New vars.
- (trivfs_control): New member protidtypes.
- (trivfs_handle_port): New args PROTIDTYPE and CNTLTYPE.
- * migsupport.h (_trivfs_begin_using_protid): Check
- against all the members of trivfs_protid_porttypes.
- * dir-pathtrans.c (trivfs_S_dir_pathtrans): Copy type of new port
- from existing port.
- * io-duplicate.c (trivfs_S_io_duplicate): Likewise.
- * io-restrict-auth.c (trivfs_S_io_restrict_auth): Likewise.
- * io-reauthenticate.c (trivfs_S_io_reauthenticate): Likewise.
- * handle-port.c (trivfs_handle_port): Allocate port of type
- from new arg CNTLTYPE. Initialize CNTL->protidtypes from new arg
- PROTIDTYPE.
- * fsys-getroot (trivfs_S_fsys_getroot): Allocate port of type
- from CNTL->protidtypes.
-
- * trivfs.h (struct trivfs_protid) [hook]: New member.
- (trivfs_protid_create_hook, trivfs_peropen_create_hook,
- trivfs_protid_destroy_hook, trivfs_peropen_destroy_hook): New
- hook functions.
- * dir-pathtrans.c (trivfs_S_dir_pathtrans): Call
- trivfs_peropen_create_hook.
- * fsys-getroot.c (trivfs_S_fsys_getroot): Likewise.
- * dir-pathtrans.c (trivfs_S_dir_pathtrans): Call
- trivfs_protid_create_hook.
- * fsys-getroot.c (trivfs_S_fsys_getroot): Likewise.
- * io-duplicate.c (trivfs_S_io_duplicate): Likewise.
- * io-reauthenticate.c (trivfs_S_io_reauthenticate): Likewise.
- * io-restrict-auth.c (trivfs_S_io_restrict_auth): Likewise.
- * protid-clean.c (trivfs_clean_protid): Call
- trivfs_protid_destroy_hook and trivfs_peropen_destroy_hook.
-
- * trivfs.h (struct trivfs_protid) [po]: New member.
- (struct trivfs_protid) [cntl]: Deleted member.
- (struct trivfs_peropen): New type.
- * file-getcontrol.c (trivfs_S_file_getcontrol): Fetch control
- port through peropen structure.
- * io-reauthenticate.c (trivfs_S_io_reauthenticate): Likewise.
- * fsys-getroot.c (trivfs_S_fsys_getroot): Likewise.
- * io-reauthenticate.c (trivfs_S_io_reauthenticate): Reference
- peropen, not cntl.
- * io-restrict-auth.c (trivfs_S_io_restrict_auth): Likewise.
- * io-duplicate.c (trivfs_S_io_duplicate): Likewise.
- * fsys-getroot.c (trivfs_S_fsys_getroot): Create new peropen
- and reference it.
- * dir-pathtrans (trivfs_S_dir_pathtrans): Actually create new
- peropen and cred.
- * protid-clean.c (trivfs_clean_protid): Drop reference on peropen,
- deallocating it if necessary.
-
- * trivfs.h (struct trivfs_protid) [uids, gids, nuids, ngids]: New
- members.
- * io-reauthenticate.c (trivfs_S_io_reauthenticate): Save received
- ids in newly created protid.
- * io-restrict-auth.c (listmember): New function.
- (trivfs_S_io_restrict_auth): Save uids and gids in newly created
- protid.
- * io-duplicate.c (trivfs_S_io_duplicate): Copy uids and gids.
- * protid-clean.c (trivfs_clean_protid): Free CRED->uids and
- CRED->gids.
- * fsys-getroot.c (trivfs_S_fsys_getroot): Initialize uids
- and gids.
diff --git a/libtrivfs/Makefile b/libtrivfs/Makefile
index 41177ff5..ddce1e61 100644
--- a/libtrivfs/Makefile
+++ b/libtrivfs/Makefile
@@ -1,5 +1,6 @@
#
-# Copyright (C) 1994,95,96,97,99,2001,02,03 Free Software Foundation, Inc.
+# Copyright (C) 1994, 1995, 1996, 1997, 1999, 2001, 2002, 2003, 2008 Free
+# Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
@@ -46,7 +47,7 @@ SRCS=$(FSSRCS) $(IOSRCS) $(FSYSSRCS) $(OTHERSRCS)
MIGSTUBS=fsServer.o ioServer.o fsysServer.o fsys_replyUser.o
libname = libtrivfs
-HURDLIBS = iohelp ports shouldbeinlibc
+HURDLIBS = fshelp iohelp ports shouldbeinlibc
OBJS= $(sort $(subst .c,.o,$(SRCS)) $(MIGSTUBS))
LCLHDRS = trivfs.h fsmutations.h priv.h
MIGSFLAGS=-imacros $(srcdir)/fsmutations.h
diff --git a/libtrivfs/file-reparent.c b/libtrivfs/file-reparent.c
index 321c474a..0682a912 100644
--- a/libtrivfs/file-reparent.c
+++ b/libtrivfs/file-reparent.c
@@ -1,6 +1,6 @@
/* Reparent a directory
- Copyright (C) 1997,2002 Free Software Foundation, Inc.
+ Copyright (C) 1997,2002,2010 Free Software Foundation, Inc.
This file is part of the GNU Hurd.
@@ -26,5 +26,9 @@ trivfs_S_file_reparent (struct trivfs_protid *cred,
mach_port_t parent,
mach_port_t *new, mach_msg_type_name_t *new_type)
{
- return EOPNOTSUPP;
+ /* This is not a directory, so we just duplicate it */
+ error_t ret = trivfs_S_io_duplicate (cred, reply, reply_type, new, new_type);
+ if (!ret)
+ mach_port_deallocate (mach_task_self (), parent);
+ return ret;
}
diff --git a/libtrivfs/times.c b/libtrivfs/times.c
index b57fa981..d2fcc589 100644
--- a/libtrivfs/times.c
+++ b/libtrivfs/times.c
@@ -1,5 +1,5 @@
/*
- Copyright (C) 1994, 1999 Free Software Foundation
+ Copyright (C) 1994, 1999, 2007 Free Software Foundation
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
@@ -25,8 +25,8 @@ trivfs_set_atime (struct trivfs_control *cntl)
time_value_t mtime;
io_stat (cntl->underlying, &st);
- mtime.seconds = st.st_mtime;
- mtime.microseconds = st.st_mtime_usec;
+ mtime.seconds = st.st_mtim.tv_sec;
+ mtime.microseconds = st.st_mtim.tv_nsec / 1000;
atime.microseconds = -1;
file_utimes (cntl->underlying, atime, mtime);
return 0;
@@ -40,8 +40,8 @@ trivfs_set_mtime (struct trivfs_control *cntl)
time_value_t mtime;
io_stat (cntl->underlying, &st);
- atime.seconds = st.st_atime;
- atime.microseconds = st.st_atime_usec;
+ atime.seconds = st.st_atim.tv_sec;
+ atime.microseconds = st.st_atim.tv_nsec / 1000;
mtime.microseconds = -1;
file_utimes (cntl->underlying, atime, mtime);
return 0;
diff --git a/libtrivfs/trivfs.h b/libtrivfs/trivfs.h
index 6e087f31..798e0b38 100644
--- a/libtrivfs/trivfs.h
+++ b/libtrivfs/trivfs.h
@@ -96,7 +96,7 @@ extern int trivfs_cntl_nportclasses;
/* The user must define this function. This should modify a struct
stat (as returned from the underlying node) for presentation to
- callers of io_stat. It is permissable for this function to do
+ callers of io_stat. It is permissible for this function to do
nothing. */
void trivfs_modify_stat (struct trivfs_protid *cred, io_statbuf_t *);
diff --git a/login/ChangeLog b/login/ChangeLog
deleted file mode 100644
index 80477012..00000000
--- a/login/ChangeLog
+++ /dev/null
@@ -1,19 +0,0 @@
-1999-07-09 Thomas Bushnell, BSG <tb@mit.edu>
-
- * utmp.c (return_data): Use mmap instead of vm_allocate.
-
-Mon Aug 21 16:35:34 1995 Miles Bader <miles@churchy.gnu.ai.mit.edu>
-
- * utmp.c (trivfs_goaway, trivfs_modify_stat): Update arguments.
-
-Sun Apr 23 16:03:48 1995 Miles Bader <miles@geech.gnu.ai.mit.edu>
-
- * utmp.c (_find_device, add_device, remove_device): Remove the LEN
- parameter and the incorrectly computed value which was shadowing
- it, both of which are the wrong thing anyway.
-
-Tue Apr 11 11:20:21 1995 Michael I Bushnell <mib@duality.gnu.ai.mit.edu>
-
- * Makefile: New file.
-
-
diff --git a/login/utmp.c b/login/utmp.c
index 37d17421..c7c1ac04 100644
--- a/login/utmp.c
+++ b/login/utmp.c
@@ -134,7 +134,7 @@ next_device(char *dev)
/* ---------------------------------------------------------------- */
-/* Try and start the translator for CTL_PORT on NODE. If succesful, this
+/* Try and start the translator for CTL_PORT on NODE. If successful, this
call will not return until the translator is stopped; otherwise it returns
an error code describing the reason why it couldn't start. */
static error_t
@@ -163,7 +163,7 @@ start_translator(file_t node, fsys_t ctl_port)
}
/* Find an unoccupied (one with no active translator) filename starting with
- NAME_PFX, and start the translator for CTL_PORT on it. If succesful, this
+ NAME_PFX, and start the translator for CTL_PORT on it. If successful, this
call will not return until the translator is stopped; otherwise it returns
an error code describing the reason why it couldn't start. When
successful, this function sets UTMP_NODE_NAME to the name of the file we
@@ -272,7 +272,7 @@ return_data(char *data, int data_len, char **buf, int *buf_len)
if (data_len > *buf_len)
{
*buf = mmap (0, data_len, PROT_READ|PROT_WRITE, MAP_ANON, 0, 0);
- if (*buf == (char *) -1))
+ if (*buf == (char *) -1)
return errno;
}
@@ -326,12 +326,12 @@ S_login_get_idle_time(file_t utmp, time_value_t *tv)
{
struct stat stat;
if (stat(dev, &state) == 0
- && (stat.st_atime < tv->seconds
- || (stat.st_atime == tv->seconds
- && stat.st_atime_usec < tv->microseconds)))
+ && (stat.st_atim.tv_sec < tv->seconds
+ || (stat.st_atim.tv_sec == tv->seconds
+ && stat.st_atim.tv_nsec / 1000 < tv->microseconds)))
{
- tv->seconds = stat.st_atime;
- tv->microseconds = stat.st_atime_usec;
+ tv->seconds = stat.st_atim.tv_sc;
+ tv->microseconds = stat.st_atim.tv_nsec / 1000;
}
}
}
diff --git a/mach-defpager/ChangeLog b/mach-defpager/ChangeLog
deleted file mode 100644
index 6ba2231c..00000000
--- a/mach-defpager/ChangeLog
+++ /dev/null
@@ -1,64 +0,0 @@
-2007-06-06 Thomas Schwinge <tschwinge@gnu.org>
-
- * Makefile: Remove a comment.
- * setup.c (default_pager_paging_storage): Rename to
- `S_default_pager_paging_storage'.
-
-2002-06-15 Roland McGrath <roland@frob.com>
-
- * setup.c (page_write_file_direct): Use proper type for result param
- of device_write.
-
-2002-03-23 Roland McGrath <roland@frob.com>
-
- * setup.c (default_pager_paging_storage): Fail if receiver port is not
- default_pager_default_port.
-
- * Makefile (OBJS): Add default_pager_replyUser.o here.
-
- * main.c (default_pager_bootstrap_port): Declaration removed.
- (main): Don't use it.
- * Makefile (OBJS): Remove bootstrapServer.o from here.
-
-2001-06-05 Mark Kettenis <kettenis@gnu.org>
-
- * setup.c (page_read_file_direct): Fix logic to find the run that
- contains the data to be read. Use size in bytes instead of blocks
- when calling device_read.
- (page_write_file_direct): Fix logic to find the run that contains
- the data to be written. Pass SIZE_WRITTEN to device_write call
- instead of &WROTE when writing a whole page. Correctly calculate
- SEGSIZE.
-
-2001-02-28 Roland McGrath <roland@frob.com>
-
- * main.c (main): Instead of calling daemon, do the work ourselves but
- synchronize with the child so that vm_set_default_memory_manager has
- definitely been called before exit.
- (nohandler): New function.
-
-2000-12-28 Roland McGrath <roland@frob.com>
-
- Override the shared code from serverboot for device access with
- a new, simpler implementation with no filesystem format support.
- The new code implements the new default_pager_paging_storage RPC
- to set up paging areas that can be subsets of whole Mach devices,
- with no Linux signature checking. The compatibility setup entry
- point works as before on whole devices.
- * setup.c, file_io.h: New files.
- * Makefile (SRCS): Remove def_pager_setup.c, file_io.c, strfcns.c,
- ext2_file_io.c, ffs_file_io.c, ffs_compat.c, minix_file_io.c,
- minix_ffs_compat.c; add setup.c to replace them all.
-
-2000-02-06 Roland McGrath <roland@baalperazim.frob.com>
-
- * Makefile: Move include ../Makeconf earlier, since it sets srcdir.
-
-1999-11-18 Roland McGrath <roland@baalperazim.frob.com>
-
- * Makefile, main.c: New files for new this directory `mach-defpager'.
- This is a standalone Hurd program version of the Mach default pager,
- with the bulk of the source code coming from ../serverboot.
- This program /hurd/mach-defpager is started like a normal daemon,
- i.e. from rc or whatever, rather than being the first task.
- * ChangeLog: New file, mentioning itself in this sentence.
diff --git a/mach-defpager/Makefile b/mach-defpager/Makefile
index 5ed8f11f..51476552 100644
--- a/mach-defpager/Makefile
+++ b/mach-defpager/Makefile
@@ -1,6 +1,6 @@
# Makefile for mach-defpager subdirectory of hurd sources
#
-# Copyright (C) 1999, 2000, 2002, 2007 Free Software Foundation, Inc.
+# Copyright (C) 1999, 2000, 2002, 2007, 2010 Free Software Foundation, Inc.
#
# This file is part of the GNU Hurd.
#
@@ -27,15 +27,13 @@ OBJS := $(SRCS:.c=.o) \
$(addsuffix Server.o,\
memory_object default_pager memory_object_default exc) \
default_pager_replyUser.o
+LCLHDRS := file_io.h queue.h wiring.h
HURDLIBS:= threads
LDFLAGS += -static
include ../Makeconf
-vpath %.c $(srcdir)/../serverboot
-CPPFLAGS += -I$(srcdir)/../serverboot
-
MIGSFLAGS = -DSEQNOS
# Don't even bother.
diff --git a/serverboot/default_pager.c b/mach-defpager/default_pager.c
index c40f7181..5944e4eb 100644
--- a/serverboot/default_pager.c
+++ b/mach-defpager/default_pager.c
@@ -476,7 +476,7 @@ choose_partition(size, cur_part)
mutex_lock(&all_partitions.lock);
for (i = 0; i < all_partitions.n_partitions; i++) {
- /* the undesireable one ? */
+ /* the undesirable one ? */
if (i == cur_part)
continue;
@@ -1154,6 +1154,7 @@ pager_read_offset(pager, offset)
{
ddprintf ("%spager_read_offset pager %x: bad page %d >= size %d",
my_name, pager, f_page, pager->size);
+ mutex_unlock(&pager->lock);
return (union dp_map) (union dp_map *) NO_BLOCK;
#if 0
panic("%spager_read_offset",my_name);
@@ -1667,7 +1668,7 @@ ok:
* if it is different from <addr>, it must be deallocated after use.
*/
int
-default_read(ds, addr, size, offset, out_addr, deallocate)
+default_read(ds, addr, size, offset, out_addr, deallocate, external)
register dpager_t ds;
vm_offset_t addr; /* pointer to block to fill */
register vm_size_t size;
@@ -1675,6 +1676,7 @@ default_read(ds, addr, size, offset, out_addr, deallocate)
vm_offset_t *out_addr;
/* returns pointer to data */
boolean_t deallocate;
+ boolean_t external;
{
register union dp_map block;
vm_offset_t raddr;
@@ -1691,8 +1693,18 @@ default_read(ds, addr, size, offset, out_addr, deallocate)
* Find the block in the paging partition
*/
block = pager_read_offset(ds, offset);
- if ( no_block(block) )
+ if ( no_block(block) ) {
+ if (external) {
+ /*
+ * An external object is requesting unswapped data,
+ * zero fill the page and return.
+ */
+ bzero((char *) addr, vm_page_size);
+ *out_addr = addr;
+ return (PAGER_SUCCESS);
+ }
return (PAGER_ABSENT);
+ }
/*
* Read it, trying for the entire page.
@@ -1843,6 +1855,7 @@ struct dstruct {
mach_port_urefs_t request_refs; /* Request port user-refs */
mach_port_t pager_name; /* Name port */
mach_port_urefs_t name_refs; /* Name port user-refs */
+ boolean_t external; /* Is an external object? */
unsigned int readers; /* Reads in progress */
unsigned int writers; /* Writes in progress */
@@ -2300,10 +2313,12 @@ void default_pager_add(ds, internal)
/* possibly generate an immediate no-senders notification */
sync = 0;
pset = default_pager_internal_set;
+ ds->external = FALSE;
} else {
/* delay notification till send right is created */
sync = 1;
pset = default_pager_external_set;
+ ds->external = TRUE;
}
kr = mach_port_request_notification(default_pager_self, pager,
@@ -2654,7 +2669,8 @@ ddprintf ("seqnos_memory_object_data_request <%p>: pager_port_unlock: <%p>[s:%d,
else
rc = default_read(&ds->dpager, dpt->dpt_buffer,
vm_page_size, offset,
- &addr, protection_required & VM_PROT_WRITE);
+ &addr, protection_required & VM_PROT_WRITE,
+ ds->external);
switch (rc) {
case PAGER_SUCCESS:
@@ -3708,8 +3724,8 @@ S_default_pager_object_pages (mach_port_t pager,
kern_return_t
S_default_pager_object_set_size (mach_port_t pager,
- mach_port_seqno_t seqno,
mach_port_t reply_to,
+ mach_port_seqno_t seqno,
vm_size_t limit)
{
kern_return_t kr;
diff --git a/serverboot/kalloc.c b/mach-defpager/kalloc.c
index 28c0b55e..28c0b55e 100644
--- a/serverboot/kalloc.c
+++ b/mach-defpager/kalloc.c
diff --git a/serverboot/queue.h b/mach-defpager/queue.h
index 00619174..00619174 100644
--- a/serverboot/queue.h
+++ b/mach-defpager/queue.h
diff --git a/mach-defpager/setup.c b/mach-defpager/setup.c
index aea4310f..05c19f33 100644
--- a/mach-defpager/setup.c
+++ b/mach-defpager/setup.c
@@ -1,6 +1,6 @@
/* Backing store access callbacks for Hurd version of Mach default pager.
- Copyright (C) 2001, 2002, 2007 Free Software Foundation, Inc.
+ Copyright (C) 2001, 2002, 2007, 2010 Free Software Foundation, Inc.
This file is part of the GNU Hurd.
@@ -27,7 +27,7 @@
#include "default_pager_S.h"
/* This should be in some system header... XXX */
-static inline int page_aligned (vm_offset_t num)
+int page_aligned (vm_offset_t num)
{
return trunc_page (num) == num;
}
@@ -45,7 +45,7 @@ S_default_pager_paging_storage (mach_port_t pager,
boolean_t add)
{
struct file_direct *fdp;
- int sizes[DEV_GET_SIZE_COUNT];
+ int sizes[DEV_GET_RECORDS_COUNT];
natural_t count;
mach_msg_type_number_t i;
error_t err;
@@ -60,15 +60,15 @@ S_default_pager_paging_storage (mach_port_t pager,
if (nrun < 2 || nrun % 2 != 0)
return EINVAL;
- count = DEV_GET_SIZE_COUNT;
- err = device_get_status (device, DEV_GET_SIZE, sizes, &count);
+ count = DEV_GET_RECORDS_COUNT;
+ err = device_get_status (device, DEV_GET_RECORDS, sizes, &count);
if (err)
return err;
- if (count < DEV_GET_SIZE_COUNT || sizes[DEV_GET_SIZE_RECORD_SIZE] <= 0)
+ if (count < DEV_GET_RECORDS_COUNT || sizes[DEV_GET_RECORDS_RECORD_SIZE] <= 0)
return EINVAL;
- devsize = sizes[DEV_GET_SIZE_DEVICE_SIZE] / sizes[DEV_GET_SIZE_RECORD_SIZE];
+ devsize = sizes[DEV_GET_RECORDS_DEVICE_RECORDS];
- if (vm_page_size % sizes[DEV_GET_SIZE_RECORD_SIZE] != 0)
+ if (vm_page_size % sizes[DEV_GET_RECORDS_RECORD_SIZE] != 0)
/* We can't write disk blocks larger than pages. */
return EINVAL;
@@ -77,8 +77,8 @@ S_default_pager_paging_storage (mach_port_t pager,
return ENOMEM;
fdp->device = device;
- fdp->bshift = ffs (sizes[DEV_GET_SIZE_RECORD_SIZE]) - 1;
- fdp->fd_bsize = sizes[DEV_GET_SIZE_RECORD_SIZE];
+ fdp->bshift = ffs (sizes[DEV_GET_RECORDS_RECORD_SIZE]) - 1;
+ fdp->fd_bsize = sizes[DEV_GET_RECORDS_RECORD_SIZE];
fdp->nruns = nrun / 2;
fdp->fd_size = 0;
for (i = 0; i < nrun; i += 2)
diff --git a/serverboot/wiring.c b/mach-defpager/wiring.c
index 585a3075..585a3075 100644
--- a/serverboot/wiring.c
+++ b/mach-defpager/wiring.c
diff --git a/serverboot/wiring.h b/mach-defpager/wiring.h
index b5f8e53f..b5f8e53f 100644
--- a/serverboot/wiring.h
+++ b/mach-defpager/wiring.h
diff --git a/nfs/ChangeLog b/nfs/ChangeLog
deleted file mode 100644
index 3d2f40d7..00000000
--- a/nfs/ChangeLog
+++ /dev/null
@@ -1,732 +0,0 @@
-2002-09-29 Marcus Brinkmann <marcus@gnu.org>
-
- * mount.c (mount_root): Add parenthesis for post-decrement (even
- though it is only used as an lvalue here). Increment P after
- using it in the macro, not within.
- * rpc.c (initialize_rpc, conduct_rpc): Likewise.
- * ops.c (process_returned_stat, process_wcc_stat,
- netfs_validate_stat, netfs_attempt_chown, netfs_attempt_chmod,
- netfs_attempt_utimes, netfs_attempt_set_size,
- netfs_attempt_statfs, netfs_attempt_read, netfs_attempt_write,
- verify_nonexistent, netfs_attempt_lookup, netfs_attempt_mkdir,
- netfs_attempt_rmdir, netfs_attempt_link,
- netfs_attempt_create_file, netfs_attempt_unlink,
- netfs_attempt_rename, netfs_attempt_readlink, netfs_report_access,
- netfs_check_open_permissions): Likewise.
- (fetch_directory): Likewise. Also use memcpy instead bcopy.
- * cache.c (recache_handle): Likewise.
- * nfs.c (xdr_encode_data, xdr_encode_sattr_mode,
- xdr_encode_sattr_ids, xdr_encode_sattr_size,
- xdr_encode_sattr_times, xdr_encode_create_state,
- xdr_encode_sattr_stat, xdr_decode_64bit, xdr_decode_fattr):
- Likewise.
- (xdr_decode_string): Likewise. Also use memcpy instead bcopy.
- (xdr_decode_fhandle): Likewise. Also use memcpy instead bcopy.
-
-2002-05-13 Roland McGrath <roland@frob.com>
-
- * ops.c (register_fresh_stat): Set NP->nn_translated appropriately.
-
-2002-05-13 Marcus Brinkmann <marcus@gnu.org>
-
- * main.c: Include <version.h>.
- (netfs_server_name, netfs_server_version, argp_program_version):
- New variables.
-
-2002-05-08 Roland McGrath <roland@frob.com>
-
- * storage-info.c (netfs_file_get_storage_info): Cast %* arg to int.
-
- * ops.c (netfs_attempt_unlink): Use %tx and ptrdiff_t.
-
-2002-05-03 Roland McGrath <roland@frob.com>
-
- * mount.c: Include <error.h>.
-
-2002-03-23 James A. Morrison <ja2morri@uwaterloo.ca>
-
- * main.c (main): Use error, not perror and exit. Use ERR, not errno.
- * mount.c (mount_root): Likewise.
- * rpc.c (rpc_receive_thread): Use error, not perror.
-
-2002-01-03 Roland McGrath <roland@frob.com>
-
- * storage-info.c (netfs_file_get_storage_info): Set *PORTS_TYPE.
-
-2001-10-13 Roland McGrath <roland@frob.com>
-
- * storage-info.c: New file.
- * Makefile (SRCS): Add it.
- * mount.c (mounted_hostname, mounted_nfs_port): New global variables.
- (mount_root): Set them.
- * nfs.h: Declare them.
-
-2000-12-26 Neal H Walfield <neal@cs.uml.edu>
-
- * cache.c: Change cache/hash table size to 509, a prime. Use
- memcpy/memcmp not bcopy/bcmp. Verify return value from malloc and
- check the result of rpc transaction _and_ do not act if failed.
- * main.c: Correct the wording of the help messages. Do not
- bother initializing global variable to 0. Use memcpy/memcmp not
- bcopy/bcmp. Verify return value from malloc and check the result
- of rpc transaction _and_ do not act if failed.
- * mount.c: Check return values of initialize_rpc. Use
- memcpy/memcmp not bcopy/bcmp. Verify return value from malloc and
- strdup. Correct comments.
- (mount_root): Check result of connect. Handle errors
- consistently. Reverse loops that are if (! c) {} else when
- appropriate.
- * mount.h: Protect header with #ifdef.
- * name-cache.c: Correct dangerous NPARTIALS macro. Use
- memcpy/memcmp not bcopy/bcmp.
- (find_cache): Use PARTIAL_THRESH, not the constant.
- * nfs-spec.h: Protect header with #ifdef.
- * nfs.c: Use memcpy/memcmp not bcopy/bcmp.
- * nfs.h: Likewise.
- * ops.c (netfs_attempt_mkdir): Check return values of initialize_rpc.
- Use memcpy/memcmp not bcopy/bcmp. Verify return value from malloc and
- check the result of rpc transaction _and_ do not act if failed.
- (netfs_attempt_link): Unlock the directory before the rpc transaction.
- Check the result of rpc transaction _and_ do not act if failed.
- * pager.c: Remove, we do not use it.
- * rpc.c: Use memcpy/memcmp not bcopy/bcmp. Verify return value from
- malloc and check the result of rpc transaction _and_ do not act if
- failed.
- (initialize_rpc): Use AUTH_NONE, not the depreciated
- AUTH_NULL. Return sane values on failure.
- (generate_xid): Make inline.
- (link_rpc): New function. Complements unlink_rpc.
- (conduct_rpc): Use link_rpc.
- (rpc_receive_thread): Reroll to a single loop.
-
-2000-11-26 Marcus Brinkmann <marcus@gnu.org>
-
- * ops.c (netfs_attempt_mkdir): Add casts -1 -> (struct iouser *) -1
- to silence gcc warning.
- (netfs_attempt_create_file): Likewise.
-
-2000-07-26 Mark Kettenis <kettenis@gnu.org>
-
- * Makefile (HURDLIBS): Reorder libs such that the threads lib
- comes before the ports lib. This makes sure the functions in
- libthreads properly override the stubs in libports with the new
- dynamic linker semantics in glibc 2.2.
-
-1999-07-10 Roland McGrath <roland@baalperazim.frob.com>
-
- * nfs.h: Add #include <sys/mman.h> for munmap decl.
-
-1999-07-09 Thomas Bushnell, BSG <tb@mit.edu>
-
- * ops.c (netfs_get_dirents): Use mmap instead of vm_allocate.
- * pager.c (pager_read_page): Likewise.
-
-1999-07-03 Thomas Bushnell, BSG <tb@mit.edu>
-
- * ops.c (netfs_get_dirents): Use munmap instead of vm_deallocate.
- * pager.c (pager_read_page): Likewise.
-
-1999-02-01 Mark Kettenis <kettenis@phys.uva.nl>
-
- * ops.c: Include <maptime.h>.
- (netfs_attempt_utimes): Fix various typo's.
-
-Sun Jan 31 18:39:09 1999 Thomas Bushnell, BSG <tb@mit.edu>
-
- * nfs.c (xdr_encode_sattr_times): Convert nanoseconds to
- microseconds correctly.
-
- * ops.c (netfs_attempt_utimes): Handle new possibility that ATIME
- or MTIME might be null.
-
-1999-01-22 Roland McGrath <roland@baalperazim.frob.com>
-
- * ops.c (netfs_attempt_link): Remove major, minor macro definitions.
- * nfs.c (xdr_decode_fattr): Remove makedev macro definition.
-
-1998-07-20 Roland McGrath <roland@baalperazim.frob.com>
-
- * mount.c (mount_root): Make perror explanation strings consistent.
-
- * mount.c (pmap_initialize_rpc): Make static.
- (mount_initialize_rpc): Likewise.
-
-Wed Aug 20 14:31:03 1997 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * ops.c (netfs_attempt_link): Implement EXCL == 0 case.
- (netfs_attempt_rename): Implement EXCL != 0 case.
-
- * pager.c (netfs_get_filemap): If pager_create fails, return
- error to caller.
-
-Wed Aug 6 15:23:03 1997 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * ops.c (netfs_attempt_unlink): Purge cache-held references
- *before* counting live references. Use new function.
- * name-cache.c (purge_lookup_cache_node): New function.
- * nfs.h (purge_lookup_cache_node): New decl.
-
- * cache.c (netfs_node_norefs): Don't do delete RPC here, fork off
- a separate thread to do it.
- (struct fnd): New type.
- (forked_node_delete): New function.
-
-Mon Aug 4 15:56:37 1997 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * name-cache.c (struct lookup_cache): Drop members `node_cache_fh'
- and `node_cache_len'. New member `np'.
- (enter_lookup_cache): Fill C->np instead of C->node_cache_fh.
- Acquire an additional reference on NP to keep it live. If there
- was a reference there before, release it.
- (purge_lookup_cache): If there is a reference to a node on a
- purged entry, release it.
- (check_lookup_cache): If there is a reference to a node on an
- out-of-date entry, release it. When returning live positive hits,
- use the NP stored instead of looking one up.
-
-Fri Aug 1 15:56:56 1997 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * main.c (netfs_append_args): Append --name-cache-timeout and
- --name-cache-neg-timeout values.
-
-Tue Jul 29 15:38:15 1997 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * name-cache.c (check_lookup_cache): Use name_cache_neg_timeout in
- preference to name_cache_timeout for negative hits.
-
- * nfs.h (name_cache_neg_timeout): New variable.
- * main.c (DEFAULT_NAME_CACHE_NEG_TIMEOUT): New macro.
- (name_cache_neg_timeout): Initialize new variable.
- (OPT_NCACHE_NEG_TO): New option key.
- (common_options): Add --name-cache-neg-timeout switch.
- (parse_common_opt): Process OPT_NCACHE_NEG_TO option key.
-
- * ops.c (netfs_attempt_lookup): Do cast of -1 correctly to match
- check_lookup_cache and ANSI C rules.
-
- * name-cache.c (check_lookup_cache): Unlock DIR correctly before
- returning a negative cache hit.
-
- * rpc.c (rpc_receive_thread): Don't print "dropping reply"
- messages any more.
-
- * ops.c (netfs_attempt_lookup): Cash all lookups, both positive
- and negative.
- (netfs_attempt_mkdir): Purge cache before creating directory
- entry.
- (netfs_attempt_link): Likewise.
- (netfs_attempt_create_file): Likewise.
-
- * ops.c (netfs_attempt_lookup): Pass correct node to
- enter_lookup_cache as the child.
-
-Thu Jul 24 13:15:56 1997 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * name-cache.c: New file.
- * ops.c (netfs_attempt_lookup): Check lookup cache before trying
- RPC. After successful lookup, make cache entry.
- (netfs_attempt_unlink): Purge cache before doing operation.
- (netfs_attempt_rmdir): Likewise.
- (netfs_attempt_rename): Purge cache for both names before operation.
- * nfs.h (enter_lookup_cache, purge_lookup_cache,
- check_lookup_cache): New prototypes.
- * Makefile (SRCS): Add name-cache.c.
-
- * nfs.h (name_cache_timeout): New variable.
- * main.c (DEFAULT_NAME_CACHE_TIMEOUT): New macro.
- (name_cache_timeout): Initialize new variable.
- (OPT_NCACHE_TO): New option key.
- (common_options): Add --name-cache-timeout switch.
- (parse_common_opt): Process OPT_NCACHE_TO option key.
-
- * cache.c (lookup_fhandle): Don't parse NFS XDR format, instead
- take a length arg. Return void. All callers changed to use new
- function xdr_decode_fhandle.
- * nfs.c (xdr_decode_fhandle): New function.
- * nfs.h (xdr_decode_fhandle): New prototype.
- (lookup_fhandle): Update prototype.
-
-1997-07-23 Miles Bader <miles@gnu.ai.mit.edu>
-
- * main.c: Include <error.h>.
- (main): Failure to map MAPPED_TIME is a fatal error.
-
-1997-06-09 Miles Bader <miles@gnu.ai.mit.edu>
-
- * ops.c (netfs_validate_stat): Don't clear NP->istranslated.
-
-Wed May 21 12:07:24 1997 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * ops.c (netfs_attempt_create_file): Only attempt chown if the
- create succeeded.
-
-Tue May 20 15:35:39 1997 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * nfs.c (xdr_encode_create_state): New arg OWNER. Set the owner
- of the new file to it. All callers changed.
- * nfs.h (xdr_encode_create_state): Update prototype.
- * ops.c (netfs_attempt_mkdir): If owner didn't get set correctly
- (some servers ignore it) then try a chown.
- (netfs_attempt_create_file): Likewise.
-
-Thu Apr 10 13:25:12 1997 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * ops.c (netfs_attempt_set_size): Short circuit EACCES to cover
- one important case.
-
-Fri Feb 21 16:47:35 1997 Miles Bader <miles@gnu.ai.mit.edu>
-
- * main.c (netfs_append_args): Present the remote filesystem as a
- single argument, in HOST:FS format.
-
-Wed Feb 12 13:53:42 1997 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * ops.c (netfs_check_open_permissions): If this is a new node,
- don't report an error here. (Though, later I/O requests still
- might fail.)
-
-Wed Nov 20 17:13:59 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * Makefile (HURDLIBS): Add iohelp.
-
-Mon Nov 18 17:01:38 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * ops.c (guess_mode_use): Delete function.
- (netfs_report_access): Use fshelp_access instead of
- guess_mode_use. Change return type.
-
-Sat Nov 16 18:24:55 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * Makefile (SRCS): Remove `cred.c'.
- * cred.c: Delete file.
- * nfs.h (struct netcred): Delete type.
- (cred_has_uid, cred_has_gid): Delete functions.
- (nfs_initialize_rpc): netcred arg now iouser.
- * ops.c: Change struct netcred to struct iouser throughout.
- * pager.c: Likewise.
- * cache.c (netfs_node_norefs): Likewise.
- * nfs.c (nfs_initialize_rpc): Convert use of netcred to iouser.
-
-Mon Nov 4 21:23:58 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * rpc.c (rpc_list_lock): Delete variable. Omit all mention of it
- throughout this file. Expand the use of outstanding_lock to cover
- what rpc_list_lock used to handle.
-
-Fri Nov 1 18:12:21 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * rpc.c (conduct_rpc): Unlock OUTSTANDING_LOCK if write fails.
-
-Wed Oct 30 18:25:18 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * ops.c (netfs_attempt_statfs): Convert incoming numbers from
- network to host byte order.
- Don't convert sizes from IOSIZE to BSIZE units.
- Return BSIZE in f_bsize field, not IOSIZE.
- Fill in f_fsid field.
-
-Thu Oct 24 23:01:35 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * main.c (runtime_argp_children): New variable.
- (runtime_argp_parents): Variable removed.
- (runtime_argp): Use RUNTIME_ARGP_CHILDREN, not RUNTIME_ARGP_PARENTS.
- (main): Rename ARGP_PARENTS to ARGP_CHILDREN, and change the
- element type to `struct argp_child'; change the reference in ARGP
- accordingly.
-
-Fri Oct 4 00:00:12 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * mount.c: Add hacks to avoid idiotic sun definitions of TRUE,
- FALSE, and malloc in <rpc/types.h>.
- * nfs.h (bool_t, enum_t): Typedefs removed.
-
-Thu Oct 3 12:04:36 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * ops.c (netfs_attempt_write): If we get EINTR after having
- already written something, return a short count.
-
- * ops.c (netfs_attempt_create_file): If verify_nonexistent returns
- an error, bother to properly unlock NP before returning.
-
-Mon Sep 30 15:45:31 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * main.c (OPT_RSIZE): Changed to 'R'.
- (OPT_WSIZE): Changed to 'W'.
- (doc): Add general description.
-
-Thu Sep 26 14:03:07 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * nfs.h (enum_t): New decl.
-
-Wed Sep 18 13:03:22 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * main.c (netfs_append_args): Renamed from netfs_get_options.
- Don't initialize ARGZ & ARGZ_LEN anymore.
- Add remote filesystem spec to output.
- (hold): Variable removed.
- (main): Don't use HOLD anymore.
-
-Thu Sep 12 16:46:47 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * Makefile (HURDLIBS): New variable.
- (nfs): Omit special dependency.
-
-Tue Sep 3 14:00:25 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * nfs-spec.h: Renamed from rpcsvc/nfs_prot.h.
- * mount.c: Include "mount.h" instead of <rpcsvc/mount.h>.
- * nfs.h: Include "nfs-spec.h" instead of <rpcsvc/nfs_prot.h>.
- * rpcsvc/mount.h: Deleted file.
- * rpcsvc: Deleted directory.
- * mount.h (MOUNTPROG): Renamed from MOUNT_RPC_PROGRAM.
- (MOUNTVERS): Renamed from MOUNT_RPC_VERSION.
- * Makefile (RPCSVC_FILES): Deleted var.
- (lndist, lndist-rpcsvc-files,
- $(top_srcdir)/hurd-snap/$(dir)/rpcsvc): Deleted targets.
- (LCLHDRS): Added mount.h and nfs-spec.h.
-
-Thu Aug 29 10:41:27 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * rpcsvc/nfs_prot.h (createmode): Spell EXCLUSIVE correctly.
- * nfs.c (hurd_mode_to_nfs_type): New function.
- * nfs.h (hurd_mode_to_nfs_type): New decl.
- * ops.c (netfs_attempt_rmdir): process_wcc_stat for NP, not DIR.
- (netfs_attempt_link): Spell netfs_validate_stat correctly.
- (minor, major): New macros.
- (netfs_report_access): Don't try and return an error.
-
- * rpc.c (conduct_rpc): Tolerate and return errors from write.
-
- * Makefile (RPCSVC_FILES): New variable.
- (lndist): Depend on lndist-rpcsvc-files.
- (lndist-rpcsvc-files, $(top_srcdir)/hurd-snap/$(dir)/rpcsvc): New
- targets.
-
-Fri Aug 16 11:56:53 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * ops.c (process_wcc_stat): New function.
- (netfs_attempt_chown): Use process_wcc_stat instead of
- register_fresh_stat. Pack and unpack v3 SETATTR structure if
- appropriate.
- (netfs_attempt_chmod): Likewise.
- (netfs_attempt_utimes): Likewise.
- (netfs_attempt_set_size): Likewise.
- (netfs_attempt_lookup): Use process_returned_stat instead of
- register_fresh state. Unpack v3 LOOKUP structure if appropriate.
- (netfs_attempt_link): Likewise.
- (verify_nonexistent): Assert that we are v2.
- (netfs_report_access): Use NFS3PROC_ACCESS if we are v3.
- (netfs_check_open_permissions): Use netfs_report_access.
- (netfs_attempt_readlink): Unpack v3 READLINK structure if
- appropriate.
- (netfs_attempt_read): Pack and unpack v3 READ structure in
- appropriate. Use process_returned_stat instead of
- register_fresh_stat.
- (netfs_attempt_write): Pack and unpack v3 WRITE structure in
- appropriate. Use process_wcc_stat instead of
- register_fresh_stat.
- (netfs_attempt_create_file): Pack and unpack v3 CREATE structure
- if appropriate. Use process_returned_stat instead of
- register_fresh_stat.
- (netfs_attempt_link) [CHRDEV, BLKDEV, FIFO, SOCK]: If v3, use new
- MKNOD call instead of CREATE with overloaded mode.
- (netfs_attempt_link) [SYMLINK]: If pack and unpack v3 SYMLINK
- structure if appropriate.
- (netfs_attempt_unlink): Unpack v3 REMOVE structure if appropriate.
- (netfs_attempt_rmdir): Unpack v3 RMDIR structure if appropriate.
- (netfs_attempt_rename): Unpack v3 RENAME structure if appropriate.
-
- * rpcsvc/nfs_prot.h (ACCESS3_READ, ACCESS3_LOOKUP, ACCESS3_MODIFY,
- ACCESS3_EXTEND, ACCESS3_DELETE, ACCESS3_EXECUTE): New macros.
-
- * ops.c (netfs_attempt_chown): Bother to read NFS error/success
- value.
-
-Thu Aug 15 15:24:29 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * ops.c (verify_nonexistent): Don't need to lock DIR; it's already
- locked.
- (netfs_attempt_link): Lock DIR *before* calling verify_nonexistent.
-
- * nfs.c (xdr_encode_fhandle) [protocol_version == 2]: Copy
- fhandle->data, not fhandle itself.
-
-Wed Aug 14 12:33:37 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * nfs.c (xdr_encode_fhandle): Second arg now a `struct fhandle *'.
- Encode v3 fhandle if appropriate.
- * cache.c: Include <netinet/in.h>.
- (hash): New arg `length'.
- (lookup_fhandle): Changed to be more like xdr_decode_* functions.
- All callers changed. Do the right thing for v3.
- (recache_handle): Likewise.
- * nfs.h (struct fhandle): New type.
- (struct netnode): Member `handle' is now a `struct fhandle'.
- (xdr_encode_fhandle): Second arg now a `struct fhandle *'.
- (lookup_fhandle, recache_handle): Changed to be more like
- xdr_decode_* functions.
-
- * rpcsvc/nfs_prot.h (enum sattr_time_how): New type.
- * nfs.c (xdr_encode_64bit): New function.
- (xdr_encode_sattr_mode, xdr_encode_sattr_ids,
- xdr_encode_sattr_size, xdr_encode_sattr_times,
- xdr_encode_create_state, xdr_encode_sattr_stat): Encode v3 sattr
- if appropriate.
- (xdr_decode_fattr): Decode v3 fattr if appropriate.
-
- * rpcsvc/nfs_prot.h (NFS_FHSIZE): Deleted macro.
- (NFS2_FHSIZE, NFS3_FHSIZE, NFS3_COOKIEVERFSIZE, NFS3_CREATEVERFSIZE,
- NFS3_WRITEVERFSIZE): New macros.
- (enum ftype): Deleted NFFIFO. Added NF2FIFO, NF3FIFO, and an
- alias NF2BAD for NF3FIFO.
- (NFSPROC_NULL, NFSPROC_GETATTR, NFSPROC_SETATTR,
- NFSPROC_LOOKUP, NFSPROC_READLINK, NFSPROC_READ,
- NFSPROC_WRITE, NFSPROC_CREATE, NFSPROC_REMOVE,
- NFSPROC_RENAME, NFSPROC_LINK, NFSPROC_SYMLINK, NFSPROC_MKDIR,
- NFSPROC_RMDIR, NFSPROC_READDIR): Replace with new
- macros that take a version arg. All users changed to use new
- version arg.
- (NFS_PROTOCOL_FUNC): New macro.
- (NFS2PROC_NULL, NFS2PROC_GETATTR, NFS2PROC_SETATTR, NFS2PROC_ROOT,
- NFS2PROC_LOOKUP, NFS2PROC_READLINK, NFS2PROC_READ,
- NFS2PROC_WRITECACHE, NFS2PROC_WRIT, NFS2PROC_CREATE,
- NFS2PROC_REMOVE, NFS2PROC_RENAME, NFS2PROC_LINK, NFS2PROC_SYMLINK,
- NFS2PROC_MKDIR, NFS2PROC_RMDIR, NFS2PROC_READDIR, NFS2PROC_STATFS,
- NFS3PROC_NULL, NFS3PROC_GETATTR, NFS3PROC_SETATTR,
- NFS3PROC_LOOKUP, NFS3PROC_ACCESS, NFS3PROC_READLINK,
- NFS3PROC_READ, NFS3PROC_WRITE, NFS3PROC_CREATE, NFS3PROC_MKDIR,
- NFS3PROC_SYMLINK, NFS3PROC_MKNOD, NFS3PROC_REMOVE, NFS3PROC_RMDIR,
- NFS3PROC_RENAME, NFS3PROC_LINK, NFS3PROC_READDIR,
- NFS3PROC_READDIRPLUS, NFS3PROC_FSSTAT, NFS3PROC_FSINFO,
- NFS3PROC_PATHCONF, NFS3PROC_COMMIT): New macros. All callers
- appropriately changed.
-
- * nfs.c (nfs_error_trans): NFS_SERVERFAULT maps to EIO;
- NFSERR_BADTYPE maps to EOPNOTSUPP.
-
- * rpcsvc/nfs_prot.h (nfsstat, ftype, struct nfs_fh, nfs_fh, struct
- nfstime, nfstime, struct fattr, fattr, struct sattr, sattr,
- filename, nfspath, struct attrstat, attrstat, struct sattrargs,
- sattrargs, struct diropargs, diropargs, struct diropokres,
- diropokres, struct diropres, diropres, struct readlinkres,
- readlinkres, struct readargs, readargs, struct readokres,
- readokres, struct readres, readres, struct writeargs, writeargs,
- struct createargs, createargs, struct renameargs, renameargs,
- struct linkargs, linkargs, struct symlinkargs, symlinkargs,
- nfscookie, struct readdirargs, readdirargs, struct entry, entry,
- struct dirlist, dirlist, struct readdirres, readdirres, struct
- statfsokres, statfsokres, struct statfsres, statfsres): Delete
- unused types.
- (xdr_nfsstat, xdr_ftype, xdr_nfs_fh, xdr_nfstime, xdr_fattr,
- xdr_sattr, xdr_filename, xdr_nfspath, xdr_attrstat, xdr_sattrargs,
- xdr_diropargs, xdr_diropokres, xdr_diropres, xdr_readlinkres,
- xdr_readargs, xdr_readokres, xdr_readres, xdr_writeargs,
- xdr_createargs, xdr_renameargs, xdr_linkargs, xdr_symlinkargs,
- xdr_nfscookie, xdr_readdirargs, xdr_entry, xdr_dirlist,
- xdr_readdirres, xdr_statfsokres, xdr_statfsres, nfsproc_null_2,
- nfsproc_getattr_2, nfsproc_setattr_2, nfsproc_root_2,
- nfsproc_lookup_2, nfsproc_readlink_2, rfsproc_read_2,
- nfsproc_writecache_2, nfsproc_write_2, nfsproc_create_2,
- nfsproc_remove_2, nfsproc_rename_2, nfsproc_link_2,
- nfsproc_symlink_2, nfsproc_mkdir_2, nfsproc_rmdir_2,
- nfsproc_readdir_2, nfsproc_statfs_2): Delete unused function
- declarations.
-
-Tue Aug 13 14:57:03 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * ops.c (netfs_attempt_create_file): Sun's NFS client does not
- expect NFSPROC_CREATE to be exclusive. Accordingly, on most
- servers (including ours) it isn't exclusive. (Which, of course,
- contradicts Sun's own RGC 1094, section 2.2.10.) Which means we
- have to insert our own test here to make sure the file doesn't
- exist before attempting NFSPROC_CREATE.
- (netfs_attempt_link): Likewise.
- (verify_nonexistent): New function.
-
-Mon Aug 12 11:13:58 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * nfs.c (nfs_error_trans): Repair syntax.
-
-Thu Aug 8 18:48:22 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * nfs.h (protocol_version): New variable.
- * mount.c (protocol_version): Define and initialize to `2'.
-
- * rpcsvc/nfs_prot.h (enum nfsstat): Added new nfsv3 error codes:
- NFSERR_XDEV, NFSERR_INVAL, NFSERR_MLINK, NFSERR_REMOTE,
- NFSERR_BADHANDLE, NFSERR_NOT_SYNC, NFSERR_BAD_COOKIE,
- NFSERR_NOTSUPP, NFSERR_TOOSMALL, NFSERR_SERVERFAULT,
- NFSERR_BADTYPE, NFSERR_JUKEBOX.
- (NFSERR_TRYLATER): New macro.
- * nfs.c (nfs_error_trans): Understand v3 error codes if we are
- runnnig v3.
-
-Wed Jul 31 13:25:00 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * ops.c (netfs_attempt_statfs): Use NFSPROC_STATFS, not SETATTR to
- do a statfs.
-
-Tue Jul 23 19:41:07 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * nfs.c (xdr_encode_sattr_times): `struct timespec' now uses a
- field prefix of `tv_'.
-
-Wed Jul 17 13:12:31 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * main.c (mounted_soft): Initialize to zero.
-
-Thu Jul 4 17:14:42 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * ops.c (netfs_attempt_link) [case SYMLINK]: Include directory
- handle as an RPC arg.
-
-Wed Jun 26 16:41:00 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * main.c (netfs_get_options): New function.
- (netfs_parse_runtime_options, netfs_unparse_runtime_options):
- Functions removed.
- (runtime_argp_parents, runtime_argp, netfs_runtime_argp): New variables.
- (main): Use &NETFS_STD_STARTUP_ARGP insteda of NETFS_STARTUP_ARGP.
-
-Thu Jun 13 09:24:24 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * Makefile (SRCS): Remove pager.c.
- * nfs.h (struct netnode): Add member `fileinfo'.
- * nfs.h (register_fresh_stat): Add decl.
-
-Wed Jun 12 22:37:31 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * Makefile (SRCS): Add pager.c.
-
-Wed May 22 18:49:16 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * main.c (parse_startup_opt): Use ARGP_ERR_UNKNOWN instead of EINVAL.
-
-Tue May 14 14:00:21 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * ops.c (netfs_attempt_unlink): Add new arg in call to
- netfs_attempt_link.
-
-Sat May 11 01:10:05 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * main.c (parse_common_opt): Use ARGP_ERR_UNKNOWN instead of EINVAL.
-
-Fri May 10 18:15:11 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * ops.c (netfs_attempt_rename, netfs_attempt_link): New parm EXCL,
- but don't implement the hard case yet.
-
-Thu May 9 20:24:21 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * ops.c (netfs_attempt_statfs): Expect and fill in new statfs
- buffer.
-
-Fri Apr 19 13:50:25 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * main.c (main): Failure to bind privileged ports is indicated by
- EACCES, not EPERM.
-
-Thu Apr 11 13:51:33 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * ops.c (guess_mode_use): New function.
- (netfs_check_open_permissions, netfs_report_access): Replace old
- clever versions with less obtrusive one.
-
-Tue Apr 2 09:12:28 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * ops.c (netfs_report_access): Bother to initialize LEN.
-
-Fri Mar 29 17:26:14 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * rpc.c: Define malloc to something random around include of rpc/*
- header files to avoid bogus definition there.
-
-Fri Mar 29 17:10:58 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * ops.c (netfs_report_access): Make sure netfs_attempt_read return
- a reasonable LEN.
- (netfs_attempt_write): Truncate to THISAMT instead of AMT.
-
-Tue Mar 19 11:00:54 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * Makefile (LCLHDRS): Drop rpc.h.
-
- * consts.c: Doc fixes.
- * cache.c: Likewise.
- * cred.c: Likewise.
- * main.c: Likewise.
- * mount.c: Likewise.
- * mount.h: Likewise.
- * nfs.c: Likewise.
- * ops.c: Likewise.
- * rpc.c: Likewise.
-
- * rpc.c (rpc_receive_thread): Allocate receive buffer big enough
- for largest read we expect.
-
- * cache.c (lookup_fhandle): Correctly install new node in hash
- table slot.
-
- * main.c (parse_startup_opt): Pass STATE, not STATE->argp in call
- to argp_error.
-
- * cache.c (lookup_fhandle): Initialize NN->dead_dir and
- NN->dead_name.
-
- * ops.c: Include <unistd.h>.
- (register_fresh_stat): Repair syntax.
-
-Mon Mar 18 19:49:28 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * main.c (main, netfs_parse_runtime_options): Pass new arg to
- argp_parse.
-
-Mon Mar 18 11:19:27 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * ops.c (register_fresh_stat): Set fs_fsid, st_fstype, st_gen,
- st_author, and st_flags here.
- * nfs.c (xdr_decode_fattr): Don't set st_fstype, st_gen,
- st_author, or st_flags here.
-
- * ops.c (netfs_attempt_write): Increment OFFSET each time around
- the loop.
-
- * nfs.c (xdr_encode_create_state): Call hurd_mode_to_nfs_mode and
- htonl on MODE.
-
- * nfs.c (xdr_encode_sattr_stat): New function.
-
-Thu Mar 14 15:11:41 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * nfs.h (struct netnode): New members `dtrans' and `transarg'.
- * cache.c (lookup_fhandle): Initialize NN->dtrans.
- (netfs_node_norefs): Free transarg if necessary.
- (recache_handle): New function.
- * ops.c (netfs_attempt_mkfile): Make dtrans possible if it
- isn't already.
- (netfs_attempt_unlink): Likewise, when doing the rename hack.
- (netfs_attempt_mksymlink): Implement using dtrans and transarg.
- (netfs_attempt_mkdev): Likewise.
- (register_fresh_stat): If NP->nn->dtrans is set, then mutate the
- mode here.
- (netfs_attempt_readlink): If NP->nn->dtrans is SYMLINK, then DTRT.
- (netfs_attempt_link): Only issue NFSPROC_LINK if dtrans is not
- operative. Otherwise, DTRT.
- (netfs_attempt_chmod): Implement type-changing using dtrans.
-
-Tue Mar 12 15:23:32 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * ops.c (netfs_set_translator, netfs_attempt_mksymlink,
- netfs_attempt_mkdev): New functions.
- (netfs_attempt_chmod): Detect attempt to change node type.
- (netfs_validate_stat): Clear NP->istranslated.
-
-Mon Mar 4 16:16:13 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * main.c (main): Use NETFS_STARTUP_ARGP.
- (netfs_parse_runtime_options, netfs_unparse_runtime_options): New funs.
-
-Wed Feb 28 19:24:23 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * main.c (options): New variable.
- (main): Parse our arguments.
diff --git a/nfs/Makefile b/nfs/Makefile
index 9c3f2b7a..10ca2587 100644
--- a/nfs/Makefile
+++ b/nfs/Makefile
@@ -1,5 +1,7 @@
#
-# Copyright (C) 1995,96,97,2000,01 Free Software Foundation, Inc.
+# Copyright (C) 1995, 1996, 1997, 2000, 2001, 2008, 2011 Free Software
+# Foundation, Inc.
+#
# Written by Michael I. Bushnell.
#
# This file is part of the GNU Hurd.
@@ -26,6 +28,6 @@ LCLHDRS = nfs.h mount.h nfs-spec.h
SRCS = ops.c rpc.c mount.c nfs.c cache.c consts.c main.c name-cache.c \
storage-info.c
OBJS = $(SRCS:.c=.o)
-HURDLIBS = netfs fshelp iohelp threads ports
+HURDLIBS = netfs fshelp iohelp threads ports ihash shouldbeinlibc
include ../Makeconf
diff --git a/nfs/mount.c b/nfs/mount.c
index 07dbb19b..6120f87a 100644
--- a/nfs/mount.c
+++ b/nfs/mount.c
@@ -199,7 +199,7 @@ mount_root (char *name, char *host)
err = conduct_rpc (&rpcbuf, &p);
if (err)
{
- error (0, err, name);
+ error (0, err, "%s", name);
goto error_with_rpcbuf;
}
/* XXX Protocol spec says this should be a "unix error code"; we'll
@@ -209,7 +209,7 @@ mount_root (char *name, char *host)
p++;
if (err)
{
- error (0, err, name);
+ error (0, err, "%s", name);
goto error_with_rpcbuf;
}
diff --git a/nfs/nfs.c b/nfs/nfs.c
index 2628a570..4916df65 100644
--- a/nfs/nfs.c
+++ b/nfs/nfs.c
@@ -1,5 +1,8 @@
/* nfs.c - XDR frobbing and lower level routines for NFS client.
- Copyright (C) 1995, 1996, 1997, 1999, 2002 Free Software Foundation, Inc.
+
+ Copyright (C) 1995, 1996, 1997, 1999, 2002, 2007
+ Free Software Foundation, Inc.
+
Written by Michael I. Bushnell, p/BSG.
This file is part of the GNU Hurd.
@@ -335,10 +338,10 @@ xdr_encode_sattr_stat (int *p,
*(p++) = htonl (st->st_uid);
*(p++) = htonl (st->st_gid);
*(p++) = htonl (st->st_size);
- *(p++) = htonl (st->st_atime);
- *(p++) = htonl (st->st_atime_usec);
- *(p++) = htonl (st->st_mtime);
- *(p++) = htonl (st->st_mtime_usec);
+ *(p++) = htonl (st->st_atim.tv_sec);
+ *(p++) = htonl (st->st_atim.tv_nsec / 1000);
+ *(p++) = htonl (st->st_mtim.tv_sec);
+ *(p++) = htonl (st->st_mtim.tv_nsec / 1000);
}
else
{
@@ -351,11 +354,11 @@ xdr_encode_sattr_stat (int *p,
*(p++) = htonl (1); /* set size */
p = xdr_encode_64bit (p, st->st_size);
*(p++) = htonl (SET_TO_CLIENT_TIME); /* set atime */
- *(p++) = htonl (st->st_atime);
- *(p++) = htonl (st->st_atime_usec * 1000);
+ *(p++) = htonl (st->st_atim.tv_sec);
+ *(p++) = htonl (st->st_atim.tv_nsec);
*(p++) = htonl (SET_TO_CLIENT_TIME); /* set mtime */
- *(p++) = htonl (st->st_mtime);
- *(p++) = htonl (st->st_mtime_usec * 1000);
+ *(p++) = htonl (st->st_mtim.tv_sec);
+ *(p++) = htonl (st->st_mtim.tv_nsec);
}
return p;
}
@@ -442,24 +445,24 @@ xdr_decode_fattr (int *p, struct stat *st)
p++;
st->st_ino = ntohl (*p);
p++;
- st->st_atime = ntohl (*p);
+ st->st_atim.tv_sec = ntohl (*p);
p++;
- st->st_atime_usec = ntohl (*p);
+ st->st_atim.tv_nsec = ntohl (*p);
p++;
- st->st_mtime = ntohl (*p);
+ st->st_mtim.tv_sec = ntohl (*p);
p++;
- st->st_mtime_usec = ntohl (*p);
+ st->st_mtim.tv_nsec = ntohl (*p);
p++;
- st->st_ctime = ntohl (*p);
+ st->st_ctim.tv_sec = ntohl (*p);
p++;
- st->st_ctime_usec = ntohl (*p);
+ st->st_ctim.tv_nsec = ntohl (*p);
p++;
- if (protocol_version == 3)
+ if (protocol_version < 3)
{
- st->st_atime_usec /= 1000;
- st->st_mtime_usec /= 1000;
- st->st_ctime_usec /= 1000;
+ st->st_atim.tv_nsec *= 1000;
+ st->st_mtim.tv_nsec *= 1000;
+ st->st_ctim.tv_nsec *= 1000;
}
return p;
diff --git a/nfs/ops.c b/nfs/ops.c
index 96190d2e..05cfbe9a 100644
--- a/nfs/ops.c
+++ b/nfs/ops.c
@@ -1,5 +1,5 @@
/* ops.c - Libnetfs callbacks for node operations in NFS client.
- Copyright (C) 1994,95,96,97,99,2002 Free Software Foundation, Inc.
+ Copyright (C) 1994,95,96,97,99,2002,2011 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
@@ -1881,17 +1881,6 @@ netfs_get_dirents (struct iouser *cred, struct node *np,
}
-/* Implement the netfs_set_translator callback as described in
- <hurd/netfs.h>. */
-error_t
-netfs_set_translator (struct iouser *cred,
- struct node *np,
- char *argz,
- size_t argzlen)
-{
- return EOPNOTSUPP;
-}
-
/* Implement the netfs_attempt_mksymlink callback as described in
<hurd/netfs.h>. */
error_t
diff --git a/nfs/rpc.c b/nfs/rpc.c
index f5e19066..0b0444d0 100644
--- a/nfs/rpc.c
+++ b/nfs/rpc.c
@@ -75,7 +75,7 @@ generate_xid ()
credential structure with UID, GID, and SECOND_GID; any of these
may be -1 to indicate that it does not apply, however, exactly zero
or two of UID and GID must be -1. The returned address is a pointer
- to the start of the payload. If NULL is returned, an error occured
+ to the start of the payload. If NULL is returned, an error occurred
and the code is set in errno. */
int *
initialize_rpc (int program, int version, int rpc_proc,
diff --git a/nfsd/ChangeLog b/nfsd/ChangeLog
deleted file mode 100644
index b0da0207..00000000
--- a/nfsd/ChangeLog
+++ /dev/null
@@ -1,239 +0,0 @@
-2006-03-15 Thomas Schwinge <tschwinge@gnu.org>
-
- * loop.c (server_loop): Fix invalid lvalues.
-
-2002-09-29 Marcus Brinkmann <marcus@gnu.org>
-
- * loop.c (server_loop): Use memset instead bzero.
- (server_loop): Add parenthesis for post-decrement (even
- though it is only used as an lvalue here). Increment P after
- using it in the macro, not within.
- * ops.c (complete_setattr): Likewise.
- (op_setattr, op_read, op_write, op_create, op_symlink, op_mkdir,
- op_readdir, op_getport): Likewise.
- * xdr.c (encode_fattr): Likewise.
- (encode_data): Likewise. Also use memcpy instead bcopy.
- (encode_statfs): Likewise.
- (decode_name): Likewise. Also use memcpy instead bcopy.
- (encode_fhandle): Use memcpy instead bcopy.
- * cache.c (process_cred): Add parenthesis for post-decrement (even
- though it is only used as an lvalue here). Increment P after
- using it in the macro, not within.
- (idspec_lookup): Use memcpy, not bcopy.
- (lookup_cache_handle): Likewise.
- (create_cached_handle): Likewise.
- (check_cached_replies): Likewise.
-
-2002-05-29 Roland McGrath <roland@frob.com>
-
- * nfsd.h (struct proctable): [0] -> [], for newfangled GCC.
-
-2002-05-08 Roland McGrath <roland@frob.com>
-
- * main.c (main): Cast int to intptr_t before any_t.
-
-2002-05-07 Roland McGrath <roland@frob.com>
-
- * loop.c (server_loop): size_t -> socklen_t
- * cache.c (fh_hash): int -> intptr_t
-
-2002-05-03 Roland McGrath <roland@frob.com>
-
- * main.c: Include <error.h>.
- * fsys.c: Likewise.
-
-2002-03-23 James A. Morrison <ja2morri@uwaterloo.ca>
-
- * fsys.c (init_filesystems): Use error, not fprintf. Use
- MACH_PORT_NULL explicitly.
- (write_filesystems): Use error, not fprintf. Use ERR, not errno.
- * main.c (main): Use error, not perror and exit.
-
-2001-02-25 Roland McGrath <roland@frob.com>
-
- * ops.c: Include <string.h> for decls of built-ins.
-
-2000-12-02 Marcus Brinkmann <marcus@gnu.org>
-
- * ops.c (op_readlink): Before returning, check if the buffer
- pointed to by transp is ours. If not, munmap it.
- (op_read): Likewise for bp.
- (op_readdir): Don't alloca a buffer here. Instead initialize
- BUF and BUFSIZE to 0 and let the server (eh, MiG) do it.
- munmap BUF before returning.
-
-2000-12-01 Marcus Brinkmann <marcus@gnu.org>
-
- * cache.c (scan_creds): Move I inside for-statement.
- Replace inner for-loop with a while-loop. New variable
- NEXT_I set to I->NEXT, because we might free I.
- Set I to NEXT_I at end of while block.
- Move update of leastidlastuse inside if block, because
- otherwise we will constantly prevent ourself from scanning.
- (scan_fhs): Very much the same.
- (scan_replies): Likewise. Also free CR.
-
- (check_cached_reply): Make HASH value absolute (as XID can be
- negative, and thus the modulus).
- Initialize REFERENCES to 1.
-
-2000-03-17 Thomas Bushnell, BSG <tb@mit.edu>
-
- * cache.c (create_cached_handle): Add comment.
-
-1999-07-10 Roland McGrath <roland@baalperazim.frob.com>
-
- * cache.c: Add #include <sys/mman.h> for munmap decl.
-
-1999-07-03 Thomas Bushnell, BSG <tb@mit.edu>
-
- * cache.c (create_cached_handle): Use munmap instead of
- vm_deallocate.
-
-1998-12-20 Roland McGrath <roland@baalperazim.frob.com>
-
- * loop.c (server_loop): Cosmetic.
-
- * nfsd.h: Include <rpc/types.h>.
- (bool_t, enum_t): Remove typedefs.
-
-1998-10-20 Roland McGrath <roland@baalperazim.frob.com>
-
- * cache.c (scan_creds): Add braces to silence gcc warning.
- (scan_fhs): Likewise.
- (scan_replies): Likewise.
-
-Thu Sep 26 14:09:20 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * nfsd.h (enum_t): New type.
-
- * cache.c: Don't inclide <rpc/auth_unix.h>.
-
-Thu Sep 12 16:52:13 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * Makefile (HURDLIBS): New variable.
- (nfsd): Delete special depedency.
-
-Tue Sep 3 14:15:50 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * loop.c: Include "../nfs/mount.h" instead of
- "../nfs/rpcsvc/mount.h".
- * ops.c: Likewise.
- * nfsd.h: Include "../nfs/nfs-spec.h" instead of
- "../nfs/rpcsvc/nfs_prot.h".
-
-Wed Aug 14 13:46:45 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * ops.c (nfstable): Renamed to nfs2table.
- * nfsd.h (nfstable): Likewise.
- * loop.c (server_loop): Reference nfs2table instead of nfstable.
-
- * nfsd.h, cache.c, ops.c, xdr.c: Use new names for things that
- have just been changed in ../nfs/rpcsvc/nfs_prot.h.
- * xdr.c (hurd_mode_to_nfs_type): New parm VERSION; all callers
- changed.
- (encode_fattr): New parm VERSION; all callers changed.
- * nfsd.h (encode_fattr): New parm VERSION.
-
-Tue Aug 13 14:38:36 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * ops.c (op_create): Sun's NFS client implementation actually
- bombs if do do what RFC 1094 says to do in section 2.2.10. So
- don't pass O_EXCL, but do pass O_TRUNC. That's what NetBSD does.
-
- * ops.c (op_setattr): Fill in an fattr in reply.
-
-Mon Aug 12 11:15:15 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * Makefile (installationdir): Include quotes in variable expansion
- here.
- * main.c: Build index_file better.
-
- * xdr.c (nfs_error_trans): New errors for IO and XDEV don't have
- prefixed E.
-
- * main.c (main): Cast second cthread_fork args.
-
- * nfsd.h (nfs_error_trans): Add new arg to prototype.
-
-Thu Aug 8 19:20:31 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * xdr.c (nfs_error_trans): New parm `version'. All callers
- changed. If we are version 3, then return one of the new v3 error
- codes if appropriate.
-
-Wed Aug 7 11:39:31 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * main.c (index_file): New var.
- (index_file_name): Initialize from index_file.
- (main): Don't initialize index_file_name here.
-
- * ops.c (op_null, op_getattr, op_setattr, op_lookup, op_readlink,
- count_read_buffersize, op_read, op_write, op_create, op_remove,
- op_rename, op_link, op_symlink, op_mkdir, op_rmdir,
- count_readdir_buffersize, op_statfs, op_mnt, op_getport): Add new
- parm `version'.
- * loop.c (server_loop): Supply VERSION to PROC->alloc_reply and
- PROC->func.
- * nfsd.h (struct procedure): Add new parm to `func' and
- `alloc_reply' members to specify protocol version.
-
- * ops.c (mounttable): Use op_null for MOUNTPROC_UMNT and
- MOUNTPROC_UMNTALL.
-
- * ops.c (op_create): Ignore most of setattr structure given.
- (op_mkdir): Likewise.
- (complete_setattr): Clean up and be less active when possible.
-
- * ops.c (op_readdir): Correctly end list of directory entries.
-
- * nfsd.h (authserver): New variable.
-n * main.c: Include <hurd.h>.
- (main): Initialize AUTHSERVER.
- * cache.c: Include <hurd/io.h> and <hurd/auth.h>.
- (create_cached_handle): Reauthenticate port before calling
- file_getfh.
-
- * fsys.c (init_filesystems): When setting NFSYS, it needs to be at
- least as big as INDEX + 1, and install the control port into the
- correct slot.
- (init_filesystems): When allocating or reallocating FSYSTABLE,
- make sure the new entries are zeroed.
- (enter_filesystem): Likewise.
-
-Tue Aug 6 13:18:40 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * cache.c (create_cached_handle): Always call fsys_getfile when
- creating a new cached handle instead of relying upon the passed in
- port.
-
- * xdr.c (hurd_mode_to_nfs_mode): Specify octal number in octal
- notation.
- (encode_fattr): Bother filling in all the fields.
-
- * loop.c (server_loop): Don't attempt to call cache_handle_rele if
- C is null.
-
- * cache.c (fh_hash): Mod-ulize HASH before returning it.
-
- * cache.c (process_cred): Arrange to skip VERF field for
- non-AUTH_UNIX creds too.
-
- * loop.c (server_loop): Don't call skip_cred for the VERF here;
- process_cred does it for us.
- * xdr.c (skip_cred): Delete function.
- * nfsd.h (skip_cred): Delete decl.
-
- * cache.c (process_cred): After processing gid list, set P after
- it. Start gid processing loop at 0.
-
- * main.c (main): Detach one thread for pmap_udp_socket,
- and NTHREADS threads for main_udp_socket.
- * loop.c (server_loop): New parm `fd'; don't do select.
- Ignore errors that we get from recvfrom instead of processing the
- last message again.
-
- * nfsd.h (server_loop): New parm.
-
- * main.c (main): Stringify LOCALSTATEDIR; but for now just pound
- in /var. Call asprintf correctly.
diff --git a/nfsd/ops.c b/nfsd/ops.c
index 12f08cce..d503290e 100644
--- a/nfsd/ops.c
+++ b/nfsd/ops.c
@@ -1,5 +1,7 @@
/* ops.c NFS daemon protocol operations.
- Copyright (C) 1996, 2001, 2002 Free Software Foundation, Inc.
+
+ Copyright (C) 1996, 2001, 2002, 2007 Free Software Foundation, Inc.
+
Written by Michael I. Bushnell, p/BSG.
This file is part of the GNU Hurd.
@@ -104,18 +106,18 @@ complete_setattr (mach_port_t port,
mtime.microseconds = 0;
if (atime.seconds == -1)
- atime.seconds = st.st_atime;
+ atime.seconds = st.st_atim.tv_sec;
if (atime.microseconds == -1)
- atime.microseconds = st.st_atime_usec;
+ atime.microseconds = st.st_atim.tv_nsec / 1000;
if (mtime.seconds == -1)
- mtime.seconds = st.st_mtime;
+ mtime.seconds = st.st_mtim.tv_sec;
if (mtime.microseconds == -1)
- mtime.microseconds = st.st_mtime_usec;
+ mtime.microseconds = st.st_mtim.tv_nsec / 1000;
- if (atime.seconds != st.st_atime
- || atime.microseconds != st.st_atime_usec
- || mtime.seconds != st.st_mtime
- || mtime.microseconds != st.st_mtime_usec)
+ if (atime.seconds != st.st_atim.tv_sec
+ || atime.microseconds != st.st_atim.tv_nsec / 1000
+ || mtime.seconds != st.st_mtim.tv_sec
+ || mtime.microseconds != st.st_mtim.tv_nsec / 1000)
err = file_utimes (port, atime, mtime);
return err;
diff --git a/nfsd/xdr.c b/nfsd/xdr.c
index 4c7c2a72..1ff77851 100644
--- a/nfsd/xdr.c
+++ b/nfsd/xdr.c
@@ -1,5 +1,7 @@
/* xdr.c - XDR packing and unpacking in nfsd.
- Copyright (C) 1996, 2002 Free Software Foundation, Inc.
+
+ Copyright (C) 1996, 2002, 2007 Free Software Foundation, Inc.
+
Written by Michael I. Bushnell, p/BSG.
This file is part of the GNU Hurd.
@@ -76,12 +78,12 @@ encode_fattr (int *p, struct stat *st, int version)
*(p++) = htonl (st->st_blocks);
*(p++) = htonl (st->st_fsid);
*(p++) = htonl (st->st_ino);
- *(p++) = htonl (st->st_atime);
- *(p++) = htonl (st->st_atime_usec);
- *(p++) = htonl (st->st_mtime);
- *(p++) = htonl (st->st_mtime_usec);
- *(p++) = htonl (st->st_ctime);
- *(p++) = htonl (st->st_ctime_usec);
+ *(p++) = htonl (st->st_atim.tv_sec);
+ *(p++) = htonl (st->st_atim.tv_nsec / 1000);
+ *(p++) = htonl (st->st_mtim.tv_sec);
+ *(p++) = htonl (st->st_mtim.tv_nsec / 1000);
+ *(p++) = htonl (st->st_ctim.tv_sec);
+ *(p++) = htonl (st->st_ctim.tv_nsec / 1000);
return p;
}
diff --git a/pfinet/ChangeLog b/pfinet/ChangeLog
deleted file mode 100644
index 95e46fdf..00000000
--- a/pfinet/ChangeLog
+++ /dev/null
@@ -1,976 +0,0 @@
-2006-07-31 Stefan Siegl <stesie@brokenpipe.de>
-
- * options.c (trivfs_append_args): Figure out the address of the default
- gateway and push the --gateway option to argz.
-
-2006-04-27 Thomas Schwinge <tschwinge@gnu.org>
-
- * ethernet.c (ether_filter) [NETF_IN]: Prefix `NETF_IN' to the actual
- rules.
-
-2006-03-15 Thomas Schwinge <tschwinge@gnu.org>
-
- * glue-include/asm/system.h (xchg): Fix invalid lvalue.
- * linux-src/net/ipv4/tcp_ipv4.c (tcp_v4_rst_req): Don't use ?: as a
- lvalue.
-
-2004-09-03 Alfred M. Szmidt <ams@kemisten.nu>
-
- * linux-src/net/ipv4/udp.c (udp_v4_get_port): Put empty statement
- after label to silence compiler warning.
- * linux-src/net/ipv4/tcp_ipv4.c
- (tcp_v4_get_port, tcp_v4_connect, tcp_v4_rcv): Likewise.
- * linux-src/net/ipv4/route.c (ip_rt_redirect): Likewise.
- * linux-src/net/ipv4/arp.c (arp_constructor): Likewise.
-
-2004-02-10 Roland McGrath <roland@frob.com>
-
- * linux-src/arch/i386/lib/checksum.S: Fix comment syntax.
-
-2003-05-07 Ognyan Kulev <ogi@fmi.uni-sofia.bg>
-
- * linux-src/include/asm-i386/checksum.h (ip_fast_csum): Use
- string literals concatenation instead of multi-line string
- literal.
- (csum_fold): Likewise.
- (csum_tcpudp_nofold): Likewise.
- (csum_ipv6_magic): Likewise.
-
- * linux-src/include/net/sock.h (SOCK_DEBUG): Don't use ## to
- concatenate string literals.
-
-2002-09-17 Marcus Brinkmann <marcus@gnu.org>
-
- * Makefile: Revert last change.
- * glue-include/asm/spinlock.h (SPIN_LOCK_UNLOCKED): Do not use a
- compound literal, which is not constant.
-
- * Makefile: For now, filter -std=gnu99 out of CPPFLAGS.
-
-2002-06-15 Roland McGrath <roland@frob.com>
-
- * socket-ops.c (S_socket_getopt): Use a local int for result param of
- getsockopt hook function.
-
-2002-06-13 Roland McGrath <roland@frob.com>
-
- * tunnel.c (trivfs_S_io_read): off_t -> loff_t
- (trivfs_S_io_map): Add reply port args.
- (trivfs_S_io_read): Fix argument types. Check mmap for failure.
-
- * pfinet.h (trivfs_protid_t): Type removed (now in trivfs.h).
-
- * linux-src/include/net/ip_fib.h: Fix obsolescent #endif syntax.
-
-2002-06-08 Roland McGrath <roland@frob.com>
-
- * pfinet-ops.c (S_pfinet_siocgifconf): Use vm_size_t for AMOUNT.
-
- * io-ops.c (S_io_identity): Use ino_t for FILENO.
-
-2002-05-31 Roland McGrath <roland@frob.com>
-
- * Makefile (LINUXSRCS): Search for .S files as well as .c files
- for arch-lib-srcs modules.
- (OBJS): .S -> .o as well as .c -> .o
-
- * sched.c (net_bh_worker): Add return stmt to quiet gcc warning.
-
-2002-05-29 Roland McGrath <roland@frob.com>
-
- * ethernet.c (setup_ethernet_device): u_int -> size_t
-
- * linux-src/include/linux/net.h (struct socket) [_HURD_]:
- New member `st_ino'.
- * io-ops.c (S_io_stat, S_io_identity): Use that.
- * socket.c (sock_alloc): Initialize it with a monotonic counter.
-
- * stubs.c: Use __attribute__ instead of #pragma for aliases.
-
- * linux-src/arch/alpha/lib/csum_partial_copy.c: New file,
- taken verbatim from Linux 2.2.14.
- * Makefile (arch-lib-srcs): Add csum_partial_copy.c.
- (LINUXSRCS): Match $(arch-lib-srcs) subset in arch/$(asm_syntax)/lib.
- (OBJS): Use delayed evaluation.
- * glue-include/asm/uaccess.h (__get_user): New macro.
- (__m): New macro.
-
-2002-05-28 Roland McGrath <roland@frob.com>
-
- * io-ops.c (S_io_write, S_io_read): u_int -> size_t
- (S_io_restrict_auth): Likewise.
- (S_io_reauthenticate): Likewise.
- * socket-ops.c (S_socket_getopt, S_socket_setopt): Likewise.
- (S_socket_send, S_socket_recv): Likewise.
-
-2002-05-13 Marcus Brinkmann <marcus@gnu.org>
-
- * main.c: Include <version.h>.
- (argp_program_version): New variable.
-
-2002-05-03 Roland McGrath <roland@frob.com>
-
- * timer-emul.c (timer_function): Add a return stmt.
-
-2002-01-30 Marcus Brinkmann <marcus@gnu.org>
-
- * tunnel.c (trivfs_S_io_select): Remove IDTAG argument.
-
-2001-10-14 Marcus Brinkmann <marcus@gnu.org>
-
- * glue-include/linux/sched.h (process_schedule_timeout): New
- function used as timer callback for schedule_timeout.
- (schedule_timeout): Implement it.
- Suggested by "kurian kattukaren" <kjk_bugs@rediffmail.com>.
-
-2001-07-25 Mark Kettenis <kettenis@gnu.org>
-
- * glue-include/linux/socket.h (SOMAXCONN): Only define if it
- wasn't already.
- (msg_control, msg_controllen, struct cmsghdr, cmsg_len, cmsg_type,
- cmsg_level, CMSG_FIRSTHDR, CMSG_NXTHDR, CMSG_DATA, CMSG_LEN): Only
- define if CMSG_DATA wasn't already defined.
-
-2001-07-18 Marcus Brinkmann <marcus@gnu.org>
-
- * linux-src/net/ipv4/devinit.c (configure_device): Initialize IFA
- correctly. If we are setting the peer on an IFF_POINTOPOINT link,
- force the netmask to 255.255.255.255.
- By Neal H Walfield <neal@cs.uml.edu>.
-
-2001-07-13 Neal H Walfield <neal@cs.uml.edu>
-
- * options.c (parse_opt): In the cases where we hold global_lock
- and fail, we must release the lock before calling FAIL.
-
-2001-06-08 Marcus Brinkmann <marcus@gnu.org>
-
- * timer-emul.c (add_timer): Don't add jiffies to EXPIRES, it is
- the responsibility of the caller to do this.
-
-2001-02-25 Roland McGrath <roland@frob.com>
-
- * Makefile (asm/checksum.h): New target.
- (CPPFLAGS): Don't set _HURD_SYSTYPE.
- * glue-include/asm/checksum.h: File removed.
-
- * linux-src/include/linux/net.h (struct file): Move forward
- decl outside of `struct socket' type definition, for gcc-2.96 syntax.
-
-2001-01-17 Marcus Brinkmann <marcus@gnu.org>
-
- * iioctl-ops.c (siocsifXaddr): Remove incorrect comment
- about isroot.
- (S_iioctl_siocsifflags): Likewise.
- (S_iioctl_siocsifmtu): And one more time.
-
-2001-01-07 Marcus Brinkmann <marcus@gnu.org>
-
- * pfinet-ops.c: New file to implement hurd/pfinet.defs.
-
- * iioctl-ops.c: New file to implement iioctl.defs.
- * linux-src/net/core/dev.c: If _HURD_, don't define netdev_chain as
- static.
-
- * glue-include/linux/if.h: New file, to avoid conflict between
- <net/if.h> (imported by iioctl.defs) and linux version of it.
-
- * main.c (pfinet_demuxer): Prototype pfinet_server and
- iioctl_server, use them.
-
- * pfinet.h: New global variables pfinetctl, pfinet_owner
- and pfinet_group.
- * main.c (main): New variable ST. Request pfinetctl from
- trivfs_startup. Use it to determine the owner and group
- of the underlying node.
- * io-ops.c (S_io_reauthenticate): New index variable j. Set
- newuser->isroot also for owners of the underlying file and
- group owners.
- (S_io_restrict_auth): Likewise.
- * socket-ops.c: Include <sys/stat.h> and <hurd/fshelp.h>.
- (S_socket_create): New variable isroot. If master->isroot is
- not set, use fshelp_isowner to check ownership and if to set it.
- Pass isroot to make_sock_user instead master->isroot.
-
- * linux-src/net/ipv4/devinet.c (configure_device): Accept new parameter
- BROADCAST, set ifa_broadcast if this is not INADDR_NONE.
- (inquire_device): Accept new parameter broadcast, set it.
- * main.c: Add new paramter to prototype of configure_device.
- (main): Add new parameter to call to configure_device.
- * options.c: Add new parameters to prototypes of configure_device
- and inquire_device.
- (trivfs_append_args): Define new variable BROAD, use its address
- as the new parameter for inquire_device.
-
- * linux-src/net/core/dev.c (dev_ifconf): Don't declare static
- if _HURD_.
- * linux-src/net/ipv4/devinet.c (inet_gifconf): If _HURD_, set
- sin_len member.
-
- * Makefile (MIGSRCS): Add pfinetServer.c and iioctlServer.c.
- (SRCS): Add pfinet-ops.c, iioctl-ops.c.
-
-2001-01-03 Marcus Brinkmann <marcus@gnu.org>
-
- * options.c (parse_opt): Set err to 0 if it was ESRCH.
- (or zero anyway).
-
-2000-12-03 Marcus Brinkmann <marcus@gnu.org>
-
- * main.c (pfinet_demuxer): New variable PI.
- Store port info in PI, and dereference it if found.
-
-2000-11-02 Marcus Brinkmann <marcus@gnu.org>
-
- * tunnel.c (trivfs_S_io_get_owner): Add return type to silence
- compiler warning.
-
-2000-10-06 Marcus Brinkmann <marcus@gnu.org>
-
- * Makefile (SRCS): Add tunnel.c
- * tunnel.c: New file.
- * linux-src/net/ipv4/devinet.c (configure_device): New argument PEER.
- Implement support for setting the destination address for
- point-to-point interfaces.
- (inquire_device): New argument PEER.
- Implement support to get the destination address.
- * main.c: Include fcntl.h.
- Update prototype of configure_device.
- Set trivfs_support_read and trivfs_support_write to 1, as we support
- those in some cases now. For the same reason, set trivfs_allow_open
- to O_READ | O_WRITE.
- (pfinet_demuxer): If the port is not in the socketport_class,
- don't try io_server (so requests for trivfs are not catched too early).
- (find_device): Use setup_tunnel_device for tun* interfaces.
- (main): Add peer argument to configure_device call for the lo interface.
- * options.c: Update prototypes for configure_device, inquire_device.
- (options): Add --peer option.
- (stuct parse_interface): Add peer member.
- (parse_hook_add_interface): Initialize peer.
- (parse_opt): Add a case for --peer.
- Add peer argument to configure_device call.
- (add_dev_opts): Add peer variable, add it to inquire_device call arguments.
- Check for peer argument and add it to command line if it is there.
- * pfinet.h: Add prototype for setup_tunnel_device.
-
-2000-10-04 Marcus Brinkmann <marcus@gnu.org>
-
- * Makefile (SRCS): Add dummy.c
- * dummy.c: New file.
-
- * ethernet.c: Moved ETHER_PORT, READPT, READPTNAME to ...
- (struct ether_device): ... here. New struct. ETHER_DEV is now a
- pointer to a struct ether_device.
- (ethernet_demuxer): New variables edev, dev. Iterate over linked
- list ETHER_DEV to find correct readptname. Use dev instead
- ETHER_DEV for socket buffer manipulation.
- (ethernet_open): New variable edev. Use dev->priv to find correct
- edev. Use members of edev instead global variables.
- (ethernet_xmit): New variable edev. Use dev->priv to find correct
- edev.Use member of edev instead global variable ETHER_PORT.
- (setup_ethernet_device): New output argument DEVICE. New
- variables edev and dev. Allocate memory for edev, add it to the
- head of ETHER_DEV. Use dev instead ETHER_DEV. Use members of edev
- instead global variables.
- * main.c: ALREADY_OPEN removed.
- (find_device): Fix comment. Redone to work with multiple devices
- by iterating over DEV_BASE.
- (enumerate_device): Likewise.
- * pfinet.h: Add new argument to prototype of
- setup_ethernet_device. Add prototype for setup_dummy_device.
- Remove prototype for ETHER_DEV. Add prototype for DEV_BASE.
-
-2000-09-30 Marcus Brinkmann <marcus@gnu.org>
-
- * main.c: Prototype configure_device to supress compiler warning.
-
-2000-07-26 Mark Kettenis <kettenis@gnu.org>
-
- * glue-include/linux/poll.h (POLLERR): Define as SELECT_READ |
- SELECT_WRITE.
- (POLLHUP): Define as SELECT_READ.
-
- * linux-src/net/core/dev.c (net_bh) [_HURD_]: Leave out the code
- that gives other bottom halves a chance to run; the network bottom
- half is the only one present in pfinet.
-
-2000-04-03 Roland McGrath <roland@baalperazim.frob.com>
-
- * glue-include/asm/byteorder.h: Include <hurd.h> early on,
- to get the things it #include's that need __BYTE_ORDER to work.
-
-2000-03-17 Thomas Bushnell, BSG <tb@mit.edu>
-
- * main.c (arrange_shutdown_notification): Don't use MAKE_SEND in
- Hurd RPC.
-
-2000-03-17 Roland McGrath <roland@baalperazim.frob.com>
-
- * io-ops.c (S_io_reauthenticate): Use ports_get_send_right.
-
-2000-02-13 Roland McGrath <roland@baalperazim.frob.com>
-
- * main.c (main): Call configure_device on loopback_dev.
- * linux-src/net/ipv4/devinet.c (configure_device): Call
- dev_change_flags with IFF_UP flag.
-
-2000-02-06 Roland McGrath <roland@baalperazim.frob.com>
-
- * socket.c (make_sock_user): Take new argument CONSUME.
- * pfinet.h: Update decl.
- * io-ops.c (S_io_reauthenticate, S_io_restrict_auth, S_io_duplicate):
- Callers changed, these all pass false.
- * socket-ops.c (S_socket_create, S_socket_accept): Callers changed,
- these ones pass true.
-
- * glue-include/linux/socket.h (memcpy_fromiovec): Update *IOV to
- consume bytes copied from the available buffer.
- (memcpy_tokerneliovec): Likewise.
- (memcpy_toiovec): Just call memcpy_tokerneliovec.
-
-2000-02-05 Roland McGrath <roland@baalperazim.frob.com>
-
- * linux-src (many files): Merge Linux 2.2.13 and 2.2.14 code.
- * glue-include/linux/mm.h (PAGE_SIZE, num_physpages): New macros.
- (__get_free_pages): New inline function.
-
-2000-02-04 Roland McGrath <roland@baalperazim.frob.com>
-
- * options.c (parse_opt): New code to set the default gateway using
- fib_new_table and the tb_insert/tb_delete callbacks.
-
- * options.c (parse_opt): Take global_lock while applying changes.
- * main.c (main): Unlock global_lock before calling argp_parse.
-
- * options.c (struct parse_interface): Use uint32_t for the IP
- address members.
-
- * linux-src/net/ipv4/devinet.c [_HURD_] (inquire_device): New function.
- * options.c: Declare it.
- (trivfs_append_args): Use inquire_device for --address and --netmask.
- (ADD_ADDR_OPT): #undef it after uses.
-
-2000-02-03 Roland McGrath <roland@baalperazim.frob.com>
-
- Complete overhaul of pfinet based on the IPv4 networking code from the
- Linux 2.2.12 kernel sources. This page describes a single unified set
- of interdependent changes, but there are so many changes that I have
- broken up the log entry into paragraphs based on rough topical
- divisions of the work involved.
-
- Subset of verbatim Linux 2.2.12 sources imported on a vendor branch.
- * linux-src: New directory, see README for details.
- * README: New file, describes linux-src layout and procedures for
- tracking Linux source updates.
-
- Light modifications to linux-src files to avoid really bending over
- backwards with the glue macros. All modifications to files in
- linux-src are conditionalized by #ifdef _HURD_.
- * linux-src/include/linux/net.h [_HURD_] (struct socket): New members
- refcnt and identity; elide members fasync_list, file.
- * linux-src/include/linux/rtnetlink.h [! CONFIG_RTNETLINK]
- (rtnl_shlock, rtnl_shunlock) [! _HURD_]: Conditionalize contents on
- this, making these no-ops #ifdef _HURD_.
- * linux-src/net/core/dev.c [_HURD_] (dev_ioctl): Don't define the
- function, instead #define it to 0.
- * linux-src/net/ipv4/af_inet.c [_HURD_] (inet_ioctl): Likewise.
- * linux-src/net/ipv4/arp.c [_HURD_] (arp_ioctl): Likewise.
- * linux-src/net/ipv4/udp.c [_HURD_] (udp_ioctl): Likewise.
- * linux-src/net/ipv4/tcp.c [_HURD_] (tcp_ioctl): Likewise.
- [_HURD_] (tcp_tiocinq): New function, TIOCINQ code from tcp_ioctl.
- * linux-src/net/ipv4/devinet.c [_HURD_] (devinet_ioctl): Don't define
- the function, instead #define it to 0.
- [_HURD_] (configure_device): New function, cobbled from SIOCSIFADDR
- and SIOCSIFNETMASK code from devinet_ioctl.
-
- * glue-include/asm, glue-include/linux: New directories.
- These contain glue kludge headers that replace all of the
- Linux <asm/*.h> headers except checksum.h, and several of
- the Linux <linux/*.h> headers (the remainder come from
- linux-src/include/linux and are mostly unmodified).
- * glue-include/asm/atomic.h: New file, glue replacement header.
- * glue-include/asm/bitops.h: New file, glue replacement header.
- * glue-include/asm/byteorder.h: New file, glue replacement header.
- * glue-include/asm/checksum.h: New file, glue replacement header.
- * glue-include/asm/errno.h: New file, glue replacement header.
- * glue-include/asm/hardirq.h: New file, glue replacement header.
- * glue-include/asm/init.h: New file, glue replacement header.
- * glue-include/asm/segment.h: New file, glue replacement header.
- * glue-include/asm/spinlock.h: New file, glue replacement header.
- * glue-include/asm/system.h: New file, glue replacement header.
- * glue-include/asm/types.h: New file, glue replacement header.
- * glue-include/asm/uaccess.h: New file, glue replacement header.
- * glue-include/linux/autoconf.h: New file, glue replacement header.
- * glue-include/linux/binfmts.h: New file, glue replacement header.
- * glue-include/linux/config.h: New file, glue replacement header.
- * glue-include/linux/errno.h: New file, glue replacement header.
- * glue-include/linux/fcntl.h: New file, glue replacement header.
- * glue-include/linux/fs.h: New file, glue replacement header.
- * glue-include/linux/in.h: New file, glue replacement header.
- * glue-include/linux/in6.h: New file, glue replacement header.
- * glue-include/linux/interrupt.h: New file, glue replacement header.
- * glue-include/linux/ioctl.h: New file, glue replacement header.
- * glue-include/linux/ipv6.h: New file, glue replacement header.
- * glue-include/linux/kernel.h: New file, glue replacement header.
- * glue-include/linux/limits.h: New file, glue replacement header.
- * glue-include/linux/major.h: New file, glue replacement header.
- * glue-include/linux/malloc.h: New file, glue replacement header.
- * glue-include/linux/mm.h: New file, glue replacement header.
- * glue-include/linux/param.h: New file, glue replacement header.
- * glue-include/linux/personality.h: New file, glue replacement header.
- * glue-include/linux/poll.h: New file, glue replacement header.
- * glue-include/linux/proc_fs.h: New file, glue replacement header.
- * glue-include/linux/sched.h: New file, glue replacement header.
- * glue-include/linux/slab.h: New file, glue replacement header.
- * glue-include/linux/socket.h: New file, glue replacement header.
- * glue-include/linux/sockios.h: New file, glue replacement header.
- * glue-include/linux/stat.h: New file, glue replacement header.
- * glue-include/linux/string.h: New file, glue replacement header.
- * glue-include/linux/termios.h: New file, glue replacement header.
- * glue-include/linux/time.h: New file, glue replacement header.
- * glue-include/linux/timer.h: New file, glue replacement header.
- * glue-include/linux/timex.h: New file, glue replacement header.
- * glue-include/linux/types.h: New file, glue replacement header.
- * glue-include/linux/un.h: New file, glue replacement header.
- * glue-include/linux/version.h: New file, glue replacement header.
- * glue-include/linux/wait.h: New file, glue replacement header.
-
- * kmem_cache.c: New file. Glue code replaces Linux kmem_cache_t et al.
- * stubs.c: New file. No-op functions and stub variables for a few
- things the Linux networking code needs to link.
-
- * Makefile (core-srcs, arch-lib-srcs, ethernet-srcs, ipv4-srcs): New
- variables, listing sources used from linux-src subdirectories.
- (LINUXSRCS): Define using those.
- (SRCS): Remove devices.c; add kmem_cache.c, stubs.c.
- (UNUSEDSRC): Variable removed.
- (vpath %.c): Remove vpath for $(srcdir)/linux-inet directory.
- Add vpaths for $(srcdir)/linux-src subdirectories.
- (CPPFLAGS): Add -D_HURD_SYSTYPE defining it to $(asm_syntax) as a
- double-quoted string. Add -I's for glue-include and linux-src/include.
-
- * pfinet.h: Include <sys/socket.h>, and not <linux/netdevice.h>.
- (master_device): Remove decl.
- (global_lock, packet_queue_lock): Remove common defns.
- (global_lock, net_bh_lock): Declare them as externs.
- (struct sockaddr): Remove len member, make address member just a
- struct sockaddr rather than a 0-length array.
- (setup_loopback_device, become_task_protid, become_task): Remove decls.
- (ethernet_initialize): Declare it.
- (input_work_thread): Remove decl.
- (net_bh_thread): Declare it.
- (tcp_readable): Remove decl.
- (tcp_tiocinq): Declare it.
-
- * config.h: Rewritten based on Linux 2.2.12 set of CONFIG_* options.
- (CONFIG_NET, CONFIG_INET, CONFIG_SKB_LARGE): These are the only
- Linux config options we set.
- (CONFIG_IP_NOSIOCRT): New macro (not a proper config option, but
- used conveniently in the code).
- * ethernet.c (ethernet_set_multi): Take only one parameter.
- Remove assert, since we always get passed IGMP_ALL_HOSTS.
- (ethernet_thread): Make static.
- (ethernet_demuxer): Use __mutex_lock in place of mutex_lock, so as to
- get cthreads instead of linux/spinlock.h glue macros. Lock
- net_bh_lock instead of global_lock. Set SKB->protocol with
- eth_type_trans before calling netif_rx.
- (ethernet_initialize): New function, one-time initialization broken
- out of ethernet_open.
- (ethernet_open): Ports setup moved to ethernet_initialize.
- Don't use `errno' to avoid glue conflicts.
- Use get_privileged_ports here to get the master device port, and
- deallocate it after calling device_open.
- (ethernet_xmit): Use assert_perror. Only one arg to dev_kfree_skb now.
- (setup_ethernet_device): Change initializations for structure changes.
- Call dev_init_buffers and register_netdevice on the device.
- * timer-emul.c (all functions): Use __mutex_lock instead of mutex_lock.
- Adjust for renaming of `prevp' member to `prev' in struct timer_list.
- (mod_timer): New function.
- * socket.c (proto_ops): Variable removed.
- (net_families): New variable replaces it.
- (sock_register): Rewritten for new calling convention, set
- net_families rather than proto_ops.
- (make_sock_user, clean_socketport, sock_alloc, sock_release):
- Functions moved here from misc.c.
- * sched.c (packet_queue_lock): Variable removed.
- (net_bh_lock, net_bh_wakeup): New variables.
- (current): Variable removed (now a macro in the glue headers).
- (interruptible_sleep_on, wake_up_interruptible): Functions removed.
- They are replaced by inlines in the glue headers.
- (become_task, become_task_protid): Functions removed; they are
- replaced by macros in glue-include/linux/sched.h.
- (net_bh_worker): New function.
- * loopback.c: Completely rewritten, mostly copied from linux-2.2.12's
- drivers/net/loopback.c source file.
-
- * io-ops.c (all functions): Use __mutex_lock in place of mutex_lock.
- (S_io_write): Call ops->sendmsg instead of ops->write,
- which no longer exists. If O_NONBLOCK is set, set MSG_DONTWAIT in
- msg_flags.
- (S_io_read): Call ops->recvmsg instead of ops->read,
- which no longer exists If O_NONBLOCK is set, pass MSG_DONTWAIT.
- (S_io_readable): Use USER->sock->data in place of USER->sock->sk.
- For SOCK_STREAM and SOCK_SEQPACKET types, call tcp_tiocinq.
- (S_io_set_all_openmodes, S_io_get_openmodes, S_io_set_some_openmodes,
- S_io_clear_some_openmodes): Member USER->sock->userflags is now
- renamed USER->sock->flags.
- (S_io_select): Completely rewritten using ops->poll.
- (select_wait): Function removed.
- (S_io_stat): Set st_mode to reflect S_IFSOCK.
- * socket-ops.c (all functions): Use __mutex_lock instead of mutex_lock.
- (S_socket_create): Don't set SOCK->ops or call SOCK->ops->create.
- Instead, call net_families[PF_INET]->create.
- (S_socket_listen): Remove extra checks; just call ops->listen.
- (S_socket_accept): Remove extra checks before ops->accept call.
- Avoid use of goto.
- (S_socket_connect): Remove extra checks; just call ops->connect.
- (S_socket_bind): Adjust for struct sock_addr changes.
- (S_socket_create_address): Likewise.
- (S_socket_whatis_address): Likewise.
- (S_socket_connect2): Don't diddle data structures after
- ops->socketpair call.
- (S_socket_getopt): Use sock_getsockopt if LEVEL is SOL_SOCKET.
- Accept any data size, not just sizeof (int).
- (S_socket_setopt): Use sock_setsockopt if LEVEL is SOL_SOCKET.
- (S_socket_send): Always use ops->sendmsg instead of ops->send or
- ops->sendto, which no longer exist. If O_NONBLOCK is set, set
- MSG_DONTWAIT in msg_flags.
- (S_socket_recv): Always use ops->recvmsg instead of ops->recv, which
- no longer exists. If O_NONBLOCK is set, set MSG_DONTWAIT in flags.
- Check for error from S_socket_create_address.
-
- * main.c (find_device): Don't try to set ether_dev.pa_mask (it's gone).
- (main): Don't call init_devices. Call ethernet_initialize.
- Start net_bh_worker instead of input_work_thread. Don't call
- setup_loopback_device. Instead, take global_lock, do prepare_current,
- and then call sk_init, skb_init, inet_proto_init, and net_dev_init.
- Keep global_lock held while calling argp_parse.
- Call arrange_shutdown_notification only after all that.
- Fix error call for "contacting parent" to pass ERR instead of errno.
- * options.c (ADDR): #undef before defining macro.
- (parse_opt): #if 0 out EDESTADDRREQ check (I don't understand it).
- To apply settings, call configure_devices.
- (ADD_ADDR_OPT): #if 0 --address and --netmask options. Needs fixed.
- * misc.c (make_sock_user, clean_socketport, sock_alloc, sock_release):
- Functions moved to socket.c.
- (sock_release_peer): Function removed.
- (make_sockaddr_port): Use struct sockaddr_storage to size buffer.
- Fix size calculation for new struct sock_addr layout.
- Initialize sa_family and sa_len of new struct sock_addr.
-
- Remove the old Linux (2.0.??) network stack and the glue code for it.
- * linux-inet, asm, linux: Directories and all files removed.
- Some of the new files in glue-include came from the old glue headers
- in the asm and linux directories, but most were substantially modified.
- * devices.c: File removed. The equivalent glue is now elsewhere.
-
-2000-01-27 Roland McGrath <roland@baalperazim.frob.com>
-
- * mapped-time.h: Include <maptime.h>.
- (fill_timeval): Function removed.
- (fetch_jiffies): Use maptime_read.
- * timer-emul.c (init_time): Use maptime_map and maptime_read.
- * linux/sched.h (fetch_xtime): Use maptime_read.
- * linux/time.h (do_gettimeofday): Likewise.
-
-1999-10-22 Roland McGrath <roland@baalperazim.frob.com>
-
- * socket-ops.c (S_socket_getopt): Implement the call.
- All options supported by the code in linux-inet are in
- fact of type int, so we can support just that one size.
- (This is still a bogus untyped interface!)
-
-1999-09-13 Roland McGrath <roland@baalperazim.frob.com>
-
- * io-ops.c: Reverted changes related to io_map_segment.
-
-1999-09-09 Thomas Bushnell, BSG <tb@mit.edu>
-
- * ethernet.c (ethernet_open): Don't start the input work thread
- here.
- (more_packets, mark_bh, input_work_thread): Move
- these to ...
- * devices.c: ... here.
- Also include "pfinet.h" instead of list of <> includes.
- * main.c (main): Launch input work thread here.
- * pfinet.h (input_work_thread): Declare function.
-
- * devices.c (add_device): Remove unused function.
- * pfinet.h (incoming_net_packet): Remove unused declaration.
-
-1999-09-07 Thomas Bushnell, BSG <tb@mit.edu>
-
- * io-ops.c (S_io_map_segment): New function.
-
-1999-07-11 Roland McGrath <roland@baalperazim.frob.com>
-
- * pfinet.h: Add #include <sys/mman.h> for munmap decl.
-
-1999-07-10 Roland McGrath <roland@baalperazim.frob.com>
-
- * io-ops.c: Add #include <sys/mman.h> for munmap decl.
-
-1999-07-09 Thomas Bushnell, BSG <tb@mit.edu>
-
- * io-ops.c (S_io_read): Use mmap instead of vm_allocate.
- * socket-ops.c (S_socket_whatis_address): Likewise.
-
-1999-07-03 Thomas Bushnell, BSG <tb@mit.edu>
-
- * io-ops.c (S_io_read): Use munmap instead of vm_deallocate.
- (S_io_reauthenticate): Likewise.
-
-1999-06-13 Roland McGrath <roland@baalperazim.frob.com>
-
- * main.c (trivfs_goaway): Exit if there are no socket ports.
-
-Sun Mar 14 18:33:54 1999 Thomas Bushnell, BSG <tb@mit.edu>
-
- * ethernet.c (ether_filter): Use a shorter filter program.
- (ether_filter_len): Compute more safely.
-
-1999-02-28 Roland McGrath <roland@baalperazim.frob.com>
-
- * main.c (S_startup_dosync): Use ports_class_iterate.
- (sigterm_handler): Likewise.
-
-Tue Feb 16 05:50:27 1999 Thomas Bushnell, BSG <tb@mit.edu>
-
- * io-ops.c (S_io_revoke): New function. Don't attempt to
- implement. (Other systems don't even permit non-file revokes.)
-
-1998-10-24 Roland McGrath <roland@baalperazim.frob.com>
-
- * ethernet.c (ethernet_open): Check error return from device_open and
- device_set_filter.
- (setup_ethernet_device): Check error return from device_get_status.
-
- * ethernet.c (ethername): Remove static variable.
- (setup_ethernet_device): Don't set it.
- (ethernet_open): Don't use it; use DEV->name instead.
-
-1998-09-04 Roland McGrath <roland@baalperazim.frob.com>
-
- * loopback.c (loopback_type_trans): Return u_int16_t.
-
-Fri Apr 24 15:43:07 1998 Thomas Bushnell, n/BSG <tb@mit.edu>
-
- * io-ops.c (S_io_select): When returning EINTR after cancellation,
- deallocate REPLY because the stub won't do it for us. Reported by
- UCHIYAMA Yasushi (uch@nop.or.jp).
-
-1997-08-25 Miles Bader <miles@gnu.ai.mit.edu>
-
- * io-ops.c (S_io_write): Negate linux error codes before returning.
-
-1997-08-19 Miles Bader <miles@gnu.ai.mit.edu>
-
- * linux-inet/tcp.c (tcp_conn_request): SK->err holds errno values,
- not linux negative errno return vals.
-
-Wed Aug 20 14:05:52 1997 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * main.c (main): New args for
- ports_manage_port_operations_multithread.
-
-Fri Aug 8 11:47:08 1997 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * linux-inet/tcp.c (tcp_check): Move to end of file so it isn't
- inlined and can be profiled easily.
- * linux-inet/udp.c (udp_check): Likewise.
-
-Mon Jul 21 14:58:13 1997 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * Makefile (HURDLIBS): Add iohelp.
-
- * main.c (trivfs_goaway): If FSYS_GOAWAY_FORCE is set, then go
- away, otherwise, continue to return EBUSY.
-
-Fri Apr 25 10:46:49 1997 Miles Bader <miles@gnu.ai.mit.edu>
-
- * options.c (trivfs_append_args): Renamed from trivfs_get_options.
- Don't initialize ARGZ/ARGZ_LEN.
-
-Tue Feb 4 16:53:19 1997 Miles Bader <miles@gnu.ai.mit.edu>
-
- * socket-ops.c (S_socket_send): Don't deref ADDR if it's 0.
- (S_socket_bind): Return EADDRNOTAVAIL if ADDR is 0.
-
-Fri Oct 25 20:02:17 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * loopback.c (loopback_type_trans): New function.
- (setup_loopback_device): Bother to mark interface up
- too. Set LOOPBACK_DEV.type_trans.
-
-Thu Oct 24 22:38:55 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * main.c (main): Call setup_loopback_device before parsing args
- (and thus before the ethernet device shows up).
- * loopback.c: New file.
- * Makefile (SRCS): Add loopback.c.
- * pfinet.h (loopback_dev): New variable.
-
- * pfinet.h (ip_rt_del): New prototype.
-
-Thu Sep 12 16:47:24 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * Makefile (HURDLIBS): New variable.
- (pfinet): Omit special dependency.
-
- * Makefile (vpath %.c): Put this after Makeconf inclusion so it
- catches setting of $(srcdir) there.
-
-Fri Sep 6 16:46:43 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * socket-ops.c (S_socket_recv): Bother to pass
- USER->sock->userflags through to the recvfrom routine.
-
-Sat Jul 20 15:48:29 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * Makefile (lndist-asm-files): Look for files in $(srcdir).
- (lndist-linux-files): Likewise.
- (lndist-linux-inet-files): Likewise.
-
-Fri Jul 19 09:39:08 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * pfinet.h (make_sock_user): Declaration updated.
-
-Thu Jul 18 23:19:07 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * misc.c (make_sock_user): New parm `noinstall'; if it's set use
- non-installing version of ports_create_port. All callers
- changed.
- * io-ops.c (S_io_reauthenticate): Install NEWUSER port right into
- portset after it's fully initialized.
-
-Sat Jul 13 20:18:18 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * io-ops.c (S_io_reauthenticate): Repeat auth_server_authenticate
- for as long as we get EINTR. Deal with other errors without
- crashing.
-
-Sun Jul 7 21:29:42 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * io-ops.c (S_io_reauthenticate): Don't use unsafe MOVE_SEND in
- call to auth_server_authenticate.
-
-Fri Jul 5 19:42:54 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * ethernet.c (setup_ethernet_device): Linux's device `mtu' member
- does not include the hardware header size; subtract that off the
- value the kernel specifies as maximum packet size in setting
- ETHER_DEV.mtu.
-
-Thu Jun 27 10:14:10 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * Makefile (lndist): Add lndist-asm-files.
- (lndist-asm-files): New rule.
- (ASMHEADERS): New variable.
- ($(top_srcdir)/hurd-snap/$(dir)/asm): New rule.
-
-Tue Jun 25 14:00:07 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * linux-inet/route.c (ip_rt_del): New function.
- * linux-inet/route.h (ip_rt_del): New declaration.
-
- * options.c (trivfs_get_options): Initialize *ARGZ & *ARGZ_LEN.
- (parse_opt): Fix test for address-less netmask.
- Fix byte order when using IN_* macros.
- Base default netmask on dev->pa_addr, not in->address.
- Don't clear dev->pa_addr.
- Delete old routing entries before adding new ones.
- (trivfs_get_options): Add & use ADD_ADDR_OPT macro.
- (parse_hook_add_interface): Initialize H->curint->device.
-
-Mon Jun 24 16:48:51 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * main.c (sigterm_handler): Renamed from sighup_handle. Make void.
- Deal with SIGTERM instead of SIGHUP.
- (main): Use SIGTERM & sigterm_handler instead of SIGHUP &c.
-
- * options.c (parse_hook_add_interface): Realloc the correct number
- of bytes.
-
-Mon Jun 24 16:33:55 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * main.c (sighup_handle): New function.
- (arrange_shutdown_notification): Register SIGHUP handler.
-
-Mon Jun 24 12:44:17 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * options.c (parse_opt): Don't fail if there were no options.
- (RETURN): New macro.
- (PERR, FAIL): Use RETURN instead of return to free memory if nec.
-
-Fri Jun 21 16:42:29 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * main.c (main): Pass ARGC & ARGV to argp_parse in the correct order.
-
-Thu Jun 20 22:39:17 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * options.c: Renamed from opts.c.
- (parse_opt): Fix lots of typos.
- (trivfs_get_options): New function.
- (get_opts, trivfs_S_fsys_get_options, trivfs_S_file_get_fs_options):
- Functions removed.
- <netinet/in.h>, <arpa/inet.h>: New includes.
- * Makefile (pfinet): Depend on ../libfshelp/libfshelp.a &
- ../libshouldbeinlibc/libshouldbeinlibc.a.
- (SRCS): Add options.c.
-
-Thu Jun 20 19:47:40 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * main.c: Include <hurd/startup.h> and <string.h>.
- (shutdown_notify_class): Declare variable.
- (S_startup_dosync): Give enough args to ports_lookup_port.
- (S_startup_dosync/do1): Return a value.
- (arrange_shutdown_notification): Correct spelling of
- ports_create_port. Initialize shutdown_notify_class.
- (find_device): Construct arg to strcmp correctly. Correct
- spelling of ENXIO.
-
-Wed Jun 19 18:46:35 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * opts.c (trivfs_S_fsys_set_options): Function removed.
- (trivfs_runtime_argp): New variable.
-
-Sun Jun 16 22:45:54 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * opts.c (parse_opt): Rename ERR macro to FAIL. Use argp_failure.
-
-Sat Jun 15 19:47:06 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * main.c (main): Rearrange for arg parsing some more.
- (enumerate_devices): New function.
- (pfinet_argp): New declaration.
- (already_open): Make global.
- <error.h>, <argp.h>: New includes.
-
-Fri Jun 14 15:41:57 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * main.c (find_device): New function.
- (main): Rearrange to use new argument parsing.
-
-Thu Jun 13 16:55:42 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * Makefile (MIGSRCS): Add startup_notifyServer.c.
- * main.c (S_startup_dosync, arrange_shutdown_notification): New
- functions.
- (pfinet_demuxer): Call startup_notify_server.
- (main): Call arrange_shutdown_notification).
-
-Tue May 14 14:12:25 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * main.c (main): Initialize fsys_identity.
- * misc.c (sock_alloc): Initialize SOCK->identity.
- (sock_release): Destroy SOCK->identity if it's been set.
- * io-ops.c (S_io_identity): New function.
- * pfinet.h (fsys_identity): New variable.
- * linux/net.h (struct socket) [_HURD_]: New member `identity'.
-
- * ethernet.c (ethernet_open): Delete superfluous arg to
- assert_perror.
-
-Fri May 10 16:56:52 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * misc.c (make_sock_user): Pass correct args to ports_create_port.
-
- * ethernet.c (ethernet_open): Pass in ERRNO to assert_perror.
-
-Thu May 9 20:27:28 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * io-ops.c (S_io_reauthenticate): Use new auth_server_authenticate
- interface.
-
- * io-ops.c (S_io_select): Drop ID_TAG arg.
-
- * ethernet.c (ethernet_thread): Return any_t.
- (input_work_thread): Likewise.
-
- * ethernet.c (ethernet_open): Use new ports_create_port call.
- * socket-ops.c (S_socket_create_address): Likewise.
- * misc.c (make_sock_user): Likewise.
- (make_sockaddr_port): Likewise.
-
-Wed Apr 24 18:35:50 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
-
- * main.c (main): Take third cmdline arg and add gateway route.
-
-Mon Apr 15 12:53:24 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * Makefile (CPPFLAGS): Look for config.h in $(srcdir).
- (io-MIGSFLAGS, socket-MIGSFLAGS): Look for mutations.h in
- $(srcdir).
- (vpath %.c): Find linux-inet dir under #(srcdir)>
- (SRCS): Add time.c.
- (LCLHDRS, LINUXHDRS, FROBBEDLINUXHEADERS): New variables.
- (lndist, lndist-linux-inet-files, lndist-linux-files,
- $(top-srcdir)/hurd-snap/$(dir)/linux-inet,
- $(top-srcdir)/hurd-snap/$(dir)/linux): New targets.
-
-Mon Feb 26 13:36:14 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * misc.c (end_using_sockaddr_port): Only call ports_port_deref if
- arg is valid.
- (end_using_socket_port): Likewise.
-
- * linux/interrupt.h (mark_bh): Remove stubby inline, replace
- with real declaration.
- * pfinet.h (packet_queue_lock): New variable.
- * sched.c (packet_queue_lock): Provide initialization.
- * ethernet.c (ethernet_open): Put READPT in etherport_bucket
- instead of pfinet_bucket. Fork ethernet_thread and
- input_work_thread before returning.
- (more_packets, etherport_bucket): New variables.
- (input_work_thread, ethernet_thread, mark_bh): New functions.
-
- * main.c (pfinet_demuxer): Don't use call ethernet_demuxer.
-
-Thu Feb 22 17:54:25 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * ethernet.c (ethernet_open): Request maximum queue limit
- on our read port.
-
-Thu Feb 8 18:32:33 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * socket-ops.c (S_socket_connect): Don't return EINVAL for
- SS_CONNECTED state.
-
-Mon Jan 22 13:47:47 1996 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * timer-emul.c (init_time): There are *still* a million microseconds to
- the second.
-
-Thu Jan 18 12:37:57 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * mapped-time.h (fetch_jiffies): Uh, duh, there are a million
- microseconds in a second, not just a thousand.
-
-Tue Dec 26 19:29:16 1995 Miles Bader <miles@gnu.ai.mit.edu>
-
- * io-ops.c (S_io_select): Add REPLY parameter, and request
- notification if it dies.
- * mutations.h (IO_SELECT_REPLY_PORT): New def.
-
-Thu Dec 14 18:50:07 1995 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * ethernet.c (ethernet_open): Don't set filter priority high.
-
-Mon Dec 11 13:23:49 1995 Miles Bader <miles@gnu.ai.mit.edu>
-
- * socket-ops.c (S_socket_recv): Whoops, incorrectly negated this
- particular return value. Rename the variable `recvd' to make
- things more clear.
- (S_socket_send): Ditto (`sent'), plus correctly check the return
- value when deciding whether to deallocate ADDR's send right.
-
-Thu Dec 7 18:24:37 1995 Miles Bader <miles@gnu.ai.mit.edu>
-
- * socket-ops.c (S_socket_recv, S_socket_bind, S_socket_send):
- Negate error return values from linux code.
- (S_socket_setopt): Implement.
-
-Wed Aug 23 14:20:48 1995 Miles Bader <miles@churchy.gnu.ai.mit.edu>
-
- * Makefile (pfinet): Put all dependencies here.
- (HURDLIBS): Removed.
diff --git a/pfinet/Makefile b/pfinet/Makefile
index b81d3073..0874eee3 100644
--- a/pfinet/Makefile
+++ b/pfinet/Makefile
@@ -1,5 +1,5 @@
#
-# Copyright (C) 1995,96,97,2000 Free Software Foundation, Inc.
+# Copyright (C) 1995, 1996, 1997, 2000, 2007, 2011 Free Software Foundation, Inc.
#
# This file is part of the GNU Hurd.
#
@@ -58,8 +58,28 @@ ipv4-srcs := af_inet.c \
timer.c \
udp.c \
utils.c
-LINUXSRCS = $(core-srcs) $(ethernet-srcs) $(ipv4-srcs) \
- $(notdir $(wildcard $(addprefix \
+ipv6-srcs := addrconf.c \
+ af_inet6.c \
+ datagram_ipv6.c \
+ exthdrs.c \
+ icmpv6.c \
+ ip6_fib.c \
+ ip6_flowlabel.c \
+ ip6_input.c \
+ ip6_output.c \
+ ipv6_sockglue.c \
+ mcast.c \
+ ndisc.c \
+ protocol_ipv6.c \
+ raw_ipv6.c \
+ reassembly.c \
+ route_ipv6.c \
+ tcp_ipv6.c \
+ udp_ipv6.c
+ARCHS = alpha arm i386 m68k ppc s390 sparc sparc64
+
+LINUXSRCS = $(core-srcs) $(ethernet-srcs) $(ipv4-srcs) $(ipv6-srcs)
+ARCHSRCS = $(notdir $(wildcard $(addprefix \
$(srcdir)/linux-src/arch/$(asm_syntax)/lib/,\
$(arch-lib-srcs) $(arch-lib-srcs:.c=.S))))
SRCS = sched.c timer-emul.c socket.c main.c ethernet.c \
@@ -69,17 +89,31 @@ SRCS = sched.c timer-emul.c socket.c main.c ethernet.c \
MIGSRCS = ioServer.c socketServer.c startup_notifyServer.c \
pfinetServer.c iioctlServer.c
OBJS = $(patsubst %.S,%.o,$(patsubst %.c,%.o,\
- $(LINUXSRCS) $(SRCS) $(MIGSRCS)))
+ $(LINUXSRCS) $(ARCHSRCS) $(SRCS) $(MIGSRCS)))
LCLHDRS = config.h mapped-time.h mutations.h pfinet.h
-LINUXHDRS = arp.h datalink.h eth.h icmp.h ip.h ipx.h ipxcall.h p8022.h \
- p8022call.h protocol.h psnap.h psnapcall.h \
- rarp.h raw.h route.h snmp.h sock.h tcp.h udp.h
-FROBBEDLINUXHEADERS = autoconf.h config.h errno.h etherdevice.h fcntl.h \
- icmp.h if.h if_arp.h if_ether.h igmp.h in.h inet.h interrupt.h \
- ip.h ip_fw.h ipx.h kernel.h major.h malloc.h mm.h net.h netdevice.h \
- notifier.h param.h route.h sched.h skbuff.h socket.h sockios.h stat.h \
- string.h tcp.h termios.h time.h timer.h types.h udp.h un.h wait.h
-ASMHEADERS=bitops.h segment.h system.h
+LINUXHDRS = bitops.h capability.h delay.h errqueue.h etherdevice.h \
+ fddidevice.h firewall.h icmp.h icmpv6.h if_arp.h if_ether.h \
+ if_fddi.h if_packet.h if_ppp.h if_tunnel.h if_tr.h \
+ igmp.h in.h in_route.h inet.h inetdevice.h init.h ip.h \
+ ip_fw.h ipsec.h ipv6_route.h ipx.h kmod.h linkage.h lists.h \
+ module.h mroute.h net.h netdevice.h netlink.h notifier.h \
+ pkt_cls.h pkt_sched.h ppp_defs.h random.h route.h \
+ rtnetlink.h skbuff.h stddef.h sysctl.h tasks.h tcp.h times.h \
+ trdevice.h udp.h
+LINUXNETHDRS = addrconf.h arp.h br.h checksum.h datalink.h dst.h flow.h \
+ icmp.h if_inet6.h inet_common.h ip.h ip_fib.h ip6_fib.h \
+ ip6_route.h ipip.h ipv6.h ipx.h ipxcall.h ndisc.h \
+ neighbour.h p8022.h p8022call.h pkt_cls.h pkt_sched.h \
+ profile.h protocol.h psnap.h psnapcall.h rarp.h raw.h \
+ rawv6.h route.h slhc.h snmp.h sock.h tcp.h transp_v6.h udp.h
+ARCHHDRS = checksum.h
+FROBBEDLINUXHEADERS = autoconf.h binfmts.h config.h errno.h fcntl.h fs.h \
+ if.h in.h in6.h interrupt.h ioctl.h ipv6.h \
+ kernel.h limits.h major.h malloc.h mm.h param.h personality.h \
+ poll.h proc_fs.h sched.h slab.h socket.h sockios.h stat.h \
+ string.h termios.h time.h timer.h timex.h types.h un.h version.h wait.h
+ASMHEADERS = atomic.h bitops.h byteorder.h delay.h errno.h hardirq.h init.h \
+ segment.h spinlock.h system.h types.h uaccess.h
HURDLIBS=trivfs fshelp threads ports ihash shouldbeinlibc iohelp
@@ -87,7 +121,7 @@ target = pfinet
include ../Makeconf
-vpath %.c $(addprefix $(srcdir)/linux-src/net/,core ethernet ipv4)
+vpath %.c $(addprefix $(srcdir)/linux-src/net/,core ethernet ipv4 ipv6)
vpath %.c $(srcdir)/linux-src/arch/$(asm_syntax)/lib
vpath %.S $(srcdir)/linux-src/arch/$(asm_syntax)/lib
@@ -95,6 +129,10 @@ CPPFLAGS += -imacros $(srcdir)/config.h \
-I$(srcdir)/glue-include \
-I$(srcdir)/linux-src/include
+# Don't ask... We use Linux code. The problem was first noticed when
+# compiling `pfinet' with GCC 4.2.
+CFLAGS += -fno-strict-aliasing
+
asm/checksum.h: ../config.status
mkdir -p $(@D)
echo > $@.new \
@@ -108,20 +146,62 @@ socket-MIGSFLAGS = -imacros $(srcdir)/mutations.h
io_S.h ioServer.c socket_S.h socketServer.c: mutations.h
$(OBJS): config.h
-lndist: lndist-linux-inet-files lndist-linux-files lndist-asm-files
+lndist: lndist-linux-src-net-core-files lndist-linux-src-net-ethernet-files lndist-linux-src-net-ipv4-files lndist-linux-src-net-ipv6-files lndist-linux-src-asm-files lndist-linux-src-include-asm-files lndist-linux-src-include-linux-files lndist-linux-src-include-net-files lndist-glue-include-linux-files lndist-glue-include-asm-files
+
+lndist-linux-src-net-core-files: $(top_srcdir)/hurd-snap/$(dir)/linux-src/net/core
+ ln $(addprefix $(srcdir)/linux-src/net/core/,$(core-srcs)) $<
+
+lndist-linux-src-net-ethernet-files: $(top_srcdir)/hurd-snap/$(dir)/linux-src/net/ethernet
+ ln $(addprefix $(srcdir)/linux-src/net/ethernet/,$(ethernet-srcs)) $<
+
+lndist-linux-src-net-ipv4-files: $(top_srcdir)/hurd-snap/$(dir)/linux-src/net/ipv4
+ ln $(addprefix $(srcdir)/linux-src/net/ipv4/,$(ipv4-srcs)) $<
+
+lndist-linux-src-net-ipv6-files: $(top_srcdir)/hurd-snap/$(dir)/linux-src/net/ipv6
+ ln $(addprefix $(srcdir)/linux-src/net/ipv6/,$(ipv6-srcs)) $<
+
+# FIXME !i386
+lndist-linux-src-asm-files: $(top_srcdir)/hurd-snap/$(dir)/linux-src/arch/i386/lib
+ ln $(addprefix $(srcdir)/linux-src/arch/i386/lib/,$(ARCHSRCS)) $<
+
+lndist-linux-src-include-linux-files: $(top_srcdir)/hurd-snap/$(dir)/linux-src/include/linux
+ ln $(addprefix $(srcdir)/linux-src/include/linux/,$(LINUXHDRS)) $<
+
+lndist-linux-src-include-net-files: $(top_srcdir)/hurd-snap/$(dir)/linux-src/include/net
+ ln $(addprefix $(srcdir)/linux-src/include/net/,$(LINUXNETHDRS)) $<
-lndist-linux-inet-files: $(top_srcdir)/hurd-snap/$(dir)/linux-inet
- ln $(addprefix $(srcdir)/linux-inet/,$(LINUXSRCS) $(UNUSEDSRC) $(LINUXHDRS)) $<
+lndist-linux-src-include-asm-files: $(top_srcdir)/hurd-snap/$(dir)/linux-src/include/asm-i386
+ ln $(addprefix $(srcdir)/linux-src/include/asm-$(asm_syntax)/,$(ARCHHDRS)) $<
-lndist-linux-files: $(top_srcdir)/hurd-snap/$(dir)/linux
- ln $(addprefix $(srcdir)/linux/,$(FROBBEDLINUXHEADERS)) $<
+lndist-glue-include-linux-files: $(top_srcdir)/hurd-snap/$(dir)/glue-include/linux
+ ln $(addprefix $(srcdir)/glue-include/linux/,$(FROBBEDLINUXHEADERS)) $<
-lndist-asm-files: $(top_srcdir)/hurd-snap/$(dir)/asm
- ln $(addprefix $(srcdir)/asm/,$(ASMHEADERS)) $<
+lndist-glue-include-asm-files: $(top_srcdir)/hurd-snap/$(dir)/glue-include/asm
+ ln $(addprefix $(srcdir)/glue-include/asm/,$(ASMHEADERS)) $<
-$(top_srcdir)/hurd-snap/$(dir)/linux-inet:
+$(top_srcdir)/hurd-snap/$(dir)/linux-src:
+ mkdir $@
+$(top_srcdir)/hurd-snap/$(dir)/linux-src/arch: $(top_srcdir)/hurd-snap/$(dir)/linux-src
+ mkdir $@
+$(top_srcdir)/hurd-snap/$(dir)/linux-src/arch/%/lib: $(top_srcdir)/hurd-snap/$(dir)/linux-src/arch
+ mkdir -p $@
+$(top_srcdir)/hurd-snap/$(dir)/linux-src/include: $(top_srcdir)/hurd-snap/$(dir)/linux-src
+ mkdir $@
+$(top_srcdir)/hurd-snap/$(dir)/linux-src/include/%: $(top_srcdir)/hurd-snap/$(dir)/linux-src/include
+ mkdir $@
+$(top_srcdir)/hurd-snap/$(dir)/linux-src/net: $(top_srcdir)/hurd-snap/$(dir)/linux-src
+ mkdir $@
+$(top_srcdir)/hurd-snap/$(dir)/linux-src/net/core: $(top_srcdir)/hurd-snap/$(dir)/linux-src/net
+ mkdir $@
+$(top_srcdir)/hurd-snap/$(dir)/linux-src/net/ethernet: $(top_srcdir)/hurd-snap/$(dir)/linux-src/net
+ mkdir $@
+$(top_srcdir)/hurd-snap/$(dir)/linux-src/net/ipv4: $(top_srcdir)/hurd-snap/$(dir)/linux-src/net
+ mkdir $@
+$(top_srcdir)/hurd-snap/$(dir)/linux-src/net/ipv6: $(top_srcdir)/hurd-snap/$(dir)/linux-src/net
+ mkdir $@
+$(top_srcdir)/hurd-snap/$(dir)/glue-include:
mkdir $@
-$(top_srcdir)/hurd-snap/$(dir)/linux:
+$(top_srcdir)/hurd-snap/$(dir)/glue-include/asm: $(top_srcdir)/hurd-snap/$(dir)/glue-include
mkdir $@
-$(top_srcdir)/hurd-snap/$(dir)/asm:
+$(top_srcdir)/hurd-snap/$(dir)/glue-include/linux: $(top_srcdir)/hurd-snap/$(dir)/glue-include
mkdir $@
diff --git a/pfinet/README b/pfinet/README
index decbb307..e96601f0 100644
--- a/pfinet/README
+++ b/pfinet/README
@@ -47,3 +47,9 @@ conditionalized by #ifdef _HURD_.
-- Roland McGrath <roland@gnu.org> 2000-02-03
+
+---
+
+See <http://www.bddebian.com/~wiki/hurd/translator/pfinet/ipv6/> about IPv6
+support and <http://lists.gnu.org/archive/html/bug-hurd/2007-10/msg00014.html>
+for some further details.
diff --git a/pfinet/config.h b/pfinet/config.h
index ce079620..95ac0f43 100644
--- a/pfinet/config.h
+++ b/pfinet/config.h
@@ -7,6 +7,7 @@
#define CONFIG_NET 1
#define CONFIG_INET 1
+#define CONFIG_IPV6 1
#undef CONFIG_IPX
#undef CONFIG_ATALK
@@ -34,3 +35,6 @@
#define CONFIG_SKB_LARGE 1
#define CONFIG_IP_NOSIOCRT 1 /* How convenient. */
+
+#define CONFIG_IPV6_EUI64 1
+#undef CONFIG_IPV6_NO_PB
diff --git a/pfinet/ethernet.c b/pfinet/ethernet.c
index 940b78c2..dab5c56f 100644
--- a/pfinet/ethernet.c
+++ b/pfinet/ethernet.c
@@ -1,5 +1,7 @@
/*
- Copyright (C) 1995,96,98,99,2000,02 Free Software Foundation, Inc.
+ Copyright (C) 1995, 1996, 1998, 1999, 2000, 2002, 2007
+ Free Software Foundation, Inc.
+
Written by Michael I. Bushnell, p/BSG.
This file is part of the GNU Hurd.
@@ -119,7 +121,7 @@ ethernet_demuxer (mach_msg_header_t *inp,
__mutex_lock (&net_bh_lock);
skb = alloc_skb (datalen, GFP_ATOMIC);
- skb->len = datalen;
+ skb_put (skb, datalen);
skb->dev = dev;
/* Copy the two parts of the frame into the buffer. */
@@ -197,6 +199,22 @@ ethernet_xmit (struct sk_buff *skb, struct device *dev)
return 0;
}
+/* Set device flags (e.g. promiscuous) */
+int
+ethernet_change_flags (struct device *dev, short flags)
+{
+ error_t err = 0;
+#ifdef NET_FLAGS
+ int status = flags;
+ struct ether_device *edev = (struct ether_device *) dev->priv;
+ err = device_set_status (edev->ether_port, NET_FLAGS, &status, 1);
+ if (err == D_INVALID_OPERATION)
+ /* Not supported, ignore. */
+ err = 0;
+#endif
+ return err;
+}
+
void
setup_ethernet_device (char *name, struct device **device)
{
diff --git a/pfinet/glue-include/asm/delay.h b/pfinet/glue-include/asm/delay.h
new file mode 100644
index 00000000..7d651a40
--- /dev/null
+++ b/pfinet/glue-include/asm/delay.h
@@ -0,0 +1 @@
+/* stub file. */
diff --git a/pfinet/glue-include/linux/if.h b/pfinet/glue-include/linux/if.h
index 86ee83b2..7d4563c3 100644
--- a/pfinet/glue-include/linux/if.h
+++ b/pfinet/glue-include/linux/if.h
@@ -1,4 +1,3 @@
#include <net/if.h>
#define IFF_VOLATILE (IFF_LOOPBACK|IFF_POINTOPOINT|IFF_BROADCAST|IFF_ALLMULTI)
-#define IFF_DYNAMIC 0x8000 /* dialup device with changing addresses*/
diff --git a/pfinet/glue-include/linux/in6.h b/pfinet/glue-include/linux/in6.h
index 260020a6..c3e5dfc4 100644
--- a/pfinet/glue-include/linux/in6.h
+++ b/pfinet/glue-include/linux/in6.h
@@ -1 +1,110 @@
+#ifndef GLUE_LINUX_IN6_H
+#define GLUE_LINUX_IN6_H 1
+
#include <netinet/in.h>
+
+#if 0
+struct ipv6_mreq {
+ /* IPv6 multicast address of group */
+ struct in6_addr ipv6mr_multiaddr;
+
+ /* local IPv6 address of interface */
+ int ipv6mr_ifindex;
+};
+#endif
+
+/* In Linux's struct ipv6_mreq the second member is called ipv6mr_ifindex,
+ * however it's called ipv6mr_interface in ours.
+ */
+#define ipv6mr_ifindex ipv6mr_interface
+
+struct in6_flowlabel_req
+{
+ struct in6_addr flr_dst;
+ __u32 flr_label;
+ __u8 flr_action;
+ __u8 flr_share;
+ __u16 flr_flags;
+ __u16 flr_expires;
+ __u16 flr_linger;
+ __u32 __flr_pad;
+ /* Options in format of IPV6_PKTOPTIONS */
+};
+
+#define IPV6_FL_A_GET 0
+#define IPV6_FL_A_PUT 1
+#define IPV6_FL_A_RENEW 2
+
+#define IPV6_FL_F_CREATE 1
+#define IPV6_FL_F_EXCL 2
+
+#define IPV6_FL_S_NONE 0
+#define IPV6_FL_S_EXCL 1
+#define IPV6_FL_S_PROCESS 2
+#define IPV6_FL_S_USER 3
+#define IPV6_FL_S_ANY 255
+
+
+/*
+ * Bitmask constant declarations to help applications select out the
+ * flow label and priority fields.
+ *
+ * Note that this are in host byte order while the flowinfo field of
+ * sockaddr_in6 is in network byte order.
+ */
+
+#define IPV6_FLOWINFO_FLOWLABEL 0x000fffff
+#define IPV6_FLOWINFO_PRIORITY 0x0ff00000
+
+/* These defintions are obsolete */
+#define IPV6_PRIORITY_UNCHARACTERIZED 0x0000
+#define IPV6_PRIORITY_FILLER 0x0100
+#define IPV6_PRIORITY_UNATTENDED 0x0200
+#define IPV6_PRIORITY_RESERVED1 0x0300
+#define IPV6_PRIORITY_BULK 0x0400
+#define IPV6_PRIORITY_RESERVED2 0x0500
+#define IPV6_PRIORITY_INTERACTIVE 0x0600
+#define IPV6_PRIORITY_CONTROL 0x0700
+#define IPV6_PRIORITY_8 0x0800
+#define IPV6_PRIORITY_9 0x0900
+#define IPV6_PRIORITY_10 0x0a00
+#define IPV6_PRIORITY_11 0x0b00
+#define IPV6_PRIORITY_12 0x0c00
+#define IPV6_PRIORITY_13 0x0d00
+#define IPV6_PRIORITY_14 0x0e00
+#define IPV6_PRIORITY_15 0x0f00
+
+/*
+ * IPv6 TLV options.
+ */
+#define IPV6_TLV_PAD0 0
+#define IPV6_TLV_PADN 1
+#define IPV6_TLV_ROUTERALERT 20
+#define IPV6_TLV_JUMBO 194
+
+/*
+ * IPV6 socket options
+ */
+
+#define IPV6_ADDRFORM 1
+#define IPV6_PKTINFO 2
+#define IPV6_HOPOPTS 3
+#define IPV6_DSTOPTS 4
+#define IPV6_RTHDR 5
+#define IPV6_PKTOPTIONS 6
+#define IPV6_CHECKSUM 7
+#define IPV6_HOPLIMIT 8
+#define IPV6_NEXTHOP 9
+#define IPV6_AUTHHDR 10
+#define IPV6_FLOWINFO 11
+
+/* IPV6_MTU_DISCOVER values */
+#define IPV6_PMTUDISC_DONT 0
+#define IPV6_PMTUDISC_WANT 1
+#define IPV6_PMTUDISC_DO 2
+
+/* Flowlabel */
+#define IPV6_FLOWLABEL_MGR 32
+#define IPV6_FLOWINFO_SEND 33
+
+#endif /* not GLUE_LINUX_IN6_H */
diff --git a/pfinet/glue-include/linux/ipv6.h b/pfinet/glue-include/linux/ipv6.h
index 374f9b1e..5a1604a3 100644
--- a/pfinet/glue-include/linux/ipv6.h
+++ b/pfinet/glue-include/linux/ipv6.h
@@ -1 +1,117 @@
+#ifndef _IPV6_H
+#define _IPV6_H
+
#include <linux/in6.h>
+#include <asm/byteorder.h>
+
+/* The latest drafts declared increase in minimal mtu up to 1280. */
+
+#define IPV6_MIN_MTU 1280
+
+/*
+ * Advanced API
+ * source interface/address selection, source routing, etc...
+ * *under construction*
+ */
+
+
+struct in6_ifreq {
+ struct in6_addr ifr6_addr;
+ __u32 ifr6_prefixlen;
+ int ifr6_ifindex;
+};
+
+#define IPV6_SRCRT_STRICT 0x01 /* this hop must be a neighbor */
+#define IPV6_SRCRT_TYPE_0 0 /* IPv6 type 0 Routing Header */
+
+/*
+ * routing header
+ */
+struct ipv6_rt_hdr {
+ __u8 nexthdr;
+ __u8 hdrlen;
+ __u8 type;
+ __u8 segments_left;
+
+ /*
+ * type specific data
+ * variable length field
+ */
+};
+
+
+struct ipv6_opt_hdr {
+ __u8 nexthdr;
+ __u8 hdrlen;
+ /*
+ * TLV encoded option data follows.
+ */
+};
+
+#define ipv6_destopt_hdr ipv6_opt_hdr
+#define ipv6_hopopt_hdr ipv6_opt_hdr
+
+#ifdef __KERNEL__
+#define ipv6_optlen(p) (((p)->hdrlen+1) << 3)
+#endif
+
+/*
+ * routing header type 0 (used in cmsghdr struct)
+ */
+
+struct rt0_hdr {
+ struct ipv6_rt_hdr rt_hdr;
+ __u32 bitmap; /* strict/loose bit map */
+ struct in6_addr addr[0];
+
+#define rt0_type rt_hdr.type;
+};
+
+/*
+ * IPv6 fixed header
+ *
+ * BEWARE, it is incorrect. The first 4 bits of flow_lbl
+ * are glued to priority now, forming "class".
+ */
+
+struct ipv6hdr {
+#if defined(__LITTLE_ENDIAN_BITFIELD)
+ __u8 priority:4,
+ version:4;
+#elif defined(__BIG_ENDIAN_BITFIELD)
+ __u8 version:4,
+ priority:4;
+#else
+#error "Please fix <asm/byteorder.h>"
+#endif
+ __u8 flow_lbl[3];
+
+ __u16 payload_len;
+ __u8 nexthdr;
+ __u8 hop_limit;
+
+ struct in6_addr saddr;
+ struct in6_addr daddr;
+};
+
+#ifdef __KERNEL__
+
+/*
+ This structure contains results of exthdrs parsing
+ as offsets from skb->nh.
+ */
+
+struct inet6_skb_parm
+{
+ int iif;
+ __u16 ra;
+ __u16 hop;
+ __u16 auth;
+ __u16 dst0;
+ __u16 srcrt;
+ __u16 dst1;
+};
+
+#endif
+
+#endif
diff --git a/pfinet/glue-include/linux/sched.h b/pfinet/glue-include/linux/sched.h
index f57de2c3..d4cae42a 100644
--- a/pfinet/glue-include/linux/sched.h
+++ b/pfinet/glue-include/linux/sched.h
@@ -162,7 +162,8 @@ schedule_timeout (long timeout)
{
long expire = timeout + jiffies;
struct timer_list timer;
- struct wait_queue *sleep = 0; /* See comment in wait.h why this suffices. */
+ static struct wait_queue *sleep = 0; /* See comment in wait.h why this suffices. */
+ /* TODO: but free it !! */
init_timer (&timer);
timer.expires = expire;
diff --git a/pfinet/glue-include/linux/socket.h b/pfinet/glue-include/linux/socket.h
index bf37f490..820ed00f 100644
--- a/pfinet/glue-include/linux/socket.h
+++ b/pfinet/glue-include/linux/socket.h
@@ -22,6 +22,8 @@
#define SOL_IP IPPROTO_IP
#define SOL_TCP IPPROTO_TCP
+#define SOL_IPV6 IPPROTO_IPV6
+#define SOL_ICMPV6 IPPROTO_ICMPV6
#define SOL_RAW IPPROTO_RAW
/* IP options */
@@ -73,7 +75,10 @@ put_cmsg(struct msghdr *msg, int level, int type, int len, void *data)
{ return 0; }
#endif
-#define MSG_NOSIGNAL 0
+#ifndef MSG_NOSIGNAL
+# warning "http://lists.gnu.org/archive/html/bug-hurd/2008-10/msg00007.html"
+# define MSG_NOSIGNAL 0
+#endif
#define MSG_ERRQUEUE 0
/* There is no SOCK_PACKET, it is a bad bad thing. This chicanery is
diff --git a/pfinet/iioctl-ops.c b/pfinet/iioctl-ops.c
index a2a37144..c0dd6d5f 100644
--- a/pfinet/iioctl-ops.c
+++ b/pfinet/iioctl-ops.c
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2000 Free Software Foundation, Inc.
+ Copyright (C) 2000, 2007 Free Software Foundation, Inc.
Written by Marcus Brinkmann.
This file is part of the GNU Hurd.
@@ -34,6 +34,7 @@
#include <sys/ioctl.h>
#include <net/if.h>
+#include <net/sock.h>
extern struct notifier_block *netdev_chain;
@@ -87,17 +88,20 @@ siocgifXaddr (io_t port,
sockaddr_t *addr,
enum siocgif_type type)
{
+ struct sock_user *user = begin_using_socket_port (port);
error_t err = 0;
struct device *dev;
struct sockaddr_in *sin = (struct sockaddr_in *) addr;
uint32_t addrs[4];
- if (!port)
+ if (!user)
return EOPNOTSUPP;
dev = get_dev (ifnam);
if (!dev)
err = ENODEV;
+ else if (user->sock->sk->family != AF_INET)
+ err = EINVAL;
else
{
sin->sin_family = AF_INET;
@@ -105,7 +109,9 @@ siocgifXaddr (io_t port,
inquire_device (dev, &addrs[0], &addrs[1], &addrs[2], &addrs[3]);
sin->sin_addr.s_addr = addrs[type];
}
+
__mutex_unlock (&global_lock);
+ end_using_socket_port (user);
return err;
}
@@ -142,6 +148,8 @@ siocsifXaddr (io_t port,
err = ENODEV;
else if (sin->sin_family != AF_INET)
err = EINVAL;
+ else if (user->sock->sk->family != AF_INET)
+ err = EINVAL;
else
{
inquire_device (dev, &addrs[0], &addrs[1], &addrs[2], &addrs[3]);
@@ -180,7 +188,11 @@ S_iioctl_siocsifflags (io_t port,
else if (!dev)
err = ENODEV;
else
- err = dev_change_flags(dev, flags);
+ {
+ err = dev_change_flags (dev, flags);
+ if (!err)
+ err = ethernet_change_flags (dev, flags);
+ }
__mutex_unlock (&global_lock);
end_using_socket_port (user);
@@ -263,6 +275,31 @@ SIOCGIF (brdaddr, BRDADDR);
/* 37 SIOCGIFNETMASK -- Get netmask of a network interface. */
SIOCGIF (netmask, NETMASK);
+/* 39 SIOCGIFHWADDR -- Get the hardware address of a network interface. */
+error_t
+S_iioctl_siocgifhwaddr (io_t port,
+ ifname_t ifname,
+ sockaddr_t *addr)
+{
+ error_t err = 0;
+ struct device *dev;
+
+ if (!port)
+ return EOPNOTSUPP;
+
+ dev = get_dev (ifname);
+ if (!dev)
+ err = ENODEV;
+ else
+ {
+ memcpy (addr->sa_data, dev->dev_addr, dev->addr_len);
+ addr->sa_family = dev->type;
+ }
+
+ __mutex_unlock (&global_lock);
+ return err;
+}
+
/* 51 SIOCGIFMTU -- Get mtu of a network interface. */
error_t
S_iioctl_siocgifmtu (io_t port,
diff --git a/pfinet/io-ops.c b/pfinet/io-ops.c
index 21bc3ac2..ef8d8513 100644
--- a/pfinet/io-ops.c
+++ b/pfinet/io-ops.c
@@ -87,6 +87,11 @@ S_io_read (struct sock_user *user,
if (amount > *datalen)
{
*data = mmap (0, amount, PROT_READ|PROT_WRITE, MAP_ANON, 0, 0);
+ if (*data == MAP_FAILED)
+ /* Should check whether errno is indeed ENOMEM --
+ but this can't be done in a straightforward way,
+ because the glue headers #undef errno. */
+ return ENOMEM;
alloced = 1;
}
@@ -102,7 +107,11 @@ S_io_read (struct sock_user *user,
__mutex_unlock (&global_lock);
if (err < 0)
- err = -err;
+ {
+ err = -err;
+ if (alloced)
+ munmap (*data, amount);
+ }
else
{
*datalen = err;
diff --git a/pfinet/linux-src/arch/sparc/lib/checksum.S b/pfinet/linux-src/arch/sparc/lib/checksum.S
index d02b6dfb..3dc58259 100644
--- a/pfinet/linux-src/arch/sparc/lib/checksum.S
+++ b/pfinet/linux-src/arch/sparc/lib/checksum.S
@@ -336,7 +336,7 @@ C_LABEL(__csum_partial_copy_sparc_generic):
bne cc_dword_align ! yes, we check for short lengths there
andcc %g1, 0xffffff80, %g0 ! can we use unrolled loop?
3: be 3f ! nope, less than one loop remains
- andcc %o1, 4, %g0 ! dest aligned on 4 or 8 byte boundry?
+ andcc %o1, 4, %g0 ! dest aligned on 4 or 8 byte boundary?
be ccdbl + 4 ! 8 byte aligned, kick ass
5: CSUMCOPY_BIGCHUNK(%o0,%o1,%g7,0x00,%o4,%o5,%g2,%g3,%g4,%g5,%o2,%o3)
CSUMCOPY_BIGCHUNK(%o0,%o1,%g7,0x20,%o4,%o5,%g2,%g3,%g4,%g5,%o2,%o3)
diff --git a/pfinet/linux-src/include/asm-i386/checksum.h b/pfinet/linux-src/include/asm-i386/checksum.h
index ed023174..add89590 100644
--- a/pfinet/linux-src/include/asm-i386/checksum.h
+++ b/pfinet/linux-src/include/asm-i386/checksum.h
@@ -109,7 +109,8 @@ static inline unsigned short ip_fast_csum(unsigned char * iph,
are modified, we must also specify them as outputs, or gcc
will assume they contain their original values. */
: "=r" (sum), "=r" (iph), "=r" (ihl)
- : "1" (iph), "2" (ihl));
+ : "1" (iph), "2" (ihl)
+ : "memory");
return(sum);
}
@@ -185,7 +186,8 @@ static __inline__ unsigned short int csum_ipv6_magic(struct in6_addr *saddr,
"adcl $0, %0\n"
: "=&r" (sum)
: "r" (saddr), "r" (daddr),
- "r"(htonl((__u32) (len))), "r"(htonl(proto)), "0"(sum));
+ "r"(htonl((__u32) (len))), "r"(htonl(proto)), "0"(sum)
+ : "memory");
return csum_fold(sum);
}
diff --git a/pfinet/linux-src/include/linux/b1lli.h b/pfinet/linux-src/include/linux/b1lli.h
index 72cae4d2..388ff80c 100644
--- a/pfinet/linux-src/include/linux/b1lli.h
+++ b/pfinet/linux-src/include/linux/b1lli.h
@@ -129,7 +129,7 @@ typedef struct avmb1_extcarddef {
#define AVMB1_LOAD_AND_CONFIG 3 /* load image and config to card */
#define AVMB1_ADDCARD_WITH_TYPE 4 /* add a new card, with cardtype */
#define AVMB1_GET_CARDINFO 5 /* get cardtype */
-#define AVMB1_REMOVECARD 6 /* remove a card (usefull for T1) */
+#define AVMB1_REMOVECARD 6 /* remove a card (useful for T1) */
#define AVMB1_REGISTERCARD_IS_OBSOLETE
diff --git a/pfinet/linux-src/include/linux/cdk.h b/pfinet/linux-src/include/linux/cdk.h
index 2180e433..2fab8949 100644
--- a/pfinet/linux-src/include/linux/cdk.h
+++ b/pfinet/linux-src/include/linux/cdk.h
@@ -149,7 +149,7 @@ typedef struct cdkhdr {
/*
* Define the memory mapping structure. This structure is pointed to by
* the memp field in the stlcdkhdr struct. As many as these structures
- * as required are layed out in shared memory to define how the rest of
+ * as required are laid out in shared memory to define how the rest of
* shared memory is divided up. There will be one for each port.
*/
typedef struct cdkmem {
diff --git a/pfinet/linux-src/include/linux/cdrom.h b/pfinet/linux-src/include/linux/cdrom.h
index a8c028fb..4bbdbd44 100644
--- a/pfinet/linux-src/include/linux/cdrom.h
+++ b/pfinet/linux-src/include/linux/cdrom.h
@@ -75,7 +75,7 @@
#define CDROM_GET_MCN 0x5311 /* Obtain the "Universal Product Code"
if available (struct cdrom_mcn) */
#define CDROM_GET_UPC CDROM_GET_MCN /* This one is depricated,
- but here anyway for compatability */
+ but here anyway for compatibility */
#define CDROMRESET 0x5312 /* hard-reset the drive */
#define CDROMVOLREAD 0x5313 /* Get the drive's volume setting
(struct cdrom_volctrl) */
diff --git a/pfinet/linux-src/include/linux/coda_opstats.h b/pfinet/linux-src/include/linux/coda_opstats.h
index fdf3fac4..167490d8 100644
--- a/pfinet/linux-src/include/linux/coda_opstats.h
+++ b/pfinet/linux-src/include/linux/coda_opstats.h
@@ -85,7 +85,7 @@ struct cfs_op_stats {
/*
- * With each call to the minicache, we'll bump the counters whenver
+ * With each call to the minicache, we'll bump the counters whenever
* a call is satisfied internally (through the cache or through a
* redirect), and whenever an operation is caused internally.
* Then, we can add the total operations caught by the minicache
diff --git a/pfinet/linux-src/include/linux/cyclades.h b/pfinet/linux-src/include/linux/cyclades.h
index 008254e6..4e8333c1 100644
--- a/pfinet/linux-src/include/linux/cyclades.h
+++ b/pfinet/linux-src/include/linux/cyclades.h
@@ -134,7 +134,7 @@ struct CYZ_BOOT_CTRL {
/****************** ****************** *******************/
/*
* The data types defined below are used in all ZFIRM interface
- * data structures. They accomodate differences between HW
+ * data structures. They accommodate differences between HW
* architectures and compilers.
*/
@@ -167,7 +167,7 @@ struct CUSTOM_REG {
uclong fpga_version; /* FPGA Version Number Register */
uclong cpu_start; /* CPU start Register (write) */
uclong cpu_stop; /* CPU stop Register (write) */
- uclong misc_reg; /* Miscelaneous Register */
+ uclong misc_reg; /* Miscellaneous Register */
uclong idt_mode; /* IDT mode Register */
uclong uart_irq_status; /* UART IRQ status Register */
uclong clear_timer0_irq; /* Clear timer interrupt Register */
diff --git a/pfinet/linux-src/include/linux/isdn.h b/pfinet/linux-src/include/linux/isdn.h
index a0a0b0fa..742fe14b 100644
--- a/pfinet/linux-src/include/linux/isdn.h
+++ b/pfinet/linux-src/include/linux/isdn.h
@@ -23,7 +23,7 @@
* $Log: isdn.h,v $
* Revision 1.81 1999/10/27 21:21:18 detabc
* Added support for building logically-bind-group's per interface.
- * usefull for outgoing call's with more then one isdn-card.
+ * useful for outgoing call's with more then one isdn-card.
*
* Switchable support to dont reset the hangup-timeout for
* receive frames. Most part's of the timru-rules for receiving frames
@@ -192,7 +192,7 @@
* Added changes for recent 2.1.x kernels:
* changed return type of isdn_close
* queue_task_* -> queue_task
- * clear/set_bit -> test_and_... where apropriate.
+ * clear/set_bit -> test_and_... where appropriate.
* changed type of hard_header_cache parameter.
*
* Revision 1.28 1997/03/07 01:33:01 fritz
diff --git a/pfinet/linux-src/include/linux/isdn_ppp.h b/pfinet/linux-src/include/linux/isdn_ppp.h
index 06d71797..e7682fb3 100644
--- a/pfinet/linux-src/include/linux/isdn_ppp.h
+++ b/pfinet/linux-src/include/linux/isdn_ppp.h
@@ -77,7 +77,7 @@ struct isdn_ppp_comp_data {
*
* We use this same struct for the reset entry of the compressor to commu-
* nicate to its caller how to deal with sending of a Reset Ack. In this
- * case, expra is not used, but other options still apply (supressing
+ * case, expra is not used, but other options still apply (suppressing
* sending with rsend, appending arbitrary data, etc).
*/
diff --git a/pfinet/linux-src/include/linux/isdnif.h b/pfinet/linux-src/include/linux/isdnif.h
index 07e3b826..7380b326 100644
--- a/pfinet/linux-src/include/linux/isdnif.h
+++ b/pfinet/linux-src/include/linux/isdnif.h
@@ -73,7 +73,7 @@
* Added changes for recent 2.1.x kernels:
* changed return type of isdn_close
* queue_task_* -> queue_task
- * clear/set_bit -> test_and_... where apropriate.
+ * clear/set_bit -> test_and_... where appropriate.
* changed type of hard_header_cache parameter.
*
* Revision 1.19 1997/03/25 23:13:56 keil
@@ -189,7 +189,7 @@
/* */
/* The proceed command holds a incoming call in a state to leave processes */
/* enough time to check whether ist should be accepted. */
-/* The PROT_IO Command extends the interface to make protocol dependant */
+/* The PROT_IO Command extends the interface to make protocol dependent */
/* features available (call diversion, call waiting...). */
/* */
/* The PROT_IO Command is executed with the desired driver id and the arg */
diff --git a/pfinet/linux-src/include/linux/ixjuser.h b/pfinet/linux-src/include/linux/ixjuser.h
index a7019533..1ee0ee91 100644
--- a/pfinet/linux-src/include/linux/ixjuser.h
+++ b/pfinet/linux-src/include/linux/ixjuser.h
@@ -31,7 +31,7 @@ static char ixjuser_h_rcsid[] = "$Id: ixjuser.h,v 3.4 1999/12/16 22:18:36 root E
/***************************************************************************
If you use the IXJCTL_TESTRAM command, the card must be power
- cycled to reset the SRAM values before futher use.
+ cycled to reset the SRAM values before further use.
***************************************************************************/
#define IXJCTL_DSP_RESET _IO ('q', 0xC0)
@@ -332,7 +332,7 @@ typedef struct {
* This group of IOCTLs deal with the Acoustic Echo Cancellation settings
* of the DSP
*
-* Issueing the IXJCTL_AEC_START command with a value of AEC_OFF has the
+* Issuing the IXJCTL_AEC_START command with a value of AEC_OFF has the
* same effect as IXJCTL_AEC_STOP. This is to simplify slider bar
* controls. IXJCTL_AEC_GET_LEVEL returns the current setting of the AEC.
******************************************************************************/
diff --git a/pfinet/linux-src/include/linux/loop.h b/pfinet/linux-src/include/linux/loop.h
index d276911c..43b3bd69 100644
--- a/pfinet/linux-src/include/linux/loop.h
+++ b/pfinet/linux-src/include/linux/loop.h
@@ -63,7 +63,7 @@ typedef int (* transfer_proc_t)(struct loop_device *, int cmd,
#endif
/*
- * This uses kdev_t because glibc currently has no appropiate
+ * This uses kdev_t because glibc currently has no appropriate
* conversion version for the loop ioctls.
* The situation is very unpleasant
*/
diff --git a/pfinet/linux-src/include/linux/module.h b/pfinet/linux-src/include/linux/module.h
index 94cce874..585a8d1d 100644
--- a/pfinet/linux-src/include/linux/module.h
+++ b/pfinet/linux-src/include/linux/module.h
@@ -230,7 +230,7 @@ extern struct module *module_list;
In the kernel, the symbol is added to the kernel's global symbol table.
In a module, it controls which variables are exported. If no
- variables are explicitly exported, the action is controled by the
+ variables are explicitly exported, the action is controlled by the
insmod -[xX] flags. Otherwise, only the variables listed are exported.
This obviates the need for the old register_symtab() function. */
diff --git a/pfinet/linux-src/include/linux/notifier.h b/pfinet/linux-src/include/linux/notifier.h
index 42faceaa..1e8bf707 100644
--- a/pfinet/linux-src/include/linux/notifier.h
+++ b/pfinet/linux-src/include/linux/notifier.h
@@ -106,7 +106,7 @@ extern __inline__ int notifier_call_chain(struct notifier_block **n, unsigned lo
#define SYS_POWER_OFF 0x0003 /* Notify of system power off */
/*
- * Publically visible notifier objects
+ * Publicly visible notifier objects
*/
extern struct notifier_block *boot_notifier_list;
diff --git a/pfinet/linux-src/include/linux/poll.h b/pfinet/linux-src/include/linux/poll.h
index 7eb57334..991204f1 100644
--- a/pfinet/linux-src/include/linux/poll.h
+++ b/pfinet/linux-src/include/linux/poll.h
@@ -51,7 +51,7 @@ extern inline void poll_wait(struct file * filp, struct wait_queue ** wait_addre
typedef unsigned long kernel_fd_set[KFDS_NR/__NFDBITS];
/*
- * Scaleable version of the fd_set.
+ * Scalable version of the fd_set.
*/
typedef struct {
diff --git a/pfinet/linux-src/include/linux/rtnetlink.h b/pfinet/linux-src/include/linux/rtnetlink.h
index 4fda960d..548a9b14 100644
--- a/pfinet/linux-src/include/linux/rtnetlink.h
+++ b/pfinet/linux-src/include/linux/rtnetlink.h
@@ -138,7 +138,7 @@ enum
*/
#define RTPROT_GATED 8 /* Apparently, GateD */
-#define RTPROT_RA 9 /* RDISC/ND router advertisments */
+#define RTPROT_RA 9 /* RDISC/ND router advertisements */
#define RTPROT_MRT 10 /* Merit MRT */
#define RTPROT_ZEBRA 11 /* Zebra */
#define RTPROT_BIRD 12 /* BIRD */
diff --git a/pfinet/linux-src/include/linux/socket.h b/pfinet/linux-src/include/linux/socket.h
index 837a3e46..b427f992 100644
--- a/pfinet/linux-src/include/linux/socket.h
+++ b/pfinet/linux-src/include/linux/socket.h
@@ -53,7 +53,7 @@ struct cmsghdr {
};
/*
- * Ancilliary data object information MACROS
+ * Ancillary data object information MACROS
* Table 5-14 of POSIX 1003.1g
*/
diff --git a/pfinet/linux-src/include/linux/soundcard.h b/pfinet/linux-src/include/linux/soundcard.h
index 2d5128dc..2041b4d4 100644
--- a/pfinet/linux-src/include/linux/soundcard.h
+++ b/pfinet/linux-src/include/linux/soundcard.h
@@ -1204,7 +1204,7 @@ extern int OSS_write_patch2(int fd, unsigned char *buf, int len);
#define SEQ_PANNING(dev, voice, pos) SEQ_CONTROL(dev, voice, CTL_PAN, (pos+128) / 2)
/*
- * Timing and syncronization macros
+ * Timing and synchronization macros
*/
#define _TIMER_EVENT(ev, parm) {_SEQ_NEEDBUF(8);\
diff --git a/pfinet/linux-src/include/linux/telephony.h b/pfinet/linux-src/include/linux/telephony.h
index 082b885f..0e4a95a4 100644
--- a/pfinet/linux-src/include/linux/telephony.h
+++ b/pfinet/linux-src/include/linux/telephony.h
@@ -168,8 +168,8 @@ typedef enum {
* indicate the current state of the hookswitch. The pstn_ring bit
* indicates that the DAA on a LineJACK card has detected ring voltage on
* the PSTN port. The caller_id bit indicates that caller_id data has been
-* recieved and is available. The pstn_wink bit indicates that the DAA on
-* the LineJACK has recieved a wink from the telco switch. The f0, f1, f2
+* received and is available. The pstn_wink bit indicates that the DAA on
+* the LineJACK has received a wink from the telco switch. The f0, f1, f2
* and f3 bits indicate that the filter has been triggered by detecting the
* frequency programmed into that filter.
*
diff --git a/pfinet/linux-src/include/linux/tpqic02.h b/pfinet/linux-src/include/linux/tpqic02.h
index fe13ad6e..790e0e5a 100644
--- a/pfinet/linux-src/include/linux/tpqic02.h
+++ b/pfinet/linux-src/include/linux/tpqic02.h
@@ -588,7 +588,7 @@
*/
#define TP_REWCLOSE(d) ((MINOR(d)&0x01) == 1) /* rewind bit */
- /* rewind is only done if data has been transfered */
+ /* rewind is only done if data has been transferred */
#define TP_DENS(dev) ((MINOR(dev) >> 1) & 0x07) /* tape density */
#define TP_UNIT(dev) ((MINOR(dev) >> 4) & 0x07) /* unit number */
@@ -633,8 +633,8 @@ struct tpstatus { /* sizeof(short)==2), LSB first */
#define EXC_WP 3 /* Write protected */
#define EXC_EOM 4 /* EOM */
#define EXC_RWA 5 /* read/write abort */
-#define EXC_XBAD 6 /* read error, bad block transfered */
-#define EXC_XFILLER 7 /* read error, filler block transfered */
+#define EXC_XBAD 6 /* read error, bad block transferred */
+#define EXC_XFILLER 7 /* read error, filler block transferred */
#define EXC_NDT 8 /* read error, no data */
#define EXC_NDTEOM 9 /* read error, no data & EOM */
#define EXC_NDTBOM 10 /* read error, no data & BOM */
diff --git a/pfinet/linux-src/include/linux/tty_ldisc.h b/pfinet/linux-src/include/linux/tty_ldisc.h
index 501ea076..4e904f83 100644
--- a/pfinet/linux-src/include/linux/tty_ldisc.h
+++ b/pfinet/linux-src/include/linux/tty_ldisc.h
@@ -62,7 +62,7 @@
* void (*set_termios)(struct tty_struct *tty, struct termios * old);
*
* This function notifies the line discpline that a change has
- * been made to the termios stucture.
+ * been made to the termios structure.
*
* int (*poll)(struct tty_struct * tty, struct file * file,
* poll_table *wait);
diff --git a/pfinet/linux-src/include/linux/wavefront.h b/pfinet/linux-src/include/linux/wavefront.h
index f96c52d0..f816f940 100644
--- a/pfinet/linux-src/include/linux/wavefront.h
+++ b/pfinet/linux-src/include/linux/wavefront.h
@@ -667,7 +667,7 @@ typedef struct wf_fx_info {
/* Allow direct user-space control over FX memory/coefficient data.
In theory this could be used to download the FX microprogram,
- but it would be a little slower, and involve some wierd code.
+ but it would be a little slower, and involve some weird code.
*/
#define WFFX_MEMSET 69
diff --git a/pfinet/linux-src/include/linux/wireless.h b/pfinet/linux-src/include/linux/wireless.h
index 868f812a..61f85152 100644
--- a/pfinet/linux-src/include/linux/wireless.h
+++ b/pfinet/linux-src/include/linux/wireless.h
@@ -146,7 +146,7 @@
* The "flags" member indicate if the ESSID is active or not (promiscuous).
*/
-/* Other parameters usefull in 802.11 and some other devices */
+/* Other parameters useful in 802.11 and some other devices */
#define SIOCSIWRATE 0x8B20 /* set default bit rate (bps) */
#define SIOCGIWRATE 0x8B21 /* get default bit rate (bps) */
#define SIOCSIWRTS 0x8B22 /* set RTS/CTS threshold (bytes) */
diff --git a/pfinet/linux-src/include/net/pkt_sched.h b/pfinet/linux-src/include/net/pkt_sched.h
index 9911464f..c2ef8656 100644
--- a/pfinet/linux-src/include/net/pkt_sched.h
+++ b/pfinet/linux-src/include/net/pkt_sched.h
@@ -119,7 +119,7 @@ struct qdisc_rate_table
The result: [34]86 is not good choice for QoS router :-(
- The things are not so bad, because we may use artifical
+ The things are not so bad, because we may use artificial
clock evaluated by integration of network data flow
in the most critical places.
diff --git a/pfinet/linux-src/include/net/tcp.h b/pfinet/linux-src/include/net/tcp.h
index 0e7e4bb6..abb4b210 100644
--- a/pfinet/linux-src/include/net/tcp.h
+++ b/pfinet/linux-src/include/net/tcp.h
@@ -713,7 +713,7 @@ extern __inline__ __u32 tcp_recalc_ssthresh(struct tcp_opt *tp)
/* TCP timestamps are only 32-bits, this causes a slight
* complication on 64-bit systems since we store a snapshot
- * of jiffies in the buffer control blocks below. We decidely
+ * of jiffies in the buffer control blocks below. We decidedly
* only use of the low 32-bits of jiffies and hide the ugly
* casts with the following macro.
*/
@@ -1066,7 +1066,7 @@ static inline void tcp_clear_xmit_timer(struct sock *sk, int what)
timer = &tp->probe_timer;
break;
default:
- printk(timer_bug_msg);
+ printk("%s", timer_bug_msg);
return;
};
if(timer->prev != NULL)
@@ -1088,7 +1088,7 @@ static inline int tcp_timer_is_set(struct sock *sk, int what)
return tp->probe_timer.prev != NULL;
break;
default:
- printk(timer_bug_msg);
+ printk("%s", timer_bug_msg);
};
return 0;
}
diff --git a/pfinet/linux-src/net/core/dev.c b/pfinet/linux-src/net/core/dev.c
index 5b4c6255..92e105a1 100644
--- a/pfinet/linux-src/net/core/dev.c
+++ b/pfinet/linux-src/net/core/dev.c
@@ -187,7 +187,7 @@ int netdev_nit=0;
*
* BEWARE!!! Protocol handlers, mangling input packets,
* MUST BE last in hash buckets and checking protocol handlers
- * MUST start from promiscous ptype_all chain in net_bh.
+ * MUST start from promiscuous ptype_all chain in net_bh.
* It is true now, do not change it.
* Explantion follows: if protocol handler, mangling packet, will
* be the first on list, it is not able to sense, that packet
diff --git a/pfinet/linux-src/net/core/sock.c b/pfinet/linux-src/net/core/sock.c
index e0eb41a0..c47c935b 100644
--- a/pfinet/linux-src/net/core/sock.c
+++ b/pfinet/linux-src/net/core/sock.c
@@ -138,7 +138,7 @@ __u32 sysctl_rmem_max = SK_RMEM_MAX;
__u32 sysctl_wmem_default = SK_WMEM_MAX;
__u32 sysctl_rmem_default = SK_RMEM_MAX;
-/* Maximal space eaten by iovec or ancilliary data plus some space */
+/* Maximal space eaten by iovec or ancillary data plus some space */
int sysctl_optmem_max = sizeof(unsigned long)*(2*UIO_MAXIOV + 512);
/*
@@ -693,7 +693,7 @@ struct sk_buff *sock_alloc_send_skb(struct sock *sk, unsigned long size,
* 1003.1g draft 6.4. If we (the user) did a shutdown()
* call however we should not.
*
- * Note: This routine isnt just used for datagrams and
+ * Note: This routine isn't just used for datagrams and
* anyway some datagram protocols have a notion of
* close down.
*/
diff --git a/pfinet/linux-src/net/ipv4/fib_semantics.c b/pfinet/linux-src/net/ipv4/fib_semantics.c
index b78f7eba..b7edb29b 100644
--- a/pfinet/linux-src/net/ipv4/fib_semantics.c
+++ b/pfinet/linux-src/net/ipv4/fib_semantics.c
@@ -291,7 +291,7 @@ int fib_nh_match(struct rtmsg *r, struct nlmsghdr *nlh, struct kern_rta *rta,
Attempt to reconcile all of these (alas, self-contradictory) conditions
results in pretty ugly and hairy code with obscure logic.
- I choosed to generalized it instead, so that the size
+ I chose to generalize it instead, so that the size
of code does not increase practically, but it becomes
much more general.
Every prefix is assigned a "scope" value: "host" is local address,
diff --git a/pfinet/linux-src/net/ipv4/icmp.c b/pfinet/linux-src/net/ipv4/icmp.c
index 6c1edfd7..7fad4783 100644
--- a/pfinet/linux-src/net/ipv4/icmp.c
+++ b/pfinet/linux-src/net/ipv4/icmp.c
@@ -730,7 +730,7 @@ static void icmp_unreach(struct icmphdr *icmph, struct sk_buff *skb, int len)
*/
/*
- * Check the other end isnt violating RFC 1122. Some routers send
+ * Check the other end isn't violating RFC 1122. Some routers send
* bogus responses to broadcast frames. If you see this message
* first check your netmask matches at both ends, if it does then
* get the other vendor to fix their kit.
diff --git a/pfinet/linux-src/net/ipv4/ip_fw.c b/pfinet/linux-src/net/ipv4/ip_fw.c
index 400f46c0..73af70ae 100644
--- a/pfinet/linux-src/net/ipv4/ip_fw.c
+++ b/pfinet/linux-src/net/ipv4/ip_fw.c
@@ -239,7 +239,7 @@ struct ip_chain
ip_chainlabel label; /* Defines the label for each block */
struct ip_chain *next; /* Pointer to next block */
struct ip_fwkernel *chain; /* Pointer to first rule in block */
- __u32 refcount; /* Number of refernces to block */
+ __u32 refcount; /* Number of references to block */
int policy; /* Default rule for chain. Only *
* used in built in chains */
struct ip_reent reent[0]; /* Actually several of these */
diff --git a/pfinet/linux-src/net/ipv4/ip_gre.c b/pfinet/linux-src/net/ipv4/ip_gre.c
index 6a7546fd..4b03c226 100644
--- a/pfinet/linux-src/net/ipv4/ip_gre.c
+++ b/pfinet/linux-src/net/ipv4/ip_gre.c
@@ -436,7 +436,7 @@ void ipgre_err(struct sk_buff *skb, unsigned char *dp, int len)
/* Impossible event. */
return;
case ICMP_FRAG_NEEDED:
- /* And it is the only really necesary thing :-) */
+ /* And it is the only really necessary thing :-) */
rel_info = ntohs(skb->h.icmph->un.frag.mtu);
if (rel_info < grehlen+68)
return;
diff --git a/pfinet/linux-src/net/ipv4/ip_masq_quake.c b/pfinet/linux-src/net/ipv4/ip_masq_quake.c
index 995c3a0a..646348d1 100644
--- a/pfinet/linux-src/net/ipv4/ip_masq_quake.c
+++ b/pfinet/linux-src/net/ipv4/ip_masq_quake.c
@@ -92,7 +92,7 @@ masq_quake_in (struct ip_masq_app *mapp, struct ip_masq *ms, struct sk_buff **sk
iph = skb->nh.iph;
uh = (struct udphdr *)&(((char *)iph)[iph->ihl*4]);
- /* Check for lenght */
+ /* Check for length */
if(ntohs(uh->len) < 5)
return 0;
@@ -178,7 +178,7 @@ masq_quake_out (struct ip_masq_app *mapp, struct ip_masq *ms, struct sk_buff **s
iph = skb->nh.iph;
uh = (struct udphdr *)&(((char *)iph)[iph->ihl*4]);
- /* Check for lenght */
+ /* Check for length */
if(ntohs(uh->len) < 5)
return 0;
diff --git a/pfinet/linux-src/net/ipv4/ip_options.c b/pfinet/linux-src/net/ipv4/ip_options.c
index a3d1f0aa..ec21054d 100644
--- a/pfinet/linux-src/net/ipv4/ip_options.c
+++ b/pfinet/linux-src/net/ipv4/ip_options.c
@@ -491,15 +491,18 @@ void ip_options_undo(struct ip_options * opt)
int ip_options_get(struct ip_options **optp, unsigned char *data, int optlen, int user)
{
struct ip_options *opt;
+ size_t opt_size = sizeof(struct ip_options)+((optlen+3)&~3);
- opt = kmalloc(sizeof(struct ip_options)+((optlen+3)&~3), GFP_KERNEL);
+ opt = kmalloc(opt_size, GFP_KERNEL);
if (!opt)
return -ENOMEM;
memset(opt, 0, sizeof(struct ip_options));
if (optlen) {
if (user) {
- if (copy_from_user(opt->__data, data, optlen))
+ if (copy_from_user(opt->__data, data, optlen)) {
+ kfree_s(opt, opt_size);
return -EFAULT;
+ }
} else
memcpy(opt->__data, data, optlen);
}
@@ -509,7 +512,7 @@ int ip_options_get(struct ip_options **optp, unsigned char *data, int optlen, in
opt->is_data = 1;
opt->is_setbyuser = 1;
if (optlen && ip_options_compile(opt, NULL)) {
- kfree_s(opt, sizeof(struct ip_options) + optlen);
+ kfree_s(opt, opt_size);
return -EINVAL;
}
*optp = opt;
diff --git a/pfinet/linux-src/net/ipv4/ip_output.c b/pfinet/linux-src/net/ipv4/ip_output.c
index c8f416ee..d85ba6b5 100644
--- a/pfinet/linux-src/net/ipv4/ip_output.c
+++ b/pfinet/linux-src/net/ipv4/ip_output.c
@@ -782,7 +782,7 @@ void ip_fragment(struct sk_buff *skb, int (*output)(struct sk_buff*))
/* IF: it doesn't fit, use 'mtu' - the data space left */
if (len > mtu)
len = mtu;
- /* IF: we are not sending upto and including the packet end
+ /* IF: we are not sending up to and including the packet end
then align the next start on an eight byte boundary */
if (len < left) {
len &= ~7;
diff --git a/pfinet/linux-src/net/ipv4/ipconfig.c b/pfinet/linux-src/net/ipv4/ipconfig.c
index 0770bad1..bb95824c 100644
--- a/pfinet/linux-src/net/ipv4/ipconfig.c
+++ b/pfinet/linux-src/net/ipv4/ipconfig.c
@@ -844,7 +844,7 @@ int __init ip_auto_config(void)
}
/*
- * Use defaults whereever applicable.
+ * Use defaults wherever applicable.
*/
if (ic_defaults() < 0)
return -1;
diff --git a/pfinet/linux-src/net/ipv4/ipip.c b/pfinet/linux-src/net/ipv4/ipip.c
index 0aeef4a3..119d7567 100644
--- a/pfinet/linux-src/net/ipv4/ipip.c
+++ b/pfinet/linux-src/net/ipv4/ipip.c
@@ -365,7 +365,7 @@ void ipip_err(struct sk_buff *skb, unsigned char *dp, int len)
/* Impossible event. */
return;
case ICMP_FRAG_NEEDED:
- /* And it is the only really necesary thing :-) */
+ /* And it is the only really necessary thing :-) */
rel_info = ntohs(skb->h.icmph->un.frag.mtu);
if (rel_info < hlen+68)
return;
diff --git a/pfinet/linux-src/net/ipv4/raw.c b/pfinet/linux-src/net/ipv4/raw.c
index 5e7910dd..a0aaa82e 100644
--- a/pfinet/linux-src/net/ipv4/raw.c
+++ b/pfinet/linux-src/net/ipv4/raw.c
@@ -379,7 +379,7 @@ static void raw_close(struct sock *sk, long timeout)
sk->state = TCP_CLOSE;
raw_v4_unhash(sk);
/*
- B. Raw sockets may have direct kernel refereneces. Kill them.
+ B. Raw sockets may have direct kernel references. Kill them.
*/
ip_ra_control(sk, 0, NULL);
diff --git a/pfinet/linux-src/net/ipv4/tcp.c b/pfinet/linux-src/net/ipv4/tcp.c
index cf8cee22..8cde3854 100644
--- a/pfinet/linux-src/net/ipv4/tcp.c
+++ b/pfinet/linux-src/net/ipv4/tcp.c
@@ -1218,7 +1218,7 @@ int tcp_recvmsg(struct sock *sk, struct msghdr *msg,
break;
/* We need to check signals first, to get correct SIGURG
- * handling. FIXME: Need to check this doesnt impact 1003.1g
+ * handling. FIXME: Need to check this doesn't impact 1003.1g
* and move it down to the bottom of the loop
*/
if (signal_pending(current)) {
diff --git a/pfinet/linux-src/net/ipv4/tcp_input.c b/pfinet/linux-src/net/ipv4/tcp_input.c
index 7f5cc4e7..e84eaf43 100644
--- a/pfinet/linux-src/net/ipv4/tcp_input.c
+++ b/pfinet/linux-src/net/ipv4/tcp_input.c
@@ -130,7 +130,7 @@ static __inline__ void tcp_remember_ack(struct tcp_opt *tp, struct tcphdr *th,
{
tp->delayed_acks++;
- /* Tiny-grams with PSH set artifically deflate our
+ /* Tiny-grams with PSH set artificially deflate our
* ato measurement, but with a lower bound.
*/
if(th->psh && (skb->len < (tp->mss_cache >> 1))) {
@@ -989,7 +989,7 @@ tcp_timewait_state_process(struct tcp_tw_bucket *tw, struct sk_buff *skb,
/* Check RST or SYN */
if(th->rst || th->syn) {
- /* This is TIME_WAIT assasination, in two flavors.
+ /* This is TIME_WAIT assassination, in two flavors.
* Oh well... nobody has a sufficient solution to this
* protocol bug yet.
*/
@@ -1931,7 +1931,7 @@ int tcp_rcv_established(struct sock *sk, struct sk_buff *skb,
* Dave!!! Phrase above (and all about rcv_mss) has
* nothing to do with reality. rcv_mss must measure TOTAL
* size, including sacks, IP options etc. Hence, measure_rcv_mss
- * must occure before pulling etc, otherwise it will flap
+ * must occur before pulling etc, otherwise it will flap
* like hell. Even putting it before tcp_data is wrong,
* it should use skb->tail - skb->nh.raw instead.
* --ANK (980805)
@@ -1939,7 +1939,7 @@ int tcp_rcv_established(struct sock *sk, struct sk_buff *skb,
* BTW I broke it. Now all TCP options are handled equally
* in mss_clamp calculations (i.e. ignored, rfc1122),
* and mss_cache does include all of them (i.e. tstamps)
- * except for sacks, to calulate effective mss faster.
+ * except for sacks, to calculate effective mss faster.
* --ANK (980805)
*/
tcp_measure_rcv_mss(sk, skb);
diff --git a/pfinet/linux-src/net/ipv4/tcp_ipv4.c b/pfinet/linux-src/net/ipv4/tcp_ipv4.c
index 2364de33..99194238 100644
--- a/pfinet/linux-src/net/ipv4/tcp_ipv4.c
+++ b/pfinet/linux-src/net/ipv4/tcp_ipv4.c
@@ -613,7 +613,7 @@ int tcp_v4_connect(struct sock *sk, struct sockaddr *uaddr, int addr_len)
return -ENETUNREACH;
}
- dst_release(xchg(&sk->dst_cache, rt));
+ dst_release(xchg(&sk->dst_cache, &rt->u.dst));
buff = sock_wmalloc(sk, (MAX_HEADER + sk->prot->max_header),
0, GFP_KERNEL);
@@ -1516,7 +1516,7 @@ struct sock * tcp_v4_syn_recv_sock(struct sock *sk, struct sk_buff *skb,
#ifdef CONFIG_IP_TRANSPARENT_PROXY
/* The new socket created for transparent proxy may fall
* into a non-existed bind bucket because sk->num != newsk->num.
- * Ensure existance of the bucket now. The placement of the check
+ * Ensure existence of the bucket now. The placement of the check
* later will require to destroy just created newsk in the case of fail.
* 1998/04/22 Andrey V. Savochkin <saw@msu.ru>
*/
diff --git a/pfinet/linux-src/net/ipv4/tcp_output.c b/pfinet/linux-src/net/ipv4/tcp_output.c
index 2ac5e8a2..9ea4b7ad 100644
--- a/pfinet/linux-src/net/ipv4/tcp_output.c
+++ b/pfinet/linux-src/net/ipv4/tcp_output.c
@@ -257,7 +257,7 @@ static int tcp_fragment(struct sock *sk, struct sk_buff *skb, u32 len)
for TCP options, but includes only bare TCP header.
tp->mss_clamp is mss negotiated at connection setup.
- It is minumum of user_mss and mss received with SYN.
+ It is minimum of user_mss and mss received with SYN.
It also does not include TCP options.
tp->pmtu_cookie is last pmtu, seen by this function.
diff --git a/pfinet/linux-src/net/ipv6/addrconf.c b/pfinet/linux-src/net/ipv6/addrconf.c
new file mode 100644
index 00000000..d392b3fd
--- /dev/null
+++ b/pfinet/linux-src/net/ipv6/addrconf.c
@@ -0,0 +1,1964 @@
+/*
+ * IPv6 Address [auto]configuration
+ * Linux INET6 implementation
+ *
+ * Authors:
+ * Pedro Roque <roque@di.fc.ul.pt>
+ *
+ * $Id: addrconf.c,v 1.4 2009/02/24 01:21:14 sthibaul Exp $
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version
+ * 2 of the License, or (at your option) any later version.
+ */
+
+/*
+ * Changes:
+ *
+ * Janos Farkas : delete timer on ifdown
+ * <chexum@bankinf.banki.hu>
+ * Andi Kleen : kill doube kfree on module
+ * unload.
+ */
+
+#include <linux/config.h>
+#include <linux/errno.h>
+#include <linux/types.h>
+#include <linux/socket.h>
+#include <linux/sockios.h>
+#include <linux/sched.h>
+#include <linux/net.h>
+#include <linux/in6.h>
+#include <linux/netdevice.h>
+#include <linux/if_arp.h>
+#include <linux/route.h>
+#include <linux/inetdevice.h>
+#include <linux/init.h>
+#ifdef CONFIG_SYSCTL
+#include <linux/sysctl.h>
+#endif
+#include <linux/delay.h>
+
+#include <linux/proc_fs.h>
+#include <net/sock.h>
+#include <net/snmp.h>
+
+#include <net/ipv6.h>
+#include <net/protocol.h>
+#include <net/ndisc.h>
+#include <net/ip6_route.h>
+#include <net/addrconf.h>
+#include <net/ip.h>
+#include <linux/if_tunnel.h>
+#include <linux/rtnetlink.h>
+
+#include <asm/uaccess.h>
+
+/* Set to 3 to get tracing... */
+#define ACONF_DEBUG 2
+
+#if ACONF_DEBUG >= 3
+#define ADBG(x) printk x
+#else
+#define ADBG(x)
+#endif
+
+#ifdef CONFIG_SYSCTL
+static void addrconf_sysctl_register(struct inet6_dev *idev, struct ipv6_devconf *p);
+static void addrconf_sysctl_unregister(struct ipv6_devconf *p);
+#endif
+
+/*
+ * Configured unicast address list
+ */
+static struct inet6_ifaddr *inet6_addr_lst[IN6_ADDR_HSIZE];
+
+/*
+ * AF_INET6 device list
+ */
+static struct inet6_dev *inet6_dev_lst[IN6_ADDR_HSIZE];
+
+static atomic_t addr_list_lock = ATOMIC_INIT(0);
+
+void addrconf_verify(unsigned long);
+
+static struct timer_list addr_chk_timer = {
+ NULL, NULL,
+ 0, 0, addrconf_verify
+};
+
+/* These locks protect only against address deletions,
+ but not against address adds or status updates.
+ It is OK. The only race is when address is selected,
+ which becomes invalid immediately after selection.
+ It is harmless, because this address could be already invalid
+ several usecs ago.
+
+ Its important, that:
+
+ 1. The result of inet6_add_addr() is used only inside lock
+ or from bh_atomic context.
+
+ 2. inet6_get_lladdr() is used only from bh protected context.
+
+ 3. The result of ipv6_chk_addr() is not used outside of bh protected context.
+ */
+
+static __inline__ void addrconf_lock(void)
+{
+ atomic_inc(&addr_list_lock);
+ synchronize_bh();
+}
+
+static __inline__ void addrconf_unlock(void)
+{
+ atomic_dec(&addr_list_lock);
+}
+
+static int addrconf_ifdown(struct device *dev, int how);
+
+static void addrconf_dad_start(struct inet6_ifaddr *ifp);
+static void addrconf_dad_timer(unsigned long data);
+static void addrconf_dad_completed(struct inet6_ifaddr *ifp);
+static void addrconf_rs_timer(unsigned long data);
+static void ipv6_ifa_notify(int event, struct inet6_ifaddr *ifa);
+
+struct ipv6_devconf ipv6_devconf =
+{
+ 0, /* forwarding */
+ IPV6_DEFAULT_HOPLIMIT, /* hop limit */
+ IPV6_MIN_MTU, /* mtu */
+ 1, /* accept RAs */
+ 1, /* accept redirects */
+ 1, /* autoconfiguration */
+ 1, /* dad transmits */
+ MAX_RTR_SOLICITATIONS, /* router solicits */
+ RTR_SOLICITATION_INTERVAL, /* rtr solicit interval */
+ MAX_RTR_SOLICITATION_DELAY, /* rtr solicit delay */
+};
+
+static struct ipv6_devconf ipv6_devconf_dflt =
+{
+ 0, /* forwarding */
+ IPV6_DEFAULT_HOPLIMIT, /* hop limit */
+ IPV6_MIN_MTU, /* mtu */
+ 1, /* accept RAs */
+ 1, /* accept redirects */
+ 1, /* autoconfiguration */
+ 1, /* dad transmits */
+ MAX_RTR_SOLICITATIONS, /* router solicits */
+ RTR_SOLICITATION_INTERVAL, /* rtr solicit interval */
+ MAX_RTR_SOLICITATION_DELAY, /* rtr solicit delay */
+};
+
+int ipv6_addr_type(struct in6_addr *addr)
+{
+ u32 st;
+
+ st = addr->s6_addr32[0];
+
+ /* Consider all addresses with the first three bits different of
+ 000 and 111 as unicasts.
+ */
+ if ((st & __constant_htonl(0xE0000000)) != __constant_htonl(0x00000000) &&
+ (st & __constant_htonl(0xE0000000)) != __constant_htonl(0xE0000000))
+ return IPV6_ADDR_UNICAST;
+
+ if ((st & __constant_htonl(0xFF000000)) == __constant_htonl(0xFF000000)) {
+ int type = IPV6_ADDR_MULTICAST;
+
+ switch((st & __constant_htonl(0x00FF0000))) {
+ case __constant_htonl(0x00010000):
+ type |= IPV6_ADDR_LOOPBACK;
+ break;
+
+ case __constant_htonl(0x00020000):
+ type |= IPV6_ADDR_LINKLOCAL;
+ break;
+
+ case __constant_htonl(0x00050000):
+ type |= IPV6_ADDR_SITELOCAL;
+ break;
+ };
+ return type;
+ }
+
+ if ((st & __constant_htonl(0xFFC00000)) == __constant_htonl(0xFE800000))
+ return (IPV6_ADDR_LINKLOCAL | IPV6_ADDR_UNICAST);
+
+ if ((st & __constant_htonl(0xFFC00000)) == __constant_htonl(0xFEC00000))
+ return (IPV6_ADDR_SITELOCAL | IPV6_ADDR_UNICAST);
+
+ if ((addr->s6_addr32[0] | addr->s6_addr32[1]) == 0) {
+ if (addr->s6_addr32[2] == 0) {
+ if (addr->__in6_u.__u6_addr32[3] == 0)
+ return IPV6_ADDR_ANY;
+
+ if (addr->s6_addr32[3] == __constant_htonl(0x00000001))
+ return (IPV6_ADDR_LOOPBACK | IPV6_ADDR_UNICAST);
+
+ return (IPV6_ADDR_COMPATv4 | IPV6_ADDR_UNICAST);
+ }
+
+ if (addr->s6_addr32[2] == __constant_htonl(0x0000ffff))
+ return IPV6_ADDR_MAPPED;
+ }
+
+ return IPV6_ADDR_RESERVED;
+}
+
+static struct inet6_dev * ipv6_add_dev(struct device *dev)
+{
+ struct inet6_dev *ndev, **bptr, *iter;
+ int hash;
+
+ if (dev->mtu < IPV6_MIN_MTU)
+ return NULL;
+
+ ndev = kmalloc(sizeof(struct inet6_dev), GFP_KERNEL);
+
+ if (ndev) {
+ memset(ndev, 0, sizeof(struct inet6_dev));
+
+ ndev->dev = dev;
+ memcpy(&ndev->cnf, &ipv6_devconf_dflt, sizeof(ndev->cnf));
+ ndev->cnf.mtu6 = dev->mtu;
+ ndev->cnf.sysctl = NULL;
+ ndev->nd_parms = neigh_parms_alloc(dev, &nd_tbl);
+ if (ndev->nd_parms == NULL) {
+ kfree(ndev);
+ return NULL;
+ }
+#ifdef CONFIG_SYSCTL
+ neigh_sysctl_register(dev, ndev->nd_parms, NET_IPV6, NET_IPV6_NEIGH, "ipv6");
+ addrconf_sysctl_register(ndev, &ndev->cnf);
+#endif
+ hash = ipv6_devindex_hash(dev->ifindex);
+ bptr = &inet6_dev_lst[hash];
+ iter = *bptr;
+
+ for (; iter; iter = iter->next)
+ bptr = &iter->next;
+
+ *bptr = ndev;
+
+ }
+ return ndev;
+}
+
+#ifndef _HURD_
+static
+#endif
+struct inet6_dev * ipv6_find_idev(struct device *dev)
+{
+ struct inet6_dev *idev;
+
+ if ((idev = ipv6_get_idev(dev)) == NULL) {
+ idev = ipv6_add_dev(dev);
+ if (idev == NULL)
+ return NULL;
+ if (dev->flags&IFF_UP)
+ ipv6_mc_up(idev);
+ }
+ return idev;
+}
+
+static void addrconf_forward_change(struct inet6_dev *idev)
+{
+ int i;
+
+ if (idev)
+ return;
+
+ for (i = 0; i < IN6_ADDR_HSIZE; i++) {
+ for (idev = inet6_dev_lst[i]; idev; idev = idev->next)
+ idev->cnf.forwarding = ipv6_devconf.forwarding;
+ }
+}
+
+struct inet6_dev * ipv6_get_idev(struct device *dev)
+{
+ struct inet6_dev *idev;
+ int hash;
+
+ hash = ipv6_devindex_hash(dev->ifindex);
+
+ for (idev = inet6_dev_lst[hash]; idev; idev = idev->next) {
+ if (idev->dev == dev)
+ return idev;
+ }
+ return NULL;
+}
+
+static struct inet6_ifaddr *
+ipv6_add_addr(struct inet6_dev *idev, struct in6_addr *addr, int scope)
+{
+ struct inet6_ifaddr *ifa;
+ int hash;
+
+ ifa = kmalloc(sizeof(struct inet6_ifaddr), GFP_ATOMIC);
+
+ if (ifa == NULL) {
+ ADBG(("ipv6_add_addr: malloc failed\n"));
+ return NULL;
+ }
+
+ memset(ifa, 0, sizeof(struct inet6_ifaddr));
+ memcpy(&ifa->addr, addr, sizeof(struct in6_addr));
+
+ init_timer(&ifa->timer);
+ ifa->timer.data = (unsigned long) ifa;
+ ifa->scope = scope;
+ ifa->idev = idev;
+
+ /* Add to list. */
+ hash = ipv6_addr_hash(addr);
+
+ ifa->lst_next = inet6_addr_lst[hash];
+ inet6_addr_lst[hash] = ifa;
+
+ /* Add to inet6_dev unicast addr list. */
+ ifa->if_next = idev->addr_list;
+ idev->addr_list = ifa;
+
+ return ifa;
+}
+
+static void ipv6_del_addr(struct inet6_ifaddr *ifp)
+{
+ struct inet6_ifaddr *iter, **back;
+ int hash;
+
+ if (atomic_read(&addr_list_lock)) {
+ ifp->flags |= ADDR_INVALID;
+ ipv6_ifa_notify(RTM_DELADDR, ifp);
+ return;
+ }
+
+ hash = ipv6_addr_hash(&ifp->addr);
+
+ iter = inet6_addr_lst[hash];
+ back = &inet6_addr_lst[hash];
+
+ for (; iter; iter = iter->lst_next) {
+ if (iter == ifp) {
+ *back = ifp->lst_next;
+ synchronize_bh();
+
+ ifp->lst_next = NULL;
+ break;
+ }
+ back = &(iter->lst_next);
+ }
+
+ iter = ifp->idev->addr_list;
+ back = &ifp->idev->addr_list;
+
+ for (; iter; iter = iter->if_next) {
+ if (iter == ifp) {
+ *back = ifp->if_next;
+ synchronize_bh();
+
+ ifp->if_next = NULL;
+ break;
+ }
+ back = &(iter->if_next);
+ }
+
+ ipv6_ifa_notify(RTM_DELADDR, ifp);
+ del_timer(&ifp->timer);
+
+ kfree(ifp);
+}
+
+/*
+ * Choose an appropriate source address
+ * should do:
+ * i) get an address with an appropriate scope
+ * ii) see if there is a specific route for the destination and use
+ * an address of the attached interface
+ * iii) don't use deprecated addresses
+ */
+int ipv6_get_saddr(struct dst_entry *dst,
+ struct in6_addr *daddr, struct in6_addr *saddr)
+{
+ int scope;
+ struct inet6_ifaddr *ifp = NULL;
+ struct inet6_ifaddr *match = NULL;
+ struct device *dev = NULL;
+ struct rt6_info *rt;
+ int err;
+ int i;
+
+ rt = (struct rt6_info *) dst;
+ if (rt)
+ dev = rt->rt6i_dev;
+
+ addrconf_lock();
+
+ scope = ipv6_addr_scope(daddr);
+ if (rt && (rt->rt6i_flags & RTF_ALLONLINK)) {
+ /*
+ * route for the "all destinations on link" rule
+ * when no routers are present
+ */
+ scope = IFA_LINK;
+ }
+
+ /*
+ * known dev
+ * search dev and walk through dev addresses
+ */
+
+ if (dev) {
+ struct inet6_dev *idev;
+ int hash;
+
+ if (dev->flags & IFF_LOOPBACK)
+ scope = IFA_HOST;
+
+ hash = ipv6_devindex_hash(dev->ifindex);
+ for (idev = inet6_dev_lst[hash]; idev; idev=idev->next) {
+ if (idev->dev == dev) {
+ for (ifp=idev->addr_list; ifp; ifp=ifp->if_next) {
+ if (ifp->scope == scope) {
+ if (!(ifp->flags & (ADDR_STATUS|DAD_STATUS)))
+ goto out;
+
+ if (!(ifp->flags & (ADDR_INVALID|DAD_STATUS)))
+ match = ifp;
+ }
+ }
+ break;
+ }
+ }
+ }
+
+ if (scope == IFA_LINK)
+ goto out;
+
+ /*
+ * dev == NULL or search failed for specified dev
+ */
+
+ for (i=0; i < IN6_ADDR_HSIZE; i++) {
+ for (ifp=inet6_addr_lst[i]; ifp; ifp=ifp->lst_next) {
+ if (ifp->scope == scope) {
+ if (!(ifp->flags & (ADDR_STATUS|DAD_STATUS)))
+ goto out;
+
+ if (!(ifp->flags & (ADDR_INVALID|DAD_STATUS)))
+ match = ifp;
+ }
+ }
+ }
+
+out:
+ if (ifp == NULL)
+ ifp = match;
+
+ err = -ENETUNREACH;
+ if (ifp) {
+ memcpy(saddr, &ifp->addr, sizeof(struct in6_addr));
+ err = 0;
+ }
+ addrconf_unlock();
+ return err;
+}
+
+struct inet6_ifaddr * ipv6_get_lladdr(struct device *dev)
+{
+ struct inet6_ifaddr *ifp = NULL;
+ struct inet6_dev *idev;
+
+ if ((idev = ipv6_get_idev(dev)) != NULL) {
+ addrconf_lock();
+ for (ifp=idev->addr_list; ifp; ifp=ifp->if_next) {
+ if (ifp->scope == IFA_LINK)
+ break;
+ }
+ addrconf_unlock();
+ }
+ return ifp;
+}
+
+/*
+ * Retrieve the ifaddr struct from an v6 address
+ * Called from ipv6_rcv to check if the address belongs
+ * to the host.
+ */
+
+struct inet6_ifaddr * ipv6_chk_addr(struct in6_addr *addr, struct device *dev, int nd)
+{
+ struct inet6_ifaddr * ifp;
+ u8 hash;
+ unsigned flags = 0;
+
+ if (!nd)
+ flags |= DAD_STATUS|ADDR_INVALID;
+
+ addrconf_lock();
+
+ hash = ipv6_addr_hash(addr);
+ for(ifp = inet6_addr_lst[hash]; ifp; ifp=ifp->lst_next) {
+ if (ipv6_addr_cmp(&ifp->addr, addr) == 0 && !(ifp->flags&flags)) {
+ if (dev == NULL || ifp->idev->dev == dev ||
+ !(ifp->scope&(IFA_LINK|IFA_HOST)))
+ break;
+ }
+ }
+
+ addrconf_unlock();
+ return ifp;
+}
+
+void addrconf_dad_failure(struct inet6_ifaddr *ifp)
+{
+ printk(KERN_INFO "%s: duplicate address detected!\n", ifp->idev->dev->name);
+ del_timer(&ifp->timer);
+ ipv6_del_addr(ifp);
+}
+
+
+/* Join to solicited addr multicast group. */
+
+static void addrconf_join_solict(struct device *dev, struct in6_addr *addr)
+{
+ struct in6_addr maddr;
+
+ if (dev->flags&(IFF_LOOPBACK|IFF_NOARP))
+ return;
+
+#ifndef CONFIG_IPV6_NO_PB
+ addrconf_addr_solict_mult_old(addr, &maddr);
+ ipv6_dev_mc_inc(dev, &maddr);
+#endif
+#ifdef CONFIG_IPV6_EUI64
+ addrconf_addr_solict_mult_new(addr, &maddr);
+ ipv6_dev_mc_inc(dev, &maddr);
+#endif
+}
+
+static void addrconf_leave_solict(struct device *dev, struct in6_addr *addr)
+{
+ struct in6_addr maddr;
+
+ if (dev->flags&(IFF_LOOPBACK|IFF_NOARP))
+ return;
+
+#ifndef CONFIG_IPV6_NO_PB
+ addrconf_addr_solict_mult_old(addr, &maddr);
+ ipv6_dev_mc_dec(dev, &maddr);
+#endif
+#ifdef CONFIG_IPV6_EUI64
+ addrconf_addr_solict_mult_new(addr, &maddr);
+ ipv6_dev_mc_dec(dev, &maddr);
+#endif
+}
+
+
+#ifdef CONFIG_IPV6_EUI64
+static int ipv6_generate_eui64(u8 *eui, struct device *dev)
+{
+ switch (dev->type) {
+ case ARPHRD_ETHER:
+ if (dev->addr_len != ETH_ALEN)
+ return -1;
+ memcpy(eui, dev->dev_addr, 3);
+ memcpy(eui + 5, dev->dev_addr+3, 3);
+ eui[3] = 0xFF;
+ eui[4] = 0xFE;
+ eui[0] ^= 2;
+ return 0;
+ }
+ return -1;
+}
+
+static int ipv6_inherit_eui64(u8 *eui, struct inet6_dev *idev)
+{
+ int err = -1;
+ struct inet6_ifaddr *ifp;
+
+ for (ifp=idev->addr_list; ifp; ifp=ifp->if_next) {
+ if (ifp->scope == IFA_LINK && !(ifp->flags&(ADDR_STATUS|DAD_STATUS))) {
+ memcpy(eui, ifp->addr.s6_addr+8, 8);
+ err = 0;
+ break;
+ }
+ }
+ return err;
+}
+#endif
+
+/*
+ * Add prefix route.
+ */
+
+static void
+addrconf_prefix_route(struct in6_addr *pfx, int plen, struct device *dev,
+ unsigned long expires, unsigned flags)
+{
+ struct in6_rtmsg rtmsg;
+
+ memset(&rtmsg, 0, sizeof(rtmsg));
+ memcpy(&rtmsg.rtmsg_dst, pfx, sizeof(struct in6_addr));
+ rtmsg.rtmsg_dst_len = plen;
+ rtmsg.rtmsg_metric = IP6_RT_PRIO_ADDRCONF;
+ rtmsg.rtmsg_ifindex = dev->ifindex;
+ rtmsg.rtmsg_info = expires;
+ rtmsg.rtmsg_flags = RTF_UP|flags;
+ rtmsg.rtmsg_type = RTMSG_NEWROUTE;
+
+ /* Prevent useless cloning on PtP SIT.
+ This thing is done here expecting that the whole
+ class of non-broadcast devices need not cloning.
+ */
+ if (dev->type == ARPHRD_SIT && (dev->flags&IFF_POINTOPOINT))
+ rtmsg.rtmsg_flags |= RTF_NONEXTHOP;
+
+ ip6_route_add(&rtmsg);
+}
+
+/* Create "default" multicast route to the interface */
+
+static void addrconf_add_mroute(struct device *dev)
+{
+ struct in6_rtmsg rtmsg;
+
+ memset(&rtmsg, 0, sizeof(rtmsg));
+ ipv6_addr_set(&rtmsg.rtmsg_dst,
+ __constant_htonl(0xFF000000), 0, 0, 0);
+ rtmsg.rtmsg_dst_len = 8;
+ rtmsg.rtmsg_metric = IP6_RT_PRIO_ADDRCONF;
+ rtmsg.rtmsg_ifindex = dev->ifindex;
+ rtmsg.rtmsg_flags = RTF_UP|RTF_ADDRCONF;
+ rtmsg.rtmsg_type = RTMSG_NEWROUTE;
+ ip6_route_add(&rtmsg);
+}
+
+static void sit_route_add(struct device *dev)
+{
+ struct in6_rtmsg rtmsg;
+
+ memset(&rtmsg, 0, sizeof(rtmsg));
+
+ rtmsg.rtmsg_type = RTMSG_NEWROUTE;
+ rtmsg.rtmsg_metric = IP6_RT_PRIO_ADDRCONF;
+
+ /* prefix length - 96 bytes "::d.d.d.d" */
+ rtmsg.rtmsg_dst_len = 96;
+ rtmsg.rtmsg_flags = RTF_UP|RTF_NONEXTHOP;
+ rtmsg.rtmsg_ifindex = dev->ifindex;
+
+ ip6_route_add(&rtmsg);
+}
+
+static void addrconf_add_lroute(struct device *dev)
+{
+ struct in6_addr addr;
+
+ ipv6_addr_set(&addr, __constant_htonl(0xFE800000), 0, 0, 0);
+ addrconf_prefix_route(&addr, 10, dev, 0, RTF_ADDRCONF);
+}
+
+static struct inet6_dev *addrconf_add_dev(struct device *dev)
+{
+ struct inet6_dev *idev;
+
+ if ((idev = ipv6_find_idev(dev)) == NULL)
+ return NULL;
+
+ /* Add default multicast route */
+ addrconf_add_mroute(dev);
+
+ /* Add link local route */
+ addrconf_add_lroute(dev);
+ return idev;
+}
+
+void addrconf_prefix_rcv(struct device *dev, u8 *opt, int len)
+{
+ struct prefix_info *pinfo;
+ struct rt6_info *rt;
+ __u32 valid_lft;
+ __u32 prefered_lft;
+ int addr_type;
+ unsigned long rt_expires;
+ struct inet6_dev *in6_dev = ipv6_get_idev(dev);
+
+ if (in6_dev == NULL) {
+ printk(KERN_DEBUG "addrconf: device %s not configured\n", dev->name);
+ return;
+ }
+
+ pinfo = (struct prefix_info *) opt;
+
+ if (len < sizeof(struct prefix_info)) {
+ ADBG(("addrconf: prefix option too short\n"));
+ return;
+ }
+
+ /*
+ * Validation checks ([ADDRCONF], page 19)
+ */
+
+ addr_type = ipv6_addr_type(&pinfo->prefix);
+
+ if (addr_type & (IPV6_ADDR_MULTICAST|IPV6_ADDR_LINKLOCAL))
+ return;
+
+ valid_lft = ntohl(pinfo->valid);
+ prefered_lft = ntohl(pinfo->prefered);
+
+ if (prefered_lft > valid_lft) {
+ printk(KERN_WARNING "addrconf: prefix option has invalid lifetime\n");
+ return;
+ }
+
+ /*
+ * Two things going on here:
+ * 1) Add routes for on-link prefixes
+ * 2) Configure prefixes with the auto flag set
+ */
+
+ /* Avoid arithemtic overflow. Really, we could
+ save rt_expires in seconds, likely valid_lft,
+ but it would require division in fib gc, that it
+ not good.
+ */
+ if (valid_lft >= 0x7FFFFFFF/HZ)
+ rt_expires = 0;
+ else
+ rt_expires = jiffies + valid_lft * HZ;
+
+ rt = rt6_lookup(&pinfo->prefix, NULL, dev->ifindex, 1);
+
+ if (rt && ((rt->rt6i_flags & (RTF_GATEWAY | RTF_DEFAULT)) == 0)) {
+ if (rt->rt6i_flags&RTF_EXPIRES) {
+ if (pinfo->onlink == 0 || valid_lft == 0) {
+ ip6_del_rt(rt);
+ } else {
+ rt->rt6i_expires = rt_expires;
+ }
+ }
+ } else if (pinfo->onlink && valid_lft) {
+ addrconf_prefix_route(&pinfo->prefix, pinfo->prefix_len,
+ dev, rt_expires, RTF_ADDRCONF|RTF_EXPIRES);
+ }
+ if (rt)
+ dst_release(&rt->u.dst);
+
+ /* Try to figure out our local address for this prefix */
+
+ if (pinfo->autoconf && in6_dev->cnf.autoconf) {
+ struct inet6_ifaddr * ifp;
+ struct in6_addr addr;
+ int plen;
+
+ plen = pinfo->prefix_len >> 3;
+
+#ifdef CONFIG_IPV6_EUI64
+ if (pinfo->prefix_len == 64) {
+ memcpy(&addr, &pinfo->prefix, 8);
+ if (ipv6_generate_eui64(addr.s6_addr + 8, dev) &&
+ ipv6_inherit_eui64(addr.s6_addr + 8, in6_dev))
+ return;
+ goto ok;
+ }
+#endif
+#ifndef CONFIG_IPV6_NO_PB
+ if (pinfo->prefix_len == ((sizeof(struct in6_addr) - dev->addr_len)<<3)) {
+ memcpy(&addr, &pinfo->prefix, plen);
+ memcpy(addr.s6_addr + plen, dev->dev_addr,
+ dev->addr_len);
+ goto ok;
+ }
+#endif
+ printk(KERN_DEBUG "IPv6 addrconf: prefix with wrong length %d\n", pinfo->prefix_len);
+ return;
+
+ok:
+ ifp = ipv6_chk_addr(&addr, dev, 1);
+
+ if ((ifp == NULL || (ifp->flags&ADDR_INVALID)) && valid_lft) {
+
+ if (ifp == NULL)
+ ifp = ipv6_add_addr(in6_dev, &addr, addr_type & IPV6_ADDR_SCOPE_MASK);
+
+ if (ifp == NULL)
+ return;
+
+ ifp->prefix_len = pinfo->prefix_len;
+
+ addrconf_dad_start(ifp);
+ }
+
+ if (ifp && valid_lft == 0) {
+ ipv6_del_addr(ifp);
+ ifp = NULL;
+ }
+
+ if (ifp) {
+ int event = 0;
+ ifp->valid_lft = valid_lft;
+ ifp->prefered_lft = prefered_lft;
+ ifp->tstamp = jiffies;
+ if (ifp->flags & ADDR_INVALID)
+ event = RTM_NEWADDR;
+ ifp->flags &= ~(ADDR_DEPRECATED|ADDR_INVALID);
+ ipv6_ifa_notify(event, ifp);
+ }
+ }
+}
+
+#ifndef _HURD_
+/*
+ * Set destination address.
+ * Special case for SIT interfaces where we create a new "virtual"
+ * device.
+ */
+int addrconf_set_dstaddr(void *arg)
+{
+ struct in6_ifreq ireq;
+ struct device *dev;
+ int err = -EINVAL;
+
+ rtnl_lock();
+
+ err = -EFAULT;
+ if (copy_from_user(&ireq, arg, sizeof(struct in6_ifreq)))
+ goto err_exit;
+
+ dev = dev_get_by_index(ireq.ifr6_ifindex);
+
+ err = -ENODEV;
+ if (dev == NULL)
+ goto err_exit;
+
+ if (dev->type == ARPHRD_SIT) {
+ struct ifreq ifr;
+ mm_segment_t oldfs;
+ struct ip_tunnel_parm p;
+
+ err = -EADDRNOTAVAIL;
+ if (!(ipv6_addr_type(&ireq.ifr6_addr) & IPV6_ADDR_COMPATv4))
+ goto err_exit;
+
+ memset(&p, 0, sizeof(p));
+ p.iph.daddr = ireq.ifr6_addr.s6_addr32[3];
+ p.iph.saddr = 0;
+ p.iph.version = 4;
+ p.iph.ihl = 5;
+ p.iph.protocol = IPPROTO_IPV6;
+ p.iph.ttl = 64;
+ ifr.ifr_ifru.ifru_data = (void*)&p;
+
+ oldfs = get_fs(); set_fs(KERNEL_DS);
+ err = dev->do_ioctl(dev, &ifr, SIOCADDTUNNEL);
+ set_fs(oldfs);
+
+ if (err == 0) {
+ err = -ENOBUFS;
+ if ((dev = dev_get(p.name)) == NULL)
+ goto err_exit;
+ err = dev_open(dev);
+ }
+ }
+
+err_exit:
+ rtnl_unlock();
+ return err;
+}
+#endif /* not _HURD_ */
+
+/*
+ * Manual configuration of address on an interface
+ */
+#ifndef _HURD_
+static
+#endif
+int inet6_addr_add(int ifindex, struct in6_addr *pfx, int plen)
+{
+ struct inet6_ifaddr *ifp;
+ struct inet6_dev *idev;
+ struct device *dev;
+ int scope;
+
+ if ((dev = dev_get_by_index(ifindex)) == NULL)
+ return -ENODEV;
+
+ if (!(dev->flags&IFF_UP))
+ return -ENETDOWN;
+
+ if ((idev = addrconf_add_dev(dev)) == NULL)
+ return -ENOBUFS;
+
+ scope = ipv6_addr_scope(pfx);
+
+ addrconf_lock();
+ if ((ifp = ipv6_add_addr(idev, pfx, scope)) != NULL) {
+ ifp->prefix_len = plen;
+ ifp->flags |= ADDR_PERMANENT;
+ addrconf_dad_start(ifp);
+ addrconf_unlock();
+ return 0;
+ }
+ addrconf_unlock();
+
+ return -ENOBUFS;
+}
+
+#ifndef _HURD_
+static
+#endif
+int inet6_addr_del(int ifindex, struct in6_addr *pfx, int plen)
+{
+ struct inet6_ifaddr *ifp;
+ struct inet6_dev *idev;
+ struct device *dev;
+
+ if ((dev = dev_get_by_index(ifindex)) == NULL)
+ return -ENODEV;
+
+ if ((idev = ipv6_get_idev(dev)) == NULL)
+ return -ENXIO;
+
+ start_bh_atomic();
+ for (ifp = idev->addr_list; ifp; ifp=ifp->if_next) {
+ if (ifp->prefix_len == plen &&
+ (!memcmp(pfx, &ifp->addr, sizeof(struct in6_addr)))) {
+ ipv6_del_addr(ifp);
+ end_bh_atomic();
+
+ /* If the last address is deleted administratively,
+ disable IPv6 on this interface.
+ */
+ if (idev->addr_list == NULL)
+ addrconf_ifdown(idev->dev, 1);
+ return 0;
+ }
+ }
+ end_bh_atomic();
+ return -EADDRNOTAVAIL;
+}
+
+
+#ifndef _HURD_
+int addrconf_add_ifaddr(void *arg)
+{
+ struct in6_ifreq ireq;
+ int err;
+
+ if (!capable(CAP_NET_ADMIN))
+ return -EPERM;
+
+ if (copy_from_user(&ireq, arg, sizeof(struct in6_ifreq)))
+ return -EFAULT;
+
+ rtnl_lock();
+ err = inet6_addr_add(ireq.ifr6_ifindex, &ireq.ifr6_addr, ireq.ifr6_prefixlen);
+ rtnl_unlock();
+ return err;
+}
+#endif /* not _HURD_ */
+
+#ifndef _HURD_
+int addrconf_del_ifaddr(void *arg)
+{
+ struct in6_ifreq ireq;
+ int err;
+
+ if (!capable(CAP_NET_ADMIN))
+ return -EPERM;
+
+ if (copy_from_user(&ireq, arg, sizeof(struct in6_ifreq)))
+ return -EFAULT;
+
+ rtnl_lock();
+ err = inet6_addr_del(ireq.ifr6_ifindex, &ireq.ifr6_addr, ireq.ifr6_prefixlen);
+ rtnl_unlock();
+ return err;
+}
+#endif /* not _HURD_ */
+
+static void sit_add_v4_addrs(struct inet6_dev *idev)
+{
+ struct inet6_ifaddr * ifp;
+ struct in6_addr addr;
+ struct device *dev;
+ int scope;
+
+ memset(&addr, 0, sizeof(struct in6_addr));
+ memcpy(&addr.s6_addr32[3], idev->dev->dev_addr, 4);
+
+ if (idev->dev->flags&IFF_POINTOPOINT) {
+ addr.s6_addr32[0] = __constant_htonl(0xfe800000);
+ scope = IFA_LINK;
+ } else {
+ scope = IPV6_ADDR_COMPATv4;
+ }
+
+ if (addr.s6_addr32[3]) {
+ addrconf_lock();
+ ifp = ipv6_add_addr(idev, &addr, scope);
+ if (ifp) {
+ ifp->flags |= ADDR_PERMANENT;
+ ifp->prefix_len = 128;
+ ipv6_ifa_notify(RTM_NEWADDR, ifp);
+ }
+ addrconf_unlock();
+ return;
+ }
+
+ for (dev = dev_base; dev != NULL; dev = dev->next) {
+ if (dev->ip_ptr && (dev->flags & IFF_UP)) {
+ struct in_device * in_dev = dev->ip_ptr;
+ struct in_ifaddr * ifa;
+
+ int flag = scope;
+
+ for (ifa = in_dev->ifa_list; ifa; ifa = ifa->ifa_next) {
+ addr.s6_addr32[3] = ifa->ifa_local;
+
+ if (ifa->ifa_scope == RT_SCOPE_LINK)
+ continue;
+ if (ifa->ifa_scope >= RT_SCOPE_HOST) {
+ if (idev->dev->flags&IFF_POINTOPOINT)
+ continue;
+ flag |= IFA_HOST;
+ }
+
+ addrconf_lock();
+ ifp = ipv6_add_addr(idev, &addr, flag);
+ if (ifp) {
+ if (idev->dev->flags&IFF_POINTOPOINT)
+ ifp->prefix_len = 10;
+ else
+ ifp->prefix_len = 96;
+ ifp->flags |= ADDR_PERMANENT;
+ ipv6_ifa_notify(RTM_NEWADDR, ifp);
+ }
+ addrconf_unlock();
+ }
+ }
+ }
+}
+
+static void init_loopback(struct device *dev)
+{
+ struct in6_addr addr;
+ struct inet6_dev *idev;
+ struct inet6_ifaddr * ifp;
+
+ /* ::1 */
+
+ memset(&addr, 0, sizeof(struct in6_addr));
+ addr.s6_addr[15] = 1;
+
+ if ((idev = ipv6_find_idev(dev)) == NULL) {
+ printk(KERN_DEBUG "init loopback: add_dev failed\n");
+ return;
+ }
+
+ addrconf_lock();
+ ifp = ipv6_add_addr(idev, &addr, IFA_HOST);
+
+ if (ifp) {
+ ifp->flags |= ADDR_PERMANENT;
+ ifp->prefix_len = 128;
+ ipv6_ifa_notify(RTM_NEWADDR, ifp);
+ }
+ addrconf_unlock();
+}
+
+static void addrconf_add_linklocal(struct inet6_dev *idev, struct in6_addr *addr)
+{
+ struct inet6_ifaddr * ifp;
+
+ addrconf_lock();
+ ifp = ipv6_add_addr(idev, addr, IFA_LINK);
+ if (ifp) {
+ ifp->flags = ADDR_PERMANENT;
+ ifp->prefix_len = 10;
+ addrconf_dad_start(ifp);
+ }
+ addrconf_unlock();
+}
+
+static void addrconf_dev_config(struct device *dev)
+{
+ struct in6_addr addr;
+ struct inet6_dev * idev;
+
+ if (dev->type != ARPHRD_ETHER) {
+ /* Alas, we support only Ethernet autoconfiguration. */
+ return;
+ }
+
+ idev = addrconf_add_dev(dev);
+ if (idev == NULL)
+ return;
+
+#ifdef CONFIG_IPV6_EUI64
+ memset(&addr, 0, sizeof(struct in6_addr));
+
+ addr.s6_addr[0] = 0xFE;
+ addr.s6_addr[1] = 0x80;
+
+ if (ipv6_generate_eui64(addr.s6_addr + 8, dev) == 0)
+ addrconf_add_linklocal(idev, &addr);
+#endif
+
+#ifndef CONFIG_IPV6_NO_PB
+ memset(&addr, 0, sizeof(struct in6_addr));
+
+ addr.s6_addr[0] = 0xFE;
+ addr.s6_addr[1] = 0x80;
+
+ memcpy(addr.s6_addr + (sizeof(struct in6_addr) - dev->addr_len),
+ dev->dev_addr, dev->addr_len);
+ addrconf_add_linklocal(idev, &addr);
+#endif
+}
+
+static void addrconf_sit_config(struct device *dev)
+{
+ struct inet6_dev *idev;
+
+ /*
+ * Configure the tunnel with one of our IPv4
+ * addresses... we should configure all of
+ * our v4 addrs in the tunnel
+ */
+
+ if ((idev = ipv6_find_idev(dev)) == NULL) {
+ printk(KERN_DEBUG "init sit: add_dev failed\n");
+ return;
+ }
+
+ sit_add_v4_addrs(idev);
+
+ if (dev->flags&IFF_POINTOPOINT) {
+ addrconf_add_mroute(dev);
+ addrconf_add_lroute(dev);
+ } else
+ sit_route_add(dev);
+}
+
+
+int addrconf_notify(struct notifier_block *this, unsigned long event,
+ void * data)
+{
+ struct device *dev;
+
+ dev = (struct device *) data;
+
+ switch(event) {
+ case NETDEV_UP:
+ switch(dev->type) {
+ case ARPHRD_SIT:
+ addrconf_sit_config(dev);
+ break;
+
+ case ARPHRD_LOOPBACK:
+ init_loopback(dev);
+ break;
+
+ default:
+ addrconf_dev_config(dev);
+ break;
+ };
+
+#ifdef CONFIG_IPV6_NETLINK
+ rt6_sndmsg(RTMSG_NEWDEVICE, NULL, NULL, NULL, dev, 0, 0, 0, 0);
+#endif
+ break;
+
+ case NETDEV_CHANGEMTU:
+ if (dev->mtu >= IPV6_MIN_MTU) {
+ struct inet6_dev *idev;
+
+ if ((idev = ipv6_get_idev(dev)) == NULL)
+ break;
+ idev->cnf.mtu6 = dev->mtu;
+ rt6_mtu_change(dev, dev->mtu);
+ break;
+ }
+
+ /* MTU falled under IPV6_MIN_MTU. Stop IPv6 on this interface. */
+
+ case NETDEV_DOWN:
+ case NETDEV_UNREGISTER:
+ /*
+ * Remove all addresses from this interface.
+ */
+ if (addrconf_ifdown(dev, event != NETDEV_DOWN) == 0) {
+#ifdef CONFIG_IPV6_NETLINK
+ rt6_sndmsg(RTMSG_DELDEVICE, NULL, NULL, NULL, dev, 0, 0, 0, 0);
+#endif
+ }
+
+ break;
+ case NETDEV_CHANGE:
+ break;
+ };
+
+ return NOTIFY_OK;
+}
+
+static int addrconf_ifdown(struct device *dev, int how)
+{
+ struct inet6_dev *idev, **bidev;
+ struct inet6_ifaddr *ifa, **bifa;
+ int i, hash;
+
+ rt6_ifdown(dev);
+ neigh_ifdown(&nd_tbl, dev);
+
+ idev = ipv6_get_idev(dev);
+ if (idev == NULL)
+ return -ENODEV;
+
+ start_bh_atomic();
+
+ /* Discard address list */
+
+ idev->addr_list = NULL;
+
+ /*
+ * Clean addresses hash table
+ */
+
+ for (i=0; i<16; i++) {
+ bifa = &inet6_addr_lst[i];
+
+ while ((ifa = *bifa) != NULL) {
+ if (ifa->idev == idev) {
+ *bifa = ifa->lst_next;
+ del_timer(&ifa->timer);
+ ipv6_ifa_notify(RTM_DELADDR, ifa);
+ kfree(ifa);
+ continue;
+ }
+ bifa = &ifa->lst_next;
+ }
+ }
+
+ /* Discard multicast list */
+
+ if (how == 1)
+ ipv6_mc_destroy_dev(idev);
+ else
+ ipv6_mc_down(idev);
+
+ /* Delete device from device hash table (if unregistered) */
+
+ if (how == 1) {
+ hash = ipv6_devindex_hash(dev->ifindex);
+
+ for (bidev = &inet6_dev_lst[hash]; (idev=*bidev) != NULL; bidev = &idev->next) {
+ if (idev->dev == dev) {
+ *bidev = idev->next;
+ neigh_parms_release(&nd_tbl, idev->nd_parms);
+#ifdef CONFIG_SYSCTL
+ addrconf_sysctl_unregister(&idev->cnf);
+#endif
+ kfree(idev);
+ break;
+ }
+ }
+ }
+ end_bh_atomic();
+ return 0;
+}
+
+
+static void addrconf_rs_timer(unsigned long data)
+{
+ struct inet6_ifaddr *ifp;
+
+ ifp = (struct inet6_ifaddr *) data;
+
+ if (ifp->idev->cnf.forwarding)
+ return;
+
+ if (ifp->idev->if_flags & IF_RA_RCVD) {
+ /*
+ * Announcement received after solicitation
+ * was sent
+ */
+ return;
+ }
+
+ if (ifp->probes++ <= ifp->idev->cnf.rtr_solicits) {
+ struct in6_addr all_routers;
+
+ ipv6_addr_all_routers(&all_routers);
+
+ ndisc_send_rs(ifp->idev->dev, &ifp->addr, &all_routers);
+
+ ifp->timer.function = addrconf_rs_timer;
+ ifp->timer.expires = (jiffies +
+ ifp->idev->cnf.rtr_solicit_interval);
+ add_timer(&ifp->timer);
+ } else {
+ struct in6_rtmsg rtmsg;
+
+ printk(KERN_DEBUG "%s: no IPv6 routers present\n",
+ ifp->idev->dev->name);
+
+ memset(&rtmsg, 0, sizeof(struct in6_rtmsg));
+ rtmsg.rtmsg_type = RTMSG_NEWROUTE;
+ rtmsg.rtmsg_metric = IP6_RT_PRIO_ADDRCONF;
+ rtmsg.rtmsg_flags = (RTF_ALLONLINK | RTF_ADDRCONF |
+ RTF_DEFAULT | RTF_UP);
+
+ rtmsg.rtmsg_ifindex = ifp->idev->dev->ifindex;
+
+ ip6_route_add(&rtmsg);
+ }
+}
+
+/*
+ * Duplicate Address Detection
+ */
+static void addrconf_dad_start(struct inet6_ifaddr *ifp)
+{
+ struct device *dev;
+ unsigned long rand_num;
+
+ dev = ifp->idev->dev;
+
+ addrconf_join_solict(dev, &ifp->addr);
+
+ if (ifp->prefix_len != 128 && (ifp->flags&ADDR_PERMANENT))
+ addrconf_prefix_route(&ifp->addr, ifp->prefix_len, dev, 0, RTF_ADDRCONF);
+
+ if (dev->flags&(IFF_NOARP|IFF_LOOPBACK)) {
+ start_bh_atomic();
+ ifp->flags &= ~DAD_INCOMPLETE;
+ addrconf_dad_completed(ifp);
+ end_bh_atomic();
+ return;
+ }
+
+ net_srandom(ifp->addr.s6_addr32[3]);
+
+ ifp->probes = ifp->idev->cnf.dad_transmits;
+ ifp->flags |= DAD_INCOMPLETE;
+
+ rand_num = net_random() % ifp->idev->cnf.rtr_solicit_delay;
+
+ ifp->timer.function = addrconf_dad_timer;
+ ifp->timer.expires = jiffies + rand_num;
+
+ add_timer(&ifp->timer);
+}
+
+static void addrconf_dad_timer(unsigned long data)
+{
+ struct inet6_ifaddr *ifp;
+ struct in6_addr unspec;
+ struct in6_addr mcaddr;
+
+ ifp = (struct inet6_ifaddr *) data;
+
+ if (ifp->probes == 0) {
+ /*
+ * DAD was successful
+ */
+
+ ifp->flags &= ~DAD_INCOMPLETE;
+ addrconf_dad_completed(ifp);
+ return;
+ }
+
+ ifp->probes--;
+
+ /* send a neighbour solicitation for our addr */
+ memset(&unspec, 0, sizeof(unspec));
+#ifdef CONFIG_IPV6_EUI64
+ addrconf_addr_solict_mult_new(&ifp->addr, &mcaddr);
+ ndisc_send_ns(ifp->idev->dev, NULL, &ifp->addr, &mcaddr, &unspec);
+#endif
+#ifndef CONFIG_IPV6_NO_PB
+ addrconf_addr_solict_mult_old(&ifp->addr, &mcaddr);
+ ndisc_send_ns(ifp->idev->dev, NULL, &ifp->addr, &mcaddr, &unspec);
+#endif
+
+ ifp->timer.expires = jiffies + ifp->idev->cnf.rtr_solicit_interval;
+ add_timer(&ifp->timer);
+}
+
+static void addrconf_dad_completed(struct inet6_ifaddr *ifp)
+{
+ struct device * dev = ifp->idev->dev;
+
+ /*
+ * Configure the address for reception. Now it is valid.
+ */
+
+ ipv6_ifa_notify(RTM_NEWADDR, ifp);
+
+ /* If added prefix is link local and forwarding is off,
+ start sending router solicitations.
+ */
+
+ if (ifp->idev->cnf.forwarding == 0 &&
+ (dev->flags&IFF_LOOPBACK) == 0 &&
+ (ipv6_addr_type(&ifp->addr) & IPV6_ADDR_LINKLOCAL)) {
+ struct in6_addr all_routers;
+
+ ipv6_addr_all_routers(&all_routers);
+
+ /*
+ * If a host as already performed a random delay
+ * [...] as part of DAD [...] there is no need
+ * to delay again before sending the first RS
+ */
+ ndisc_send_rs(ifp->idev->dev, &ifp->addr, &all_routers);
+
+ ifp->probes = 1;
+ ifp->timer.function = addrconf_rs_timer;
+ ifp->timer.expires = (jiffies +
+ ifp->idev->cnf.rtr_solicit_interval);
+ ifp->idev->if_flags |= IF_RS_SENT;
+ add_timer(&ifp->timer);
+ }
+}
+
+#ifdef CONFIG_PROC_FS
+static int iface_proc_info(char *buffer, char **start, off_t offset,
+ int length, int dummy)
+{
+ struct inet6_ifaddr *ifp;
+ int i;
+ int len = 0;
+ off_t pos=0;
+ off_t begin=0;
+
+ addrconf_lock();
+
+ for (i=0; i < IN6_ADDR_HSIZE; i++) {
+ for (ifp=inet6_addr_lst[i]; ifp; ifp=ifp->lst_next) {
+ int j;
+
+ for (j=0; j<16; j++) {
+ sprintf(buffer + len, "%02x",
+ ifp->addr.s6_addr[j]);
+ len += 2;
+ }
+
+ len += sprintf(buffer + len,
+ " %02x %02x %02x %02x %8s\n",
+ ifp->idev->dev->ifindex,
+ ifp->prefix_len,
+ ifp->scope,
+ ifp->flags,
+ ifp->idev->dev->name);
+ pos=begin+len;
+ if(pos<offset) {
+ len=0;
+ begin=pos;
+ }
+ if(pos>offset+length)
+ goto done;
+ }
+ }
+
+done:
+ addrconf_unlock();
+
+ *start=buffer+(offset-begin);
+ len-=(offset-begin);
+ if(len>length)
+ len=length;
+ if(len<0)
+ len=0;
+ return len;
+}
+
+struct proc_dir_entry iface_proc_entry =
+{
+ 0, 8, "if_inet6",
+ S_IFREG | S_IRUGO, 1, 0, 0,
+ 0, NULL,
+ &iface_proc_info
+};
+#endif /* CONFIG_PROC_FS */
+
+/*
+ * Periodic address status verification
+ */
+
+void addrconf_verify(unsigned long foo)
+{
+ struct inet6_ifaddr *ifp;
+ unsigned long now = jiffies;
+ int i;
+
+ if (atomic_read(&addr_list_lock)) {
+ addr_chk_timer.expires = jiffies + 1*HZ;
+ add_timer(&addr_chk_timer);
+ return;
+ }
+
+ for (i=0; i < IN6_ADDR_HSIZE; i++) {
+ for (ifp=inet6_addr_lst[i]; ifp;) {
+ if (ifp->flags & ADDR_INVALID) {
+ struct inet6_ifaddr *bp = ifp;
+ ifp= ifp->lst_next;
+ ipv6_del_addr(bp);
+ continue;
+ }
+ if (!(ifp->flags & ADDR_PERMANENT)) {
+ struct inet6_ifaddr *bp;
+ unsigned long age;
+
+ age = (now - ifp->tstamp) / HZ;
+
+ bp = ifp;
+ ifp= ifp->lst_next;
+
+ if (age > bp->valid_lft)
+ ipv6_del_addr(bp);
+ else if (age > bp->prefered_lft) {
+ bp->flags |= ADDR_DEPRECATED;
+ ipv6_ifa_notify(0, bp);
+ }
+
+ continue;
+ }
+ ifp = ifp->lst_next;
+ }
+ }
+
+ addr_chk_timer.expires = jiffies + ADDR_CHECK_FREQUENCY;
+ add_timer(&addr_chk_timer);
+}
+
+#ifdef CONFIG_RTNETLINK
+
+static int
+inet6_rtm_deladdr(struct sk_buff *skb, struct nlmsghdr *nlh, void *arg)
+{
+ struct rtattr **rta = arg;
+ struct ifaddrmsg *ifm = NLMSG_DATA(nlh);
+ struct in6_addr *pfx;
+
+ pfx = NULL;
+ if (rta[IFA_ADDRESS-1]) {
+ if (RTA_PAYLOAD(rta[IFA_ADDRESS-1]) < sizeof(*pfx))
+ return -EINVAL;
+ pfx = RTA_DATA(rta[IFA_ADDRESS-1]);
+ }
+ if (rta[IFA_LOCAL-1]) {
+ if (pfx && memcmp(pfx, RTA_DATA(rta[IFA_LOCAL-1]), sizeof(*pfx)))
+ return -EINVAL;
+ pfx = RTA_DATA(rta[IFA_LOCAL-1]);
+ }
+ if (pfx == NULL)
+ return -EINVAL;
+
+ return inet6_addr_del(ifm->ifa_index, pfx, ifm->ifa_prefixlen);
+}
+
+static int
+inet6_rtm_newaddr(struct sk_buff *skb, struct nlmsghdr *nlh, void *arg)
+{
+ struct rtattr **rta = arg;
+ struct ifaddrmsg *ifm = NLMSG_DATA(nlh);
+ struct in6_addr *pfx;
+
+ pfx = NULL;
+ if (rta[IFA_ADDRESS-1]) {
+ if (RTA_PAYLOAD(rta[IFA_ADDRESS-1]) < sizeof(*pfx))
+ return -EINVAL;
+ pfx = RTA_DATA(rta[IFA_ADDRESS-1]);
+ }
+ if (rta[IFA_LOCAL-1]) {
+ if (pfx && memcmp(pfx, RTA_DATA(rta[IFA_LOCAL-1]), sizeof(*pfx)))
+ return -EINVAL;
+ pfx = RTA_DATA(rta[IFA_LOCAL-1]);
+ }
+ if (pfx == NULL)
+ return -EINVAL;
+
+ return inet6_addr_add(ifm->ifa_index, pfx, ifm->ifa_prefixlen);
+}
+
+static int inet6_fill_ifaddr(struct sk_buff *skb, struct inet6_ifaddr *ifa,
+ u32 pid, u32 seq, int event)
+{
+ struct ifaddrmsg *ifm;
+ struct nlmsghdr *nlh;
+ struct ifa_cacheinfo ci;
+ unsigned char *b = skb->tail;
+
+ nlh = NLMSG_PUT(skb, pid, seq, event, sizeof(*ifm));
+ ifm = NLMSG_DATA(nlh);
+ ifm->ifa_family = AF_INET6;
+ ifm->ifa_prefixlen = ifa->prefix_len;
+ ifm->ifa_flags = ifa->flags & ~ADDR_INVALID;
+ ifm->ifa_scope = RT_SCOPE_UNIVERSE;
+ if (ifa->scope&IFA_HOST)
+ ifm->ifa_scope = RT_SCOPE_HOST;
+ else if (ifa->scope&IFA_LINK)
+ ifm->ifa_scope = RT_SCOPE_LINK;
+ else if (ifa->scope&IFA_SITE)
+ ifm->ifa_scope = RT_SCOPE_SITE;
+ ifm->ifa_index = ifa->idev->dev->ifindex;
+ RTA_PUT(skb, IFA_ADDRESS, 16, &ifa->addr);
+ if (!(ifa->flags&IFA_F_PERMANENT)) {
+ ci.ifa_prefered = ifa->prefered_lft;
+ ci.ifa_valid = ifa->valid_lft;
+ if (ci.ifa_prefered != 0xFFFFFFFF) {
+ long tval = (jiffies - ifa->tstamp)/HZ;
+ ci.ifa_prefered -= tval;
+ if (ci.ifa_valid != 0xFFFFFFFF)
+ ci.ifa_valid -= tval;
+ }
+ RTA_PUT(skb, IFA_CACHEINFO, sizeof(ci), &ci);
+ }
+ nlh->nlmsg_len = skb->tail - b;
+ return skb->len;
+
+nlmsg_failure:
+rtattr_failure:
+ skb_trim(skb, b - skb->data);
+ return -1;
+}
+
+static int inet6_dump_ifaddr(struct sk_buff *skb, struct netlink_callback *cb)
+{
+ int idx, ip_idx;
+ int s_idx, s_ip_idx;
+ struct inet6_ifaddr *ifa;
+
+ s_idx = cb->args[0];
+ s_ip_idx = ip_idx = cb->args[1];
+
+ for (idx=0; idx < IN6_ADDR_HSIZE; idx++) {
+ if (idx < s_idx)
+ continue;
+ if (idx > s_idx)
+ s_ip_idx = 0;
+ start_bh_atomic();
+ for (ifa=inet6_addr_lst[idx], ip_idx = 0; ifa;
+ ifa = ifa->lst_next, ip_idx++) {
+ if (ip_idx < s_ip_idx)
+ continue;
+ if (inet6_fill_ifaddr(skb, ifa, NETLINK_CB(cb->skb).pid,
+ cb->nlh->nlmsg_seq, RTM_NEWADDR) <= 0) {
+ end_bh_atomic();
+ goto done;
+ }
+ }
+ end_bh_atomic();
+ }
+done:
+ cb->args[0] = idx;
+ cb->args[1] = ip_idx;
+
+ return skb->len;
+}
+
+static void inet6_ifa_notify(int event, struct inet6_ifaddr *ifa)
+{
+ struct sk_buff *skb;
+ int size = NLMSG_SPACE(sizeof(struct ifaddrmsg)+128);
+
+ skb = alloc_skb(size, GFP_ATOMIC);
+ if (!skb) {
+ netlink_set_err(rtnl, 0, RTMGRP_IPV6_IFADDR, ENOBUFS);
+ return;
+ }
+ if (inet6_fill_ifaddr(skb, ifa, 0, 0, event) < 0) {
+ kfree_skb(skb);
+ netlink_set_err(rtnl, 0, RTMGRP_IPV6_IFADDR, EINVAL);
+ return;
+ }
+ NETLINK_CB(skb).dst_groups = RTMGRP_IPV6_IFADDR;
+ netlink_broadcast(rtnl, skb, 0, RTMGRP_IPV6_IFADDR, GFP_ATOMIC);
+}
+
+static struct rtnetlink_link inet6_rtnetlink_table[RTM_MAX-RTM_BASE+1] =
+{
+ { NULL, NULL, },
+ { NULL, NULL, },
+ { NULL, NULL, },
+ { NULL, NULL, },
+
+ { inet6_rtm_newaddr, NULL, },
+ { inet6_rtm_deladdr, NULL, },
+ { NULL, inet6_dump_ifaddr, },
+ { NULL, NULL, },
+
+ { inet6_rtm_newroute, NULL, },
+ { inet6_rtm_delroute, NULL, },
+ { inet6_rtm_getroute, inet6_dump_fib, },
+ { NULL, NULL, },
+};
+#endif
+
+static void ipv6_ifa_notify(int event, struct inet6_ifaddr *ifp)
+{
+#ifdef CONFIG_RTNETLINK
+ inet6_ifa_notify(event ? : RTM_NEWADDR, ifp);
+#endif
+ switch (event) {
+ case RTM_NEWADDR:
+ ip6_rt_addr_add(&ifp->addr, ifp->idev->dev);
+ break;
+ case RTM_DELADDR:
+ start_bh_atomic();
+ addrconf_leave_solict(ifp->idev->dev, &ifp->addr);
+ if (ipv6_chk_addr(&ifp->addr, ifp->idev->dev, 0) == NULL)
+ ip6_rt_addr_del(&ifp->addr, ifp->idev->dev);
+ end_bh_atomic();
+ break;
+ }
+}
+
+#ifdef CONFIG_SYSCTL
+
+static
+int addrconf_sysctl_forward(ctl_table *ctl, int write, struct file * filp,
+ void *buffer, size_t *lenp)
+{
+ int *valp = ctl->data;
+ int val = *valp;
+ int ret;
+
+ ret = proc_dointvec(ctl, write, filp, buffer, lenp);
+
+ if (write && *valp != val && valp != &ipv6_devconf_dflt.forwarding) {
+ struct inet6_dev *idev = NULL;
+
+ if (valp != &ipv6_devconf.forwarding) {
+ struct device *dev = dev_get_by_index(ctl->ctl_name);
+ if (dev)
+ idev = ipv6_get_idev(dev);
+ if (idev == NULL)
+ return ret;
+ } else
+ ipv6_devconf_dflt.forwarding = ipv6_devconf.forwarding;
+
+ addrconf_forward_change(idev);
+
+ if (*valp) {
+ start_bh_atomic();
+ rt6_purge_dflt_routers(0);
+ end_bh_atomic();
+ }
+ }
+
+ return ret;
+}
+
+static struct addrconf_sysctl_table
+{
+ struct ctl_table_header *sysctl_header;
+ ctl_table addrconf_vars[11];
+ ctl_table addrconf_dev[2];
+ ctl_table addrconf_conf_dir[2];
+ ctl_table addrconf_proto_dir[2];
+ ctl_table addrconf_root_dir[2];
+} addrconf_sysctl = {
+ NULL,
+ {{NET_IPV6_FORWARDING, "forwarding",
+ &ipv6_devconf.forwarding, sizeof(int), 0644, NULL,
+ &addrconf_sysctl_forward},
+
+ {NET_IPV6_HOP_LIMIT, "hop_limit",
+ &ipv6_devconf.hop_limit, sizeof(int), 0644, NULL,
+ &proc_dointvec},
+
+ {NET_IPV6_MTU, "mtu",
+ &ipv6_devconf.mtu6, sizeof(int), 0644, NULL,
+ &proc_dointvec},
+
+ {NET_IPV6_ACCEPT_RA, "accept_ra",
+ &ipv6_devconf.accept_ra, sizeof(int), 0644, NULL,
+ &proc_dointvec},
+
+ {NET_IPV6_ACCEPT_REDIRECTS, "accept_redirects",
+ &ipv6_devconf.accept_redirects, sizeof(int), 0644, NULL,
+ &proc_dointvec},
+
+ {NET_IPV6_AUTOCONF, "autoconf",
+ &ipv6_devconf.autoconf, sizeof(int), 0644, NULL,
+ &proc_dointvec},
+
+ {NET_IPV6_DAD_TRANSMITS, "dad_transmits",
+ &ipv6_devconf.dad_transmits, sizeof(int), 0644, NULL,
+ &proc_dointvec},
+
+ {NET_IPV6_RTR_SOLICITS, "router_solicitations",
+ &ipv6_devconf.rtr_solicits, sizeof(int), 0644, NULL,
+ &proc_dointvec},
+
+ {NET_IPV6_RTR_SOLICIT_INTERVAL, "router_solicitation_interval",
+ &ipv6_devconf.rtr_solicit_interval, sizeof(int), 0644, NULL,
+ &proc_dointvec_jiffies},
+
+ {NET_IPV6_RTR_SOLICIT_DELAY, "router_solicitation_delay",
+ &ipv6_devconf.rtr_solicit_delay, sizeof(int), 0644, NULL,
+ &proc_dointvec_jiffies},
+
+ {0}},
+
+ {{NET_PROTO_CONF_ALL, "all", NULL, 0, 0555, addrconf_sysctl.addrconf_vars},{0}},
+ {{NET_IPV6_CONF, "conf", NULL, 0, 0555, addrconf_sysctl.addrconf_dev},{0}},
+ {{NET_IPV6, "ipv6", NULL, 0, 0555, addrconf_sysctl.addrconf_conf_dir},{0}},
+ {{CTL_NET, "net", NULL, 0, 0555, addrconf_sysctl.addrconf_proto_dir},{0}}
+};
+
+static void addrconf_sysctl_register(struct inet6_dev *idev, struct ipv6_devconf *p)
+{
+ int i;
+ struct device *dev = idev ? idev->dev : NULL;
+ struct addrconf_sysctl_table *t;
+
+ t = kmalloc(sizeof(*t), GFP_KERNEL);
+ if (t == NULL)
+ return;
+ memcpy(t, &addrconf_sysctl, sizeof(*t));
+ for (i=0; i<sizeof(t->addrconf_vars)/sizeof(t->addrconf_vars[0])-1; i++) {
+ t->addrconf_vars[i].data += (char*)p - (char*)&ipv6_devconf;
+ t->addrconf_vars[i].de = NULL;
+ }
+ if (dev) {
+ t->addrconf_dev[0].procname = dev->name;
+ t->addrconf_dev[0].ctl_name = dev->ifindex;
+ } else {
+ t->addrconf_dev[0].procname = "default";
+ t->addrconf_dev[0].ctl_name = NET_PROTO_CONF_DEFAULT;
+ }
+ t->addrconf_dev[0].child = t->addrconf_vars;
+ t->addrconf_dev[0].de = NULL;
+ t->addrconf_conf_dir[0].child = t->addrconf_dev;
+ t->addrconf_conf_dir[0].de = NULL;
+ t->addrconf_proto_dir[0].child = t->addrconf_conf_dir;
+ t->addrconf_proto_dir[0].de = NULL;
+ t->addrconf_root_dir[0].child = t->addrconf_proto_dir;
+ t->addrconf_root_dir[0].de = NULL;
+
+ t->sysctl_header = register_sysctl_table(t->addrconf_root_dir, 0);
+ if (t->sysctl_header == NULL)
+ kfree(t);
+ else
+ p->sysctl = t;
+}
+
+static void addrconf_sysctl_unregister(struct ipv6_devconf *p)
+{
+ if (p->sysctl) {
+ struct addrconf_sysctl_table *t = p->sysctl;
+ p->sysctl = NULL;
+ unregister_sysctl_table(t->sysctl_header);
+ kfree(t);
+ }
+}
+
+
+#endif
+
+/*
+ * Init / cleanup code
+ */
+
+__initfunc(void addrconf_init(void))
+{
+#ifdef MODULE
+ struct device *dev;
+
+ /* This takes sense only during module load. */
+
+ for (dev = dev_base; dev; dev = dev->next) {
+ if (!(dev->flags&IFF_UP))
+ continue;
+
+ switch (dev->type) {
+ case ARPHRD_LOOPBACK:
+ init_loopback(dev);
+ break;
+ case ARPHRD_ETHER:
+ addrconf_dev_config(dev);
+ break;
+ default:
+ /* Ignore all other */
+ }
+ }
+#endif
+
+#ifdef CONFIG_PROC_FS
+ proc_net_register(&iface_proc_entry);
+#endif
+
+ addr_chk_timer.expires = jiffies + ADDR_CHECK_FREQUENCY;
+ add_timer(&addr_chk_timer);
+#ifdef CONFIG_RTNETLINK
+ rtnetlink_links[PF_INET6] = inet6_rtnetlink_table;
+#endif
+#ifdef CONFIG_SYSCTL
+ addrconf_sysctl.sysctl_header =
+ register_sysctl_table(addrconf_sysctl.addrconf_root_dir, 0);
+ addrconf_sysctl_register(NULL, &ipv6_devconf_dflt);
+#endif
+}
+
+#ifdef MODULE
+void addrconf_cleanup(void)
+{
+ struct inet6_dev *idev;
+ struct inet6_ifaddr *ifa;
+ int i;
+
+#ifdef CONFIG_RTNETLINK
+ rtnetlink_links[PF_INET6] = NULL;
+#endif
+#ifdef CONFIG_SYSCTL
+ addrconf_sysctl_unregister(&ipv6_devconf_dflt);
+ addrconf_sysctl_unregister(&ipv6_devconf);
+#endif
+
+ del_timer(&addr_chk_timer);
+
+ /*
+ * clean dev list.
+ */
+
+ for (i=0; i < IN6_ADDR_HSIZE; i++) {
+ struct inet6_dev *next;
+ for (idev = inet6_dev_lst[i]; idev; idev = next) {
+ next = idev->next;
+ addrconf_ifdown(idev->dev, 1);
+ }
+ }
+
+ start_bh_atomic();
+ /*
+ * clean addr_list
+ */
+
+ for (i=0; i < IN6_ADDR_HSIZE; i++) {
+ for (ifa=inet6_addr_lst[i]; ifa; ) {
+ struct inet6_ifaddr *bifa;
+
+ bifa = ifa;
+ ifa = ifa->lst_next;
+ printk(KERN_DEBUG "bug: IPv6 address leakage detected: ifa=%p\n", bifa);
+ /* Do not free it; something is wrong.
+ Now we can investigate it with debugger.
+ */
+ }
+ }
+ end_bh_atomic();
+
+#ifdef CONFIG_PROC_FS
+ proc_net_unregister(iface_proc_entry.low_ino);
+#endif
+}
+#endif /* MODULE */
diff --git a/pfinet/linux-src/net/ipv6/af_inet6.c b/pfinet/linux-src/net/ipv6/af_inet6.c
new file mode 100644
index 00000000..ca428188
--- /dev/null
+++ b/pfinet/linux-src/net/ipv6/af_inet6.c
@@ -0,0 +1,642 @@
+/*
+ * PF_INET6 socket protocol family
+ * Linux INET6 implementation
+ *
+ * Authors:
+ * Pedro Roque <roque@di.fc.ul.pt>
+ *
+ * Adapted from linux/net/ipv4/af_inet.c
+ *
+ * $Id: af_inet6.c,v 1.3 2007/10/13 01:43:00 stesie Exp $
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version
+ * 2 of the License, or (at your option) any later version.
+ */
+
+
+#include <linux/module.h>
+#include <linux/config.h>
+#include <linux/errno.h>
+#include <linux/types.h>
+#include <linux/socket.h>
+#include <linux/in.h>
+#include <linux/kernel.h>
+#include <linux/major.h>
+#include <linux/sched.h>
+#include <linux/timer.h>
+#include <linux/string.h>
+#include <linux/sockios.h>
+#include <linux/net.h>
+#include <linux/fcntl.h>
+#include <linux/mm.h>
+#include <linux/interrupt.h>
+#include <linux/proc_fs.h>
+#include <linux/stat.h>
+#include <linux/init.h>
+#include <linux/version.h>
+
+#include <linux/inet.h>
+#include <linux/netdevice.h>
+#include <linux/icmpv6.h>
+
+#include <net/ip.h>
+#include <net/ipv6.h>
+#include <net/udp.h>
+#include <net/tcp.h>
+#include <net/ipip.h>
+#include <net/protocol.h>
+#include <net/inet_common.h>
+#include <net/transp_v6.h>
+#include <net/ip6_route.h>
+#include <net/addrconf.h>
+
+#include <asm/uaccess.h>
+#include <asm/system.h>
+
+#ifdef MODULE
+static int unloadable = 0; /* XX: Turn to one when all is ok within the
+ module for allowing unload */
+#endif
+
+#if defined(MODULE) && LINUX_VERSION_CODE > 0x20115
+MODULE_AUTHOR("Cast of dozens");
+MODULE_DESCRIPTION("IPv6 protocol stack for Linux");
+MODULE_PARM(unloadable, "i");
+#endif
+
+extern struct proto_ops inet6_stream_ops;
+extern struct proto_ops inet6_dgram_ops;
+
+/* IPv6 procfs goodies... */
+
+#ifdef CONFIG_PROC_FS
+extern int raw6_get_info(char *, char **, off_t, int, int);
+extern int tcp6_get_info(char *, char **, off_t, int, int);
+extern int udp6_get_info(char *, char **, off_t, int, int);
+extern int afinet6_get_info(char *, char **, off_t, int, int);
+extern int afinet6_get_snmp(char *, char **, off_t, int, int);
+#endif
+
+#ifdef CONFIG_SYSCTL
+extern void ipv6_sysctl_register(void);
+extern void ipv6_sysctl_unregister(void);
+#endif
+
+static int inet6_create(struct socket *sock, int protocol)
+{
+ struct sock *sk;
+ struct proto *prot;
+
+ sk = sk_alloc(PF_INET6, GFP_KERNEL, 1);
+ if (sk == NULL)
+ goto do_oom;
+
+ if(sock->type == SOCK_STREAM || sock->type == SOCK_SEQPACKET) {
+ if (protocol && protocol != IPPROTO_TCP)
+ goto free_and_noproto;
+ protocol = IPPROTO_TCP;
+ prot = &tcpv6_prot;
+ sock->ops = &inet6_stream_ops;
+ } else if(sock->type == SOCK_DGRAM) {
+ if (protocol && protocol != IPPROTO_UDP)
+ goto free_and_noproto;
+ protocol = IPPROTO_UDP;
+ sk->no_check = UDP_NO_CHECK;
+ prot=&udpv6_prot;
+ sock->ops = &inet6_dgram_ops;
+ } else if(sock->type == SOCK_RAW) {
+ if (!capable(CAP_NET_RAW))
+ goto free_and_badperm;
+ if (!protocol)
+ goto free_and_noproto;
+ prot = &rawv6_prot;
+ sock->ops = &inet6_dgram_ops;
+ sk->reuse = 1;
+ sk->num = protocol;
+ } else {
+ goto free_and_badtype;
+ }
+
+ sock_init_data(sock, sk);
+
+ sk->destruct = NULL;
+ sk->zapped = 0;
+ sk->family = PF_INET6;
+ sk->protocol = protocol;
+
+ sk->prot = prot;
+ sk->backlog_rcv = prot->backlog_rcv;
+
+ sk->timer.data = (unsigned long)sk;
+ sk->timer.function = &net_timer;
+
+ sk->net_pinfo.af_inet6.hop_limit = -1;
+ sk->net_pinfo.af_inet6.mcast_hops = -1;
+ sk->net_pinfo.af_inet6.mc_loop = 1;
+ sk->net_pinfo.af_inet6.pmtudisc = IPV6_PMTUDISC_WANT;
+
+ /* Init the ipv4 part of the socket since we can have sockets
+ * using v6 API for ipv4.
+ */
+ sk->ip_ttl = 64;
+
+ sk->ip_mc_loop = 1;
+ sk->ip_mc_ttl = 1;
+ sk->ip_mc_index = 0;
+ sk->ip_mc_list = NULL;
+
+ if (sk->type==SOCK_RAW && protocol==IPPROTO_RAW)
+ sk->ip_hdrincl=1;
+
+ if (sk->num) {
+ /* It assumes that any protocol which allows
+ * the user to assign a number at socket
+ * creation time automatically shares.
+ */
+ sk->sport = ntohs(sk->num);
+ sk->prot->hash(sk);
+ add_to_prot_sklist(sk);
+ }
+
+ if (sk->prot->init) {
+ int err = sk->prot->init(sk);
+ if (err != 0) {
+ destroy_sock(sk);
+ return(err);
+ }
+ }
+ MOD_INC_USE_COUNT;
+ return(0);
+
+free_and_badtype:
+ sk_free(sk);
+ return -ESOCKTNOSUPPORT;
+free_and_badperm:
+ sk_free(sk);
+ return -EPERM;
+free_and_noproto:
+ sk_free(sk);
+ return -EPROTONOSUPPORT;
+do_oom:
+ return -ENOBUFS;
+}
+
+
+/* bind for INET6 API */
+static int inet6_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len)
+{
+ struct sockaddr_in6 *addr=(struct sockaddr_in6 *)uaddr;
+ struct sock *sk = sock->sk;
+ __u32 v4addr = 0;
+ unsigned short snum;
+ int addr_type = 0;
+
+ /* If the socket has its own bind function then use it. */
+ if(sk->prot->bind)
+ return sk->prot->bind(sk, uaddr, addr_len);
+
+ /* Check these errors (active socket, bad address length, double bind). */
+ if ((sk->state != TCP_CLOSE) ||
+ (addr_len < sizeof(struct sockaddr_in6)) ||
+ (sk->num != 0))
+ return -EINVAL;
+
+ addr_type = ipv6_addr_type(&addr->sin6_addr);
+ if ((addr_type & IPV6_ADDR_MULTICAST) && sock->type == SOCK_STREAM)
+ return(-EINVAL);
+
+ /* Check if the address belongs to the host. */
+ if (addr_type == IPV6_ADDR_MAPPED) {
+ v4addr = addr->sin6_addr.s6_addr32[3];
+ if (inet_addr_type(v4addr) != RTN_LOCAL)
+ return(-EADDRNOTAVAIL);
+ } else {
+ if (addr_type != IPV6_ADDR_ANY) {
+ struct net_device *dev = NULL;
+
+ if (addr_type & IPV6_ADDR_LINKLOCAL) {
+ if (addr_len >= sizeof(struct sockaddr_in6) &&
+ addr->sin6_scope_id) {
+ /* Override any existing binding,
+ if another one is supplied
+ by user. */
+ sk->bound_dev_if = addr->sin6_scope_id;
+ }
+
+ /* Binding to link-local address requires
+ an interface */
+ if (!sk->bound_dev_if)
+ return(-EINVAL);
+ dev = dev_get_by_index(sk->bound_dev_if);
+ if (!dev)
+ return(-ENODEV);
+ }
+
+ /* ipv4 addr of the socket is invalid. Only the
+ * unpecified and mapped address have a v4 equivalent.
+ */
+ v4addr = LOOPBACK4_IPV6;
+ if (!(addr_type & IPV6_ADDR_MULTICAST)) {
+ if (ipv6_chk_addr(&addr->sin6_addr, NULL, 0) == NULL)
+ return(-EADDRNOTAVAIL);
+ }
+ }
+ }
+
+ sk->rcv_saddr = v4addr;
+ sk->saddr = v4addr;
+
+ memcpy(&sk->net_pinfo.af_inet6.rcv_saddr, &addr->sin6_addr,
+ sizeof(struct in6_addr));
+
+ if (!(addr_type & IPV6_ADDR_MULTICAST))
+ memcpy(&sk->net_pinfo.af_inet6.saddr, &addr->sin6_addr,
+ sizeof(struct in6_addr));
+
+ snum = ntohs(addr->sin6_port);
+ if (snum && snum < PROT_SOCK && !capable(CAP_NET_BIND_SERVICE))
+ return(-EACCES);
+
+ /* Make sure we are allowed to bind here. */
+ if(sk->prot->get_port(sk, snum) != 0)
+ return -EADDRINUSE;
+
+ sk->sport = ntohs(sk->num);
+ sk->dport = 0;
+ sk->daddr = 0;
+ sk->prot->hash(sk);
+ add_to_prot_sklist(sk);
+
+ return(0);
+}
+
+static int inet6_release(struct socket *sock, struct socket *peer)
+{
+ struct sock *sk = sock->sk;
+
+ if (sk == NULL)
+ return -EINVAL;
+
+ /* Free mc lists */
+ ipv6_sock_mc_close(sk);
+
+ /* Huh! MOD_DEC_USE_COUNT was here :-(
+ It is impossible by two reasons: socket destroy
+ may be delayed and inet_release may sleep and
+ return to nowhere then. It should be moved to
+ inet6_destroy_sock(), but we have no explicit constructor :-(
+ --ANK (980802)
+ */
+ MOD_DEC_USE_COUNT;
+ return inet_release(sock, peer);
+}
+
+int inet6_destroy_sock(struct sock *sk)
+{
+ struct sk_buff *skb;
+ struct ipv6_txoptions *opt;
+
+ /*
+ * Release destination entry
+ */
+
+ dst_release(xchg(&sk->dst_cache,NULL));
+
+ /* Release rx options */
+
+ if ((skb = xchg(&sk->net_pinfo.af_inet6.pktoptions, NULL)) != NULL)
+ kfree_skb(skb);
+
+ /* Free flowlabels */
+ fl6_free_socklist(sk);
+
+ /* Free tx options */
+
+ if ((opt = xchg(&sk->net_pinfo.af_inet6.opt, NULL)) != NULL)
+ sock_kfree_s(sk, opt, opt->tot_len);
+
+ return 0;
+}
+
+/*
+ * This does both peername and sockname.
+ */
+
+static int inet6_getname(struct socket *sock, struct sockaddr *uaddr,
+ int *uaddr_len, int peer)
+{
+ struct sockaddr_in6 *sin=(struct sockaddr_in6 *)uaddr;
+ struct sock *sk;
+
+ sin->sin6_family = AF_INET6;
+ sin->sin6_flowinfo = 0;
+ sin->sin6_scope_id = 0;
+
+ sk = sock->sk;
+ if (peer) {
+ if (!tcp_connected(sk->state))
+ return(-ENOTCONN);
+ sin->sin6_port = sk->dport;
+ memcpy(&sin->sin6_addr, &sk->net_pinfo.af_inet6.daddr,
+ sizeof(struct in6_addr));
+ if (sk->net_pinfo.af_inet6.sndflow)
+ sin->sin6_flowinfo = sk->net_pinfo.af_inet6.flow_label;
+ } else {
+ if (ipv6_addr_type(&sk->net_pinfo.af_inet6.rcv_saddr) == IPV6_ADDR_ANY)
+ memcpy(&sin->sin6_addr,
+ &sk->net_pinfo.af_inet6.saddr,
+ sizeof(struct in6_addr));
+ else
+ memcpy(&sin->sin6_addr,
+ &sk->net_pinfo.af_inet6.rcv_saddr,
+ sizeof(struct in6_addr));
+
+ sin->sin6_port = sk->sport;
+ }
+ if (ipv6_addr_type(&sin->sin6_addr) & IPV6_ADDR_LINKLOCAL)
+ sin->sin6_scope_id = sk->bound_dev_if;
+ *uaddr_len = sizeof(*sin);
+ return(0);
+}
+
+#ifdef _HURD_
+#define inet6_ioctl 0
+#else
+
+static int inet6_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
+{
+ struct sock *sk = sock->sk;
+ int err = -EINVAL;
+ int pid;
+
+ switch(cmd)
+ {
+ case FIOSETOWN:
+ case SIOCSPGRP:
+ err = get_user(pid, (int *) arg);
+ if(err)
+ return err;
+
+ /* see sock_no_fcntl */
+ if (current->pid != pid && current->pgrp != -pid &&
+ !capable(CAP_NET_ADMIN))
+ return -EPERM;
+ sk->proc = pid;
+ return(0);
+ case FIOGETOWN:
+ case SIOCGPGRP:
+ err = put_user(sk->proc,(int *)arg);
+ if(err)
+ return err;
+ return(0);
+ case SIOCGSTAMP:
+ if(sk->stamp.tv_sec==0)
+ return -ENOENT;
+ err = copy_to_user((void *)arg, &sk->stamp,
+ sizeof(struct timeval));
+ if (err)
+ return -EFAULT;
+ return 0;
+
+ case SIOCADDRT:
+ case SIOCDELRT:
+
+ return(ipv6_route_ioctl(cmd,(void *)arg));
+
+ case SIOCSIFADDR:
+ return addrconf_add_ifaddr((void *) arg);
+ case SIOCDIFADDR:
+ return addrconf_del_ifaddr((void *) arg);
+ case SIOCSIFDSTADDR:
+ return addrconf_set_dstaddr((void *) arg);
+ default:
+ if ((cmd >= SIOCDEVPRIVATE) &&
+ (cmd <= (SIOCDEVPRIVATE + 15)))
+ return(dev_ioctl(cmd,(void *) arg));
+
+ if(sk->prot->ioctl==0 || (err=sk->prot->ioctl(sk, cmd, arg))==-ENOIOCTLCMD)
+ return(dev_ioctl(cmd,(void *) arg));
+ return err;
+ }
+ /*NOTREACHED*/
+ return(0);
+}
+
+#endif /* not _HURD_ */
+
+struct proto_ops inet6_stream_ops = {
+ PF_INET6,
+
+ sock_no_dup,
+ inet6_release,
+ inet6_bind,
+ inet_stream_connect, /* ok */
+ sock_no_socketpair, /* a do nothing */
+ inet_accept, /* ok */
+ inet6_getname,
+ inet_poll, /* ok */
+ inet6_ioctl, /* must change */
+ inet_listen, /* ok */
+ inet_shutdown, /* ok */
+ inet_setsockopt, /* ok */
+ inet_getsockopt, /* ok */
+ sock_no_fcntl, /* ok */
+ inet_sendmsg, /* ok */
+ inet_recvmsg /* ok */
+};
+
+struct proto_ops inet6_dgram_ops = {
+ PF_INET6,
+
+ sock_no_dup,
+ inet6_release,
+ inet6_bind,
+ inet_dgram_connect, /* ok */
+ sock_no_socketpair, /* a do nothing */
+ inet_accept, /* ok */
+ inet6_getname,
+ datagram_poll, /* ok */
+ inet6_ioctl, /* must change */
+ sock_no_listen, /* ok */
+ inet_shutdown, /* ok */
+ inet_setsockopt, /* ok */
+ inet_getsockopt, /* ok */
+ sock_no_fcntl, /* ok */
+ inet_sendmsg, /* ok */
+ inet_recvmsg /* ok */
+};
+
+struct net_proto_family inet6_family_ops = {
+ PF_INET6,
+ inet6_create
+};
+
+#ifdef CONFIG_PROC_FS
+static struct proc_dir_entry proc_net_raw6 = {
+ PROC_NET_RAW6, 4, "raw6",
+ S_IFREG | S_IRUGO, 1, 0, 0,
+ 0, &proc_net_inode_operations,
+ raw6_get_info
+};
+static struct proc_dir_entry proc_net_tcp6 = {
+ PROC_NET_TCP6, 4, "tcp6",
+ S_IFREG | S_IRUGO, 1, 0, 0,
+ 0, &proc_net_inode_operations,
+ tcp6_get_info
+};
+static struct proc_dir_entry proc_net_udp6 = {
+ PROC_NET_RAW6, 4, "udp6",
+ S_IFREG | S_IRUGO, 1, 0, 0,
+ 0, &proc_net_inode_operations,
+ udp6_get_info
+};
+static struct proc_dir_entry proc_net_sockstat6 = {
+ PROC_NET_SOCKSTAT6, 9, "sockstat6",
+ S_IFREG | S_IRUGO, 1, 0, 0,
+ 0, &proc_net_inode_operations,
+ afinet6_get_info
+};
+static struct proc_dir_entry proc_net_snmp6 = {
+ PROC_NET_SNMP6, 5, "snmp6",
+ S_IFREG | S_IRUGO, 1, 0, 0,
+ 0, &proc_net_inode_operations,
+ afinet6_get_snmp
+};
+#endif /* CONFIG_PROC_FS */
+
+#ifdef MODULE
+int ipv6_unload(void)
+{
+ if (!unloadable) return 1;
+ /* We keep internally 3 raw sockets */
+ return atomic_read(&(__this_module.uc.usecount)) - 3;
+}
+#endif
+
+#if defined(MODULE) && defined(CONFIG_SYSCTL)
+extern void ipv6_sysctl_register(void);
+extern void ipv6_sysctl_unregister(void);
+#endif
+
+#ifdef MODULE
+int init_module(void)
+#else
+__initfunc(void inet6_proto_init(struct net_proto *pro))
+#endif
+{
+ struct sk_buff *dummy_skb;
+ int err;
+
+#ifdef MODULE
+ if (!mod_member_present(&__this_module, can_unload))
+ return -EINVAL;
+
+ __this_module.can_unload = &ipv6_unload;
+#endif
+
+ printk(KERN_INFO "IPv6 v0.8 for NET4.0\n");
+
+ if (sizeof(struct inet6_skb_parm) > sizeof(dummy_skb->cb))
+ {
+ printk(KERN_CRIT "inet6_proto_init: size fault\n");
+#ifdef MODULE
+ return -EINVAL;
+#else
+ return;
+#endif
+ }
+
+ /*
+ * ipngwg API draft makes clear that the correct semantics
+ * for TCP and UDP is to consider one TCP and UDP instance
+ * in a host available by both INET and INET6 APIs and
+ * able to communicate via both network protocols.
+ */
+
+#if defined(MODULE) && defined(CONFIG_SYSCTL)
+ ipv6_sysctl_register();
+#endif
+ err = icmpv6_init(&inet6_family_ops);
+ if (err)
+ goto icmp_fail;
+ err = ndisc_init(&inet6_family_ops);
+ if (err)
+ goto ndisc_fail;
+ err = igmp6_init(&inet6_family_ops);
+ if (err)
+ goto igmp_fail;
+ ipv6_netdev_notif_init();
+ ipv6_packet_init();
+ ip6_route_init();
+ ip6_flowlabel_init();
+ addrconf_init();
+#ifndef _HURD_
+ sit_init();
+#endif
+
+ /* Init v6 transport protocols. */
+ udpv6_init();
+ tcpv6_init();
+
+ /* Create /proc/foo6 entries. */
+#ifdef CONFIG_PROC_FS
+ proc_net_register(&proc_net_raw6);
+ proc_net_register(&proc_net_tcp6);
+ proc_net_register(&proc_net_udp6);
+ proc_net_register(&proc_net_sockstat6);
+ proc_net_register(&proc_net_snmp6);
+#endif
+
+ /* Now the userspace is allowed to create INET6 sockets. */
+ (void) sock_register(&inet6_family_ops);
+
+#ifdef MODULE
+ return 0;
+#else
+ return;
+#endif
+
+igmp_fail:
+ ndisc_cleanup();
+ndisc_fail:
+ icmpv6_cleanup();
+icmp_fail:
+#if defined(MODULE) && defined(CONFIG_SYSCTL)
+ ipv6_sysctl_unregister();
+#endif
+#ifdef MODULE
+ return err;
+#else
+ return;
+#endif
+}
+
+#ifdef MODULE
+void cleanup_module(void)
+{
+ /* First of all disallow new sockets creation. */
+ sock_unregister(PF_INET6);
+#ifdef CONFIG_PROC_FS
+ proc_net_unregister(proc_net_raw6.low_ino);
+ proc_net_unregister(proc_net_tcp6.low_ino);
+ proc_net_unregister(proc_net_udp6.low_ino);
+ proc_net_unregister(proc_net_sockstat6.low_ino);
+ proc_net_unregister(proc_net_snmp6.low_ino);
+#endif
+ /* Cleanup code parts. */
+ sit_cleanup();
+ ipv6_netdev_notif_cleanup();
+ ip6_flowlabel_cleanup();
+ addrconf_cleanup();
+ ip6_route_cleanup();
+ ipv6_packet_cleanup();
+ igmp6_cleanup();
+ ndisc_cleanup();
+ icmpv6_cleanup();
+#ifdef CONFIG_SYSCTL
+ ipv6_sysctl_unregister();
+#endif
+}
+#endif /* MODULE */
diff --git a/pfinet/linux-src/net/ipv6/datagram_ipv6.c b/pfinet/linux-src/net/ipv6/datagram_ipv6.c
new file mode 100644
index 00000000..1ed33de8
--- /dev/null
+++ b/pfinet/linux-src/net/ipv6/datagram_ipv6.c
@@ -0,0 +1,434 @@
+/*
+ * common UDP/RAW code
+ * Linux INET6 implementation
+ *
+ * Authors:
+ * Pedro Roque <roque@di.fc.ul.pt>
+ *
+ * $Id: datagram_ipv6.c,v 1.2 2007/10/13 01:43:00 stesie Exp $
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version
+ * 2 of the License, or (at your option) any later version.
+ */
+
+#include <linux/errno.h>
+#include <linux/types.h>
+#include <linux/kernel.h>
+#include <linux/sched.h>
+#include <linux/interrupt.h>
+#include <linux/socket.h>
+#include <linux/sockios.h>
+#include <linux/in6.h>
+#include <linux/ipv6.h>
+#include <linux/route.h>
+
+#include <net/ipv6.h>
+#include <net/ndisc.h>
+#include <net/addrconf.h>
+#include <net/transp_v6.h>
+
+#include <linux/errqueue.h>
+#include <asm/uaccess.h>
+
+void ipv6_icmp_error(struct sock *sk, struct sk_buff *skb, int err,
+ u16 port, u32 info, u8 *payload)
+{
+ struct icmp6hdr *icmph = (struct icmp6hdr *)skb->h.raw;
+ struct sock_exterr_skb *serr;
+
+ if (!sk->net_pinfo.af_inet6.recverr)
+ return;
+
+ skb = skb_clone(skb, GFP_ATOMIC);
+ if (!skb)
+ return;
+
+ serr = SKB_EXT_ERR(skb);
+ serr->ee.ee_errno = err;
+ serr->ee.ee_origin = SO_EE_ORIGIN_ICMP6;
+ serr->ee.ee_type = icmph->icmp6_type;
+ serr->ee.ee_code = icmph->icmp6_code;
+ serr->ee.ee_pad = 0;
+ serr->ee.ee_info = info;
+ serr->ee.ee_data = 0;
+ serr->addr_offset = (u8*)&(((struct ipv6hdr*)(icmph+1))->daddr) - skb->nh.raw;
+ serr->port = port;
+
+ skb->h.raw = payload;
+ skb_pull(skb, payload - skb->data);
+
+ if (sock_queue_err_skb(sk, skb))
+ kfree_skb(skb);
+}
+
+void ipv6_local_error(struct sock *sk, int err, struct flowi *fl, u32 info)
+{
+ struct sock_exterr_skb *serr;
+ struct ipv6hdr *iph;
+ struct sk_buff *skb;
+
+ if (!sk->net_pinfo.af_inet6.recverr)
+ return;
+
+ skb = alloc_skb(sizeof(struct ipv6hdr), GFP_ATOMIC);
+ if (!skb)
+ return;
+
+ iph = (struct ipv6hdr*)skb_put(skb, sizeof(struct ipv6hdr));
+ skb->nh.ipv6h = iph;
+ memcpy(&iph->daddr, fl->fl6_dst, 16);
+
+ serr = SKB_EXT_ERR(skb);
+ serr->ee.ee_errno = err;
+ serr->ee.ee_origin = SO_EE_ORIGIN_LOCAL;
+ serr->ee.ee_type = 0;
+ serr->ee.ee_code = 0;
+ serr->ee.ee_pad = 0;
+ serr->ee.ee_info = info;
+ serr->ee.ee_data = 0;
+ serr->addr_offset = (u8*)&iph->daddr - skb->nh.raw;
+ serr->port = fl->uli_u.ports.dport;
+
+ skb->h.raw = skb->tail;
+ skb_pull(skb, skb->tail - skb->data);
+
+ if (sock_queue_err_skb(sk, skb))
+ kfree_skb(skb);
+}
+
+/*
+ * Handle MSG_ERRQUEUE
+ */
+int ipv6_recv_error(struct sock *sk, struct msghdr *msg, int len)
+{
+ struct sock_exterr_skb *serr;
+ struct sk_buff *skb, *skb2;
+ struct sockaddr_in6 *sin;
+ struct {
+ struct sock_extended_err ee;
+ struct sockaddr_in6 offender;
+ } errhdr;
+ int err;
+ int copied;
+
+ err = -EAGAIN;
+ skb = skb_dequeue(&sk->error_queue);
+ if (skb == NULL)
+ goto out;
+
+ copied = skb->len;
+ if (copied > len) {
+ msg->msg_flags |= MSG_TRUNC;
+ copied = len;
+ }
+ err = memcpy_toiovec(msg->msg_iov, skb->data, copied);
+ if (err)
+ goto out_free_skb;
+
+ serr = SKB_EXT_ERR(skb);
+
+ sin = (struct sockaddr_in6 *)msg->msg_name;
+ if (sin) {
+ sin->sin6_family = AF_INET6;
+ sin->sin6_flowinfo = 0;
+ sin->sin6_port = serr->port;
+ sin->sin6_scope_id = 0;
+ if (serr->ee.ee_origin == SO_EE_ORIGIN_ICMP6) {
+ memcpy(&sin->sin6_addr, skb->nh.raw + serr->addr_offset, 16);
+ if (sk->net_pinfo.af_inet6.sndflow)
+ sin->sin6_flowinfo = *(u32*)(skb->nh.raw + serr->addr_offset - 24) & IPV6_FLOWINFO_MASK;
+ if (ipv6_addr_type(&sin->sin6_addr) & IPV6_ADDR_LINKLOCAL)
+ sin->sin6_scope_id =
+ ((struct inet6_skb_parm *) skb->cb)->iif;
+ } else
+ ipv6_addr_set(&sin->sin6_addr, 0, 0,
+ __constant_htonl(0xffff),
+ *(u32*)(skb->nh.raw + serr->addr_offset));
+ }
+
+ memcpy(&errhdr.ee, &serr->ee, sizeof(struct sock_extended_err));
+ sin = &errhdr.offender;
+ sin->sin6_family = AF_UNSPEC;
+ if (serr->ee.ee_origin != SO_EE_ORIGIN_LOCAL) {
+ sin->sin6_family = AF_INET6;
+ sin->sin6_flowinfo = 0;
+ sin->sin6_scope_id = 0;
+ if (serr->ee.ee_origin == SO_EE_ORIGIN_ICMP6) {
+ memcpy(&sin->sin6_addr, &skb->nh.ipv6h->saddr, 16);
+ if (sk->net_pinfo.af_inet6.rxopt.all)
+ datagram_recv_ctl(sk, msg, skb);
+ if (ipv6_addr_type(&sin->sin6_addr) & IPV6_ADDR_LINKLOCAL)
+ sin->sin6_scope_id =
+ ((struct inet6_skb_parm *) skb->cb)->iif;
+ } else {
+ ipv6_addr_set(&sin->sin6_addr, 0, 0,
+ __constant_htonl(0xffff),
+ skb->nh.iph->saddr);
+ if (sk->ip_cmsg_flags)
+ ip_cmsg_recv(msg, skb);
+ }
+ }
+
+ put_cmsg(msg, SOL_IPV6, IPV6_RECVERR, sizeof(errhdr), &errhdr);
+
+ /* Now we could try to dump offended packet options */
+
+ msg->msg_flags |= MSG_ERRQUEUE;
+ err = copied;
+
+ /* Reset and regenerate socket error */
+ sk->err = 0;
+ if ((skb2 = skb_peek(&sk->error_queue)) != NULL) {
+ sk->err = SKB_EXT_ERR(skb2)->ee.ee_errno;
+ sk->error_report(sk);
+ }
+
+out_free_skb:
+ kfree_skb(skb);
+out:
+ return err;
+}
+
+
+
+int datagram_recv_ctl(struct sock *sk, struct msghdr *msg, struct sk_buff *skb)
+{
+ struct ipv6_pinfo *np = &sk->net_pinfo.af_inet6;
+ struct inet6_skb_parm *opt = (struct inet6_skb_parm *) skb->cb;
+
+ if (np->rxopt.bits.rxinfo) {
+ struct in6_pktinfo src_info;
+
+ src_info.ipi6_ifindex = opt->iif;
+ ipv6_addr_copy(&src_info.ipi6_addr, &skb->nh.ipv6h->daddr);
+ put_cmsg(msg, SOL_IPV6, IPV6_PKTINFO, sizeof(src_info), &src_info);
+ }
+
+ if (np->rxopt.bits.rxhlim) {
+ int hlim = skb->nh.ipv6h->hop_limit;
+ put_cmsg(msg, SOL_IPV6, IPV6_HOPLIMIT, sizeof(hlim), &hlim);
+ }
+
+ if (np->rxopt.bits.rxflow && (*(u32*)skb->nh.raw & IPV6_FLOWINFO_MASK)) {
+ u32 flowinfo = *(u32*)skb->nh.raw & IPV6_FLOWINFO_MASK;
+ put_cmsg(msg, SOL_IPV6, IPV6_FLOWINFO, sizeof(flowinfo), &flowinfo);
+ }
+ if (np->rxopt.bits.hopopts && opt->hop) {
+ u8 *ptr = skb->nh.raw + opt->hop;
+ put_cmsg(msg, SOL_IPV6, IPV6_HOPOPTS, (ptr[1]+1)<<3, ptr);
+ }
+ if (np->rxopt.bits.dstopts && opt->dst0) {
+ u8 *ptr = skb->nh.raw + opt->dst0;
+ put_cmsg(msg, SOL_IPV6, IPV6_DSTOPTS, (ptr[1]+1)<<3, ptr);
+ }
+ if (np->rxopt.bits.srcrt && opt->srcrt) {
+ struct ipv6_rt_hdr *rthdr = (struct ipv6_rt_hdr *)(skb->nh.raw + opt->srcrt);
+ put_cmsg(msg, SOL_IPV6, IPV6_RTHDR, (rthdr->hdrlen+1) << 3, rthdr);
+ }
+ if (np->rxopt.bits.authhdr && opt->auth) {
+ u8 *ptr = skb->nh.raw + opt->auth;
+ put_cmsg(msg, SOL_IPV6, IPV6_AUTHHDR, (ptr[1]+1)<<2, ptr);
+ }
+ if (np->rxopt.bits.dstopts && opt->dst1) {
+ u8 *ptr = skb->nh.raw + opt->dst1;
+ put_cmsg(msg, SOL_IPV6, IPV6_DSTOPTS, (ptr[1]+1)<<3, ptr);
+ }
+ return 0;
+}
+
+int datagram_send_ctl(struct msghdr *msg, struct flowi *fl,
+ struct ipv6_txoptions *opt,
+ int *hlimit)
+{
+ struct in6_pktinfo *src_info;
+ struct cmsghdr *cmsg;
+ struct ipv6_rt_hdr *rthdr;
+ struct ipv6_opt_hdr *hdr;
+ int len;
+ int err = 0;
+
+ for (cmsg = CMSG_FIRSTHDR(msg); cmsg; cmsg = CMSG_NXTHDR(msg, cmsg)) {
+
+ if (cmsg->cmsg_len < sizeof(struct cmsghdr) ||
+ (unsigned long)(((char*)cmsg - (char*)msg->msg_control)
+ + cmsg->cmsg_len) > msg->msg_controllen) {
+ err = -EINVAL;
+ goto exit_f;
+ }
+
+ if (cmsg->cmsg_level != SOL_IPV6)
+ continue;
+
+ switch (cmsg->cmsg_type) {
+ case IPV6_PKTINFO:
+ if (cmsg->cmsg_len < CMSG_LEN(sizeof(struct in6_pktinfo))) {
+ err = -EINVAL;
+ goto exit_f;
+ }
+
+ src_info = (struct in6_pktinfo *)CMSG_DATA(cmsg);
+
+ if (src_info->ipi6_ifindex) {
+ if (fl->oif && src_info->ipi6_ifindex != fl->oif)
+ return -EINVAL;
+ fl->oif = src_info->ipi6_ifindex;
+ }
+
+ if (!ipv6_addr_any(&src_info->ipi6_addr)) {
+ struct inet6_ifaddr *ifp;
+
+ ifp = ipv6_chk_addr(&src_info->ipi6_addr, NULL, 0);
+
+ if (ifp == NULL) {
+ err = -EINVAL;
+ goto exit_f;
+ }
+
+ fl->fl6_src = &src_info->ipi6_addr;
+ }
+
+ break;
+
+ case IPV6_FLOWINFO:
+ if (cmsg->cmsg_len < CMSG_LEN(4)) {
+ err = -EINVAL;
+ goto exit_f;
+ }
+
+ if (fl->fl6_flowlabel&IPV6_FLOWINFO_MASK) {
+ if ((fl->fl6_flowlabel^*(u32 *)CMSG_DATA(cmsg))&~IPV6_FLOWINFO_MASK) {
+ err = -EINVAL;
+ goto exit_f;
+ }
+ }
+ fl->fl6_flowlabel = IPV6_FLOWINFO_MASK & *(u32 *)CMSG_DATA(cmsg);
+ break;
+
+ case IPV6_HOPOPTS:
+ if (opt->hopopt || cmsg->cmsg_len < CMSG_LEN(sizeof(struct ipv6_opt_hdr))) {
+ err = -EINVAL;
+ goto exit_f;
+ }
+
+ hdr = (struct ipv6_opt_hdr *)CMSG_DATA(cmsg);
+ len = ((hdr->hdrlen + 1) << 3);
+ if (cmsg->cmsg_len < CMSG_LEN(len)) {
+ err = -EINVAL;
+ goto exit_f;
+ }
+ if (!capable(CAP_NET_RAW)) {
+ err = -EPERM;
+ goto exit_f;
+ }
+ opt->opt_nflen += len;
+ opt->hopopt = hdr;
+ break;
+
+ case IPV6_DSTOPTS:
+ if (cmsg->cmsg_len < CMSG_LEN(sizeof(struct ipv6_opt_hdr))) {
+ err = -EINVAL;
+ goto exit_f;
+ }
+
+ hdr = (struct ipv6_opt_hdr *)CMSG_DATA(cmsg);
+ len = ((hdr->hdrlen + 1) << 3);
+ if (cmsg->cmsg_len < CMSG_LEN(len)) {
+ err = -EINVAL;
+ goto exit_f;
+ }
+ if (!capable(CAP_NET_RAW)) {
+ err = -EPERM;
+ goto exit_f;
+ }
+ if (opt->dst1opt) {
+ err = -EINVAL;
+ goto exit_f;
+ }
+ opt->opt_flen += len;
+ opt->dst1opt = hdr;
+ break;
+
+ case IPV6_AUTHHDR:
+ if (cmsg->cmsg_len < CMSG_LEN(sizeof(struct ipv6_opt_hdr))) {
+ err = -EINVAL;
+ goto exit_f;
+ }
+
+ hdr = (struct ipv6_opt_hdr *)CMSG_DATA(cmsg);
+ len = ((hdr->hdrlen + 2) << 2);
+ if (cmsg->cmsg_len < CMSG_LEN(len)) {
+ err = -EINVAL;
+ goto exit_f;
+ }
+ if (len & ~7) {
+ err = -EINVAL;
+ goto exit_f;
+ }
+ opt->opt_flen += len;
+ opt->auth = hdr;
+ break;
+
+ case IPV6_RTHDR:
+ if (cmsg->cmsg_len < CMSG_LEN(sizeof(struct ipv6_rt_hdr))) {
+ err = -EINVAL;
+ goto exit_f;
+ }
+
+ rthdr = (struct ipv6_rt_hdr *)CMSG_DATA(cmsg);
+
+ /*
+ * TYPE 0
+ */
+ if (rthdr->type) {
+ err = -EINVAL;
+ goto exit_f;
+ }
+
+ len = ((rthdr->hdrlen + 1) << 3);
+
+ if (cmsg->cmsg_len < CMSG_LEN(len)) {
+ err = -EINVAL;
+ goto exit_f;
+ }
+
+ /* segments left must also match */
+ if ((rthdr->hdrlen >> 1) != rthdr->segments_left) {
+ err = -EINVAL;
+ goto exit_f;
+ }
+
+ opt->opt_nflen += len;
+ opt->srcrt = rthdr;
+
+ if (opt->dst1opt) {
+ int dsthdrlen = ((opt->dst1opt->hdrlen+1)<<3);
+
+ opt->opt_nflen += dsthdrlen;
+ opt->dst0opt = opt->dst1opt;
+ opt->dst1opt = NULL;
+ opt->opt_flen -= dsthdrlen;
+ }
+
+ break;
+
+ case IPV6_HOPLIMIT:
+ if (cmsg->cmsg_len != CMSG_LEN(sizeof(int))) {
+ err = -EINVAL;
+ goto exit_f;
+ }
+
+ *hlimit = *(int *)CMSG_DATA(cmsg);
+ break;
+
+ default:
+ printk(KERN_DEBUG "invalid cmsg type: %d\n", cmsg->cmsg_type);
+ err = -EINVAL;
+ break;
+ };
+ }
+
+exit_f:
+ return err;
+}
diff --git a/pfinet/linux-src/net/ipv6/exthdrs.c b/pfinet/linux-src/net/ipv6/exthdrs.c
new file mode 100644
index 00000000..a3d3dfe7
--- /dev/null
+++ b/pfinet/linux-src/net/ipv6/exthdrs.c
@@ -0,0 +1,771 @@
+/*
+ * Extension Header handling for IPv6
+ * Linux INET6 implementation
+ *
+ * Authors:
+ * Pedro Roque <roque@di.fc.ul.pt>
+ * Andi Kleen <ak@muc.de>
+ * Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>
+ *
+ * $Id: exthdrs.c,v 1.1 2007/10/08 21:12:30 stesie Exp $
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version
+ * 2 of the License, or (at your option) any later version.
+ */
+
+#include <linux/errno.h>
+#include <linux/types.h>
+#include <linux/socket.h>
+#include <linux/sockios.h>
+#include <linux/sched.h>
+#include <linux/net.h>
+#include <linux/netdevice.h>
+#include <linux/in6.h>
+#include <linux/icmpv6.h>
+
+#include <net/sock.h>
+#include <net/snmp.h>
+
+#include <net/ipv6.h>
+#include <net/protocol.h>
+#include <net/transp_v6.h>
+#include <net/rawv6.h>
+#include <net/ndisc.h>
+#include <net/ip6_route.h>
+#include <net/addrconf.h>
+
+#include <asm/uaccess.h>
+
+/*
+ * Parsing inbound headers.
+ *
+ * Parsing function "func" returns pointer to the place,
+ * where next nexthdr value is stored or NULL, if parsing
+ * failed. It should also update skb->h.
+ */
+
+struct hdrtype_proc
+{
+ int type;
+ u8* (*func) (struct sk_buff **, u8 *ptr);
+};
+
+/*
+ * Parsing tlv encoded headers.
+ *
+ * Parsing function "func" returns 1, if parsing succeed
+ * and 0, if it failed.
+ * It MUST NOT touch skb->h.
+ */
+
+struct tlvtype_proc
+{
+ int type;
+ int (*func) (struct sk_buff *, __u8 *ptr);
+};
+
+/*********************
+ Generic functions
+ *********************/
+
+/* An unknown option is detected, decide what to do */
+
+int ip6_tlvopt_unknown(struct sk_buff *skb, u8 *opt)
+{
+ switch ((opt[0] & 0xC0) >> 6) {
+ case 0: /* ignore */
+ return 1;
+
+ case 1: /* drop packet */
+ break;
+
+ case 3: /* Send ICMP if not a multicast address and drop packet */
+ /* Actually, it is redundant check. icmp_send
+ will recheck in any case.
+ */
+ if (ipv6_addr_is_multicast(&skb->nh.ipv6h->daddr))
+ break;
+ case 2: /* send ICMP PARM PROB regardless and drop packet */
+ icmpv6_param_prob(skb, ICMPV6_UNK_OPTION, opt);
+ return 0;
+ };
+
+ kfree_skb(skb);
+ return 0;
+}
+
+/* Parse tlv encoded option header (hop-by-hop or destination) */
+
+static int ip6_parse_tlv(struct tlvtype_proc *procs, struct sk_buff *skb,
+ __u8 *nhptr)
+{
+ struct tlvtype_proc *curr;
+ u8 *ptr = skb->h.raw;
+ int len = ((ptr[1]+1)<<3) - 2;
+
+ ptr += 2;
+
+ if (skb->tail - (ptr + len) < 0) {
+ kfree_skb(skb);
+ return 0;
+ }
+
+ while (len > 0) {
+ int optlen = ptr[1]+2;
+
+ switch (ptr[0]) {
+ case IPV6_TLV_PAD0:
+ optlen = 1;
+ break;
+
+ case IPV6_TLV_PADN:
+ break;
+
+ default: /* Other TLV code so scan list */
+ for (curr=procs; curr->type >= 0; curr++) {
+ if (curr->type == ptr[0]) {
+ if (curr->func(skb, ptr) == 0)
+ return 0;
+ break;
+ }
+ }
+ if (curr->type < 0) {
+ if (ip6_tlvopt_unknown(skb, ptr) == 0)
+ return 0;
+ }
+ break;
+ }
+ ptr += optlen;
+ len -= optlen;
+ }
+ if (len == 0)
+ return 1;
+ kfree_skb(skb);
+ return 0;
+}
+
+/*****************************
+ Destination options header.
+ *****************************/
+
+struct tlvtype_proc tlvprocdestopt_lst[] = {
+ /* No destination options are defined now */
+ {-1, NULL}
+};
+
+static u8 *ipv6_dest_opt(struct sk_buff **skb_ptr, u8 *nhptr)
+{
+ struct sk_buff *skb=*skb_ptr;
+ struct inet6_skb_parm *opt = (struct inet6_skb_parm *)skb->cb;
+ struct ipv6_destopt_hdr *hdr = (struct ipv6_destopt_hdr *) skb->h.raw;
+
+ opt->dst1 = (u8*)hdr - skb->nh.raw;
+
+ if (ip6_parse_tlv(tlvprocdestopt_lst, skb, nhptr)) {
+ skb->h.raw += ((hdr->hdrlen+1)<<3);
+ return &hdr->nexthdr;
+ }
+
+ return NULL;
+}
+
+/********************************
+ NONE header. No data in packet.
+ ********************************/
+
+static u8 *ipv6_nodata(struct sk_buff **skb_ptr, u8 *nhptr)
+{
+ kfree_skb(*skb_ptr);
+ return NULL;
+}
+
+/********************************
+ Routing header.
+ ********************************/
+
+static u8* ipv6_routing_header(struct sk_buff **skb_ptr, u8 *nhptr)
+{
+ struct sk_buff *skb = *skb_ptr;
+ struct inet6_skb_parm *opt = (struct inet6_skb_parm *)skb->cb;
+ struct in6_addr *addr;
+ struct in6_addr daddr;
+ int addr_type;
+ int n, i;
+
+ struct ipv6_rt_hdr *hdr = (struct ipv6_rt_hdr *) skb->h.raw;
+ struct rt0_hdr *rthdr;
+
+ if (((hdr->hdrlen+1)<<3) > skb->tail - skb->h.raw) {
+ ipv6_statistics.Ip6InHdrErrors++;
+ kfree_skb(skb);
+ return NULL;
+ }
+
+looped_back:
+ if (hdr->segments_left == 0) {
+ opt->srcrt = (u8*)hdr - skb->nh.raw;
+ skb->h.raw += (hdr->hdrlen + 1) << 3;
+ opt->dst0 = opt->dst1;
+ opt->dst1 = 0;
+ return &hdr->nexthdr;
+ }
+
+ if (hdr->type != IPV6_SRCRT_TYPE_0 || hdr->hdrlen & 0x01) {
+ u8 *pos = (u8*) hdr;
+
+ if (hdr->type != IPV6_SRCRT_TYPE_0)
+ pos += 2;
+ else
+ pos += 1;
+
+ icmpv6_param_prob(skb, ICMPV6_HDR_FIELD, pos);
+ return NULL;
+ }
+
+ /*
+ * This is the routing header forwarding algorithm from
+ * RFC 1883, page 17.
+ */
+
+ n = hdr->hdrlen >> 1;
+
+ if (hdr->segments_left > n) {
+ icmpv6_param_prob(skb, ICMPV6_HDR_FIELD, &hdr->segments_left);
+ return NULL;
+ }
+
+ /* We are about to mangle packet header. Be careful!
+ Do not damage packets queued somewhere.
+ */
+ if (skb_cloned(skb)) {
+ struct sk_buff *skb2 = skb_copy(skb, GFP_ATOMIC);
+ kfree_skb(skb);
+ if (skb2 == NULL)
+ return NULL;
+ *skb_ptr = skb = skb2;
+ opt = (struct inet6_skb_parm *)skb2->cb;
+ hdr = (struct ipv6_rt_hdr *) skb2->h.raw;
+ }
+
+ i = n - --hdr->segments_left;
+
+ rthdr = (struct rt0_hdr *) hdr;
+ addr = rthdr->addr;
+ addr += i - 1;
+
+ addr_type = ipv6_addr_type(addr);
+
+ if (addr_type == IPV6_ADDR_MULTICAST) {
+ kfree_skb(skb);
+ return NULL;
+ }
+
+ ipv6_addr_copy(&daddr, addr);
+ ipv6_addr_copy(addr, &skb->nh.ipv6h->daddr);
+ ipv6_addr_copy(&skb->nh.ipv6h->daddr, &daddr);
+
+ dst_release(xchg(&skb->dst, NULL));
+ ip6_route_input(skb);
+ if (skb->dst->error) {
+ skb->dst->input(skb);
+ return NULL;
+ }
+ if (skb->dst->dev->flags&IFF_LOOPBACK) {
+ if (skb->nh.ipv6h->hop_limit <= 1) {
+ icmpv6_send(skb, ICMPV6_TIME_EXCEED, ICMPV6_EXC_HOPLIMIT,
+ 0, skb->dev);
+ kfree_skb(skb);
+ return NULL;
+ }
+ skb->nh.ipv6h->hop_limit--;
+ goto looped_back;
+ }
+
+ skb->dst->input(skb);
+ return NULL;
+}
+
+/*
+ This function inverts received rthdr.
+ NOTE: specs allow to make it automatically only if
+ packet authenticated.
+
+ I will not discuss it here (though, I am really pissed off at
+ this stupid requirement making rthdr idea useless)
+
+ Actually, it creates severe problems for us.
+ Embrionic requests has no associated sockets,
+ so that user have no control over it and
+ cannot not only to set reply options, but
+ even to know, that someone wants to connect
+ without success. :-(
+
+ For now we need to test the engine, so that I created
+ temporary (or permanent) backdoor.
+ If listening socket set IPV6_RTHDR to 2, then we invert header.
+ --ANK (980729)
+ */
+
+struct ipv6_txoptions *
+ipv6_invert_rthdr(struct sock *sk, struct ipv6_rt_hdr *hdr)
+{
+ /* Received rthdr:
+
+ [ H1 -> H2 -> ... H_prev ] daddr=ME
+
+ Inverted result:
+ [ H_prev -> ... -> H1 ] daddr =sender
+
+ Note, that IP output engine will rewrire this rthdr
+ by rotating it left by one addr.
+ */
+
+ int n, i;
+ struct rt0_hdr *rthdr = (struct rt0_hdr*)hdr;
+ struct rt0_hdr *irthdr;
+ struct ipv6_txoptions *opt;
+ int hdrlen = ipv6_optlen(hdr);
+
+ if (hdr->segments_left ||
+ hdr->type != IPV6_SRCRT_TYPE_0 ||
+ hdr->hdrlen & 0x01)
+ return NULL;
+
+ n = hdr->hdrlen >> 1;
+ opt = sock_kmalloc(sk, sizeof(*opt) + hdrlen, GFP_ATOMIC);
+ if (opt == NULL)
+ return NULL;
+ memset(opt, 0, sizeof(*opt));
+ opt->tot_len = sizeof(*opt) + hdrlen;
+ opt->srcrt = (void*)(opt+1);
+ opt->opt_nflen = hdrlen;
+
+ memcpy(opt->srcrt, hdr, sizeof(*hdr));
+ irthdr = (struct rt0_hdr*)opt->srcrt;
+ /* Obsolete field, MBZ, when originated by us */
+ irthdr->bitmap = 0;
+ opt->srcrt->segments_left = n;
+ for (i=0; i<n; i++)
+ memcpy(irthdr->addr+i, rthdr->addr+(n-1-i), 16);
+ return opt;
+}
+
+/********************************
+ AUTH header.
+ ********************************/
+
+/*
+ rfc1826 said, that if a host does not implement AUTH header
+ it MAY ignore it. We use this hole 8)
+
+ Actually, now we can implement OSPFv6 without kernel IPsec.
+ Authentication for poors may be done in user space with the same success.
+
+ Yes, it means, that we allow application to send/receive
+ raw authentication header. Apparently, we suppose, that it knows
+ what it does and calculates authentication data correctly.
+ Certainly, it is possible only for udp and raw sockets, but not for tcp.
+
+ AUTH header has 4byte granular length, which kills all the idea
+ behind AUTOMATIC 64bit alignment of IPv6. Now we will loose
+ cpu ticks, checking that sender did not something stupid
+ and opt->hdrlen is even. Shit! --ANK (980730)
+ */
+
+static u8 *ipv6_auth_hdr(struct sk_buff **skb_ptr, u8 *nhptr)
+{
+ struct sk_buff *skb=*skb_ptr;
+ struct inet6_skb_parm *opt = (struct inet6_skb_parm *)skb->cb;
+ struct ipv6_opt_hdr *hdr = (struct ipv6_opt_hdr *)skb->h.raw;
+ int len = (hdr->hdrlen+2)<<2;
+
+ if (len&7)
+ return NULL;
+ opt->auth = (u8*)hdr - skb->nh.raw;
+ if (skb->h.raw + len > skb->tail)
+ return NULL;
+ skb->h.raw += len;
+ return &hdr->nexthdr;
+}
+
+/* This list MUST NOT contain entry for NEXTHDR_HOP.
+ It is parsed immediately after packet received
+ and if it occurs somewhere in another place we must
+ generate error.
+ */
+
+struct hdrtype_proc hdrproc_lst[] = {
+ {NEXTHDR_FRAGMENT, ipv6_reassembly},
+ {NEXTHDR_ROUTING, ipv6_routing_header},
+ {NEXTHDR_DEST, ipv6_dest_opt},
+ {NEXTHDR_NONE, ipv6_nodata},
+ {NEXTHDR_AUTH, ipv6_auth_hdr},
+ /*
+ {NEXTHDR_ESP, ipv6_esp_hdr},
+ */
+ {-1, NULL}
+};
+
+u8 *ipv6_parse_exthdrs(struct sk_buff **skb_in, u8 *nhptr)
+{
+ struct hdrtype_proc *hdrt;
+ u8 nexthdr = *nhptr;
+
+restart:
+ for (hdrt=hdrproc_lst; hdrt->type >= 0; hdrt++) {
+ if (hdrt->type == nexthdr) {
+ if ((nhptr = hdrt->func(skb_in, nhptr)) != NULL) {
+ nexthdr = *nhptr;
+ goto restart;
+ }
+ return NULL;
+ }
+ }
+ return nhptr;
+}
+
+
+/**********************************
+ Hop-by-hop options.
+ **********************************/
+
+/* Router Alert as of draft-ietf-ipngwg-ipv6router-alert-04 */
+
+static int ipv6_hop_ra(struct sk_buff *skb, u8 *ptr)
+{
+ if (ptr[1] == 2) {
+ ((struct inet6_skb_parm*)skb->cb)->ra = ptr - skb->nh.raw;
+ return 1;
+ }
+ if (net_ratelimit())
+ printk(KERN_DEBUG "ipv6_hop_ra: wrong RA length %d\n", ptr[1]);
+ kfree_skb(skb);
+ return 0;
+}
+
+/* Jumbo payload */
+
+static int ipv6_hop_jumbo(struct sk_buff *skb, u8 *ptr)
+{
+ u32 pkt_len;
+
+ if (ptr[1] != 4 || ((ptr-skb->nh.raw)&3) != 2) {
+ if (net_ratelimit())
+ printk(KERN_DEBUG "ipv6_hop_jumbo: wrong jumbo opt length/alignment %d\n", ptr[1]);
+ goto drop;
+ }
+
+ pkt_len = ntohl(*(u32*)(ptr+2));
+ if (pkt_len < 0x10000) {
+ icmpv6_param_prob(skb, ICMPV6_HDR_FIELD, ptr+2);
+ return 0;
+ }
+ if (skb->nh.ipv6h->payload_len) {
+ icmpv6_param_prob(skb, ICMPV6_HDR_FIELD, ptr);
+ return 0;
+ }
+
+ if (pkt_len > skb->len - sizeof(struct ipv6hdr)) {
+ ipv6_statistics.Ip6InTruncatedPkts++;
+ goto drop;
+ }
+ skb_trim(skb, pkt_len + sizeof(struct ipv6hdr));
+ return 1;
+
+drop:
+ kfree_skb(skb);
+ return 0;
+}
+
+struct tlvtype_proc tlvprochopopt_lst[] = {
+ {IPV6_TLV_ROUTERALERT, ipv6_hop_ra},
+ {IPV6_TLV_JUMBO, ipv6_hop_jumbo},
+ {-1, NULL}
+};
+
+u8 * ipv6_parse_hopopts(struct sk_buff *skb, u8 *nhptr)
+{
+ ((struct inet6_skb_parm*)skb->cb)->hop = sizeof(struct ipv6hdr);
+ if (ip6_parse_tlv(tlvprochopopt_lst, skb, nhptr))
+ return nhptr+((nhptr[1]+1)<<3);
+ return NULL;
+}
+
+/*
+ * Creating outbound headers.
+ *
+ * "build" functions work when skb is filled from head to tail (datagram)
+ * "push" functions work when headers are added from tail to head (tcp)
+ *
+ * In both cases we assume, that caller reserved enough room
+ * for headers.
+ */
+
+u8 *ipv6_build_rthdr(struct sk_buff *skb, u8 *prev_hdr,
+ struct ipv6_rt_hdr *opt, struct in6_addr *addr)
+{
+ struct rt0_hdr *phdr, *ihdr;
+ int hops;
+
+ ihdr = (struct rt0_hdr *) opt;
+
+ phdr = (struct rt0_hdr *) skb_put(skb, (ihdr->rt_hdr.hdrlen + 1) << 3);
+ memcpy(phdr, ihdr, sizeof(struct rt0_hdr));
+
+ hops = ihdr->rt_hdr.hdrlen >> 1;
+
+ if (hops > 1)
+ memcpy(phdr->addr, ihdr->addr + 1,
+ (hops - 1) * sizeof(struct in6_addr));
+
+ ipv6_addr_copy(phdr->addr + (hops - 1), addr);
+
+ phdr->rt_hdr.nexthdr = *prev_hdr;
+ *prev_hdr = NEXTHDR_ROUTING;
+ return &phdr->rt_hdr.nexthdr;
+}
+
+static u8 *ipv6_build_exthdr(struct sk_buff *skb, u8 *prev_hdr, u8 type, struct ipv6_opt_hdr *opt)
+{
+ struct ipv6_opt_hdr *h = (struct ipv6_opt_hdr *)skb_put(skb, ipv6_optlen(opt));
+
+ memcpy(h, opt, ipv6_optlen(opt));
+ h->nexthdr = *prev_hdr;
+ *prev_hdr = type;
+ return &h->nexthdr;
+}
+
+static u8 *ipv6_build_authhdr(struct sk_buff *skb, u8 *prev_hdr, struct ipv6_opt_hdr *opt)
+{
+ struct ipv6_opt_hdr *h = (struct ipv6_opt_hdr *)skb_put(skb, (opt->hdrlen+2)<<2);
+
+ memcpy(h, opt, (opt->hdrlen+2)<<2);
+ h->nexthdr = *prev_hdr;
+ *prev_hdr = NEXTHDR_AUTH;
+ return &h->nexthdr;
+}
+
+
+u8 *ipv6_build_nfrag_opts(struct sk_buff *skb, u8 *prev_hdr, struct ipv6_txoptions *opt,
+ struct in6_addr *daddr, u32 jumbolen)
+{
+ struct ipv6_opt_hdr *h = (struct ipv6_opt_hdr *)skb->data;
+
+ if (opt && opt->hopopt)
+ prev_hdr = ipv6_build_exthdr(skb, prev_hdr, NEXTHDR_HOP, opt->hopopt);
+
+ if (jumbolen) {
+ u8 *jumboopt = (u8 *)skb_put(skb, 8);
+
+ if (opt && opt->hopopt) {
+ *jumboopt++ = IPV6_TLV_PADN;
+ *jumboopt++ = 0;
+ h->hdrlen++;
+ } else {
+ h = (struct ipv6_opt_hdr *)jumboopt;
+ h->nexthdr = *prev_hdr;
+ h->hdrlen = 0;
+ jumboopt += 2;
+ *prev_hdr = NEXTHDR_HOP;
+ prev_hdr = &h->nexthdr;
+ }
+ jumboopt[0] = IPV6_TLV_JUMBO;
+ jumboopt[1] = 4;
+ *(u32*)(jumboopt+2) = htonl(jumbolen);
+ }
+ if (opt) {
+ if (opt->dst0opt)
+ prev_hdr = ipv6_build_exthdr(skb, prev_hdr, NEXTHDR_DEST, opt->dst0opt);
+ if (opt->srcrt)
+ prev_hdr = ipv6_build_rthdr(skb, prev_hdr, opt->srcrt, daddr);
+ }
+ return prev_hdr;
+}
+
+u8 *ipv6_build_frag_opts(struct sk_buff *skb, u8 *prev_hdr, struct ipv6_txoptions *opt)
+{
+ if (opt->auth)
+ prev_hdr = ipv6_build_authhdr(skb, prev_hdr, opt->auth);
+ if (opt->dst1opt)
+ prev_hdr = ipv6_build_exthdr(skb, prev_hdr, NEXTHDR_DEST, opt->dst1opt);
+ return prev_hdr;
+}
+
+static void ipv6_push_rthdr(struct sk_buff *skb, u8 *proto,
+ struct ipv6_rt_hdr *opt,
+ struct in6_addr **addr_p)
+{
+ struct rt0_hdr *phdr, *ihdr;
+ int hops;
+
+ ihdr = (struct rt0_hdr *) opt;
+
+ phdr = (struct rt0_hdr *) skb_push(skb, (ihdr->rt_hdr.hdrlen + 1) << 3);
+ memcpy(phdr, ihdr, sizeof(struct rt0_hdr));
+
+ hops = ihdr->rt_hdr.hdrlen >> 1;
+
+ if (hops > 1)
+ memcpy(phdr->addr, ihdr->addr + 1,
+ (hops - 1) * sizeof(struct in6_addr));
+
+ ipv6_addr_copy(phdr->addr + (hops - 1), *addr_p);
+ *addr_p = ihdr->addr;
+
+ phdr->rt_hdr.nexthdr = *proto;
+ *proto = NEXTHDR_ROUTING;
+}
+
+static void ipv6_push_exthdr(struct sk_buff *skb, u8 *proto, u8 type, struct ipv6_opt_hdr *opt)
+{
+ struct ipv6_opt_hdr *h = (struct ipv6_opt_hdr *)skb_push(skb, ipv6_optlen(opt));
+
+ memcpy(h, opt, ipv6_optlen(opt));
+ h->nexthdr = *proto;
+ *proto = type;
+}
+
+static void ipv6_push_authhdr(struct sk_buff *skb, u8 *proto, struct ipv6_opt_hdr *opt)
+{
+ struct ipv6_opt_hdr *h = (struct ipv6_opt_hdr *)skb_push(skb, (opt->hdrlen+2)<<2);
+
+ memcpy(h, opt, (opt->hdrlen+2)<<2);
+ h->nexthdr = *proto;
+ *proto = NEXTHDR_AUTH;
+}
+
+void ipv6_push_nfrag_opts(struct sk_buff *skb, struct ipv6_txoptions *opt,
+ u8 *proto,
+ struct in6_addr **daddr)
+{
+ if (opt->srcrt)
+ ipv6_push_rthdr(skb, proto, opt->srcrt, daddr);
+ if (opt->dst0opt)
+ ipv6_push_exthdr(skb, proto, NEXTHDR_DEST, opt->dst0opt);
+ if (opt->hopopt)
+ ipv6_push_exthdr(skb, proto, NEXTHDR_HOP, opt->hopopt);
+}
+
+void ipv6_push_frag_opts(struct sk_buff *skb, struct ipv6_txoptions *opt, u8 *proto)
+{
+ if (opt->dst1opt)
+ ipv6_push_exthdr(skb, proto, NEXTHDR_DEST, opt->dst1opt);
+ if (opt->auth)
+ ipv6_push_authhdr(skb, proto, opt->auth);
+}
+
+struct ipv6_txoptions *
+ipv6_dup_options(struct sock *sk, struct ipv6_txoptions *opt)
+{
+ struct ipv6_txoptions *opt2;
+
+ opt2 = sock_kmalloc(sk, opt->tot_len, GFP_ATOMIC);
+ if (opt2) {
+ long dif = (char*)opt2 - (char*)opt;
+ memcpy(opt2, opt, opt->tot_len);
+ if (opt2->hopopt)
+ *((char**)&opt2->hopopt) += dif;
+ if (opt2->dst0opt)
+ *((char**)&opt2->dst0opt) += dif;
+ if (opt2->dst1opt)
+ *((char**)&opt2->dst1opt) += dif;
+ if (opt2->auth)
+ *((char**)&opt2->auth) += dif;
+ if (opt2->srcrt)
+ *((char**)&opt2->srcrt) += dif;
+ }
+ return opt2;
+}
+
+
+/*
+ * find out if nexthdr is a well-known extension header or a protocol
+ */
+
+static __inline__ int ipv6_ext_hdr(u8 nexthdr)
+{
+ /*
+ * find out if nexthdr is an extension header or a protocol
+ */
+ return ( (nexthdr == NEXTHDR_HOP) ||
+ (nexthdr == NEXTHDR_ROUTING) ||
+ (nexthdr == NEXTHDR_FRAGMENT) ||
+ (nexthdr == NEXTHDR_AUTH) ||
+ (nexthdr == NEXTHDR_NONE) ||
+ (nexthdr == NEXTHDR_DEST) );
+}
+
+/*
+ * Skip any extension headers. This is used by the ICMP module.
+ *
+ * Note that strictly speaking this conflicts with RFC1883 4.0:
+ * ...The contents and semantics of each extension header determine whether
+ * or not to proceed to the next header. Therefore, extension headers must
+ * be processed strictly in the order they appear in the packet; a
+ * receiver must not, for example, scan through a packet looking for a
+ * particular kind of extension header and process that header prior to
+ * processing all preceding ones.
+ *
+ * We do exactly this. This is a protocol bug. We can't decide after a
+ * seeing an unknown discard-with-error flavour TLV option if it's a
+ * ICMP error message or not (errors should never be send in reply to
+ * ICMP error messages).
+ *
+ * But I see no other way to do this. This might need to be reexamined
+ * when Linux implements ESP (and maybe AUTH) headers.
+ * --AK
+ *
+ * This function parses (probably truncated) exthdr set "hdr"
+ * of length "len". "nexthdrp" initially points to some place,
+ * where type of the first header can be found.
+ *
+ * It skips all well-known exthdrs, and returns pointer to the start
+ * of unparsable area i.e. the first header with unknown type.
+ * If it is not NULL *nexthdr is updated by type/protocol of this header.
+ *
+ * NOTES: - if packet terminated with NEXTHDR_NONE it returns NULL.
+ * - it may return pointer pointing beyond end of packet,
+ * if the last recognized header is truncated in the middle.
+ * - if packet is truncated, so that all parsed headers are skipped,
+ * it returns NULL.
+ * - First fragment header is skipped, not-first ones
+ * are considered as unparsable.
+ * - ESP is unparsable for now and considered like
+ * normal payload protocol.
+ * - Note also special handling of AUTH header. Thanks to IPsec wizards.
+ *
+ * --ANK (980726)
+ */
+
+u8 *ipv6_skip_exthdr(struct ipv6_opt_hdr *hdr, u8 *nexthdrp, int len)
+{
+ u8 nexthdr = *nexthdrp;
+
+ while (ipv6_ext_hdr(nexthdr)) {
+ int hdrlen;
+
+ if (len < sizeof(struct ipv6_opt_hdr))
+ return NULL;
+ if (nexthdr == NEXTHDR_NONE)
+ return NULL;
+ if (nexthdr == NEXTHDR_FRAGMENT) {
+ struct frag_hdr *fhdr = (struct frag_hdr *) hdr;
+ if (ntohs(fhdr->frag_off) & ~0x7)
+ break;
+ hdrlen = 8;
+ } else if (nexthdr == NEXTHDR_AUTH)
+ hdrlen = (hdr->hdrlen+2)<<2;
+ else
+ hdrlen = ipv6_optlen(hdr);
+
+ nexthdr = hdr->nexthdr;
+ hdr = (struct ipv6_opt_hdr *) ((u8*)hdr + hdrlen);
+ len -= hdrlen;
+ }
+
+ *nexthdrp = nexthdr;
+ return (u8*)hdr;
+}
+
diff --git a/pfinet/linux-src/net/ipv6/icmpv6.c b/pfinet/linux-src/net/ipv6/icmpv6.c
new file mode 100644
index 00000000..9d701764
--- /dev/null
+++ b/pfinet/linux-src/net/ipv6/icmpv6.c
@@ -0,0 +1,676 @@
+/*
+ * Internet Control Message Protocol (ICMPv6)
+ * Linux INET6 implementation
+ *
+ * Authors:
+ * Pedro Roque <roque@di.fc.ul.pt>
+ *
+ * $Id: icmpv6.c,v 1.3 2009/02/24 01:21:16 sthibaul Exp $
+ *
+ * Based on net/ipv4/icmp.c
+ *
+ * RFC 1885
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version
+ * 2 of the License, or (at your option) any later version.
+ */
+
+/*
+ * Changes:
+ *
+ * Andi Kleen : exception handling
+ * Andi Kleen add rate limits. never reply to a icmp.
+ * add more length checks and other fixes.
+ */
+
+#define __NO_VERSION__
+#include <linux/module.h>
+#include <linux/errno.h>
+#include <linux/types.h>
+#include <linux/socket.h>
+#include <linux/in.h>
+#include <linux/kernel.h>
+#include <linux/sched.h>
+#include <linux/sockios.h>
+#include <linux/net.h>
+#include <linux/skbuff.h>
+#include <linux/init.h>
+
+#include <linux/inet.h>
+#include <linux/netdevice.h>
+#include <linux/icmpv6.h>
+
+#include <net/ip.h>
+#include <net/sock.h>
+
+#include <net/ipv6.h>
+#include <net/checksum.h>
+#include <net/protocol.h>
+#include <net/raw.h>
+#include <net/rawv6.h>
+#include <net/transp_v6.h>
+#include <net/ip6_route.h>
+#include <net/addrconf.h>
+#include <net/icmp.h>
+
+#include <asm/uaccess.h>
+#include <asm/system.h>
+
+struct icmpv6_mib icmpv6_statistics;
+
+/*
+ * ICMP socket for flow control.
+ */
+
+struct socket *icmpv6_socket;
+
+int icmpv6_rcv(struct sk_buff *skb, unsigned long len);
+
+static struct inet6_protocol icmpv6_protocol =
+{
+ icmpv6_rcv, /* handler */
+ NULL, /* error control */
+ NULL, /* next */
+ IPPROTO_ICMPV6, /* protocol ID */
+ 0, /* copy */
+ NULL, /* data */
+ "ICMPv6" /* name */
+};
+
+struct icmpv6_msg {
+ struct icmp6hdr icmph;
+ __u8 *data;
+ struct in6_addr *daddr;
+ int len;
+ __u32 csum;
+};
+
+
+
+/*
+ * getfrag callback
+ */
+
+static int icmpv6_getfrag(const void *data, struct in6_addr *saddr,
+ char *buff, unsigned int offset, unsigned int len)
+{
+ struct icmpv6_msg *msg = (struct icmpv6_msg *) data;
+ struct icmp6hdr *icmph;
+ __u32 csum;
+
+ /*
+ * in theory offset must be 0 since we never send more
+ * than IPV6_MIN_MTU bytes on an error or more than the path mtu
+ * on an echo reply. (those are the rules on RFC 1883)
+ *
+ * Luckily, this statement is obsolete after
+ * draft-ietf-ipngwg-icmp-v2-00 --ANK (980730)
+ */
+
+ if (offset) {
+ csum = csum_partial_copy((void *) msg->data +
+ offset - sizeof(struct icmp6hdr),
+ buff, len, msg->csum);
+ msg->csum = csum;
+ return 0;
+ }
+
+ csum = csum_partial_copy((void *) &msg->icmph, buff,
+ sizeof(struct icmp6hdr), msg->csum);
+
+ csum = csum_partial_copy((void *) msg->data,
+ buff + sizeof(struct icmp6hdr),
+ len - sizeof(struct icmp6hdr), csum);
+
+ icmph = (struct icmp6hdr *) buff;
+
+ icmph->icmp6_cksum = csum_ipv6_magic(saddr, msg->daddr, msg->len,
+ IPPROTO_ICMPV6, csum);
+ return 0;
+}
+
+
+/*
+ * Slightly more convenient version of icmpv6_send.
+ */
+void icmpv6_param_prob(struct sk_buff *skb, int code, void *pos)
+{
+ int offset = (u8*)pos - (u8*)skb->nh.ipv6h;
+
+ icmpv6_send(skb, ICMPV6_PARAMPROB, code, offset, skb->dev);
+ kfree_skb(skb);
+}
+
+/*
+ * Figure out, may we reply to this packet with icmp error.
+ *
+ * We do not reply, if:
+ * - it was icmp error message.
+ * - it is truncated, so that it is known, that protocol is ICMPV6
+ * (i.e. in the middle of some exthdr)
+ * - it is not the first fragment. BTW IPv6 specs say nothing about
+ * this case, but it is clear, that our reply would be useless
+ * for sender.
+ *
+ * --ANK (980726)
+ */
+
+static int is_ineligible(struct ipv6hdr *hdr, int len)
+{
+ u8 *ptr;
+ __u8 nexthdr = hdr->nexthdr;
+
+ if (len < (int)sizeof(*hdr))
+ return 1;
+
+ ptr = ipv6_skip_exthdr((struct ipv6_opt_hdr *)(hdr+1), &nexthdr, len - sizeof(*hdr));
+ if (!ptr)
+ return 0;
+ if (nexthdr == IPPROTO_ICMPV6) {
+ struct icmp6hdr *ihdr = (struct icmp6hdr *)ptr;
+ return (ptr - (u8*)hdr) > len || !(ihdr->icmp6_type & 0x80);
+ }
+ return nexthdr == NEXTHDR_FRAGMENT;
+}
+
+int sysctl_icmpv6_time = 1*HZ;
+
+/*
+ * Check the ICMP output rate limit
+ */
+static inline int icmpv6_xrlim_allow(struct sock *sk, int type,
+ struct flowi *fl)
+{
+ struct dst_entry *dst;
+ int res = 0;
+
+ /* Informational messages are not limited. */
+ if (type & 0x80)
+ return 1;
+
+ /* Do not limit pmtu discovery, it would break it. */
+ if (type == ICMPV6_PKT_TOOBIG)
+ return 1;
+
+ /*
+ * Look up the output route.
+ * XXX: perhaps the expire for routing entries cloned by
+ * this lookup should be more aggressive (not longer than timeout).
+ */
+ dst = ip6_route_output(sk, fl);
+ if (dst->error) {
+ ipv6_statistics.Ip6OutNoRoutes++;
+ } else if (dst->dev && (dst->dev->flags&IFF_LOOPBACK)) {
+ res = 1;
+ } else {
+ struct rt6_info *rt = (struct rt6_info *)dst;
+ int tmo = sysctl_icmpv6_time;
+
+ /* Give more bandwidth to wider prefixes. */
+ if (rt->rt6i_dst.plen < 128)
+ tmo >>= ((128 - rt->rt6i_dst.plen)>>5);
+
+ res = xrlim_allow(dst, tmo);
+ }
+ dst_release(dst);
+ return res;
+}
+
+/*
+ * an inline helper for the "simple" if statement below
+ * checks if parameter problem report is caused by an
+ * unrecognized IPv6 option that has the Option Type
+ * highest-order two bits set to 10
+ */
+
+static __inline__ int opt_unrec(struct sk_buff *skb, __u32 offset)
+{
+ u8 *buff = skb->nh.raw;
+
+ return ( ( *(buff + offset) & 0xC0 ) == 0x80 );
+}
+
+/*
+ * Send an ICMP message in response to a packet in error
+ */
+
+void icmpv6_send(struct sk_buff *skb, int type, int code, __u32 info,
+ struct device *dev)
+{
+ struct ipv6hdr *hdr = skb->nh.ipv6h;
+ struct sock *sk = icmpv6_socket->sk;
+ struct in6_addr *saddr = NULL;
+ int iif = 0;
+ struct icmpv6_msg msg;
+ struct flowi fl;
+ int addr_type = 0;
+ int len;
+
+ /*
+ * sanity check pointer in case of parameter problem
+ */
+
+ if (type == ICMPV6_PARAMPROB &&
+ (info > (skb->tail - ((unsigned char *) hdr)))) {
+ printk(KERN_DEBUG "icmpv6_send: bug! pointer > skb\n");
+ return;
+ }
+
+ /*
+ * Make sure we respect the rules
+ * i.e. RFC 1885 2.4(e)
+ * Rule (e.1) is enforced by not using icmpv6_send
+ * in any code that processes icmp errors.
+ */
+
+ addr_type = ipv6_addr_type(&hdr->daddr);
+
+ if (ipv6_chk_addr(&hdr->daddr, skb->dev, 0))
+ saddr = &hdr->daddr;
+
+ /*
+ * Dest addr check
+ */
+
+ if ((addr_type & IPV6_ADDR_MULTICAST || skb->pkt_type != PACKET_HOST)) {
+ if (type != ICMPV6_PKT_TOOBIG &&
+ !(type == ICMPV6_PARAMPROB &&
+ code == ICMPV6_UNK_OPTION &&
+ (opt_unrec(skb, info))))
+ return;
+
+ saddr = NULL;
+ }
+
+ addr_type = ipv6_addr_type(&hdr->saddr);
+
+ /*
+ * Source addr check
+ */
+
+ if (addr_type & IPV6_ADDR_LINKLOCAL)
+ iif = skb->dev->ifindex;
+
+ /*
+ * Must not send if we know that source is Anycast also.
+ * for now we don't know that.
+ */
+ if ((addr_type == IPV6_ADDR_ANY) || (addr_type & IPV6_ADDR_MULTICAST)) {
+ printk(KERN_DEBUG "icmpv6_send: addr_any/mcast source\n");
+ return;
+ }
+
+ /*
+ * Never answer to a ICMP packet.
+ */
+ if (is_ineligible(hdr, (u8*)skb->tail - (u8*)hdr)) {
+ if (net_ratelimit())
+ printk(KERN_DEBUG "icmpv6_send: no reply to icmp error/fragment\n");
+ return;
+ }
+
+ fl.proto = IPPROTO_ICMPV6;
+ fl.nl_u.ip6_u.daddr = &hdr->saddr;
+ fl.nl_u.ip6_u.saddr = saddr;
+ fl.oif = iif;
+ fl.fl6_flowlabel = 0;
+ fl.uli_u.icmpt.type = type;
+ fl.uli_u.icmpt.code = code;
+
+ if (!icmpv6_xrlim_allow(sk, type, &fl))
+ return;
+
+ /*
+ * ok. kick it. checksum will be provided by the
+ * getfrag_t callback.
+ */
+
+ msg.icmph.icmp6_type = type;
+ msg.icmph.icmp6_code = code;
+ msg.icmph.icmp6_cksum = 0;
+ msg.icmph.icmp6_pointer = htonl(info);
+
+ msg.data = skb->nh.raw;
+ msg.csum = 0;
+ msg.daddr = &hdr->saddr;
+
+ len = min((skb->tail - ((unsigned char *) hdr)) + sizeof(struct icmp6hdr),
+ IPV6_MIN_MTU - sizeof(struct ipv6hdr));
+
+ if (len < 0) {
+ printk(KERN_DEBUG "icmp: len problem\n");
+ return;
+ }
+
+ msg.len = len;
+
+ ip6_build_xmit(sk, icmpv6_getfrag, &msg, &fl, len, NULL, -1,
+ MSG_DONTWAIT);
+ if (type >= ICMPV6_DEST_UNREACH && type <= ICMPV6_PARAMPROB)
+ (&icmpv6_statistics.Icmp6OutDestUnreachs)[type-1]++;
+ icmpv6_statistics.Icmp6OutMsgs++;
+}
+
+static void icmpv6_echo_reply(struct sk_buff *skb)
+{
+ struct sock *sk = icmpv6_socket->sk;
+ struct ipv6hdr *hdr = skb->nh.ipv6h;
+ struct icmp6hdr *icmph = (struct icmp6hdr *) skb->h.raw;
+ struct in6_addr *saddr;
+ struct icmpv6_msg msg;
+ struct flowi fl;
+ unsigned char *data;
+ int len;
+
+ data = (char *) (icmph + 1);
+
+ saddr = &hdr->daddr;
+
+ if (ipv6_addr_type(saddr) & IPV6_ADDR_MULTICAST)
+ saddr = NULL;
+
+ len = skb->tail - data;
+ len += sizeof(struct icmp6hdr);
+
+ msg.icmph.icmp6_type = ICMPV6_ECHO_REPLY;
+ msg.icmph.icmp6_code = 0;
+ msg.icmph.icmp6_cksum = 0;
+ msg.icmph.icmp6_identifier = icmph->icmp6_identifier;
+ msg.icmph.icmp6_sequence = icmph->icmp6_sequence;
+
+ msg.data = data;
+ msg.csum = 0;
+ msg.len = len;
+ msg.daddr = &hdr->saddr;
+
+ fl.proto = IPPROTO_ICMPV6;
+ fl.nl_u.ip6_u.daddr = &hdr->saddr;
+ fl.nl_u.ip6_u.saddr = saddr;
+ fl.oif = skb->dev->ifindex;
+ fl.fl6_flowlabel = 0;
+ fl.uli_u.icmpt.type = ICMPV6_ECHO_REPLY;
+ fl.uli_u.icmpt.code = 0;
+
+ ip6_build_xmit(sk, icmpv6_getfrag, &msg, &fl, len, NULL, -1,
+ MSG_DONTWAIT);
+ icmpv6_statistics.Icmp6OutEchoReplies++;
+ icmpv6_statistics.Icmp6OutMsgs++;
+}
+
+static void icmpv6_notify(struct sk_buff *skb,
+ int type, int code, u32 info, unsigned char *buff, int len)
+{
+ struct in6_addr *saddr = &skb->nh.ipv6h->saddr;
+ struct in6_addr *daddr = &skb->nh.ipv6h->daddr;
+ struct ipv6hdr *hdr = (struct ipv6hdr *) buff;
+ struct inet6_protocol *ipprot;
+ struct sock *sk;
+ u8 *pb;
+ int hash;
+ u8 nexthdr;
+
+ nexthdr = hdr->nexthdr;
+
+ len -= sizeof(struct ipv6hdr);
+ if (len < 0)
+ return;
+
+ /* now skip over extension headers */
+ pb = ipv6_skip_exthdr((struct ipv6_opt_hdr *) (hdr + 1), &nexthdr, len);
+ if (!pb)
+ return;
+
+ /* BUGGG_FUTURE: we should try to parse exthdrs in this packet.
+ Without this we will not able f.e. to make source routed
+ pmtu discovery.
+ Corresponding argument (opt) to notifiers is already added.
+ --ANK (980726)
+ */
+
+ hash = nexthdr & (MAX_INET_PROTOS - 1);
+
+ for (ipprot = (struct inet6_protocol *) inet6_protos[hash];
+ ipprot != NULL;
+ ipprot=(struct inet6_protocol *)ipprot->next) {
+ if (ipprot->protocol != nexthdr)
+ continue;
+
+ if (ipprot->err_handler)
+ ipprot->err_handler(skb, hdr, NULL, type, code, pb, info);
+ }
+
+ sk = raw_v6_htable[hash];
+
+ if (sk == NULL)
+ return;
+
+ while((sk = raw_v6_lookup(sk, nexthdr, daddr, saddr))) {
+ rawv6_err(sk, skb, hdr, NULL, type, code, pb, info);
+ sk = sk->next;
+ }
+}
+
+/*
+ * Handle icmp messages
+ */
+
+int icmpv6_rcv(struct sk_buff *skb, unsigned long len)
+{
+ struct device *dev = skb->dev;
+ struct in6_addr *saddr = &skb->nh.ipv6h->saddr;
+ struct in6_addr *daddr = &skb->nh.ipv6h->daddr;
+ struct ipv6hdr *orig_hdr;
+ struct icmp6hdr *hdr = (struct icmp6hdr *) skb->h.raw;
+ int ulen;
+ int type;
+
+ icmpv6_statistics.Icmp6InMsgs++;
+
+ if (len < sizeof(struct icmp6hdr))
+ goto discard_it;
+
+ /* Perform checksum. */
+ switch (skb->ip_summed) {
+ case CHECKSUM_NONE:
+ skb->csum = csum_partial((char *)hdr, len, 0);
+ case CHECKSUM_HW:
+ if (csum_ipv6_magic(saddr, daddr, len, IPPROTO_ICMPV6,
+ skb->csum)) {
+ printk(KERN_DEBUG "ICMPv6 checksum failed [%04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x > %04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x]\n",
+ ntohs(saddr->__in6_u.__u6_addr16[0]),
+ ntohs(saddr->__in6_u.__u6_addr16[1]),
+ ntohs(saddr->__in6_u.__u6_addr16[2]),
+ ntohs(saddr->__in6_u.__u6_addr16[3]),
+ ntohs(saddr->__in6_u.__u6_addr16[4]),
+ ntohs(saddr->__in6_u.__u6_addr16[5]),
+ ntohs(saddr->__in6_u.__u6_addr16[6]),
+ ntohs(saddr->__in6_u.__u6_addr16[7]),
+ ntohs(daddr->__in6_u.__u6_addr16[0]),
+ ntohs(daddr->__in6_u.__u6_addr16[1]),
+ ntohs(daddr->__in6_u.__u6_addr16[2]),
+ ntohs(daddr->__in6_u.__u6_addr16[3]),
+ ntohs(daddr->__in6_u.__u6_addr16[4]),
+ ntohs(daddr->__in6_u.__u6_addr16[5]),
+ ntohs(daddr->__in6_u.__u6_addr16[6]),
+ ntohs(daddr->__in6_u.__u6_addr16[7]));
+ goto discard_it;
+ }
+ default:
+ /* CHECKSUM_UNNECESSARY */
+ break;
+ };
+
+ /*
+ * length of original packet carried in skb
+ */
+ ulen = skb->tail - (unsigned char *) (hdr + 1);
+
+ type = hdr->icmp6_type;
+
+ if (type >= ICMPV6_DEST_UNREACH && type <= ICMPV6_PARAMPROB)
+ (&icmpv6_statistics.Icmp6InDestUnreachs)[type-ICMPV6_DEST_UNREACH]++;
+ else if (type >= ICMPV6_ECHO_REQUEST && type <= NDISC_REDIRECT)
+ (&icmpv6_statistics.Icmp6InEchos)[type-ICMPV6_ECHO_REQUEST]++;
+
+ switch (type) {
+
+ case ICMPV6_ECHO_REQUEST:
+ icmpv6_echo_reply(skb);
+ break;
+
+ case ICMPV6_ECHO_REPLY:
+ /* we coulnd't care less */
+ break;
+
+ case ICMPV6_PKT_TOOBIG:
+ /* BUGGG_FUTURE: if packet contains rthdr, we cannot update
+ standard destination cache. Seems, only "advanced"
+ destination cache will allow to solve this problem
+ --ANK (980726)
+ */
+ orig_hdr = (struct ipv6hdr *) (hdr + 1);
+ if (ulen >= sizeof(struct ipv6hdr))
+ rt6_pmtu_discovery(&orig_hdr->daddr, &orig_hdr->saddr, dev,
+ ntohl(hdr->icmp6_mtu));
+
+ /*
+ * Drop through to notify
+ */
+
+ case ICMPV6_DEST_UNREACH:
+ case ICMPV6_TIME_EXCEED:
+ case ICMPV6_PARAMPROB:
+ icmpv6_notify(skb, type, hdr->icmp6_code, hdr->icmp6_mtu,
+ (char *) (hdr + 1), ulen);
+ break;
+
+ case NDISC_ROUTER_SOLICITATION:
+ case NDISC_ROUTER_ADVERTISEMENT:
+ case NDISC_NEIGHBOUR_SOLICITATION:
+ case NDISC_NEIGHBOUR_ADVERTISEMENT:
+ case NDISC_REDIRECT:
+ ndisc_rcv(skb, len);
+ break;
+
+ case ICMPV6_MGM_QUERY:
+ igmp6_event_query(skb, hdr, len);
+ break;
+
+ case ICMPV6_MGM_REPORT:
+ igmp6_event_report(skb, hdr, len);
+ break;
+
+ case ICMPV6_MGM_REDUCTION:
+ break;
+
+ default:
+ if (net_ratelimit())
+ printk(KERN_DEBUG "icmpv6: msg of unknown type\n");
+
+ /* informational */
+ if (type & 0x80)
+ break;
+
+ /*
+ * error of unknown type.
+ * must pass to upper level
+ */
+
+ icmpv6_notify(skb, type, hdr->icmp6_code, hdr->icmp6_mtu,
+ (char *) (hdr + 1), ulen);
+ };
+ kfree_skb(skb);
+ return 0;
+
+discard_it:
+ icmpv6_statistics.Icmp6InErrors++;
+ kfree_skb(skb);
+ return 0;
+}
+
+int __init icmpv6_init(struct net_proto_family *ops)
+{
+ struct sock *sk;
+ int err;
+
+ icmpv6_socket = sock_alloc();
+ if (icmpv6_socket == NULL) {
+ printk(KERN_ERR
+ "Failed to create the ICMP6 control socket.\n");
+ return -1;
+ }
+#ifndef _HURD_
+ icmpv6_socket->inode->i_uid = 0;
+ icmpv6_socket->inode->i_gid = 0;
+#endif
+ icmpv6_socket->type = SOCK_RAW;
+
+ if ((err = ops->create(icmpv6_socket, IPPROTO_ICMPV6)) < 0) {
+ printk(KERN_ERR
+ "Failed to initialize the ICMP6 control socket (err %d).\n",
+ err);
+ sock_release(icmpv6_socket);
+ icmpv6_socket = NULL; /* for safety */
+ return err;
+ }
+
+ sk = icmpv6_socket->sk;
+ sk->allocation = GFP_ATOMIC;
+ sk->num = 256; /* Don't receive any data */
+
+ inet6_add_protocol(&icmpv6_protocol);
+
+ return 0;
+}
+
+void icmpv6_cleanup(void)
+{
+ sock_release(icmpv6_socket);
+ icmpv6_socket = NULL; /* For safety. */
+ inet6_del_protocol(&icmpv6_protocol);
+}
+
+static struct icmp6_err {
+ int err;
+ int fatal;
+} tab_unreach[] = {
+ { ENETUNREACH, 0}, /* NOROUTE */
+ { EACCES, 1}, /* ADM_PROHIBITED */
+ { EHOSTUNREACH, 0}, /* Was NOT_NEIGHBOUR, now reserved */
+ { EHOSTUNREACH, 0}, /* ADDR_UNREACH */
+ { ECONNREFUSED, 1}, /* PORT_UNREACH */
+};
+
+int icmpv6_err_convert(int type, int code, int *err)
+{
+ int fatal = 0;
+
+ *err = EPROTO;
+
+ switch (type) {
+ case ICMPV6_DEST_UNREACH:
+ fatal = 1;
+ if (code <= ICMPV6_PORT_UNREACH) {
+ *err = tab_unreach[code].err;
+ fatal = tab_unreach[code].fatal;
+ }
+ break;
+
+ case ICMPV6_PKT_TOOBIG:
+ *err = EMSGSIZE;
+ break;
+
+ case ICMPV6_PARAMPROB:
+ *err = EPROTO;
+ fatal = 1;
+ break;
+
+ case ICMPV6_TIME_EXCEED:
+ *err = EHOSTUNREACH;
+ break;
+ };
+
+ return fatal;
+}
diff --git a/pfinet/linux-src/net/ipv6/ip6_fib.c b/pfinet/linux-src/net/ipv6/ip6_fib.c
new file mode 100644
index 00000000..9468c023
--- /dev/null
+++ b/pfinet/linux-src/net/ipv6/ip6_fib.c
@@ -0,0 +1,1205 @@
+/*
+ * Linux INET6 implementation
+ * Forwarding Information Database
+ *
+ * Authors:
+ * Pedro Roque <roque@di.fc.ul.pt>
+ *
+ * $Id: ip6_fib.c,v 1.2 2007/10/08 21:59:10 stesie Exp $
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version
+ * 2 of the License, or (at your option) any later version.
+ */
+
+#include <linux/config.h>
+#include <linux/errno.h>
+#include <linux/types.h>
+#include <linux/net.h>
+#include <linux/route.h>
+#include <linux/netdevice.h>
+#include <linux/in6.h>
+
+#ifdef CONFIG_PROC_FS
+#include <linux/proc_fs.h>
+#endif
+
+#include <net/ipv6.h>
+#include <net/ndisc.h>
+#include <net/addrconf.h>
+
+#include <net/ip6_fib.h>
+#include <net/ip6_route.h>
+
+#define RT6_DEBUG 2
+#undef CONFIG_IPV6_SUBTREES
+
+#if RT6_DEBUG >= 1
+#define BUG_TRAP(x) ({ if (!(x)) { printk("Assertion (" #x ") failed at " __FILE__ "(%d):%s\n", __LINE__, __FUNCTION__); } })
+#else
+#define BUG_TRAP(x) do { ; } while (0)
+#endif
+
+#if RT6_DEBUG >= 3
+#define RT6_TRACE(x...) printk(KERN_DEBUG x)
+#else
+#define RT6_TRACE(x...) do { ; } while (0)
+#endif
+
+struct rt6_statistics rt6_stats;
+
+enum fib_walk_state_t
+{
+#ifdef CONFIG_IPV6_SUBTREES
+ FWS_S,
+#endif
+ FWS_L,
+ FWS_R,
+ FWS_C,
+ FWS_U
+};
+
+struct fib6_cleaner_t
+{
+ struct fib6_walker_t w;
+ int (*func)(struct rt6_info *, void *arg);
+ void *arg;
+};
+
+#ifdef CONFIG_IPV6_SUBTREES
+#define FWS_INIT FWS_S
+#define SUBTREE(fn) ((fn)->subtree)
+#else
+#define FWS_INIT FWS_L
+#define SUBTREE(fn) NULL
+#endif
+
+static void fib6_prune_clones(struct fib6_node *fn, struct rt6_info *rt);
+static void fib6_repair_tree(struct fib6_node *fn);
+
+/*
+ * A routing update causes an increase of the serial number on the
+ * afected subtree. This allows for cached routes to be asynchronously
+ * tested when modifications are made to the destination cache as a
+ * result of redirects, path MTU changes, etc.
+ */
+
+static __u32 rt_sernum = 0;
+
+static struct timer_list ip6_fib_timer = {
+ NULL, NULL,
+ 0,
+ ~0UL,
+ fib6_run_gc
+};
+
+struct fib6_walker_t fib6_walker_list = {
+ &fib6_walker_list, &fib6_walker_list,
+};
+
+#define FOR_WALKERS(w) for ((w)=fib6_walker_list.next; (w) != &fib6_walker_list; (w)=(w)->next)
+
+static __inline__ u32 fib6_new_sernum(void)
+{
+ u32 n = ++rt_sernum;
+ if ((__s32)n <= 0)
+ rt_sernum = n = 1;
+ return n;
+}
+
+/*
+ * Auxiliary address test functions for the radix tree.
+ *
+ * These assume a 32bit processor (although it will work on
+ * 64bit processors)
+ */
+
+/*
+ * compare "prefix length" bits of an address
+ */
+
+static __inline__ int addr_match(void *token1, void *token2, int prefixlen)
+{
+ __u32 *a1 = token1;
+ __u32 *a2 = token2;
+ int pdw;
+ int pbi;
+
+ pdw = prefixlen >> 5; /* num of whole __u32 in prefix */
+ pbi = prefixlen & 0x1f; /* num of bits in incomplete u32 in prefix */
+
+ if (pdw)
+ if (memcmp(a1, a2, pdw << 2))
+ return 0;
+
+ if (pbi) {
+ __u32 mask;
+
+ mask = htonl((0xffffffff) << (32 - pbi));
+
+ if ((a1[pdw] ^ a2[pdw]) & mask)
+ return 0;
+ }
+
+ return 1;
+}
+
+/*
+ * test bit
+ */
+
+static __inline__ int addr_bit_set(void *token, int fn_bit)
+{
+ __u32 *addr = token;
+
+ return htonl(1 << ((~fn_bit)&0x1F)) & addr[fn_bit>>5];
+}
+
+/*
+ * find the first different bit between two addresses
+ * length of address must be a multiple of 32bits
+ */
+
+static __inline__ int addr_diff(void *token1, void *token2, int addrlen)
+{
+ __u32 *a1 = token1;
+ __u32 *a2 = token2;
+ int i;
+
+ addrlen >>= 2;
+
+ for (i = 0; i < addrlen; i++) {
+ __u32 xb;
+
+ xb = a1[i] ^ a2[i];
+
+ if (xb) {
+ int j = 31;
+
+ xb = ntohl(xb);
+
+ while (test_bit(j, &xb) == 0)
+ j--;
+
+ return (i * 32 + 31 - j);
+ }
+ }
+
+ /*
+ * we should *never* get to this point since that
+ * would mean the addrs are equal
+ *
+ * However, we do get to it 8) And exacly, when
+ * addresses are equal 8)
+ *
+ * ip route add 1111::/128 via ...
+ * ip route add 1111::/64 via ...
+ * and we are here.
+ *
+ * Ideally, this function should stop comparison
+ * at prefix length. It does not, but it is still OK,
+ * if returned value is greater than prefix length.
+ * --ANK (980803)
+ */
+
+ return addrlen<<5;
+}
+
+static __inline__ struct fib6_node * node_alloc(void)
+{
+ struct fib6_node *fn;
+
+ if ((fn = kmalloc(sizeof(struct fib6_node), GFP_ATOMIC)) != NULL) {
+ memset(fn, 0, sizeof(struct fib6_node));
+ rt6_stats.fib_nodes++;
+ }
+
+ return fn;
+}
+
+static __inline__ void node_free(struct fib6_node * fn)
+{
+ rt6_stats.fib_nodes--;
+ kfree(fn);
+}
+
+static __inline__ void rt6_release(struct rt6_info *rt)
+{
+ if (atomic_dec_and_test(&rt->rt6i_ref))
+ dst_free(&rt->u.dst);
+}
+
+
+/*
+ * Routing Table
+ *
+ * return the appropriate node for a routing tree "add" operation
+ * by either creating and inserting or by returning an existing
+ * node.
+ */
+
+static struct fib6_node * fib6_add_1(struct fib6_node *root, void *addr,
+ int addrlen, int plen,
+ int offset)
+{
+ struct fib6_node *fn, *in, *ln;
+ struct fib6_node *pn = NULL;
+ struct rt6key *key;
+ int bit;
+ int dir = 0;
+ __u32 sernum = fib6_new_sernum();
+
+ RT6_TRACE("fib6_add_1\n");
+
+ /* insert node in tree */
+
+ fn = root;
+
+ if (plen == 0)
+ return fn;
+
+ do {
+ key = (struct rt6key *)((u8 *)fn->leaf + offset);
+
+ /*
+ * Prefix match
+ */
+ if (plen < fn->fn_bit ||
+ !addr_match(&key->addr, addr, fn->fn_bit))
+ goto insert_above;
+
+ /*
+ * Exact match ?
+ */
+
+ if (plen == fn->fn_bit) {
+ /* clean up an intermediate node */
+ if ((fn->fn_flags & RTN_RTINFO) == 0) {
+ rt6_release(fn->leaf);
+ fn->leaf = NULL;
+ }
+
+ fn->fn_sernum = sernum;
+
+ return fn;
+ }
+
+ /*
+ * We have more bits to go
+ */
+
+ /* Try to walk down on tree. */
+ fn->fn_sernum = sernum;
+ dir = addr_bit_set(addr, fn->fn_bit);
+ pn = fn;
+ fn = dir ? fn->right: fn->left;
+ } while (fn);
+
+ /*
+ * We wlaked to the bottom of tree.
+ * Create new leaf node without children.
+ */
+
+ ln = node_alloc();
+
+ if (ln == NULL)
+ return NULL;
+ ln->fn_bit = plen;
+
+ ln->parent = pn;
+ ln->fn_sernum = sernum;
+
+ if (dir)
+ pn->right = ln;
+ else
+ pn->left = ln;
+
+ return ln;
+
+
+insert_above:
+ /*
+ * split since we don't have a common prefix anymore or
+ * we have a less significant route.
+ * we've to insert an intermediate node on the list
+ * this new node will point to the one we need to create
+ * and the current
+ */
+
+ pn = fn->parent;
+
+ /* find 1st bit in difference between the 2 addrs.
+
+ See comment in addr_diff: bit may be an invalid value,
+ but if it is >= plen, the value is ignored in any case.
+ */
+
+ bit = addr_diff(addr, &key->addr, addrlen);
+
+ /*
+ * (intermediate)[in]
+ * / \
+ * (new leaf node)[ln] (old node)[fn]
+ */
+ if (plen > bit) {
+ in = node_alloc();
+ ln = node_alloc();
+
+ if (in == NULL || ln == NULL) {
+ if (in)
+ node_free(in);
+ if (ln)
+ node_free(ln);
+ return NULL;
+ }
+
+ /*
+ * new intermediate node.
+ * RTN_RTINFO will
+ * be off since that an address that chooses one of
+ * the branches would not match less specific routes
+ * in the other branch
+ */
+
+ in->fn_bit = bit;
+
+ in->parent = pn;
+ in->leaf = fn->leaf;
+ atomic_inc(&in->leaf->rt6i_ref);
+
+ in->fn_sernum = sernum;
+
+ /* update parent pointer */
+ if (dir)
+ pn->right = in;
+ else
+ pn->left = in;
+
+ ln->fn_bit = plen;
+
+ ln->parent = in;
+ fn->parent = in;
+
+ ln->fn_sernum = sernum;
+
+ if (addr_bit_set(addr, bit)) {
+ in->right = ln;
+ in->left = fn;
+ } else {
+ in->left = ln;
+ in->right = fn;
+ }
+ } else { /* plen <= bit */
+
+ /*
+ * (new leaf node)[ln]
+ * / \
+ * (old node)[fn] NULL
+ */
+
+ ln = node_alloc();
+
+ if (ln == NULL)
+ return NULL;
+
+ ln->fn_bit = plen;
+
+ ln->parent = pn;
+
+ ln->fn_sernum = sernum;
+
+ if (dir)
+ pn->right = ln;
+ else
+ pn->left = ln;
+
+ if (addr_bit_set(&key->addr, plen))
+ ln->right = fn;
+ else
+ ln->left = fn;
+
+ fn->parent = ln;
+ }
+ return ln;
+}
+
+/*
+ * Insert routing information in a node.
+ */
+
+static int fib6_add_rt2node(struct fib6_node *fn, struct rt6_info *rt)
+{
+ struct rt6_info *iter = NULL;
+ struct rt6_info **ins;
+
+ ins = &fn->leaf;
+
+ for (iter = fn->leaf; iter; iter=iter->u.next) {
+ /*
+ * Search for duplicates
+ */
+
+ if (iter->rt6i_metric == rt->rt6i_metric) {
+ /*
+ * Same priority level
+ */
+
+ if ((iter->rt6i_dev == rt->rt6i_dev) &&
+ (iter->rt6i_flowr == rt->rt6i_flowr) &&
+ (ipv6_addr_cmp(&iter->rt6i_gateway,
+ &rt->rt6i_gateway) == 0)) {
+ if (!(iter->rt6i_flags&RTF_EXPIRES))
+ return -EEXIST;
+ iter->rt6i_expires = rt->rt6i_expires;
+ if (!(rt->rt6i_flags&RTF_EXPIRES)) {
+ iter->rt6i_flags &= ~RTF_EXPIRES;
+ iter->rt6i_expires = 0;
+ }
+ return -EEXIST;
+ }
+ }
+
+ if (iter->rt6i_metric > rt->rt6i_metric)
+ break;
+
+ ins = &iter->u.next;
+ }
+
+ /*
+ * insert node
+ */
+
+ rt->u.next = iter;
+ *ins = rt;
+ rt->rt6i_node = fn;
+ atomic_inc(&rt->rt6i_ref);
+#ifdef CONFIG_RTNETLINK
+ inet6_rt_notify(RTM_NEWROUTE, rt);
+#endif
+ rt6_stats.fib_rt_entries++;
+
+ if ((fn->fn_flags & RTN_RTINFO) == 0) {
+ rt6_stats.fib_route_nodes++;
+ fn->fn_flags |= RTN_RTINFO;
+ }
+
+ return 0;
+}
+
+static __inline__ void fib6_start_gc(struct rt6_info *rt)
+{
+ if (ip6_fib_timer.expires == 0 &&
+ (rt->rt6i_flags & (RTF_EXPIRES|RTF_CACHE))) {
+ del_timer(&ip6_fib_timer);
+ ip6_fib_timer.expires = jiffies + ip6_rt_gc_interval;
+ add_timer(&ip6_fib_timer);
+ }
+}
+
+/*
+ * Add routing information to the routing tree.
+ * <destination addr>/<source addr>
+ * with source addr info in sub-trees
+ */
+
+int fib6_add(struct fib6_node *root, struct rt6_info *rt)
+{
+ struct fib6_node *fn;
+ int err = -ENOMEM;
+
+ fn = fib6_add_1(root, &rt->rt6i_dst.addr, sizeof(struct in6_addr),
+ rt->rt6i_dst.plen, (u8*) &rt->rt6i_dst - (u8*) rt);
+
+ if (fn == NULL)
+ return -ENOMEM;
+
+#ifdef CONFIG_IPV6_SUBTREES
+ if (rt->rt6i_src.plen) {
+ struct fib6_node *sn;
+
+ if (fn->subtree == NULL) {
+ struct fib6_node *sfn;
+
+ /*
+ * Create subtree.
+ *
+ * fn[main tree]
+ * |
+ * sfn[subtree root]
+ * \
+ * sn[new leaf node]
+ */
+
+ /* Create subtree root node */
+ sfn = node_alloc();
+ if (sfn == NULL)
+ goto st_failure;
+
+ sfn->leaf = &ip6_null_entry;
+ atomic_inc(&ip6_null_entry.rt6i_ref);
+ sfn->fn_flags = RTN_ROOT;
+ sfn->fn_sernum = fib6_new_sernum();
+
+ /* Now add the first leaf node to new subtree */
+
+ sn = fib6_add_1(sfn, &rt->rt6i_src.addr,
+ sizeof(struct in6_addr), rt->rt6i_src.plen,
+ (u8*) &rt->rt6i_src - (u8*) rt);
+
+ if (sn == NULL) {
+ /* If it is failed, discard just allocated
+ root, and then (in st_failure) stale node
+ in main tree.
+ */
+ node_free(sfn);
+ goto st_failure;
+ }
+
+ /* Now link new subtree to main tree */
+ sfn->parent = fn;
+ fn->subtree = sfn;
+ if (fn->leaf == NULL) {
+ fn->leaf = rt;
+ atomic_inc(&rt->rt6i_ref);
+ }
+ } else {
+ sn = fib6_add_1(fn->subtree, &rt->rt6i_src.addr,
+ sizeof(struct in6_addr), rt->rt6i_src.plen,
+ (u8*) &rt->rt6i_src - (u8*) rt);
+
+ if (sn == NULL)
+ goto st_failure;
+ }
+
+ fn = sn;
+ }
+#endif
+
+ err = fib6_add_rt2node(fn, rt);
+
+ if (err == 0) {
+ fib6_start_gc(rt);
+ if (!(rt->rt6i_flags&RTF_CACHE))
+ fib6_prune_clones(fn, rt);
+ }
+
+ if (err)
+ dst_free(&rt->u.dst);
+ return err;
+
+#ifdef CONFIG_IPV6_SUBTREES
+ /* Subtree creation failed, probably main tree node
+ is orphan. If it is, shot it.
+ */
+st_failure:
+ if (fn && !(fn->fn_flags&RTN_RTINFO|RTN_ROOT))
+ fib_repair_tree(fn);
+ dst_free(&rt->u.dst);
+ return err;
+#endif
+}
+
+/*
+ * Routing tree lookup
+ *
+ */
+
+struct lookup_args {
+ int offset; /* key offset on rt6_info */
+ struct in6_addr *addr; /* search key */
+};
+
+static struct fib6_node * fib6_lookup_1(struct fib6_node *root,
+ struct lookup_args *args)
+{
+ struct fib6_node *fn;
+ int dir;
+
+ /*
+ * Descend on a tree
+ */
+
+ fn = root;
+
+ for (;;) {
+ struct fib6_node *next;
+
+ dir = addr_bit_set(args->addr, fn->fn_bit);
+
+ next = dir ? fn->right : fn->left;
+
+ if (next) {
+ fn = next;
+ continue;
+ }
+
+ break;
+ }
+
+ while ((fn->fn_flags & RTN_ROOT) == 0) {
+#ifdef CONFIG_IPV6_SUBTREES
+ if (fn->subtree) {
+ struct fib6_node *st;
+ struct lookup_args *narg;
+
+ narg = args + 1;
+
+ if (narg->addr) {
+ st = fib6_lookup_1(fn->subtree, narg);
+
+ if (!(st->fn_flags & RTN_ROOT))
+ {
+ return st;
+ }
+ }
+ }
+#endif
+
+ if (fn->fn_flags & RTN_RTINFO) {
+ struct rt6key *key;
+
+ key = (struct rt6key *) ((u8 *) fn->leaf +
+ args->offset);
+
+ if (addr_match(&key->addr, args->addr, key->plen))
+ return fn;
+ }
+
+ fn = fn->parent;
+ }
+
+ return NULL;
+}
+
+struct fib6_node * fib6_lookup(struct fib6_node *root, struct in6_addr *daddr,
+ struct in6_addr *saddr)
+{
+ struct lookup_args args[2];
+ struct rt6_info *rt = NULL;
+ struct fib6_node *fn;
+
+ args[0].offset = (u8*) &rt->rt6i_dst - (u8*) rt;
+ args[0].addr = daddr;
+
+#ifdef CONFIG_IPV6_SUBTREES
+ args[1].offset = (u8*) &rt->rt6i_src - (u8*) rt;
+ args[1].addr = saddr;
+#endif
+
+ fn = fib6_lookup_1(root, args);
+
+ if (fn == NULL)
+ fn = root;
+
+ return fn;
+}
+
+/*
+ * Get node with sepciafied destination prefix (and source prefix,
+ * if subtrees are used)
+ */
+
+
+static struct fib6_node * fib6_locate_1(struct fib6_node *root,
+ struct in6_addr *addr,
+ int plen, int offset)
+{
+ struct fib6_node *fn;
+
+ for (fn = root; fn ; ) {
+ struct rt6key *key = (struct rt6key *)((u8 *)fn->leaf + offset);
+
+ /*
+ * Prefix match
+ */
+ if (plen < fn->fn_bit ||
+ !addr_match(&key->addr, addr, fn->fn_bit))
+ return NULL;
+
+ if (plen == fn->fn_bit)
+ return fn;
+
+ /*
+ * We have more bits to go
+ */
+ if (addr_bit_set(addr, fn->fn_bit))
+ fn = fn->right;
+ else
+ fn = fn->left;
+ }
+ return NULL;
+}
+
+struct fib6_node * fib6_locate(struct fib6_node *root,
+ struct in6_addr *daddr, int dst_len,
+ struct in6_addr *saddr, int src_len)
+{
+ struct rt6_info *rt = NULL;
+ struct fib6_node *fn;
+
+ fn = fib6_locate_1(root, daddr, dst_len,
+ (u8*) &rt->rt6i_dst - (u8*) rt);
+
+#ifdef CONFIG_IPV6_SUBTREES
+ if (src_len) {
+ BUG_TRAP(saddr!=NULL);
+ if (fn != NULL)
+ fn = fn->subtree;
+ if (fn)
+ fn = fib6_locate_1(fn, saddr, src_len,
+ (u8*) &rt->rt6i_src - (u8*) rt);
+ }
+#endif
+
+ if (fn && fn->fn_flags&RTN_RTINFO)
+ return fn;
+
+ return NULL;
+}
+
+
+/*
+ * Deletion
+ *
+ */
+
+static struct rt6_info * fib6_find_prefix(struct fib6_node *fn)
+{
+ if (fn->fn_flags&RTN_ROOT)
+ return &ip6_null_entry;
+
+ while(fn) {
+ if(fn->left)
+ return fn->left->leaf;
+
+ if(fn->right)
+ return fn->right->leaf;
+
+ fn = SUBTREE(fn);
+ }
+ return NULL;
+}
+
+/*
+ * Called to trim the tree of intermediate nodes when possible. "fn"
+ * is the node we want to try and remove.
+ */
+
+static void fib6_repair_tree(struct fib6_node *fn)
+{
+ int children;
+ int nstate;
+ struct fib6_node *child, *pn;
+ struct fib6_walker_t *w;
+ int iter = 0;
+
+ for (;;) {
+ RT6_TRACE("fixing tree: plen=%d iter=%d\n", fn->fn_bit, iter);
+ iter++;
+
+ BUG_TRAP(!(fn->fn_flags&RTN_RTINFO));
+ BUG_TRAP(!(fn->fn_flags&RTN_TL_ROOT));
+ BUG_TRAP(fn->leaf==NULL);
+
+ children = 0;
+ child = NULL;
+ if (fn->right) child = fn->right, children |= 1;
+ if (fn->left) child = fn->left, children |= 2;
+
+ if (children == 3 || SUBTREE(fn)
+#ifdef CONFIG_IPV6_SUBTREES
+ /* Subtree root (i.e. fn) may have one child */
+ || (children && fn->fn_flags&RTN_ROOT)
+#endif
+ ) {
+ fn->leaf = fib6_find_prefix(fn);
+#if RT6_DEBUG >= 2
+ if (fn->leaf==NULL) {
+ BUG_TRAP(fn->leaf);
+ fn->leaf = &ip6_null_entry;
+ }
+#endif
+ atomic_inc(&fn->leaf->rt6i_ref);
+ return;
+ }
+
+ pn = fn->parent;
+#ifdef CONFIG_IPV6_SUBTREES
+ if (SUBTREE(pn) == fn) {
+ BUG_TRAP(fn->fn_flags&RTN_ROOT);
+ SUBTREE(pn) = NULL;
+ nstate = FWS_L;
+ } else {
+ BUG_TRAP(!(fn->fn_flags&RTN_ROOT));
+#endif
+ if (pn->right == fn) pn->right = child;
+ else if (pn->left == fn) pn->left = child;
+#if RT6_DEBUG >= 2
+ else BUG_TRAP(0);
+#endif
+ if (child)
+ child->parent = pn;
+ nstate = FWS_R;
+#ifdef CONFIG_IPV6_SUBTREES
+ }
+#endif
+
+ FOR_WALKERS(w) {
+ if (child == NULL) {
+ if (w->root == fn) {
+ w->root = w->node = NULL;
+ RT6_TRACE("W %p adjusted by delroot 1\n", w);
+ } else if (w->node == fn) {
+ RT6_TRACE("W %p adjusted by delnode 1, s=%d/%d\n", w, w->state, nstate);
+ w->node = pn;
+ w->state = nstate;
+ }
+ } else {
+ if (w->root == fn) {
+ w->root = child;
+ RT6_TRACE("W %p adjusted by delroot 2\n", w);
+ }
+ if (w->node == fn) {
+ w->node = child;
+ if (children&2) {
+ RT6_TRACE("W %p adjusted by delnode 2, s=%d\n", w, w->state);
+ w->state = w->state>=FWS_R ? FWS_U : FWS_INIT;
+ } else {
+ RT6_TRACE("W %p adjusted by delnode 2, s=%d\n", w, w->state);
+ w->state = w->state>=FWS_C ? FWS_U : FWS_INIT;
+ }
+ }
+ }
+ }
+
+ node_free(fn);
+ if (pn->fn_flags&RTN_RTINFO || SUBTREE(pn))
+ return;
+
+ rt6_release(pn->leaf);
+ pn->leaf = NULL;
+ fn = pn;
+ }
+}
+
+static void fib6_del_route(struct fib6_node *fn, struct rt6_info **rtp)
+{
+ struct fib6_walker_t *w;
+ struct rt6_info *rt = *rtp;
+
+ RT6_TRACE("fib6_del_route\n");
+
+ /* Unlink it */
+ *rtp = rt->u.next;
+ rt->rt6i_node = NULL;
+ rt6_stats.fib_rt_entries--;
+
+ /* Adjust walkers */
+ FOR_WALKERS(w) {
+ if (w->state == FWS_C && w->leaf == rt) {
+ RT6_TRACE("walker %p adjusted by delroute\n", w);
+ w->leaf = rt->u.next;
+ if (w->leaf == NULL)
+ w->state = FWS_U;
+ }
+ }
+
+ rt->u.next = NULL;
+
+ /* If it was last route, expunge its radix tree node */
+ if (fn->leaf == NULL) {
+ fn->fn_flags &= ~RTN_RTINFO;
+ rt6_stats.fib_route_nodes--;
+ fib6_repair_tree(fn);
+ }
+
+#ifdef CONFIG_RTNETLINK
+ inet6_rt_notify(RTM_DELROUTE, rt);
+#endif
+ rt6_release(rt);
+}
+
+int fib6_del(struct rt6_info *rt)
+{
+ struct fib6_node *fn = rt->rt6i_node;
+ struct rt6_info **rtp;
+
+#if RT6_DEBUG >= 2
+ if (rt->u.dst.obsolete>0) {
+ BUG_TRAP(rt->u.dst.obsolete>0);
+ return -EFAULT;
+ }
+#endif
+ if (fn == NULL || rt == &ip6_null_entry)
+ return -ENOENT;
+
+ BUG_TRAP(fn->fn_flags&RTN_RTINFO);
+
+ if (!(rt->rt6i_flags&RTF_CACHE))
+ fib6_prune_clones(fn, rt);
+
+ /*
+ * Walk the leaf entries looking for ourself
+ */
+
+ for (rtp = &fn->leaf; *rtp; rtp = &(*rtp)->u.next) {
+ if (*rtp == rt) {
+ fib6_del_route(fn, rtp);
+ return 0;
+ }
+ }
+ return -ENOENT;
+}
+
+/*
+ * Tree transversal function.
+ *
+ * Certainly, it is not interrupt safe.
+ * However, it is internally reenterable wrt itself and fib6_add/fib6_del.
+ * It means, that we can modify tree during walking
+ * and use this function for garbage collection, clone pruning,
+ * cleaning tree when a device goes down etc. etc.
+ *
+ * It guarantees that every node will be traversed,
+ * and that it will be traversed only once.
+ *
+ * Callback function w->func may return:
+ * 0 -> continue walking.
+ * positive value -> walking is suspended (used by tree dumps,
+ * and probably by gc, if it will be split to several slices)
+ * negative value -> terminate walking.
+ *
+ * The function itself returns:
+ * 0 -> walk is complete.
+ * >0 -> walk is incomplete (i.e. suspended)
+ * <0 -> walk is terminated by an error.
+ */
+
+int fib6_walk_continue(struct fib6_walker_t *w)
+{
+ struct fib6_node *fn, *pn;
+
+ for (;;) {
+ fn = w->node;
+ if (fn == NULL)
+ return 0;
+
+ if (w->prune && fn != w->root &&
+ fn->fn_flags&RTN_RTINFO && w->state < FWS_C) {
+ w->state = FWS_C;
+ w->leaf = fn->leaf;
+ }
+ switch (w->state) {
+#ifdef CONFIG_IPV6_SUBTREES
+ case FWS_S:
+ if (SUBTREE(fn)) {
+ w->node = SUBTREE(fn);
+ continue;
+ }
+ w->state = FWS_L;
+#endif
+ case FWS_L:
+ if (fn->left) {
+ w->node = fn->left;
+ w->state = FWS_INIT;
+ continue;
+ }
+ w->state = FWS_R;
+ case FWS_R:
+ if (fn->right) {
+ w->node = fn->right;
+ w->state = FWS_INIT;
+ continue;
+ }
+ w->state = FWS_C;
+ w->leaf = fn->leaf;
+ case FWS_C:
+ if (w->leaf && fn->fn_flags&RTN_RTINFO) {
+ int err = w->func(w);
+ if (err)
+ return err;
+ continue;
+ }
+ w->state = FWS_U;
+ case FWS_U:
+ if (fn == w->root)
+ return 0;
+ pn = fn->parent;
+ w->node = pn;
+#ifdef CONFIG_IPV6_SUBTREES
+ if (SUBTREE(pn) == fn) {
+ BUG_TRAP(fn->fn_flags&RTN_ROOT);
+ w->state = FWS_L;
+ continue;
+ }
+#endif
+ if (pn->left == fn) {
+ w->state = FWS_R;
+ continue;
+ }
+ if (pn->right == fn) {
+ w->state = FWS_C;
+ w->leaf = w->node->leaf;
+ continue;
+ }
+#if RT6_DEBUG >= 2
+ BUG_TRAP(0);
+#endif
+ }
+ }
+}
+
+int fib6_walk(struct fib6_walker_t *w)
+{
+ int res;
+
+ w->state = FWS_INIT;
+ w->node = w->root;
+
+ fib6_walker_link(w);
+ res = fib6_walk_continue(w);
+ if (res <= 0)
+ fib6_walker_unlink(w);
+ return res;
+}
+
+static int fib6_clean_node(struct fib6_walker_t *w)
+{
+ int res;
+ struct rt6_info *rt;
+ struct fib6_cleaner_t *c = (struct fib6_cleaner_t*)w;
+
+ for (rt = w->leaf; rt; rt = rt->u.next) {
+ res = c->func(rt, c->arg);
+ if (res < 0) {
+ w->leaf = rt;
+ res = fib6_del(rt);
+ if (res) {
+#if RT6_DEBUG >= 2
+ printk(KERN_DEBUG "fib6_clean_node: del failed: rt=%p@%p err=%d\n", rt, rt->rt6i_node, res);
+#endif
+ continue;
+ }
+ return 0;
+ }
+ BUG_TRAP(res==0);
+ }
+ w->leaf = rt;
+ return 0;
+}
+
+/*
+ * Convenient frontend to tree walker.
+ *
+ * func is called on each route.
+ * It may return -1 -> delete this route.
+ * 0 -> continue walking
+ *
+ * prune==1 -> only immediate children of node (certainly,
+ * ignoring pure split nodes) will be scanned.
+ */
+
+void fib6_clean_tree(struct fib6_node *root,
+ int (*func)(struct rt6_info *, void *arg),
+ int prune, void *arg)
+{
+ struct fib6_cleaner_t c;
+
+ c.w.root = root;
+ c.w.func = fib6_clean_node;
+ c.w.prune = prune;
+ c.func = func;
+ c.arg = arg;
+
+ start_bh_atomic();
+ fib6_walk(&c.w);
+ end_bh_atomic();
+}
+
+static int fib6_prune_clone(struct rt6_info *rt, void *arg)
+{
+ if (rt->rt6i_flags & RTF_CACHE) {
+ RT6_TRACE("pruning clone %p\n", rt);
+ return -1;
+ }
+
+ return 0;
+}
+
+static void fib6_prune_clones(struct fib6_node *fn, struct rt6_info *rt)
+{
+ fib6_clean_tree(fn, fib6_prune_clone, 1, rt);
+}
+
+/*
+ * Garbage collection
+ */
+
+static struct fib6_gc_args
+{
+ int timeout;
+ int more;
+} gc_args;
+
+static int fib6_age(struct rt6_info *rt, void *arg)
+{
+ unsigned long now = jiffies;
+
+ /* Age clones. Note, that clones are aged out
+ only if they are not in use now.
+ */
+
+ if (rt->rt6i_flags & RTF_CACHE) {
+ if (atomic_read(&rt->u.dst.use) == 0 &&
+ (long)(now - rt->u.dst.lastuse) >= gc_args.timeout) {
+ RT6_TRACE("aging clone %p\n", rt);
+ return -1;
+ }
+ gc_args.more++;
+ }
+
+ /*
+ * check addrconf expiration here.
+ * They are expired even if they are in use.
+ */
+
+ if (rt->rt6i_flags&RTF_EXPIRES && rt->rt6i_expires) {
+ if ((long)(now - rt->rt6i_expires) > 0) {
+ RT6_TRACE("expiring %p\n", rt);
+ return -1;
+ }
+ gc_args.more++;
+ }
+
+ return 0;
+}
+
+void fib6_run_gc(unsigned long dummy)
+{
+ if (dummy != ~0UL)
+ gc_args.timeout = (int)dummy;
+ else
+ gc_args.timeout = ip6_rt_gc_interval;
+
+ gc_args.more = 0;
+
+ fib6_clean_tree(&ip6_routing_table, fib6_age, 0, NULL);
+
+ del_timer(&ip6_fib_timer);
+
+ ip6_fib_timer.expires = 0;
+ if (gc_args.more) {
+ ip6_fib_timer.expires = jiffies + ip6_rt_gc_interval;
+ add_timer(&ip6_fib_timer);
+ }
+}
+
+#ifdef MODULE
+void fib6_gc_cleanup(void)
+{
+ del_timer(&ip6_fib_timer);
+}
+#endif
+
+
diff --git a/pfinet/linux-src/net/ipv6/ip6_flowlabel.c b/pfinet/linux-src/net/ipv6/ip6_flowlabel.c
new file mode 100644
index 00000000..4a34b878
--- /dev/null
+++ b/pfinet/linux-src/net/ipv6/ip6_flowlabel.c
@@ -0,0 +1,627 @@
+/*
+ * ip6_flowlabel.c IPv6 flowlabel manager.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version
+ * 2 of the License, or (at your option) any later version.
+ *
+ * Authors: Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru>
+ */
+
+#include <linux/config.h>
+#include <linux/errno.h>
+#include <linux/types.h>
+#include <linux/socket.h>
+#include <linux/net.h>
+#include <linux/netdevice.h>
+#include <linux/if_arp.h>
+#include <linux/in6.h>
+#include <linux/route.h>
+#include <linux/proc_fs.h>
+
+#include <net/sock.h>
+
+#include <net/ipv6.h>
+#include <net/ndisc.h>
+#include <net/protocol.h>
+#include <net/ip6_route.h>
+#include <net/addrconf.h>
+#include <net/rawv6.h>
+#include <net/icmp.h>
+#include <net/transp_v6.h>
+
+#include <asm/uaccess.h>
+
+#define FL_MIN_LINGER 6 /* Minimal linger. It is set to 6sec specified
+ in old IPv6 RFC. Well, it was reasonable value.
+ */
+#define FL_MAX_LINGER 60 /* Maximal linger timeout */
+
+/* FL hash table */
+
+#define FL_MAX_PER_SOCK 32
+#define FL_MAX_SIZE 4096
+#define FL_HASH_MASK 255
+#define FL_HASH(l) (ntohl(l)&FL_HASH_MASK)
+
+static atomic_t fl_size = ATOMIC_INIT(0);
+static struct ip6_flowlabel *fl_ht[FL_HASH_MASK+1];
+
+static struct timer_list ip6_fl_gc_timer;
+
+/* FL hash table lock: it protects only of GC */
+
+static atomic_t ip6_fl_lock = ATOMIC_INIT(0);
+
+static __inline__ void fl_lock(void)
+{
+ atomic_inc(&ip6_fl_lock);
+ synchronize_bh();
+}
+
+static __inline__ void fl_unlock(void)
+{
+ atomic_dec(&ip6_fl_lock);
+}
+
+static struct ip6_flowlabel * fl_lookup(u32 label)
+{
+ struct ip6_flowlabel *fl;
+
+ fl_lock();
+ for (fl=fl_ht[FL_HASH(label)]; fl; fl = fl->next) {
+ if (fl->label == label) {
+ atomic_inc(&fl->users);
+ break;
+ }
+ }
+ fl_unlock();
+ return fl;
+}
+
+static void fl_free(struct ip6_flowlabel *fl)
+{
+ if (fl->opt)
+ kfree(fl->opt);
+ kfree(fl);
+}
+
+static void fl_release(struct ip6_flowlabel *fl)
+{
+ fl_lock();
+ fl->lastuse = jiffies;
+ if (atomic_dec_and_test(&fl->users)) {
+ unsigned long ttd = fl->lastuse + fl->linger;
+ if ((long)(ttd - fl->expires) > 0)
+ fl->expires = ttd;
+ ttd = fl->expires;
+ if (fl->opt && fl->share == IPV6_FL_S_EXCL) {
+ struct ipv6_txoptions *opt = fl->opt;
+ fl->opt = NULL;
+ kfree(opt);
+ }
+ if (!del_timer(&ip6_fl_gc_timer) ||
+ (long)(ip6_fl_gc_timer.expires - ttd) > 0)
+ ip6_fl_gc_timer.expires = ttd;
+ add_timer(&ip6_fl_gc_timer);
+ }
+ fl_unlock();
+}
+
+static void ip6_fl_gc(unsigned long dummy)
+{
+ int i;
+ unsigned long now = jiffies;
+ unsigned long sched = 0;
+
+ if (atomic_read(&ip6_fl_lock)) {
+ ip6_fl_gc_timer.expires = now + HZ/10;
+ add_timer(&ip6_fl_gc_timer);
+ return;
+ }
+
+ for (i=0; i<=FL_HASH_MASK; i++) {
+ struct ip6_flowlabel *fl, **flp;
+ flp = &fl_ht[i];
+ while ((fl=*flp) != NULL) {
+ if (atomic_read(&fl->users) == 0) {
+ unsigned long ttd = fl->lastuse + fl->linger;
+ if ((long)(ttd - fl->expires) > 0)
+ fl->expires = ttd;
+ ttd = fl->expires;
+ if ((long)(now - ttd) >= 0) {
+ *flp = fl->next;
+ fl_free(fl);
+ atomic_dec(&fl_size);
+ continue;
+ }
+ if (!sched || (long)(ttd - sched) < 0)
+ sched = ttd;
+ }
+ flp = &fl->next;
+ }
+ }
+ if (!sched && atomic_read(&fl_size))
+ sched = now + FL_MAX_LINGER;
+ if (sched) {
+ ip6_fl_gc_timer.expires = sched;
+ add_timer(&ip6_fl_gc_timer);
+ }
+}
+
+static int fl_intern(struct ip6_flowlabel *fl, __u32 label)
+{
+ fl->label = label & IPV6_FLOWLABEL_MASK;
+
+ fl_lock();
+ if (label == 0) {
+ for (;;) {
+ fl->label = htonl(net_random())&IPV6_FLOWLABEL_MASK;
+ if (fl->label) {
+ struct ip6_flowlabel *lfl;
+ lfl = fl_lookup(fl->label);
+ if (lfl == NULL)
+ break;
+ fl_release(lfl);
+ }
+ }
+ }
+
+ fl->lastuse = jiffies;
+ fl->next = fl_ht[FL_HASH(fl->label)];
+ fl_ht[FL_HASH(fl->label)] = fl;
+ atomic_inc(&fl_size);
+ fl_unlock();
+ return 0;
+}
+
+
+
+/* Socket flowlabel lists */
+
+struct ip6_flowlabel * fl6_sock_lookup(struct sock *sk, u32 label)
+{
+ struct ipv6_fl_socklist *sfl;
+ struct ipv6_pinfo *np = &sk->net_pinfo.af_inet6;
+
+ label &= IPV6_FLOWLABEL_MASK;
+
+ for (sfl=np->ipv6_fl_list; sfl; sfl = sfl->next) {
+ struct ip6_flowlabel *fl = sfl->fl;
+ if (fl->label == label) {
+ fl->lastuse = jiffies;
+ atomic_inc(&fl->users);
+ return fl;
+ }
+ }
+ return NULL;
+}
+
+void fl6_free_socklist(struct sock *sk)
+{
+ struct ipv6_pinfo *np = &sk->net_pinfo.af_inet6;
+ struct ipv6_fl_socklist *sfl;
+
+ while ((sfl = np->ipv6_fl_list) != NULL) {
+ np->ipv6_fl_list = sfl->next;
+ fl_release(sfl->fl);
+ kfree(sfl);
+ }
+}
+
+/* Service routines */
+
+
+/*
+ It is the only difficult place. flowlabel enforces equal headers
+ before and including routing header, however user may supply options
+ following rthdr.
+ */
+
+struct ipv6_txoptions *fl6_merge_options(struct ipv6_txoptions * opt_space,
+ struct ip6_flowlabel * fl,
+ struct ipv6_txoptions * fopt)
+{
+ struct ipv6_txoptions * fl_opt = fl->opt;
+
+ if (fopt == NULL || fopt->opt_flen == 0)
+ return fl_opt;
+
+ if (fl_opt != NULL) {
+ opt_space->hopopt = fl_opt->hopopt;
+ opt_space->dst0opt = fl_opt->dst0opt;
+ opt_space->srcrt = fl_opt->srcrt;
+ opt_space->opt_nflen = fl_opt->opt_nflen;
+ } else {
+ if (fopt->opt_nflen == 0)
+ return fopt;
+ opt_space->hopopt = NULL;
+ opt_space->dst0opt = NULL;
+ opt_space->srcrt = NULL;
+ opt_space->opt_nflen = 0;
+ }
+ opt_space->dst1opt = fopt->dst1opt;
+ opt_space->auth = fopt->auth;
+ opt_space->opt_flen = fopt->opt_flen;
+ return opt_space;
+}
+
+static __u32 check_linger(__u16 ttl)
+{
+ if (ttl < FL_MIN_LINGER)
+ return FL_MIN_LINGER*HZ;
+ if (ttl > FL_MAX_LINGER && !capable(CAP_NET_ADMIN))
+ return 0;
+ return ttl*HZ;
+}
+
+static int fl6_renew(struct ip6_flowlabel *fl, unsigned linger, unsigned expires)
+{
+ linger = check_linger(linger);
+ if (!linger)
+ return -EPERM;
+ expires = check_linger(expires);
+ if (!expires)
+ return -EPERM;
+ fl->lastuse = jiffies;
+ if (fl->linger < linger)
+ fl->linger = linger;
+ if (expires < fl->linger)
+ expires = fl->linger;
+ if ((long)(fl->expires - (fl->lastuse+expires)) < 0)
+ fl->expires = fl->lastuse + expires;
+ return 0;
+}
+
+static struct ip6_flowlabel *
+fl_create(struct in6_flowlabel_req *freq, char *optval, int optlen, int *err_p)
+{
+ struct ip6_flowlabel *fl;
+ int olen;
+ int addr_type;
+ int err;
+
+ err = -ENOMEM;
+ fl = kmalloc(sizeof(*fl), GFP_KERNEL);
+ if (fl == NULL)
+ goto done;
+ memset(fl, 0, sizeof(*fl));
+
+ olen = optlen - CMSG_ALIGN(sizeof(*freq));
+ if (olen > 0) {
+ struct msghdr msg;
+ struct flowi flowi;
+ int junk;
+
+ err = -ENOMEM;
+ fl->opt = kmalloc(sizeof(*fl->opt) + olen, GFP_KERNEL);
+ if (fl->opt == NULL)
+ goto done;
+
+ memset(fl->opt, 0, sizeof(*fl->opt));
+ fl->opt->tot_len = sizeof(*fl->opt) + olen;
+ err = -EFAULT;
+ if (copy_from_user(fl->opt+1, optval+CMSG_ALIGN(sizeof(*freq)), olen))
+ goto done;
+
+ msg.msg_controllen = olen;
+ msg.msg_control = (void*)(fl->opt+1);
+ flowi.oif = 0;
+
+ err = datagram_send_ctl(&msg, &flowi, fl->opt, &junk);
+ if (err)
+ goto done;
+ err = -EINVAL;
+ if (fl->opt->opt_flen)
+ goto done;
+ if (fl->opt->opt_nflen == 0) {
+ kfree(fl->opt);
+ fl->opt = NULL;
+ }
+ }
+
+ fl->expires = jiffies;
+ err = fl6_renew(fl, freq->flr_linger, freq->flr_expires);
+ if (err)
+ goto done;
+ fl->share = freq->flr_share;
+ addr_type = ipv6_addr_type(&freq->flr_dst);
+ if ((addr_type&IPV6_ADDR_MAPPED)
+ || addr_type == IPV6_ADDR_ANY)
+ goto done;
+ ipv6_addr_copy(&fl->dst, &freq->flr_dst);
+ atomic_set(&fl->users, 1);
+ switch (fl->share) {
+ case IPV6_FL_S_EXCL:
+ case IPV6_FL_S_ANY:
+ break;
+ case IPV6_FL_S_PROCESS:
+ fl->owner = current->pid;
+ break;
+ case IPV6_FL_S_USER:
+#ifdef _HURD_
+ /* FIXME
+ * Which euid shall be assigned? Where to get it,
+ * `struct task_struct' doesn't have a `euid'.
+ */
+#else
+ fl->owner = current->euid;
+ break;
+#endif
+ default:
+ err = -EINVAL;
+ goto done;
+ }
+ return fl;
+
+done:
+ if (fl)
+ fl_free(fl);
+ *err_p = err;
+ return NULL;
+}
+
+static int mem_check(struct sock *sk)
+{
+ struct ipv6_fl_socklist *sfl;
+ int room = FL_MAX_SIZE - atomic_read(&fl_size);
+ int count = 0;
+
+ if (room > FL_MAX_SIZE - FL_MAX_PER_SOCK)
+ return 0;
+
+ for (sfl = sk->net_pinfo.af_inet6.ipv6_fl_list; sfl; sfl = sfl->next)
+ count++;
+
+ if (room <= 0 ||
+ ((count >= FL_MAX_PER_SOCK ||
+ (count > 0 && room < FL_MAX_SIZE/2) || room < FL_MAX_SIZE/4)
+ && !capable(CAP_NET_ADMIN)))
+ return -ENOBUFS;
+
+ return 0;
+}
+
+static int ipv6_hdr_cmp(struct ipv6_opt_hdr *h1, struct ipv6_opt_hdr *h2)
+{
+ if (h1 == h2)
+ return 0;
+ if (h1 == NULL || h2 == NULL)
+ return 1;
+ if (h1->hdrlen != h2->hdrlen)
+ return 1;
+ return memcmp(h1+1, h2+1, ((h1->hdrlen+1)<<3) - sizeof(*h1));
+}
+
+static int ipv6_opt_cmp(struct ipv6_txoptions *o1, struct ipv6_txoptions *o2)
+{
+ if (o1 == o2)
+ return 0;
+ if (o1 == NULL || o2 == NULL)
+ return 1;
+ if (o1->opt_nflen != o2->opt_nflen)
+ return 1;
+ if (ipv6_hdr_cmp(o1->hopopt, o2->hopopt))
+ return 1;
+ if (ipv6_hdr_cmp(o1->dst0opt, o2->dst0opt))
+ return 1;
+ if (ipv6_hdr_cmp((struct ipv6_opt_hdr *)o1->srcrt, (struct ipv6_opt_hdr *)o2->srcrt))
+ return 1;
+ return 0;
+}
+
+int ipv6_flowlabel_opt(struct sock *sk, char *optval, int optlen)
+{
+ int err;
+ struct ipv6_pinfo *np = &sk->net_pinfo.af_inet6;
+ struct in6_flowlabel_req freq;
+ struct ipv6_fl_socklist *sfl1=NULL;
+ struct ipv6_fl_socklist *sfl, **sflp;
+ struct ip6_flowlabel *fl;
+
+ if (optlen < sizeof(freq))
+ return -EINVAL;
+
+ if (copy_from_user(&freq, optval, sizeof(freq)))
+ return -EFAULT;
+
+ switch (freq.flr_action) {
+ case IPV6_FL_A_PUT:
+ for (sflp = &np->ipv6_fl_list; (sfl=*sflp)!=NULL; sflp = &sfl->next) {
+ if (sfl->fl->label == freq.flr_label) {
+ if (freq.flr_label == (np->flow_label&IPV6_FLOWLABEL_MASK))
+ np->flow_label &= ~IPV6_FLOWLABEL_MASK;
+ *sflp = sfl->next;
+ synchronize_bh();
+ fl_release(sfl->fl);
+ kfree(sfl);
+ return 0;
+ }
+ }
+ return -ESRCH;
+
+ case IPV6_FL_A_RENEW:
+ for (sfl = np->ipv6_fl_list; sfl; sfl = sfl->next) {
+ if (sfl->fl->label == freq.flr_label)
+ return fl6_renew(sfl->fl, freq.flr_linger, freq.flr_expires);
+ }
+ if (freq.flr_share == IPV6_FL_S_NONE && capable(CAP_NET_ADMIN)) {
+ fl = fl_lookup(freq.flr_label);
+ if (fl) {
+ err = fl6_renew(fl, freq.flr_linger, freq.flr_expires);
+ fl_release(fl);
+ return err;
+ }
+ }
+ return -ESRCH;
+
+ case IPV6_FL_A_GET:
+ if (freq.flr_label & ~IPV6_FLOWLABEL_MASK)
+ return -EINVAL;
+
+ fl = fl_create(&freq, optval, optlen, &err);
+ if (fl == NULL)
+ return err;
+ sfl1 = kmalloc(sizeof(*sfl1), GFP_KERNEL);
+
+ if (freq.flr_label) {
+ struct ip6_flowlabel *fl1 = NULL;
+
+ err = -EEXIST;
+ for (sfl = np->ipv6_fl_list; sfl; sfl = sfl->next) {
+ if (sfl->fl->label == freq.flr_label) {
+ if (freq.flr_flags&IPV6_FL_F_EXCL)
+ goto done;
+ fl1 = sfl->fl;
+ atomic_inc(&fl->users);
+ break;
+ }
+ }
+
+ if (fl1 == NULL)
+ fl1 = fl_lookup(freq.flr_label);
+ if (fl1) {
+ err = -EEXIST;
+ if (freq.flr_flags&IPV6_FL_F_EXCL)
+ goto release;
+ err = -EPERM;
+ if (fl1->share == IPV6_FL_S_EXCL ||
+ fl1->share != fl->share ||
+ fl1->owner != fl->owner)
+ goto release;
+
+ err = -EINVAL;
+ if (ipv6_addr_cmp(&fl1->dst, &fl->dst) ||
+ ipv6_opt_cmp(fl1->opt, fl->opt))
+ goto release;
+
+ err = -ENOMEM;
+ if (sfl1 == NULL)
+ goto release;
+ if (fl->linger > fl1->linger)
+ fl1->linger = fl->linger;
+ if ((long)(fl->expires - fl1->expires) > 0)
+ fl1->expires = fl->expires;
+ sfl1->fl = fl1;
+ sfl1->next = np->ipv6_fl_list;
+ np->ipv6_fl_list = sfl1;
+ synchronize_bh();
+ fl_free(fl);
+ return 0;
+
+release:
+ fl_release(fl1);
+ goto done;
+ }
+ }
+ err = -ENOENT;
+ if (!(freq.flr_flags&IPV6_FL_F_CREATE))
+ goto done;
+
+ err = -ENOMEM;
+ if (sfl1 == NULL || (err = mem_check(sk)) != 0)
+ goto done;
+
+ err = fl_intern(fl, freq.flr_label);
+ if (err)
+ goto done;
+
+ /* Do not check for fault */
+ if (!freq.flr_label)
+ copy_to_user(optval + ((u8*)&freq.flr_label - (u8*)&freq), &fl->label, sizeof(fl->label));
+
+ sfl1->fl = fl;
+ sfl1->next = np->ipv6_fl_list;
+ np->ipv6_fl_list = sfl1;
+ return 0;
+
+ default:
+ return -EINVAL;
+ }
+
+done:
+ if (fl)
+ fl_free(fl);
+ if (sfl1)
+ kfree(sfl1);
+ return err;
+}
+
+#ifdef CONFIG_PROC_FS
+
+
+static int ip6_fl_read_proc(char *buffer, char **start, off_t offset,
+ int length, int *eof, void *data)
+{
+ off_t pos=0;
+ off_t begin=0;
+ int len=0;
+ int i, k;
+ struct ip6_flowlabel *fl;
+
+ len+= sprintf(buffer,"Label S Owner Users Linger Expires "
+ "Dst Opt\n");
+
+ fl_lock();
+ for (i=0; i<=FL_HASH_MASK; i++) {
+ for (fl = fl_ht[i]; fl; fl = fl->next) {
+ len+=sprintf(buffer+len,"%05X %-1d %-6d %-6d %-6d %-8ld ",
+ (unsigned)ntohl(fl->label),
+ fl->share,
+ (unsigned)fl->owner,
+ atomic_read(&fl->users),
+ fl->linger/HZ,
+ (long)(fl->expires - jiffies)/HZ);
+
+ for (k=0; k<16; k++)
+ len+=sprintf(buffer+len, "%02x", fl->dst.s6_addr[k]);
+ buffer[len++]=' ';
+ len+=sprintf(buffer+len, "%-4d", fl->opt ? fl->opt->opt_nflen : 0);
+ buffer[len++]='\n';
+
+ pos=begin+len;
+ if(pos<offset) {
+ len=0;
+ begin=pos;
+ }
+ if(pos>offset+length)
+ goto done;
+ }
+ }
+ *eof = 1;
+
+done:
+ fl_unlock();
+ *start=buffer+(offset-begin);
+ len-=(offset-begin);
+ if(len>length)
+ len=length;
+ if(len<0)
+ len=0;
+ return len;
+}
+#endif
+
+
+void ip6_flowlabel_init()
+{
+#ifdef CONFIG_PROC_FS
+ struct proc_dir_entry *ent;
+#endif
+
+ init_timer(&ip6_fl_gc_timer);
+ ip6_fl_gc_timer.function = ip6_fl_gc;
+#ifdef CONFIG_PROC_FS
+ ent = create_proc_entry("net/ip6_flowlabel", 0, 0);
+ ent->read_proc = ip6_fl_read_proc;
+#endif
+}
+
+void ip6_flowlabel_cleanup()
+{
+ del_timer(&ip6_fl_gc_timer);
+#ifdef CONFIG_PROC_FS
+ remove_proc_entry("net/ip6_flowlabel", 0);
+#endif
+}
diff --git a/pfinet/linux-src/net/ipv6/ip6_input.c b/pfinet/linux-src/net/ipv6/ip6_input.c
new file mode 100644
index 00000000..c4a51831
--- /dev/null
+++ b/pfinet/linux-src/net/ipv6/ip6_input.c
@@ -0,0 +1,284 @@
+/*
+ * IPv6 input
+ * Linux INET6 implementation
+ *
+ * Authors:
+ * Pedro Roque <roque@di.fc.ul.pt>
+ * Ian P. Morris <I.P.Morris@soton.ac.uk>
+ *
+ * $Id: ip6_input.c,v 1.1 2007/10/08 21:12:30 stesie Exp $
+ *
+ * Based in linux/net/ipv4/ip_input.c
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version
+ * 2 of the License, or (at your option) any later version.
+ */
+
+#include <linux/errno.h>
+#include <linux/types.h>
+#include <linux/socket.h>
+#include <linux/sockios.h>
+#include <linux/sched.h>
+#include <linux/net.h>
+#include <linux/netdevice.h>
+#include <linux/in6.h>
+#include <linux/icmpv6.h>
+
+#include <net/sock.h>
+#include <net/snmp.h>
+
+#include <net/ipv6.h>
+#include <net/protocol.h>
+#include <net/transp_v6.h>
+#include <net/rawv6.h>
+#include <net/ndisc.h>
+#include <net/ip6_route.h>
+#include <net/addrconf.h>
+
+
+int ipv6_rcv(struct sk_buff *skb, struct device *dev, struct packet_type *pt)
+{
+ struct ipv6hdr *hdr;
+ u32 pkt_len;
+
+ if (skb->pkt_type == PACKET_OTHERHOST)
+ goto drop;
+
+ ipv6_statistics.Ip6InReceives++;
+
+ /* Store incoming device index. When the packet will
+ be queued, we cannot refer to skb->dev anymore.
+ */
+ ((struct inet6_skb_parm *)skb->cb)->iif = dev->ifindex;
+
+ hdr = skb->nh.ipv6h;
+
+ if (skb->len < sizeof(struct ipv6hdr) || hdr->version != 6)
+ goto err;
+
+ pkt_len = ntohs(hdr->payload_len);
+
+ /* pkt_len may be zero if Jumbo payload option is present */
+ if (pkt_len || hdr->nexthdr != NEXTHDR_HOP) {
+ if (pkt_len + sizeof(struct ipv6hdr) > skb->len)
+ goto truncated;
+ skb_trim(skb, pkt_len + sizeof(struct ipv6hdr));
+ }
+
+ if (hdr->nexthdr == NEXTHDR_HOP) {
+ skb->h.raw = (u8*)(hdr+1);
+ if (!ipv6_parse_hopopts(skb, &hdr->nexthdr)) {
+ ipv6_statistics.Ip6InHdrErrors++;
+ return 0;
+ }
+ }
+
+ if (skb->dst == NULL)
+ ip6_route_input(skb);
+
+ return skb->dst->input(skb);
+
+truncated:
+ ipv6_statistics.Ip6InTruncatedPkts++;
+err:
+ ipv6_statistics.Ip6InHdrErrors++;
+drop:
+ kfree_skb(skb);
+ return 0;
+}
+
+/*
+ * 0 - deliver
+ * 1 - block
+ */
+static __inline__ int icmpv6_filter(struct sock *sk, struct sk_buff *skb)
+{
+ struct icmp6hdr *icmph;
+ struct raw6_opt *opt;
+
+ opt = &sk->tp_pinfo.tp_raw;
+ icmph = (struct icmp6hdr *) (skb->nh.ipv6h + 1);
+ return test_bit(icmph->icmp6_type, &opt->filter);
+}
+
+/*
+ * demultiplex raw sockets.
+ * (should consider queueing the skb in the sock receive_queue
+ * without calling rawv6.c)
+ */
+static struct sock * ipv6_raw_deliver(struct sk_buff *skb,
+ int nexthdr, unsigned long len)
+{
+ struct in6_addr *saddr;
+ struct in6_addr *daddr;
+ struct sock *sk, *sk2;
+ __u8 hash;
+
+ saddr = &skb->nh.ipv6h->saddr;
+ daddr = saddr + 1;
+
+ hash = nexthdr & (MAX_INET_PROTOS - 1);
+
+ sk = raw_v6_htable[hash];
+
+ /*
+ * The first socket found will be delivered after
+ * delivery to transport protocols.
+ */
+
+ if (sk == NULL)
+ return NULL;
+
+ sk = raw_v6_lookup(sk, nexthdr, daddr, saddr);
+
+ if (sk) {
+ sk2 = sk;
+
+ while ((sk2 = raw_v6_lookup(sk2->next, nexthdr, daddr, saddr))) {
+ struct sk_buff *buff;
+
+ if (nexthdr == IPPROTO_ICMPV6 &&
+ icmpv6_filter(sk2, skb))
+ continue;
+
+ buff = skb_clone(skb, GFP_ATOMIC);
+ if (buff)
+ rawv6_rcv(sk2, buff, len);
+ }
+ }
+
+ if (sk && nexthdr == IPPROTO_ICMPV6 && icmpv6_filter(sk, skb))
+ sk = NULL;
+
+ return sk;
+}
+
+/*
+ * Deliver the packet to the host
+ */
+
+int ip6_input(struct sk_buff *skb)
+{
+ struct ipv6hdr *hdr = skb->nh.ipv6h;
+ struct inet6_protocol *ipprot;
+ struct sock *raw_sk;
+ __u8 *nhptr;
+ int nexthdr;
+ int found = 0;
+ u8 hash;
+ int len;
+
+ skb->h.raw = skb->nh.raw + sizeof(struct ipv6hdr);
+
+ /*
+ * Parse extension headers
+ */
+
+ nexthdr = hdr->nexthdr;
+ nhptr = &hdr->nexthdr;
+
+ /* Skip hop-by-hop options, they are already parsed. */
+ if (nexthdr == NEXTHDR_HOP) {
+ nhptr = (u8*)(hdr+1);
+ nexthdr = *nhptr;
+ skb->h.raw += (nhptr[1]+1)<<3;
+ }
+
+ /* This check is sort of optimization.
+ It would be stupid to detect for optional headers,
+ which are missing with probability of 200%
+ */
+ if (nexthdr != IPPROTO_TCP && nexthdr != IPPROTO_UDP) {
+ nhptr = ipv6_parse_exthdrs(&skb, nhptr);
+ if (nhptr == NULL)
+ return 0;
+ nexthdr = *nhptr;
+ hdr = skb->nh.ipv6h;
+ }
+ len = skb->tail - skb->h.raw;
+
+ raw_sk = ipv6_raw_deliver(skb, nexthdr, len);
+
+ hash = nexthdr & (MAX_INET_PROTOS - 1);
+ for (ipprot = (struct inet6_protocol *) inet6_protos[hash];
+ ipprot != NULL;
+ ipprot = (struct inet6_protocol *) ipprot->next) {
+ struct sk_buff *buff = skb;
+
+ if (ipprot->protocol != nexthdr)
+ continue;
+
+ if (ipprot->copy || raw_sk)
+ buff = skb_clone(skb, GFP_ATOMIC);
+ /* buff == NULL ?????? */
+ ipprot->handler(buff, len);
+ found = 1;
+ }
+
+ if (raw_sk) {
+ rawv6_rcv(raw_sk, skb, len);
+ found = 1;
+ }
+
+ /*
+ * not found: send ICMP parameter problem back
+ */
+ if (!found) {
+ ipv6_statistics.Ip6InUnknownProtos++;
+ icmpv6_param_prob(skb, ICMPV6_UNK_NEXTHDR, nhptr);
+ }
+
+ return 0;
+}
+
+int ip6_mc_input(struct sk_buff *skb)
+{
+ struct ipv6hdr *hdr;
+ int deliver = 0;
+ int discard = 1;
+
+ ipv6_statistics.Ip6InMcastPkts++;
+
+ hdr = skb->nh.ipv6h;
+ if (ipv6_chk_mcast_addr(skb->dev, &hdr->daddr))
+ deliver = 1;
+
+ /*
+ * IPv6 multicast router mode isn't currently supported.
+ */
+#if 0
+ if (ipv6_config.multicast_route) {
+ int addr_type;
+
+ addr_type = ipv6_addr_type(&hdr->daddr);
+
+ if (!(addr_type & (IPV6_ADDR_LOOPBACK | IPV6_ADDR_LINKLOCAL))) {
+ struct sk_buff *skb2;
+ struct dst_entry *dst;
+
+ dst = skb->dst;
+
+ if (deliver) {
+ skb2 = skb_clone(skb, GFP_ATOMIC);
+ } else {
+ discard = 0;
+ skb2 = skb;
+ }
+
+ dst->output(skb2);
+ }
+ }
+#endif
+
+ if (deliver) {
+ discard = 0;
+ ip6_input(skb);
+ }
+
+ if (discard)
+ kfree_skb(skb);
+
+ return 0;
+}
diff --git a/pfinet/linux-src/net/ipv6/ip6_output.c b/pfinet/linux-src/net/ipv6/ip6_output.c
new file mode 100644
index 00000000..e06ad59a
--- /dev/null
+++ b/pfinet/linux-src/net/ipv6/ip6_output.c
@@ -0,0 +1,720 @@
+/*
+ * IPv6 output functions
+ * Linux INET6 implementation
+ *
+ * Authors:
+ * Pedro Roque <roque@di.fc.ul.pt>
+ *
+ * $Id: ip6_output.c,v 1.1 2007/10/08 21:12:30 stesie Exp $
+ *
+ * Based on linux/net/ipv4/ip_output.c
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version
+ * 2 of the License, or (at your option) any later version.
+ *
+ * Changes:
+ * A.N.Kuznetsov : airthmetics in fragmentation.
+ * extension headers are implemented.
+ * route changes now work.
+ * ip6_forward does not confuse sniffers.
+ * etc.
+ *
+ */
+
+#include <linux/errno.h>
+#include <linux/types.h>
+#include <linux/socket.h>
+#include <linux/net.h>
+#include <linux/netdevice.h>
+#include <linux/if_arp.h>
+#include <linux/in6.h>
+#include <linux/route.h>
+
+#include <net/sock.h>
+#include <net/snmp.h>
+
+#include <net/ipv6.h>
+#include <net/ndisc.h>
+#include <net/protocol.h>
+#include <net/ip6_route.h>
+#include <net/addrconf.h>
+#include <net/rawv6.h>
+#include <net/icmp.h>
+
+static u32 ipv6_fragmentation_id = 1;
+
+int ip6_output(struct sk_buff *skb)
+{
+ struct dst_entry *dst = skb->dst;
+ struct device *dev = dst->dev;
+ struct hh_cache *hh = dst->hh;
+
+ skb->protocol = __constant_htons(ETH_P_IPV6);
+ skb->dev = dev;
+
+ if (ipv6_addr_is_multicast(&skb->nh.ipv6h->daddr)) {
+ if (!(dev->flags&IFF_LOOPBACK) &&
+ (skb->sk == NULL || skb->sk->net_pinfo.af_inet6.mc_loop) &&
+ ipv6_chk_mcast_addr(dev, &skb->nh.ipv6h->daddr)) {
+ /* Do not check for IFF_ALLMULTI; multicast routing
+ is not supported in any case.
+ */
+ dev_loopback_xmit(skb);
+
+ if (skb->nh.ipv6h->hop_limit == 0) {
+ kfree_skb(skb);
+ return 0;
+ }
+ }
+
+ ipv6_statistics.Ip6OutMcastPkts++;
+ }
+
+ if (hh) {
+#ifdef __alpha__
+ /* Alpha has disguisting memcpy. Help it. */
+ u64 *aligned_hdr = (u64*)(skb->data - 16);
+ u64 *aligned_hdr0 = hh->hh_data;
+ read_lock_irq(&hh->hh_lock);
+ aligned_hdr[0] = aligned_hdr0[0];
+ aligned_hdr[1] = aligned_hdr0[1];
+#else
+ read_lock_irq(&hh->hh_lock);
+ memcpy(skb->data - 16, hh->hh_data, 16);
+#endif
+ read_unlock_irq(&hh->hh_lock);
+ skb_push(skb, dev->hard_header_len);
+ return hh->hh_output(skb);
+ } else if (dst->neighbour)
+ return dst->neighbour->output(skb);
+
+ kfree_skb(skb);
+ return -EINVAL;
+}
+
+/*
+ * xmit an sk_buff (used by TCP)
+ */
+
+int ip6_xmit(struct sock *sk, struct sk_buff *skb, struct flowi *fl,
+ struct ipv6_txoptions *opt)
+{
+ struct ipv6_pinfo * np = sk ? &sk->net_pinfo.af_inet6 : NULL;
+ struct in6_addr *first_hop = fl->nl_u.ip6_u.daddr;
+ struct dst_entry *dst = skb->dst;
+ struct ipv6hdr *hdr;
+ u8 proto = fl->proto;
+ int seg_len = skb->len;
+ int hlimit;
+
+ if (opt) {
+ int head_room;
+
+ /* First: exthdrs may take lots of space (~8K for now)
+ MAX_HEADER is not enough.
+ */
+ head_room = opt->opt_nflen + opt->opt_flen;
+ seg_len += head_room;
+ head_room += sizeof(struct ipv6hdr) + ((dst->dev->hard_header_len + 15)&~15);
+
+ if (skb_headroom(skb) < head_room) {
+ struct sk_buff *skb2 = skb_realloc_headroom(skb, head_room);
+ kfree(skb);
+ skb = skb2;
+ if (skb == NULL)
+ return -ENOBUFS;
+ if (sk)
+ skb_set_owner_w(skb, sk);
+ }
+ if (opt->opt_flen)
+ ipv6_push_frag_opts(skb, opt, &proto);
+ if (opt->opt_nflen)
+ ipv6_push_nfrag_opts(skb, opt, &proto, &first_hop);
+ }
+
+ hdr = skb->nh.ipv6h = (struct ipv6hdr*)skb_push(skb, sizeof(struct ipv6hdr));
+
+ /*
+ * Fill in the IPv6 header
+ */
+
+ *(u32*)hdr = __constant_htonl(0x60000000) | fl->fl6_flowlabel;
+ hlimit = -1;
+ if (np)
+ hlimit = np->hop_limit;
+ if (hlimit < 0)
+ hlimit = ((struct rt6_info*)dst)->rt6i_hoplimit;
+
+ hdr->payload_len = htons(seg_len);
+ hdr->nexthdr = proto;
+ hdr->hop_limit = hlimit;
+
+ ipv6_addr_copy(&hdr->saddr, fl->nl_u.ip6_u.saddr);
+ ipv6_addr_copy(&hdr->daddr, first_hop);
+
+ if (skb->len <= dst->pmtu) {
+ ipv6_statistics.Ip6OutRequests++;
+ dst->output(skb);
+ return 0;
+ }
+
+ printk(KERN_DEBUG "IPv6: sending pkt_too_big to self\n");
+ start_bh_atomic();
+ icmpv6_send(skb, ICMPV6_PKT_TOOBIG, 0, dst->pmtu, skb->dev);
+ end_bh_atomic();
+ kfree_skb(skb);
+ return -EMSGSIZE;
+}
+
+/*
+ * To avoid extra problems ND packets are send through this
+ * routine. It's code duplication but I really want to avoid
+ * extra checks since ipv6_build_header is used by TCP (which
+ * is for us performace critical)
+ */
+
+int ip6_nd_hdr(struct sock *sk, struct sk_buff *skb, struct device *dev,
+ struct in6_addr *saddr, struct in6_addr *daddr,
+ int proto, int len)
+{
+ struct ipv6_pinfo *np = &sk->net_pinfo.af_inet6;
+ struct ipv6hdr *hdr;
+ int totlen;
+
+ skb->protocol = __constant_htons(ETH_P_IPV6);
+ skb->dev = dev;
+
+ totlen = len + sizeof(struct ipv6hdr);
+
+ hdr = (struct ipv6hdr *) skb_put(skb, sizeof(struct ipv6hdr));
+ skb->nh.ipv6h = hdr;
+
+ *(u32*)hdr = htonl(0x60000000);
+
+ hdr->payload_len = htons(len);
+ hdr->nexthdr = proto;
+ hdr->hop_limit = np->hop_limit;
+
+ ipv6_addr_copy(&hdr->saddr, saddr);
+ ipv6_addr_copy(&hdr->daddr, daddr);
+
+ return 0;
+}
+
+static struct ipv6hdr * ip6_bld_1(struct sock *sk, struct sk_buff *skb, struct flowi *fl,
+ int hlimit, unsigned pktlength)
+{
+ struct ipv6hdr *hdr;
+
+ skb->nh.raw = skb_put(skb, sizeof(struct ipv6hdr));
+ hdr = skb->nh.ipv6h;
+
+ *(u32*)hdr = fl->fl6_flowlabel | htonl(0x60000000);
+
+ hdr->payload_len = htons(pktlength - sizeof(struct ipv6hdr));
+ hdr->hop_limit = hlimit;
+ hdr->nexthdr = fl->proto;
+
+ ipv6_addr_copy(&hdr->saddr, fl->nl_u.ip6_u.saddr);
+ ipv6_addr_copy(&hdr->daddr, fl->nl_u.ip6_u.daddr);
+ return hdr;
+}
+
+static __inline__ u8 * ipv6_build_fraghdr(struct sk_buff *skb, u8* prev_hdr, unsigned offset)
+{
+ struct frag_hdr *fhdr;
+
+ fhdr = (struct frag_hdr *) skb_put(skb, sizeof(struct frag_hdr));
+
+ fhdr->nexthdr = *prev_hdr;
+ *prev_hdr = NEXTHDR_FRAGMENT;
+ prev_hdr = &fhdr->nexthdr;
+
+ fhdr->reserved = 0;
+ fhdr->frag_off = htons(offset);
+ fhdr->identification = ipv6_fragmentation_id++;
+ return &fhdr->nexthdr;
+}
+
+static int ip6_frag_xmit(struct sock *sk, inet_getfrag_t getfrag,
+ const void *data, struct dst_entry *dst,
+ struct flowi *fl, struct ipv6_txoptions *opt,
+ struct in6_addr *final_dst,
+ int hlimit, int flags, unsigned length, int mtu)
+{
+ struct ipv6hdr *hdr;
+ struct sk_buff *last_skb;
+ u8 *prev_hdr;
+ int unfrag_len;
+ int frag_len;
+ int last_len;
+ int nfrags;
+ int fhdr_dist;
+ int frag_off;
+ int data_off;
+ int err;
+
+ /*
+ * Fragmentation
+ *
+ * Extension header order:
+ * Hop-by-hop -> Dest0 -> Routing -> Fragment -> Auth -> Dest1 -> rest (...)
+ *
+ * We must build the non-fragmented part that
+ * will be in every packet... this also means
+ * that other extension headers (Dest, Auth, etc)
+ * must be considered in the data to be fragmented
+ */
+
+ unfrag_len = sizeof(struct ipv6hdr) + sizeof(struct frag_hdr);
+ last_len = length;
+
+ if (opt) {
+ unfrag_len += opt->opt_nflen;
+ last_len += opt->opt_flen;
+ }
+
+ /*
+ * Length of fragmented part on every packet but
+ * the last must be an:
+ * "integer multiple of 8 octects".
+ */
+
+ frag_len = (mtu - unfrag_len) & ~0x7;
+
+ /* Unfragmentable part exceeds mtu. */
+ if (frag_len <= 0) {
+ ipv6_local_error(sk, EMSGSIZE, fl, mtu);
+ return -EMSGSIZE;
+ }
+
+ nfrags = last_len / frag_len;
+
+ /*
+ * We must send from end to start because of
+ * UDP/ICMP checksums. We do a funny trick:
+ * fill the last skb first with the fixed
+ * header (and its data) and then use it
+ * to create the following segments and send it
+ * in the end. If the peer is checking the M_flag
+ * to trigger the reassembly code then this
+ * might be a good idea.
+ */
+
+ frag_off = nfrags * frag_len;
+ last_len -= frag_off;
+
+ if (last_len == 0) {
+ last_len = frag_len;
+ frag_off -= frag_len;
+ nfrags--;
+ }
+ data_off = frag_off;
+
+ /* And it is implementation problem: for now we assume, that
+ all the exthdrs will fit to the first fragment.
+ */
+ if (opt) {
+ if (frag_len < opt->opt_flen) {
+ ipv6_local_error(sk, EMSGSIZE, fl, mtu);
+ return -EMSGSIZE;
+ }
+ data_off = frag_off - opt->opt_flen;
+ }
+
+ last_skb = sock_alloc_send_skb(sk, unfrag_len + frag_len +
+ dst->dev->hard_header_len + 15,
+ 0, flags & MSG_DONTWAIT, &err);
+
+ if (last_skb == NULL)
+ return err;
+
+ last_skb->dst = dst_clone(dst);
+
+ skb_reserve(last_skb, (dst->dev->hard_header_len + 15) & ~15);
+
+ hdr = ip6_bld_1(sk, last_skb, fl, hlimit, frag_len+unfrag_len);
+ prev_hdr = &hdr->nexthdr;
+
+ if (opt && opt->opt_nflen)
+ prev_hdr = ipv6_build_nfrag_opts(last_skb, prev_hdr, opt, final_dst, 0);
+
+ prev_hdr = ipv6_build_fraghdr(last_skb, prev_hdr, frag_off);
+ fhdr_dist = prev_hdr - last_skb->data;
+
+ err = getfrag(data, &hdr->saddr, last_skb->tail, data_off, last_len);
+
+ if (!err) {
+ while (nfrags--) {
+ struct sk_buff *skb;
+
+ struct frag_hdr *fhdr2;
+
+ skb = skb_copy(last_skb, sk->allocation);
+
+ if (skb == NULL) {
+ ipv6_statistics.Ip6FragFails++;
+ kfree_skb(last_skb);
+ return -ENOMEM;
+ }
+
+ frag_off -= frag_len;
+ data_off -= frag_len;
+
+ fhdr2 = (struct frag_hdr *) (skb->data + fhdr_dist);
+
+ /* more flag on */
+ fhdr2->frag_off = htons(frag_off | 1);
+
+ /* Write fragmentable exthdrs to the first chunk */
+ if (nfrags == 0 && opt && opt->opt_flen) {
+ ipv6_build_frag_opts(skb, &fhdr2->nexthdr, opt);
+ frag_len -= opt->opt_flen;
+ data_off = 0;
+ }
+
+ err = getfrag(data, &hdr->saddr,skb_put(skb, frag_len),
+ data_off, frag_len);
+
+ if (err) {
+ kfree_skb(skb);
+ break;
+ }
+
+ ipv6_statistics.Ip6FragCreates++;
+ ipv6_statistics.Ip6OutRequests++;
+ dst->output(skb);
+ }
+ }
+
+ if (err) {
+ ipv6_statistics.Ip6FragFails++;
+ kfree_skb(last_skb);
+ return -EFAULT;
+ }
+
+ hdr->payload_len = htons(unfrag_len + last_len - sizeof(struct ipv6hdr));
+
+ /*
+ * update last_skb to reflect the getfrag we did
+ * on start.
+ */
+
+ skb_put(last_skb, last_len);
+
+ ipv6_statistics.Ip6FragCreates++;
+ ipv6_statistics.Ip6FragOKs++;
+ ipv6_statistics.Ip6OutRequests++;
+ dst->output(last_skb);
+
+ return 0;
+}
+
+int ip6_build_xmit(struct sock *sk, inet_getfrag_t getfrag, const void *data,
+ struct flowi *fl, unsigned length,
+ struct ipv6_txoptions *opt, int hlimit, int flags)
+{
+ struct ipv6_pinfo *np = &sk->net_pinfo.af_inet6;
+ struct in6_addr *final_dst = NULL;
+ struct dst_entry *dst;
+ int err = 0;
+ unsigned int pktlength, jumbolen, mtu;
+ struct in6_addr saddr;
+
+ if (opt && opt->srcrt) {
+ struct rt0_hdr *rt0 = (struct rt0_hdr *) opt->srcrt;
+ final_dst = fl->fl6_dst;
+ fl->fl6_dst = rt0->addr;
+ }
+
+ if (!fl->oif && ipv6_addr_is_multicast(fl->nl_u.ip6_u.daddr))
+ fl->oif = np->mcast_oif;
+
+ dst = NULL;
+ if (sk->dst_cache) {
+ dst = dst_check(&sk->dst_cache, np->dst_cookie);
+ if (dst) {
+ struct rt6_info *rt = (struct rt6_info*)dst_clone(dst);
+
+ /* Yes, checking route validity in not connected
+ case is not very simple. Take into account,
+ that we do not support routing by source, TOS,
+ and MSG_DONTROUTE --ANK (980726)
+
+ 1. If route was host route, check that
+ cached destination is current.
+ If it is network route, we still may
+ check its validity using saved pointer
+ to the last used address: daddr_cache.
+ We do not want to save whole address now,
+ (because main consumer of this service
+ is tcp, which has not this problem),
+ so that the last trick works only on connected
+ sockets.
+ 2. oif also should be the same.
+ */
+ if (((rt->rt6i_dst.plen != 128 ||
+ ipv6_addr_cmp(fl->fl6_dst, &rt->rt6i_dst.addr))
+ && (np->daddr_cache == NULL ||
+ ipv6_addr_cmp(fl->fl6_dst, np->daddr_cache)))
+ || (fl->oif && fl->oif != dst->dev->ifindex)) {
+ dst_release(dst);
+ dst = NULL;
+ }
+ }
+ }
+
+ if (dst == NULL)
+ dst = ip6_route_output(sk, fl);
+
+ if (dst->error) {
+ ipv6_statistics.Ip6OutNoRoutes++;
+ dst_release(dst);
+ return -ENETUNREACH;
+ }
+
+ if (fl->fl6_src == NULL) {
+ err = ipv6_get_saddr(dst, fl->fl6_dst, &saddr);
+
+ if (err) {
+#if IP6_DEBUG >= 2
+ printk(KERN_DEBUG "ip6_build_xmit: "
+ "no available source address\n");
+#endif
+ goto out;
+ }
+ fl->fl6_src = &saddr;
+ }
+ pktlength = length;
+
+ if (hlimit < 0) {
+ if (ipv6_addr_is_multicast(fl->fl6_dst))
+ hlimit = np->mcast_hops;
+ else
+ hlimit = np->hop_limit;
+ if (hlimit < 0)
+ hlimit = ((struct rt6_info*)dst)->rt6i_hoplimit;
+ }
+
+ jumbolen = 0;
+
+ if (!sk->ip_hdrincl) {
+ pktlength += sizeof(struct ipv6hdr);
+ if (opt)
+ pktlength += opt->opt_flen + opt->opt_nflen;
+
+ if (pktlength > 0xFFFF + sizeof(struct ipv6hdr)) {
+ /* Jumbo datagram.
+ It is assumed, that in the case of sk->ip_hdrincl
+ jumbo option is supplied by user.
+ */
+ pktlength += 8;
+ jumbolen = pktlength - sizeof(struct ipv6hdr);
+ }
+ }
+
+ mtu = dst->pmtu;
+ if (np->frag_size < mtu) {
+ if (np->frag_size)
+ mtu = np->frag_size;
+ else if (np->pmtudisc == IPV6_PMTUDISC_DONT)
+ mtu = IPV6_MIN_MTU;
+ }
+
+ /* Critical arithmetic overflow check.
+ FIXME: may gcc optimize it out? --ANK (980726)
+ */
+ if (pktlength < length) {
+ ipv6_local_error(sk, EMSGSIZE, fl, mtu);
+ err = -EMSGSIZE;
+ goto out;
+ }
+
+ if (pktlength <= mtu) {
+ struct sk_buff *skb;
+ struct ipv6hdr *hdr;
+ struct device *dev = dst->dev;
+
+ skb = sock_alloc_send_skb(sk, pktlength + 15 +
+ dev->hard_header_len, 0,
+ flags & MSG_DONTWAIT, &err);
+
+ if (skb == NULL) {
+ ipv6_statistics.Ip6OutDiscards++;
+ goto out;
+ }
+
+ skb->dst = dst_clone(dst);
+
+ skb_reserve(skb, (dev->hard_header_len + 15) & ~15);
+
+ hdr = (struct ipv6hdr *) skb->tail;
+ skb->nh.ipv6h = hdr;
+
+ if (!sk->ip_hdrincl) {
+ ip6_bld_1(sk, skb, fl, hlimit,
+ jumbolen ? sizeof(struct ipv6hdr) : pktlength);
+
+ if (opt || jumbolen) {
+ u8 *prev_hdr = &hdr->nexthdr;
+ prev_hdr = ipv6_build_nfrag_opts(skb, prev_hdr, opt, final_dst, jumbolen);
+ if (opt && opt->opt_flen)
+ ipv6_build_frag_opts(skb, prev_hdr, opt);
+ }
+ }
+
+ skb_put(skb, length);
+ err = getfrag(data, &hdr->saddr,
+ ((char *) hdr) + (pktlength - length),
+ 0, length);
+
+ if (!err) {
+ ipv6_statistics.Ip6OutRequests++;
+ dst->output(skb);
+ } else {
+ err = -EFAULT;
+ kfree_skb(skb);
+ }
+ } else {
+ if (sk->ip_hdrincl || jumbolen ||
+ np->pmtudisc == IPV6_PMTUDISC_DO) {
+ ipv6_local_error(sk, EMSGSIZE, fl, mtu);
+ err = -EMSGSIZE;
+ goto out;
+ }
+
+ err = ip6_frag_xmit(sk, getfrag, data, dst, fl, opt, final_dst, hlimit,
+ flags, length, mtu);
+ }
+
+ /*
+ * cleanup
+ */
+out:
+ ip6_dst_store(sk, dst, fl->nl_u.ip6_u.daddr == &np->daddr ? &np->daddr : NULL);
+ return err;
+}
+
+int ip6_call_ra_chain(struct sk_buff *skb, int sel)
+{
+ struct ip6_ra_chain *ra;
+ struct sock *last = NULL;
+
+ for (ra = ip6_ra_chain; ra; ra = ra->next) {
+ struct sock *sk = ra->sk;
+ if (sk && ra->sel == sel) {
+ if (last) {
+ struct sk_buff *skb2 = skb_clone(skb, GFP_ATOMIC);
+ if (skb2)
+ rawv6_rcv(last, skb2, skb2->len);
+ }
+ last = sk;
+ }
+ }
+
+ if (last) {
+ rawv6_rcv(last, skb, skb->len);
+ return 1;
+ }
+ return 0;
+}
+
+int ip6_forward(struct sk_buff *skb)
+{
+ struct dst_entry *dst = skb->dst;
+ struct ipv6hdr *hdr = skb->nh.ipv6h;
+ struct inet6_skb_parm *opt =(struct inet6_skb_parm*)skb->cb;
+
+ if (ipv6_devconf.forwarding == 0 && opt->srcrt == 0)
+ goto drop;
+
+ /*
+ * We DO NOT make any processing on
+ * RA packets, pushing them to user level AS IS
+ * without ane WARRANTY that application will be able
+ * to interpret them. The reason is that we
+ * cannot make anything clever here.
+ *
+ * We are not end-node, so that if packet contains
+ * AH/ESP, we cannot make anything.
+ * Defragmentation also would be mistake, RA packets
+ * cannot be fragmented, because there is no warranty
+ * that different fragments will go along one path. --ANK
+ */
+ if (opt->ra) {
+ u8 *ptr = skb->nh.raw + opt->ra;
+ if (ip6_call_ra_chain(skb, (ptr[2]<<8) + ptr[3]))
+ return 0;
+ }
+
+ /*
+ * check and decrement ttl
+ */
+ if (hdr->hop_limit <= 1) {
+ /* Force OUTPUT device used as source address */
+ skb->dev = dst->dev;
+ icmpv6_send(skb, ICMPV6_TIME_EXCEED, ICMPV6_EXC_HOPLIMIT,
+ 0, skb->dev);
+
+ kfree_skb(skb);
+ return -ETIMEDOUT;
+ }
+
+ /* IPv6 specs say nothing about it, but it is clear that we cannot
+ send redirects to source routed frames.
+ */
+ if (skb->dev == dst->dev && dst->neighbour && opt->srcrt == 0) {
+ struct in6_addr *target = NULL;
+ struct rt6_info *rt;
+ struct neighbour *n = dst->neighbour;
+
+ /*
+ * incoming and outgoing devices are the same
+ * send a redirect.
+ */
+
+ rt = (struct rt6_info *) dst;
+ if ((rt->rt6i_flags & RTF_GATEWAY))
+ target = (struct in6_addr*)&n->primary_key;
+ else
+ target = &hdr->daddr;
+
+ /* Limit redirects both by destination (here)
+ and by source (inside ndisc_send_redirect)
+ */
+ if (xrlim_allow(dst, 1*HZ))
+ ndisc_send_redirect(skb, n, target);
+ } else if (ipv6_addr_type(&hdr->saddr)&(IPV6_ADDR_MULTICAST|IPV6_ADDR_LOOPBACK
+ |IPV6_ADDR_LINKLOCAL)) {
+ /* This check is security critical. */
+ goto drop;
+ }
+
+ if (skb->len > dst->pmtu) {
+ /* Again, force OUTPUT device used as source address */
+ skb->dev = dst->dev;
+ icmpv6_send(skb, ICMPV6_PKT_TOOBIG, 0, dst->pmtu, skb->dev);
+ ipv6_statistics.Ip6InTooBigErrors++;
+ kfree_skb(skb);
+ return -EMSGSIZE;
+ }
+
+ if ((skb = skb_cow(skb, dst->dev->hard_header_len)) == NULL)
+ return 0;
+
+ hdr = skb->nh.ipv6h;
+
+ /* Mangling hops number delayed to point after skb COW */
+
+ hdr->hop_limit--;
+
+ ipv6_statistics.Ip6OutForwDatagrams++;
+ return dst->output(skb);
+
+drop:
+ ipv6_statistics.Ip6InAddrErrors++;
+ kfree_skb(skb);
+ return -EINVAL;
+}
diff --git a/pfinet/linux-src/net/ipv6/ipv6_sockglue.c b/pfinet/linux-src/net/ipv6/ipv6_sockglue.c
new file mode 100644
index 00000000..6a48d1be
--- /dev/null
+++ b/pfinet/linux-src/net/ipv6/ipv6_sockglue.c
@@ -0,0 +1,439 @@
+/*
+ * IPv6 BSD socket options interface
+ * Linux INET6 implementation
+ *
+ * Authors:
+ * Pedro Roque <roque@di.fc.ul.pt>
+ *
+ * Based on linux/net/ipv4/ip_sockglue.c
+ *
+ * $Id: ipv6_sockglue.c,v 1.1 2007/10/08 21:12:30 stesie Exp $
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version
+ * 2 of the License, or (at your option) any later version.
+ *
+ * FIXME: Make the setsockopt code POSIX compliant: That is
+ *
+ * o Return -EINVAL for setsockopt of short lengths
+ * o Truncate getsockopt returns
+ * o Return an optlen of the truncated length if need be
+ */
+
+#include <linux/config.h>
+#include <linux/errno.h>
+#include <linux/types.h>
+#include <linux/socket.h>
+#include <linux/sockios.h>
+#include <linux/sched.h>
+#include <linux/net.h>
+#include <linux/in6.h>
+#include <linux/netdevice.h>
+#include <linux/if_arp.h>
+#include <linux/init.h>
+#include <linux/sysctl.h>
+
+#include <net/sock.h>
+#include <net/snmp.h>
+#include <net/ipv6.h>
+#include <net/ndisc.h>
+#include <net/protocol.h>
+#include <net/transp_v6.h>
+#include <net/ip6_route.h>
+#include <net/addrconf.h>
+#include <net/inet_common.h>
+#include <net/tcp.h>
+#include <net/udp.h>
+
+#include <asm/uaccess.h>
+
+struct ipv6_mib ipv6_statistics={0, };
+struct packet_type ipv6_packet_type =
+{
+ __constant_htons(ETH_P_IPV6),
+ NULL, /* All devices */
+ ipv6_rcv,
+ NULL,
+ NULL
+};
+
+/*
+ * addrconf module should be notifyed of a device going up
+ */
+static struct notifier_block ipv6_dev_notf = {
+ addrconf_notify,
+ NULL,
+ 0
+};
+
+struct ip6_ra_chain *ip6_ra_chain;
+
+int ip6_ra_control(struct sock *sk, int sel, void (*destructor)(struct sock *))
+{
+ struct ip6_ra_chain *ra, *new_ra, **rap;
+
+ /* RA packet may be delivered ONLY to IPPROTO_RAW socket */
+ if (sk->type != SOCK_RAW || sk->num != IPPROTO_RAW)
+ return -EINVAL;
+
+ new_ra = (sel>=0) ? kmalloc(sizeof(*new_ra), GFP_KERNEL) : NULL;
+
+ for (rap = &ip6_ra_chain; (ra=*rap) != NULL; rap = &ra->next) {
+ if (ra->sk == sk) {
+ if (sel>=0) {
+ if (new_ra)
+ kfree(new_ra);
+ return -EADDRINUSE;
+ }
+
+ *rap = ra->next;
+ synchronize_bh();
+
+ if (ra->destructor)
+ ra->destructor(sk);
+ kfree(ra);
+ return 0;
+ }
+ }
+ if (new_ra == NULL)
+ return -ENOBUFS;
+ new_ra->sk = sk;
+ new_ra->sel = sel;
+ new_ra->destructor = destructor;
+ start_bh_atomic();
+ new_ra->next = ra;
+ *rap = new_ra;
+ end_bh_atomic();
+ return 0;
+}
+
+
+int ipv6_setsockopt(struct sock *sk, int level, int optname, char *optval,
+ int optlen)
+{
+ struct ipv6_pinfo *np = &sk->net_pinfo.af_inet6;
+ int val, valbool;
+ int retv = -ENOPROTOOPT;
+
+ if(level==SOL_IP && sk->type != SOCK_RAW)
+ return udp_prot.setsockopt(sk, level, optname, optval, optlen);
+
+ if(level!=SOL_IPV6)
+ goto out;
+
+ if (optval == NULL)
+ val=0;
+ else if (get_user(val, (int *) optval))
+ return -EFAULT;
+
+ valbool = (val!=0);
+
+ switch (optname) {
+
+ case IPV6_ADDRFORM:
+ if (val == PF_INET) {
+ struct ipv6_txoptions *opt;
+ struct sk_buff *pktopt;
+
+ if (sk->protocol != IPPROTO_UDP &&
+ sk->protocol != IPPROTO_TCP)
+ goto out;
+
+ lock_sock(sk);
+ if (sk->state != TCP_ESTABLISHED) {
+ retv = ENOTCONN;
+ goto addrform_done;
+ }
+
+ if (!(ipv6_addr_type(&np->daddr) & IPV6_ADDR_MAPPED)) {
+ retv = -EADDRNOTAVAIL;
+ goto addrform_done;
+ }
+
+ fl6_free_socklist(sk);
+ ipv6_sock_mc_close(sk);
+
+ if (sk->protocol == IPPROTO_TCP) {
+ struct tcp_opt *tp = &(sk->tp_pinfo.af_tcp);
+
+ sk->prot = &tcp_prot;
+ tp->af_specific = &ipv4_specific;
+ sk->socket->ops = &inet_stream_ops;
+ sk->family = PF_INET;
+ tcp_sync_mss(sk, tp->pmtu_cookie);
+ } else {
+ sk->prot = &udp_prot;
+ sk->socket->ops = &inet_dgram_ops;
+ }
+ opt = xchg(&np->opt, NULL);
+ if (opt)
+ sock_kfree_s(sk, opt, opt->tot_len);
+ pktopt = xchg(&np->pktoptions, NULL);
+ if (pktopt)
+ kfree_skb(pktopt);
+ retv = 0;
+
+addrform_done:
+ release_sock(sk);
+ } else {
+ retv = -EINVAL;
+ }
+ break;
+
+ case IPV6_PKTINFO:
+ np->rxopt.bits.rxinfo = valbool;
+ retv = 0;
+ break;
+
+ case IPV6_HOPLIMIT:
+ np->rxopt.bits.rxhlim = valbool;
+ retv = 0;
+ break;
+
+ case IPV6_RTHDR:
+ retv = -EINVAL;
+ if (val >= 0 && val <= 2) {
+ np->rxopt.bits.srcrt = val;
+ retv = 0;
+ }
+ break;
+
+ case IPV6_HOPOPTS:
+ np->rxopt.bits.hopopts = valbool;
+ retv = 0;
+ break;
+
+ case IPV6_AUTHHDR:
+ np->rxopt.bits.authhdr = valbool;
+ retv = 0;
+ break;
+
+ case IPV6_DSTOPTS:
+ np->rxopt.bits.dstopts = valbool;
+ retv = 0;
+ break;
+
+ case IPV6_FLOWINFO:
+ np->rxopt.bits.rxflow = valbool;
+ return 0;
+
+ case IPV6_PKTOPTIONS:
+ {
+ struct ipv6_txoptions *opt = NULL;
+ struct msghdr msg;
+ struct flowi fl;
+ int junk;
+
+ fl.fl6_flowlabel = 0;
+ fl.oif = sk->bound_dev_if;
+
+ if (optlen == 0)
+ goto update;
+
+ opt = sock_kmalloc(sk, sizeof(*opt) + optlen, GFP_KERNEL);
+ retv = -ENOBUFS;
+ if (opt == NULL)
+ break;
+
+ memset(opt, 0, sizeof(*opt));
+ opt->tot_len = sizeof(*opt) + optlen;
+ retv = -EFAULT;
+ if (copy_from_user(opt+1, optval, optlen))
+ goto done;
+
+ msg.msg_controllen = optlen;
+ msg.msg_control = (void*)(opt+1);
+
+ retv = datagram_send_ctl(&msg, &fl, opt, &junk);
+ if (retv)
+ goto done;
+update:
+ retv = 0;
+ start_bh_atomic();
+ if (opt && sk->type == SOCK_STREAM) {
+ struct tcp_opt *tp = &sk->tp_pinfo.af_tcp;
+ if ((tcp_connected(sk->state) || sk->state == TCP_SYN_SENT)
+ && sk->daddr != LOOPBACK4_IPV6) {
+ tp->ext_header_len = opt->opt_flen + opt->opt_nflen;
+ tcp_sync_mss(sk, tp->pmtu_cookie);
+ }
+ }
+ opt = xchg(&np->opt, opt);
+ dst_release(xchg(&sk->dst_cache, NULL));
+ end_bh_atomic();
+
+done:
+ if (opt)
+ sock_kfree_s(sk, opt, opt->tot_len);
+ break;
+ }
+ case IPV6_UNICAST_HOPS:
+ if (val > 255 || val < -1)
+ retv = -EINVAL;
+ else {
+ np->hop_limit = val;
+ retv = 0;
+ }
+ break;
+
+ case IPV6_MULTICAST_HOPS:
+ if (val > 255 || val < -1)
+ retv = -EINVAL;
+ else {
+ np->mcast_hops = val;
+ retv = 0;
+ }
+ break;
+
+ case IPV6_MULTICAST_LOOP:
+ np->mc_loop = valbool;
+ retv = 0;
+ break;
+
+ case IPV6_MULTICAST_IF:
+ if (sk->bound_dev_if && sk->bound_dev_if != val) {
+ retv = -EINVAL;
+ break;
+ }
+ if (dev_get_by_index(val) == NULL) {
+ retv = -ENODEV;
+ break;
+ }
+ np->mcast_oif = val;
+ retv = 0;
+ break;
+ case IPV6_ADD_MEMBERSHIP:
+ case IPV6_DROP_MEMBERSHIP:
+ {
+ struct ipv6_mreq mreq;
+
+ if (copy_from_user(&mreq, optval, sizeof(struct ipv6_mreq)))
+ return -EFAULT;
+
+ if (optname == IPV6_ADD_MEMBERSHIP)
+ retv = ipv6_sock_mc_join(sk, mreq.ipv6mr_ifindex, &mreq.ipv6mr_multiaddr);
+ else
+ retv = ipv6_sock_mc_drop(sk, mreq.ipv6mr_ifindex, &mreq.ipv6mr_multiaddr);
+ break;
+ }
+ case IPV6_ROUTER_ALERT:
+ retv = ip6_ra_control(sk, val, NULL);
+ break;
+ case IPV6_MTU_DISCOVER:
+ if (val<0 || val>2)
+ return -EINVAL;
+ np->pmtudisc = val;
+ return 0;
+ case IPV6_MTU:
+ if (val && val < IPV6_MIN_MTU)
+ return -EINVAL;
+ np->frag_size = val;
+ return 0;
+ case IPV6_RECVERR:
+ np->recverr = valbool;
+ if (!val)
+ skb_queue_purge(&sk->error_queue);
+ return 0;
+ case IPV6_FLOWINFO_SEND:
+ np->sndflow = valbool;
+ return 0;
+ case IPV6_FLOWLABEL_MGR:
+ return ipv6_flowlabel_opt(sk, optval, optlen);
+ };
+
+out:
+ return retv;
+}
+
+int ipv6_getsockopt(struct sock *sk, int level, int optname, char *optval,
+ int *optlen)
+{
+ struct ipv6_pinfo *np = &sk->net_pinfo.af_inet6;
+ int len;
+ int val;
+
+ if(level==SOL_IP && sk->type != SOCK_RAW)
+ return udp_prot.getsockopt(sk, level, optname, optval, optlen);
+ if(level!=SOL_IPV6)
+ return -ENOPROTOOPT;
+ if (get_user(len, optlen))
+ return -EFAULT;
+ switch (optname) {
+ case IPV6_PKTOPTIONS:
+ {
+ struct msghdr msg;
+ struct sk_buff *skb;
+
+ start_bh_atomic();
+ skb = np->pktoptions;
+ if (skb)
+ atomic_inc(&skb->users);
+ end_bh_atomic();
+
+ if (skb) {
+ int err;
+
+ msg.msg_control = optval;
+ msg.msg_controllen = len;
+ msg.msg_flags = 0;
+ err = datagram_recv_ctl(sk, &msg, skb);
+ kfree_skb(skb);
+ if (err)
+ return err;
+ len -= msg.msg_controllen;
+ } else
+ len = 0;
+ return put_user(len, optlen);
+ }
+ case IP_MTU:
+ val = 0;
+ lock_sock(sk);
+ if (sk->dst_cache)
+ val = sk->dst_cache->pmtu;
+ release_sock(sk);
+ if (!val)
+ return -ENOTCONN;
+ break;
+ default:
+ return -EINVAL;
+ }
+ len=min(sizeof(int),len);
+ if(put_user(len, optlen))
+ return -EFAULT;
+ if(copy_to_user(optval,&val,len))
+ return -EFAULT;
+ return 0;
+}
+
+#if defined(MODULE) && defined(CONFIG_SYSCTL)
+
+/*
+ * sysctl registration functions defined in sysctl_net_ipv6.c
+ */
+
+extern void ipv6_sysctl_register(void);
+extern void ipv6_sysctl_unregister(void);
+#endif
+
+__initfunc(void ipv6_packet_init(void))
+{
+ dev_add_pack(&ipv6_packet_type);
+}
+
+__initfunc(void ipv6_netdev_notif_init(void))
+{
+ register_netdevice_notifier(&ipv6_dev_notf);
+}
+
+#ifdef MODULE
+void ipv6_packet_cleanup(void)
+{
+ dev_remove_pack(&ipv6_packet_type);
+}
+
+void ipv6_netdev_notif_cleanup(void)
+{
+ unregister_netdevice_notifier(&ipv6_dev_notf);
+}
+#endif
diff --git a/pfinet/linux-src/net/ipv6/mcast.c b/pfinet/linux-src/net/ipv6/mcast.c
new file mode 100644
index 00000000..87e9e909
--- /dev/null
+++ b/pfinet/linux-src/net/ipv6/mcast.c
@@ -0,0 +1,711 @@
+/*
+ * Multicast support for IPv6
+ * Linux INET6 implementation
+ *
+ * Authors:
+ * Pedro Roque <roque@di.fc.ul.pt>
+ *
+ * $Id: mcast.c,v 1.2 2007/10/08 21:59:10 stesie Exp $
+ *
+ * Based on linux/ipv4/igmp.c and linux/ipv4/ip_sockglue.c
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version
+ * 2 of the License, or (at your option) any later version.
+ */
+
+#define __NO_VERSION__
+#include <linux/config.h>
+#include <linux/module.h>
+#include <linux/errno.h>
+#include <linux/types.h>
+#include <linux/socket.h>
+#include <linux/sockios.h>
+#include <linux/sched.h>
+#include <linux/net.h>
+#include <linux/in6.h>
+#include <linux/netdevice.h>
+#include <linux/if_arp.h>
+#include <linux/route.h>
+#include <linux/init.h>
+#include <linux/proc_fs.h>
+
+#include <net/sock.h>
+#include <net/snmp.h>
+
+#include <net/ipv6.h>
+#include <net/protocol.h>
+#include <net/if_inet6.h>
+#include <net/ndisc.h>
+#include <net/addrconf.h>
+#include <net/ip6_route.h>
+
+#include <net/checksum.h>
+
+/* Set to 3 to get tracing... */
+#define MCAST_DEBUG 2
+
+#if MCAST_DEBUG >= 3
+#define MDBG(x) printk x
+#else
+#define MDBG(x)
+#endif
+
+static struct socket *igmp6_socket;
+
+static void igmp6_join_group(struct ifmcaddr6 *ma);
+static void igmp6_leave_group(struct ifmcaddr6 *ma);
+void igmp6_timer_handler(unsigned long data);
+
+#define IGMP6_UNSOLICITED_IVAL (10*HZ)
+
+/*
+ * Hash list of configured multicast addresses
+ */
+static struct ifmcaddr6 *inet6_mcast_lst[IN6_ADDR_HSIZE];
+
+/*
+ * socket join on multicast group
+ */
+
+int ipv6_sock_mc_join(struct sock *sk, int ifindex, struct in6_addr *addr)
+{
+ struct device *dev = NULL;
+ struct ipv6_mc_socklist *mc_lst;
+ struct ipv6_pinfo *np = &sk->net_pinfo.af_inet6;
+ int err;
+
+ if (!(ipv6_addr_type(addr) & IPV6_ADDR_MULTICAST))
+ return -EINVAL;
+
+ mc_lst = sock_kmalloc(sk, sizeof(struct ipv6_mc_socklist), GFP_KERNEL);
+
+ if (mc_lst == NULL)
+ return -ENOMEM;
+
+ mc_lst->next = NULL;
+ memcpy(&mc_lst->addr, addr, sizeof(struct in6_addr));
+ mc_lst->ifindex = ifindex;
+
+ if (ifindex == 0) {
+ struct rt6_info *rt;
+ rt = rt6_lookup(addr, NULL, 0, 0);
+ if (rt) {
+ dev = rt->rt6i_dev;
+ dst_release(&rt->u.dst);
+ }
+ } else
+ dev = dev_get_by_index(ifindex);
+
+ if (dev == NULL) {
+ sock_kfree_s(sk, mc_lst, sizeof(*mc_lst));
+ return -ENODEV;
+ }
+
+ /*
+ * now add/increase the group membership on the device
+ */
+
+ err = ipv6_dev_mc_inc(dev, addr);
+
+ if (err) {
+ sock_kfree_s(sk, mc_lst, sizeof(*mc_lst));
+ return err;
+ }
+
+ mc_lst->next = np->ipv6_mc_list;
+ np->ipv6_mc_list = mc_lst;
+
+ return 0;
+}
+
+/*
+ * socket leave on multicast group
+ */
+int ipv6_sock_mc_drop(struct sock *sk, int ifindex, struct in6_addr *addr)
+{
+ struct ipv6_pinfo *np = &sk->net_pinfo.af_inet6;
+ struct ipv6_mc_socklist *mc_lst, **lnk;
+
+ for (lnk = &np->ipv6_mc_list; (mc_lst = *lnk) !=NULL ; lnk = &mc_lst->next) {
+ if (mc_lst->ifindex == ifindex &&
+ ipv6_addr_cmp(&mc_lst->addr, addr) == 0) {
+ struct device *dev;
+
+ *lnk = mc_lst->next;
+ synchronize_bh();
+
+ if ((dev = dev_get_by_index(ifindex)) != NULL)
+ ipv6_dev_mc_dec(dev, &mc_lst->addr);
+ sock_kfree_s(sk, mc_lst, sizeof(*mc_lst));
+ return 0;
+ }
+ }
+
+ return -ENOENT;
+}
+
+void ipv6_sock_mc_close(struct sock *sk)
+{
+ struct ipv6_pinfo *np = &sk->net_pinfo.af_inet6;
+ struct ipv6_mc_socklist *mc_lst;
+
+ while ((mc_lst = np->ipv6_mc_list) != NULL) {
+ struct device *dev = dev_get_by_index(mc_lst->ifindex);
+
+ if (dev)
+ ipv6_dev_mc_dec(dev, &mc_lst->addr);
+
+ np->ipv6_mc_list = mc_lst->next;
+ sock_kfree_s(sk, mc_lst, sizeof(*mc_lst));
+ }
+}
+
+static int igmp6_group_added(struct ifmcaddr6 *mc)
+{
+ char buf[MAX_ADDR_LEN];
+
+ if (!(mc->mca_flags&MAF_LOADED)) {
+ mc->mca_flags |= MAF_LOADED;
+ if (ndisc_mc_map(&mc->mca_addr, buf, mc->dev, 0) == 0)
+ dev_mc_add(mc->dev, buf, mc->dev->addr_len, 0);
+ }
+
+ if (mc->dev->flags&IFF_UP)
+ igmp6_join_group(mc);
+ return 0;
+}
+
+static int igmp6_group_dropped(struct ifmcaddr6 *mc)
+{
+ char buf[MAX_ADDR_LEN];
+
+ if (mc->mca_flags&MAF_LOADED) {
+ mc->mca_flags &= ~MAF_LOADED;
+ if (ndisc_mc_map(&mc->mca_addr, buf, mc->dev, 0) == 0)
+ dev_mc_delete(mc->dev, buf, mc->dev->addr_len, 0);
+ }
+
+ if (mc->dev->flags&IFF_UP)
+ igmp6_leave_group(mc);
+ return 0;
+}
+
+
+/*
+ * device multicast group inc (add if not found)
+ */
+int ipv6_dev_mc_inc(struct device *dev, struct in6_addr *addr)
+{
+ struct ifmcaddr6 *mc;
+ struct inet6_dev *idev;
+ int hash;
+
+ idev = ipv6_get_idev(dev);
+
+ if (idev == NULL)
+ return -EINVAL;
+
+ hash = ipv6_addr_hash(addr);
+
+ for (mc = inet6_mcast_lst[hash]; mc; mc = mc->next) {
+ if (ipv6_addr_cmp(&mc->mca_addr, addr) == 0 && mc->dev == dev) {
+ atomic_inc(&mc->mca_users);
+ return 0;
+ }
+ }
+
+ /*
+ * not found: create a new one.
+ */
+
+ mc = kmalloc(sizeof(struct ifmcaddr6), GFP_ATOMIC);
+
+ if (mc == NULL)
+ return -ENOMEM;
+
+ memset(mc, 0, sizeof(struct ifmcaddr6));
+ mc->mca_timer.function = igmp6_timer_handler;
+ mc->mca_timer.data = (unsigned long) mc;
+
+ memcpy(&mc->mca_addr, addr, sizeof(struct in6_addr));
+ mc->dev = dev;
+ atomic_set(&mc->mca_users, 1);
+
+ mc->next = inet6_mcast_lst[hash];
+ inet6_mcast_lst[hash] = mc;
+
+ mc->if_next = idev->mc_list;
+ idev->mc_list = mc;
+
+ igmp6_group_added(mc);
+
+ return 0;
+}
+
+static void ipv6_mca_remove(struct device *dev, struct ifmcaddr6 *ma)
+{
+ struct inet6_dev *idev;
+
+ idev = ipv6_get_idev(dev);
+
+ if (idev) {
+ struct ifmcaddr6 *iter, **lnk;
+
+ for (lnk = &idev->mc_list; (iter = *lnk) != NULL; lnk = &iter->if_next) {
+ if (iter == ma) {
+ *lnk = iter->if_next;
+ synchronize_bh();
+ return;
+ }
+ }
+ }
+}
+
+/*
+ * device multicast group del
+ */
+int ipv6_dev_mc_dec(struct device *dev, struct in6_addr *addr)
+{
+ struct ifmcaddr6 *ma, **lnk;
+ int hash;
+
+ hash = ipv6_addr_hash(addr);
+
+ for (lnk = &inet6_mcast_lst[hash]; (ma=*lnk) != NULL; lnk = &ma->next) {
+ if (ipv6_addr_cmp(&ma->mca_addr, addr) == 0 && ma->dev == dev) {
+ if (atomic_dec_and_test(&ma->mca_users)) {
+ igmp6_group_dropped(ma);
+
+ *lnk = ma->next;
+ synchronize_bh();
+
+ ipv6_mca_remove(dev, ma);
+ kfree(ma);
+ }
+ return 0;
+ }
+ }
+
+ return -ENOENT;
+}
+
+/*
+ * check if the interface/address pair is valid
+ */
+int ipv6_chk_mcast_addr(struct device *dev, struct in6_addr *addr)
+{
+ struct ifmcaddr6 *mc;
+ int hash;
+
+ hash = ipv6_addr_hash(addr);
+
+ for (mc = inet6_mcast_lst[hash]; mc; mc=mc->next) {
+ if (mc->dev == dev && ipv6_addr_cmp(&mc->mca_addr, addr) == 0)
+ return 1;
+ }
+
+ return 0;
+}
+
+/*
+ * IGMP handling (alias multicast ICMPv6 messages)
+ */
+
+static void igmp6_group_queried(struct ifmcaddr6 *ma, unsigned long resptime)
+{
+ unsigned long delay = resptime;
+
+ /* Do not start timer for addresses with link/host scope */
+ if (ipv6_addr_type(&ma->mca_addr)&(IPV6_ADDR_LINKLOCAL|IPV6_ADDR_LOOPBACK))
+ return;
+
+ if (del_timer(&ma->mca_timer))
+ delay = ma->mca_timer.expires - jiffies;
+
+ if (delay >= resptime) {
+ if (resptime)
+ delay = net_random() % resptime;
+ else
+ delay = 1;
+ }
+
+ ma->mca_flags |= MAF_TIMER_RUNNING;
+ ma->mca_timer.expires = jiffies + delay;
+ add_timer(&ma->mca_timer);
+}
+
+int igmp6_event_query(struct sk_buff *skb, struct icmp6hdr *hdr, int len)
+{
+ struct ifmcaddr6 *ma;
+ struct in6_addr *addrp;
+ unsigned long resptime;
+
+ if (len < sizeof(struct icmp6hdr) + sizeof(struct in6_addr))
+ return -EINVAL;
+
+ /* Drop queries with not link local source */
+ if (!(ipv6_addr_type(&skb->nh.ipv6h->saddr)&IPV6_ADDR_LINKLOCAL))
+ return -EINVAL;
+
+ resptime = ntohs(hdr->icmp6_maxdelay);
+ /* Translate milliseconds to jiffies */
+ resptime = (resptime<<10)/(1024000/HZ);
+
+ addrp = (struct in6_addr *) (hdr + 1);
+
+ if (ipv6_addr_any(addrp)) {
+ struct inet6_dev *idev;
+
+ idev = ipv6_get_idev(skb->dev);
+
+ if (idev == NULL)
+ return 0;
+
+ for (ma = idev->mc_list; ma; ma=ma->if_next)
+ igmp6_group_queried(ma, resptime);
+ } else {
+ int hash = ipv6_addr_hash(addrp);
+
+ for (ma = inet6_mcast_lst[hash]; ma; ma=ma->next) {
+ if (ma->dev == skb->dev &&
+ ipv6_addr_cmp(addrp, &ma->mca_addr) == 0) {
+ igmp6_group_queried(ma, resptime);
+ break;
+ }
+ }
+ }
+
+ return 0;
+}
+
+
+int igmp6_event_report(struct sk_buff *skb, struct icmp6hdr *hdr, int len)
+{
+ struct ifmcaddr6 *ma;
+ struct in6_addr *addrp;
+ struct device *dev;
+ int hash;
+
+ /* Our own report looped back. Ignore it. */
+ if (skb->pkt_type == PACKET_LOOPBACK)
+ return 0;
+
+ if (len < sizeof(struct icmp6hdr) + sizeof(struct in6_addr))
+ return -EINVAL;
+
+ /* Drop reports with not link local source */
+ if (!(ipv6_addr_type(&skb->nh.ipv6h->saddr)&IPV6_ADDR_LINKLOCAL))
+ return -EINVAL;
+
+ addrp = (struct in6_addr *) (hdr + 1);
+
+ dev = skb->dev;
+
+ /*
+ * Cancel the timer for this group
+ */
+
+ hash = ipv6_addr_hash(addrp);
+
+ for (ma = inet6_mcast_lst[hash]; ma; ma=ma->next) {
+ if ((ma->dev == dev) && ipv6_addr_cmp(&ma->mca_addr, addrp) == 0) {
+ if (ma->mca_flags & MAF_TIMER_RUNNING) {
+ del_timer(&ma->mca_timer);
+ ma->mca_flags &= ~MAF_TIMER_RUNNING;
+ }
+
+ ma->mca_flags &= ~MAF_LAST_REPORTER;
+ break;
+ }
+ }
+
+ return 0;
+}
+
+void igmp6_send(struct in6_addr *addr, struct device *dev, int type)
+{
+ struct sock *sk = igmp6_socket->sk;
+ struct sk_buff *skb;
+ struct icmp6hdr *hdr;
+ struct inet6_ifaddr *ifp;
+ struct in6_addr *snd_addr;
+ struct in6_addr *addrp;
+ struct in6_addr all_routers;
+ int err, len, payload_len, full_len;
+ u8 ra[8] = { IPPROTO_ICMPV6, 0,
+ IPV6_TLV_ROUTERALERT, 0, 0, 0,
+ IPV6_TLV_PADN, 0 };
+
+ snd_addr = addr;
+ if (type == ICMPV6_MGM_REDUCTION) {
+ snd_addr = &all_routers;
+ ipv6_addr_all_routers(&all_routers);
+ }
+
+ len = sizeof(struct icmp6hdr) + sizeof(struct in6_addr);
+ payload_len = len + sizeof(ra);
+ full_len = sizeof(struct ipv6hdr) + payload_len;
+
+ skb = sock_alloc_send_skb(sk, dev->hard_header_len + full_len + 15, 0, 0, &err);
+
+ if (skb == NULL)
+ return;
+
+ skb_reserve(skb, (dev->hard_header_len + 15) & ~15);
+ if (dev->hard_header) {
+ unsigned char ha[MAX_ADDR_LEN];
+ ndisc_mc_map(snd_addr, ha, dev, 1);
+ dev->hard_header(skb, dev, ETH_P_IPV6, ha, NULL, full_len);
+ }
+
+ ifp = ipv6_get_lladdr(dev);
+
+ if (ifp == NULL) {
+#if MCAST_DEBUG >= 1
+ printk(KERN_DEBUG "igmp6: %s no linklocal address\n",
+ dev->name);
+#endif
+ return;
+ }
+
+ ip6_nd_hdr(sk, skb, dev, &ifp->addr, snd_addr, NEXTHDR_HOP, payload_len);
+
+ memcpy(skb_put(skb, sizeof(ra)), ra, sizeof(ra));
+
+ hdr = (struct icmp6hdr *) skb_put(skb, sizeof(struct icmp6hdr));
+ memset(hdr, 0, sizeof(struct icmp6hdr));
+ hdr->icmp6_type = type;
+
+ addrp = (struct in6_addr *) skb_put(skb, sizeof(struct in6_addr));
+ ipv6_addr_copy(addrp, addr);
+
+ hdr->icmp6_cksum = csum_ipv6_magic(&ifp->addr, snd_addr, len,
+ IPPROTO_ICMPV6,
+ csum_partial((__u8 *) hdr, len, 0));
+
+ dev_queue_xmit(skb);
+ if (type == ICMPV6_MGM_REDUCTION)
+ icmpv6_statistics.Icmp6OutGroupMembReductions++;
+ else
+ icmpv6_statistics.Icmp6OutGroupMembResponses++;
+ icmpv6_statistics.Icmp6OutMsgs++;
+}
+
+static void igmp6_join_group(struct ifmcaddr6 *ma)
+{
+ unsigned long delay;
+ int addr_type;
+
+ addr_type = ipv6_addr_type(&ma->mca_addr);
+
+ if ((addr_type & (IPV6_ADDR_LINKLOCAL|IPV6_ADDR_LOOPBACK)))
+ return;
+
+ start_bh_atomic();
+ igmp6_send(&ma->mca_addr, ma->dev, ICMPV6_MGM_REPORT);
+
+ delay = net_random() % IGMP6_UNSOLICITED_IVAL;
+ if (del_timer(&ma->mca_timer))
+ delay = ma->mca_timer.expires - jiffies;
+
+ ma->mca_timer.expires = jiffies + delay;
+
+ add_timer(&ma->mca_timer);
+ ma->mca_flags |= MAF_TIMER_RUNNING | MAF_LAST_REPORTER;
+ end_bh_atomic();
+}
+
+static void igmp6_leave_group(struct ifmcaddr6 *ma)
+{
+ int addr_type;
+
+ addr_type = ipv6_addr_type(&ma->mca_addr);
+
+ if ((addr_type & IPV6_ADDR_LINKLOCAL))
+ return;
+
+ start_bh_atomic();
+ if (ma->mca_flags & MAF_LAST_REPORTER)
+ igmp6_send(&ma->mca_addr, ma->dev, ICMPV6_MGM_REDUCTION);
+
+ if (ma->mca_flags & MAF_TIMER_RUNNING)
+ del_timer(&ma->mca_timer);
+ end_bh_atomic();
+}
+
+void igmp6_timer_handler(unsigned long data)
+{
+ struct ifmcaddr6 *ma = (struct ifmcaddr6 *) data;
+
+ ma->mca_flags |= MAF_LAST_REPORTER;
+ igmp6_send(&ma->mca_addr, ma->dev, ICMPV6_MGM_REPORT);
+ ma->mca_flags &= ~MAF_TIMER_RUNNING;
+}
+
+/* Device going down */
+
+void ipv6_mc_down(struct inet6_dev *idev)
+{
+ struct ifmcaddr6 *i;
+ struct in6_addr maddr;
+
+ /* Withdraw multicast list */
+
+ for (i = idev->mc_list; i; i=i->if_next)
+ igmp6_group_dropped(i);
+
+ /* Delete all-nodes address. */
+
+ ipv6_addr_all_nodes(&maddr);
+ ipv6_dev_mc_dec(idev->dev, &maddr);
+}
+
+/* Device going up */
+
+void ipv6_mc_up(struct inet6_dev *idev)
+{
+ struct ifmcaddr6 *i;
+ struct in6_addr maddr;
+
+ /* Add all-nodes address. */
+
+ ipv6_addr_all_nodes(&maddr);
+ ipv6_dev_mc_inc(idev->dev, &maddr);
+
+ /* Install multicast list, except for all-nodes (already installed) */
+
+ for (i = idev->mc_list; i; i=i->if_next)
+ igmp6_group_added(i);
+}
+
+/*
+ * Device is about to be destroyed: clean up.
+ */
+
+void ipv6_mc_destroy_dev(struct inet6_dev *idev)
+{
+ int hash;
+ struct ifmcaddr6 *i, **lnk;
+
+ while ((i = idev->mc_list) != NULL) {
+ idev->mc_list = i->if_next;
+
+ hash = ipv6_addr_hash(&i->mca_addr);
+
+ for (lnk = &inet6_mcast_lst[hash]; *lnk; lnk = &(*lnk)->next) {
+ if (*lnk == i) {
+ *lnk = i->next;
+ synchronize_bh();
+ break;
+ }
+ }
+ igmp6_group_dropped(i);
+ kfree(i);
+ }
+}
+
+#ifdef CONFIG_PROC_FS
+static int igmp6_read_proc(char *buffer, char **start, off_t offset,
+ int length, int *eof, void *data)
+{
+ off_t pos=0, begin=0;
+ struct ifmcaddr6 *im;
+ int len=0;
+ struct device *dev;
+
+ for (dev = dev_base; dev; dev = dev->next) {
+ struct inet6_dev *idev;
+
+ if ((idev = ipv6_get_idev(dev)) == NULL)
+ continue;
+
+ for (im = idev->mc_list; im; im = im->if_next) {
+ int i;
+
+ len += sprintf(buffer+len,"%-4d %-15s ", dev->ifindex, dev->name);
+
+ for (i=0; i<16; i++)
+ len += sprintf(buffer+len, "%02x", im->mca_addr.s6_addr[i]);
+
+ len+=sprintf(buffer+len,
+ " %5d %08X %ld\n",
+ atomic_read(&im->mca_users),
+ im->mca_flags,
+ (im->mca_flags&MAF_TIMER_RUNNING) ? im->mca_timer.expires-jiffies : 0);
+
+ pos=begin+len;
+ if (pos < offset) {
+ len=0;
+ begin=pos;
+ }
+ if (pos > offset+length)
+ goto done;
+ }
+ }
+ *eof = 1;
+
+done:
+ *start=buffer+(offset-begin);
+ len-=(offset-begin);
+ if(len>length)
+ len=length;
+ if (len<0)
+ len=0;
+ return len;
+}
+#endif
+
+__initfunc(int igmp6_init(struct net_proto_family *ops))
+{
+#ifdef CONFIG_PROC_FS
+ struct proc_dir_entry *ent;
+#endif
+ struct sock *sk;
+ int err;
+
+ igmp6_socket = sock_alloc();
+ if (igmp6_socket == NULL) {
+ printk(KERN_ERR
+ "Failed to create the IGMP6 control socket.\n");
+ return -1;
+ }
+#ifndef _HURD_
+ igmp6_socket->inode->i_uid = 0;
+ igmp6_socket->inode->i_gid = 0;
+#endif
+ igmp6_socket->type = SOCK_RAW;
+
+ if((err = ops->create(igmp6_socket, IPPROTO_ICMPV6)) < 0) {
+ printk(KERN_DEBUG
+ "Failed to initialize the IGMP6 control socket (err %d).\n",
+ err);
+ sock_release(igmp6_socket);
+ igmp6_socket = NULL; /* For safety. */
+ return err;
+ }
+
+ sk = igmp6_socket->sk;
+ sk->allocation = GFP_ATOMIC;
+ sk->num = 256; /* Don't receive any data */
+
+ sk->net_pinfo.af_inet6.hop_limit = 1;
+#ifdef CONFIG_PROC_FS
+ ent = create_proc_entry("net/igmp6", 0, 0);
+ ent->read_proc = igmp6_read_proc;
+#endif
+
+ return 0;
+}
+
+#ifdef MODULE
+void igmp6_cleanup(void)
+{
+ sock_release(igmp6_socket);
+ igmp6_socket = NULL; /* for safety */
+#ifdef CONFIG_PROC_FS
+ remove_proc_entry("net/igmp6", 0);
+#endif
+}
+#endif
diff --git a/pfinet/linux-src/net/ipv6/ndisc.c b/pfinet/linux-src/net/ipv6/ndisc.c
new file mode 100644
index 00000000..61f950d2
--- /dev/null
+++ b/pfinet/linux-src/net/ipv6/ndisc.c
@@ -0,0 +1,1217 @@
+/*
+ * Neighbour Discovery for IPv6
+ * Linux INET6 implementation
+ *
+ * Authors:
+ * Pedro Roque <roque@di.fc.ul.pt>
+ * Mike Shaver <shaver@ingenia.com>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version
+ * 2 of the License, or (at your option) any later version.
+ */
+
+/*
+ * Changes:
+ *
+ * Lars Fenneberg : fixed MTU setting on receipt
+ * of an RA.
+ *
+ * Janos Farkas : kmalloc failure checks
+ * Alexey Kuznetsov : state machine reworked
+ * and moved to net/core.
+ */
+
+/* Set to 3 to get tracing... */
+#define ND_DEBUG 1
+
+#define ND_PRINTK(x...) printk(KERN_DEBUG x)
+#define ND_NOPRINTK(x...) do { ; } while(0)
+#define ND_PRINTK0 ND_PRINTK
+#define ND_PRINTK1 ND_NOPRINTK
+#define ND_PRINTK2 ND_NOPRINTK
+#if ND_DEBUG >= 1
+#undef ND_PRINTK1
+#define ND_PRINTK1 ND_PRINTK
+#endif
+#if ND_DEBUG >= 2
+#undef ND_PRINTK2
+#define ND_PRINTK2 ND_PRINTK
+#endif
+
+#define __NO_VERSION__
+#include <linux/module.h>
+#include <linux/config.h>
+#include <linux/errno.h>
+#include <linux/types.h>
+#include <linux/socket.h>
+#include <linux/sockios.h>
+#include <linux/sched.h>
+#include <linux/net.h>
+#include <linux/in6.h>
+#include <linux/route.h>
+#include <linux/init.h>
+#ifdef CONFIG_SYSCTL
+#include <linux/sysctl.h>
+#endif
+
+#include <linux/if_arp.h>
+#include <linux/ipv6.h>
+#include <linux/icmpv6.h>
+
+#include <net/sock.h>
+#include <net/snmp.h>
+
+#include <net/ipv6.h>
+#include <net/protocol.h>
+#include <net/ndisc.h>
+#include <net/ip6_route.h>
+#include <net/addrconf.h>
+#include <net/icmp.h>
+
+#include <net/checksum.h>
+#include <linux/proc_fs.h>
+
+static struct socket *ndisc_socket;
+
+static int ndisc_constructor(struct neighbour *neigh);
+static void ndisc_solicit(struct neighbour *neigh, struct sk_buff *skb);
+static void ndisc_error_report(struct neighbour *neigh, struct sk_buff *skb);
+static int pndisc_constructor(struct pneigh_entry *n);
+static void pndisc_destructor(struct pneigh_entry *n);
+static void pndisc_redo(struct sk_buff *skb);
+
+static struct neigh_ops ndisc_generic_ops =
+{
+ AF_INET6,
+ NULL,
+ ndisc_solicit,
+ ndisc_error_report,
+ neigh_resolve_output,
+ neigh_connected_output,
+ dev_queue_xmit,
+ dev_queue_xmit
+};
+
+static struct neigh_ops ndisc_hh_ops =
+{
+ AF_INET6,
+ NULL,
+ ndisc_solicit,
+ ndisc_error_report,
+ neigh_resolve_output,
+ neigh_resolve_output,
+ dev_queue_xmit,
+ dev_queue_xmit
+};
+
+
+static struct neigh_ops ndisc_direct_ops =
+{
+ AF_INET6,
+ NULL,
+ NULL,
+ NULL,
+ dev_queue_xmit,
+ dev_queue_xmit,
+ dev_queue_xmit,
+ dev_queue_xmit
+};
+
+struct neigh_table nd_tbl =
+{
+ NULL,
+ AF_INET6,
+ sizeof(struct neighbour) + sizeof(struct in6_addr),
+ sizeof(struct in6_addr),
+ ndisc_constructor,
+ pndisc_constructor,
+ pndisc_destructor,
+ pndisc_redo,
+ { NULL, NULL, &nd_tbl, 0, NULL, NULL,
+ 30*HZ, 1*HZ, 60*HZ, 30*HZ, 5*HZ, 3, 3, 0, 3, 1*HZ, (8*HZ)/10, 64, 0 },
+ 30*HZ, 128, 512, 1024,
+};
+
+#define NDISC_OPT_SPACE(len) (((len)+2+7)&~7)
+
+static u8 *ndisc_fill_option(u8 *opt, int type, void *data, int data_len)
+{
+ int space = NDISC_OPT_SPACE(data_len);
+
+ opt[0] = type;
+ opt[1] = space>>3;
+ memcpy(opt+2, data, data_len);
+ data_len += 2;
+ opt += data_len;
+ if ((space -= data_len) > 0)
+ memset(opt, 0, space);
+ return opt + space;
+}
+
+int ndisc_mc_map(struct in6_addr *addr, char *buf, struct device *dev, int dir)
+{
+ switch (dev->type) {
+ case ARPHRD_ETHER:
+ case ARPHRD_IEEE802: /* Not sure. Check it later. --ANK */
+ case ARPHRD_FDDI:
+ ipv6_eth_mc_map(addr, buf);
+ return 0;
+ default:
+ if (dir) {
+ memcpy(buf, dev->broadcast, dev->addr_len);
+ return 0;
+ }
+ }
+ return -EINVAL;
+}
+
+static int ndisc_constructor(struct neighbour *neigh)
+{
+ struct in6_addr *addr = (struct in6_addr*)&neigh->primary_key;
+ struct device *dev = neigh->dev;
+ struct inet6_dev *in6_dev = ipv6_get_idev(dev);
+ int addr_type;
+
+ if (in6_dev == NULL)
+ return -EINVAL;
+
+ addr_type = ipv6_addr_type(addr);
+ if (in6_dev->nd_parms)
+ neigh->parms = in6_dev->nd_parms;
+
+ if (addr_type&IPV6_ADDR_MULTICAST)
+ neigh->type = RTN_MULTICAST;
+ else
+ neigh->type = RTN_UNICAST;
+ if (dev->hard_header == NULL) {
+ neigh->nud_state = NUD_NOARP;
+ neigh->ops = &ndisc_direct_ops;
+ neigh->output = neigh->ops->queue_xmit;
+ } else {
+ if (addr_type&IPV6_ADDR_MULTICAST) {
+ neigh->nud_state = NUD_NOARP;
+ ndisc_mc_map(addr, neigh->ha, dev, 1);
+ } else if (dev->flags&(IFF_NOARP|IFF_LOOPBACK)) {
+ neigh->nud_state = NUD_NOARP;
+ memcpy(neigh->ha, dev->dev_addr, dev->addr_len);
+ if (dev->flags&IFF_LOOPBACK)
+ neigh->type = RTN_LOCAL;
+ } else if (dev->flags&IFF_POINTOPOINT) {
+ neigh->nud_state = NUD_NOARP;
+ memcpy(neigh->ha, dev->broadcast, dev->addr_len);
+ }
+ if (dev->hard_header_cache)
+ neigh->ops = &ndisc_hh_ops;
+ else
+ neigh->ops = &ndisc_generic_ops;
+ if (neigh->nud_state&NUD_VALID)
+ neigh->output = neigh->ops->connected_output;
+ else
+ neigh->output = neigh->ops->output;
+ }
+
+ return 0;
+}
+
+static int pndisc_constructor(struct pneigh_entry *n)
+{
+ struct in6_addr *addr = (struct in6_addr*)&n->key;
+ struct in6_addr maddr;
+ struct device *dev = n->dev;
+
+ if (dev == NULL || ipv6_get_idev(dev) == NULL)
+ return -EINVAL;
+#ifndef CONFIG_IPV6_NO_PB
+ addrconf_addr_solict_mult_old(addr, &maddr);
+ ipv6_dev_mc_inc(dev, &maddr);
+#endif
+#ifdef CONFIG_IPV6_EUI64
+ addrconf_addr_solict_mult_new(addr, &maddr);
+ ipv6_dev_mc_inc(dev, &maddr);
+#endif
+ return 0;
+}
+
+static void pndisc_destructor(struct pneigh_entry *n)
+{
+ struct in6_addr *addr = (struct in6_addr*)&n->key;
+ struct in6_addr maddr;
+ struct device *dev = n->dev;
+
+ if (dev == NULL || ipv6_get_idev(dev) == NULL)
+ return;
+#ifndef CONFIG_IPV6_NO_PB
+ addrconf_addr_solict_mult_old(addr, &maddr);
+ ipv6_dev_mc_dec(dev, &maddr);
+#endif
+#ifdef CONFIG_IPV6_EUI64
+ addrconf_addr_solict_mult_new(addr, &maddr);
+ ipv6_dev_mc_dec(dev, &maddr);
+#endif
+}
+
+
+
+static int
+ndisc_build_ll_hdr(struct sk_buff *skb, struct device *dev,
+ struct in6_addr *daddr, struct neighbour *neigh, int len)
+{
+ unsigned char ha[MAX_ADDR_LEN];
+ unsigned char *h_dest = NULL;
+
+ skb_reserve(skb, (dev->hard_header_len + 15) & ~15);
+
+ if (dev->hard_header) {
+ if (ipv6_addr_type(daddr) & IPV6_ADDR_MULTICAST) {
+ ndisc_mc_map(daddr, ha, dev, 1);
+ h_dest = ha;
+ } else if (neigh) {
+ h_dest = neigh->ha;
+ } else {
+ neigh = neigh_lookup(&nd_tbl, daddr, dev);
+ if (neigh) {
+ if (neigh->nud_state&NUD_VALID) {
+ memcpy(ha, neigh->ha, dev->addr_len);
+ h_dest = ha;
+ }
+ neigh_release(neigh);
+ }
+ }
+
+ if (dev->hard_header(skb, dev, ETH_P_IPV6, h_dest, NULL, len) < 0)
+ return 0;
+ }
+
+ return 1;
+}
+
+
+/*
+ * Send a Neighbour Advertisement
+ */
+
+void ndisc_send_na(struct device *dev, struct neighbour *neigh,
+ struct in6_addr *daddr, struct in6_addr *solicited_addr,
+ int router, int solicited, int override, int inc_opt)
+{
+ struct sock *sk = ndisc_socket->sk;
+ struct nd_msg *msg;
+ int len;
+ struct sk_buff *skb;
+ int err;
+
+ len = sizeof(struct icmp6hdr) + sizeof(struct in6_addr);
+
+ if (inc_opt) {
+ if (dev->addr_len)
+ len += NDISC_OPT_SPACE(dev->addr_len);
+ else
+ inc_opt = 0;
+ }
+
+ skb = sock_alloc_send_skb(sk, MAX_HEADER + len + dev->hard_header_len + 15,
+ 0, 0, &err);
+
+ if (skb == NULL) {
+ ND_PRINTK1("send_na: alloc skb failed\n");
+ return;
+ }
+
+ if (ndisc_build_ll_hdr(skb, dev, daddr, neigh, len) == 0) {
+ kfree_skb(skb);
+ return;
+ }
+
+ ip6_nd_hdr(sk, skb, dev, solicited_addr, daddr, IPPROTO_ICMPV6, len);
+
+ msg = (struct nd_msg *) skb_put(skb, len);
+
+ msg->icmph.icmp6_type = NDISC_NEIGHBOUR_ADVERTISEMENT;
+ msg->icmph.icmp6_code = 0;
+ msg->icmph.icmp6_cksum = 0;
+
+ msg->icmph.icmp6_unused = 0;
+ msg->icmph.icmp6_router = router;
+ msg->icmph.icmp6_solicited = solicited;
+ msg->icmph.icmp6_override = !!override;
+
+ /* Set the target address. */
+ ipv6_addr_copy(&msg->target, solicited_addr);
+
+ if (inc_opt)
+ ndisc_fill_option((void*)&msg->opt, ND_OPT_TARGET_LL_ADDR, dev->dev_addr, dev->addr_len);
+
+ /* checksum */
+ msg->icmph.icmp6_cksum = csum_ipv6_magic(solicited_addr, daddr, len,
+ IPPROTO_ICMPV6,
+ csum_partial((__u8 *) msg,
+ len, 0));
+
+ dev_queue_xmit(skb);
+
+ icmpv6_statistics.Icmp6OutNeighborAdvertisements++;
+ icmpv6_statistics.Icmp6OutMsgs++;
+}
+
+void ndisc_send_ns(struct device *dev, struct neighbour *neigh,
+ struct in6_addr *solicit,
+ struct in6_addr *daddr, struct in6_addr *saddr)
+{
+ struct sock *sk = ndisc_socket->sk;
+ struct sk_buff *skb;
+ struct nd_msg *msg;
+ int len;
+ int err;
+
+ len = sizeof(struct icmp6hdr) + sizeof(struct in6_addr);
+ if (dev->addr_len)
+ len += NDISC_OPT_SPACE(dev->addr_len);
+
+ skb = sock_alloc_send_skb(sk, MAX_HEADER + len + dev->hard_header_len + 15,
+ 0, 0, &err);
+ if (skb == NULL) {
+ ND_PRINTK1("send_ns: alloc skb failed\n");
+ return;
+ }
+
+ if (saddr == NULL) {
+ struct inet6_ifaddr *ifa;
+
+ /* use link local address */
+ ifa = ipv6_get_lladdr(dev);
+
+ if (ifa)
+ saddr = &ifa->addr;
+ }
+
+ if (ndisc_build_ll_hdr(skb, dev, daddr, neigh, len) == 0) {
+ kfree_skb(skb);
+ return;
+ }
+
+ ip6_nd_hdr(sk, skb, dev, saddr, daddr, IPPROTO_ICMPV6, len);
+
+ msg = (struct nd_msg *)skb_put(skb, len);
+ msg->icmph.icmp6_type = NDISC_NEIGHBOUR_SOLICITATION;
+ msg->icmph.icmp6_code = 0;
+ msg->icmph.icmp6_cksum = 0;
+ msg->icmph.icmp6_unused = 0;
+
+ /* Set the target address. */
+ ipv6_addr_copy(&msg->target, solicit);
+
+ if (dev->addr_len)
+ ndisc_fill_option((void*)&msg->opt, ND_OPT_SOURCE_LL_ADDR, dev->dev_addr, dev->addr_len);
+
+ /* checksum */
+ msg->icmph.icmp6_cksum = csum_ipv6_magic(&skb->nh.ipv6h->saddr,
+ daddr, len,
+ IPPROTO_ICMPV6,
+ csum_partial((__u8 *) msg,
+ len, 0));
+ /* send it! */
+ dev_queue_xmit(skb);
+
+ icmpv6_statistics.Icmp6OutNeighborSolicits++;
+ icmpv6_statistics.Icmp6OutMsgs++;
+}
+
+void ndisc_send_rs(struct device *dev, struct in6_addr *saddr,
+ struct in6_addr *daddr)
+{
+ struct sock *sk = ndisc_socket->sk;
+ struct sk_buff *skb;
+ struct icmp6hdr *hdr;
+ __u8 * opt;
+ int len;
+ int err;
+
+ len = sizeof(struct icmp6hdr);
+ if (dev->addr_len)
+ len += NDISC_OPT_SPACE(dev->addr_len);
+
+ skb = sock_alloc_send_skb(sk, MAX_HEADER + len + dev->hard_header_len + 15,
+ 0, 0, &err);
+ if (skb == NULL) {
+ ND_PRINTK1("send_ns: alloc skb failed\n");
+ return;
+ }
+
+ if (ndisc_build_ll_hdr(skb, dev, daddr, NULL, len) == 0) {
+ kfree_skb(skb);
+ return;
+ }
+
+ ip6_nd_hdr(sk, skb, dev, saddr, daddr, IPPROTO_ICMPV6, len);
+
+ hdr = (struct icmp6hdr *) skb_put(skb, len);
+ hdr->icmp6_type = NDISC_ROUTER_SOLICITATION;
+ hdr->icmp6_code = 0;
+ hdr->icmp6_cksum = 0;
+ hdr->icmp6_unused = 0;
+
+ opt = (u8*) (hdr + 1);
+
+ if (dev->addr_len)
+ ndisc_fill_option(opt, ND_OPT_SOURCE_LL_ADDR, dev->dev_addr, dev->addr_len);
+
+ /* checksum */
+ hdr->icmp6_cksum = csum_ipv6_magic(&skb->nh.ipv6h->saddr, daddr, len,
+ IPPROTO_ICMPV6,
+ csum_partial((__u8 *) hdr, len, 0));
+
+ /* send it! */
+ dev_queue_xmit(skb);
+
+ icmpv6_statistics.Icmp6OutRouterSolicits++;
+ icmpv6_statistics.Icmp6OutMsgs++;
+}
+
+
+static u8 * ndisc_find_option(u8 *opt, int opt_len, int len, int option)
+{
+ while (opt_len <= len) {
+ int l = opt[1]<<3;
+
+ if (opt[0] == option && l >= opt_len)
+ return opt + 2;
+
+ if (l == 0) {
+ if (net_ratelimit())
+ printk(KERN_WARNING "ndisc: option has 0 len\n");
+ return NULL;
+ }
+
+ opt += l;
+ len -= l;
+ }
+ return NULL;
+}
+
+
+static void ndisc_error_report(struct neighbour *neigh, struct sk_buff *skb)
+{
+ /*
+ * "The sender MUST return an ICMP
+ * destination unreachable"
+ */
+ dst_link_failure(skb);
+ kfree_skb(skb);
+}
+
+static void ndisc_solicit(struct neighbour *neigh, struct sk_buff *skb)
+{
+ struct in6_addr *saddr = NULL;
+ struct in6_addr mcaddr;
+ struct device *dev = neigh->dev;
+ struct in6_addr *target = (struct in6_addr *)&neigh->primary_key;
+ int probes = neigh->probes;
+
+ if (skb && ipv6_chk_addr(&skb->nh.ipv6h->saddr, dev, 0))
+ saddr = &skb->nh.ipv6h->saddr;
+
+ if ((probes -= neigh->parms->ucast_probes) < 0) {
+ if (!(neigh->nud_state&NUD_VALID))
+ ND_PRINTK1("trying to ucast probe in NUD_INVALID\n");
+ ndisc_send_ns(dev, neigh, target, target, saddr);
+ } else if ((probes -= neigh->parms->app_probes) < 0) {
+#ifdef CONFIG_ARPD
+ neigh_app_ns(neigh);
+#endif
+ } else {
+#ifdef CONFIG_IPV6_EUI64
+ addrconf_addr_solict_mult_new(target, &mcaddr);
+ ndisc_send_ns(dev, NULL, target, &mcaddr, saddr);
+#endif
+#ifndef CONFIG_IPV6_NO_PB
+ addrconf_addr_solict_mult_old(target, &mcaddr);
+ ndisc_send_ns(dev, NULL, target, &mcaddr, saddr);
+#endif
+ }
+}
+
+
+static void ndisc_update(struct neighbour *neigh, u8* opt, int len, int type)
+{
+ opt = ndisc_find_option(opt, neigh->dev->addr_len+2, len, type);
+ neigh_update(neigh, opt, NUD_STALE, 1, 1);
+}
+
+static void ndisc_router_discovery(struct sk_buff *skb)
+{
+ struct ra_msg *ra_msg = (struct ra_msg *) skb->h.raw;
+ struct neighbour *neigh;
+ struct inet6_dev *in6_dev;
+ struct rt6_info *rt;
+ int lifetime;
+ int optlen;
+
+ __u8 * opt = (__u8 *)(ra_msg + 1);
+
+ optlen = (skb->tail - skb->h.raw) - sizeof(struct ra_msg);
+
+ if (skb->nh.ipv6h->hop_limit != 255) {
+ printk(KERN_INFO
+ "NDISC: fake router advertisement received\n");
+ return;
+ }
+
+ /*
+ * set the RA_RECV flag in the interface
+ */
+
+ in6_dev = ipv6_get_idev(skb->dev);
+ if (in6_dev == NULL) {
+ ND_PRINTK1("RA: can't find in6 device\n");
+ return;
+ }
+ if (in6_dev->cnf.forwarding || !in6_dev->cnf.accept_ra)
+ return;
+
+ if (in6_dev->if_flags & IF_RS_SENT) {
+ /*
+ * flag that an RA was received after an RS was sent
+ * out on this interface.
+ */
+ in6_dev->if_flags |= IF_RA_RCVD;
+ }
+
+ lifetime = ntohs(ra_msg->icmph.icmp6_rt_lifetime);
+
+ rt = rt6_get_dflt_router(&skb->nh.ipv6h->saddr, skb->dev);
+
+ if (rt && lifetime == 0) {
+ ip6_del_rt(rt);
+ dst_release(&rt->u.dst);
+ rt = NULL;
+ }
+
+ if (rt == NULL && lifetime) {
+ ND_PRINTK2("ndisc_rdisc: adding default router\n");
+
+ rt = rt6_add_dflt_router(&skb->nh.ipv6h->saddr, skb->dev);
+ if (rt == NULL) {
+ ND_PRINTK1("route_add failed\n");
+ return;
+ }
+
+ neigh = rt->rt6i_nexthop;
+ if (neigh == NULL) {
+ ND_PRINTK1("nd: add default router: null neighbour\n");
+ dst_release(&rt->u.dst);
+ return;
+ }
+ neigh->flags |= NTF_ROUTER;
+
+ /*
+ * If we where using an "all destinations on link" route
+ * delete it
+ */
+
+ rt6_purge_dflt_routers(RTF_ALLONLINK);
+ }
+
+ if (rt)
+ rt->rt6i_expires = jiffies + (HZ * lifetime);
+
+ if (ra_msg->icmph.icmp6_hop_limit)
+ in6_dev->cnf.hop_limit = ra_msg->icmph.icmp6_hop_limit;
+
+ /*
+ * Update Reachable Time and Retrans Timer
+ */
+
+ if (in6_dev->nd_parms) {
+ if (ra_msg->retrans_timer)
+ in6_dev->nd_parms->retrans_time = (ntohl(ra_msg->retrans_timer)*HZ)/1000;
+
+ if (ra_msg->reachable_time) {
+ __u32 rtime = (ntohl(ra_msg->reachable_time)*HZ)/1000;
+
+ if (rtime != in6_dev->nd_parms->base_reachable_time) {
+ in6_dev->nd_parms->base_reachable_time = rtime;
+ in6_dev->nd_parms->gc_staletime = 3 * rtime;
+ in6_dev->nd_parms->reachable_time = neigh_rand_reach_time(rtime);
+ }
+ }
+ }
+
+ /*
+ * Process options.
+ */
+
+ while (optlen > 0) {
+ int len = (opt[1] << 3);
+
+ if (len == 0) {
+ ND_PRINTK0("RA: opt has 0 len\n");
+ break;
+ }
+
+ switch(*opt) {
+ case ND_OPT_SOURCE_LL_ADDR:
+
+ if (rt == NULL)
+ break;
+
+ if ((neigh = rt->rt6i_nexthop) != NULL &&
+ skb->dev->addr_len + 2 >= len)
+ neigh_update(neigh, opt+2, NUD_STALE, 1, 1);
+ break;
+
+ case ND_OPT_PREFIX_INFO:
+ addrconf_prefix_rcv(skb->dev, opt, len);
+ break;
+
+ case ND_OPT_MTU:
+ {
+ int mtu;
+
+ mtu = htonl(*(__u32 *)(opt+4));
+
+ if (mtu < IPV6_MIN_MTU || mtu > skb->dev->mtu) {
+ ND_PRINTK0("NDISC: router "
+ "announcement with mtu = %d\n",
+ mtu);
+ break;
+ }
+
+ if (in6_dev->cnf.mtu6 != mtu) {
+ in6_dev->cnf.mtu6 = mtu;
+
+ if (rt)
+ rt->u.dst.pmtu = mtu;
+
+ rt6_mtu_change(skb->dev, mtu);
+ }
+ }
+ break;
+
+ case ND_OPT_TARGET_LL_ADDR:
+ case ND_OPT_REDIRECT_HDR:
+ ND_PRINTK0("got illegal option with RA");
+ break;
+ default:
+ ND_PRINTK0("unknown option in RA\n");
+ };
+ optlen -= len;
+ opt += len;
+ }
+ if (rt)
+ dst_release(&rt->u.dst);
+}
+
+static void ndisc_redirect_rcv(struct sk_buff *skb)
+{
+ struct inet6_dev *in6_dev;
+ struct icmp6hdr *icmph;
+ struct in6_addr *dest;
+ struct in6_addr *target; /* new first hop to destination */
+ struct neighbour *neigh;
+ int on_link = 0;
+ int optlen;
+
+ if (skb->nh.ipv6h->hop_limit != 255) {
+ printk(KERN_WARNING "NDISC: fake ICMP redirect received\n");
+ return;
+ }
+
+ if (!(ipv6_addr_type(&skb->nh.ipv6h->saddr) & IPV6_ADDR_LINKLOCAL)) {
+ printk(KERN_WARNING "ICMP redirect: source address is not linklocal\n");
+ return;
+ }
+
+ optlen = skb->tail - skb->h.raw;
+ optlen -= sizeof(struct icmp6hdr) + 2 * sizeof(struct in6_addr);
+
+ if (optlen < 0) {
+ printk(KERN_WARNING "ICMP redirect: packet too small\n");
+ return;
+ }
+
+ icmph = (struct icmp6hdr *) skb->h.raw;
+ target = (struct in6_addr *) (icmph + 1);
+ dest = target + 1;
+
+ if (ipv6_addr_type(dest) & IPV6_ADDR_MULTICAST) {
+ printk(KERN_WARNING "ICMP redirect for multicast addr\n");
+ return;
+ }
+
+ if (ipv6_addr_cmp(dest, target) == 0) {
+ on_link = 1;
+ } else if (!(ipv6_addr_type(target) & IPV6_ADDR_LINKLOCAL)) {
+ printk(KERN_WARNING "ICMP redirect: target address is not linklocal\n");
+ return;
+ }
+
+ in6_dev = ipv6_get_idev(skb->dev);
+ if (!in6_dev || in6_dev->cnf.forwarding || !in6_dev->cnf.accept_redirects)
+ return;
+
+ /* passed validation tests */
+
+ /*
+ We install redirect only if nexthop state is valid.
+ */
+
+ neigh = __neigh_lookup(&nd_tbl, target, skb->dev, 1);
+ if (neigh) {
+ ndisc_update(neigh, (u8*)(dest + 1), optlen, ND_OPT_TARGET_LL_ADDR);
+ if (neigh->nud_state&NUD_VALID)
+ rt6_redirect(dest, &skb->nh.ipv6h->saddr, neigh, on_link);
+ else
+ __neigh_event_send(neigh, NULL);
+ neigh_release(neigh);
+ }
+}
+
+void ndisc_send_redirect(struct sk_buff *skb, struct neighbour *neigh,
+ struct in6_addr *target)
+{
+ struct sock *sk = ndisc_socket->sk;
+ int len = sizeof(struct icmp6hdr) + 2 * sizeof(struct in6_addr);
+ struct sk_buff *buff;
+ struct inet6_ifaddr *ifp;
+ struct icmp6hdr *icmph;
+ struct in6_addr *addrp;
+ struct device *dev;
+ struct rt6_info *rt;
+ u8 *opt;
+ int rd_len;
+ int err;
+ int hlen;
+
+ dev = skb->dev;
+ rt = rt6_lookup(&skb->nh.ipv6h->saddr, NULL, dev->ifindex, 1);
+
+ if (rt == NULL)
+ return;
+
+ if (rt->rt6i_flags & RTF_GATEWAY) {
+ ND_PRINTK1("ndisc_send_redirect: not a neighbour\n");
+ dst_release(&rt->u.dst);
+ return;
+ }
+ if (!xrlim_allow(&rt->u.dst, 1*HZ)) {
+ dst_release(&rt->u.dst);
+ return;
+ }
+ dst_release(&rt->u.dst);
+
+ if (dev->addr_len) {
+ if (neigh->nud_state&NUD_VALID) {
+ len += NDISC_OPT_SPACE(dev->addr_len);
+ } else {
+ /* If nexthop is not valid, do not redirect!
+ We will make it later, when will be sure,
+ that it is alive.
+ */
+ return;
+ }
+ }
+
+ rd_len = min(IPV6_MIN_MTU-sizeof(struct ipv6hdr)-len, skb->len + 8);
+ rd_len &= ~0x7;
+ len += rd_len;
+
+ ifp = ipv6_get_lladdr(dev);
+
+ if (ifp == NULL) {
+ ND_PRINTK1("redirect: no link_local addr for dev\n");
+ return;
+ }
+
+ buff = sock_alloc_send_skb(sk, MAX_HEADER + len + dev->hard_header_len + 15,
+ 0, 0, &err);
+ if (buff == NULL) {
+ ND_PRINTK1("ndisc_send_redirect: alloc_skb failed\n");
+ return;
+ }
+
+ hlen = 0;
+
+ if (ndisc_build_ll_hdr(buff, dev, &skb->nh.ipv6h->saddr, NULL, len) == 0) {
+ kfree_skb(buff);
+ return;
+ }
+
+ ip6_nd_hdr(sk, buff, dev, &ifp->addr, &skb->nh.ipv6h->saddr,
+ IPPROTO_ICMPV6, len);
+
+ icmph = (struct icmp6hdr *) skb_put(buff, len);
+
+ memset(icmph, 0, sizeof(struct icmp6hdr));
+ icmph->icmp6_type = NDISC_REDIRECT;
+
+ /*
+ * copy target and destination addresses
+ */
+
+ addrp = (struct in6_addr *)(icmph + 1);
+ ipv6_addr_copy(addrp, target);
+ addrp++;
+ ipv6_addr_copy(addrp, &skb->nh.ipv6h->daddr);
+
+ opt = (u8*) (addrp + 1);
+
+ /*
+ * include target_address option
+ */
+
+ if (dev->addr_len)
+ opt = ndisc_fill_option(opt, ND_OPT_TARGET_LL_ADDR, neigh->ha, dev->addr_len);
+
+ /*
+ * build redirect option and copy skb over to the new packet.
+ */
+
+ memset(opt, 0, 8);
+ *(opt++) = ND_OPT_REDIRECT_HDR;
+ *(opt++) = (rd_len >> 3);
+ opt += 6;
+
+ memcpy(opt, skb->nh.ipv6h, rd_len - 8);
+
+ icmph->icmp6_cksum = csum_ipv6_magic(&ifp->addr, &skb->nh.ipv6h->saddr,
+ len, IPPROTO_ICMPV6,
+ csum_partial((u8 *) icmph, len, 0));
+
+ dev_queue_xmit(buff);
+
+ icmpv6_statistics.Icmp6OutRedirects++;
+ icmpv6_statistics.Icmp6OutMsgs++;
+}
+
+static __inline__ struct neighbour *
+ndisc_recv_ns(struct in6_addr *saddr, struct sk_buff *skb)
+{
+ u8 *opt;
+
+ opt = skb->h.raw;
+ opt += sizeof(struct icmp6hdr) + sizeof(struct in6_addr);
+ opt = ndisc_find_option(opt, skb->dev->addr_len+2, skb->tail - opt, ND_OPT_SOURCE_LL_ADDR);
+
+ return neigh_event_ns(&nd_tbl, opt, saddr, skb->dev);
+}
+
+static __inline__ int ndisc_recv_na(struct neighbour *neigh, struct sk_buff *skb)
+{
+ struct nd_msg *msg = (struct nd_msg *) skb->h.raw;
+ u8 *opt;
+
+ opt = skb->h.raw;
+ opt += sizeof(struct icmp6hdr) + sizeof(struct in6_addr);
+ opt = ndisc_find_option(opt, skb->dev->addr_len+2, skb->tail - opt, ND_OPT_TARGET_LL_ADDR);
+
+ return neigh_update(neigh, opt,
+ msg->icmph.icmp6_solicited ? NUD_REACHABLE : NUD_STALE,
+ msg->icmph.icmp6_override, 1);
+}
+
+static void pndisc_redo(struct sk_buff *skb)
+{
+ ndisc_rcv(skb, skb->len);
+ kfree_skb(skb);
+}
+
+int ndisc_rcv(struct sk_buff *skb, unsigned long len)
+{
+ struct device *dev = skb->dev;
+ struct in6_addr *saddr = &skb->nh.ipv6h->saddr;
+ struct in6_addr *daddr = &skb->nh.ipv6h->daddr;
+ struct nd_msg *msg = (struct nd_msg *) skb->h.raw;
+ struct neighbour *neigh;
+ struct inet6_ifaddr *ifp;
+
+ switch (msg->icmph.icmp6_type) {
+ case NDISC_NEIGHBOUR_SOLICITATION:
+ if ((ifp = ipv6_chk_addr(&msg->target, dev, 1)) != NULL) {
+ int addr_type = ipv6_addr_type(saddr);
+
+ if (ifp->flags & ADDR_INVALID)
+ return 0;
+ if (ifp->flags & DAD_INCOMPLETE) {
+ /* Address is tentative. If the source
+ is unspecified address, it is someone
+ does DAD, otherwise we ignore solicitations
+ until DAD timer expires.
+ */
+ if (addr_type == IPV6_ADDR_ANY)
+ addrconf_dad_failure(ifp);
+ return 0;
+ }
+
+ if (addr_type == IPV6_ADDR_ANY) {
+ struct in6_addr maddr;
+
+ ipv6_addr_all_nodes(&maddr);
+ ndisc_send_na(dev, NULL, &maddr, &ifp->addr,
+ ifp->idev->cnf.forwarding, 0, 1, 1);
+ return 0;
+ }
+
+ if (addr_type & IPV6_ADDR_UNICAST) {
+ int inc = ipv6_addr_type(daddr)&IPV6_ADDR_MULTICAST;
+
+ if (inc)
+ nd_tbl.stats.rcv_probes_mcast++;
+ else
+ nd_tbl.stats.rcv_probes_ucast++;
+
+ /*
+ * update / create cache entry
+ * for the source adddress
+ */
+
+ neigh = ndisc_recv_ns(saddr, skb);
+
+ if (neigh) {
+ ndisc_send_na(dev, neigh, saddr, &ifp->addr,
+ ifp->idev->cnf.forwarding, 1, inc, inc);
+ neigh_release(neigh);
+ }
+ }
+ } else {
+ struct inet6_dev *in6_dev = ipv6_get_idev(dev);
+ int addr_type = ipv6_addr_type(saddr);
+
+ if (in6_dev && in6_dev->cnf.forwarding &&
+ (addr_type & IPV6_ADDR_UNICAST) &&
+ pneigh_lookup(&nd_tbl, &msg->target, dev, 0)) {
+ int inc = ipv6_addr_type(daddr)&IPV6_ADDR_MULTICAST;
+
+ if (skb->stamp.tv_sec == 0 ||
+ skb->pkt_type == PACKET_HOST ||
+ inc == 0 ||
+ in6_dev->nd_parms->proxy_delay == 0) {
+ if (inc)
+ nd_tbl.stats.rcv_probes_mcast++;
+ else
+ nd_tbl.stats.rcv_probes_ucast++;
+
+ neigh = ndisc_recv_ns(saddr, skb);
+
+ if (neigh) {
+ ndisc_send_na(dev, neigh, saddr, &msg->target,
+ 0, 1, 0, inc);
+ neigh_release(neigh);
+ }
+ } else {
+ /* Hack. It will be freed upon exit from
+ ndisc_rcv
+ */
+ atomic_inc(&skb->users);
+ pneigh_enqueue(&nd_tbl, in6_dev->nd_parms, skb);
+ return 0;
+ }
+ }
+ }
+ return 0;
+
+ case NDISC_NEIGHBOUR_ADVERTISEMENT:
+ if ((ipv6_addr_type(saddr)&IPV6_ADDR_MULTICAST) &&
+ msg->icmph.icmp6_solicited) {
+ ND_PRINTK0("NDISC: solicited NA is multicasted\n");
+ return 0;
+ }
+ /* BUG! Target can be link-local on ANOTHER interface. Fixed. */
+ if ((ifp = ipv6_chk_addr(&msg->target, dev, 1))) {
+ if (ifp->flags & ADDR_INVALID)
+ return 0;
+ if (ifp->flags & DAD_INCOMPLETE) {
+ addrconf_dad_failure(ifp);
+ return 0;
+ }
+ /* What should we make now? The advertisement
+ is invalid, but ndisc specs say nothing
+ about it. It could be misconfiguration, or
+ an smart proxy agent tries to help us :-)
+ */
+ ND_PRINTK0("%s: someone avertise our address!\n",
+ ifp->idev->dev->name);
+ return 0;
+ }
+ neigh = __neigh_lookup(&nd_tbl, &msg->target, skb->dev, 0);
+
+ if (neigh) {
+ if (neigh->flags & NTF_ROUTER) {
+ if (msg->icmph.icmp6_router == 0) {
+ /*
+ * Change: router to host
+ */
+ struct rt6_info *rt;
+ rt = rt6_get_dflt_router(saddr, skb->dev);
+ if (rt) {
+ /* It is safe only because
+ we aer in BH */
+ dst_release(&rt->u.dst);
+ ip6_del_rt(rt);
+ }
+ }
+ } else {
+ if (msg->icmph.icmp6_router)
+ neigh->flags |= NTF_ROUTER;
+ }
+
+ ndisc_recv_na(neigh, skb);
+ neigh_release(neigh);
+ }
+ break;
+
+ case NDISC_ROUTER_ADVERTISEMENT:
+ ndisc_router_discovery(skb);
+ break;
+
+ case NDISC_REDIRECT:
+ ndisc_redirect_rcv(skb);
+ break;
+ };
+
+ return 0;
+}
+
+#ifdef CONFIG_PROC_FS
+#ifndef CONFIG_RTNETLINK
+int ndisc_get_info(char *buffer, char **start, off_t offset, int length, int dummy)
+{
+ int len=0;
+ off_t pos=0;
+ int size;
+ unsigned long now = jiffies;
+ int i;
+
+ neigh_table_lock(&nd_tbl);
+
+ for (i = 0; i <= NEIGH_HASHMASK; i++) {
+ struct neighbour *neigh;
+
+ for (neigh = nd_tbl.hash_buckets[i]; neigh; neigh = neigh->next) {
+ int j;
+
+ size = 0;
+ for (j=0; j<16; j++) {
+ sprintf(buffer+len+size, "%02x", neigh->primary_key[j]);
+ size += 2;
+ }
+
+ size += sprintf(buffer+len+size,
+ " %02x %02x %02x %02x %08lx %08lx %08x %04x %04x %04x %8s ", i,
+ 128,
+ neigh->type,
+ neigh->nud_state,
+ now - neigh->used,
+ now - neigh->confirmed,
+ neigh->parms->reachable_time,
+ neigh->parms->gc_staletime,
+ atomic_read(&neigh->refcnt),
+ neigh->flags | (!neigh->hh ? 0 : (neigh->hh->hh_output==dev_queue_xmit ? 4 : 2)),
+ neigh->dev->name);
+
+ if ((neigh->nud_state&NUD_VALID) && neigh->dev->addr_len) {
+ for (j=0; j < neigh->dev->addr_len; j++) {
+ sprintf(buffer+len+size, "%02x", neigh->ha[j]);
+ size += 2;
+ }
+ } else {
+ size += sprintf(buffer+len+size, "000000000000");
+ }
+ size += sprintf(buffer+len+size, "\n");
+ len += size;
+ pos += size;
+
+ if (pos <= offset)
+ len=0;
+ if (pos >= offset+length)
+ goto done;
+ }
+ }
+
+done:
+ neigh_table_unlock(&nd_tbl);
+
+ *start = buffer+len-(pos-offset); /* Start of wanted data */
+ len = pos-offset; /* Start slop */
+ if (len>length)
+ len = length; /* Ending slop */
+ if (len<0)
+ len = 0;
+ return len;
+}
+
+struct proc_dir_entry ndisc_proc_entry =
+{
+ PROC_NET_NDISC, 5, "ndisc",
+ S_IFREG | S_IRUGO, 1, 0, 0,
+ 0, NULL,
+ &ndisc_get_info
+};
+#endif
+#endif /* CONFIG_PROC_FS */
+
+
+
+__initfunc(int ndisc_init(struct net_proto_family *ops))
+{
+ struct sock *sk;
+ int err;
+
+ ndisc_socket = sock_alloc();
+ if (ndisc_socket == NULL) {
+ printk(KERN_ERR
+ "Failed to create the NDISC control socket.\n");
+ return -1;
+ }
+#ifndef _HURD_
+ ndisc_socket->inode->i_uid = 0;
+ ndisc_socket->inode->i_gid = 0;
+#endif
+ ndisc_socket->type = SOCK_RAW;
+
+ if((err = ops->create(ndisc_socket, IPPROTO_ICMPV6)) < 0) {
+ printk(KERN_DEBUG
+ "Failed to initializee the NDISC control socket (err %d).\n",
+ err);
+ sock_release(ndisc_socket);
+ ndisc_socket = NULL; /* For safety. */
+ return err;
+ }
+
+ sk = ndisc_socket->sk;
+ sk->allocation = GFP_ATOMIC;
+ sk->net_pinfo.af_inet6.hop_limit = 255;
+ /* Do not loopback ndisc messages */
+ sk->net_pinfo.af_inet6.mc_loop = 0;
+ sk->num = 256;
+
+ /*
+ * Initialize the neighbour table
+ */
+
+ neigh_table_init(&nd_tbl);
+
+#ifdef CONFIG_PROC_FS
+#ifndef CONFIG_RTNETLINK
+ proc_net_register(&ndisc_proc_entry);
+#endif
+#endif
+#ifdef CONFIG_SYSCTL
+ neigh_sysctl_register(NULL, &nd_tbl.parms, NET_IPV6, NET_IPV6_NEIGH, "ipv6");
+#endif
+
+ return 0;
+}
+
+void ndisc_cleanup(void)
+{
+#ifdef CONFIG_PROC_FS
+#ifndef CONFIG_RTNETLINK
+ proc_net_unregister(ndisc_proc_entry.low_ino);
+#endif
+#endif
+ neigh_table_clear(&nd_tbl);
+ sock_release(ndisc_socket);
+ ndisc_socket = NULL; /* For safety. */
+}
diff --git a/pfinet/linux-src/net/ipv6/protocol_ipv6.c b/pfinet/linux-src/net/ipv6/protocol_ipv6.c
new file mode 100644
index 00000000..ad871914
--- /dev/null
+++ b/pfinet/linux-src/net/ipv6/protocol_ipv6.c
@@ -0,0 +1,117 @@
+/*
+ * INET An implementation of the TCP/IP protocol suite for the LINUX
+ * operating system. INET is implemented using the BSD Socket
+ * interface as the means of communication with the user level.
+ *
+ * PF_INET6 protocol dispatch tables.
+ *
+ * Version: $Id: protocol_ipv6.c,v 1.1 2007/10/08 21:12:31 stesie Exp $
+ *
+ * Authors: Pedro Roque <roque@di.fc.ul.pt>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version
+ * 2 of the License, or (at your option) any later version.
+ */
+
+#include <linux/errno.h>
+#include <linux/types.h>
+#include <linux/socket.h>
+#include <linux/sockios.h>
+#include <linux/sched.h>
+#include <linux/net.h>
+#include <linux/in6.h>
+#include <linux/netdevice.h>
+#include <linux/if_arp.h>
+
+#include <net/sock.h>
+#include <net/snmp.h>
+
+#include <net/ipv6.h>
+#include <net/protocol.h>
+
+struct inet6_protocol *inet6_protocol_base = NULL;
+struct inet6_protocol *inet6_protos[MAX_INET_PROTOS] =
+{
+ NULL
+};
+
+
+struct inet6_protocol *inet6_get_protocol(unsigned char prot)
+{
+ unsigned char hash;
+ struct inet6_protocol *p;
+
+ hash = prot & (MAX_INET_PROTOS - 1);
+ for (p = inet6_protos[hash] ; p != NULL; p=p->next) {
+ if (p->protocol == prot)
+ return((struct inet6_protocol *) p);
+ }
+ return(NULL);
+}
+
+void inet6_add_protocol(struct inet6_protocol *prot)
+{
+ unsigned char hash;
+ struct inet6_protocol *p2;
+
+ hash = prot->protocol & (MAX_INET_PROTOS - 1);
+ prot->next = inet6_protos[hash];
+ inet6_protos[hash] = prot;
+ prot->copy = 0;
+
+ /*
+ * Set the copy bit if we need to.
+ */
+
+ p2 = (struct inet6_protocol *) prot->next;
+ while(p2 != NULL) {
+ if (p2->protocol == prot->protocol) {
+ prot->copy = 1;
+ break;
+ }
+ p2 = (struct inet6_protocol *) p2->next;
+ }
+}
+
+/*
+ * Remove a protocol from the hash tables.
+ */
+
+int inet6_del_protocol(struct inet6_protocol *prot)
+{
+ struct inet6_protocol *p;
+ struct inet6_protocol *lp = NULL;
+ unsigned char hash;
+
+ hash = prot->protocol & (MAX_INET_PROTOS - 1);
+ if (prot == inet6_protos[hash]) {
+ inet6_protos[hash] = (struct inet6_protocol *) inet6_protos[hash]->next;
+ return(0);
+ }
+
+ p = (struct inet6_protocol *) inet6_protos[hash];
+ while(p != NULL) {
+ /*
+ * We have to worry if the protocol being deleted is
+ * the last one on the list, then we may need to reset
+ * someone's copied bit.
+ */
+ if (p->next != NULL && p->next == prot) {
+ /*
+ * if we are the last one with this protocol and
+ * there is a previous one, reset its copy bit.
+ */
+ if (p->copy == 0 && lp != NULL)
+ lp->copy = 0;
+ p->next = prot->next;
+ return(0);
+ }
+ if (p->next != NULL && p->next->protocol == prot->protocol)
+ lp = p;
+
+ p = (struct inet6_protocol *) p->next;
+ }
+ return(-1);
+}
diff --git a/pfinet/linux-src/net/ipv6/raw_ipv6.c b/pfinet/linux-src/net/ipv6/raw_ipv6.c
new file mode 100644
index 00000000..64bc247c
--- /dev/null
+++ b/pfinet/linux-src/net/ipv6/raw_ipv6.c
@@ -0,0 +1,691 @@
+/*
+ * RAW sockets for IPv6
+ * Linux INET6 implementation
+ *
+ * Authors:
+ * Pedro Roque <roque@di.fc.ul.pt>
+ *
+ * Adapted from linux/net/ipv4/raw.c
+ *
+ * $Id: raw_ipv6.c,v 1.2 2007/10/13 01:43:00 stesie Exp $
+ *
+ * Fixes:
+ * YOSHIFUJI,H.@USAGI : raw checksum (RFC2292(bis) compliance)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version
+ * 2 of the License, or (at your option) any later version.
+ */
+
+#include <linux/errno.h>
+#include <linux/types.h>
+#include <linux/socket.h>
+#include <linux/sockios.h>
+#include <linux/sched.h>
+#include <linux/net.h>
+#include <linux/in6.h>
+#include <linux/netdevice.h>
+#include <linux/if_arp.h>
+#include <linux/icmpv6.h>
+#include <asm/uaccess.h>
+
+#include <net/sock.h>
+#include <net/snmp.h>
+
+#include <net/ipv6.h>
+#include <net/ndisc.h>
+#include <net/protocol.h>
+#include <net/ip6_route.h>
+#include <net/addrconf.h>
+#include <net/transp_v6.h>
+
+#include <net/rawv6.h>
+
+#include <asm/uaccess.h>
+
+struct sock *raw_v6_htable[RAWV6_HTABLE_SIZE];
+
+static void raw_v6_hash(struct sock *sk)
+{
+ struct sock **skp = &raw_v6_htable[sk->num & (RAWV6_HTABLE_SIZE - 1)];
+
+ SOCKHASH_LOCK();
+ if ((sk->next = *skp) != NULL)
+ (*skp)->pprev = &sk->next;
+ *skp = sk;
+ sk->pprev = skp;
+ SOCKHASH_UNLOCK();
+}
+
+static void raw_v6_unhash(struct sock *sk)
+{
+ SOCKHASH_LOCK();
+ if (sk->pprev) {
+ if (sk->next)
+ sk->next->pprev = sk->pprev;
+ *sk->pprev = sk->next;
+ sk->pprev = NULL;
+ }
+ SOCKHASH_UNLOCK();
+}
+
+static __inline__ int inet6_mc_check(struct sock *sk, struct in6_addr *addr)
+{
+ struct ipv6_mc_socklist *mc;
+
+ for (mc = sk->net_pinfo.af_inet6.ipv6_mc_list; mc; mc=mc->next) {
+ if (ipv6_addr_cmp(&mc->addr, addr) == 0)
+ return 1;
+ }
+
+ return 0;
+}
+
+/* Grumble... icmp and ip_input want to get at this... */
+struct sock *raw_v6_lookup(struct sock *sk, unsigned short num,
+ struct in6_addr *loc_addr, struct in6_addr *rmt_addr)
+{
+ struct sock *s = sk;
+ int addr_type = ipv6_addr_type(loc_addr);
+
+ for(s = sk; s; s = s->next) {
+ if((s->num == num) &&
+ !(s->dead && (s->state == TCP_CLOSE))) {
+ struct ipv6_pinfo *np = &s->net_pinfo.af_inet6;
+
+ if (!ipv6_addr_any(&np->daddr) &&
+ ipv6_addr_cmp(&np->daddr, rmt_addr))
+ continue;
+
+ if (!ipv6_addr_any(&np->rcv_saddr)) {
+ if (ipv6_addr_cmp(&np->rcv_saddr, loc_addr) == 0)
+ return(s);
+ if ((addr_type & IPV6_ADDR_MULTICAST) &&
+ inet6_mc_check(s, loc_addr))
+ return (s);
+ continue;
+ }
+ return(s);
+ }
+ }
+ return NULL;
+}
+
+/* This cleans up af_inet6 a bit. -DaveM */
+static int rawv6_bind(struct sock *sk, struct sockaddr *uaddr, int addr_len)
+{
+ struct sockaddr_in6 *addr = (struct sockaddr_in6 *) uaddr;
+ __u32 v4addr = 0;
+ int addr_type;
+
+ /* Check these errors. */
+ if (sk->state != TCP_CLOSE || (addr_len < sizeof(struct sockaddr_in6)))
+ return -EINVAL;
+
+ addr_type = ipv6_addr_type(&addr->sin6_addr);
+
+ /* Check if the address belongs to the host. */
+ if (addr_type == IPV6_ADDR_MAPPED) {
+ /* Raw sockets are IPv6 only */
+ return(-EADDRNOTAVAIL);
+ } else {
+ if (addr_type != IPV6_ADDR_ANY) {
+ if (addr_type & IPV6_ADDR_LINKLOCAL) {
+ if (addr_len >= sizeof(struct sockaddr_in6) &&
+ addr->sin6_scope_id) {
+ /* Override any existing binding,
+ * if another one is supplied by user.
+ */
+ sk->bound_dev_if =
+ addr->sin6_scope_id;
+ }
+
+ /* Binding to link-local address requires
+ an interface */
+ if (!sk->bound_dev_if)
+ return(-EINVAL);
+
+ if (!dev_get_by_index(sk->bound_dev_if))
+ return(-ENODEV);
+ }
+
+ /* ipv4 addr of the socket is invalid. Only the
+ * unpecified and mapped address have a v4 equivalent.
+ */
+ v4addr = LOOPBACK4_IPV6;
+ if (!(addr_type & IPV6_ADDR_MULTICAST)) {
+ if (ipv6_chk_addr(&addr->sin6_addr, NULL, 0) == NULL)
+ return(-EADDRNOTAVAIL);
+ }
+ }
+ }
+
+ sk->rcv_saddr = v4addr;
+ sk->saddr = v4addr;
+ memcpy(&sk->net_pinfo.af_inet6.rcv_saddr, &addr->sin6_addr,
+ sizeof(struct in6_addr));
+ if (!(addr_type & IPV6_ADDR_MULTICAST))
+ memcpy(&sk->net_pinfo.af_inet6.saddr, &addr->sin6_addr,
+ sizeof(struct in6_addr));
+ return 0;
+}
+
+void rawv6_err(struct sock *sk, struct sk_buff *skb, struct ipv6hdr *hdr,
+ struct inet6_skb_parm *opt,
+ int type, int code, unsigned char *buff, u32 info)
+{
+ int err;
+ int harderr;
+
+ if (buff > skb->tail)
+ return;
+
+ /* Report error on raw socket, if:
+ 1. User requested recverr.
+ 2. Socket is connected (otherwise the error indication
+ is useless without recverr and error is hard.
+ */
+ if (!sk->net_pinfo.af_inet6.recverr && sk->state != TCP_ESTABLISHED)
+ return;
+
+ harderr = icmpv6_err_convert(type, code, &err);
+ if (type == ICMPV6_PKT_TOOBIG)
+ harderr = (sk->net_pinfo.af_inet6.pmtudisc == IPV6_PMTUDISC_DO);
+
+ if (sk->net_pinfo.af_inet6.recverr)
+ ipv6_icmp_error(sk, skb, err, 0, ntohl(info), buff);
+
+ if (sk->net_pinfo.af_inet6.recverr || harderr) {
+ sk->err = err;
+ sk->error_report(sk);
+ }
+}
+
+static inline int rawv6_rcv_skb(struct sock * sk, struct sk_buff * skb)
+{
+ /* Charge it to the socket. */
+ if (sock_queue_rcv_skb(sk,skb)<0) {
+ ipv6_statistics.Ip6InDiscards++;
+ kfree_skb(skb);
+ return 0;
+ }
+
+ ipv6_statistics.Ip6InDelivers++;
+ return 0;
+}
+
+/*
+ * This is next to useless...
+ * if we demultiplex in network layer we don't need the extra call
+ * just to queue the skb...
+ * maybe we could have the network decide uppon a hint if it
+ * should call raw_rcv for demultiplexing
+ */
+int rawv6_rcv(struct sock *sk, struct sk_buff *skb, unsigned long len)
+{
+ if (sk->ip_hdrincl)
+ skb->h.raw = skb->nh.raw;
+
+ rawv6_rcv_skb(sk, skb);
+ return 0;
+}
+
+
+/*
+ * This should be easy, if there is something there
+ * we return it, otherwise we block.
+ */
+
+int rawv6_recvmsg(struct sock *sk, struct msghdr *msg, int len,
+ int noblock, int flags, int *addr_len)
+{
+ struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *)msg->msg_name;
+ struct sk_buff *skb;
+ int copied, err;
+
+ if (flags & MSG_OOB)
+ return -EOPNOTSUPP;
+
+ if (addr_len)
+ *addr_len=sizeof(*sin6);
+
+ if (flags & MSG_ERRQUEUE)
+ return ipv6_recv_error(sk, msg, len);
+
+ skb = skb_recv_datagram(sk, flags, noblock, &err);
+ if (!skb)
+ goto out;
+
+ copied = skb->tail - skb->h.raw;
+ if (copied > len) {
+ copied = len;
+ msg->msg_flags |= MSG_TRUNC;
+ }
+
+ err = skb_copy_datagram_iovec(skb, 0, msg->msg_iov, copied);
+ sk->stamp=skb->stamp;
+ if (err)
+ goto out_free;
+
+ /* Copy the address. */
+ if (sin6) {
+ sin6->sin6_family = AF_INET6;
+ memcpy(&sin6->sin6_addr, &skb->nh.ipv6h->saddr,
+ sizeof(struct in6_addr));
+ sin6->sin6_flowinfo = 0;
+ sin6->sin6_scope_id = 0;
+ if (ipv6_addr_type(&sin6->sin6_addr) & IPV6_ADDR_LINKLOCAL)
+ sin6->sin6_scope_id =
+ ((struct inet6_skb_parm *) skb->cb)->iif;
+ }
+
+ if (sk->net_pinfo.af_inet6.rxopt.all)
+ datagram_recv_ctl(sk, msg, skb);
+ err = copied;
+
+out_free:
+ skb_free_datagram(sk, skb);
+out:
+ return err;
+}
+
+/*
+ * Sending...
+ */
+
+struct rawv6_fakehdr {
+ struct iovec *iov;
+ struct sock *sk;
+ __u32 len;
+ __u32 cksum;
+ __u32 proto;
+ struct in6_addr *daddr;
+};
+
+static int rawv6_getfrag(const void *data, struct in6_addr *saddr,
+ char *buff, unsigned int offset, unsigned int len)
+{
+ struct iovec *iov = (struct iovec *) data;
+
+ return memcpy_fromiovecend(buff, iov, offset, len);
+}
+
+static int rawv6_frag_cksum(const void *data, struct in6_addr *addr,
+ char *buff, unsigned int offset,
+ unsigned int len)
+{
+ struct rawv6_fakehdr *hdr = (struct rawv6_fakehdr *) data;
+
+ if (csum_partial_copy_fromiovecend(buff, hdr->iov, offset,
+ len, &hdr->cksum))
+ return -EFAULT;
+
+ if (offset == 0) {
+ struct sock *sk;
+ struct raw6_opt *opt;
+ struct in6_addr *daddr;
+
+ sk = hdr->sk;
+ opt = &sk->tp_pinfo.tp_raw;
+
+ if (hdr->daddr)
+ daddr = hdr->daddr;
+ else
+ daddr = addr + 1;
+
+ hdr->cksum = csum_ipv6_magic(addr, daddr, hdr->len,
+ hdr->proto, hdr->cksum);
+
+ if (opt->offset + 1 < len) {
+ __u16 *csum;
+
+ csum = (__u16 *) (buff + opt->offset);
+ if (*csum) {
+ /* in case cksum was not initialized */
+ __u32 sum = hdr->cksum;
+ sum += *csum;
+ *csum = hdr->cksum = (sum + (sum>>16));
+ } else {
+ *csum = hdr->cksum;
+ }
+ } else {
+ if (net_ratelimit())
+ printk(KERN_DEBUG "icmp: cksum offset too big\n");
+ return -EINVAL;
+ }
+ }
+ return 0;
+}
+
+
+static int rawv6_sendmsg(struct sock *sk, struct msghdr *msg, int len)
+{
+ struct ipv6_txoptions opt_space;
+ struct sockaddr_in6 * sin6 = (struct sockaddr_in6 *) msg->msg_name;
+ struct ipv6_pinfo *np = &sk->net_pinfo.af_inet6;
+ struct ipv6_txoptions *opt = NULL;
+ struct ip6_flowlabel *flowlabel = NULL;
+ struct flowi fl;
+ int addr_len = msg->msg_namelen;
+ struct in6_addr *daddr;
+ struct raw6_opt *raw_opt;
+ int hlimit = -1;
+ u16 proto;
+ int err;
+
+ /* Rough check on arithmetic overflow,
+ better check is made in ip6_build_xmit
+ */
+ if (len < 0)
+ return -EMSGSIZE;
+
+ /* Mirror BSD error message compatibility */
+ if (msg->msg_flags & MSG_OOB)
+ return -EOPNOTSUPP;
+
+ if (msg->msg_flags & ~(MSG_DONTROUTE|MSG_DONTWAIT))
+ return(-EINVAL);
+ /*
+ * Get and verify the address.
+ */
+
+ fl.fl6_flowlabel = 0;
+
+ if (sin6) {
+ if (addr_len < sizeof(struct sockaddr_in6))
+ return(-EINVAL);
+
+ if (sin6->sin6_family && sin6->sin6_family != AF_INET6)
+ return(-EINVAL);
+
+ /* port is the proto value [0..255] carried in nexthdr */
+ proto = ntohs(sin6->sin6_port);
+
+ if (!proto)
+ proto = sk->num;
+
+ if (proto > 255)
+ return(-EINVAL);
+
+ daddr = &sin6->sin6_addr;
+ if (np->sndflow) {
+ fl.fl6_flowlabel = sin6->sin6_flowinfo&IPV6_FLOWINFO_MASK;
+ if (fl.fl6_flowlabel&IPV6_FLOWLABEL_MASK) {
+ flowlabel = fl6_sock_lookup(sk, fl.fl6_flowlabel);
+ if (flowlabel == NULL)
+ return -EINVAL;
+ daddr = &flowlabel->dst;
+ }
+ }
+
+
+ /* Otherwise it will be difficult to maintain sk->dst_cache. */
+ if (sk->state == TCP_ESTABLISHED &&
+ !ipv6_addr_cmp(daddr, &sk->net_pinfo.af_inet6.daddr))
+ daddr = &sk->net_pinfo.af_inet6.daddr;
+
+ if (addr_len >= sizeof(struct sockaddr_in6) &&
+ sin6->sin6_scope_id &&
+ ipv6_addr_type(daddr)&IPV6_ADDR_LINKLOCAL)
+ fl.oif = sin6->sin6_scope_id;
+ } else {
+ if (sk->state != TCP_ESTABLISHED)
+ return(-EINVAL);
+
+ proto = sk->num;
+ daddr = &(sk->net_pinfo.af_inet6.daddr);
+ fl.fl6_flowlabel = np->flow_label;
+ }
+
+ if (ipv6_addr_any(daddr)) {
+ /*
+ * unspecfied destination address
+ * treated as error... is this correct ?
+ */
+ return(-EINVAL);
+ }
+
+ fl.oif = sk->bound_dev_if;
+ fl.fl6_src = NULL;
+
+ if (msg->msg_controllen) {
+ opt = &opt_space;
+ memset(opt, 0, sizeof(struct ipv6_txoptions));
+
+ err = datagram_send_ctl(msg, &fl, opt, &hlimit);
+ if (err < 0) {
+ fl6_sock_release(flowlabel);
+ return err;
+ }
+ if ((fl.fl6_flowlabel&IPV6_FLOWLABEL_MASK) && !flowlabel) {
+ flowlabel = fl6_sock_lookup(sk, fl.fl6_flowlabel);
+ if (flowlabel == NULL)
+ return -EINVAL;
+ }
+ if (!(opt->opt_nflen|opt->opt_flen))
+ opt = NULL;
+ }
+ if (opt == NULL)
+ opt = np->opt;
+ if (flowlabel)
+ opt = fl6_merge_options(&opt_space, flowlabel, opt);
+
+ raw_opt = &sk->tp_pinfo.tp_raw;
+
+ fl.proto = proto;
+ fl.fl6_dst = daddr;
+ fl.uli_u.icmpt.type = 0;
+ fl.uli_u.icmpt.code = 0;
+
+ if (raw_opt->checksum) {
+ struct rawv6_fakehdr hdr;
+
+ hdr.iov = msg->msg_iov;
+ hdr.sk = sk;
+ hdr.len = len;
+ hdr.cksum = 0;
+ hdr.proto = proto;
+
+ if (opt && opt->srcrt)
+ hdr.daddr = daddr;
+ else
+ hdr.daddr = NULL;
+
+ err = ip6_build_xmit(sk, rawv6_frag_cksum, &hdr, &fl, len,
+ opt, hlimit, msg->msg_flags);
+ } else {
+ err = ip6_build_xmit(sk, rawv6_getfrag, msg->msg_iov, &fl, len,
+ opt, hlimit, msg->msg_flags);
+ }
+
+ fl6_sock_release(flowlabel);
+
+ return err<0?err:len;
+}
+
+static int rawv6_seticmpfilter(struct sock *sk, int level, int optname,
+ char *optval, int optlen)
+{
+ switch (optname) {
+ case ICMPV6_FILTER:
+ if (optlen > sizeof(struct icmp6_filter))
+ optlen = sizeof(struct icmp6_filter);
+ if (copy_from_user(&sk->tp_pinfo.tp_raw.filter, optval, optlen))
+ return -EFAULT;
+ return 0;
+ default:
+ return -ENOPROTOOPT;
+ };
+
+ return 0;
+}
+
+static int rawv6_geticmpfilter(struct sock *sk, int level, int optname,
+ char *optval, int *optlen)
+{
+ int len;
+
+ switch (optname) {
+ case ICMPV6_FILTER:
+ if (get_user(len, optlen))
+ return -EFAULT;
+ if (len > sizeof(struct icmp6_filter))
+ len = sizeof(struct icmp6_filter);
+ if (put_user(len, optlen))
+ return -EFAULT;
+ if (copy_to_user(optval, &sk->tp_pinfo.tp_raw.filter, len))
+ return -EFAULT;
+ return 0;
+ default:
+ return -ENOPROTOOPT;
+ };
+
+ return 0;
+}
+
+
+static int rawv6_setsockopt(struct sock *sk, int level, int optname,
+ char *optval, int optlen)
+{
+ struct raw6_opt *opt = &sk->tp_pinfo.tp_raw;
+ int val;
+
+ switch(level) {
+ case SOL_RAW:
+ break;
+
+ case SOL_ICMPV6:
+ if (sk->num != IPPROTO_ICMPV6)
+ return -EOPNOTSUPP;
+ return rawv6_seticmpfilter(sk, level, optname, optval,
+ optlen);
+ case SOL_IPV6:
+ if (optname == IPV6_CHECKSUM)
+ break;
+ default:
+ return ipv6_setsockopt(sk, level, optname, optval,
+ optlen);
+ };
+
+ if (get_user(val, (int *)optval))
+ return -EFAULT;
+
+ switch (optname) {
+ case IPV6_CHECKSUM:
+ /* You may get strange result with a positive odd offset;
+ RFC2292bis agrees with me. */
+ if (val > 0 && (val&1))
+ return(-EINVAL);
+ if (val < 0) {
+ opt->checksum = 0;
+ } else {
+ opt->checksum = 1;
+ opt->offset = val;
+ }
+
+ return 0;
+ break;
+
+ default:
+ return(-ENOPROTOOPT);
+ }
+}
+
+static int rawv6_getsockopt(struct sock *sk, int level, int optname,
+ char *optval, int *optlen)
+{
+ struct raw6_opt *opt = &sk->tp_pinfo.tp_raw;
+ int val, len;
+
+ switch(level) {
+ case SOL_RAW:
+ break;
+
+ case SOL_ICMPV6:
+ if (sk->num != IPPROTO_ICMPV6)
+ return -EOPNOTSUPP;
+ return rawv6_geticmpfilter(sk, level, optname, optval,
+ optlen);
+ case SOL_IPV6:
+ if (optname == IPV6_CHECKSUM)
+ break;
+ default:
+ return ipv6_getsockopt(sk, level, optname, optval,
+ optlen);
+ };
+
+ if (get_user(len,optlen))
+ return -EFAULT;
+
+ switch (optname) {
+ case IPV6_CHECKSUM:
+ if (opt->checksum == 0)
+ val = -1;
+ else
+ val = opt->offset;
+
+ default:
+ return -ENOPROTOOPT;
+ }
+
+ len=min(sizeof(int),len);
+
+ if (put_user(len, optlen))
+ return -EFAULT;
+ if (copy_to_user(optval,&val,len))
+ return -EFAULT;
+ return 0;
+}
+
+
+static void rawv6_close(struct sock *sk, long timeout)
+{
+ /* See for explanation: raw_close in ipv4/raw.c */
+ sk->state = TCP_CLOSE;
+ raw_v6_unhash(sk);
+ if (sk->num == IPPROTO_RAW)
+ ip6_ra_control(sk, -1, NULL);
+ sk->dead = 1;
+ destroy_sock(sk);
+}
+
+static int rawv6_init_sk(struct sock *sk)
+{
+ if (sk->num == IPPROTO_ICMPV6){
+ struct raw6_opt *opt = &sk->tp_pinfo.tp_raw;
+ opt->checksum = 1;
+ opt->offset = 2;
+ }
+ return(0);
+}
+
+struct proto rawv6_prot = {
+ (struct sock *)&rawv6_prot, /* sklist_next */
+ (struct sock *)&rawv6_prot, /* sklist_prev */
+ rawv6_close, /* close */
+ udpv6_connect, /* connect */
+ NULL, /* accept */
+ NULL, /* retransmit */
+ NULL, /* write_wakeup */
+ NULL, /* read_wakeup */
+ datagram_poll, /* poll */
+ NULL, /* ioctl */
+ rawv6_init_sk, /* init */
+ inet6_destroy_sock, /* destroy */
+ NULL, /* shutdown */
+ rawv6_setsockopt, /* setsockopt */
+ rawv6_getsockopt, /* getsockopt */
+ rawv6_sendmsg, /* sendmsg */
+ rawv6_recvmsg, /* recvmsg */
+ rawv6_bind, /* bind */
+ rawv6_rcv_skb, /* backlog_rcv */
+ raw_v6_hash, /* hash */
+ raw_v6_unhash, /* unhash */
+ NULL, /* get_port */
+ 128, /* max_header */
+ 0, /* retransmits */
+ "RAW", /* name */
+ 0, /* inuse */
+ 0 /* highestinuse */
+};
diff --git a/pfinet/linux-src/net/ipv6/reassembly.c b/pfinet/linux-src/net/ipv6/reassembly.c
new file mode 100644
index 00000000..3e1575dd
--- /dev/null
+++ b/pfinet/linux-src/net/ipv6/reassembly.c
@@ -0,0 +1,492 @@
+/*
+ * IPv6 fragment reassembly
+ * Linux INET6 implementation
+ *
+ * Authors:
+ * Pedro Roque <roque@di.fc.ul.pt>
+ *
+ * $Id: reassembly.c,v 1.1 2007/10/08 21:12:31 stesie Exp $
+ *
+ * Based on: net/ipv4/ip_fragment.c
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version
+ * 2 of the License, or (at your option) any later version.
+ */
+
+/*
+ * Fixes:
+ * Andi Kleen Make it work with multiple hosts.
+ * More RFC compliance.
+ */
+#include <linux/errno.h>
+#include <linux/types.h>
+#include <linux/socket.h>
+#include <linux/sockios.h>
+#include <linux/sched.h>
+#include <linux/net.h>
+#include <linux/netdevice.h>
+#include <linux/in6.h>
+#include <linux/ipv6.h>
+#include <linux/icmpv6.h>
+
+#include <net/sock.h>
+#include <net/snmp.h>
+
+#include <net/ipv6.h>
+#include <net/protocol.h>
+#include <net/transp_v6.h>
+#include <net/rawv6.h>
+#include <net/ndisc.h>
+#include <net/addrconf.h>
+
+int sysctl_ip6frag_high_thresh = 256*1024;
+int sysctl_ip6frag_low_thresh = 192*1024;
+int sysctl_ip6frag_time = IPV6_FRAG_TIMEOUT;
+
+atomic_t ip6_frag_mem = ATOMIC_INIT(0);
+
+struct ipv6_frag {
+ __u16 offset;
+ __u16 len;
+ struct sk_buff *skb;
+
+ struct frag_hdr *fhdr;
+
+ struct ipv6_frag *next;
+};
+
+/*
+ * Equivalent of ipv4 struct ipq
+ */
+
+struct frag_queue {
+
+ struct frag_queue *next;
+ struct frag_queue *prev;
+
+ __u32 id; /* fragment id */
+ struct in6_addr saddr;
+ struct in6_addr daddr;
+ struct timer_list timer; /* expire timer */
+ struct ipv6_frag *fragments;
+ struct device *dev;
+ int iif;
+ __u8 last_in; /* has first/last segment arrived? */
+#define FIRST_IN 2
+#define LAST_IN 1
+ __u8 nexthdr;
+ __u16 nhoffset;
+};
+
+static struct frag_queue ipv6_frag_queue = {
+ &ipv6_frag_queue, &ipv6_frag_queue,
+ 0, {{{0}}}, {{{0}}},
+ {0}, NULL, NULL,
+ 0, 0, 0, 0
+};
+
+/* Memory Tracking Functions. */
+extern __inline__ void frag_kfree_skb(struct sk_buff *skb)
+{
+ atomic_sub(skb->truesize, &ip6_frag_mem);
+ kfree_skb(skb);
+}
+
+extern __inline__ void frag_kfree_s(void *ptr, int len)
+{
+ atomic_sub(len, &ip6_frag_mem);
+ kfree(ptr);
+}
+
+extern __inline__ void *frag_kmalloc(int size, int pri)
+{
+ void *vp = kmalloc(size, pri);
+
+ if(!vp)
+ return NULL;
+ atomic_add(size, &ip6_frag_mem);
+ return vp;
+}
+
+
+static void create_frag_entry(struct sk_buff *skb,
+ __u8 *nhptr,
+ struct frag_hdr *fhdr);
+static u8 * reasm_frag(struct frag_queue *fq,
+ struct sk_buff **skb_in);
+
+static void reasm_queue(struct frag_queue *fq,
+ struct sk_buff *skb,
+ struct frag_hdr *fhdr,
+ u8 *nhptr);
+
+static void fq_free(struct frag_queue *fq);
+
+static void frag_prune(void)
+{
+ struct frag_queue *fq;
+
+ while ((fq = ipv6_frag_queue.next) != &ipv6_frag_queue) {
+ ipv6_statistics.Ip6ReasmFails++;
+ fq_free(fq);
+ if (atomic_read(&ip6_frag_mem) <= sysctl_ip6frag_low_thresh)
+ return;
+ }
+ if (atomic_read(&ip6_frag_mem))
+ printk(KERN_DEBUG "IPv6 frag_prune: memleak\n");
+ atomic_set(&ip6_frag_mem, 0);
+}
+
+
+u8* ipv6_reassembly(struct sk_buff **skbp, __u8 *nhptr)
+{
+ struct sk_buff *skb = *skbp;
+ struct frag_hdr *fhdr = (struct frag_hdr *) (skb->h.raw);
+ struct frag_queue *fq;
+ struct ipv6hdr *hdr;
+
+ hdr = skb->nh.ipv6h;
+
+ ipv6_statistics.Ip6ReasmReqds++;
+
+ /* Jumbo payload inhibits frag. header */
+ if (hdr->payload_len==0) {
+ icmpv6_param_prob(skb, ICMPV6_HDR_FIELD, skb->h.raw);
+ return NULL;
+ }
+ if ((u8 *)(fhdr+1) > skb->tail) {
+ icmpv6_param_prob(skb, ICMPV6_HDR_FIELD, skb->h.raw);
+ return NULL;
+ }
+ if (atomic_read(&ip6_frag_mem) > sysctl_ip6frag_high_thresh)
+ frag_prune();
+
+ for (fq = ipv6_frag_queue.next; fq != &ipv6_frag_queue; fq = fq->next) {
+ if (fq->id == fhdr->identification &&
+ !ipv6_addr_cmp(&hdr->saddr, &fq->saddr) &&
+ !ipv6_addr_cmp(&hdr->daddr, &fq->daddr)) {
+
+ reasm_queue(fq, skb, fhdr, nhptr);
+
+ if (fq->last_in == (FIRST_IN|LAST_IN))
+ return reasm_frag(fq, skbp);
+
+ return NULL;
+ }
+ }
+
+ create_frag_entry(skb, nhptr, fhdr);
+
+ return NULL;
+}
+
+
+static void fq_free(struct frag_queue *fq)
+{
+ struct ipv6_frag *fp, *back;
+
+ del_timer(&fq->timer);
+
+ for (fp = fq->fragments; fp; ) {
+ frag_kfree_skb(fp->skb);
+ back = fp;
+ fp=fp->next;
+ frag_kfree_s(back, sizeof(*back));
+ }
+
+ fq->prev->next = fq->next;
+ fq->next->prev = fq->prev;
+
+ fq->prev = fq->next = NULL;
+
+ frag_kfree_s(fq, sizeof(*fq));
+}
+
+static void frag_expire(unsigned long data)
+{
+ struct frag_queue *fq;
+ struct ipv6_frag *frag;
+
+ fq = (struct frag_queue *) data;
+
+ frag = fq->fragments;
+
+ ipv6_statistics.Ip6ReasmTimeout++;
+ ipv6_statistics.Ip6ReasmFails++;
+
+ if (frag == NULL) {
+ printk(KERN_DEBUG "invalid fragment queue\n");
+ return;
+ }
+
+ /* Send error only if the first segment arrived.
+ (fixed --ANK (980728))
+ */
+ if (fq->last_in&FIRST_IN) {
+ struct device *dev = dev_get_by_index(fq->iif);
+
+ /*
+ But use as source device on which LAST ARRIVED
+ segment was received. And do not use fq->dev
+ pointer directly, device might already disappeared.
+ */
+ if (dev) {
+ frag->skb->dev = dev;
+ icmpv6_send(frag->skb, ICMPV6_TIME_EXCEED, ICMPV6_EXC_FRAGTIME, 0,
+ dev);
+ }
+ }
+
+ fq_free(fq);
+}
+
+
+static void create_frag_entry(struct sk_buff *skb,
+ __u8 *nhptr,
+ struct frag_hdr *fhdr)
+{
+ struct frag_queue *fq;
+ struct ipv6hdr *hdr;
+
+ fq = (struct frag_queue *) frag_kmalloc(sizeof(struct frag_queue),
+ GFP_ATOMIC);
+
+ if (fq == NULL) {
+ ipv6_statistics.Ip6ReasmFails++;
+ kfree_skb(skb);
+ return;
+ }
+
+ memset(fq, 0, sizeof(struct frag_queue));
+
+ fq->id = fhdr->identification;
+
+ hdr = skb->nh.ipv6h;
+ ipv6_addr_copy(&fq->saddr, &hdr->saddr);
+ ipv6_addr_copy(&fq->daddr, &hdr->daddr);
+
+ /* init_timer has been done by the memset */
+ fq->timer.function = frag_expire;
+ fq->timer.data = (long) fq;
+ fq->timer.expires = jiffies + sysctl_ip6frag_time;
+
+ reasm_queue(fq, skb, fhdr, nhptr);
+
+ if (fq->fragments) {
+ fq->prev = ipv6_frag_queue.prev;
+ fq->next = &ipv6_frag_queue;
+ fq->prev->next = fq;
+ ipv6_frag_queue.prev = fq;
+
+ add_timer(&fq->timer);
+ } else
+ frag_kfree_s(fq, sizeof(*fq));
+}
+
+
+/*
+ * We queue the packet even if it's the last.
+ * It's a trade off. This allows the reassembly
+ * code to be simpler (=faster) and of the
+ * steps we do for queueing the only unnecessary
+ * one it's the kmalloc for a struct ipv6_frag.
+ * Feel free to try other alternatives...
+ */
+
+static void reasm_queue(struct frag_queue *fq, struct sk_buff *skb,
+ struct frag_hdr *fhdr, u8 *nhptr)
+{
+ struct ipv6_frag *nfp, *fp, **bptr;
+
+ nfp = (struct ipv6_frag *) frag_kmalloc(sizeof(struct ipv6_frag),
+ GFP_ATOMIC);
+
+ if (nfp == NULL) {
+ kfree_skb(skb);
+ return;
+ }
+
+ nfp->offset = ntohs(fhdr->frag_off) & ~0x7;
+ nfp->len = (ntohs(skb->nh.ipv6h->payload_len) -
+ ((u8 *) (fhdr + 1) - (u8 *) (skb->nh.ipv6h + 1)));
+
+ if ((u32)nfp->offset + (u32)nfp->len >= 65536) {
+ icmpv6_param_prob(skb,ICMPV6_HDR_FIELD, (u8*)&fhdr->frag_off);
+ goto err;
+ }
+ if (fhdr->frag_off & __constant_htons(0x0001)) {
+ /* Check if the fragment is rounded to 8 bytes.
+ * Required by the RFC.
+ * ... and would break our defragmentation algorithm 8)
+ */
+ if (nfp->len & 0x7) {
+ printk(KERN_DEBUG "fragment not rounded to 8bytes\n");
+
+ /*
+ It is not in specs, but I see no reasons
+ to send an error in this case. --ANK
+ */
+ if (nfp->offset == 0)
+ icmpv6_param_prob(skb, ICMPV6_HDR_FIELD,
+ &skb->nh.ipv6h->payload_len);
+ goto err;
+ }
+ }
+
+ nfp->skb = skb;
+ nfp->fhdr = fhdr;
+ nfp->next = NULL;
+
+ bptr = &fq->fragments;
+
+ for (fp = fq->fragments; fp; fp=fp->next) {
+ if (nfp->offset <= fp->offset)
+ break;
+ bptr = &fp->next;
+ }
+ if (fp && fp->offset == nfp->offset) {
+ if (nfp->len != fp->len) {
+ printk(KERN_DEBUG "reasm_queue: dup with wrong len\n");
+ }
+
+ /* duplicate. discard it. */
+ goto err;
+ }
+
+ atomic_add(skb->truesize, &ip6_frag_mem);
+
+ /* All the checks are done, fragment is acepted.
+ Only now we are allowed to update reassembly data!
+ (fixed --ANK (980728))
+ */
+
+ /* iif always set to one of the last arrived segment */
+ fq->dev = skb->dev;
+ fq->iif = skb->dev->ifindex;
+
+ /* Last fragment */
+ if ((fhdr->frag_off & __constant_htons(0x0001)) == 0)
+ fq->last_in |= LAST_IN;
+
+ /* First fragment.
+ nexthdr and nhptr are get from the first fragment.
+ Moreover, nexthdr is UNDEFINED for all the fragments but the
+ first one.
+ (fixed --ANK (980728))
+ */
+ if (nfp->offset == 0) {
+ fq->nexthdr = fhdr->nexthdr;
+ fq->last_in |= FIRST_IN;
+ fq->nhoffset = nhptr - skb->nh.raw;
+ }
+
+ *bptr = nfp;
+ nfp->next = fp;
+ return;
+
+err:
+ frag_kfree_s(nfp, sizeof(*nfp));
+ kfree_skb(skb);
+}
+
+/*
+ * check if this fragment completes the packet
+ * returns true on success
+ */
+static u8* reasm_frag(struct frag_queue *fq, struct sk_buff **skb_in)
+{
+ struct ipv6_frag *fp;
+ struct ipv6_frag *head = fq->fragments;
+ struct ipv6_frag *tail = NULL;
+ struct sk_buff *skb;
+ __u32 offset = 0;
+ __u32 payload_len;
+ __u16 unfrag_len;
+ __u16 copy;
+ u8 *nhptr;
+
+ for(fp = head; fp; fp=fp->next) {
+ if (offset != fp->offset)
+ return NULL;
+
+ offset += fp->len;
+ tail = fp;
+ }
+
+ /*
+ * we know the m_flag arrived and we have a queue,
+ * starting from 0, without gaps.
+ * this means we have all fragments.
+ */
+
+ /* Unfragmented part is taken from the first segment.
+ (fixed --ANK (980728))
+ */
+ unfrag_len = (u8 *) (head->fhdr) - (u8 *) (head->skb->nh.ipv6h + 1);
+
+ payload_len = (unfrag_len + tail->offset +
+ (tail->skb->tail - (__u8 *) (tail->fhdr + 1)));
+
+ if (payload_len > 65535) {
+ if (net_ratelimit())
+ printk(KERN_DEBUG "reasm_frag: payload len = %d\n", payload_len);
+ ipv6_statistics.Ip6ReasmFails++;
+ fq_free(fq);
+ return NULL;
+ }
+
+ if ((skb = dev_alloc_skb(sizeof(struct ipv6hdr) + payload_len))==NULL) {
+ if (net_ratelimit())
+ printk(KERN_DEBUG "reasm_frag: no memory for reassembly\n");
+ ipv6_statistics.Ip6ReasmFails++;
+ fq_free(fq);
+ return NULL;
+ }
+
+ copy = unfrag_len + sizeof(struct ipv6hdr);
+
+ skb->nh.ipv6h = (struct ipv6hdr *) skb->data;
+ skb->dev = fq->dev;
+ skb->protocol = __constant_htons(ETH_P_IPV6);
+ skb->pkt_type = head->skb->pkt_type;
+ memcpy(skb->cb, head->skb->cb, sizeof(skb->cb));
+ skb->dst = dst_clone(head->skb->dst);
+
+ memcpy(skb_put(skb, copy), head->skb->nh.ipv6h, copy);
+ nhptr = skb->nh.raw + fq->nhoffset;
+ *nhptr = fq->nexthdr;
+
+ skb->h.raw = skb->tail;
+
+ skb->nh.ipv6h->payload_len = ntohs(payload_len);
+
+ *skb_in = skb;
+
+ /*
+ * FIXME: If we don't have a checksum we ought to be able
+ * to defragment and checksum in this pass. [AC]
+ * Note that we don't really know yet whether the protocol
+ * needs checksums at all. It might still be a good idea. -AK
+ */
+ for(fp = fq->fragments; fp; ) {
+ struct ipv6_frag *back;
+
+ memcpy(skb_put(skb, fp->len), (__u8*)(fp->fhdr + 1), fp->len);
+ frag_kfree_skb(fp->skb);
+ back = fp;
+ fp=fp->next;
+ frag_kfree_s(back, sizeof(*back));
+ }
+
+ del_timer(&fq->timer);
+ fq->prev->next = fq->next;
+ fq->next->prev = fq->prev;
+ fq->prev = fq->next = NULL;
+
+ frag_kfree_s(fq, sizeof(*fq));
+
+ ipv6_statistics.Ip6ReasmOKs++;
+ return nhptr;
+}
diff --git a/pfinet/linux-src/net/ipv6/route_ipv6.c b/pfinet/linux-src/net/ipv6/route_ipv6.c
new file mode 100644
index 00000000..5f79a226
--- /dev/null
+++ b/pfinet/linux-src/net/ipv6/route_ipv6.c
@@ -0,0 +1,1974 @@
+/*
+ * Linux INET6 implementation
+ * FIB front-end.
+ *
+ * Authors:
+ * Pedro Roque <roque@di.fc.ul.pt>
+ *
+ * $Id: route_ipv6.c,v 1.2 2007/10/08 21:59:10 stesie Exp $
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version
+ * 2 of the License, or (at your option) any later version.
+ */
+
+#include <linux/config.h>
+#include <linux/errno.h>
+#include <linux/types.h>
+#include <linux/socket.h>
+#include <linux/sockios.h>
+#include <linux/net.h>
+#include <linux/route.h>
+#include <linux/netdevice.h>
+#include <linux/in6.h>
+#include <linux/init.h>
+#include <linux/netlink.h>
+#include <linux/if_arp.h>
+
+#ifdef CONFIG_PROC_FS
+#include <linux/proc_fs.h>
+#endif
+
+#include <net/snmp.h>
+#include <net/ipv6.h>
+#include <net/ip6_fib.h>
+#include <net/ip6_route.h>
+#include <net/ndisc.h>
+#include <net/addrconf.h>
+#include <net/tcp.h>
+#include <linux/netlink.h>
+#include <linux/rtnetlink.h>
+
+#include <asm/uaccess.h>
+
+#ifdef CONFIG_SYSCTL
+#include <linux/sysctl.h>
+#endif
+
+#undef CONFIG_RT6_POLICY
+
+/* Set to 3 to get tracing. */
+#define RT6_DEBUG 2
+
+#if RT6_DEBUG >= 3
+#define RDBG(x) printk x
+#define RT6_TRACE(x...) printk(KERN_DEBUG x)
+#else
+#define RDBG(x)
+#define RT6_TRACE(x...) do { ; } while (0)
+#endif
+
+#if RT6_DEBUG >= 1
+#define BUG_TRAP(x) ({ if (!(x)) { printk("Assertion (" #x ") failed at " __FILE__ "(%d):" __FUNCTION__ "\n", __LINE__); } })
+#else
+#define BUG_TRAP(x) do { ; } while (0)
+#endif
+
+
+int ip6_rt_max_size = 4096;
+int ip6_rt_gc_min_interval = 5*HZ;
+int ip6_rt_gc_timeout = 60*HZ;
+int ip6_rt_gc_interval = 30*HZ;
+int ip6_rt_gc_elasticity = 9;
+int ip6_rt_mtu_expires = 10*60*HZ;
+
+static struct rt6_info * ip6_rt_copy(struct rt6_info *ort);
+static struct dst_entry *ip6_dst_check(struct dst_entry *dst, u32 cookie);
+static struct dst_entry *ip6_dst_reroute(struct dst_entry *dst,
+ struct sk_buff *skb);
+static struct dst_entry *ip6_negative_advice(struct dst_entry *);
+static int ip6_dst_gc(void);
+
+static int ip6_pkt_discard(struct sk_buff *skb);
+static void ip6_link_failure(struct sk_buff *skb);
+
+struct dst_ops ip6_dst_ops = {
+ AF_INET6,
+ __constant_htons(ETH_P_IPV6),
+ 1024,
+
+ ip6_dst_gc,
+ ip6_dst_check,
+ ip6_dst_reroute,
+ NULL,
+ ip6_negative_advice,
+ ip6_link_failure,
+};
+
+struct rt6_info ip6_null_entry = {
+ {{NULL, ATOMIC_INIT(1), ATOMIC_INIT(1), &loopback_dev,
+ -1, 0, 0, 0, 0, 0, 0, 0, 0,
+ -ENETUNREACH, NULL, NULL,
+ ip6_pkt_discard, ip6_pkt_discard,
+#ifdef CONFIG_NET_CLS_ROUTE
+ 0,
+#endif
+ &ip6_dst_ops}},
+ NULL, {{{0}}}, RTF_REJECT|RTF_NONEXTHOP, ~0U,
+ 255, ATOMIC_INIT(1), {NULL}, {{{{0}}}, 0}, {{{{0}}}, 0}
+};
+
+struct fib6_node ip6_routing_table = {
+ NULL, NULL, NULL, NULL,
+ &ip6_null_entry,
+ 0, RTN_ROOT|RTN_TL_ROOT|RTN_RTINFO, 0
+};
+
+#ifdef CONFIG_RT6_POLICY
+int ip6_rt_policy = 0;
+
+struct pol_chain *rt6_pol_list = NULL;
+
+
+static int rt6_flow_match_in(struct rt6_info *rt, struct sk_buff *skb);
+static int rt6_flow_match_out(struct rt6_info *rt, struct sock *sk);
+
+static struct rt6_info *rt6_flow_lookup(struct rt6_info *rt,
+ struct in6_addr *daddr,
+ struct in6_addr *saddr,
+ struct fl_acc_args *args);
+
+#else
+#define ip6_rt_policy (0)
+#endif
+
+/*
+ * Route lookup
+ */
+
+static __inline__ struct rt6_info *rt6_device_match(struct rt6_info *rt,
+ int oif,
+ int strict)
+{
+ struct rt6_info *local = NULL;
+ struct rt6_info *sprt;
+
+ if (oif) {
+ for (sprt = rt; sprt; sprt = sprt->u.next) {
+ struct device *dev = sprt->rt6i_dev;
+ if (dev->ifindex == oif)
+ return sprt;
+ if (dev->flags&IFF_LOOPBACK)
+ local = sprt;
+ }
+
+ if (local)
+ return local;
+
+ if (strict)
+ return &ip6_null_entry;
+ }
+ return rt;
+}
+
+/*
+ * pointer to the last default router chosen
+ */
+static struct rt6_info *rt6_dflt_pointer = NULL;
+
+static struct rt6_info *rt6_best_dflt(struct rt6_info *rt, int oif)
+{
+ struct rt6_info *match = NULL;
+ struct rt6_info *sprt;
+ int mpri = 0;
+
+ for (sprt = rt; sprt; sprt = sprt->u.next) {
+ struct neighbour *neigh;
+
+ RDBG(("sprt(%p): ", sprt));
+ if ((neigh = sprt->rt6i_nexthop)) {
+ int m = -1;
+
+ RDBG(("nxthop(%p,%d) ", neigh, neigh->nud_state));
+ switch (neigh->nud_state) {
+ case NUD_REACHABLE:
+ RDBG(("NUD_REACHABLE "));
+ if (sprt != rt6_dflt_pointer) {
+ rt = sprt;
+ RDBG(("sprt!=dflt_ptr -> %p\n",
+ sprt));
+ goto out;
+ }
+ RDBG(("m=2, "));
+ m = 2;
+ break;
+
+ case NUD_DELAY:
+ RDBG(("NUD_DELAY, m=1, "));
+ m = 1;
+ break;
+
+ case NUD_STALE:
+ RDBG(("NUD_STALE, m=1, "));
+ m = 1;
+ break;
+ };
+
+ if (oif && sprt->rt6i_dev->ifindex == oif) {
+ m += 2;
+ }
+
+ if (m >= mpri) {
+ RDBG(("m>=mpri setmatch, "));
+ mpri = m;
+ match = sprt;
+ }
+ }
+ }
+
+ if (match) {
+ RDBG(("match, set rt, "));
+ rt = match;
+ } else {
+ /*
+ * No default routers are known to be reachable.
+ * SHOULD round robin
+ */
+ RDBG(("!match, trying rt6_dflt_pointer, "));
+ if (rt6_dflt_pointer) {
+ struct rt6_info *next;
+
+ if ((next = rt6_dflt_pointer->u.next) &&
+ next->u.dst.error == 0)
+ rt = next;
+ }
+ }
+
+out:
+ rt6_dflt_pointer = rt;
+ RDBG(("returning %p, dflt_ptr set\n", rt));
+ return rt;
+}
+
+struct rt6_info *rt6_lookup(struct in6_addr *daddr, struct in6_addr *saddr,
+ int oif, int strict)
+{
+ struct fib6_node *fn;
+ struct rt6_info *rt;
+
+ start_bh_atomic();
+ fn = fib6_lookup(&ip6_routing_table, daddr, saddr);
+ rt = rt6_device_match(fn->leaf, oif, strict);
+ atomic_inc(&rt->u.dst.use);
+ atomic_inc(&rt->u.dst.refcnt);
+ end_bh_atomic();
+
+ rt->u.dst.lastuse = jiffies;
+ if (rt->u.dst.error == 0)
+ return rt;
+ dst_release(&rt->u.dst);
+ return NULL;
+}
+
+static int rt6_ins(struct rt6_info *rt)
+{
+ int err;
+
+ start_bh_atomic();
+ err = fib6_add(&ip6_routing_table, rt);
+ end_bh_atomic();
+
+ return err;
+}
+
+static struct rt6_info *rt6_cow(struct rt6_info *ort, struct in6_addr *daddr,
+ struct in6_addr *saddr)
+{
+ int err;
+ struct rt6_info *rt;
+
+ /*
+ * Clone the route.
+ */
+
+ rt = ip6_rt_copy(ort);
+
+ if (rt) {
+ ipv6_addr_copy(&rt->rt6i_dst.addr, daddr);
+
+ if (!(rt->rt6i_flags&RTF_GATEWAY))
+ ipv6_addr_copy(&rt->rt6i_gateway, daddr);
+
+ rt->rt6i_dst.plen = 128;
+ rt->rt6i_flags |= RTF_CACHE;
+
+#ifdef CONFIG_IPV6_SUBTREES
+ if (rt->rt6i_src.plen && saddr) {
+ ipv6_addr_copy(&rt->rt6i_src.addr, saddr);
+ rt->rt6i_src.plen = 128;
+ }
+#endif
+
+ rt->rt6i_nexthop = ndisc_get_neigh(rt->rt6i_dev, &rt->rt6i_gateway);
+
+ dst_clone(&rt->u.dst);
+ err = rt6_ins(rt);
+ if (err == 0)
+ return rt;
+ rt->u.dst.error = err;
+ return rt;
+ }
+ dst_clone(&ip6_null_entry.u.dst);
+ return &ip6_null_entry;
+}
+
+#ifdef CONFIG_RT6_POLICY
+static __inline__ struct rt6_info *rt6_flow_lookup_in(struct rt6_info *rt,
+ struct sk_buff *skb)
+{
+ struct in6_addr *daddr, *saddr;
+ struct fl_acc_args arg;
+
+ arg.type = FL_ARG_FORWARD;
+ arg.fl_u.skb = skb;
+
+ saddr = &skb->nh.ipv6h->saddr;
+ daddr = &skb->nh.ipv6h->daddr;
+
+ return rt6_flow_lookup(rt, daddr, saddr, &arg);
+}
+
+static __inline__ struct rt6_info *rt6_flow_lookup_out(struct rt6_info *rt,
+ struct sock *sk,
+ struct flowi *fl)
+{
+ struct fl_acc_args arg;
+
+ arg.type = FL_ARG_ORIGIN;
+ arg.fl_u.fl_o.sk = sk;
+ arg.fl_u.fl_o.flow = fl;
+
+ return rt6_flow_lookup(rt, fl->nl_u.ip6_u.daddr, fl->nl_u.ip6_u.saddr,
+ &arg);
+}
+
+#endif
+
+#define BACKTRACK() \
+if (rt == &ip6_null_entry && strict) { \
+ while ((fn = fn->parent) != NULL) { \
+ if (fn->fn_flags & RTN_ROOT) { \
+ dst_clone(&rt->u.dst); \
+ goto out; \
+ } \
+ if (fn->fn_flags & RTN_RTINFO) \
+ goto restart; \
+ } \
+}
+
+
+void ip6_route_input(struct sk_buff *skb)
+{
+ struct fib6_node *fn;
+ struct rt6_info *rt;
+ int strict;
+
+ strict = ipv6_addr_type(&skb->nh.ipv6h->daddr) & (IPV6_ADDR_MULTICAST|IPV6_ADDR_LINKLOCAL);
+
+ fn = fib6_lookup(&ip6_routing_table, &skb->nh.ipv6h->daddr,
+ &skb->nh.ipv6h->saddr);
+
+restart:
+ rt = fn->leaf;
+
+ if ((rt->rt6i_flags & RTF_CACHE)) {
+ if (ip6_rt_policy == 0) {
+ rt = rt6_device_match(rt, skb->dev->ifindex, strict);
+ BACKTRACK();
+ dst_clone(&rt->u.dst);
+ goto out;
+ }
+
+#ifdef CONFIG_RT6_POLICY
+ if ((rt->rt6i_flags & RTF_FLOW)) {
+ struct rt6_info *sprt;
+
+ for (sprt = rt; sprt; sprt = sprt->u.next) {
+ if (rt6_flow_match_in(sprt, skb)) {
+ rt = sprt;
+ dst_clone(&rt->u.dst);
+ goto out;
+ }
+ }
+ }
+#endif
+ }
+
+ rt = rt6_device_match(rt, skb->dev->ifindex, 0);
+ BACKTRACK();
+
+ if (ip6_rt_policy == 0) {
+ if (!rt->rt6i_nexthop && !(rt->rt6i_flags & RTF_NONEXTHOP)) {
+ rt = rt6_cow(rt, &skb->nh.ipv6h->daddr,
+ &skb->nh.ipv6h->saddr);
+ goto out;
+ }
+ dst_clone(&rt->u.dst);
+ } else {
+#ifdef CONFIG_RT6_POLICY
+ rt = rt6_flow_lookup_in(rt, skb);
+#else
+ /* NEVER REACHED */
+#endif
+ }
+
+out:
+ rt->u.dst.lastuse = jiffies;
+ atomic_inc(&rt->u.dst.refcnt);
+ skb->dst = (struct dst_entry *) rt;
+}
+
+struct dst_entry * ip6_route_output(struct sock *sk, struct flowi *fl)
+{
+ struct fib6_node *fn;
+ struct rt6_info *rt;
+ int strict;
+
+ strict = ipv6_addr_type(fl->nl_u.ip6_u.daddr) & (IPV6_ADDR_MULTICAST|IPV6_ADDR_LINKLOCAL);
+
+ start_bh_atomic();
+ fn = fib6_lookup(&ip6_routing_table, fl->nl_u.ip6_u.daddr,
+ fl->nl_u.ip6_u.saddr);
+
+restart:
+ rt = fn->leaf;
+
+ if ((rt->rt6i_flags & RTF_CACHE)) {
+ if (ip6_rt_policy == 0) {
+ rt = rt6_device_match(rt, fl->oif, strict);
+ BACKTRACK();
+ dst_clone(&rt->u.dst);
+ goto out;
+ }
+
+#ifdef CONFIG_RT6_POLICY
+ if ((rt->rt6i_flags & RTF_FLOW)) {
+ struct rt6_info *sprt;
+
+ for (sprt = rt; sprt; sprt = sprt->u.next) {
+ if (rt6_flow_match_out(sprt, sk)) {
+ rt = sprt;
+ dst_clone(&rt->u.dst);
+ goto out;
+ }
+ }
+ }
+#endif
+ }
+ if (rt->rt6i_flags & RTF_DEFAULT) {
+ if (rt->rt6i_metric >= IP6_RT_PRIO_ADDRCONF)
+ rt = rt6_best_dflt(rt, fl->oif);
+ } else {
+ rt = rt6_device_match(rt, fl->oif, strict);
+ BACKTRACK();
+ }
+
+ if (ip6_rt_policy == 0) {
+ if (!rt->rt6i_nexthop && !(rt->rt6i_flags & RTF_NONEXTHOP)) {
+ rt = rt6_cow(rt, fl->nl_u.ip6_u.daddr,
+ fl->nl_u.ip6_u.saddr);
+ goto out;
+ }
+ dst_clone(&rt->u.dst);
+ } else {
+#ifdef CONFIG_RT6_POLICY
+ rt = rt6_flow_lookup_out(rt, sk, fl);
+#else
+ /* NEVER REACHED */
+#endif
+ }
+
+out:
+ rt->u.dst.lastuse = jiffies;
+ atomic_inc(&rt->u.dst.refcnt);
+ end_bh_atomic();
+ return &rt->u.dst;
+}
+
+
+/*
+ * Destination cache support functions
+ */
+
+static struct dst_entry *ip6_dst_check(struct dst_entry *dst, u32 cookie)
+{
+ struct rt6_info *rt;
+
+ rt = (struct rt6_info *) dst;
+
+ if (rt && rt->rt6i_node && (rt->rt6i_node->fn_sernum == cookie))
+ return dst;
+
+ dst_release(dst);
+ return NULL;
+}
+
+static struct dst_entry *ip6_dst_reroute(struct dst_entry *dst, struct sk_buff *skb)
+{
+ /*
+ * FIXME
+ */
+ RDBG(("ip6_dst_reroute(%p,%p)[%p] (AIEEE)\n", dst, skb,
+ __builtin_return_address(0)));
+ return NULL;
+}
+
+static struct dst_entry *ip6_negative_advice(struct dst_entry *dst)
+{
+ struct rt6_info *rt = (struct rt6_info *) dst;
+
+ if (rt) {
+ if (rt->rt6i_flags & RTF_CACHE)
+ ip6_del_rt(rt);
+ dst_release(dst);
+ }
+ return NULL;
+}
+
+static void ip6_link_failure(struct sk_buff *skb)
+{
+ struct rt6_info *rt;
+
+ icmpv6_send(skb, ICMPV6_DEST_UNREACH, ICMPV6_ADDR_UNREACH, 0, skb->dev);
+
+ rt = (struct rt6_info *) skb->dst;
+ if (rt) {
+ if (rt->rt6i_flags&RTF_CACHE) {
+ dst_set_expires(&rt->u.dst, 0);
+ rt->rt6i_flags |= RTF_EXPIRES;
+ } else if (rt->rt6i_node && (rt->rt6i_flags & RTF_DEFAULT))
+ rt->rt6i_node->fn_sernum = -1;
+ }
+}
+
+static int ip6_dst_gc()
+{
+ static unsigned expire = 30*HZ;
+ static unsigned long last_gc;
+ unsigned long now = jiffies;
+
+ start_bh_atomic();
+ if ((long)(now - last_gc) < ip6_rt_gc_min_interval)
+ goto out;
+
+ expire++;
+ fib6_run_gc(expire);
+ last_gc = now;
+ if (atomic_read(&ip6_dst_ops.entries) < ip6_dst_ops.gc_thresh)
+ expire = ip6_rt_gc_timeout>>1;
+
+out:
+ expire -= expire>>ip6_rt_gc_elasticity;
+ end_bh_atomic();
+ return (atomic_read(&ip6_dst_ops.entries) > ip6_rt_max_size);
+}
+
+/* Clean host part of a prefix. Not necessary in radix tree,
+ but results in cleaner routing tables.
+
+ Remove it only when all the things will work!
+ */
+
+static void ipv6_wash_prefix(struct in6_addr *pfx, int plen)
+{
+ int b = plen&0x7;
+ int o = (plen + 7)>>3;
+
+ if (o < 16)
+ memset(pfx->s6_addr + o, 0, 16 - o);
+ if (b != 0)
+ pfx->s6_addr[plen>>3] &= (0xFF<<(8-b));
+}
+
+static int ipv6_get_mtu(struct device *dev)
+{
+ struct inet6_dev *idev;
+
+ idev = ipv6_get_idev(dev);
+ if (idev)
+ return idev->cnf.mtu6;
+ else
+ return IPV6_MIN_MTU;
+}
+
+static int ipv6_get_hoplimit(struct device *dev)
+{
+ struct inet6_dev *idev;
+
+ idev = ipv6_get_idev(dev);
+ if (idev)
+ return idev->cnf.hop_limit;
+ else
+ return ipv6_devconf.hop_limit;
+}
+
+/*
+ *
+ */
+
+int ip6_route_add(struct in6_rtmsg *rtmsg)
+{
+ int err;
+ struct rt6_info *rt;
+ struct device *dev = NULL;
+ int addr_type;
+
+ if (rtmsg->rtmsg_dst_len > 128 || rtmsg->rtmsg_src_len > 128)
+ return -EINVAL;
+#ifndef CONFIG_IPV6_SUBTREES
+ if (rtmsg->rtmsg_src_len)
+ return -EINVAL;
+#endif
+ if (rtmsg->rtmsg_metric == 0)
+ rtmsg->rtmsg_metric = IP6_RT_PRIO_USER;
+
+ rt = dst_alloc(sizeof(struct rt6_info), &ip6_dst_ops);
+
+ if (rt == NULL)
+ return -ENOMEM;
+
+ rt->u.dst.obsolete = -1;
+ rt->rt6i_expires = rtmsg->rtmsg_info;
+
+ addr_type = ipv6_addr_type(&rtmsg->rtmsg_dst);
+
+ if (addr_type & IPV6_ADDR_MULTICAST)
+ rt->u.dst.input = ip6_mc_input;
+ else
+ rt->u.dst.input = ip6_forward;
+
+ rt->u.dst.output = ip6_output;
+
+ if (rtmsg->rtmsg_ifindex) {
+ dev = dev_get_by_index(rtmsg->rtmsg_ifindex);
+ err = -ENODEV;
+ if (dev == NULL)
+ goto out;
+ }
+
+ ipv6_addr_copy(&rt->rt6i_dst.addr, &rtmsg->rtmsg_dst);
+ rt->rt6i_dst.plen = rtmsg->rtmsg_dst_len;
+ ipv6_wash_prefix(&rt->rt6i_dst.addr, rt->rt6i_dst.plen);
+
+#ifdef CONFIG_IPV6_SUBTREES
+ ipv6_addr_copy(&rt->rt6i_src.addr, &rtmsg->rtmsg_src);
+ rt->rt6i_src.plen = rtmsg->rtmsg_src_len;
+ ipv6_wash_prefix(&rt->rt6i_src.addr, rt->rt6i_src.plen);
+#endif
+
+ rt->rt6i_metric = rtmsg->rtmsg_metric;
+
+ /* We cannot add true routes via loopback here,
+ they would result in kernel looping; promote them to reject routes
+ */
+ if ((rtmsg->rtmsg_flags&RTF_REJECT) ||
+ (dev && (dev->flags&IFF_LOOPBACK) && !(addr_type&IPV6_ADDR_LOOPBACK))) {
+ dev = &loopback_dev;
+ rt->u.dst.output = ip6_pkt_discard;
+ rt->u.dst.input = ip6_pkt_discard;
+ rt->u.dst.error = -ENETUNREACH;
+ rt->rt6i_flags = RTF_REJECT|RTF_NONEXTHOP;
+ goto install_route;
+ }
+
+ if (rtmsg->rtmsg_flags & RTF_GATEWAY) {
+ struct in6_addr *gw_addr;
+ int gwa_type;
+
+ gw_addr = &rtmsg->rtmsg_gateway;
+ ipv6_addr_copy(&rt->rt6i_gateway, &rtmsg->rtmsg_gateway);
+ gwa_type = ipv6_addr_type(gw_addr);
+
+ if (gwa_type != (IPV6_ADDR_LINKLOCAL|IPV6_ADDR_UNICAST)) {
+ struct rt6_info *grt;
+
+ /* IPv6 strictly inhibits using not link-local
+ addresses as nexthop address.
+ Otherwise, router will not able to send redirects.
+ It is very good, but in some (rare!) curcumstances
+ (SIT, PtP, NBMA NOARP links) it is handy to allow
+ some exceptions. --ANK
+ */
+ err = -EINVAL;
+ if (!(gwa_type&IPV6_ADDR_UNICAST))
+ goto out;
+
+ grt = rt6_lookup(gw_addr, NULL, rtmsg->rtmsg_ifindex, 1);
+
+ err = -EHOSTUNREACH;
+ if (grt == NULL)
+ goto out;
+ if (!(grt->rt6i_flags&RTF_GATEWAY))
+ err = 0;
+ dev = grt->rt6i_dev;
+ dst_release(&grt->u.dst);
+
+ if (err)
+ goto out;
+ }
+ err = -EINVAL;
+ if (dev == NULL || (dev->flags&IFF_LOOPBACK))
+ goto out;
+ }
+
+ err = -ENODEV;
+ if (dev == NULL)
+ goto out;
+
+ if (rtmsg->rtmsg_flags & (RTF_GATEWAY|RTF_NONEXTHOP)) {
+ rt->rt6i_nexthop = ndisc_get_neigh(dev, &rt->rt6i_gateway);
+ err = -ENOMEM;
+ if (rt->rt6i_nexthop == NULL)
+ goto out;
+ }
+
+ if (ipv6_addr_is_multicast(&rt->rt6i_dst.addr))
+ rt->rt6i_hoplimit = IPV6_DEFAULT_MCASTHOPS;
+ else
+ rt->rt6i_hoplimit = ipv6_get_hoplimit(dev);
+ rt->rt6i_flags = rtmsg->rtmsg_flags;
+
+install_route:
+ rt->u.dst.pmtu = ipv6_get_mtu(dev);
+ rt->u.dst.rtt = TCP_TIMEOUT_INIT;
+ rt->rt6i_dev = dev;
+ return rt6_ins(rt);
+
+out:
+ dst_free((struct dst_entry *) rt);
+ return err;
+}
+
+int ip6_del_rt(struct rt6_info *rt)
+{
+ int err;
+
+ start_bh_atomic();
+ rt6_dflt_pointer = NULL;
+ err = fib6_del(rt);
+ end_bh_atomic();
+
+ return err;
+}
+
+int ip6_route_del(struct in6_rtmsg *rtmsg)
+{
+ struct fib6_node *fn;
+ struct rt6_info *rt;
+ int err = -ESRCH;
+
+ start_bh_atomic();
+
+ fn = fib6_locate(&ip6_routing_table,
+ &rtmsg->rtmsg_dst, rtmsg->rtmsg_dst_len,
+ &rtmsg->rtmsg_src, rtmsg->rtmsg_src_len);
+
+ if (fn) {
+ for (rt = fn->leaf; rt; rt = rt->u.next) {
+ if (rtmsg->rtmsg_ifindex &&
+ (rt->rt6i_dev == NULL ||
+ rt->rt6i_dev->ifindex != rtmsg->rtmsg_ifindex))
+ continue;
+ if (rtmsg->rtmsg_flags&RTF_GATEWAY &&
+ ipv6_addr_cmp(&rtmsg->rtmsg_gateway, &rt->rt6i_gateway))
+ continue;
+ if (rtmsg->rtmsg_metric &&
+ rtmsg->rtmsg_metric != rt->rt6i_metric)
+ continue;
+ err = ip6_del_rt(rt);
+ break;
+ }
+ }
+ end_bh_atomic();
+
+ return err;
+}
+
+#ifdef CONFIG_IPV6_NETLINK
+/*
+ * NETLINK interface
+ * routing socket moral equivalent
+ */
+
+static int rt6_msgrcv(int unit, struct sk_buff *skb)
+{
+ int count = 0;
+ struct in6_rtmsg *rtmsg;
+ int err;
+
+ rtnl_lock();
+ while (skb->len) {
+ if (skb->len < sizeof(struct in6_rtmsg)) {
+ count = -EINVAL;
+ goto out;
+ }
+
+ rtmsg = (struct in6_rtmsg *) skb->data;
+ skb_pull(skb, sizeof(struct in6_rtmsg));
+ count += sizeof(struct in6_rtmsg);
+
+ switch (rtmsg->rtmsg_type) {
+ case RTMSG_NEWROUTE:
+ err = ip6_route_add(rtmsg);
+ break;
+ case RTMSG_DELROUTE:
+ err = ip6_route_del(rtmsg);
+ break;
+ default:
+ count = -EINVAL;
+ goto out;
+ };
+ }
+
+out:
+ rtnl_unlock();
+ kfree_skb(skb);
+ return count;
+}
+
+static void rt6_sndrtmsg(struct in6_rtmsg *rtmsg)
+{
+ struct sk_buff *skb;
+
+ skb = alloc_skb(sizeof(struct in6_rtmsg), GFP_ATOMIC);
+ if (skb == NULL)
+ return;
+
+ memcpy(skb_put(skb, sizeof(struct in6_rtmsg)), &rtmsg,
+ sizeof(struct in6_rtmsg));
+
+ if (netlink_post(NETLINK_ROUTE6, skb))
+ kfree_skb(skb);
+}
+
+void rt6_sndmsg(int type, struct in6_addr *dst, struct in6_addr *src,
+ struct in6_addr *gw, struct device *dev,
+ int dstlen, int srclen, int metric, __u32 flags)
+{
+ struct sk_buff *skb;
+ struct in6_rtmsg *msg;
+
+ skb = alloc_skb(sizeof(struct in6_rtmsg), GFP_ATOMIC);
+ if (skb == NULL)
+ return;
+
+ msg = (struct in6_rtmsg *) skb_put(skb, sizeof(struct in6_rtmsg));
+
+ memset(msg, 0, sizeof(struct in6_rtmsg));
+
+ msg->rtmsg_type = type;
+
+ if (dst)
+ ipv6_addr_copy(&msg->rtmsg_dst, dst);
+
+ if (src) {
+ ipv6_addr_copy(&msg->rtmsg_src, src);
+ msg->rtmsg_src_len = srclen;
+ }
+
+ if (gw)
+ ipv6_addr_copy(&msg->rtmsg_gateway, gw);
+
+ msg->rtmsg_dst_len = dstlen;
+ msg->rtmsg_metric = metric;
+
+ if (dev)
+ msg->rtmsg_ifindex = dev->ifindex;
+
+ msg->rtmsg_flags = flags;
+
+ if (netlink_post(NETLINK_ROUTE6, skb))
+ kfree_skb(skb);
+}
+#endif /* CONFIG_IPV6_NETLINK */
+
+/*
+ * Handle redirects
+ */
+void rt6_redirect(struct in6_addr *dest, struct in6_addr *saddr,
+ struct neighbour *neigh, int on_link)
+{
+ struct rt6_info *rt, *nrt;
+
+ /* Locate old route to this destination. */
+ rt = rt6_lookup(dest, NULL, neigh->dev->ifindex, 1);
+
+ if (rt == NULL)
+ return;
+
+ if (neigh->dev != rt->rt6i_dev)
+ goto out;
+
+ /* Redirect received -> path was valid.
+ Look, redirects are sent only in response to data packets,
+ so that this nexthop apparently is reachable. --ANK
+ */
+ dst_confirm(&rt->u.dst);
+
+ /* Duplicate redirect: silently ignore. */
+ if (neigh == rt->u.dst.neighbour)
+ goto out;
+
+ /* Current route is on-link; redirect is always invalid.
+
+ Seems, previous statement is not true. It could
+ be node, which looks for us as on-link (f.e. proxy ndisc)
+ But then router serving it might decide, that we should
+ know truth 8)8) --ANK (980726).
+ */
+ if (!(rt->rt6i_flags&RTF_GATEWAY))
+ goto out;
+
+#if !defined(CONFIG_IPV6_EUI64) || defined(CONFIG_IPV6_NO_PB)
+ /*
+ * During transition gateways have more than
+ * one link local address. Certainly, it is violation
+ * of basic principles, but it is temparary.
+ */
+ /*
+ * RFC 1970 specifies that redirects should only be
+ * accepted if they come from the nexthop to the target.
+ * Due to the way default routers are chosen, this notion
+ * is a bit fuzzy and one might need to check all default
+ * routers.
+ */
+
+ if (ipv6_addr_cmp(saddr, &rt->rt6i_gateway)) {
+ if (rt->rt6i_flags & RTF_DEFAULT) {
+ struct rt6_info *rt1;
+
+ for (rt1 = ip6_routing_table.leaf; rt1; rt1 = rt1->u.next) {
+ if (!ipv6_addr_cmp(saddr, &rt1->rt6i_gateway)) {
+ dst_clone(&rt1->u.dst);
+ dst_release(&rt->u.dst);
+ rt = rt1;
+ goto source_ok;
+ }
+ }
+ }
+ if (net_ratelimit())
+ printk(KERN_DEBUG "rt6_redirect: source isn't a valid nexthop "
+ "for redirect target\n");
+ goto out;
+ }
+
+source_ok:
+#endif
+
+ /*
+ * We have finally decided to accept it.
+ */
+
+ nrt = ip6_rt_copy(rt);
+ if (nrt == NULL)
+ goto out;
+
+ nrt->rt6i_flags = RTF_GATEWAY|RTF_UP|RTF_DYNAMIC|RTF_CACHE;
+ if (on_link)
+ nrt->rt6i_flags &= ~RTF_GATEWAY;
+
+ ipv6_addr_copy(&nrt->rt6i_dst.addr, dest);
+ nrt->rt6i_dst.plen = 128;
+
+ ipv6_addr_copy(&nrt->rt6i_gateway, (struct in6_addr*)neigh->primary_key);
+ nrt->rt6i_nexthop = neigh_clone(neigh);
+ /* Reset pmtu, it may be better */
+ nrt->u.dst.pmtu = ipv6_get_mtu(neigh->dev);
+ nrt->rt6i_hoplimit = ipv6_get_hoplimit(neigh->dev);
+
+ if (rt6_ins(nrt))
+ goto out;
+
+ /* Sic! rt6_redirect is called by bh, so that it is allowed */
+ dst_release(&rt->u.dst);
+ if (rt->rt6i_flags&RTF_CACHE)
+ ip6_del_rt(rt);
+ return;
+
+out:
+ dst_release(&rt->u.dst);
+ return;
+}
+
+/*
+ * Handle ICMP "packet too big" messages
+ * i.e. Path MTU discovery
+ */
+
+void rt6_pmtu_discovery(struct in6_addr *daddr, struct in6_addr *saddr,
+ struct device *dev, u32 pmtu)
+{
+ struct rt6_info *rt, *nrt;
+
+ if (pmtu < IPV6_MIN_MTU) {
+ if (net_ratelimit())
+ printk(KERN_DEBUG "rt6_pmtu_discovery: invalid MTU value %d\n",
+ pmtu);
+ return;
+ }
+
+ rt = rt6_lookup(daddr, saddr, dev->ifindex, 0);
+
+ if (rt == NULL)
+ return;
+
+ if (pmtu >= rt->u.dst.pmtu)
+ goto out;
+
+ /* New mtu received -> path was valid.
+ They are sent only in response to data packets,
+ so that this nexthop apparently is reachable. --ANK
+ */
+ dst_confirm(&rt->u.dst);
+
+ /* Host route. If it is static, it would be better
+ not to override it, but add new one, so that
+ when cache entry will expire old pmtu
+ would return automatically.
+ */
+ if (rt->rt6i_flags & RTF_CACHE) {
+ rt->u.dst.pmtu = pmtu;
+ dst_set_expires(&rt->u.dst, ip6_rt_mtu_expires);
+ rt->rt6i_flags |= RTF_MODIFIED|RTF_EXPIRES;
+ goto out;
+ }
+
+ /* Network route.
+ Two cases are possible:
+ 1. It is connected route. Action: COW
+ 2. It is gatewayed route or NONEXTHOP route. Action: clone it.
+ */
+ if (!rt->rt6i_nexthop && !(rt->rt6i_flags & RTF_NONEXTHOP)) {
+ nrt = rt6_cow(rt, daddr, saddr);
+ if (!nrt->u.dst.error) {
+ nrt->u.dst.pmtu = pmtu;
+ dst_set_expires(&rt->u.dst, ip6_rt_mtu_expires);
+ nrt->rt6i_flags |= RTF_DYNAMIC|RTF_EXPIRES;
+ dst_release(&nrt->u.dst);
+ }
+ } else {
+ nrt = ip6_rt_copy(rt);
+ if (nrt == NULL)
+ goto out;
+ ipv6_addr_copy(&nrt->rt6i_dst.addr, daddr);
+ nrt->rt6i_dst.plen = 128;
+ nrt->rt6i_nexthop = neigh_clone(rt->rt6i_nexthop);
+ dst_set_expires(&rt->u.dst, ip6_rt_mtu_expires);
+ nrt->rt6i_flags |= RTF_DYNAMIC|RTF_CACHE|RTF_EXPIRES;
+ nrt->u.dst.pmtu = pmtu;
+ rt6_ins(nrt);
+ }
+
+out:
+ dst_release(&rt->u.dst);
+}
+
+/*
+ * Misc support functions
+ */
+
+static struct rt6_info * ip6_rt_copy(struct rt6_info *ort)
+{
+ struct rt6_info *rt;
+
+ rt = dst_alloc(sizeof(struct rt6_info), &ip6_dst_ops);
+
+ if (rt) {
+ rt->u.dst.input = ort->u.dst.input;
+ rt->u.dst.output = ort->u.dst.output;
+
+ rt->u.dst.pmtu = ort->u.dst.pmtu;
+ rt->u.dst.rtt = ort->u.dst.rtt;
+ rt->u.dst.window = ort->u.dst.window;
+ rt->u.dst.mxlock = ort->u.dst.mxlock;
+ rt->u.dst.dev = ort->u.dst.dev;
+ rt->u.dst.lastuse = jiffies;
+ rt->rt6i_hoplimit = ort->rt6i_hoplimit;
+ rt->rt6i_expires = 0;
+
+ ipv6_addr_copy(&rt->rt6i_gateway, &ort->rt6i_gateway);
+ rt->rt6i_flags = ort->rt6i_flags & ~RTF_EXPIRES;
+ rt->rt6i_metric = 0;
+
+ memcpy(&rt->rt6i_dst, &ort->rt6i_dst, sizeof(struct rt6key));
+#ifdef CONFIG_IPV6_SUBTREES
+ memcpy(&rt->rt6i_src, &ort->rt6i_src, sizeof(struct rt6key));
+#endif
+ }
+ return rt;
+}
+
+struct rt6_info *rt6_get_dflt_router(struct in6_addr *addr, struct device *dev)
+{
+ struct rt6_info *rt;
+ struct fib6_node *fn;
+
+ fn = &ip6_routing_table;
+
+ start_bh_atomic();
+ for (rt = fn->leaf; rt; rt=rt->u.next) {
+ if (dev == rt->rt6i_dev &&
+ ipv6_addr_cmp(&rt->rt6i_gateway, addr) == 0)
+ break;
+ }
+ if (rt)
+ dst_clone(&rt->u.dst);
+ end_bh_atomic();
+ return rt;
+}
+
+struct rt6_info *rt6_add_dflt_router(struct in6_addr *gwaddr,
+ struct device *dev)
+{
+ struct in6_rtmsg rtmsg;
+
+ memset(&rtmsg, 0, sizeof(struct in6_rtmsg));
+ rtmsg.rtmsg_type = RTMSG_NEWROUTE;
+ ipv6_addr_copy(&rtmsg.rtmsg_gateway, gwaddr);
+ rtmsg.rtmsg_metric = 1024;
+ rtmsg.rtmsg_flags = RTF_GATEWAY | RTF_ADDRCONF | RTF_DEFAULT | RTF_UP;
+
+ rtmsg.rtmsg_ifindex = dev->ifindex;
+
+ ip6_route_add(&rtmsg);
+ return rt6_get_dflt_router(gwaddr, dev);
+}
+
+void rt6_purge_dflt_routers(int last_resort)
+{
+ struct rt6_info *rt;
+ u32 flags;
+
+ if (last_resort)
+ flags = RTF_ALLONLINK;
+ else
+ flags = RTF_DEFAULT | RTF_ADDRCONF;
+
+restart:
+ rt6_dflt_pointer = NULL;
+
+ for (rt = ip6_routing_table.leaf; rt; rt = rt->u.next) {
+ if (rt->rt6i_flags & flags) {
+ ip6_del_rt(rt);
+ goto restart;
+ }
+ }
+}
+
+#ifndef _HURD_
+int ipv6_route_ioctl(unsigned int cmd, void *arg)
+{
+ struct in6_rtmsg rtmsg;
+ int err;
+
+ RDBG(("ipv6_route_ioctl(%d,%p)\n", cmd, arg));
+ switch(cmd) {
+ case SIOCADDRT: /* Add a route */
+ case SIOCDELRT: /* Delete a route */
+ if (!capable(CAP_NET_ADMIN))
+ return -EPERM;
+ err = copy_from_user(&rtmsg, arg,
+ sizeof(struct in6_rtmsg));
+ if (err)
+ return -EFAULT;
+
+ rtnl_lock();
+ switch (cmd) {
+ case SIOCADDRT:
+ err = ip6_route_add(&rtmsg);
+ break;
+ case SIOCDELRT:
+ err = ip6_route_del(&rtmsg);
+ break;
+ default:
+ err = -EINVAL;
+ };
+ rtnl_unlock();
+
+#ifdef CONFIG_IPV6_NETLINK
+ if (err == 0)
+ rt6_sndrtmsg(&rtmsg);
+#endif
+ return err;
+ };
+
+ return -EINVAL;
+}
+#endif /* not _HURD_ */
+
+/*
+ * Drop the packet on the floor
+ */
+
+int ip6_pkt_discard(struct sk_buff *skb)
+{
+ ipv6_statistics.Ip6OutNoRoutes++;
+ icmpv6_send(skb, ICMPV6_DEST_UNREACH, ICMPV6_ADDR_UNREACH, 0, skb->dev);
+ kfree_skb(skb);
+ return 0;
+}
+
+/*
+ * Add address
+ */
+
+int ip6_rt_addr_add(struct in6_addr *addr, struct device *dev)
+{
+ struct rt6_info *rt;
+
+ rt = dst_alloc(sizeof(struct rt6_info), &ip6_dst_ops);
+ if (rt == NULL)
+ return -ENOMEM;
+
+ rt->u.dst.input = ip6_input;
+ rt->u.dst.output = ip6_output;
+ rt->rt6i_dev = dev_get("lo");
+ rt->u.dst.rtt = TCP_TIMEOUT_INIT;
+ rt->u.dst.pmtu = ipv6_get_mtu(rt->rt6i_dev);
+ rt->rt6i_hoplimit = ipv6_get_hoplimit(rt->rt6i_dev);
+ rt->u.dst.obsolete = -1;
+
+ rt->rt6i_flags = RTF_UP | RTF_NONEXTHOP;
+ rt->rt6i_nexthop = ndisc_get_neigh(rt->rt6i_dev, &rt->rt6i_gateway);
+ if (rt->rt6i_nexthop == NULL) {
+ dst_free((struct dst_entry *) rt);
+ return -ENOMEM;
+ }
+
+ ipv6_addr_copy(&rt->rt6i_dst.addr, addr);
+ rt->rt6i_dst.plen = 128;
+ rt6_ins(rt);
+
+ return 0;
+}
+
+/* Delete address. Warning: you should check that this address
+ disappeared before calling this function.
+ */
+
+int ip6_rt_addr_del(struct in6_addr *addr, struct device *dev)
+{
+ struct rt6_info *rt;
+ int err = -ENOENT;
+
+ rt = rt6_lookup(addr, NULL, loopback_dev.ifindex, 1);
+ if (rt) {
+ if (rt->rt6i_dst.plen == 128)
+ err= ip6_del_rt(rt);
+ dst_release(&rt->u.dst);
+ }
+
+ return err;
+}
+
+#ifdef CONFIG_RT6_POLICY
+
+static int rt6_flow_match_in(struct rt6_info *rt, struct sk_buff *skb)
+{
+ struct flow_filter *frule;
+ struct pkt_filter *filter;
+ int res = 1;
+
+ if ((frule = rt->rt6i_filter) == NULL)
+ goto out;
+
+ if (frule->type != FLR_INPUT) {
+ res = 0;
+ goto out;
+ }
+
+ for (filter = frule->u.filter; filter; filter = filter->next) {
+ __u32 *word;
+
+ word = (__u32 *) skb->h.raw;
+ word += filter->offset;
+
+ if ((*word ^ filter->value) & filter->mask) {
+ res = 0;
+ break;
+ }
+ }
+
+out:
+ return res;
+}
+
+static int rt6_flow_match_out(struct rt6_info *rt, struct sock *sk)
+{
+ struct flow_filter *frule;
+ int res = 1;
+
+ if ((frule = rt->rt6i_filter) == NULL)
+ goto out;
+
+ if (frule->type != FLR_INPUT) {
+ res = 0;
+ goto out;
+ }
+
+ if (frule->u.sk != sk)
+ res = 0;
+out:
+ return res;
+}
+
+static struct rt6_info *rt6_flow_lookup(struct rt6_info *rt,
+ struct in6_addr *daddr,
+ struct in6_addr *saddr,
+ struct fl_acc_args *args)
+{
+ struct flow_rule *frule;
+ struct rt6_info *nrt = NULL;
+ struct pol_chain *pol;
+
+ for (pol = rt6_pol_list; pol; pol = pol->next) {
+ struct fib6_node *fn;
+ struct rt6_info *sprt;
+
+ fn = fib6_lookup(pol->rules, daddr, saddr);
+
+ do {
+ for (sprt = fn->leaf; sprt; sprt=sprt->u.next) {
+ int res;
+
+ frule = sprt->rt6i_flowr;
+#if RT6_DEBUG >= 2
+ if (frule == NULL) {
+ printk(KERN_DEBUG "NULL flowr\n");
+ goto error;
+ }
+#endif
+ res = frule->ops->accept(rt, sprt, args, &nrt);
+
+ switch (res) {
+ case FLOWR_SELECT:
+ goto found;
+ case FLOWR_CLEAR:
+ goto next_policy;
+ case FLOWR_NODECISION:
+ break;
+ default:
+ goto error;
+ };
+ }
+
+ fn = fn->parent;
+
+ } while ((fn->fn_flags & RTN_TL_ROOT) == 0);
+
+ next_policy:
+ }
+
+error:
+ dst_clone(&ip6_null_entry.u.dst);
+ return &ip6_null_entry;
+
+found:
+ if (nrt == NULL)
+ goto error;
+
+ nrt->rt6i_flags |= RTF_CACHE;
+ dst_clone(&nrt->u.dst);
+ err = rt6_ins(nrt);
+ if (err)
+ nrt->u.dst.error = err;
+ return nrt;
+}
+#endif
+
+static int fib6_ifdown(struct rt6_info *rt, void *arg)
+{
+ if (((void*)rt->rt6i_dev == arg || arg == NULL) &&
+ rt != &ip6_null_entry) {
+ RT6_TRACE("deleted by ifdown %p\n", rt);
+ return -1;
+ }
+ return 0;
+}
+
+void rt6_ifdown(struct device *dev)
+{
+ fib6_clean_tree(&ip6_routing_table, fib6_ifdown, 0, dev);
+}
+
+struct rt6_mtu_change_arg
+{
+ struct device *dev;
+ unsigned mtu;
+};
+
+static int rt6_mtu_change_route(struct rt6_info *rt, void *p_arg)
+{
+ struct rt6_mtu_change_arg *arg = (struct rt6_mtu_change_arg *) p_arg;
+
+ /* In IPv6 pmtu discovery is not optional,
+ so that RTAX_MTU lock cannot dissable it.
+ We still use this lock to block changes
+ caused by addrconf/ndisc.
+ */
+ if (rt->rt6i_dev == arg->dev &&
+ !(rt->u.dst.mxlock&(1<<RTAX_MTU)))
+ rt->u.dst.pmtu = arg->mtu;
+ return 0;
+}
+
+void rt6_mtu_change(struct device *dev, unsigned mtu)
+{
+ struct rt6_mtu_change_arg arg;
+
+ arg.dev = dev;
+ arg.mtu = mtu;
+ fib6_clean_tree(&ip6_routing_table, rt6_mtu_change_route, 0, &arg);
+}
+
+#ifdef CONFIG_RTNETLINK
+
+static int inet6_rtm_to_rtmsg(struct rtmsg *r, struct rtattr **rta,
+ struct in6_rtmsg *rtmsg)
+{
+ memset(rtmsg, 0, sizeof(*rtmsg));
+
+ rtmsg->rtmsg_dst_len = r->rtm_dst_len;
+ rtmsg->rtmsg_src_len = r->rtm_src_len;
+ rtmsg->rtmsg_flags = RTF_UP;
+ if (r->rtm_type == RTN_UNREACHABLE)
+ rtmsg->rtmsg_flags |= RTF_REJECT;
+
+ if (rta[RTA_GATEWAY-1]) {
+ if (rta[RTA_GATEWAY-1]->rta_len != RTA_LENGTH(16))
+ return -EINVAL;
+ memcpy(&rtmsg->rtmsg_gateway, RTA_DATA(rta[RTA_GATEWAY-1]), 16);
+ rtmsg->rtmsg_flags |= RTF_GATEWAY;
+ }
+ if (rta[RTA_DST-1]) {
+ if (RTA_PAYLOAD(rta[RTA_DST-1]) < ((r->rtm_dst_len+7)>>3))
+ return -EINVAL;
+ memcpy(&rtmsg->rtmsg_dst, RTA_DATA(rta[RTA_DST-1]), ((r->rtm_dst_len+7)>>3));
+ }
+ if (rta[RTA_SRC-1]) {
+ if (RTA_PAYLOAD(rta[RTA_SRC-1]) < ((r->rtm_src_len+7)>>3))
+ return -EINVAL;
+ memcpy(&rtmsg->rtmsg_src, RTA_DATA(rta[RTA_SRC-1]), ((r->rtm_src_len+7)>>3));
+ }
+ if (rta[RTA_OIF-1]) {
+ if (rta[RTA_OIF-1]->rta_len != RTA_LENGTH(sizeof(int)))
+ return -EINVAL;
+ memcpy(&rtmsg->rtmsg_ifindex, RTA_DATA(rta[RTA_OIF-1]), sizeof(int));
+ }
+ if (rta[RTA_PRIORITY-1]) {
+ if (rta[RTA_PRIORITY-1]->rta_len != RTA_LENGTH(4))
+ return -EINVAL;
+ memcpy(&rtmsg->rtmsg_metric, RTA_DATA(rta[RTA_PRIORITY-1]), 4);
+ }
+ return 0;
+}
+
+int inet6_rtm_delroute(struct sk_buff *skb, struct nlmsghdr* nlh, void *arg)
+{
+ struct rtmsg *r = NLMSG_DATA(nlh);
+ struct in6_rtmsg rtmsg;
+
+ if (inet6_rtm_to_rtmsg(r, arg, &rtmsg))
+ return -EINVAL;
+ return ip6_route_del(&rtmsg);
+}
+
+int inet6_rtm_newroute(struct sk_buff *skb, struct nlmsghdr* nlh, void *arg)
+{
+ struct rtmsg *r = NLMSG_DATA(nlh);
+ struct in6_rtmsg rtmsg;
+
+ if (inet6_rtm_to_rtmsg(r, arg, &rtmsg))
+ return -EINVAL;
+ return ip6_route_add(&rtmsg);
+}
+
+struct rt6_rtnl_dump_arg
+{
+ struct sk_buff *skb;
+ struct netlink_callback *cb;
+};
+
+static int rt6_fill_node(struct sk_buff *skb, struct rt6_info *rt,
+ struct in6_addr *dst,
+ struct in6_addr *src,
+ int iif,
+ int type, u32 pid, u32 seq)
+{
+ struct rtmsg *rtm;
+ struct nlmsghdr *nlh;
+ unsigned char *b = skb->tail;
+ struct rtattr *mx;
+ struct rta_cacheinfo ci;
+
+ nlh = NLMSG_PUT(skb, pid, seq, type, sizeof(*rtm));
+ rtm = NLMSG_DATA(nlh);
+ rtm->rtm_family = AF_INET6;
+ rtm->rtm_dst_len = rt->rt6i_dst.plen;
+ rtm->rtm_src_len = rt->rt6i_src.plen;
+ rtm->rtm_tos = 0;
+ rtm->rtm_table = RT_TABLE_MAIN;
+ if (rt->rt6i_flags&RTF_REJECT)
+ rtm->rtm_type = RTN_UNREACHABLE;
+ else if (rt->rt6i_dev && (rt->rt6i_dev->flags&IFF_LOOPBACK))
+ rtm->rtm_type = RTN_LOCAL;
+ else
+ rtm->rtm_type = RTN_UNICAST;
+ rtm->rtm_flags = 0;
+ rtm->rtm_scope = RT_SCOPE_UNIVERSE;
+ rtm->rtm_protocol = RTPROT_BOOT;
+ if (rt->rt6i_flags&RTF_DYNAMIC)
+ rtm->rtm_protocol = RTPROT_REDIRECT;
+ else if (rt->rt6i_flags&(RTF_ADDRCONF|RTF_ALLONLINK))
+ rtm->rtm_protocol = RTPROT_KERNEL;
+ else if (rt->rt6i_flags&RTF_DEFAULT)
+ rtm->rtm_protocol = RTPROT_RA;
+
+ if (rt->rt6i_flags&RTF_CACHE)
+ rtm->rtm_flags |= RTM_F_CLONED;
+
+ if (dst) {
+ RTA_PUT(skb, RTA_DST, 16, dst);
+ rtm->rtm_dst_len = 128;
+ } else if (rtm->rtm_dst_len)
+ RTA_PUT(skb, RTA_DST, 16, &rt->rt6i_dst.addr);
+#ifdef CONFIG_IPV6_SUBTREES
+ if (src) {
+ RTA_PUT(skb, RTA_SRC, 16, src);
+ rtm->rtm_src_len = 128;
+ } else if (rtm->rtm_src_len)
+ RTA_PUT(skb, RTA_SRC, 16, &rt->rt6i_src.addr);
+#endif
+ if (iif)
+ RTA_PUT(skb, RTA_IIF, 4, &iif);
+ else if (dst) {
+ struct in6_addr saddr_buf;
+ if (ipv6_get_saddr(&rt->u.dst, dst, &saddr_buf))
+ RTA_PUT(skb, RTA_PREFSRC, 16, &saddr_buf);
+ }
+ mx = (struct rtattr*)skb->tail;
+ RTA_PUT(skb, RTA_METRICS, 0, NULL);
+ if (rt->u.dst.mxlock)
+ RTA_PUT(skb, RTAX_LOCK, sizeof(unsigned), &rt->u.dst.mxlock);
+ if (rt->u.dst.pmtu)
+ RTA_PUT(skb, RTAX_MTU, sizeof(unsigned), &rt->u.dst.pmtu);
+ if (rt->u.dst.window)
+ RTA_PUT(skb, RTAX_WINDOW, sizeof(unsigned), &rt->u.dst.window);
+ if (rt->u.dst.rtt)
+ RTA_PUT(skb, RTAX_RTT, sizeof(unsigned), &rt->u.dst.rtt);
+ mx->rta_len = skb->tail - (u8*)mx;
+ if (mx->rta_len == RTA_LENGTH(0))
+ skb_trim(skb, (u8*)mx - skb->data);
+ if (rt->u.dst.neighbour)
+ RTA_PUT(skb, RTA_GATEWAY, 16, &rt->u.dst.neighbour->primary_key);
+ if (rt->u.dst.dev)
+ RTA_PUT(skb, RTA_OIF, sizeof(int), &rt->rt6i_dev->ifindex);
+ RTA_PUT(skb, RTA_PRIORITY, 4, &rt->rt6i_metric);
+ ci.rta_lastuse = jiffies - rt->u.dst.lastuse;
+ if (rt->rt6i_expires)
+ ci.rta_expires = rt->rt6i_expires - jiffies;
+ else
+ ci.rta_expires = 0;
+ ci.rta_used = atomic_read(&rt->u.dst.refcnt);
+ ci.rta_clntref = atomic_read(&rt->u.dst.use);
+ ci.rta_error = rt->u.dst.error;
+ RTA_PUT(skb, RTA_CACHEINFO, sizeof(ci), &ci);
+ nlh->nlmsg_len = skb->tail - b;
+ return skb->len;
+
+nlmsg_failure:
+rtattr_failure:
+ skb_trim(skb, b - skb->data);
+ return -1;
+}
+
+static int rt6_dump_route(struct rt6_info *rt, void *p_arg)
+{
+ struct rt6_rtnl_dump_arg *arg = (struct rt6_rtnl_dump_arg *) p_arg;
+
+ return rt6_fill_node(arg->skb, rt, NULL, NULL, 0, RTM_NEWROUTE,
+ NETLINK_CB(arg->cb->skb).pid, arg->cb->nlh->nlmsg_seq);
+}
+
+static int fib6_dump_node(struct fib6_walker_t *w)
+{
+ int res;
+ struct rt6_info *rt;
+
+ for (rt = w->leaf; rt; rt = rt->u.next) {
+ res = rt6_dump_route(rt, w->args);
+ if (res < 0) {
+ /* Frame is full, suspend walking */
+ w->leaf = rt;
+ return 1;
+ }
+ BUG_TRAP(res!=0);
+ }
+ w->leaf = NULL;
+ return 0;
+}
+
+static int fib6_dump_done(struct netlink_callback *cb)
+{
+ struct fib6_walker_t *w = (void*)cb->args[0];
+
+ if (w) {
+ cb->args[0] = 0;
+ start_bh_atomic();
+ fib6_walker_unlink(w);
+ end_bh_atomic();
+ kfree(w);
+ }
+ if (cb->args[1]) {
+ cb->done = (void*)cb->args[1];
+ cb->args[1] = 0;
+ }
+ return cb->done(cb);
+}
+
+int inet6_dump_fib(struct sk_buff *skb, struct netlink_callback *cb)
+{
+ struct rt6_rtnl_dump_arg arg;
+ struct fib6_walker_t *w;
+ int res;
+
+ arg.skb = skb;
+ arg.cb = cb;
+
+ w = (void*)cb->args[0];
+ if (w == NULL) {
+ /* New dump:
+ *
+ * 1. hook callback destructor.
+ */
+ cb->args[1] = (long)cb->done;
+ cb->done = fib6_dump_done;
+
+ /*
+ * 2. allocate and initialize walker.
+ */
+ w = kmalloc(sizeof(*w), GFP_KERNEL);
+ if (w == NULL)
+ return -ENOMEM;
+ RT6_TRACE("dump<%p", w);
+ memset(w, 0, sizeof(*w));
+ w->root = &ip6_routing_table;
+ w->func = fib6_dump_node;
+ w->args = &arg;
+ cb->args[0] = (long)w;
+ start_bh_atomic();
+ res = fib6_walk(w);
+ end_bh_atomic();
+ } else {
+ w->args = &arg;
+ start_bh_atomic();
+ res = fib6_walk_continue(w);
+ end_bh_atomic();
+ }
+#if RT6_DEBUG >= 3
+ if (res <= 0 && skb->len == 0)
+ RT6_TRACE("%p>dump end\n", w);
+#endif
+ /* res < 0 is an error. (really, impossible)
+ res == 0 means that dump is complete, but skb still can contain data.
+ res > 0 dump is not complete, but frame is full.
+ */
+ return res < 0 ? res : skb->len;
+}
+
+int inet6_rtm_getroute(struct sk_buff *in_skb, struct nlmsghdr* nlh, void *arg)
+{
+ struct rtattr **rta = arg;
+ int iif = 0;
+ int err;
+ struct sk_buff *skb;
+ struct flowi fl;
+ struct rt6_info *rt;
+
+ skb = alloc_skb(NLMSG_GOODSIZE, GFP_KERNEL);
+ if (skb == NULL)
+ return -ENOBUFS;
+
+ /* Reserve room for dummy headers, this skb can pass
+ through good chunk of routing engine.
+ */
+ skb->mac.raw = skb->data;
+ skb_reserve(skb, MAX_HEADER + sizeof(struct ipv6hdr));
+
+ fl.proto = 0;
+ fl.nl_u.ip6_u.daddr = NULL;
+ fl.nl_u.ip6_u.saddr = NULL;
+ fl.uli_u.icmpt.type = 0;
+ fl.uli_u.icmpt.code = 0;
+ if (rta[RTA_SRC-1])
+ fl.nl_u.ip6_u.saddr = (struct in6_addr*)RTA_DATA(rta[RTA_SRC-1]);
+ if (rta[RTA_DST-1])
+ fl.nl_u.ip6_u.daddr = (struct in6_addr*)RTA_DATA(rta[RTA_DST-1]);
+
+ if (rta[RTA_IIF-1])
+ memcpy(&iif, RTA_DATA(rta[RTA_IIF-1]), sizeof(int));
+
+ if (iif) {
+ struct device *dev;
+ dev = dev_get_by_index(iif);
+ if (!dev)
+ return -ENODEV;
+ }
+
+ fl.oif = 0;
+ if (rta[RTA_OIF-1])
+ memcpy(&fl.oif, RTA_DATA(rta[RTA_OIF-1]), sizeof(int));
+
+ rt = (struct rt6_info*)ip6_route_output(NULL, &fl);
+
+ skb->dst = &rt->u.dst;
+
+ NETLINK_CB(skb).dst_pid = NETLINK_CB(in_skb).pid;
+ err = rt6_fill_node(skb, rt,
+ fl.nl_u.ip6_u.daddr,
+ fl.nl_u.ip6_u.saddr,
+ iif,
+ RTM_NEWROUTE, NETLINK_CB(in_skb).pid, nlh->nlmsg_seq);
+ if (err < 0)
+ return -EMSGSIZE;
+
+ err = netlink_unicast(rtnl, skb, NETLINK_CB(in_skb).pid, MSG_DONTWAIT);
+ if (err < 0)
+ return err;
+ return 0;
+}
+
+void inet6_rt_notify(int event, struct rt6_info *rt)
+{
+ struct sk_buff *skb;
+ int size = NLMSG_SPACE(sizeof(struct rtmsg)+256);
+
+ skb = alloc_skb(size, gfp_any());
+ if (!skb) {
+ netlink_set_err(rtnl, 0, RTMGRP_IPV6_ROUTE, ENOBUFS);
+ return;
+ }
+ if (rt6_fill_node(skb, rt, NULL, NULL, 0, event, 0, 0) < 0) {
+ kfree_skb(skb);
+ netlink_set_err(rtnl, 0, RTMGRP_IPV6_ROUTE, EINVAL);
+ return;
+ }
+ NETLINK_CB(skb).dst_groups = RTMGRP_IPV6_ROUTE;
+ netlink_broadcast(rtnl, skb, 0, RTMGRP_IPV6_ROUTE, gfp_any());
+}
+
+#endif
+
+/*
+ * /proc
+ */
+
+#ifdef CONFIG_PROC_FS
+
+#define RT6_INFO_LEN (32 + 4 + 32 + 4 + 32 + 40 + 5 + 1)
+
+struct rt6_proc_arg
+{
+ char *buffer;
+ int offset;
+ int length;
+ int skip;
+ int len;
+};
+
+static int rt6_info_route(struct rt6_info *rt, void *p_arg)
+{
+ struct rt6_proc_arg *arg = (struct rt6_proc_arg *) p_arg;
+ int i;
+
+ if (arg->skip < arg->offset / RT6_INFO_LEN) {
+ arg->skip++;
+ return 0;
+ }
+
+ if (arg->len >= arg->length)
+ return 0;
+
+ for (i=0; i<16; i++) {
+ sprintf(arg->buffer + arg->len, "%02x",
+ rt->rt6i_dst.addr.s6_addr[i]);
+ arg->len += 2;
+ }
+ arg->len += sprintf(arg->buffer + arg->len, " %02x ",
+ rt->rt6i_dst.plen);
+
+#ifdef CONFIG_IPV6_SUBTREES
+ for (i=0; i<16; i++) {
+ sprintf(arg->buffer + arg->len, "%02x",
+ rt->rt6i_src.addr.s6_addr[i]);
+ arg->len += 2;
+ }
+ arg->len += sprintf(arg->buffer + arg->len, " %02x ",
+ rt->rt6i_src.plen);
+#else
+ sprintf(arg->buffer + arg->len,
+ "00000000000000000000000000000000 00 ");
+ arg->len += 36;
+#endif
+
+ if (rt->rt6i_nexthop) {
+ for (i=0; i<16; i++) {
+ sprintf(arg->buffer + arg->len, "%02x",
+ rt->rt6i_nexthop->primary_key[i]);
+ arg->len += 2;
+ }
+ } else {
+ sprintf(arg->buffer + arg->len,
+ "00000000000000000000000000000000");
+ arg->len += 32;
+ }
+ arg->len += sprintf(arg->buffer + arg->len,
+ " %08x %08x %08x %08x %8s\n",
+ rt->rt6i_metric, atomic_read(&rt->u.dst.use),
+ atomic_read(&rt->u.dst.refcnt), rt->rt6i_flags,
+ rt->rt6i_dev ? rt->rt6i_dev->name : "");
+ return 0;
+}
+
+static int rt6_proc_info(char *buffer, char **start, off_t offset, int length,
+ int dummy)
+{
+ struct rt6_proc_arg arg;
+ arg.buffer = buffer;
+ arg.offset = offset;
+ arg.length = length;
+ arg.skip = 0;
+ arg.len = 0;
+
+ fib6_clean_tree(&ip6_routing_table, rt6_info_route, 0, &arg);
+
+ *start = buffer;
+ if (offset)
+ *start += offset % RT6_INFO_LEN;
+
+ arg.len -= offset % RT6_INFO_LEN;
+
+ if (arg.len > length)
+ arg.len = length;
+ if (arg.len < 0)
+ arg.len = 0;
+
+ return arg.len;
+}
+
+extern struct rt6_statistics rt6_stats;
+
+static int rt6_proc_stats(char *buffer, char **start, off_t offset, int length,
+ int dummy)
+{
+ int len;
+
+ len = sprintf(buffer, "%04x %04x %04x %04x %04x %04x\n",
+ rt6_stats.fib_nodes, rt6_stats.fib_route_nodes,
+ rt6_stats.fib_rt_alloc, rt6_stats.fib_rt_entries,
+ rt6_stats.fib_rt_cache,
+ atomic_read(&ip6_dst_ops.entries));
+
+ len -= offset;
+
+ if (len > length)
+ len = length;
+ if(len < 0)
+ len = 0;
+
+ *start = buffer + offset;
+
+ return len;
+}
+
+static struct proc_dir_entry proc_rt6_info = {
+ PROC_NET_RT6, 10, "ipv6_route",
+ S_IFREG | S_IRUGO, 1, 0, 0,
+ 0, &proc_net_inode_operations,
+ rt6_proc_info
+};
+static struct proc_dir_entry proc_rt6_stats = {
+ PROC_NET_RT6_STATS, 9, "rt6_stats",
+ S_IFREG | S_IRUGO, 1, 0, 0,
+ 0, &proc_net_inode_operations,
+ rt6_proc_stats
+};
+#endif /* CONFIG_PROC_FS */
+
+#ifdef CONFIG_SYSCTL
+
+static int flush_delay;
+
+static
+int ipv6_sysctl_rtcache_flush(ctl_table *ctl, int write, struct file * filp,
+ void *buffer, size_t *lenp)
+{
+ if (write) {
+ proc_dointvec(ctl, write, filp, buffer, lenp);
+ if (flush_delay < 0)
+ flush_delay = 0;
+ start_bh_atomic();
+ fib6_run_gc((unsigned long)flush_delay);
+ end_bh_atomic();
+ return 0;
+ } else
+ return -EINVAL;
+}
+
+ctl_table ipv6_route_table[] = {
+ {NET_IPV6_ROUTE_FLUSH, "flush",
+ &flush_delay, sizeof(int), 0644, NULL,
+ &ipv6_sysctl_rtcache_flush},
+ {NET_IPV6_ROUTE_GC_THRESH, "gc_thresh",
+ &ip6_dst_ops.gc_thresh, sizeof(int), 0644, NULL,
+ &proc_dointvec},
+ {NET_IPV6_ROUTE_MAX_SIZE, "max_size",
+ &ip6_rt_max_size, sizeof(int), 0644, NULL,
+ &proc_dointvec},
+ {NET_IPV6_ROUTE_GC_MIN_INTERVAL, "gc_min_interval",
+ &ip6_rt_gc_min_interval, sizeof(int), 0644, NULL,
+ &proc_dointvec_jiffies},
+ {NET_IPV6_ROUTE_GC_TIMEOUT, "gc_timeout",
+ &ip6_rt_gc_timeout, sizeof(int), 0644, NULL,
+ &proc_dointvec_jiffies},
+ {NET_IPV6_ROUTE_GC_INTERVAL, "gc_interval",
+ &ip6_rt_gc_interval, sizeof(int), 0644, NULL,
+ &proc_dointvec_jiffies},
+ {NET_IPV6_ROUTE_GC_ELASTICITY, "gc_elasticity",
+ &ip6_rt_gc_elasticity, sizeof(int), 0644, NULL,
+ &proc_dointvec_jiffies},
+ {NET_IPV6_ROUTE_MTU_EXPIRES, "mtu_expires",
+ &ip6_rt_mtu_expires, sizeof(int), 0644, NULL,
+ &proc_dointvec_jiffies},
+ {0}
+};
+
+#endif
+
+
+__initfunc(void ip6_route_init(void))
+{
+#ifdef CONFIG_PROC_FS
+ proc_net_register(&proc_rt6_info);
+ proc_net_register(&proc_rt6_stats);
+#endif
+#ifdef CONFIG_IPV6_NETLINK
+ netlink_attach(NETLINK_ROUTE6, rt6_msgrcv);
+#endif
+}
+
+#ifdef MODULE
+void ip6_route_cleanup(void)
+{
+#ifdef CONFIG_PROC_FS
+ proc_net_unregister(PROC_NET_RT6);
+ proc_net_unregister(PROC_NET_RT6_STATS);
+#endif
+#ifdef CONFIG_IPV6_NETLINK
+ netlink_detach(NETLINK_ROUTE6);
+#endif
+ rt6_ifdown(NULL);
+ fib6_gc_cleanup();
+}
+#endif /* MODULE */
diff --git a/pfinet/linux-src/net/ipv6/tcp_ipv6.c b/pfinet/linux-src/net/ipv6/tcp_ipv6.c
new file mode 100644
index 00000000..c761e76c
--- /dev/null
+++ b/pfinet/linux-src/net/ipv6/tcp_ipv6.c
@@ -0,0 +1,1767 @@
+/*
+ * TCP over IPv6
+ * Linux INET6 implementation
+ *
+ * Authors:
+ * Pedro Roque <roque@di.fc.ul.pt>
+ *
+ * $Id: tcp_ipv6.c,v 1.3 2007/10/13 01:43:00 stesie Exp $
+ *
+ * Based on:
+ * linux/net/ipv4/tcp.c
+ * linux/net/ipv4/tcp_input.c
+ * linux/net/ipv4/tcp_output.c
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version
+ * 2 of the License, or (at your option) any later version.
+ */
+
+#include <linux/config.h>
+#include <linux/errno.h>
+#include <linux/types.h>
+#include <linux/socket.h>
+#include <linux/sockios.h>
+#include <linux/net.h>
+#include <linux/sched.h>
+#include <linux/in.h>
+#include <linux/in6.h>
+#include <linux/netdevice.h>
+#include <linux/init.h>
+
+#include <linux/ipv6.h>
+#include <linux/icmpv6.h>
+#include <linux/random.h>
+
+#include <net/tcp.h>
+#include <net/ndisc.h>
+#include <net/ipv6.h>
+#include <net/transp_v6.h>
+#include <net/addrconf.h>
+#include <net/ip6_route.h>
+
+#include <asm/uaccess.h>
+
+extern int sysctl_max_syn_backlog;
+
+static void tcp_v6_send_reset(struct sk_buff *skb);
+static void tcp_v6_send_check(struct sock *sk, struct tcphdr *th, int len,
+ struct sk_buff *skb);
+
+static int tcp_v6_do_rcv(struct sock *sk, struct sk_buff *skb);
+static void tcp_v6_xmit(struct sk_buff *skb);
+static struct open_request *tcp_v6_search_req(struct tcp_opt *tp,
+ struct ipv6hdr *ip6h,
+ struct tcphdr *th,
+ int iif,
+ struct open_request **prevp);
+
+static struct tcp_func ipv6_mapped;
+static struct tcp_func ipv6_specific;
+
+/* I have no idea if this is a good hash for v6 or not. -DaveM */
+static __inline__ int tcp_v6_hashfn(struct in6_addr *laddr, u16 lport,
+ struct in6_addr *faddr, u16 fport)
+{
+ int hashent = (lport ^ fport);
+
+ hashent ^= (laddr->s6_addr32[3] ^ faddr->s6_addr32[3]);
+ return (hashent & ((tcp_ehash_size/2) - 1));
+}
+
+static __inline__ int tcp_v6_sk_hashfn(struct sock *sk)
+{
+ struct in6_addr *laddr = &sk->net_pinfo.af_inet6.rcv_saddr;
+ struct in6_addr *faddr = &sk->net_pinfo.af_inet6.daddr;
+ __u16 lport = sk->num;
+ __u16 fport = sk->dport;
+ return tcp_v6_hashfn(laddr, lport, faddr, fport);
+}
+
+/* Grrr, addr_type already calculated by caller, but I don't want
+ * to add some silly "cookie" argument to this method just for that.
+ * But it doesn't matter, the recalculation is in the rarest path
+ * this function ever takes.
+ */
+static int tcp_v6_get_port(struct sock *sk, unsigned short snum)
+{
+ struct tcp_bind_bucket *tb;
+
+ SOCKHASH_LOCK();
+ if (snum == 0) {
+ int rover = tcp_port_rover;
+ int low = sysctl_local_port_range[0];
+ int high = sysctl_local_port_range[1];
+ int remaining = (high - low) + 1;
+
+ do { rover++;
+ if ((rover < low) || (rover > high))
+ rover = low;
+ tb = tcp_bhash[tcp_bhashfn(rover)];
+ for ( ; tb; tb = tb->next)
+ if (tb->port == rover)
+ goto next;
+ break;
+
+ next:
+ (void) 0;
+
+ } while (--remaining > 0);
+ tcp_port_rover = rover;
+
+ /* Exhausted local port range during search? */
+ if (remaining <= 0)
+ goto fail;
+
+ /* OK, here is the one we will use. */
+ snum = rover;
+ tb = NULL;
+ } else {
+ for (tb = tcp_bhash[tcp_bhashfn(snum)];
+ tb != NULL;
+ tb = tb->next)
+ if (tb->port == snum)
+ break;
+ }
+ if (tb != NULL && tb->owners != NULL) {
+ if (tb->fastreuse != 0 && sk->reuse != 0) {
+ goto success;
+ } else {
+ struct sock *sk2 = tb->owners;
+ int sk_reuse = sk->reuse;
+ int addr_type = ipv6_addr_type(&sk->net_pinfo.af_inet6.rcv_saddr);
+
+ for( ; sk2 != NULL; sk2 = sk2->bind_next) {
+ if (sk->bound_dev_if == sk2->bound_dev_if) {
+ if (!sk_reuse ||
+ !sk2->reuse ||
+ sk2->state == TCP_LISTEN) {
+ /* NOTE: IPv6 tw bucket have different format */
+ if (!sk2->rcv_saddr ||
+ addr_type == IPV6_ADDR_ANY ||
+ !ipv6_addr_cmp(&sk->net_pinfo.af_inet6.rcv_saddr,
+ sk2->state != TCP_TIME_WAIT ?
+ &sk2->net_pinfo.af_inet6.rcv_saddr :
+ &((struct tcp_tw_bucket*)sk)->v6_rcv_saddr))
+ break;
+ }
+ }
+ }
+ /* If we found a conflict, fail. */
+ if (sk2 != NULL)
+ goto fail;
+ }
+ }
+ if (tb == NULL &&
+ (tb = tcp_bucket_create(snum)) == NULL)
+ goto fail;
+ if (tb->owners == NULL) {
+ if (sk->reuse && sk->state != TCP_LISTEN)
+ tb->fastreuse = 1;
+ else
+ tb->fastreuse = 0;
+ } else if (tb->fastreuse &&
+ ((sk->reuse == 0) || (sk->state == TCP_LISTEN)))
+ tb->fastreuse = 0;
+
+success:
+ sk->num = snum;
+ if ((sk->bind_next = tb->owners) != NULL)
+ tb->owners->bind_pprev = &sk->bind_next;
+ tb->owners = sk;
+ sk->bind_pprev = &tb->owners;
+ sk->prev = (struct sock *) tb;
+
+ SOCKHASH_UNLOCK();
+ return 0;
+
+fail:
+ SOCKHASH_UNLOCK();
+ return 1;
+}
+
+static void tcp_v6_hash(struct sock *sk)
+{
+ if(sk->state != TCP_CLOSE) {
+ struct sock **skp;
+
+ /* Well, I know that it is ugly...
+ * All this ->prot, ->af_specific etc. need LARGE cleanup --ANK
+ */
+ if (sk->tp_pinfo.af_tcp.af_specific == &ipv6_mapped) {
+ tcp_prot.hash(sk);
+ return;
+ }
+
+ if(sk->state == TCP_LISTEN)
+ skp = &tcp_listening_hash[tcp_sk_listen_hashfn(sk)];
+ else
+ skp = &tcp_ehash[(sk->hashent = tcp_v6_sk_hashfn(sk))];
+
+ SOCKHASH_LOCK();
+ if((sk->next = *skp) != NULL)
+ (*skp)->pprev = &sk->next;
+ *skp = sk;
+ sk->pprev = skp;
+ SOCKHASH_UNLOCK();
+ }
+}
+
+static void tcp_v6_unhash(struct sock *sk)
+{
+ SOCKHASH_LOCK();
+ if(sk->pprev) {
+ if(sk->next)
+ sk->next->pprev = sk->pprev;
+ *sk->pprev = sk->next;
+ sk->pprev = NULL;
+ tcp_reg_zap(sk);
+ __tcp_put_port(sk);
+ }
+ SOCKHASH_UNLOCK();
+}
+
+static struct sock *tcp_v6_lookup_listener(struct in6_addr *daddr, unsigned short hnum, int dif)
+{
+ struct sock *sk;
+ struct sock *result = NULL;
+ int score, hiscore;
+
+ hiscore=0;
+ sk = tcp_listening_hash[tcp_lhashfn(hnum)];
+ for(; sk; sk = sk->next) {
+ if((sk->num == hnum) && (sk->family == PF_INET6)) {
+ struct ipv6_pinfo *np = &sk->net_pinfo.af_inet6;
+
+ score = 1;
+ if(!ipv6_addr_any(&np->rcv_saddr)) {
+ if(ipv6_addr_cmp(&np->rcv_saddr, daddr))
+ continue;
+ score++;
+ }
+ if (sk->bound_dev_if) {
+ if (sk->bound_dev_if != dif)
+ continue;
+ score++;
+ }
+ if (score == 3)
+ return sk;
+ if (score > hiscore) {
+ hiscore = score;
+ result = sk;
+ }
+ }
+ }
+ return result;
+}
+
+/* Sockets in TCP_CLOSE state are _always_ taken out of the hash, so
+ * we need not check it for TCP lookups anymore, thanks Alexey. -DaveM
+ * It is assumed that this code only gets called from within NET_BH.
+ */
+static inline struct sock *__tcp_v6_lookup(struct tcphdr *th,
+ struct in6_addr *saddr, u16 sport,
+ struct in6_addr *daddr, u16 dport,
+ int dif)
+{
+ struct sock *sk;
+ __u16 hnum = ntohs(dport);
+ __u32 ports = TCP_COMBINED_PORTS(sport, hnum);
+ int hash;
+
+ /* Check TCP register quick cache first. */
+ sk = TCP_RHASH(sport);
+ if(sk && TCP_IPV6_MATCH(sk, saddr, daddr, ports, dif))
+ goto hit;
+
+ /* Optimize here for direct hit, only listening connections can
+ * have wildcards anyways.
+ */
+ hash = tcp_v6_hashfn(daddr, hnum, saddr, sport);
+ for(sk = tcp_ehash[hash]; sk; sk = sk->next) {
+ /* For IPV6 do the cheaper port and family tests first. */
+ if(TCP_IPV6_MATCH(sk, saddr, daddr, ports, dif)) {
+ if (sk->state == TCP_ESTABLISHED)
+ TCP_RHASH(sport) = sk;
+ goto hit; /* You sunk my battleship! */
+ }
+ }
+ /* Must check for a TIME_WAIT'er before going to listener hash. */
+ for(sk = tcp_ehash[hash+(tcp_ehash_size/2)]; sk; sk = sk->next) {
+ if(*((__u32 *)&(sk->dport)) == ports &&
+ sk->family == PF_INET6) {
+ struct tcp_tw_bucket *tw = (struct tcp_tw_bucket *)sk;
+ if(!ipv6_addr_cmp(&tw->v6_daddr, saddr) &&
+ !ipv6_addr_cmp(&tw->v6_rcv_saddr, daddr) &&
+ (!sk->bound_dev_if || sk->bound_dev_if == dif))
+ goto hit;
+ }
+ }
+ sk = tcp_v6_lookup_listener(daddr, hnum, dif);
+hit:
+ return sk;
+}
+
+#define tcp_v6_lookup(sa, sp, da, dp, dif) __tcp_v6_lookup((0),(sa),(sp),(da),(dp),(dif))
+
+static __inline__ u16 tcp_v6_check(struct tcphdr *th, int len,
+ struct in6_addr *saddr,
+ struct in6_addr *daddr,
+ unsigned long base)
+{
+ return csum_ipv6_magic(saddr, daddr, len, IPPROTO_TCP, base);
+}
+
+static __u32 tcp_v6_init_sequence(struct sock *sk, struct sk_buff *skb)
+{
+ __u32 si;
+ __u32 di;
+
+ if (skb->protocol == __constant_htons(ETH_P_IPV6)) {
+ si = skb->nh.ipv6h->saddr.s6_addr32[3];
+ di = skb->nh.ipv6h->daddr.s6_addr32[3];
+ } else {
+ si = skb->nh.iph->saddr;
+ di = skb->nh.iph->daddr;
+ }
+
+ return secure_tcp_sequence_number(di, si,
+ skb->h.th->dest,
+ skb->h.th->source);
+}
+
+static int tcp_v6_unique_address(struct sock *sk)
+{
+ struct tcp_bind_bucket *tb;
+ unsigned short snum = sk->num;
+ int retval = 1;
+
+ /* Freeze the hash while we snoop around. */
+ SOCKHASH_LOCK();
+ tb = tcp_bhash[tcp_bhashfn(snum)];
+ for(; tb; tb = tb->next) {
+ if(tb->port == snum && tb->owners != NULL) {
+ /* Almost certainly the re-use port case, search the real hashes
+ * so it actually scales. (we hope that all ipv6 ftp servers will
+ * use passive ftp, I just cover this case for completeness)
+ */
+ sk = __tcp_v6_lookup(NULL, &sk->net_pinfo.af_inet6.daddr,
+ sk->dport,
+ &sk->net_pinfo.af_inet6.rcv_saddr,
+ htons(snum),
+ sk->bound_dev_if);
+ if((sk != NULL) && (sk->state != TCP_LISTEN))
+ retval = 0;
+ break;
+ }
+ }
+ SOCKHASH_UNLOCK();
+ return retval;
+}
+
+static __inline__ int tcp_v6_iif(struct sk_buff *skb)
+{
+ struct inet6_skb_parm *opt = (struct inet6_skb_parm *) skb->cb;
+ return opt->iif;
+}
+
+static int tcp_v6_connect(struct sock *sk, struct sockaddr *uaddr,
+ int addr_len)
+{
+ struct sockaddr_in6 *usin = (struct sockaddr_in6 *) uaddr;
+ struct ipv6_pinfo *np = &sk->net_pinfo.af_inet6;
+ struct tcp_opt *tp = &sk->tp_pinfo.af_tcp;
+ struct in6_addr *saddr = NULL;
+ struct in6_addr saddr_buf;
+ struct flowi fl;
+ struct dst_entry *dst;
+ struct sk_buff *buff;
+ int addr_type;
+ int err;
+
+ if (sk->state != TCP_CLOSE)
+ return(-EISCONN);
+
+ /*
+ * Don't allow a double connect.
+ */
+
+ if(!ipv6_addr_any(&np->daddr))
+ return -EINVAL;
+
+ if (addr_len < sizeof(struct sockaddr_in6))
+ return(-EINVAL);
+
+ if (usin->sin6_family && usin->sin6_family != AF_INET6)
+ return(-EAFNOSUPPORT);
+
+ fl.fl6_flowlabel = 0;
+ if (np->sndflow) {
+ fl.fl6_flowlabel = usin->sin6_flowinfo&IPV6_FLOWINFO_MASK;
+ if (fl.fl6_flowlabel&IPV6_FLOWLABEL_MASK) {
+ struct ip6_flowlabel *flowlabel;
+ flowlabel = fl6_sock_lookup(sk, fl.fl6_flowlabel);
+ if (flowlabel == NULL)
+ return -EINVAL;
+ ipv6_addr_copy(&usin->sin6_addr, &flowlabel->dst);
+ fl6_sock_release(flowlabel);
+ }
+ }
+
+ /*
+ * connect() to INADDR_ANY means loopback (BSD'ism).
+ */
+
+ if(ipv6_addr_any(&usin->sin6_addr))
+ usin->sin6_addr.s6_addr[15] = 0x1;
+
+ addr_type = ipv6_addr_type(&usin->sin6_addr);
+
+ if(addr_type & IPV6_ADDR_MULTICAST)
+ return -ENETUNREACH;
+
+ if (addr_type&IPV6_ADDR_LINKLOCAL) {
+ if (addr_len >= sizeof(struct sockaddr_in6) &&
+ usin->sin6_scope_id) {
+ /* If interface is set while binding, indices
+ * must coincide.
+ */
+ if (sk->bound_dev_if &&
+ sk->bound_dev_if != usin->sin6_scope_id)
+ return -EINVAL;
+
+ sk->bound_dev_if = usin->sin6_scope_id;
+ }
+
+ /* Connect to link-local address requires an interface */
+ if (!sk->bound_dev_if)
+ return -EINVAL;
+ }
+
+ /*
+ * connect to self not allowed
+ */
+
+ if (ipv6_addr_cmp(&usin->sin6_addr, &np->saddr) == 0 &&
+ usin->sin6_port == sk->sport)
+ return (-EINVAL);
+
+ memcpy(&np->daddr, &usin->sin6_addr, sizeof(struct in6_addr));
+ np->flow_label = fl.fl6_flowlabel;
+
+ /*
+ * TCP over IPv4
+ */
+
+ if (addr_type == IPV6_ADDR_MAPPED) {
+ u32 exthdrlen = tp->ext_header_len;
+ struct sockaddr_in sin;
+
+ SOCK_DEBUG(sk, "connect: ipv4 mapped\n");
+
+ sin.sin_family = AF_INET;
+ sin.sin_port = usin->sin6_port;
+ sin.sin_addr.s_addr = usin->sin6_addr.s6_addr32[3];
+
+ sk->tp_pinfo.af_tcp.af_specific = &ipv6_mapped;
+ sk->backlog_rcv = tcp_v4_do_rcv;
+
+ err = tcp_v4_connect(sk, (struct sockaddr *)&sin, sizeof(sin));
+
+ if (err) {
+ tp->ext_header_len = exthdrlen;
+ sk->tp_pinfo.af_tcp.af_specific = &ipv6_specific;
+ sk->backlog_rcv = tcp_v6_do_rcv;
+ goto failure;
+ } else {
+ ipv6_addr_set(&np->saddr, 0, 0, __constant_htonl(0x0000FFFF),
+ sk->saddr);
+ ipv6_addr_set(&np->rcv_saddr, 0, 0, __constant_htonl(0x0000FFFF),
+ sk->rcv_saddr);
+ }
+
+ return err;
+ }
+
+ if (!ipv6_addr_any(&np->rcv_saddr))
+ saddr = &np->rcv_saddr;
+
+ fl.proto = IPPROTO_TCP;
+ fl.fl6_dst = &np->daddr;
+ fl.fl6_src = saddr;
+ fl.oif = sk->bound_dev_if;
+ fl.uli_u.ports.dport = usin->sin6_port;
+ fl.uli_u.ports.sport = sk->sport;
+
+ if (np->opt && np->opt->srcrt) {
+ struct rt0_hdr *rt0 = (struct rt0_hdr *) np->opt->srcrt;
+ fl.nl_u.ip6_u.daddr = rt0->addr;
+ }
+
+ dst = ip6_route_output(sk, &fl);
+
+ if ((err = dst->error) != 0) {
+ dst_release(dst);
+ goto failure;
+ }
+
+ if (fl.oif == 0 && addr_type&IPV6_ADDR_LINKLOCAL) {
+ /* Ough! This guy tries to connect to link local
+ * address and did not specify interface.
+ * Actually we should kick him out, but
+ * we will be patient :) --ANK
+ */
+ sk->bound_dev_if = dst->dev->ifindex;
+ }
+
+ ip6_dst_store(sk, dst, NULL);
+
+ if (saddr == NULL) {
+ err = ipv6_get_saddr(dst, &np->daddr, &saddr_buf);
+ if (err)
+ goto failure;
+
+ saddr = &saddr_buf;
+ }
+
+ /* set the source address */
+ ipv6_addr_copy(&np->rcv_saddr, saddr);
+ ipv6_addr_copy(&np->saddr, saddr);
+
+ tp->ext_header_len = 0;
+ if (np->opt)
+ tp->ext_header_len = np->opt->opt_flen+np->opt->opt_nflen;
+ /* Reset mss clamp */
+ tp->mss_clamp = ~0;
+
+ err = -ENOBUFS;
+ buff = sock_wmalloc(sk, (MAX_HEADER + sk->prot->max_header),
+ 0, GFP_KERNEL);
+
+ if (buff == NULL)
+ goto failure;
+
+ sk->dport = usin->sin6_port;
+
+ if (!tcp_v6_unique_address(sk)) {
+ kfree_skb(buff);
+ err = -EADDRNOTAVAIL;
+ goto failure;
+ }
+
+ /*
+ * Init variables
+ */
+
+ tp->write_seq = secure_tcp_sequence_number(np->saddr.s6_addr32[3],
+ np->daddr.s6_addr32[3],
+ sk->sport, sk->dport);
+
+ tcp_connect(sk, buff, dst->pmtu);
+
+ return 0;
+
+failure:
+ dst_release(xchg(&sk->dst_cache, NULL));
+ memset(&np->daddr, 0, sizeof(struct in6_addr));
+ sk->daddr = 0;
+ return err;
+}
+
+static int tcp_v6_sendmsg(struct sock *sk, struct msghdr *msg, int len)
+{
+ struct ipv6_pinfo *np = &sk->net_pinfo.af_inet6;
+ int retval = -EINVAL;
+
+ /*
+ * Do sanity checking for sendmsg/sendto/send
+ */
+
+ if (msg->msg_flags & ~(MSG_OOB|MSG_DONTROUTE|MSG_DONTWAIT|MSG_NOSIGNAL))
+ goto out;
+ if (msg->msg_name) {
+ struct sockaddr_in6 *addr=(struct sockaddr_in6 *)msg->msg_name;
+
+ if (msg->msg_namelen < sizeof(*addr))
+ goto out;
+
+ if (addr->sin6_family && addr->sin6_family != AF_INET6)
+ goto out;
+ retval = -ENOTCONN;
+
+ if(sk->state == TCP_CLOSE)
+ goto out;
+ retval = -EISCONN;
+ if (addr->sin6_port != sk->dport)
+ goto out;
+ if (ipv6_addr_cmp(&addr->sin6_addr, &np->daddr))
+ goto out;
+ if (np->sndflow && np->flow_label != (addr->sin6_flowinfo&IPV6_FLOWINFO_MASK))
+ goto out;
+ }
+
+ retval = tcp_do_sendmsg(sk, msg);
+
+out:
+ return retval;
+}
+
+void tcp_v6_err(struct sk_buff *skb, struct ipv6hdr *hdr,
+ struct inet6_skb_parm *opt,
+ int type, int code, unsigned char *header, __u32 info)
+{
+ struct in6_addr *saddr = &hdr->saddr;
+ struct in6_addr *daddr = &hdr->daddr;
+ struct tcphdr *th = (struct tcphdr *)header;
+ struct ipv6_pinfo *np;
+ struct sock *sk;
+ int err;
+ struct tcp_opt *tp;
+ __u32 seq;
+
+ if (header + 8 > skb->tail)
+ return;
+
+ sk = tcp_v6_lookup(daddr, th->dest, saddr, th->source, skb->dev->ifindex);
+
+ if (sk == NULL || sk->state == TCP_TIME_WAIT) {
+ /* XXX: Update ICMP error count */
+ return;
+ }
+
+ tp = &sk->tp_pinfo.af_tcp;
+ seq = ntohl(th->seq);
+ if (sk->state != TCP_LISTEN && !between(seq, tp->snd_una, tp->snd_nxt)) {
+ net_statistics.OutOfWindowIcmps++;
+ return;
+ }
+
+ np = &sk->net_pinfo.af_inet6;
+ if (type == ICMPV6_PKT_TOOBIG) {
+ struct dst_entry *dst = NULL;
+
+ if (atomic_read(&sk->sock_readers))
+ return;
+
+ if (sk->state == TCP_LISTEN)
+ return;
+
+ /* icmp should have updated the destination cache entry */
+ if (sk->dst_cache)
+ dst = dst_check(&sk->dst_cache, np->dst_cookie);
+
+ if (dst == NULL) {
+ struct flowi fl;
+
+ /* BUGGG_FUTURE: Again, it is not clear how
+ to handle rthdr case. Ignore this complexity
+ for now.
+ */
+ fl.proto = IPPROTO_TCP;
+ fl.nl_u.ip6_u.daddr = &np->daddr;
+ fl.nl_u.ip6_u.saddr = &np->saddr;
+ fl.oif = sk->bound_dev_if;
+ fl.uli_u.ports.dport = sk->dport;
+ fl.uli_u.ports.sport = sk->sport;
+
+ dst = ip6_route_output(sk, &fl);
+ } else
+ dst = dst_clone(dst);
+
+ if (dst->error) {
+ sk->err_soft = -dst->error;
+ } else if (tp->pmtu_cookie > dst->pmtu) {
+ tcp_sync_mss(sk, dst->pmtu);
+ tcp_simple_retransmit(sk);
+ } /* else let the usual retransmit timer handle it */
+ dst_release(dst);
+ return;
+ }
+
+ icmpv6_err_convert(type, code, &err);
+
+ /* Might be for an open_request */
+ switch (sk->state) {
+ struct open_request *req, *prev;
+ struct ipv6hdr hd;
+ case TCP_LISTEN:
+ if (atomic_read(&sk->sock_readers)) {
+ net_statistics.LockDroppedIcmps++;
+ /* If too many ICMPs get dropped on busy
+ * servers this needs to be solved differently.
+ */
+ return;
+ }
+
+ /* Grrrr - fix this later. */
+ ipv6_addr_copy(&hd.saddr, saddr);
+ ipv6_addr_copy(&hd.daddr, daddr);
+ req = tcp_v6_search_req(tp, &hd, th, tcp_v6_iif(skb), &prev);
+ if (!req)
+ return;
+ if (seq != req->snt_isn) {
+ net_statistics.OutOfWindowIcmps++;
+ return;
+ }
+ if (req->sk) {
+ sk = req->sk; /* report error in accept */
+ } else {
+ tp->syn_backlog--;
+ tcp_synq_unlink(tp, req, prev);
+ req->class->destructor(req);
+ tcp_openreq_free(req);
+ }
+ /* FALL THROUGH */
+ case TCP_SYN_SENT:
+ case TCP_SYN_RECV: /* Cannot happen */
+ tcp_statistics.TcpAttemptFails++;
+ sk->err = err;
+ sk->zapped = 1;
+ mb();
+ sk->error_report(sk);
+ return;
+ }
+
+ if (np->recverr) {
+ /* This code isn't serialized with the socket code */
+ /* ANK (980927) ... which is harmless now,
+ sk->err's may be safely lost.
+ */
+ sk->err = err;
+ mb();
+ sk->error_report(sk);
+ } else {
+ sk->err_soft = err;
+ mb();
+ }
+}
+
+
+static void tcp_v6_send_synack(struct sock *sk, struct open_request *req)
+{
+ struct sk_buff * skb;
+ struct dst_entry *dst;
+ struct ipv6_txoptions *opt = NULL;
+ struct flowi fl;
+ int mss;
+
+ fl.proto = IPPROTO_TCP;
+ fl.nl_u.ip6_u.daddr = &req->af.v6_req.rmt_addr;
+ fl.nl_u.ip6_u.saddr = &req->af.v6_req.loc_addr;
+ fl.fl6_flowlabel = 0;
+ fl.oif = req->af.v6_req.iif;
+ fl.uli_u.ports.dport = req->rmt_port;
+ fl.uli_u.ports.sport = sk->sport;
+
+ opt = sk->net_pinfo.af_inet6.opt;
+ if (opt == NULL &&
+ sk->net_pinfo.af_inet6.rxopt.bits.srcrt == 2 &&
+ req->af.v6_req.pktopts) {
+ struct sk_buff *pktopts = req->af.v6_req.pktopts;
+ struct inet6_skb_parm *rxopt = (struct inet6_skb_parm *)pktopts->cb;
+ if (rxopt->srcrt)
+ opt = ipv6_invert_rthdr(sk, (struct ipv6_rt_hdr*)(pktopts->nh.raw + rxopt->srcrt));
+ }
+
+ if (opt && opt->srcrt) {
+ struct rt0_hdr *rt0 = (struct rt0_hdr *) opt->srcrt;
+ fl.nl_u.ip6_u.daddr = rt0->addr;
+ }
+
+ dst = ip6_route_output(sk, &fl);
+ if (dst->error)
+ goto done;
+
+ mss = dst->pmtu - sizeof(struct ipv6hdr) - sizeof(struct tcphdr);
+
+ skb = tcp_make_synack(sk, dst, req, mss);
+ if (skb) {
+ struct tcphdr *th = skb->h.th;
+
+ th->check = tcp_v6_check(th, skb->len,
+ &req->af.v6_req.loc_addr, &req->af.v6_req.rmt_addr,
+ csum_partial((char *)th, skb->len, skb->csum));
+
+ fl.nl_u.ip6_u.daddr = &req->af.v6_req.rmt_addr;
+ ip6_xmit(sk, skb, &fl, opt);
+ }
+
+done:
+ dst_release(dst);
+ if (opt && opt != sk->net_pinfo.af_inet6.opt)
+ sock_kfree_s(sk, opt, opt->tot_len);
+}
+
+static void tcp_v6_or_free(struct open_request *req)
+{
+ if (req->af.v6_req.pktopts) {
+ kfree_skb(req->af.v6_req.pktopts);
+ req->af.v6_req.pktopts = NULL;
+ }
+}
+
+static struct or_calltable or_ipv6 = {
+ tcp_v6_send_synack,
+ tcp_v6_or_free,
+ tcp_v6_send_reset
+};
+
+static int ipv6_opt_accepted(struct sock *sk, struct sk_buff *skb)
+{
+ struct inet6_skb_parm *opt = (struct inet6_skb_parm *)skb->cb;
+
+ if (sk->net_pinfo.af_inet6.rxopt.all) {
+ if ((opt->hop && sk->net_pinfo.af_inet6.rxopt.bits.hopopts) ||
+ ((IPV6_FLOWINFO_MASK&*(u32*)skb->nh.raw) &&
+ sk->net_pinfo.af_inet6.rxopt.bits.rxflow) ||
+ (opt->srcrt && sk->net_pinfo.af_inet6.rxopt.bits.srcrt) ||
+ ((opt->dst1 || opt->dst0) && sk->net_pinfo.af_inet6.rxopt.bits.dstopts))
+ return 1;
+ }
+ return 0;
+}
+
+
+#define BACKLOG(sk) ((sk)->tp_pinfo.af_tcp.syn_backlog) /* lvalue! */
+#define BACKLOGMAX(sk) sysctl_max_syn_backlog
+
+/* FIXME: this is substantially similar to the ipv4 code.
+ * Can some kind of merge be done? -- erics
+ */
+static int tcp_v6_conn_request(struct sock *sk, struct sk_buff *skb, __u32 isn)
+{
+ struct tcp_opt tp;
+ struct open_request *req;
+
+ /* If the socket is dead, don't accept the connection. */
+ if (sk->dead) {
+ SOCK_DEBUG(sk, "Reset on %p: Connect on dead socket.\n", sk);
+ tcp_statistics.TcpAttemptFails++;
+ return -ENOTCONN;
+ }
+
+ if (skb->protocol == __constant_htons(ETH_P_IP))
+ return tcp_v4_conn_request(sk, skb, isn);
+
+ /* FIXME: do the same check for anycast */
+ if (ipv6_addr_is_multicast(&skb->nh.ipv6h->daddr))
+ goto drop;
+
+ if (isn == 0)
+ isn = tcp_v6_init_sequence(sk,skb);
+
+ /*
+ * There are no SYN attacks on IPv6, yet...
+ */
+ if (BACKLOG(sk) >= BACKLOGMAX(sk)) {
+ (void)(net_ratelimit() &&
+ printk(KERN_INFO "droping syn ack:%d max:%d\n",
+ BACKLOG(sk), BACKLOGMAX(sk)));
+ goto drop;
+ }
+
+ req = tcp_openreq_alloc();
+ if (req == NULL) {
+ goto drop;
+ }
+
+ BACKLOG(sk)++;
+
+ req->rcv_wnd = 0; /* So that tcp_send_synack() knows! */
+
+ req->rcv_isn = TCP_SKB_CB(skb)->seq;
+ req->snt_isn = isn;
+ tp.tstamp_ok = tp.sack_ok = tp.wscale_ok = tp.snd_wscale = 0;
+ tp.mss_clamp = 65535;
+ tcp_parse_options(NULL, skb->h.th, &tp, 0);
+ if (tp.mss_clamp == 65535)
+ tp.mss_clamp = 576 - sizeof(struct ipv6hdr) - sizeof(struct iphdr);
+ if (sk->tp_pinfo.af_tcp.user_mss && sk->tp_pinfo.af_tcp.user_mss < tp.mss_clamp)
+ tp.mss_clamp = sk->tp_pinfo.af_tcp.user_mss;
+
+ req->mss = tp.mss_clamp;
+ if (tp.saw_tstamp)
+ req->ts_recent = tp.rcv_tsval;
+ req->tstamp_ok = tp.tstamp_ok;
+ req->sack_ok = tp.sack_ok;
+ req->snd_wscale = tp.snd_wscale;
+ req->wscale_ok = tp.wscale_ok;
+ req->rmt_port = skb->h.th->source;
+ ipv6_addr_copy(&req->af.v6_req.rmt_addr, &skb->nh.ipv6h->saddr);
+ ipv6_addr_copy(&req->af.v6_req.loc_addr, &skb->nh.ipv6h->daddr);
+ req->af.v6_req.pktopts = NULL;
+ if (ipv6_opt_accepted(sk, skb)) {
+ atomic_inc(&skb->users);
+ req->af.v6_req.pktopts = skb;
+ }
+ req->af.v6_req.iif = sk->bound_dev_if;
+
+ /* So that link locals have meaning */
+ if (!sk->bound_dev_if && ipv6_addr_type(&req->af.v6_req.rmt_addr)&IPV6_ADDR_LINKLOCAL)
+ req->af.v6_req.iif = tcp_v6_iif(skb);
+
+ req->class = &or_ipv6;
+ req->retrans = 0;
+ req->sk = NULL;
+
+ tcp_v6_send_synack(sk, req);
+
+ req->expires = jiffies + TCP_TIMEOUT_INIT;
+ tcp_inc_slow_timer(TCP_SLT_SYNACK);
+ tcp_synq_queue(&sk->tp_pinfo.af_tcp, req);
+
+ return 0;
+
+drop:
+ tcp_statistics.TcpAttemptFails++;
+ return 0; /* don't send reset */
+}
+
+static void tcp_v6_send_check(struct sock *sk, struct tcphdr *th, int len,
+ struct sk_buff *skb)
+{
+ struct ipv6_pinfo *np = &sk->net_pinfo.af_inet6;
+ th->check = 0;
+
+ th->check = csum_ipv6_magic(&np->saddr, &np->daddr, len, IPPROTO_TCP,
+ csum_partial((char *)th, th->doff<<2,
+ skb->csum));
+}
+
+static struct sock * tcp_v6_syn_recv_sock(struct sock *sk, struct sk_buff *skb,
+ struct open_request *req,
+ struct dst_entry *dst)
+{
+ struct ipv6_pinfo *np;
+ struct flowi fl;
+ struct tcp_opt *newtp;
+ struct sock *newsk;
+ struct ipv6_txoptions *opt;
+
+ if (skb->protocol == __constant_htons(ETH_P_IP)) {
+ /*
+ * v6 mapped
+ */
+
+ newsk = tcp_v4_syn_recv_sock(sk, skb, req, dst);
+
+ if (newsk == NULL)
+ return NULL;
+
+ np = &newsk->net_pinfo.af_inet6;
+
+ ipv6_addr_set(&np->daddr, 0, 0, __constant_htonl(0x0000FFFF),
+ newsk->daddr);
+
+ ipv6_addr_set(&np->saddr, 0, 0, __constant_htonl(0x0000FFFF),
+ newsk->saddr);
+
+ ipv6_addr_copy(&np->rcv_saddr, &np->saddr);
+
+ newsk->tp_pinfo.af_tcp.af_specific = &ipv6_mapped;
+ newsk->backlog_rcv = tcp_v4_do_rcv;
+ newsk->net_pinfo.af_inet6.pktoptions = NULL;
+ newsk->net_pinfo.af_inet6.opt = NULL;
+
+ /* It is tricky place. Until this moment IPv4 tcp
+ worked with IPv6 af_tcp.af_specific.
+ Sync it now.
+ */
+ tcp_sync_mss(newsk, newsk->tp_pinfo.af_tcp.pmtu_cookie);
+
+ return newsk;
+ }
+
+ opt = sk->net_pinfo.af_inet6.opt;
+
+ if (sk->ack_backlog > sk->max_ack_backlog)
+ goto out;
+
+ if (sk->net_pinfo.af_inet6.rxopt.bits.srcrt == 2 &&
+ opt == NULL && req->af.v6_req.pktopts) {
+ struct inet6_skb_parm *rxopt = (struct inet6_skb_parm *)req->af.v6_req.pktopts->cb;
+ if (rxopt->srcrt)
+ opt = ipv6_invert_rthdr(sk, (struct ipv6_rt_hdr*)(req->af.v6_req.pktopts->nh.raw+rxopt->srcrt));
+ }
+
+ if (dst == NULL) {
+ fl.proto = IPPROTO_TCP;
+ fl.nl_u.ip6_u.daddr = &req->af.v6_req.rmt_addr;
+ if (opt && opt->srcrt) {
+ struct rt0_hdr *rt0 = (struct rt0_hdr *) opt->srcrt;
+ fl.nl_u.ip6_u.daddr = rt0->addr;
+ }
+ fl.nl_u.ip6_u.saddr = &req->af.v6_req.loc_addr;
+ fl.fl6_flowlabel = 0;
+ fl.oif = sk->bound_dev_if;
+ fl.uli_u.ports.dport = req->rmt_port;
+ fl.uli_u.ports.sport = sk->sport;
+
+ dst = ip6_route_output(sk, &fl);
+ }
+
+ if (dst->error)
+ goto out;
+
+ sk->tp_pinfo.af_tcp.syn_backlog--;
+ sk->ack_backlog++;
+
+ newsk = tcp_create_openreq_child(sk, req, skb);
+ if (newsk == NULL)
+ goto out;
+
+ ip6_dst_store(newsk, dst, NULL);
+
+ newtp = &(newsk->tp_pinfo.af_tcp);
+
+ np = &newsk->net_pinfo.af_inet6;
+ ipv6_addr_copy(&np->daddr, &req->af.v6_req.rmt_addr);
+ ipv6_addr_copy(&np->saddr, &req->af.v6_req.loc_addr);
+ ipv6_addr_copy(&np->rcv_saddr, &req->af.v6_req.loc_addr);
+ newsk->bound_dev_if = req->af.v6_req.iif;
+
+ /* Now IPv6 options...
+
+ First: no IPv4 options.
+ */
+ newsk->opt = NULL;
+
+ /* Clone RX bits */
+ np->rxopt.all = sk->net_pinfo.af_inet6.rxopt.all;
+
+ /* Clone pktoptions received with SYN */
+ np->pktoptions = req->af.v6_req.pktopts;
+ if (np->pktoptions)
+ atomic_inc(&np->pktoptions->users);
+ np->opt = NULL;
+
+ /* Clone native IPv6 options from listening socket (if any)
+
+ Yes, keeping reference count would be much more clever,
+ but we make one more one thing there: reattach optmem
+ to newsk.
+ */
+ if (opt) {
+ np->opt = ipv6_dup_options(newsk, opt);
+ if (opt != sk->net_pinfo.af_inet6.opt)
+ sock_kfree_s(sk, opt, opt->tot_len);
+ }
+
+ newtp->ext_header_len = 0;
+ if (np->opt)
+ newtp->ext_header_len = np->opt->opt_nflen + np->opt->opt_flen;
+
+ tcp_sync_mss(newsk, dst->pmtu);
+ newtp->rcv_mss = newtp->mss_clamp;
+
+ newsk->daddr = LOOPBACK4_IPV6;
+ newsk->saddr = LOOPBACK4_IPV6;
+ newsk->rcv_saddr= LOOPBACK4_IPV6;
+
+ newsk->prot->hash(newsk);
+ tcp_inherit_port(sk, newsk);
+ add_to_prot_sklist(newsk);
+ sk->data_ready(sk, 0); /* Deliver SIGIO */
+
+ return newsk;
+
+out:
+ if (opt && opt != sk->net_pinfo.af_inet6.opt)
+ sock_kfree_s(sk, opt, opt->tot_len);
+ dst_release(dst);
+ return NULL;
+}
+
+static void tcp_v6_send_reset(struct sk_buff *skb)
+{
+ struct tcphdr *th = skb->h.th, *t1;
+ struct sk_buff *buff;
+ struct flowi fl;
+
+ if (th->rst)
+ return;
+
+ if (ipv6_addr_is_multicast(&skb->nh.ipv6h->daddr))
+ return;
+
+ /*
+ * We need to grab some memory, and put together an RST,
+ * and then put it into the queue to be sent.
+ */
+
+ buff = alloc_skb(MAX_HEADER + sizeof(struct ipv6hdr), GFP_ATOMIC);
+ if (buff == NULL)
+ return;
+
+ skb_reserve(buff, MAX_HEADER + sizeof(struct ipv6hdr));
+
+ t1 = (struct tcphdr *) skb_push(buff,sizeof(struct tcphdr));
+
+ /* Swap the send and the receive. */
+ memset(t1, 0, sizeof(*t1));
+ t1->dest = th->source;
+ t1->source = th->dest;
+ t1->doff = sizeof(*t1)/4;
+ t1->rst = 1;
+
+ if(th->ack) {
+ t1->seq = th->ack_seq;
+ } else {
+ t1->ack = 1;
+ if(!th->syn)
+ t1->ack_seq = th->seq;
+ else
+ t1->ack_seq = htonl(ntohl(th->seq)+1);
+ }
+
+ buff->csum = csum_partial((char *)t1, sizeof(*t1), 0);
+
+ fl.nl_u.ip6_u.daddr = &skb->nh.ipv6h->saddr;
+ fl.nl_u.ip6_u.saddr = &skb->nh.ipv6h->daddr;
+ fl.fl6_flowlabel = 0;
+
+ t1->check = csum_ipv6_magic(fl.nl_u.ip6_u.saddr,
+ fl.nl_u.ip6_u.daddr,
+ sizeof(*t1), IPPROTO_TCP,
+ buff->csum);
+
+ fl.proto = IPPROTO_TCP;
+ fl.oif = tcp_v6_iif(skb);
+ fl.uli_u.ports.dport = t1->dest;
+ fl.uli_u.ports.sport = t1->source;
+
+ /* sk = NULL, but it is safe for now. RST socket required. */
+ buff->dst = ip6_route_output(NULL, &fl);
+
+ if (buff->dst->error == 0) {
+ ip6_xmit(NULL, buff, &fl, NULL);
+ tcp_statistics.TcpOutSegs++;
+ tcp_statistics.TcpOutRsts++;
+ return;
+ }
+
+ kfree_skb(buff);
+}
+
+static void tcp_v6_send_ack(struct sk_buff *skb, __u32 seq, __u32 ack, __u16 window)
+{
+ struct tcphdr *th = skb->h.th, *t1;
+ struct sk_buff *buff;
+ struct flowi fl;
+
+ buff = alloc_skb(MAX_HEADER + sizeof(struct ipv6hdr), GFP_ATOMIC);
+ if (buff == NULL)
+ return;
+
+ skb_reserve(buff, MAX_HEADER + sizeof(struct ipv6hdr));
+
+ t1 = (struct tcphdr *) skb_push(buff,sizeof(struct tcphdr));
+
+ /* Swap the send and the receive. */
+ memset(t1, 0, sizeof(*t1));
+ t1->dest = th->source;
+ t1->source = th->dest;
+ t1->doff = sizeof(*t1)/4;
+ t1->ack = 1;
+ t1->seq = seq;
+ t1->ack_seq = ack;
+
+ t1->window = htons(window);
+
+ buff->csum = csum_partial((char *)t1, sizeof(*t1), 0);
+
+ fl.nl_u.ip6_u.daddr = &skb->nh.ipv6h->saddr;
+ fl.nl_u.ip6_u.saddr = &skb->nh.ipv6h->daddr;
+ fl.fl6_flowlabel = 0;
+
+ t1->check = csum_ipv6_magic(fl.nl_u.ip6_u.saddr,
+ fl.nl_u.ip6_u.daddr,
+ sizeof(*t1), IPPROTO_TCP,
+ buff->csum);
+
+ fl.proto = IPPROTO_TCP;
+ fl.oif = tcp_v6_iif(skb);
+ fl.uli_u.ports.dport = t1->dest;
+ fl.uli_u.ports.sport = t1->source;
+
+ /* sk = NULL, but it is safe for now. static socket required. */
+ buff->dst = ip6_route_output(NULL, &fl);
+
+ if (buff->dst->error == 0) {
+ ip6_xmit(NULL, buff, &fl, NULL);
+ tcp_statistics.TcpOutSegs++;
+ return;
+ }
+
+ kfree_skb(buff);
+}
+
+static struct open_request *tcp_v6_search_req(struct tcp_opt *tp,
+ struct ipv6hdr *ip6h,
+ struct tcphdr *th,
+ int iif,
+ struct open_request **prevp)
+{
+ struct open_request *req, *prev;
+ __u16 rport = th->source;
+
+ /* assumption: the socket is not in use.
+ * as we checked the user count on tcp_rcv and we're
+ * running from a soft interrupt.
+ */
+ prev = (struct open_request *) (&tp->syn_wait_queue);
+ for (req = prev->dl_next; req; req = req->dl_next) {
+ if (!ipv6_addr_cmp(&req->af.v6_req.rmt_addr, &ip6h->saddr) &&
+ !ipv6_addr_cmp(&req->af.v6_req.loc_addr, &ip6h->daddr) &&
+ req->rmt_port == rport &&
+ (!req->af.v6_req.iif || req->af.v6_req.iif == iif)) {
+ *prevp = prev;
+ return req;
+ }
+ prev = req;
+ }
+ return NULL;
+}
+
+static void tcp_v6_rst_req(struct sock *sk, struct sk_buff *skb)
+{
+ struct tcp_opt *tp = &sk->tp_pinfo.af_tcp;
+ struct open_request *req, *prev;
+
+ req = tcp_v6_search_req(tp,skb->nh.ipv6h,skb->h.th,tcp_v6_iif(skb),&prev);
+ if (!req)
+ return;
+ /* Sequence number check required by RFC793 */
+ if (before(TCP_SKB_CB(skb)->seq, req->rcv_isn) ||
+ after(TCP_SKB_CB(skb)->seq, req->rcv_isn+1))
+ return;
+ if(req->sk)
+ sk->ack_backlog--;
+ else
+ tp->syn_backlog--;
+ tcp_synq_unlink(tp, req, prev);
+ req->class->destructor(req);
+ tcp_openreq_free(req);
+ net_statistics.EmbryonicRsts++;
+}
+
+static inline struct sock *tcp_v6_hnd_req(struct sock *sk, struct sk_buff *skb)
+{
+ struct tcphdr *th = skb->h.th;
+ u32 flg = ((u32 *)th)[3];
+
+ /* Check for RST */
+ if (flg & __constant_htonl(0x00040000)) {
+ tcp_v6_rst_req(sk, skb);
+ return NULL;
+ }
+
+ /* Check SYN|ACK */
+ if (flg & __constant_htonl(0x00120000)) {
+ struct open_request *req, *dummy;
+ struct tcp_opt *tp = &(sk->tp_pinfo.af_tcp);
+
+ req = tcp_v6_search_req(tp, skb->nh.ipv6h, th, tcp_v6_iif(skb), &dummy);
+ if (req) {
+ sk = tcp_check_req(sk, skb, req);
+ }
+#if 0 /*def CONFIG_SYN_COOKIES */
+ else {
+ sk = cookie_v6_check(sk, skb);
+ }
+#endif
+ }
+ return sk;
+}
+
+static int tcp_v6_do_rcv(struct sock *sk, struct sk_buff *skb)
+{
+#ifdef CONFIG_FILTER
+ struct sk_filter *filter;
+#endif
+ int users = 0;
+
+ /* Imagine: socket is IPv6. IPv4 packet arrives,
+ goes to IPv4 receive handler and backlogged.
+ From backlog it always goes here. Kerboom...
+ Fortunately, tcp_rcv_established and rcv_established
+ handle them correctly, but it is not case with
+ tcp_v6_hnd_req and tcp_v6_send_reset(). --ANK
+ */
+
+ if (skb->protocol == __constant_htons(ETH_P_IP))
+ return tcp_v4_do_rcv(sk, skb);
+
+#ifdef CONFIG_FILTER
+ filter = sk->filter;
+ if (filter && sk_filter(skb, filter))
+ goto discard;
+#endif /* CONFIG_FILTER */
+
+ /*
+ * socket locking is here for SMP purposes as backlog rcv
+ * is currently called with bh processing disabled.
+ */
+
+ ipv6_statistics.Ip6InDelivers++;
+
+ /*
+ * This doesn't check if the socket has enough room for the packet.
+ * Either process the packet _without_ queueing it and then free it,
+ * or do the check later.
+ */
+ skb_set_owner_r(skb, sk);
+
+ /* Do Stevens' IPV6_PKTOPTIONS.
+
+ Yes, guys, it is the only place in our code, where we
+ may make it not affecting IPv4.
+ The rest of code is protocol independent,
+ and I do not like idea to uglify IPv4.
+
+ Actually, all the idea behind IPV6_PKTOPTIONS
+ looks not very well thought. For now we latch
+ options, received in the last packet, enqueued
+ by tcp. Feel free to propose better solution.
+ --ANK (980728)
+ */
+ if (sk->net_pinfo.af_inet6.rxopt.all) {
+ users = atomic_read(&skb->users);
+ atomic_inc(&skb->users);
+ }
+
+ if (sk->state == TCP_ESTABLISHED) { /* Fast path */
+ if (tcp_rcv_established(sk, skb, skb->h.th, skb->len))
+ goto reset;
+ if (users)
+ goto ipv6_pktoptions;
+ return 0;
+ }
+
+ if (sk->state == TCP_LISTEN) {
+ struct sock *nsk;
+
+ nsk = tcp_v6_hnd_req(sk, skb);
+ if (!nsk)
+ goto discard;
+
+ /*
+ * Queue it on the new socket if the new socket is active,
+ * otherwise we just shortcircuit this and continue with
+ * the new socket..
+ */
+ if (atomic_read(&nsk->sock_readers)) {
+ skb_orphan(skb);
+ __skb_queue_tail(&nsk->back_log, skb);
+ return 0;
+ }
+ sk = nsk;
+ }
+
+ if (tcp_rcv_state_process(sk, skb, skb->h.th, skb->len))
+ goto reset;
+ if (users)
+ goto ipv6_pktoptions;
+ return 0;
+
+reset:
+ tcp_v6_send_reset(skb);
+discard:
+ if (users)
+ kfree_skb(skb);
+ kfree_skb(skb);
+ return 0;
+
+ipv6_pktoptions:
+ /* Do you ask, what is it?
+
+ 1. skb was enqueued by tcp.
+ 2. skb is added to tail of read queue, rather than out of order.
+ 3. socket is not in passive state.
+ 4. Finally, it really contains options, which user wants to receive.
+ */
+ if (atomic_read(&skb->users) > users &&
+ TCP_SKB_CB(skb)->end_seq == sk->tp_pinfo.af_tcp.rcv_nxt &&
+ !((1<<sk->state)&(TCPF_CLOSE|TCPF_LISTEN))) {
+ if (ipv6_opt_accepted(sk, skb)) {
+ struct sk_buff *skb2 = skb_clone(skb, GFP_ATOMIC);
+ kfree_skb(skb);
+ skb = NULL;
+ if (skb2) {
+ skb_set_owner_r(skb2, sk);
+ skb = xchg(&sk->net_pinfo.af_inet6.pktoptions, skb2);
+ }
+ } else {
+ kfree_skb(skb);
+ skb = xchg(&sk->net_pinfo.af_inet6.pktoptions, NULL);
+ }
+ }
+
+ if (skb)
+ kfree_skb(skb);
+ return 0;
+}
+
+int tcp_v6_rcv(struct sk_buff *skb, unsigned long len)
+{
+ struct tcphdr *th;
+ struct sock *sk;
+ struct in6_addr *saddr = &skb->nh.ipv6h->saddr;
+ struct in6_addr *daddr = &skb->nh.ipv6h->daddr;
+
+ th = skb->h.th;
+
+ if (skb->pkt_type != PACKET_HOST)
+ goto discard_it;
+
+ /*
+ * Pull up the IP header.
+ */
+
+ __skb_pull(skb, skb->h.raw - skb->data);
+
+ /*
+ * Count it even if it's bad.
+ */
+
+ tcp_statistics.TcpInSegs++;
+
+ len = skb->len;
+ if (len < sizeof(struct tcphdr))
+ goto bad_packet;
+
+ /*
+ * Try to use the device checksum if provided.
+ */
+
+ switch (skb->ip_summed) {
+ case CHECKSUM_NONE:
+ skb->csum = csum_partial((char *)th, len, 0);
+ case CHECKSUM_HW:
+ if (tcp_v6_check(th,len,saddr,daddr,skb->csum)) {
+ printk(KERN_DEBUG "tcp csum failed\n");
+ bad_packet:
+ tcp_statistics.TcpInErrs++;
+ goto discard_it;
+ }
+ default:
+ /* CHECKSUM_UNNECESSARY */
+ break;
+ };
+
+ if((th->doff * 4) < sizeof(struct tcphdr) ||
+ len < (th->doff * 4))
+ goto bad_packet;
+
+ sk = __tcp_v6_lookup(th, saddr, th->source, daddr, th->dest, tcp_v6_iif(skb));
+
+ if (!sk)
+ goto no_tcp_socket;
+
+ TCP_SKB_CB(skb)->seq = ntohl(th->seq);
+ TCP_SKB_CB(skb)->end_seq = (TCP_SKB_CB(skb)->seq + th->syn + th->fin +
+ len - th->doff*4);
+ TCP_SKB_CB(skb)->ack_seq = ntohl(th->ack_seq);
+ skb->used = 0;
+ if(sk->state == TCP_TIME_WAIT)
+ goto do_time_wait;
+
+ if (!atomic_read(&sk->sock_readers))
+ return tcp_v6_do_rcv(sk, skb);
+
+ __skb_queue_tail(&sk->back_log, skb);
+ return(0);
+
+no_tcp_socket:
+ tcp_v6_send_reset(skb);
+
+discard_it:
+
+ /*
+ * Discard frame
+ */
+
+ kfree_skb(skb);
+ return 0;
+
+do_time_wait:
+ switch (tcp_timewait_state_process((struct tcp_tw_bucket *)sk,
+ skb, th, skb->len)) {
+ case TCP_TW_ACK:
+ tcp_v6_send_ack(skb,
+ ((struct tcp_tw_bucket *)sk)->snd_nxt,
+ ((struct tcp_tw_bucket *)sk)->rcv_nxt,
+ ((struct tcp_tw_bucket *)sk)->window);
+ goto discard_it;
+ case TCP_TW_RST:
+ goto no_tcp_socket;
+ default:
+ goto discard_it;
+ }
+}
+
+static int tcp_v6_rebuild_header(struct sock *sk)
+{
+ struct dst_entry *dst = NULL;
+ struct ipv6_pinfo *np = &sk->net_pinfo.af_inet6;
+
+ if (sk->dst_cache)
+ dst = dst_check(&sk->dst_cache, np->dst_cookie);
+
+ if (dst == NULL) {
+ struct flowi fl;
+
+ fl.proto = IPPROTO_TCP;
+ fl.nl_u.ip6_u.daddr = &np->daddr;
+ fl.nl_u.ip6_u.saddr = &np->saddr;
+ fl.fl6_flowlabel = np->flow_label;
+ fl.oif = sk->bound_dev_if;
+ fl.uli_u.ports.dport = sk->dport;
+ fl.uli_u.ports.sport = sk->sport;
+
+ if (np->opt && np->opt->srcrt) {
+ struct rt0_hdr *rt0 = (struct rt0_hdr *) np->opt->srcrt;
+ fl.nl_u.ip6_u.daddr = rt0->addr;
+ }
+
+
+ dst = ip6_route_output(sk, &fl);
+
+ if (dst->error) {
+ dst_release(dst);
+ return dst->error;
+ }
+
+ ip6_dst_store(sk, dst, NULL);
+ }
+
+ return dst->error;
+}
+
+static struct sock * tcp_v6_get_sock(struct sk_buff *skb, struct tcphdr *th)
+{
+ struct in6_addr *saddr;
+ struct in6_addr *daddr;
+
+ if (skb->protocol == __constant_htons(ETH_P_IP))
+ return ipv4_specific.get_sock(skb, th);
+
+ saddr = &skb->nh.ipv6h->saddr;
+ daddr = &skb->nh.ipv6h->daddr;
+ return tcp_v6_lookup(saddr, th->source, daddr, th->dest, tcp_v6_iif(skb));
+}
+
+static void tcp_v6_xmit(struct sk_buff *skb)
+{
+ struct sock *sk = skb->sk;
+ struct ipv6_pinfo * np = &sk->net_pinfo.af_inet6;
+ struct flowi fl;
+ struct dst_entry *dst = sk->dst_cache;
+
+ fl.proto = IPPROTO_TCP;
+ fl.fl6_dst = &np->daddr;
+ fl.fl6_src = &np->saddr;
+ fl.fl6_flowlabel = np->flow_label;
+ fl.oif = sk->bound_dev_if;
+ fl.uli_u.ports.sport = sk->sport;
+ fl.uli_u.ports.dport = sk->dport;
+
+ if (np->opt && np->opt->srcrt) {
+ struct rt0_hdr *rt0 = (struct rt0_hdr *) np->opt->srcrt;
+ fl.nl_u.ip6_u.daddr = rt0->addr;
+ }
+
+ if (sk->dst_cache)
+ dst = dst_check(&sk->dst_cache, np->dst_cookie);
+
+ if (dst == NULL) {
+ dst = ip6_route_output(sk, &fl);
+
+ if (dst->error) {
+ sk->err_soft = -dst->error;
+ dst_release(dst);
+ return;
+ }
+
+ ip6_dst_store(sk, dst, NULL);
+ }
+
+ skb->dst = dst_clone(dst);
+
+ /* Restore final destination back after routing done */
+ fl.nl_u.ip6_u.daddr = &np->daddr;
+
+ ip6_xmit(sk, skb, &fl, np->opt);
+}
+
+static void v6_addr2sockaddr(struct sock *sk, struct sockaddr * uaddr)
+{
+ struct ipv6_pinfo * np = &sk->net_pinfo.af_inet6;
+ struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *) uaddr;
+
+ sin6->sin6_family = AF_INET6;
+ memcpy(&sin6->sin6_addr, &np->daddr, sizeof(struct in6_addr));
+ sin6->sin6_port = sk->dport;
+ /* We do not store received flowlabel for TCP */
+ sin6->sin6_flowinfo = 0;
+ sin6->sin6_scope_id = 0;
+ if (sk->bound_dev_if &&
+ ipv6_addr_type(&sin6->sin6_addr) & IPV6_ADDR_LINKLOCAL)
+ sin6->sin6_scope_id = sk->bound_dev_if;
+}
+
+static struct tcp_func ipv6_specific = {
+ tcp_v6_xmit,
+ tcp_v6_send_check,
+ tcp_v6_rebuild_header,
+ tcp_v6_conn_request,
+ tcp_v6_syn_recv_sock,
+ tcp_v6_get_sock,
+ sizeof(struct ipv6hdr),
+
+ ipv6_setsockopt,
+ ipv6_getsockopt,
+ v6_addr2sockaddr,
+ sizeof(struct sockaddr_in6)
+};
+
+/*
+ * TCP over IPv4 via INET6 API
+ */
+
+static struct tcp_func ipv6_mapped = {
+ ip_queue_xmit,
+ tcp_v4_send_check,
+ tcp_v4_rebuild_header,
+ tcp_v6_conn_request,
+ tcp_v6_syn_recv_sock,
+ tcp_v6_get_sock,
+ sizeof(struct iphdr),
+
+ ipv6_setsockopt,
+ ipv6_getsockopt,
+ v6_addr2sockaddr,
+ sizeof(struct sockaddr_in6)
+};
+
+/* NOTE: A lot of things set to zero explicitly by call to
+ * sk_alloc() so need not be done here.
+ */
+static int tcp_v6_init_sock(struct sock *sk)
+{
+ struct tcp_opt *tp = &(sk->tp_pinfo.af_tcp);
+
+ skb_queue_head_init(&tp->out_of_order_queue);
+ tcp_init_xmit_timers(sk);
+
+ tp->rto = TCP_TIMEOUT_INIT; /*TCP_WRITE_TIME*/
+ tp->mdev = TCP_TIMEOUT_INIT;
+ tp->mss_clamp = ~0;
+
+ /* So many TCP implementations out there (incorrectly) count the
+ * initial SYN frame in their delayed-ACK and congestion control
+ * algorithms that we must have the following bandaid to talk
+ * efficiently to them. -DaveM
+ */
+ tp->snd_cwnd = 2;
+
+ /* See draft-stevens-tcpca-spec-01 for discussion of the
+ * initialization of these values.
+ */
+ tp->snd_cwnd_cnt = 0;
+ tp->snd_ssthresh = 0x7fffffff;
+
+ sk->state = TCP_CLOSE;
+ sk->max_ack_backlog = SOMAXCONN;
+ tp->rcv_mss = 536;
+
+ /* Init SYN queue. */
+ tcp_synq_init(tp);
+
+ sk->tp_pinfo.af_tcp.af_specific = &ipv6_specific;
+
+ sk->write_space = tcp_write_space;
+
+ return 0;
+}
+
+static int tcp_v6_destroy_sock(struct sock *sk)
+{
+ struct tcp_opt *tp = &(sk->tp_pinfo.af_tcp);
+ struct sk_buff *skb;
+
+ tcp_clear_xmit_timers(sk);
+
+ if (sk->keepopen)
+ tcp_dec_slow_timer(TCP_SLT_KEEPALIVE);
+
+ /*
+ * Cleanup up the write buffer.
+ */
+
+ while((skb = __skb_dequeue(&sk->write_queue)) != NULL)
+ kfree_skb(skb);
+
+ /*
+ * Cleans up our, hopefuly empty, out_of_order_queue
+ */
+
+ while((skb = __skb_dequeue(&tp->out_of_order_queue)) != NULL)
+ kfree_skb(skb);
+
+ /* Clean up a locked TCP bind bucket, this only happens if a
+ * port is allocated for a socket, but it never fully connects.
+ */
+ if(sk->prev != NULL)
+ tcp_put_port(sk);
+
+ return inet6_destroy_sock(sk);
+}
+
+struct proto tcpv6_prot = {
+ (struct sock *)&tcpv6_prot, /* sklist_next */
+ (struct sock *)&tcpv6_prot, /* sklist_prev */
+ tcp_close, /* close */
+ tcp_v6_connect, /* connect */
+ tcp_accept, /* accept */
+ NULL, /* retransmit */
+ tcp_write_wakeup, /* write_wakeup */
+ tcp_read_wakeup, /* read_wakeup */
+ tcp_poll, /* poll */
+ tcp_ioctl, /* ioctl */
+ tcp_v6_init_sock, /* init */
+ tcp_v6_destroy_sock, /* destroy */
+ tcp_shutdown, /* shutdown */
+ tcp_setsockopt, /* setsockopt */
+ tcp_getsockopt, /* getsockopt */
+ tcp_v6_sendmsg, /* sendmsg */
+ tcp_recvmsg, /* recvmsg */
+ NULL, /* bind */
+ tcp_v6_do_rcv, /* backlog_rcv */
+ tcp_v6_hash, /* hash */
+ tcp_v6_unhash, /* unhash */
+ tcp_v6_get_port, /* get_port */
+ 128, /* max_header */
+ 0, /* retransmits */
+ "TCPv6", /* name */
+ 0, /* inuse */
+ 0 /* highestinuse */
+};
+
+static struct inet6_protocol tcpv6_protocol =
+{
+ tcp_v6_rcv, /* TCP handler */
+ tcp_v6_err, /* TCP error control */
+ NULL, /* next */
+ IPPROTO_TCP, /* protocol ID */
+ 0, /* copy */
+ NULL, /* data */
+ "TCPv6" /* name */
+};
+
+__initfunc(void tcpv6_init(void))
+{
+ /* register inet6 protocol */
+ inet6_add_protocol(&tcpv6_protocol);
+}
diff --git a/pfinet/linux-src/net/ipv6/udp_ipv6.c b/pfinet/linux-src/net/ipv6/udp_ipv6.c
new file mode 100644
index 00000000..f6968ae4
--- /dev/null
+++ b/pfinet/linux-src/net/ipv6/udp_ipv6.c
@@ -0,0 +1,967 @@
+/*
+ * UDP over IPv6
+ * Linux INET6 implementation
+ *
+ * Authors:
+ * Pedro Roque <roque@di.fc.ul.pt>
+ *
+ * Based on linux/ipv4/udp.c
+ *
+ * $Id: udp_ipv6.c,v 1.3 2007/10/13 01:43:00 stesie Exp $
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version
+ * 2 of the License, or (at your option) any later version.
+ */
+
+#include <linux/config.h>
+#include <linux/errno.h>
+#include <linux/types.h>
+#include <linux/socket.h>
+#include <linux/sockios.h>
+#include <linux/sched.h>
+#include <linux/net.h>
+#include <linux/in6.h>
+#include <linux/netdevice.h>
+#include <linux/if_arp.h>
+#include <linux/ipv6.h>
+#include <linux/icmpv6.h>
+#include <linux/init.h>
+#include <asm/uaccess.h>
+
+#include <net/sock.h>
+#include <net/snmp.h>
+
+#include <net/ipv6.h>
+#include <net/ndisc.h>
+#include <net/protocol.h>
+#include <net/transp_v6.h>
+#include <net/ip6_route.h>
+#include <net/addrconf.h>
+#include <net/ip.h>
+#include <net/udp.h>
+
+#include <net/checksum.h>
+
+struct udp_mib udp_stats_in6;
+
+/* Grrr, addr_type already calculated by caller, but I don't want
+ * to add some silly "cookie" argument to this method just for that.
+ */
+static int udp_v6_get_port(struct sock *sk, unsigned short snum)
+{
+ SOCKHASH_LOCK();
+ if (snum == 0) {
+ int best_size_so_far, best, result, i;
+
+ if (udp_port_rover > sysctl_local_port_range[1] ||
+ udp_port_rover < sysctl_local_port_range[0])
+ udp_port_rover = sysctl_local_port_range[0];
+ best_size_so_far = 32767;
+ best = result = udp_port_rover;
+ for (i = 0; i < UDP_HTABLE_SIZE; i++, result++) {
+ struct sock *sk;
+ int size;
+
+ sk = udp_hash[result & (UDP_HTABLE_SIZE - 1)];
+ if (!sk) {
+ if (result > sysctl_local_port_range[1])
+ result = sysctl_local_port_range[0] +
+ ((result - sysctl_local_port_range[0]) &
+ (UDP_HTABLE_SIZE - 1));
+ goto gotit;
+ }
+ size = 0;
+ do {
+ if (++size >= best_size_so_far)
+ goto next;
+ } while ((sk = sk->next) != NULL);
+ best_size_so_far = size;
+ best = result;
+
+ next:
+ (void) 0;
+ }
+ result = best;
+ for(;; result += UDP_HTABLE_SIZE) {
+ if (result > sysctl_local_port_range[1])
+ result = sysctl_local_port_range[0]
+ + ((result - sysctl_local_port_range[0]) &
+ (UDP_HTABLE_SIZE - 1));
+ if (!udp_lport_inuse(result))
+ break;
+ }
+gotit:
+ udp_port_rover = snum = result;
+ } else {
+ struct sock *sk2;
+ int addr_type = ipv6_addr_type(&sk->net_pinfo.af_inet6.rcv_saddr);
+
+ for (sk2 = udp_hash[snum & (UDP_HTABLE_SIZE - 1)];
+ sk2 != NULL;
+ sk2 = sk2->next) {
+ if (sk2->num == snum &&
+ sk2 != sk &&
+ sk2->bound_dev_if == sk->bound_dev_if &&
+ (!sk2->rcv_saddr ||
+ addr_type == IPV6_ADDR_ANY ||
+ !ipv6_addr_cmp(&sk->net_pinfo.af_inet6.rcv_saddr,
+ &sk2->net_pinfo.af_inet6.rcv_saddr)) &&
+ (!sk2->reuse || !sk->reuse))
+ goto fail;
+ }
+ }
+
+ sk->num = snum;
+ SOCKHASH_UNLOCK();
+ return 0;
+
+fail:
+ SOCKHASH_UNLOCK();
+ return 1;
+}
+
+static void udp_v6_hash(struct sock *sk)
+{
+ struct sock **skp = &udp_hash[sk->num & (UDP_HTABLE_SIZE - 1)];
+
+ SOCKHASH_LOCK();
+ if ((sk->next = *skp) != NULL)
+ (*skp)->pprev = &sk->next;
+ *skp = sk;
+ sk->pprev = skp;
+ SOCKHASH_UNLOCK();
+}
+
+static void udp_v6_unhash(struct sock *sk)
+{
+ SOCKHASH_LOCK();
+ if (sk->pprev) {
+ if (sk->next)
+ sk->next->pprev = sk->pprev;
+ *sk->pprev = sk->next;
+ sk->pprev = NULL;
+ }
+ SOCKHASH_UNLOCK();
+}
+
+static struct sock *udp_v6_lookup(struct in6_addr *saddr, u16 sport,
+ struct in6_addr *daddr, u16 dport, int dif)
+{
+ struct sock *sk, *result = NULL;
+ unsigned short hnum = ntohs(dport);
+ int badness = -1;
+
+ for(sk = udp_hash[hnum & (UDP_HTABLE_SIZE - 1)]; sk != NULL; sk = sk->next) {
+ if((sk->num == hnum) &&
+ (sk->family == PF_INET6) &&
+ !(sk->dead && (sk->state == TCP_CLOSE))) {
+ struct ipv6_pinfo *np = &sk->net_pinfo.af_inet6;
+ int score = 0;
+ if(sk->dport) {
+ if(sk->dport != sport)
+ continue;
+ score++;
+ }
+ if(!ipv6_addr_any(&np->rcv_saddr)) {
+ if(ipv6_addr_cmp(&np->rcv_saddr, daddr))
+ continue;
+ score++;
+ }
+ if(!ipv6_addr_any(&np->daddr)) {
+ if(ipv6_addr_cmp(&np->daddr, saddr))
+ continue;
+ score++;
+ }
+ if(sk->bound_dev_if) {
+ if(sk->bound_dev_if != dif)
+ continue;
+ score++;
+ }
+ if(score == 4) {
+ result = sk;
+ break;
+ } else if(score > badness) {
+ result = sk;
+ badness = score;
+ }
+ }
+ }
+ return result;
+}
+
+/*
+ *
+ */
+
+int udpv6_connect(struct sock *sk, struct sockaddr *uaddr, int addr_len)
+{
+ struct sockaddr_in6 *usin = (struct sockaddr_in6 *) uaddr;
+ struct ipv6_pinfo *np = &sk->net_pinfo.af_inet6;
+ struct in6_addr *daddr;
+ struct in6_addr saddr;
+ struct dst_entry *dst;
+ struct flowi fl;
+ struct ip6_flowlabel *flowlabel = NULL;
+ int addr_type;
+ int err;
+
+ if (usin->sin6_family == AF_INET) {
+ err = udp_connect(sk, uaddr, addr_len);
+ goto ipv4_connected;
+ }
+
+ if (usin->sin6_family == AF_UNSPEC) {
+ udp_connect(sk, uaddr, addr_len);
+ ipv6_addr_set(&np->daddr, 0, 0, 0, 0);
+ ipv6_addr_set(&np->saddr, 0, 0, 0, 0);
+ ipv6_addr_set(&np->rcv_saddr, 0, 0, 0, 0);
+ return 0;
+ }
+
+ if (addr_len < sizeof(*usin))
+ return(-EINVAL);
+
+ if (usin->sin6_family && usin->sin6_family != AF_INET6)
+ return(-EAFNOSUPPORT);
+
+ fl.fl6_flowlabel = 0;
+ if (np->sndflow) {
+ fl.fl6_flowlabel = usin->sin6_flowinfo&IPV6_FLOWINFO_MASK;
+ if (fl.fl6_flowlabel&IPV6_FLOWLABEL_MASK) {
+ flowlabel = fl6_sock_lookup(sk, fl.fl6_flowlabel);
+ if (flowlabel == NULL)
+ return -EINVAL;
+ ipv6_addr_copy(&usin->sin6_addr, &flowlabel->dst);
+ }
+ }
+
+ addr_type = ipv6_addr_type(&usin->sin6_addr);
+
+ if (addr_type == IPV6_ADDR_ANY) {
+ /*
+ * connect to self
+ */
+ usin->sin6_addr.s6_addr[15] = 0x01;
+ }
+
+ daddr = &usin->sin6_addr;
+
+ if (addr_type == IPV6_ADDR_MAPPED) {
+ struct sockaddr_in sin;
+
+ sin.sin_family = AF_INET;
+ sin.sin_addr.s_addr = daddr->s6_addr32[3];
+ sin.sin_port = usin->sin6_port;
+
+ err = udp_connect(sk, (struct sockaddr*) &sin, sizeof(sin));
+
+ipv4_connected:
+ if (err < 0)
+ return err;
+
+ ipv6_addr_set(&np->daddr, 0, 0,
+ __constant_htonl(0x0000ffff),
+ sk->daddr);
+
+ if(ipv6_addr_any(&np->saddr)) {
+ ipv6_addr_set(&np->saddr, 0, 0,
+ __constant_htonl(0x0000ffff),
+ sk->saddr);
+
+ }
+
+ if(ipv6_addr_any(&np->rcv_saddr)) {
+ ipv6_addr_set(&np->rcv_saddr, 0, 0,
+ __constant_htonl(0x0000ffff),
+ sk->rcv_saddr);
+ }
+ return 0;
+ }
+
+ if (addr_type&IPV6_ADDR_LINKLOCAL) {
+ if (addr_len >= sizeof(struct sockaddr_in6) &&
+ usin->sin6_scope_id) {
+ if (sk->bound_dev_if &&
+ sk->bound_dev_if != usin->sin6_scope_id)
+ return(-EINVAL);
+
+ sk->bound_dev_if = usin->sin6_scope_id;
+ if (!sk->bound_dev_if &&
+ (addr_type & IPV6_ADDR_MULTICAST))
+ fl.oif = np->mcast_oif;
+ }
+
+ /* Connect to link-local address requires an interface */
+ if (!sk->bound_dev_if)
+ return(-EINVAL);
+ }
+
+ ipv6_addr_copy(&np->daddr, daddr);
+ np->flow_label = fl.fl6_flowlabel;
+
+ sk->dport = usin->sin6_port;
+
+ /*
+ * Check for a route to destination an obtain the
+ * destination cache for it.
+ */
+
+ fl.proto = IPPROTO_UDP;
+ fl.fl6_dst = &np->daddr;
+ fl.fl6_src = &saddr;
+ fl.oif = sk->bound_dev_if;
+ fl.uli_u.ports.dport = sk->dport;
+ fl.uli_u.ports.sport = sk->sport;
+
+ if (flowlabel) {
+ if (flowlabel->opt && flowlabel->opt->srcrt) {
+ struct rt0_hdr *rt0 = (struct rt0_hdr *) flowlabel->opt->srcrt;
+ fl.fl6_dst = rt0->addr;
+ }
+ } else if (np->opt && np->opt->srcrt) {
+ struct rt0_hdr *rt0 = (struct rt0_hdr *) np->opt->srcrt;
+ fl.fl6_dst = rt0->addr;
+ }
+
+ dst = ip6_route_output(sk, &fl);
+
+ if ((err = dst->error) != 0) {
+ dst_release(dst);
+ fl6_sock_release(flowlabel);
+ return err;
+ }
+
+ ip6_dst_store(sk, dst, fl.fl6_dst);
+
+ /* get the source adddress used in the appropriate device */
+
+ err = ipv6_get_saddr(dst, daddr, &saddr);
+
+ if (err == 0) {
+ if(ipv6_addr_any(&np->saddr))
+ ipv6_addr_copy(&np->saddr, &saddr);
+
+ if(ipv6_addr_any(&np->rcv_saddr)) {
+ ipv6_addr_copy(&np->rcv_saddr, &saddr);
+ sk->rcv_saddr = 0xffffffff;
+ }
+ sk->state = TCP_ESTABLISHED;
+ }
+ fl6_sock_release(flowlabel);
+
+ return err;
+}
+
+static void udpv6_close(struct sock *sk, long timeout)
+{
+ /* See for explanation: raw_close in ipv4/raw.c */
+ sk->state = TCP_CLOSE;
+ udp_v6_unhash(sk);
+ sk->dead = 1;
+ destroy_sock(sk);
+}
+
+#ifndef HAVE_CSUM_COPY_USER
+#undef CONFIG_UDP_DELAY_CSUM
+#endif
+
+/*
+ * This should be easy, if there is something there we
+ * return it, otherwise we block.
+ */
+
+int udpv6_recvmsg(struct sock *sk, struct msghdr *msg, int len,
+ int noblock, int flags, int *addr_len)
+{
+ struct sk_buff *skb;
+ int copied, err;
+
+ if (addr_len)
+ *addr_len=sizeof(struct sockaddr_in6);
+
+ if (flags & MSG_ERRQUEUE)
+ return ipv6_recv_error(sk, msg, len);
+
+ skb = skb_recv_datagram(sk, flags, noblock, &err);
+ if (!skb)
+ goto out;
+
+ copied = skb->len - sizeof(struct udphdr);
+ if (copied > len) {
+ copied = len;
+ msg->msg_flags |= MSG_TRUNC;
+ }
+
+#ifndef CONFIG_UDP_DELAY_CSUM
+ err = skb_copy_datagram_iovec(skb, sizeof(struct udphdr),
+ msg->msg_iov, copied);
+#else
+ if (skb->ip_summed==CHECKSUM_UNNECESSARY) {
+ err = skb_copy_datagram_iovec(skb, sizeof(struct udphdr), msg->msg_iov,
+ copied);
+ } else if (copied > msg->msg_iov[0].iov_len || (msg->msg_flags&MSG_TRUNC)) {
+ if ((unsigned short)csum_fold(csum_partial(skb->h.raw, skb->len, skb->csum))) {
+ /* Error for blocking case is chosen to masquerade
+ as some normal condition.
+ */
+ err = (flags&MSG_DONTWAIT) ? -EAGAIN : -EHOSTUNREACH;
+ udp_stats_in6.UdpInErrors++;
+ goto out_free;
+ }
+ err = skb_copy_datagram_iovec(skb, sizeof(struct udphdr), msg->msg_iov,
+ copied);
+ } else {
+ unsigned int csum = csum_partial(skb->h.raw, sizeof(struct udphdr), skb->csum);
+
+ err = 0;
+ csum = csum_and_copy_to_user((char*)&skb->h.uh[1], msg->msg_iov[0].iov_base, copied, csum, &err);
+ if (err)
+ goto out_free;
+ if ((unsigned short)csum_fold(csum)) {
+ /* Error for blocking case is chosen to masquerade
+ as some normal condition.
+ */
+ err = (flags&MSG_DONTWAIT) ? -EAGAIN : -EHOSTUNREACH;
+ udp_stats_in6.UdpInErrors++;
+ goto out_free;
+ }
+ }
+#endif
+ if (err)
+ goto out_free;
+
+ sk->stamp=skb->stamp;
+
+ /* Copy the address. */
+ if (msg->msg_name) {
+ struct sockaddr_in6 *sin6;
+
+ sin6 = (struct sockaddr_in6 *) msg->msg_name;
+ sin6->sin6_family = AF_INET6;
+ sin6->sin6_port = skb->h.uh->source;
+ sin6->sin6_flowinfo = 0;
+ sin6->sin6_scope_id = 0;
+
+ if (skb->protocol == __constant_htons(ETH_P_IP)) {
+ ipv6_addr_set(&sin6->sin6_addr, 0, 0,
+ __constant_htonl(0xffff), skb->nh.iph->saddr);
+ if (sk->ip_cmsg_flags)
+ ip_cmsg_recv(msg, skb);
+ } else {
+ memcpy(&sin6->sin6_addr, &skb->nh.ipv6h->saddr,
+ sizeof(struct in6_addr));
+ if (ipv6_addr_type(&sin6->sin6_addr) & IPV6_ADDR_LINKLOCAL)
+ sin6->sin6_scope_id =
+ ((struct inet6_skb_parm *) skb->cb)->iif;
+
+ if (sk->net_pinfo.af_inet6.rxopt.all)
+ datagram_recv_ctl(sk, msg, skb);
+ }
+ }
+ err = copied;
+
+out_free:
+ skb_free_datagram(sk, skb);
+out:
+ return err;
+}
+
+void udpv6_err(struct sk_buff *skb, struct ipv6hdr *hdr,
+ struct inet6_skb_parm *opt,
+ int type, int code, unsigned char *buff, __u32 info)
+{
+ struct device *dev = skb->dev;
+ struct in6_addr *saddr = &hdr->saddr;
+ struct in6_addr *daddr = &hdr->daddr;
+ struct sock *sk;
+ struct udphdr *uh;
+ int err;
+
+ if (buff + sizeof(struct udphdr) > skb->tail)
+ return;
+
+ uh = (struct udphdr *) buff;
+
+ sk = udp_v6_lookup(daddr, uh->dest, saddr, uh->source, dev->ifindex);
+
+ if (sk == NULL)
+ return;
+
+ if (!icmpv6_err_convert(type, code, &err) &&
+ !sk->net_pinfo.af_inet6.recverr)
+ return;
+
+ if (sk->bsdism && sk->state!=TCP_ESTABLISHED)
+ return;
+
+ if (sk->net_pinfo.af_inet6.recverr)
+ ipv6_icmp_error(sk, skb, err, uh->dest, ntohl(info), (u8 *)(uh+1));
+
+ sk->err = err;
+ sk->error_report(sk);
+}
+
+static inline int udpv6_queue_rcv_skb(struct sock * sk, struct sk_buff *skb)
+{
+#if defined(CONFIG_FILTER) && defined(CONFIG_UDP_DELAY_CSUM)
+ if (sk->filter && skb->ip_summed != CHECKSUM_UNNECESSARY) {
+ if ((unsigned short)csum_fold(csum_partial(skb->h.raw, skb->len, skb->csum))) {
+ udp_stats_in6.UdpInErrors++;
+ ipv6_statistics.Ip6InDiscards++;
+ kfree_skb(skb);
+ return 0;
+ }
+ skb->ip_summed = CHECKSUM_UNNECESSARY;
+ }
+#endif
+ if (sock_queue_rcv_skb(sk,skb)<0) {
+ udp_stats_in6.UdpInErrors++;
+ ipv6_statistics.Ip6InDiscards++;
+ kfree_skb(skb);
+ return 0;
+ }
+ ipv6_statistics.Ip6InDelivers++;
+ udp_stats_in6.UdpInDatagrams++;
+ return 0;
+}
+
+static __inline__ int inet6_mc_check(struct sock *sk, struct in6_addr *addr)
+{
+ struct ipv6_mc_socklist *mc;
+
+ for (mc = sk->net_pinfo.af_inet6.ipv6_mc_list; mc; mc=mc->next) {
+ if (ipv6_addr_cmp(&mc->addr, addr) == 0)
+ return 1;
+ }
+
+ return 0;
+}
+
+static struct sock *udp_v6_mcast_next(struct sock *sk,
+ u16 loc_port, struct in6_addr *loc_addr,
+ u16 rmt_port, struct in6_addr *rmt_addr,
+ int dif)
+{
+ struct sock *s = sk;
+ unsigned short num = ntohs(loc_port);
+ for(; s; s = s->next) {
+ if((s->num == num) &&
+ !(s->dead && (s->state == TCP_CLOSE))) {
+ struct ipv6_pinfo *np = &s->net_pinfo.af_inet6;
+ if(s->dport) {
+ if(s->dport != rmt_port)
+ continue;
+ }
+ if(!ipv6_addr_any(&np->daddr) &&
+ ipv6_addr_cmp(&np->daddr, rmt_addr))
+ continue;
+
+ if (s->bound_dev_if && s->bound_dev_if != dif)
+ continue;
+
+ if(!ipv6_addr_any(&np->rcv_saddr)) {
+ if(ipv6_addr_cmp(&np->rcv_saddr, loc_addr) == 0)
+ return s;
+ }
+ if(!inet6_mc_check(s, loc_addr))
+ continue;
+ return s;
+ }
+ }
+ return NULL;
+}
+
+/*
+ * Note: called only from the BH handler context,
+ * so we don't need to lock the hashes.
+ */
+static void udpv6_mcast_deliver(struct udphdr *uh,
+ struct in6_addr *saddr, struct in6_addr *daddr,
+ struct sk_buff *skb)
+{
+ struct sock *sk, *sk2;
+ struct sk_buff *buff;
+ int dif;
+
+ sk = udp_hash[ntohs(uh->dest) & (UDP_HTABLE_SIZE - 1)];
+ dif = skb->dev->ifindex;
+ sk = udp_v6_mcast_next(sk, uh->dest, daddr, uh->source, saddr, dif);
+ if (!sk)
+ goto free_skb;
+
+ buff = NULL;
+ sk2 = sk;
+ while((sk2 = udp_v6_mcast_next(sk2->next, uh->dest, saddr,
+ uh->source, daddr, dif))) {
+ if (!buff) {
+ buff = skb_clone(skb, GFP_ATOMIC);
+ if (!buff)
+ continue;
+ }
+ if (sock_queue_rcv_skb(sk2, buff) >= 0)
+ buff = NULL;
+ }
+ if (buff)
+ kfree_skb(buff);
+ if (sock_queue_rcv_skb(sk, skb) < 0) {
+free_skb:
+ kfree_skb(skb);
+ }
+}
+
+int udpv6_rcv(struct sk_buff *skb, unsigned long len)
+{
+ struct sock *sk;
+ struct udphdr *uh;
+ struct device *dev = skb->dev;
+ struct in6_addr *saddr = &skb->nh.ipv6h->saddr;
+ struct in6_addr *daddr = &skb->nh.ipv6h->daddr;
+ u32 ulen;
+
+ uh = skb->h.uh;
+ __skb_pull(skb, skb->h.raw - skb->data);
+
+ ulen = ntohs(uh->len);
+
+ /* Check for jumbo payload */
+ if (ulen == 0 && skb->nh.ipv6h->payload_len == 0)
+ ulen = len;
+
+ if (ulen > len || len < sizeof(*uh)) {
+ if (net_ratelimit())
+ printk(KERN_DEBUG "UDP: short packet: %d/%ld\n", ulen, len);
+ udp_stats_in6.UdpInErrors++;
+ kfree_skb(skb);
+ return(0);
+ }
+
+ if (uh->check == 0) {
+ /* IPv6 draft-v2 section 8.1 says that we SHOULD log
+ this error. Well, it is reasonable.
+ */
+ if (net_ratelimit())
+ printk(KERN_INFO "IPv6: udp checksum is 0\n");
+ goto discard;
+ }
+
+ skb_trim(skb, ulen);
+
+#ifndef CONFIG_UDP_DELAY_CSUM
+ switch (skb->ip_summed) {
+ case CHECKSUM_NONE:
+ skb->csum = csum_partial((char*)uh, ulen, 0);
+ case CHECKSUM_HW:
+ if (csum_ipv6_magic(saddr, daddr, ulen, IPPROTO_UDP, skb->csum)) {
+ printk(KERN_DEBUG "IPv6: udp checksum error\n");
+ goto discard;
+ }
+ };
+#else
+ if (skb->ip_summed==CHECKSUM_HW) {
+ if (csum_ipv6_magic(saddr, daddr, ulen, IPPROTO_UDP, skb->csum))
+ goto discard;
+ skb->ip_summed = CHECKSUM_UNNECESSARY;
+ } else if (skb->ip_summed != CHECKSUM_UNNECESSARY)
+ skb->csum = ~csum_ipv6_magic(saddr, daddr, ulen, IPPROTO_UDP, 0);
+#endif
+
+ len = ulen;
+
+ /*
+ * Multicast receive code
+ */
+ if (ipv6_addr_type(daddr) & IPV6_ADDR_MULTICAST) {
+ udpv6_mcast_deliver(uh, saddr, daddr, skb);
+ return 0;
+ }
+
+ /* Unicast */
+
+ /*
+ * check socket cache ... must talk to Alan about his plans
+ * for sock caches... i'll skip this for now.
+ */
+
+ sk = udp_v6_lookup(saddr, uh->source, daddr, uh->dest, dev->ifindex);
+
+ if (sk == NULL) {
+#ifdef CONFIG_UDP_DELAY_CSUM
+ if (skb->ip_summed != CHECKSUM_UNNECESSARY &&
+ (unsigned short)csum_fold(csum_partial((char*)uh, len, skb->csum)))
+ goto discard;
+#endif
+ udp_stats_in6.UdpNoPorts++;
+
+ icmpv6_send(skb, ICMPV6_DEST_UNREACH, ICMPV6_PORT_UNREACH, 0, dev);
+
+ kfree_skb(skb);
+ return(0);
+ }
+
+ /* deliver */
+
+ udpv6_queue_rcv_skb(sk, skb);
+
+ return(0);
+
+discard:
+ udp_stats_in6.UdpInErrors++;
+ kfree_skb(skb);
+ return(0);
+}
+
+/*
+ * Sending
+ */
+
+struct udpv6fakehdr
+{
+ struct udphdr uh;
+ struct iovec *iov;
+ __u32 wcheck;
+ __u32 pl_len;
+ struct in6_addr *daddr;
+};
+
+/*
+ * with checksum
+ */
+
+static int udpv6_getfrag(const void *data, struct in6_addr *addr,
+ char *buff, unsigned int offset, unsigned int len)
+{
+ struct udpv6fakehdr *udh = (struct udpv6fakehdr *) data;
+ char *dst;
+ int final = 0;
+ int clen = len;
+
+ dst = buff;
+
+ if (offset) {
+ offset -= sizeof(struct udphdr);
+ } else {
+ dst += sizeof(struct udphdr);
+ final = 1;
+ clen -= sizeof(struct udphdr);
+ }
+
+ if (csum_partial_copy_fromiovecend(dst, udh->iov, offset,
+ clen, &udh->wcheck))
+ return -EFAULT;
+
+ if (final) {
+ struct in6_addr *daddr;
+
+ udh->wcheck = csum_partial((char *)udh, sizeof(struct udphdr),
+ udh->wcheck);
+
+ if (udh->daddr) {
+ daddr = udh->daddr;
+ } else {
+ /*
+ * use packet destination address
+ * this should improve cache locality
+ */
+ daddr = addr + 1;
+ }
+ udh->uh.check = csum_ipv6_magic(addr, daddr,
+ udh->pl_len, IPPROTO_UDP,
+ udh->wcheck);
+ if (udh->uh.check == 0)
+ udh->uh.check = -1;
+
+ memcpy(buff, udh, sizeof(struct udphdr));
+ }
+ return 0;
+}
+
+static int udpv6_sendmsg(struct sock *sk, struct msghdr *msg, int ulen)
+{
+ struct ipv6_txoptions opt_space;
+ struct udpv6fakehdr udh;
+ struct ipv6_pinfo *np = &sk->net_pinfo.af_inet6;
+ struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *) msg->msg_name;
+ struct ipv6_txoptions *opt = NULL;
+ struct ip6_flowlabel *flowlabel = NULL;
+ struct flowi fl;
+ int addr_len = msg->msg_namelen;
+ struct in6_addr *daddr;
+ int len = ulen + sizeof(struct udphdr);
+ int addr_type;
+ int hlimit = -1;
+
+ int err;
+
+ /* Rough check on arithmetic overflow,
+ better check is made in ip6_build_xmit
+ */
+ if (ulen < 0 || ulen > INT_MAX - sizeof(struct udphdr))
+ return -EMSGSIZE;
+
+ if (msg->msg_flags & ~(MSG_DONTROUTE|MSG_DONTWAIT))
+ return(-EINVAL);
+
+ fl.fl6_flowlabel = 0;
+
+ if (sin6) {
+ if (sin6->sin6_family == AF_INET)
+ return udp_sendmsg(sk, msg, ulen);
+
+ if (addr_len < sizeof(*sin6))
+ return(-EINVAL);
+
+ if (sin6->sin6_family && sin6->sin6_family != AF_INET6)
+ return(-EINVAL);
+
+ if (sin6->sin6_port == 0)
+ return(-EINVAL);
+
+ udh.uh.dest = sin6->sin6_port;
+ daddr = &sin6->sin6_addr;
+
+ if (np->sndflow) {
+ fl.fl6_flowlabel = sin6->sin6_flowinfo&IPV6_FLOWINFO_MASK;
+ if (fl.fl6_flowlabel&IPV6_FLOWLABEL_MASK) {
+ flowlabel = fl6_sock_lookup(sk, fl.fl6_flowlabel);
+ if (flowlabel == NULL)
+ return -EINVAL;
+ daddr = &flowlabel->dst;
+ }
+ }
+
+ /* Otherwise it will be difficult to maintain sk->dst_cache. */
+ if (sk->state == TCP_ESTABLISHED &&
+ !ipv6_addr_cmp(daddr, &sk->net_pinfo.af_inet6.daddr))
+ daddr = &sk->net_pinfo.af_inet6.daddr;
+
+ if (addr_len >= sizeof(struct sockaddr_in6) &&
+ sin6->sin6_scope_id &&
+ ipv6_addr_type(daddr)&IPV6_ADDR_LINKLOCAL)
+ fl.oif = sin6->sin6_scope_id;
+ } else {
+ if (sk->state != TCP_ESTABLISHED)
+ return(-ENOTCONN);
+
+ udh.uh.dest = sk->dport;
+ daddr = &sk->net_pinfo.af_inet6.daddr;
+ fl.fl6_flowlabel = np->flow_label;
+ }
+
+ addr_type = ipv6_addr_type(daddr);
+
+ if (addr_type == IPV6_ADDR_MAPPED) {
+ struct sockaddr_in sin;
+
+ sin.sin_family = AF_INET;
+ sin.sin_addr.s_addr = daddr->s6_addr32[3];
+ sin.sin_port = udh.uh.dest;
+ msg->msg_name = (struct sockaddr *)(&sin);
+ msg->msg_namelen = sizeof(sin);
+ fl6_sock_release(flowlabel);
+
+ return udp_sendmsg(sk, msg, ulen);
+ }
+
+ udh.daddr = NULL;
+ fl.oif = sk->bound_dev_if;
+ fl.fl6_src = NULL;
+
+ if (msg->msg_controllen) {
+ opt = &opt_space;
+ memset(opt, 0, sizeof(struct ipv6_txoptions));
+
+ err = datagram_send_ctl(msg, &fl, opt, &hlimit);
+ if (err < 0) {
+ fl6_sock_release(flowlabel);
+ return err;
+ }
+ if ((fl.fl6_flowlabel&IPV6_FLOWLABEL_MASK) && !flowlabel) {
+ flowlabel = fl6_sock_lookup(sk, fl.fl6_flowlabel);
+ if (flowlabel == NULL)
+ return -EINVAL;
+ }
+ if (!(opt->opt_nflen|opt->opt_flen))
+ opt = NULL;
+ }
+ if (opt == NULL)
+ opt = np->opt;
+ if (flowlabel)
+ opt = fl6_merge_options(&opt_space, flowlabel, opt);
+ if (opt && opt->srcrt)
+ udh.daddr = daddr;
+
+ udh.uh.source = sk->sport;
+ udh.uh.len = len < 0x10000 ? htons(len) : 0;
+ udh.uh.check = 0;
+ udh.iov = msg->msg_iov;
+ udh.wcheck = 0;
+ udh.pl_len = len;
+
+ fl.proto = IPPROTO_UDP;
+ fl.fl6_dst = daddr;
+ fl.uli_u.ports.dport = udh.uh.dest;
+ fl.uli_u.ports.sport = udh.uh.source;
+
+ err = ip6_build_xmit(sk, udpv6_getfrag, &udh, &fl, len, opt, hlimit,
+ msg->msg_flags);
+
+ fl6_sock_release(flowlabel);
+
+ if (err < 0)
+ return err;
+
+ udp_stats_in6.UdpOutDatagrams++;
+ return ulen;
+}
+
+static struct inet6_protocol udpv6_protocol =
+{
+ udpv6_rcv, /* UDP handler */
+ udpv6_err, /* UDP error control */
+ NULL, /* next */
+ IPPROTO_UDP, /* protocol ID */
+ 0, /* copy */
+ NULL, /* data */
+ "UDPv6" /* name */
+};
+
+#ifdef _HURD_
+#define udp_ioctl 0
+#endif
+
+struct proto udpv6_prot = {
+ (struct sock *)&udpv6_prot, /* sklist_next */
+ (struct sock *)&udpv6_prot, /* sklist_prev */
+ udpv6_close, /* close */
+ udpv6_connect, /* connect */
+ NULL, /* accept */
+ NULL, /* retransmit */
+ NULL, /* write_wakeup */
+ NULL, /* read_wakeup */
+ datagram_poll, /* poll */
+ udp_ioctl, /* ioctl */
+ NULL, /* init */
+ inet6_destroy_sock, /* destroy */
+ NULL, /* shutdown */
+ ipv6_setsockopt, /* setsockopt */
+ ipv6_getsockopt, /* getsockopt */
+ udpv6_sendmsg, /* sendmsg */
+ udpv6_recvmsg, /* recvmsg */
+ NULL, /* bind */
+ udpv6_queue_rcv_skb, /* backlog_rcv */
+ udp_v6_hash, /* hash */
+ udp_v6_unhash, /* unhash */
+ udp_v6_get_port, /* get_port */
+ 128, /* max_header */
+ 0, /* retransmits */
+ "UDP", /* name */
+ 0, /* inuse */
+ 0 /* highestinuse */
+};
+
+void __init udpv6_init(void)
+{
+ inet6_add_protocol(&udpv6_protocol);
+}
diff --git a/pfinet/main.c b/pfinet/main.c
index 9337b27a..1357b037 100644
--- a/pfinet/main.c
+++ b/pfinet/main.c
@@ -1,5 +1,5 @@
/*
- Copyright (C) 1995,96,97,99,2000,02 Free Software Foundation, Inc.
+ Copyright (C) 1995,96,97,99,2000,02,07 Free Software Foundation, Inc.
Written by Michael I. Bushnell, p/BSG.
This file is part of the GNU Hurd.
@@ -29,24 +29,40 @@
#include <fcntl.h>
#include <version.h>
+/* Include Hurd's errno.h file, but don't include glue-include/hurd/errno.h,
+ since it #undef's the errno macro. */
+#define _HACK_ERRNO_H
+#include <errno.h>
+
#include <linux/netdevice.h>
#include <linux/inet.h>
+static void pfinet_activate_ipv6 (void);
+
/* devinet.c */
extern error_t configure_device (struct device *dev,
uint32_t addr, uint32_t netmask,
uint32_t peer, uint32_t broadcast);
+/* addrconf.c */
+extern int addrconf_notify(struct notifier_block *this, unsigned long event,
+ void * data);
+
int trivfs_fstype = FSTYPE_MISC;
int trivfs_fsid;
int trivfs_support_read = 1;
int trivfs_support_write = 1;
int trivfs_support_exec = 0;
int trivfs_allow_open = O_READ | O_WRITE;
-struct port_class *trivfs_protid_portclasses[1];
-int trivfs_protid_nportclasses = 1;
-struct port_class *trivfs_cntl_portclasses[1];
-int trivfs_cntl_nportclasses = 1;
+
+struct port_class *trivfs_protid_portclasses[2];
+int trivfs_protid_nportclasses = 2;
+
+struct port_class *trivfs_cntl_portclasses[2];
+int trivfs_cntl_nportclasses = 2;
+
+/* Which portclass to install on the bootstrap port, default to IPv4. */
+int pfinet_bootstrap_portclass = PORTCLASS_INET;
struct port_class *shutdown_notify_class;
@@ -224,6 +240,7 @@ enumerate_devices (error_t (*fun) (struct device *dev))
extern void sk_init (void), skb_init (void);
extern int net_dev_init (void);
+extern void inet6_proto_init (struct net_proto *pro);
int
main (int argc,
@@ -234,8 +251,6 @@ main (int argc,
struct stat st;
pfinet_bucket = ports_create_bucket ();
- trivfs_protid_portclasses[0] = ports_create_class (trivfs_clean_protid, 0);
- trivfs_cntl_portclasses[0] = ports_create_class (trivfs_clean_cntl, 0);
addrport_class = ports_create_class (clean_addrport, 0);
socketport_class = ports_create_class (clean_socketport, 0);
trivfs_fsid = getpid ();
@@ -273,39 +288,62 @@ main (int argc,
/* Parse options. When successful, this configures the interfaces
before returning; to do so, it will acquire the global_lock.
- (And when not sucessful, it never returns.) */
+ (And when not successful, it never returns.) */
argp_parse (&pfinet_argp, argc, argv, 0,0,0);
- /* Ask init to tell us when the system is going down,
- so we can try to be friendly to our correspondents on the network. */
- arrange_shutdown_notification ();
-
- /* Talk to parent and link us in. */
task_get_bootstrap_port (mach_task_self (), &bootstrap);
- if (bootstrap == MACH_PORT_NULL)
- error (1, 0, "Must be started as a translator");
- err = trivfs_startup (bootstrap, 0,
- trivfs_cntl_portclasses[0], pfinet_bucket,
- trivfs_protid_portclasses[0], pfinet_bucket,
- &pfinetctl);
+ pfinet_owner = pfinet_group = 0;
- if (err)
- error (1, err, "contacting parent");
+ if (bootstrap != MACH_PORT_NULL) {
+ /* Create portclass to install on the bootstrap port. */
+ if(trivfs_protid_portclasses[pfinet_bootstrap_portclass]
+ != MACH_PORT_NULL)
+ error(1, 0, "No portclass left to assign to bootstrap port");
- /* Initialize status from underlying node. */
- err = io_stat (pfinetctl->underlying, &st);
- if (err)
- {
- /* We cannot stat the underlying node. Fallback to the defaults. */
- pfinet_owner = pfinet_group = 0;
- err = 0;
- }
- else
- {
- pfinet_owner = st.st_uid;
- pfinet_group = st.st_gid;
- }
+#ifdef CONFIG_IPV6
+ if (pfinet_bootstrap_portclass == PORTCLASS_INET6)
+ pfinet_activate_ipv6 ();
+#endif
+
+ trivfs_protid_portclasses[pfinet_bootstrap_portclass] =
+ ports_create_class (trivfs_clean_protid, 0);
+ trivfs_cntl_portclasses[pfinet_bootstrap_portclass] =
+ ports_create_class (trivfs_clean_cntl, 0);
+
+ /* Talk to parent and link us in. */
+ err = trivfs_startup (bootstrap, 0,
+ trivfs_cntl_portclasses[pfinet_bootstrap_portclass],
+ pfinet_bucket, trivfs_protid_portclasses
+ [pfinet_bootstrap_portclass], pfinet_bucket,
+ &pfinetctl);
+
+ if (err)
+ error (1, err, "contacting parent");
+
+ /* Initialize status from underlying node. */
+ err = io_stat (pfinetctl->underlying, &st);
+ if (! err)
+ {
+ pfinet_owner = st.st_uid;
+ pfinet_group = st.st_gid;
+ }
+ }
+ else { /* no bootstrap port. */
+ int i;
+ /* Check that at least one portclass has been bound,
+ error out otherwise. */
+ for (i = 0; i < trivfs_protid_nportclasses; i ++)
+ if (trivfs_protid_portclasses[i] != MACH_PORT_NULL)
+ break;
+
+ if (i == trivfs_protid_nportclasses)
+ error (1, 0, "should be started as a translator.\n");
+ }
+
+ /* Ask init to tell us when the system is going down,
+ so we can try to be friendly to our correspondents on the network. */
+ arrange_shutdown_notification ();
/* Launch */
ports_manage_port_operations_multithread (pfinet_bucket,
@@ -314,6 +352,76 @@ main (int argc,
return 0;
}
+#ifdef CONFIG_IPV6
+static void
+pfinet_activate_ipv6 (void)
+{
+ inet6_proto_init (0);
+
+ /* Since we're registering the protocol after the devices have been
+ initialized, we need to care for the linking by ourselves. */
+ struct device *dev = dev_base;
+
+ if (dev)
+ do
+ {
+ if (!(dev->flags & IFF_UP))
+ continue;
+
+ addrconf_notify (NULL, NETDEV_REGISTER, dev);
+ addrconf_notify (NULL, NETDEV_UP, dev);
+ }
+ while ((dev = dev->next));
+}
+#endif /* CONFIG_IPV6 */
+
+void
+pfinet_bind (int portclass, const char *name)
+{
+ struct trivfs_control *cntl;
+ error_t err = 0;
+ mach_port_t right;
+ file_t file = file_name_lookup (name, O_CREAT|O_NOTRANS, 0666);
+
+ if (file == MACH_PORT_NULL)
+ err = errno;
+
+ if (! err) {
+ if (trivfs_protid_portclasses[portclass] != MACH_PORT_NULL)
+ error (1, 0, "Cannot bind one protocol to multiple nodes.\n");
+
+#ifdef CONFIG_IPV6
+ if (portclass == PORTCLASS_INET6)
+ pfinet_activate_ipv6 ();
+#endif
+
+ trivfs_protid_portclasses[portclass] =
+ ports_create_class (trivfs_clean_protid, 0);
+ trivfs_cntl_portclasses[portclass] =
+ ports_create_class (trivfs_clean_cntl, 0);
+
+ err = trivfs_create_control (file, trivfs_cntl_portclasses[portclass],
+ pfinet_bucket,
+ trivfs_protid_portclasses[portclass],
+ pfinet_bucket, &cntl);
+ }
+
+ if (! err)
+ {
+ right = ports_get_send_right (cntl);
+ err = file_set_translator (file, 0, FS_TRANS_EXCL | FS_TRANS_SET,
+ 0, 0, 0, right, MACH_MSG_TYPE_COPY_SEND);
+ mach_port_deallocate (mach_task_self (), right);
+ }
+
+ if (err)
+ error (1, err, "%s", name);
+
+ ports_port_deref (cntl);
+
+}
+
+
void
trivfs_modify_stat (struct trivfs_protid *cred,
struct stat *st)
diff --git a/pfinet/misc.c b/pfinet/misc.c
index 56611daf..08b19e9b 100644
--- a/pfinet/misc.c
+++ b/pfinet/misc.c
@@ -42,7 +42,7 @@ make_sockaddr_port (struct socket *sock,
err = (*sock->ops->getname) (sock, &buf.sa, &buflen, peer);
if (err)
- return err;
+ return -err;
err = ports_create_port (addrport_class, pfinet_bucket,
(offsetof (struct sock_addr, address)
diff --git a/pfinet/options.c b/pfinet/options.c
index d05ac6d0..21a35c61 100644
--- a/pfinet/options.c
+++ b/pfinet/options.c
@@ -1,6 +1,6 @@
/* Pfinet option parsing
- Copyright (C) 1996, 1997, 2000, 2001, 2006 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997, 2000, 2001, 2006, 2007 Free Software Foundation, Inc.
Written by Miles Bader <miles@gnu.org>
@@ -37,7 +37,11 @@
#include <linux/route.h>
#include <linux/rtnetlink.h>
#include <net/route.h>
+#include <net/sock.h>
#include <net/ip_fib.h>
+#include <net/ip6_fib.h>
+#include <net/ip6_route.h>
+#include <net/addrconf.h>
/* Our interface to the set of devices. */
extern error_t find_device (char *name, struct device **device);
@@ -50,6 +54,12 @@ extern error_t configure_device (struct device *dev, uint32_t addr,
extern void inquire_device (struct device *dev, uint32_t *addr,
uint32_t *netmask, uint32_t *peer,
uint32_t *broadcast);
+
+/* addrconf.c */
+extern struct inet6_dev *ipv6_find_idev (struct device *dev);
+extern int inet6_addr_add (int ifindex, struct in6_addr *pfx, int plen);
+extern int inet6_addr_del (int ifindex, struct in6_addr *pfx, int plen);
+
/* Pfinet options. Used for both startup and runtime. */
static const struct argp_option options[] =
@@ -60,6 +70,12 @@ static const struct argp_option options[] =
{"netmask", 'm', "MASK", 0, "Set the netmask"},
{"peer", 'p', "ADDRESS", 0, "Set the peer address"},
{"gateway", 'g', "ADDRESS", 0, "Set the default gateway"},
+ {"ipv4", '4', "NAME", 0, "Put active IPv4 translator on NAME"},
+#ifdef CONFIG_IPV6
+ {"ipv6", '6', "NAME", 0, "Put active IPv6 translator on NAME"},
+ {"address6", 'A', "ADDR/LEN",0, "Set the global IPv6 address"},
+ {"gateway6", 'G', "ADDRESS", 0, "Set the IPv6 default gateway"},
+#endif
{"shutdown", 's', 0, 0, "Shut it down"},
{0}
};
@@ -74,8 +90,14 @@ struct parse_interface
/* The network interface in question. */
struct device *device;
- /* New values to apply to it. */
+ /* New values to apply to it. (IPv4) */
uint32_t address, netmask, peer, gateway;
+
+#ifdef CONFIG_IPV6
+ /* New IPv6 configuration to apply. */
+ struct inet6_ifaddr address6;
+ struct in6_addr gateway6;
+#endif
};
/* Used to hold data during argument parsing. */
@@ -108,8 +130,27 @@ parse_hook_add_interface (struct parse_hook *h)
h->curint->netmask = INADDR_NONE;
h->curint->peer = INADDR_NONE;
h->curint->gateway = INADDR_NONE;
+
+#ifdef CONFIG_IPV6
+ memset (&h->curint->address6, 0, sizeof (struct inet6_ifaddr));
+ memset (&h->curint->gateway6, 0, sizeof (struct in6_addr));
+#endif
+
return 0;
}
+
+#ifdef CONFIG_IPV6
+static struct rt6_info *
+ipv6_get_dflt_router (void)
+{
+ struct in6_addr daddr = { 0 };
+
+ struct fib6_node *fib = fib6_lookup
+ (&ip6_routing_table, &daddr, NULL);
+ return fib->leaf;
+}
+#endif /* CONFIG_IPV6 */
+
static error_t
parse_opt (int opt, char *arg, struct argp_state *state)
@@ -146,6 +187,10 @@ parse_opt (int opt, char *arg, struct argp_state *state)
{
struct parse_interface *in;
uint32_t gateway;
+#ifdef CONFIG_IPV6
+ struct parse_interface *gw6_in;
+ char *ptr;
+#endif
case 'i':
/* An interface. */
@@ -196,6 +241,52 @@ parse_opt (int opt, char *arg, struct argp_state *state)
case 'g':
h->curint->gateway = ADDR (arg, "gateway"); break;
+ case '4':
+ pfinet_bind (PORTCLASS_INET, arg);
+
+ /* Install IPv6 port class on bootstrap port. */
+ pfinet_bootstrap_portclass = PORTCLASS_INET6;
+ break;
+
+#ifdef CONFIG_IPV6
+ case '6':
+ pfinet_bind (PORTCLASS_INET6, arg);
+ break;
+
+ case 'A':
+ if ((ptr = strchr (arg, '/')))
+ {
+ h->curint->address6.prefix_len = atoi (ptr + 1);
+ if (h->curint->address6.prefix_len > 128)
+ FAIL (EINVAL, 1, 0, "%s: The prefix-length is invalid", arg);
+
+ *ptr = 0;
+ }
+ else
+ {
+ h->curint->address6.prefix_len = 64;
+ fprintf (stderr, "No prefix-length given, defaulting to %s/64.\n",
+ arg);
+ }
+
+ if (inet_pton (AF_INET6, arg, &h->curint->address6.addr) <= 0)
+ PERR (EINVAL, "Malformed address");
+
+ if (IN6_IS_ADDR_MULTICAST (&h->curint->address6.addr))
+ FAIL (EINVAL, 1, 0, "%s: Cannot set interface address to "
+ "multicast address", arg);
+ break;
+
+ case 'G':
+ if (inet_pton (AF_INET6, arg, &h->curint->gateway6) <= 0)
+ PERR (EINVAL, "Malformed gateway");
+
+ if (IN6_IS_ADDR_MULTICAST (&h->curint->gateway6))
+ FAIL (EINVAL, 1, 0, "%s: Cannot set gateway to "
+ "multicast address", arg);
+ break;
+#endif /* CONFIG_IPV6 */
+
case ARGP_KEY_INIT:
/* Initialize our parsing state. */
h = malloc (sizeof (struct parse_hook));
@@ -234,30 +325,82 @@ parse_opt (int opt, char *arg, struct argp_state *state)
#endif
gateway = INADDR_NONE;
+#ifdef CONFIG_IPV6
+ gw6_in = NULL;
+#endif
for (in = h->interfaces; in < h->interfaces + h->num_interfaces; in++)
- if (in->gateway != INADDR_NONE)
- {
- if (gateway != INADDR_NONE)
- FAIL (err, 15, 0, "Cannot have multiple default gateways");
- gateway = in->gateway;
- in->gateway = INADDR_NONE;
- }
-
+ {
+ if (in->gateway != INADDR_NONE)
+ {
+ if (gateway != INADDR_NONE)
+ FAIL (err, 15, 0, "Cannot have multiple default gateways");
+ gateway = in->gateway;
+ in->gateway = INADDR_NONE;
+ }
+
+#ifdef CONFIG_IPV6
+ if (!IN6_IS_ADDR_UNSPECIFIED (&in->gateway6))
+ {
+ if (gw6_in != NULL)
+ FAIL (err, 15, 0, "Cannot have multiple IPv6 "
+ "default gateways");
+ gw6_in = in;
+ }
+#endif
+ }
/* Successfully finished parsing, return a result. */
__mutex_lock (&global_lock);
for (in = h->interfaces; in < h->interfaces + h->num_interfaces; in++)
- if (in->address != INADDR_NONE || in->netmask != INADDR_NONE)
- {
- err = configure_device (in->device, in->address, in->netmask,
- in->peer, INADDR_NONE);
- if (err)
- {
- __mutex_unlock (&global_lock);
- FAIL (err, 16, 0, "cannot configure interface");
- }
- }
+ {
+#ifdef CONFIG_IPV6
+ struct inet6_dev *idev = NULL;
+ if (trivfs_protid_portclasses[PORTCLASS_INET6] != MACH_PORT_NULL
+ && in->device)
+ idev = ipv6_find_idev(in->device);
+#endif
+
+ if (in->address != INADDR_NONE || in->netmask != INADDR_NONE)
+ {
+ err = configure_device (in->device, in->address, in->netmask,
+ in->peer, INADDR_NONE);
+ if (err)
+ {
+ __mutex_unlock (&global_lock);
+ FAIL (err, 16, 0, "cannot configure interface");
+ }
+ }
+
+#ifdef CONFIG_IPV6
+ if (!idev)
+ continue;
+
+ /* First let's remove all non-local addresses. */
+ struct inet6_ifaddr *ifa = idev->addr_list;
+
+ while (ifa)
+ {
+ struct inet6_ifaddr *c_ifa = ifa;
+ ifa = ifa->if_next;
+
+ if (IN6_ARE_ADDR_EQUAL (&c_ifa->addr, &in->address6.addr))
+ memset (&in->address6, 0, sizeof (struct inet6_ifaddr));
+
+ else if (!IN6_IS_ADDR_LINKLOCAL (&c_ifa->addr)
+ && !IN6_IS_ADDR_SITELOCAL (&c_ifa->addr))
+ inet6_addr_del (in->device->ifindex, &c_ifa->addr,
+ c_ifa->prefix_len);
+ }
+
+ if (!IN6_IS_ADDR_UNSPECIFIED (&in->address6.addr))
+ {
+ /* Now assign the new address */
+ inet6_addr_add (in->device->ifindex, &in->address6.addr,
+ in->address6.prefix_len);
+ }
+#endif /* CONFIG_IPV6 */
+ }
/* Set the default gateway. This code is cobbled together from what
the SIOCADDRT ioctl code does, and from the apparent functionality
@@ -315,12 +458,28 @@ parse_opt (int opt, char *arg, struct argp_state *state)
}
}
+ /* Set IPv6 default router. */
+#ifdef CONFIG_IPV6
+ if (trivfs_protid_portclasses[PORTCLASS_INET6] != MACH_PORT_NULL)
+ {
+ struct rt6_info *rt6i = ipv6_get_dflt_router ();
+
+ if (!gw6_in || rt6i->rt6i_dev != gw6_in->device
+ || !IN6_ARE_ADDR_EQUAL (&rt6i->rt6i_gateway, &gw6_in->gateway6))
+ {
+ rt6_purge_dflt_routers (0);
+ if (gw6_in)
+ rt6_add_dflt_router (&gw6_in->gateway6, gw6_in->device);
+ }
+ }
+#endif
+
__mutex_unlock (&global_lock);
/* Fall through to free hook. */
case ARGP_KEY_ERROR:
- /* Parsing error occured, free everything. */
+ /* Parsing error occurred, free everything. */
free_hook:
free (h->interfaces);
free (h);
@@ -372,6 +531,37 @@ trivfs_append_args (struct trivfs_control *fsys, char **argz, size_t *argz_len)
ADD_ADDR_OPT ("gateway", FIB_RES_GW (res));
#undef ADD_ADDR_OPT
+
+#ifdef CONFIG_IPV6
+ struct inet6_dev *idev = NULL;
+
+ if (trivfs_protid_portclasses[PORTCLASS_INET6] != MACH_PORT_NULL)
+ idev = ipv6_find_idev(dev);
+
+ if (idev)
+ {
+ struct inet6_ifaddr *ifa = idev->addr_list;
+ static char addr_buf[INET6_ADDRSTRLEN];
+
+ /* Push all IPv6 addresses assigned to the interface. */
+ do
+ {
+ inet_ntop (AF_INET6, &ifa->addr, addr_buf, INET6_ADDRSTRLEN);
+ ADD_OPT ("--address6=%s/%d", addr_buf, ifa->prefix_len);
+ }
+ while ((ifa = ifa->if_next));
+
+ /* Last not least push --gateway6 option. */
+ struct rt6_info *rt6i = ipv6_get_dflt_router ();
+ if(rt6i->rt6i_dev == dev)
+ {
+ inet_ntop (AF_INET6, &rt6i->rt6i_gateway, addr_buf,
+ INET6_ADDRSTRLEN);
+ ADD_OPT ("--gateway6=%s", addr_buf);
+ }
+ }
+#endif /* CONFIG_IPV6 */
+
#undef ADD_OPT
return err;
diff --git a/pfinet/pfinet-ops.c b/pfinet/pfinet-ops.c
index a61028ef..8e251020 100644
--- a/pfinet/pfinet-ops.c
+++ b/pfinet/pfinet-ops.c
@@ -49,7 +49,7 @@ S_pfinet_siocgifconf (io_t port,
struct ifconf ifc;
__mutex_lock (&global_lock);
- if (amount < 0)
+ if (amount == (vm_size_t) -1)
{
/* Get the needed buffer length. */
ifc.ifc_buf = NULL;
diff --git a/pfinet/pfinet.h b/pfinet/pfinet.h
index c5f53182..050ba6f7 100644
--- a/pfinet/pfinet.h
+++ b/pfinet/pfinet.h
@@ -1,5 +1,7 @@
/*
- Copyright (C) 1995,96,99,2000,02 Free Software Foundation, Inc.
+ Copyright (C) 1995, 1996, 1999, 2000, 2002, 2007
+ Free Software Foundation, Inc.
+
Written by Michael I. Bushnell, p/BSG.
This file is part of the GNU Hurd.
@@ -65,6 +67,7 @@ uid_t pfinet_group;
void ethernet_initialize (void);
int ethernet_demuxer (mach_msg_header_t *, mach_msg_header_t *);
+int ethernet_change_flags (struct device *, short);
void setup_ethernet_device (char *, struct device **);
void setup_dummy_device (char *, struct device **);
void setup_tunnel_device (char *, struct device **);
@@ -92,4 +95,22 @@ void clean_socketport (void *);
typedef struct sock_user *sock_user_t;
typedef struct sock_addr *sock_addr_t;
+/* pfinet6 port classes. */
+enum {
+ PORTCLASS_INET,
+ PORTCLASS_INET6,
+};
+
+extern struct port_class *trivfs_protid_portclasses[];
+extern int trivfs_protid_nportclasses;
+
+extern struct port_class *trivfs_cntl_portclasses[2];
+extern int trivfs_cntl_nportclasses;
+
+/* Which portclass to install on the bootstrap port. */
+extern int pfinet_bootstrap_portclass;
+
+/* Install portclass on node NAME. */
+void pfinet_bind (int portclass, const char *name);
+
#endif
diff --git a/pfinet/sched.c b/pfinet/sched.c
index 6c6c8241..37e4ecbd 100644
--- a/pfinet/sched.c
+++ b/pfinet/sched.c
@@ -58,13 +58,13 @@ sock_wake_async (struct socket *sock, int how)
any_t
net_bh_worker (any_t arg)
{
- __mutex_lock (&global_lock);
+ __mutex_lock (&net_bh_lock);
while (1)
{
- condition_wait (&net_bh_wakeup, &global_lock);
- __mutex_lock (&net_bh_lock);
+ condition_wait (&net_bh_wakeup, &net_bh_lock);
+ __mutex_lock (&global_lock);
net_bh ();
- __mutex_unlock (&net_bh_lock);
+ __mutex_unlock (&global_lock);
}
/*NOTREACHED*/
return 0;
diff --git a/pfinet/socket-ops.c b/pfinet/socket-ops.c
index 77ae3599..02675425 100644
--- a/pfinet/socket-ops.c
+++ b/pfinet/socket-ops.c
@@ -1,5 +1,5 @@
/* Interface functions for the socket.defs interface.
- Copyright (C) 1995,96,97,99,2000,02 Free Software Foundation, Inc.
+ Copyright (C) 1995,96,97,99,2000,02,07 Free Software Foundation, Inc.
Written by Michael I. Bushnell, p/BSG.
This file is part of the GNU Hurd.
@@ -80,7 +80,11 @@ S_socket_create (struct trivfs_protid *master,
isroot = 1;
}
- err = - (*net_families[PF_INET]->create) (sock, protocol);
+ if (master->pi.class == trivfs_protid_portclasses[PORTCLASS_INET])
+ err = - (*net_families[PF_INET]->create) (sock, protocol);
+ else
+ err = - (*net_families[PF_INET6]->create) (sock, protocol);
+
if (err)
sock_release (sock);
else
@@ -295,7 +299,8 @@ S_socket_create_address (mach_port_t server,
struct sock_addr *addrstruct;
const struct sockaddr *const sa = (void *) data;
- if (sockaddr_type != AF_INET)
+ if (sockaddr_type != AF_INET && sockaddr_type != AF_INET6
+ && sockaddr_type != AF_UNSPEC)
return EAFNOSUPPORT;
if (sa->sa_family != sockaddr_type
|| data_len < offsetof (struct sockaddr, sa_data))
@@ -495,6 +500,11 @@ S_socket_recv (struct sock_user *user,
if (amount > *datalen)
{
*data = mmap (0, amount, PROT_READ|PROT_WRITE, MAP_ANON, 0, 0);
+ if (*data == MAP_FAILED)
+ /* Should check whether errno is indeed ENOMEM --
+ but this can't be done in a straightforward way,
+ because the glue headers #undef errno. */
+ return ENOMEM;
alloced = 1;
}
diff --git a/pflocal/ChangeLog b/pflocal/ChangeLog
deleted file mode 100644
index f12686c0..00000000
--- a/pflocal/ChangeLog
+++ /dev/null
@@ -1,378 +0,0 @@
-2005-05-17 Neal H. Walfield <neal@gnu.org>
-
- * sock.c (sock_free): Don't destroy SOCK->CONNECT_QUEUE.
-
-2002-06-08 Roland McGrath <roland@frob.com>
-
- * io.c (S_io_identity): Use ino_t for FILENO.
-
-2002-05-08 Roland McGrath <roland@frob.com>
-
- * io.c (S_io_reauthenticate): unsigned -> size_t
- (S_io_restrict_auth): Likewise.
-
-2002-04-24 Ognyan Kulev <ogi@fmi.uni-sofia.bg>
-
- * sock.c (sock_shutdown): When both SHUTDOWN_READ and
- SHUTDOWN_WRITE are set in FLAGS unlock sock->lock after all
- processing of `sock' is finished.
- (sock_create): Replace bzero with memset.
-
-2001-12-22 Roland McGrath <roland@frob.com>
-
- * connq.c (connq_compress): #if 0 out unused function.
-
- * sock.h (sock_deref): Don't define this extern inline.
- Instead, use static inline and __attribute__ ((unused)).
- * mig-decls.h (begin_using_sock_user_port): Likewise.
- (end_using_sock_user_port): Likewise.
- (begin_using_addr_port): Likewise.
- (end_using_addr_port): Likewise.
-
-2001-03-31 Roland McGrath <roland@frob.com>
-
- * sock.c: Include "connq.h" for connq_destroy decl.
-
-2001-02-20 Marcus Brinkmann <marcus@gnu.org>
-
- * connq.c: Include <assert.h>. Reported by Arkadi E. Shishlov
- <arkadi@it.lv>.
-
-2001-02-11 Marcus Brinkmann <marcus@gnu.org>
-
- * connq.c (connq_destroy): New function.
- * connq.h: Prototype connq_destroy.
- * sock.c (sock_free): Call connq_destroy when listen or connect
- queue exist.
-
-2000-08-09 Mark Kettenis <kettenis@gnu.org>
-
- * pf.c (S_socket_create): Only accept S_IFCHR, S_IFSOCK and
- S_IFIFO as `magic' protocols.
-
-2000-08-02 Mark Kettenis <kettenis@gnu.org>
-
- Add `magic' protocols to specify the file type of a sockets. This
- allows implementation of POSIX pipes by using a S_IFSOCK protocol.
- * sock.h: Include <sys/types.h>.
- (struct sock): Add new member `mode'.
- (sock_create): Add new parameter `mode'.
- * sock.c (sock_create): Initialize `mode' member of struct sock,
- with new parameter.
- * pf.c (S_socket_create): Pass file type/mode to sock_create based
- on PROTOCOL.
- * io.c (S_io_stat): Use new member of `struct sock' to set
- ST->st_mode.
-
-2000-07-26 Mark Kettenis <kettenis@gnu.org>
-
- * Makefile (HURDLIBS): Reorder libs such that the threads lib
- comes before the ports lib. This makes sure the functions in
- libthreads properly override the stubs in libports with the new
- dynamic linker semantics in glibc 2.2.
-
-1999-09-13 Roland McGrath <roland@baalperazim.frob.com>
-
- * io.c: Reverted changes related to io_map_segment.
-
-1999-09-07 Thomas Bushnell, BSG <tb@mit.edu>
-
- * io.c (S_io_map_segment): New function.
-
-1999-07-11 Roland McGrath <roland@baalperazim.frob.com>
-
- * sock.h: Add #include <sys/mman.h>.
-
-1999-07-10 Roland McGrath <roland@baalperazim.frob.com>
-
- * io.c: Add #include <sys/mman.h> for munmap decl.
-
-1999-07-09 Thomas Bushnell, BSG <tb@mit.edu>
-
- * pf.c (S_socket_whatis_address): Use mmap instead of vm_allocate.
-
-1999-07-03 Thomas Bushnell, BSG <tb@mit.edu>
-
- * io.c (TRASH_IDS): Use munmap instead of vm_deallocate.
-
-1999-03-01 Mark Kettenis <kettenis@gnu.org>
-
- * pf.c (S_socket_whatis_address): Implement. Since we cannot tell
- what our adress is, return an empty string as the file name.
-
-Tue Feb 16 05:52:35 1999 Thomas Bushnell, BSG <tb@mit.edu>
-
- * io.c (S_io_revoke): New function. Don't attempt to implement.
- (Other systems don't even permit non-file revokes.)
-
-1998-10-20 Roland McGrath <roland@baalperazim.frob.com>
-
- * io.c (S_io_select): Add braces to silence gcc warning.
-
-1998-07-20 Roland McGrath <roland@baalperazim.frob.com>
-
- * pflocal.c (main): Fix return type to int, and use return.
-
-Wed Aug 20 14:06:11 1997 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * pflocal.c (main): New args for
- ports_manage_port_operations_multithread.
- * sserver.c (handle_sock_requests): Likewise.
-
-Mon Oct 7 12:53:24 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * connq.c (connq_listen): Unlock CQ->lock when returning EWOULDBLOCK.
-
-Thu Sep 12 16:43:09 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * Makefile (HURDLIBS): New variable.
- (pflocal): Omit special dependency.
-
-Tue Jul 23 19:44:29 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * sock.c (sock_create): Remove NEXT_SOCK_ID.
-
-Sat Jul 13 20:20:55 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * io.c (S_io_reauthenticate): Repeat sock_create_port and
- auth_server_authenticate for as long as we get EINTR.
-
-Sun Jul 7 21:30:33 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * io.c (S_io_reauthenticate): Don't use unsafe MOVE_SEND in call
- to auth_server_authenticate.
-
-Mon Jul 1 18:45:35 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * sock.c (sock_create): Initialize ID field to MACH_PORT_NULL.
-
-Thu Jun 27 17:58:09 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * Makefile (LCLHDRS): Add sserver.h.
-
-Thu Jun 20 16:33:06 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * Makefile (pflocal): Depend on ../libfshelp/libfshelp.a.
-
-Wed May 15 20:27:38 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * sock.c (sock_free): Destroy SOCK's id port if necessary.
-
-Tue May 14 14:05:33 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * io.c (S_io_identity): New function.
- * sock.h (struct sock): Make the id field a receive right, not an int.
-
-Thu May 9 20:20:20 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * io.c (S_io_reauthenticate): Use new auth_server_authenticate
- protocol.
-
-Thu May 9 12:14:37 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * io.c (S_io_select): Remove TAG arg.
-
-Mon Apr 15 12:52:32 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * Makefile (MIGSFLAGS): Look for mig-mutate.h in $(srcdir).
-
-Fri Jan 26 16:46:37 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * socket.c (S_socket_recv): Test for MSG_OOB in IN_FLAGS, not FLAGS.
- Return EINVAL if we get MSG_OOB, not EOPNOTSUPP.
-
-Thu Jan 25 17:34:50 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * sock.c (sock_create_port, addr_create): Use ports_create_port
- instead of ports_allocate_port.
- * pflocal.c (trivfs_goaway): Handle errors from
- ports_inhibit_bucket_rpcs.
- (thread_cancel): Function deleted.
-
-Tue Jan 23 21:31:40 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * socket.c (S_socket_connect): Handle connectionless protocols
- correctly.
-
- * socket.c (S_socket_send): Allow DEST_ADDR to be null if the
- socket is connected.
-
- * sock.c (sock_bind): Don't change SOCK's ref count if we're
- returning an error.
-
-Thu Jan 4 15:44:13 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * io.c (S_io_select): Reworked to avoid calling
- ports_interrupt_self_on_port_death() if there's data immediately
- available. Also, don't block if we can return EOF/EPIPE.
-
-Thu Dec 28 13:46:32 1995 Miles Bader <miles@gnu.ai.mit.edu>
-
- * io.c (S_io_select): Use handy macro to avoid unthinkable line break.
-
-Tue Dec 26 17:30:18 1995 Miles Bader <miles@gnu.ai.mit.edu>
-
- * io.c (S_io_select): Add reply port parameter, and request
- notification if it dies.
- * mig-mutate.h (IO_SELECT_REPLY_PORT): New def.
-
-Mon Nov 13 14:03:03 1995 Miles Bader <miles@gnu.ai.mit.edu>
-
- * socket.c (S_socket_bind, S_socket_connect): Drop ADDR's send right.
-
-Thu Nov 9 13:18:44 1995 Miles Bader <miles@gnu.ai.mit.edu>
-
- * socket.c (S_socket_connect): Drop our reference to ADDR.
-
-Sun Nov 5 10:01:15 1995 Miles Bader <miles@gnu.ai.mit.edu>
-
- * pf.c (S_socket_create_address): Removing BINDING argument.
-
- * pflocal.c (main): Add FLAGS argument to trivfs_startup call.
-
-Tue Sep 19 14:07:24 1995 Miles Bader <miles@churchy.gnu.ai.mit.edu>
-
- * io.c (S_io_pathconf): New function.
- (S_io_set_all_openmodes, S_io_set_some_openmodes,
- S_io_clear_some_openmodes): The user specifies O_NONBLOCK, not
- SOCK_NONBLOCK.
- (S_io_get_openmodes): Always return O_APPEND.
-
-Wed Sep 6 11:53:48 1995 Miles Bader <miles@churchy.gnu.ai.mit.edu>
-
- * sserver.c (sock_demuxer): Use ports_interrupt_server and
- ports_notify_server instead of our own version.
- (do_mach_notify_no_senders, do_mach_notify_port_deleted,
- do_mach_notify_msg_accepted, do_mach_notify_port_destroyed,
- do_mach_notify_port_deleted, do_mach_notify_send_once,
- do_mach_notify_dead_name): Functions deleted.
- * io.c (S_interrupt_operation): Function deleted.
- * Makefile (MIGSTUBS): Remove notifyServer.o and interruptServer.o.
-
- * io.c (S_io_read, S_io_readable): Don't return EPIPE on EOF.
-
-Tue Sep 5 14:22:18 1995 Miles Bader <miles@churchy.gnu.ai.mit.edu>
-
- * io.c (S_io_stat): Only attempt to use the read pipe if it exists.
-
-Thu Aug 31 16:31:18 1995 Miles Bader <miles@churchy.gnu.ai.mit.edu>
-
- * io.c (S_io_select): Change the way selects are done, now that
- writes can block.
- (S_io_write): Pass in the new NOBLOCK parameter to pipe_write.
- * socket.c (S_socket_send): Pass in the new NOBLOCK parameter to
- pipe_send.
-
-Tue Aug 29 14:33:14 1995 Miles Bader <miles@geech.gnu.ai.mit.edu>
-
- * io.c (S_io_select): Use pipe_select instead of pipe_wait.
-
- * connq.c (struct connq): Remove interrupt_seq_num field.
- (connq_listen): Use hurd_condition_wait to detect interrupts
- instead of previous ad-hoc mechanism.
- (connq_interrupt, connq_interrupt_sock): Functions deleted.
- * connq.h (connq_interrupt, connq_interrupt_sock): Decls deleted.
- * io.c (S_interrupt_operation): Use ports_interrupt_rpc to
- interrupt waiting threads.
-
- * sock.c (sock_acquire_read_pipe, sock_acquire_write_pipe):
- `aquire' -> `acquire'.
- * socket.c (S_socket_send, S_socket_recv): Ditto.
- * sock.h: Ditto.
-
-Tue Aug 29 14:30:59 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * io.c (S_io_select): Fix typo in masking off SELECT_URG.
- Don't check open modes and return EBADF.
-
-Thu Aug 24 10:35:58 1995 Miles Bader <miles@churchy.gnu.ai.mit.edu>
-
- * Makefile (pflocal): Put all dependencies here.
- (OBJS): Remove error.o.
- (HURDLIBS): Removed.
- Removed all rules dealing with error.o.
-
-Mon Aug 21 16:37:32 1995 Miles Bader <miles@churchy.gnu.ai.mit.edu>
-
- * pflocal.c (trivfs_goaway, trivfs_modify_stat): Update arguments.
-
-Fri Aug 11 15:33:28 1995 Miles Bader <miles@churchy.gnu.ai.mit.edu>
-
- * sock.h (struct sock): Store the pipe class in a separate field,
- as READ_PIPE is no longer always defined.
- * sock.c (sock_create, sock_connect): Set/use the PIPE_CLASS field.
- (sock_connect, sock_aquire_write_pipe): Use pipe_aquire_writer
- instead of pipe_aquire.
- (sock_aquire_read_pipe): Use pipe_aquire_reader instead of
- pipe_aquire. Handle the case where there is no read pipe (in
- which case return EPIPE).
- (sock_shutdown): Make shutting down the read half just like the
- write half -- the pipe goes away...
- (sock_create): Don't bump the read pipe ref count ourself.
- (sock_free): Use sock_shutdown to trash the read pipe too.
-
- * socket.c
- (S_socket_recv): Use pipe_release_reader instead of pipe_release.
- (S_socket_send): Use pipe_release_writer instead of pipe_release.
- (S_socket_recv): Reflect EPIPE as EOF.
-
- * io.c (S_io_read, S_interrupt_operation, S_io_readable, S_io_select):
- Use pipe_release_reader instead of pipe_release.
- (S_io_write): Use pipe_release_writer instead of pipe_release.
- (S_io_readable, S_io_read): Reflect EPIPE as EOF.
-
-Mon Jul 31 13:59:15 1995 Miles Bader <miles@churchy.gnu.ai.mit.edu>
-
- * connq.c (connq_compress): New function.
- (connq_interrupt_sock): Use connq_compress to compress the queue.
-
-Sun Jul 30 10:30:24 1995 Miles Bader <miles@duality.gnu.ai.mit.edu>
-
- * connq.c (connq_interrupt_sock): Reset CQ's tail to the end of
- the compressed queue.
-
-Sat Jul 29 00:00:57 1995 Miles Bader <miles@churchy.gnu.ai.mit.edu>
-
- * socket.c (S_socket_send): Only free SOURCE_ADDR if the send
- fails, as otherwise it's consumed; also free all the ports in
- PORTS if the send fails.
-
- * io.c (S_interrupt_operation): Allow socket trying to connect to
- be interrupted.
- * connq.c (connq_interrupt_sock): New function.
- * socket.c (S_socket_connect): Use the CONNECT_QUEUE field to
- allow only a single connection attempt at once.
- Check for already-connected sockets here instead of waiting for
- the final rendezvous.
- * connq.h (connq_interrupt_sock): New declaration.
-
- * connq.c (connq_listen, connq_connect, connq_interrupt,
- connq_set_length): Reverse the roles of the HEAD and TAIL fields,
- and make sure they're used correctly.
- (qprev): Deleted function.
-
- * sock.h (struct sock, all uses changed): Add the CONNECT_QUEUE
- field, and rename the CONNQ field to LISTEN_QUEUE.
- * sock.c (sock_create): Initialize the CONNECT_QUEUE field and
- rename CONNQ to LISTEN_QUEUE.
-
- * connq.c (connq_set_length): When shrinking the queue, actually
- do so, and don't leak memory.
-
- * socket.c (S_socket_connect): Return ECONNREFUSED when trying to
- connect to a non-existant address, instead of EADDRNOTAVAIL.
-
- * connq.c (struct connq): Add the INTERRUPT_SEQ_NUM field, used to
- detect interupts.
- (connq_listen): Detect when we get interrupted, and return EINTR.
- (connq_interrupt): New function.
- * connq.h (connq_interrupt): New declaration.
- * io.c (S_interrupt_operation): Call connq_interrupt when appropiate.
-
- * connq.c (connq_connect): Initialize REQ before using it.
- (connq_request_init): Swap the arguments.
- (connq_listen): Don't lock the accepted request just to get its sock.
-
- * socket.c (S_socket_connect): Actually use the connq operations
- to connect, like the listening socket is expecting, instead of
- connecting directly to it.
diff --git a/pflocal/io.c b/pflocal/io.c
index bd9ecbdd..74c2f970 100644
--- a/pflocal/io.c
+++ b/pflocal/io.c
@@ -1,6 +1,8 @@
/* Socket I/O operations
- Copyright (C) 1995,96,98,99,2000,02 Free Software Foundation, Inc.
+ Copyright (C) 1995, 1996, 1998, 1999, 2000, 2002, 2007
+ Free Software Foundation, Inc.
+
Written by Miles Bader <miles@gnu.org>
This program is free software; you can redistribute it and/or
@@ -272,10 +274,10 @@ S_io_stat (struct sock_user *user, struct stat *st)
struct sock *sock;
struct pipe *rpipe, *wpipe;
- void copy_time (time_value_t *from, time_t *to_sec, unsigned long *to_usec)
+ void copy_time (time_value_t *from, time_t *to_sec, unsigned long *to_nsec)
{
*to_sec = from->seconds;
- *to_usec = from->microseconds;
+ *to_nsec = from->microseconds * 1000;
}
if (!user)
@@ -300,7 +302,7 @@ S_io_stat (struct sock_user *user, struct stat *st)
if (rpipe)
{
mutex_lock (&rpipe->lock);
- copy_time (&rpipe->read_time, &st->st_atime, &st->st_atime_usec);
+ copy_time (&rpipe->read_time, &st->st_atim.tv_sec, &st->st_atim.tv_nsec);
/* This seems useful. */
st->st_size = pipe_readable (rpipe, 1);
mutex_unlock (&rpipe->lock);
@@ -309,11 +311,11 @@ S_io_stat (struct sock_user *user, struct stat *st)
if (wpipe)
{
mutex_lock (&wpipe->lock);
- copy_time (&wpipe->write_time, &st->st_mtime, &st->st_mtime_usec);
+ copy_time (&wpipe->write_time, &st->st_mtim.tv_sec, &st->st_mtim.tv_nsec);
mutex_unlock (&wpipe->lock);
}
- copy_time (&sock->change_time, &st->st_ctime, &st->st_ctime_usec);
+ copy_time (&sock->change_time, &st->st_ctim.tv_sec, &st->st_ctim.tv_nsec);
mutex_unlock (&sock->lock);
diff --git a/pflocal/pf.c b/pflocal/pf.c
index d72e01b5..32c12e17 100644
--- a/pflocal/pf.c
+++ b/pflocal/pf.c
@@ -1,6 +1,6 @@
/* Protocol family operations
- Copyright (C) 1995, 1999, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1995, 1999, 2000, 2008 Free Software Foundation, Inc.
Written by Miles Bader <miles@gnu.ai.mit.edu>
@@ -108,12 +108,13 @@ S_socket_fabricate_address (mach_port_t pf,
*addr_port = ports_get_right (addr);
*addr_port_type = MACH_MSG_TYPE_MAKE_SEND;
+ ports_port_deref (addr);
return 0;
}
/* Implement socket_whatis_address as described in <hurd/socket.defs>.
- Since we cannot tell what our adress is, return an empty string as
+ Since we cannot tell what our address is, return an empty string as
the file name. This is primarily for the implementation of accept
and recvfrom. The functions getsockname and getpeername remain
unsupported for the local namespace. */
diff --git a/pflocal/socket.c b/pflocal/socket.c
index 0bc72066..faa9951d 100644
--- a/pflocal/socket.c
+++ b/pflocal/socket.c
@@ -1,6 +1,6 @@
/* Socket-specific operations
- Copyright (C) 1995 Free Software Foundation, Inc.
+ Copyright (C) 1995, 2008, 2010 Free Software Foundation, Inc.
Written by Miles Bader <miles@gnu.ai.mit.edu>
@@ -245,6 +245,7 @@ S_socket_name (struct sock_user *user,
*addr_port = ports_get_right (addr);
*addr_port_type = MACH_MSG_TYPE_MAKE_SEND;
+ ports_port_deref (addr);
return 0;
}
@@ -308,7 +309,7 @@ S_socket_send (struct sock_user *user, struct addr *dest_addr, int flags,
if (dest_sock)
/* Grab the destination socket's read pipe directly, and stuff data
into it. This is not quite the usage sock_acquire_read_pipe was
- intended for, but it will work, as the only inappropiate errors
+ intended for, but it will work, as the only inappropriate errors
occur on a broken pipe, which shouldn't be possible with the sort of
sockets with which we can use socket_send... XXXX */
err = sock_acquire_read_pipe (dest_sock, &pipe);
@@ -322,7 +323,10 @@ S_socket_send (struct sock_user *user, struct addr *dest_addr, int flags,
source_addr, data, data_len,
control, control_len, ports, num_ports,
amount);
- pipe_release_writer (pipe);
+ if (dest_sock)
+ pipe_release_reader (pipe);
+ else
+ pipe_release_writer (pipe);
}
if (err)
@@ -391,7 +395,7 @@ S_socket_recv (struct sock_user *user,
/* Setup mach ports for return. */
{
*addr_type = MACH_MSG_TYPE_MAKE_SEND;
- *ports_type = MACH_MSG_TYPE_MAKE_SEND;
+ *ports_type = MACH_MSG_TYPE_COPY_SEND;
if (source_addr)
{
*addr = ports_get_right (source_addr);
@@ -407,19 +411,58 @@ S_socket_recv (struct sock_user *user,
return err;
}
-/* Stubs for currently unsupported rpcs. */
-
error_t
S_socket_getopt (struct sock_user *user,
int level, int opt,
char **value, size_t *value_len)
{
- return EOPNOTSUPP;
+ int ret = 0;
+
+ if (!user)
+ return EOPNOTSUPP;
+
+ mutex_lock (&user->sock->lock);
+ switch (level)
+ {
+ case SOL_SOCKET:
+ switch (opt)
+ {
+ case SO_TYPE:
+ assert (*value_len >= sizeof (int));
+ *(int *)*value = user->sock->pipe_class->sock_type;
+ *value_len = sizeof (int);
+ break;
+ default:
+ ret = ENOPROTOOPT;
+ break;
+ }
+ break;
+ default:
+ ret = ENOPROTOOPT;
+ break;
+ }
+ mutex_unlock (&user->sock->lock);
+
+ return ret;
}
error_t
S_socket_setopt (struct sock_user *user,
int level, int opt, char *value, size_t value_len)
{
- return EOPNOTSUPP;
+ int ret = 0;
+
+ if (!user)
+ return EOPNOTSUPP;
+
+ mutex_lock (&user->sock->lock);
+ switch (level)
+ {
+ default:
+ ret = ENOPROTOOPT;
+ break;
+ }
+ mutex_unlock (&user->sock->lock);
+
+ return ret;
}
diff --git a/proc/ChangeLog b/proc/ChangeLog
deleted file mode 100644
index 1a01550c..00000000
--- a/proc/ChangeLog
+++ /dev/null
@@ -1,1314 +0,0 @@
-2003-08-17 Marcus Brinkmann <marcus@gnu.org>
-
- * proc.h: Include <hurd/ihash.h>.
- (struct proc): Change type of members p_pidhashloc and
- p_taskhashloc to hurd_ihash_locp_t.
- (struct pgrp): Likewise for pg_hashloc.
- (struct session): Likewise for s_hashloc.
- * hash.c: Change type of pghash, pidhash, taskhash and sidhash to
- struct hurd_ihash and initialize them with HURD_IHASH_INITIALIZER.
- Include stddef.h.
- (pid_find): Call hurd_ihash_find instead ihash_find.
- (pid_find_allow_zombie): Likewise.
- (task_find): Likewise.
- (task_find_nocreate): Likewise.
- (pgrp_find): Likewise.
- (session_find): Likewise.
- (add_proc_to_hash): Call hurd_ihash_add instead ihash_add.
- (add_pgrp_to_hash): Likewise.
- (add_session_to_hash): Likewise.
- (remove_pgrp_from_hash): Call hurd_ihash_locp_remove instead
- ihash_locp_remove, and provide hash table pointer.
- (remove_proc_from_hash): Likewise.
- (remove_session_from_hash): Likewise.
- (prociterate): Use HURD_IHASH_ITERATE instead ihash_iterate.
-
-2003-08-17 Marcus Brinkmann <marcus@gnu.org>
-
- * mgt.c (S_proc_dostop): Revert last change.
-
-2003-06-16 Ognyan Kulev <ogi@fmi.uni-sofia.bg>
-
- * mgt.c (S_proc_dostop): Instead of suspending all threads except
- CONTTHREAD, first suspend all threads, and then resume CONTTHREAD.
-
-2002-06-05 Roland McGrath <roland@frob.com>
-
- * info.c (S_proc_getprocinfo): If PI_FETCH_TASKEVENTS is set in *FLAGS,
- fill in PI->taskevents using task_info with TASK_EVENTS_INFO.
-
-2002-05-07 Roland McGrath <roland@frob.com>
-
- * host.c (S_proc_setexecdata, S_proc_getexecdata): u_int -> size_t
- (initialize_version_info): Likewise. Fix cast in host_info arg.
- (get_string_array): Likewise.
- * info.c (get_string, S_proc_getprocargs, S_proc_getprocenv): Likewise.
- (S_proc_getprocinfo, S_proc_getloginpids): Likewise.
- (S_proc_getprocinfo): int -> size_t; fix casts in *_info argument.
-
- * mgt.c (S_proc_reauthenticate, S_proc_getallpids): Likewise.
- (add_tasks, S_proc_dostop): Likewise.
- (S_proc_exception_raise): int -> integer_t
- * pgrp.c (S_proc_getsessionpids, S_proc_getsessionpgids): Likewise.
- (S_proc_getpgrppids): Likewise.
-
-2002-02-17 Roland McGrath <roland@frob.com>
-
- * info.c (S_proc_getprocinfo) [TASK_SCHED_TIMESHARE_INFO]: Do a second
- task_info call to fill in PI->timeshare_base_info.
-
-2001-12-22 Roland McGrath <roland@frob.com>
-
- * proc.h (check_owner): Move this extern inline function ...
- * info.c (check_owner): ... to here, made static inline.
-
-2001-08-14 Marcus Brinkmann <marcus@gnu.org>
-
- * mgt.c (S_proc_dostop): If task_threads fails, resume the
- suspended task.
-
-2001-08-06 Roland McGrath <roland@frob.com>
-
- * wait.c (S_proc_wait: reap): Set *PID_STATUS to CHILD->p_pid.
- Reported by Neal H Walfield <neal@cs.uml.edu>.
-
- * mgt.c (allocate_proc): Don't zero P->p_pi.
- Reported by Neal H Walfield <neal@cs.uml.edu>.
-
-2001-08-05 Roland McGrath <roland@frob.com>
-
- * wait.c (sample_rusage): New function.
- (S_proc_mark_exit): Call it.
-
-2001-08-04 Roland McGrath <roland@frob.com>
-
- * proc.h (struct proc): New members p_rusage, p_child_rusage.
- * wait.c (rusage_add): New static function.
- (alert_parent): Use it to add dead child's p_rusage into parent's
- p_child_rusage.
- (S_proc_wait): Fill *RU out param with CHILD->p_rusage, not just zeros.
- Rewrote subfunction child_ready and its two callers into new
- subfunction reap to reduce duplicated code.
-
- * mgt.c (process_has_exited): Call ports_interrupt_rpcs last thing.
-
- * mgt.c (S_proc_reauthenticate): Release global_lock while making RPC.
- Don't mach_port_deallocate an argument port when returning an error,
- because mig does it for us.
-
-2001-08-03 Roland McGrath <roland@frob.com>
-
- * mgt.c (allocate_proc): Use memset instead of lots of 0 initializers.
-
-2001-08-01 Roland McGrath <roland@frob.com>
-
- * mgt.c (genpid): Rewritten.
-
-2001-08-02 Marcus Brinkmann <marcus@gnu.org>
-
- * mgt.c (genpid): Before checking if NEXTPID is free, check if it
- is greater than WRAP, and if yes, start over.
-
-2001-07-13 Marcus Brinkmann <marcus@gnu.org>
-
- * host.c (S_proc_getexecdata): New variable PORTS_ALLOCATED.
- Set it if we allocated a new buffer for PORTS. If it is set,
- and allocation of a new buffer for INTS fails, unmap the buffer
- for PORTS.
-
- * host.c (S_proc_getexecdata): New variable I. Go over all
- standard ports and increase the send right user reference by one.
- Set *PORTSPOLY to MACH_MSG_TYPE_MOVE_SEND.
-
-2001-06-27 Marcus Brinkmann <marcus@gnu.org>
-
- * info.c (S_proc_getprocinfo): If we return because mmap failed
- for *PIARRAY, be sure to munmap THDS if necessary.
-
-2001-05-12 Marcus Brinkmann <marcus@gnu.org>
-
- * host.c (initialize_version_info): Clear last byte of KV to make
- sure that the string is null-terminated.
-
-2000-04-03 Neal H Walfield <neal@cs.uml.edu>
-
- * proc.h (struct ids): Drop gids and ngids, we never use
- them. Turn uids into a zero length array.
- * mgt.c (make_ids): Conform to new semantics.
- (ids_free): Removed. Rendered obsolete by ids_rele.
- (ids_rele): New function. Drop a reference to the given
- ids.
- (ids_ref): Add a reference to the given ids.
- (S_proc_reauthenticate): Use ids_rele and new make_ids
- semantics.
- (S_proc_child): Use ids_rele and ids_ref.
- (create_startup_proc): Conform to new make_ids semantics.
- (complete_proc): Use ids_ref.
- (process_has_exited): Use ids_rele.
-
- * host.c: Doc fix: ``Implement foo as described in <hurd/proc.defs>''
- => ``Implement foo as described in <hurd/process.defs>''
- * info.c: Likewise.
- * mgt.c: Likewise.
- * pgrp.c: Likewise.
- * wait.c: Likewise.
-
- * mgt.c (S_proc_reauthenticate): Calculate the value of
- NGEN_UIDS, NAUX_UIDS, NGEN_GIDS AND NAUX_GIDS; do not use
- a constant.
- (create_startup_proc): Add asserts.
-
- * host.c (S_proc_setexecdata): Check for memory allocation errors.
- Use memcpy, not bcopy.
- (S_proc_getexecdata): Likewise.
- (S_proc_execdata_notify): Check return of malloc.
- (S_proc_register_version): Likewise.
- (initialize_version_info): Add asserts.
- * info.c (S_proc_pid2task): Do not bother searching for the pid
- if we do not have a valid caller.
- (S_proc_pid2proc): Likewise.
- Use memcpy, not bcopy.
- (S_proc_getprocinfo): Doc fixes. Use MAP_FAILED not -1. Use
- memcpy, not bcopy.
- (S_proc_getloginpids): Check return value of malloc. Use realloc
- correctly.
- (S_proc_setlogin): Check return value of malloc.
- * main.c (main): Assert allocate_proc.
- * mgt.c (make_ids): Check return value of malloc and fail
- accordingly.
- (S_proc_reauthenticate): Check return value of make_ids and fail
- accordingly.
- (S_proc_child): Call task_find after we know that we were passed
- a valid child.
- (S_proc_reassign): Likewise.
- (S_proc_handle_exceptions): Use memcpy, not bcopy.
- (allocate_proc): Check return value of ports_create_port and fail
- accordingly.
- (create_startup_proc): Add asserts.
- (complete_proc): Do not assume the length of "<none>".
- * msg.c (S_proc_getmsgport): Call pid_find_allow_zombie after
- we know we were passed a valid caller.
- * pgrp.c: Include assert.h.
- (new_pgrp): Check return value of malloc and fail accordingly.
- (new_session): Likewise.
- (boot_setsid): Assert sess.
- (S_proc_getsessionpids): Use MAP_FAILED not -1.
- (S_proc_getsessionppids): Likewise.
- (S_proc_getpgrppids): Likewise.
- * wait.c (S_proc_wait): Use memset, not bzero.
-
-2000-03-17 Roland McGrath <roland@baalperazim.frob.com>
-
- * main.c (main): Use ports_get_send_right.
-
-2000-03-13 Roland McGrath <roland@baalperazim.frob.com>
-
- * mgt.c (S_proc_exception_raise): Check for
- MACH_SEND_NOTIFY_IN_PROGRESS rather than MACH_SEND_INVALID_NOTIFY.
- Don't deallocate THREAD and TASK ports before the switch, since the
- successful case uses THREAD again and the failure case uses TASK
- again. Instead, deallocate them at the end of the successful case.
- At the end of the error case, use mach_port_destroy on THREAD only.
-
- * stubs.c (struct msg_sig_post_request): New type, broken out of
- send_signal, where it was anonymous.
- (struct msg_spec): Type removed.
- (blocking_message_send): Change type to any_t -> any_t.
- Don't call cthread_wire; it's a no-op in GNU anyway.
- Just return instead of calling cthread_exit.
- Argument is now a pointer to struct msg_sig_post_request.
- Check mach_msg return value for sanity assert.
- (send_signal): Make MESSAGE auto instead of static, use new type name.
- This problem tracked down by Mark Kettenis <kettenis@gnu.org>.
-
-2000-03-12 Roland McGrath <roland@baalperazim.frob.com>
-
- * mgt.c (allocate_proc): Don't do mach_port_request_notification here.
- (proc_death_notify): New function, do it here instead.
- (complete_proc): Call proc_death_notify.
- * main.c (main): Call proc_death_notify on STARTUP_PROC after
- we have set its task port.
- * proc.h: Declare proc_death_notify.
-
-2000-01-23 Roland McGrath <roland@baalperazim.frob.com>
-
- * info.c (get_string): New arg, pass back length of string.
- (get_string_array): Use it, rather than repeating strlen.
- When increasing NEWSIZE to fit, round it to page size.
- Diddle a few casts to be prettier.
-
-2000-01-06 Roland McGrath <roland@baalperazim.frob.com>
-
- * primes.c: File removed (long obsolete).
- * proc.h: Don't declare nextprime.
-
-1999-07-11 Roland McGrath <roland@baalperazim.frob.com>
-
- * proc.h: Add #include <sys/mman.h>.
-
-1999-07-10 Roland McGrath <roland@baalperazim.frob.com>
-
- * info.c: Add #include <sys/mman.h> for munmap decl.
- * mgt.c: Likewise.
-
-1999-07-09 Thomas Bushnell, BSG <tb@mit.edu>
-
- * info.c (get_string_array): Use mmap instead of vm_allocate.
- (S_proc_getprocinfo): Likewise.
- (S_proc_getloginpids): Likewise.
- * mgt.c (S_proc_getallpids): Likewise.
- * pgrp.c (S_proc_getsessionpids): Likewise.
- (S_proc_getsessionpgids): Likewise.
- (S_proc_getpgrppids): Likewise.
-
-1999-07-03 Thomas Bushnell, BSG <tb@mit.edu>
-
- * info.c (get_string): Use munmap instead of vm_deallocate.
- (get_vector): Likewise.
- (get_string_array): Likewise.
- (S_proc_getprocinfo): Likewise.
- * mgt.c (S_proc_reauthenticate): Likewise.
- (S_proc_dostop): Likewise.
- (add_tasks): Likewise.
-
-1999-06-19 Roland McGrath <roland@baalperazim.frob.com>
-
- * main.c (main): Remove commented-out wire_task_self call, #include.
-
-1999-06-05 Roland McGrath <roland@baalperazim.frob.com>
-
- * mgt.c (create_startup_proc): Don't call add_proc_to_hash here.
- * main.c (main): Do it here instead, after we have the task port.
-
-1999-06-04 Roland McGrath <roland@baalperazim.frob.com>
-
- * proc.h (struct proc): Use unsigned int for flag bitfields.
-
- * mgt.c (allocate_proc, complete_proc): New functions, broken
- out of new_proc. Remove magic handling of PIDs 0 and 1.
- (new_proc): Now just call those two. Made static.
- (create_startup_proc): New function, also broken out of old new_proc.
- Do special setup for PID 1 (init) proc structure here.
- * proc.h: Update decls.
- * main.c (main): Use create_startup_proc for startup_proc, and
- allocate_proc + complete_proc (with PID 0) for self_proc.
-
- * mgt.c (make_ids): Add const to arguments.
-
-1999-05-29 Roland McGrath <roland@baalperazim.frob.com>
-
- * mgt.c (add_tasks): Skip invalid (null) rights in tasks array.
- * info.c (S_proc_pid2task): Add assert for p_task right validity.
-
- * main.c: Include <device/device.h>.
-
-1999-05-23 Roland McGrath <roland@baalperazim.frob.com>
-
- * main.c (main): Set up console on stderr.
-
-1999-05-01 Mark Kettenis <kettenis@gnu.org>
-
- * msg.c (check_msgport_death): New function.
- (S_proc_getmsgport): Use it.
- * proc.h (check_msgport_death): Provide prototype.
- * info.c (S_proc_getprocinfo): Call check_msgport_death to make
- sure that our knowledge about P's message port is up to date.
-
-1999-05-02 Roland McGrath <roland@baalperazim.frob.com>
-
- * main.c: Include <error.h>.
-
-1999-05-01 Roland McGrath <roland@baalperazim.frob.com>
-
- * main.c (main): Use assert_perror. Give diagnostic for lack of
- bootstrap port.
-
-1999-03-14 Roland McGrath <roland@baalperazim.frob.com>
-
- * mgt.c (S_proc_reassign): Remove unused variable FOO.
-
-1999-03-11 Mark Kettenis <kettenis@gnu.org>
-
- * notify.c (do_mach_notify_dead_name): Remove unnecessary braces.
-
- * msg.c (S_proc_setmsgport): Remove unused variable FOO.
- (S_proc_getmsgport): Only check if the message port is still alive
- if it is not MACH_PORT_NULL. Use mach_port_type instead of
- mach_port_get_refs to check if the port is dead.
-
- * mgt.c (S_proc_reassign): Use mach_port_destroy to release the
- old task port.
-
-Tue Mar 9 13:11:43 1999 Thomas Bushnell, BSG <tb@mit.edu>
-
- * notify.c (do_mach_notify_dead_name): Don't check against
- P->p_msgport anymore.
- * msg.c (message_port_dead): Delete function.
- (S_proc_setmsgport): Don't request a dead-name notification
- anymore.
- (S_proc_getmsgport): Check to see if P->p_msgport is dead before
- returning it.
- * mgt.c (S_proc_reassign): Only use mach_port_deallocate to
- release P->msgport.
- (process_has_exited): Likewise.
- * proc.h (message_port_dead): Delete prototype.
-
- * mgt.c (S_proc_reassign): It's not necessary to re-request the
- task-death notification; we've moved both the task right and the
- proc port that gets the notification, so delete that.
-
- * mgt.c (S_proc_reassign): Use mach_port_destroy instead of
- mach_port_deallocate to release P->p_msgport, for the same reasons
- as the changes below.
-
-Sun Mar 7 18:19:07 1999 Thomas Bushnell, BSG <tb@mit.edu>
-
- * mgt.c (process_has_exited): Use mach_port_destroy instead of
- mach_port_deallocate to release P->p_msgport.
- (complete_exit): Likewise for P->p_task.
- These changes eliminate a race; we are destroying the receiver of
- the dead-name notifications on these ports, but if that means we
- lose a notification, then the ref-count on the name will get
- incremented and we can't re-decrement it since we never hear the
- notification.
-
-1999-03-06 Mark Kettenis <kettenis@gnu.org>
-
- * notify.c (do_mach_notify_dead_name): Deallocate reference to
- DEADPORT.
-
-Sat Feb 20 06:26:17 1999 Thomas Bushnell, BSG <tb@mit.edu>
-
- * stubs.c (send_signal): Typo in comment.
-
-1998-07-20 Roland McGrath <roland@baalperazim.frob.com>
-
- * cpu-types.c: Test with #ifdef for CPU_TYPE_I486, CPU_TYPE_PENTIUM,
- CPU_TYPE_PENTIUMPRO, CPU_TYPE_POWERPC, since not all <mach/machine.h>
- versions have them.
-
-Tue Sep 16 15:26:04 1997 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * host.c (hostid, hostname, hostnamelen): Delete variables.
- (S_proc_sethostid, S_proc_gethostid, S_proc_sethostname,
- S_proc_gethostname): Delete functions.
-
-Wed Aug 20 14:06:46 1997 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * main.c (main): New args for
- ports_manage_port_operations_multithread.
-
-1997-06-30 Miles Bader <miles@gnu.ai.mit.edu>
-
- * main.c (main): Arg parsing added. HOLD variable removed.
- (argp_program_version): New variable.
- Include <argp.h> and <version.h>.
-
-Thu Jun 26 14:03:16 1997 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * cpu-types.c (mach_cpu_types): Add entries for 486, 586, 686,
- and powerpc.
- (mach_cpu_subtypes): Add subtypes for new x86 subtypes. (None
- added for powerpc yet.)
-
-Mon Feb 3 16:52:14 1997 Miles Bader <miles@gnu.ai.mit.edu>
-
- * hash.c (pid_find, task_find, task_find_nocreate, reqport_find):
- Don't dereference P if it's 0.
-
-Fri Oct 25 20:30:22 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * host.c: Include <version.h>.
-
-Thu Oct 24 16:13:40 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * host.c (initialize_version_info): Construct UNAME_INFO.machine
- with a dash instead of a slash so that it can be used as a file
- name component.
-
- * host.c (initialize_version_info): Copy our version into element
- 0 of server_versions, not element 1. Use HURD_VERSION instead of
- OUR_VERSION. Use literal "proc" instead of OUR_SERVER_NAME.
- * proc.h (OUR_SERVER_NAME, OUR_VERSION): Delete macro.
-
-Thu Sep 12 16:33:49 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * Makefile (HURDLIBS): New variable.
- (proc): Delete special dependency.
-
-Thu Sep 5 10:43:39 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * host.c (struct server_version): Delete member `release'.
- (kernel_name, kernel_version): New variables.
- (rebuild_uname): Do the voting on versions, not releases.
- (initialize_version_info): Store kernel information in kernel_name
- and kernel_version, not as an entry in the server_versions array.
- Don't fill in a release for ourselves.
- (S_proc_register_version): Ignore RELEASE arg.
-
-Sun Jul 28 22:57:03 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * info.c (get_string_array): Correctly adjust NEWSIZE when
- reallocating to add very long strings.
-
-Sat Jul 20 10:08:05 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * msg.c (S_proc_getmsgport): Deal with PID dying while we're waiting.
-
-Fri Jul 19 18:22:46 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * msg.c (S_proc_setmsgport): Bother to request DEAD_NAME
- notification on new message port being installed.
-
-Thu Jul 18 13:23:51 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * msg.c (S_proc_setmsgport): Use MOVE_SEND, not COPY_SEND, to
- return the old message port to the caller.
-
- * mgt.c (S_proc_handle_exceptions): Release newly created reference
- on E when we are done with it.
- (S_proc_child): Deallocate our ref on childt once we know we will
- return success.
- (S_proc_reassign): Likewise for NEWT.
-
- * main.c (main): Don't wire proc anymore. It's not necessary or
- useful.
-
-Thu Jul 18 04:15:49 1996 Roland McGrath <roland@baalperazim.frob.com>
-
- * mgt.c (add_tasks): Fix vm_deallocate call to use mach_task_self ()
- instead of mach_host_self ().
-
-Tue Jul 16 11:34:34 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * wait.c (EWOULDBLOCK): Define to work around new libc bug.
-
-Sun Jul 7 21:04:03 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * mgt.c (S_proc_reauthenticate): Don't use unsafe MOVE_SEND in
- user-side interruptible RPC.
-
-Wed Jul 3 14:44:00 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * mgt.c (process_has_exited): When reparenting children to init,
- if one of them is dead, alert init.
-
-Fri Jun 28 11:54:21 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * proc.h (check_owner): Return true any time PROC1 has root.
-
-Thu May 30 19:11:31 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * pgrp.c (S_proc_getsidport): MAKE_SEND_ONCE -> MAKE_SEND.
-
-Wed May 29 11:35:37 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * info.c (S_proc_getprocinfo): Get rid of temp hack for strnlen.
-
-Fri May 24 15:50:14 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * info.c (S_proc_getprocinfo): Set PI->exitstatus and PI->sigcode.
-
- * mgt.c (process_has_exited): Don't call alert_parent if P->p_task
- is null (which happens only if this is the stub process in
- proc_reassign). This because the parent is uninvolved in the
- death of stubp.
-
-Wed May 22 17:47:15 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * stubs.c (send_signal): Send sigcode in message.
-
- * msg.c (S_proc_setmsgport): Add OLDMSGPORT_TYPE param.
-
-Tue May 14 22:50:49 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * proc.h (check_owner): New inline function.
- * info.c (S_proc_pid2task, S_proc_pid2proc): Use check_owner.
-
-Sun May 12 13:22:04 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * info.c (PI_FETCH_THREAD_DETAILS): New macro.
- (S_proc_getprocinfo): Only allocate thread detail storage if we're
- actually returning thread details (a lone PI_FETCH_THREADS simply
- means "number of threads"). React to errors somewhat more gracefully.
-
- * info.c (S_proc_getprocinfo): Add comment.
-
-Fri May 10 16:32:17 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * info.c (S_proc_get_tty): New function.
-
-Fri May 10 09:26:53 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * mgt.c (S_proc_exception_raise): Fetch sigcode from correctly
- named member of HSD.
-
-Thu May 9 19:13:14 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * mgt.c (S_proc_reauthenticate): Use new authentication
- interface.
-
- * mgt.c (S_proc_setowner): Expect and interpret new CLEAR parm.
-
- * info.c (S_proc_getprocinfo): FLAGS is now an in-out parameter.
-
- * proc.h (struct proc): Add p_sigcode.
- * wait.c (S_proc_wait): New parm SIGCODE; return p_sigcode in it.
- (S_proc_mark_stop): New parm SIGCODE; record it.
- (S_proc_mark_exit): Likewise.
- (alert_parent): Set P->p_sigcode if process is dying irregularly.
- * mgt.c (S_proc_exception_raise): Set P->p_sigcode; use new
- _hurd_exception2signal args.
-
-Mon May 6 14:23:11 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * proc.h (OUR_VERSION): Upgrade to 0.0.
-
-Tue Apr 30 16:48:49 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * info.c (S_proc_getprocinfo): Release GLOBAL_LOCK around time
- consuming bits, and more importantly, potential calls to P's
- msgport, which can block.
- Fix test when appending to WAITS.
-
-Mon Apr 29 16:58:24 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * info.c (S_proc_getprocinfo): Install temporary hack so things at
- least compile. Turned on thread_waits code.
-
-Mon Apr 15 13:51:41 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * mgt.c (process_has_exited): Clear p->p_waited.
-
-Fri Mar 29 09:38:28 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * wait.c (S_proc_wait): When looking for a specific pid, use
- pid_find_allow_zombie, not ordinary pid_find.
-
- * mgt.c (S_proc_reassign): Use new ports_transfer_right call
- instead of claim/install sequence; the latter has leaves the port
- out of any hash table for a time, which produces a race with
- incoming messages.
-
-Thu Mar 28 09:21:16 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * mgt.c (S_proc_reassign): Make send once right directly from
- value in P->p_pi, don't use ports_get_right.
-
- * mgt.c (process_has_exited): Inhibit this call from happening
- twice.
-
- * info.c (S_proc_pid2task): Return MACH_PORT_NULL for a zombie.
- (S_proc_pid2proc): Likewise.
-
- * Makefile (mutated_ourmsg_U.h): New target.
- * mgt.c: Include mutated_ourmsg_U.h instead of ourmsg_U.h.
- * pgrp.c: Likewise.
-
- * wait.c: Don't include ourmsg_U.h or process_reply_U.h.
- * msg.c: Don't include process_reply_U.h.
-
- * msg.c (S_proc_getmsgport): Allow call to be made for dead
- processes; they'll return null. Thank you, Mr. Posix.
- * mgt.c (process_has_exited): Null out P->p_msgport and drop
- reference.
-
- * wait.c (S_proc_wait): Return EOPNOTSUPP if RPC destination is
- not a valid process.
- (S_proc_mark_stop): Likewise.
- (S_proc_mark_exit): Likewise.
- (S_proc_mark_cont): Likewise.
- (S_proc_mark_traced): Likewise.
- (S_proc_mod_stopchild): Likewise.
- * msg.c (S_proc_setmsgport): Likewise.
- (S_proc_getmsgport): Likewise.
- * pgrp.c (S_proc_setsid): Likewise.
- (S_proc_getsidport): Likewise.
- (S_proc_setpgrp): Likewise.
- (S_proc_mark_exec): Likewise.
- * mgt.c (S_proc_reauthenticate): Likewise.
- (S_proc_child): Likewise.
- (S_proc_reassign): Likewise.
- (S_proc_setowner): Likewise.
- (S_proc_getpids): Likewise.
- (S_proc_set_arg_locations): Likewise.
- (S_proc_dostop): Likewise.
- * info.c (S_proc_pid2task): Likewise.
- (S_proc_proc2task): Likewise.
- (S_proc_pid2proc): Likewise.
- (S_proc_make_login_coll): Likewise.
- (S_proc_setlogin): Likewise.
- (S_proc_getlogin): Likewise.
- * host.c (S_proc_sethostid): Likewise.
- (S_proc_sethostname): Likewise.
- (S_proc_getprivports): Likewise.
- (S_proc_setexecdata): Likewise.
-
- * proc.h (process_drop): New (inline) function.
- * hash.c (reqport_find): Only deallocate newly found reference
- if process is dead.
- * Makefile (MIGSTUBS): Delete process_replyUser.c.
- (MIGSFLAGS): Provide new definition.
- * msg.c (S_proc_setmsgport): Spawn thread to tickle init instead
- of sending reply here.
- (tickle_init): New function.
-
-Mon Mar 25 17:02:04 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * Makefile (proc): Add libshouldbeinlibc.a.
- * main.c: Include <wire.h>.
- (main): Use wire_task_self instead of doing it ourselves.
-
-Thu Mar 21 11:59:29 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * wait.c (S_proc_wait) [child_ready]: Flip test of waited flag.
- * mgt.c (new_proc): Oops, reinstall code to request dead name
- notification on the task port.
-
-Wed Mar 20 10:41:01 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * pgrp.c (S_proc_setpgrp): Delete bletcherous hack from July 22,
- 1995.
-
- -- All these changes get rid of zombies and integrate them
- into the regular process tables. --
- * proc.h (struct zombie): Delete type.
- (zombie_list): Delete variable.
- * hash.c (pid_find): Return 0 if process is dead.
- (task_find): Likewise.
- (task_find_nocreate): Likewise.
- (pidfree): Don't call zombie_check_pid. Call
- pid_find_allow_zombie instead of pid_find.
- (pid_find_allow_zombie): New function.
- (prociterate): Don't call FUN for dead processes.
- * mgt.c (new_proc): Initialize P->p_dead.
- (process_has_exited): Don't call reparent_zombies. Set P->p_dead.
- Don't remove from hash tables here, delete ref to task port or
- remove from parent's list of children (now in
- complete_exit). Don't remove from pgrp here.
- (complete_exit): New function.
- * wait.c (alert_parent): Don't create zombie.
- (reparent_zombies): Delete function.
- (S_proc_wait): Don't scan zombie list; check dead children at the
- same time as stopped children. When completing wait on a dead
- child, call complete_exit after we've finished work.
- (zombie_check_pid): Delete function.
- * proc.h (complete_exit): Provide prototype.
-
- -- All these changes make proc multithreaded
- and use the ports library in the usual fashion
- (well, almost the usual fashion) --
- * Makefile (proc): Mention ../libports/libports.a.
- * hash.c (porthash, exchash): Delete variables.
- (reqport_find): Use ports library instead of porthash.
- (add_proc_to_hash): Don't add to porthash.
- (remove_proc_from_hash): Don't remove from porthash.
- (exc_find, remove_exc_from_hash): Delete functions.
- * mgt.c (new_proc): Allocate new proc structure with
- ports_create_port. Don't frob P->p_reqport.
- (process_has_exited): Don't frob P->p_reqport, cal
- ports_destry_right instead.
- * proc.h (proc_bucket, proc_class): New variables.
- (request_portset): Delete variable.
- * proc.h (struct proc): Delete members `p_reqport' and
- p_porthashloc. Add member `p_pi'.
- * Makefile (MIGSFLAGS): Delete variable.
- * proc.h (global_lock): New variable.
- * main.c (global_lock): Provide definition.
- (message_demuxer): Lock global_lock around work.
- (main): Initialize proc_bucket and proc_class instead of
- request_portset. Initialize generic_port through ports
- library calls. Fetch startup procserver port through ports
- library instead of reading p_reqport. Initialize exc_class.
- * mgt.c (S_proc_reauthenticate) Likewise.
-
- * proc.h: Include <hurd/ports.h> and <cthreads.h>.
- * info.c (S_proc_task2proc): Use ports_get_right instead
- of p_reqport.
- (S_proc_pid2proc): Likewise.
- * proc.h (exc_port_class): New variable.
- (struct exc): Add member `pi'. Remove member `excport'.
- * mgt.c (S_proc_handle_exceptions): Allocate using
- ports library.
- (S_proc_exception_raise): Use ports library to manage
- structure.
- (exc_clean): New function.
-
-
-***
-
- -- All these changes switch to using condition variables
- for wakeup instead of explicit block code --
- * mgt.c (new_proc): Initialize P->p_wakeup.
- * wait.c (waiting_parent_cares): Delete function.
- * Makefile (MIGSTUBS): Delete interruptServer.o.
- * main.c (message_demuxer): Remove call to interrupt_server.
- Add call to ports_interrupt_server.
- * wait.c: Don't include "interrupt_S.h".
- (alent_parent): Unconditionally enqueue zombie.
- (S_interrupt_operation): Delete function.
- (abort_wait): Delete function.
- * msg.c (abort_getmsgport): Delete function.
- * wait.c (alert_parent): Use condition_broadcast instead of
- continuation stuff.
- (reparent_zombies): Likewise.
- (S_proc_mark_stop): Likewise.
- * msg.c (check_message_return): Likewise.
- (check_message_dying): Likewise.
- * wait.c (S_proc_wait): Use condition_wait instead of continuation
- stuff; never return EBUSY.
- * msg.c (S_proc_getmsgport): Likewise.
- * proc.h (struct proc): New member `p_wakeup'. Delete member
- `p_continuation'.
-
-
-
-Mon Feb 12 14:13:55 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * info.c (S_proc_getprocinfo): Fail reasonably for #ifdef'd-out
- thread waits code.
-
-Fri Feb 9 15:45:07 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * info.c (S_proc_getprocinfo): Support returning wait strings.
-
-Fri Feb 9 15:19:14 1996 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * mgt.c (S_proc_exception_raise): Rewritten.
- (S_proc_handle_exceptions): Don't set E->replyport.
- (S_proc_exception_raise_reply): Function removed.
- * main.c (message_demuxer): Don't call proc_excrepl_server.
- * proc_excrepl.defs: File removed.
- * Makefile (DIST_FILES): Remove proc_excrepl.defs.
- (MIGSTUBS): Remove its objects.
- * proc_exc.defs: Add msgoption arg.
- Use integer_t where appropriate.
- * notify.c (do_mach_notify_no_senders): Don't use E->replyport.
- * proc.h (struct exc): Removed useless members `replyport',
- `replyporttype'.
-
-Wed Dec 20 17:29:13 1995 Miles Bader <miles@gnu.ai.mit.edu>
-
- * mgt.c (S_proc_reassign): Have notifications sent to the correct
- request port.
- Once we've given STUBP's request port to P, don't leave it in
- STUBP, so process_has_exited() doesn't dealloc it.
-
- * pgrp.c (S_proc_getsidport): Add and use new arg sessport_type.
-
-Wed Dec 20 13:31:01 1995 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * mgt.c (new_proc): Don't set P->p_noowner for processes 0 and 1.
-
-Wed Dec 20 13:09:04 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * info.c (get_vector): Rewritten without arbitrary limits.
-
-Tue Dec 19 18:14:30 1995 Miles Bader <miles@gnu.ai.mit.edu>
-
- * pgrp.c (free_session): Correctly get rid of the receive right
- we're holding.
- (S_proc_getsidport): Return errors.
-
-Tue Dec 19 13:58:59 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * info.c (get_string_array): Fix stupid bug in copying to newly
- allocated space.
-
-Tue Dec 19 13:17:46 1995 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * mgt.c (S_proc_reauthenticate): Reverse miles' last change.
-
-Mon Dec 18 19:56:03 1995 Miles Bader <miles@gnu.ai.mit.edu>
-
- * mgt.c (S_proc_reauthenticate): Don't return 0 for the new port.
-
-Tue Nov 21 13:50:30 1995 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * wait.c (S_interrupt_operation): Include new seqno parameter.
-
-Tue Nov 14 13:15:55 1995 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * wait.c (S_proc_wait): `p->msgportwait' ==> `p->p_msgportwait'
- typo fix.
-
-Thu Nov 9 13:01:28 1995 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * msg.c (S_proc_setmsgport): Only do the RPC reply by hand for
- init. Also, return the correct port in that by-hand reply.
-
- * msg.c (S_proc_getmsgport): Also return EBUSY if P->waiting,
- because both share the same memory in the proc structure.
- * wait.c (S_proc_wait): Likewise, mutatis mutandis.
-
-Wed Nov 8 13:10:27 1995 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * info.c (S_proc_getprocinfo): Don't attempt msg_report_wait if
- P->p_msgport is not valid.
-
- * info.c (S_proc_getprocinfo): Inhibit PI_FETCH_THREAD_WAITS for
- now.
-
-Tue Nov 7 19:49:32 1995 Miles Bader <miles@gnu.ai.mit.edu>
-
- * info.c (S_proc_getprocinfo): Calculate the size of the returned
- structure correctly.
-
-Sun Nov 5 02:05:10 1995 Miles Bader <miles@gnu.ai.mit.edu>
-
- * proc.h: Include <sys/resource.h>.
-
- * info.c (S_proc_getprocinfo): Add NOISE and NOISE_LEN args.
- Fix various typos. Initialize ERR.
-
-Tue Oct 31 14:19:04 1995 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * wait.c (struct zombie): Deleted; now in proc.h.
- (zombie_list): Likewise.
- * proc.h (struct zombie): New type.
- (zombie_list): New variable.
-
- * info.c (S_proc_getprocinfo): Implement all the rest of the PI
- flags except PI_ZOMBIE.
-
-Mon Oct 30 16:22:49 1995 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * info.c (S_proc_getprocinfo): Support new FETCH flags; support
- new msg_report_wait call; improve organization.
-
- * info.c (S_proc_getprocenv): Removed #ifdef notyet; fixed args to
- get_string_array.
-
-Sat Sep 16 12:57:31 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * ourmsg.defs: New file.
- * Makefile (DIST_FILES): Added ourmsg.defs.
- (ourmsg_U.h ourmsgUser.c, ourmsg.defs): Targets removed.
-
-Thu Aug 24 10:38:58 1995 Miles Bader <miles@churchy.gnu.ai.mit.edu>
-
- * Makefile (MIGSTUBS): New variable.
- (OBJS): Get the mig stubs from $(MIGSTUBS).
-
-Wed Aug 23 14:25:30 1995 Miles Bader <miles@churchy.gnu.ai.mit.edu>
-
- * Makefile (proc): Put all dependencies here.
- (HURDLIBS, REMHDRS): Removed.
- (OBJS): Calculate the appropiate bits from $(SRCS).
-
-Sat Jul 22 15:04:52 1995 Michael I Bushnell <mib@geech.gnu.ai.mit.edu>
-
- * wait.c (zombie_check_pid): Examine Z->pgrp too.
-
- * pgrp.c (S_proc_setpgrp): Install bletcherous hack.
-
-Thu Jul 6 15:41:22 1995 Michael I Bushnell <mib@duality.gnu.ai.mit.edu>
-
- * hash.c: "ihash.h" -> <hurd/ihash.h>.
-
- * Makefile (ourmsg_U.h ourmsgUser.c): Use local ourmsg.defs
- instead of include file directly.
- (ourmsg.defs): New target.
-
- * Makefile: Removed dependencies that are now automatically
- generated.
-
-Tue Jun 27 12:02:47 1995 Michael I Bushnell <mib@duality.gnu.ai.mit.edu>
-
- * mgt.c (S_proc_dostop): Remove assigments from inside if tests.
-
-Tue Jun 6 13:24:51 1995 Michael I Bushnell <mib@duality.gnu.ai.mit.edu>
-
- * Makefile (OBJS): Removed ihash.o and primes.o.
- (CPPFLAGS): Deleted addition of -I../lib.
- (vpath): Deleted spec.
- (REMHDRS): Added ../libihash/ihash.h.
- (HURDLIBS): Added libihash.
-
-Wed Apr 26 14:32:19 1995 Michael I Bushnell <mib@duality.gnu.ai.mit.edu>
-
- * wait.c (S_proc_wait): Use `waiter_cares', not
- `waiting_parent_cares' in zombie check.
-
-Tue Apr 18 09:30:13 1995 Michael I Bushnell <mib@churchy.gnu.ai.mit.edu>
-
- * wait.c (reparent_zombies): Send SIGCHLD signal to init.
-
- * wait.c (S_proc_wait): Don't return ESRCH; return ECHILD.
-
-Wed Apr 12 14:36:30 1995 Michael I Bushnell <mib@duality.gnu.ai.mit.edu>
-
- * Makefile (SRCS): Omit primes.c (it's moved to the lib dir).
-
-Thu Apr 6 14:29:06 1995 Michael I Bushnell <mib@geech.gnu.ai.mit.edu>
-
- * info.c (S_proc_getprocinfo): New var `tp'. Bother to set
- PI->logincollection.
-
-Wed Apr 5 20:32:02 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * wait.c (waiter_cares, waiting_parent_cares): New functions.
- (alert_parent, reparent_zombies, S_proc_wait, S_proc_mark_stop):
- Use them.
-
-Tue Apr 4 14:36:36 1995 Michael I Bushnell <mib@geech.gnu.ai.mit.edu>
-
- * main.c (main): Wire text and data segment on startup to avoid
- failure mode during non-standalone pseudo-crash.
-
-Tue Mar 14 11:55:00 1995 Miles Bader <miles@geech.gnu.ai.mit.edu>
-
- * hash.c (addhash, findhash): Moved to ihash.c (which is has a more
- generic interface) and renamed ihash_add & ihash_find; all callers
- changed. Other changes: struct htable becomes struct ihash, and
- all routines that previously deleted things explicitly use
- ihash_locp_remove instead.
-
-Thu Jan 19 02:01:14 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * pgrp.c (S_proc_setpgrp): Use nowait_msg_proc_newids instead of
- nowait_proc_newids.
- * mgt.c (S_proc_child): Likewise.
-
-Tue Jan 17 17:48:32 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * mgt.c (check_uid): Return true if P has root.
-
- * proc.h (struct proc): Make `argv' and `envp' members
- `vm_address_t'.
-
-Thu Nov 3 12:13:49 1994 Michael I Bushnell <mib@geech.gnu.ai.mit.edu>
-
- * mgt.c (S_proc_getallpids): Don't dereference PIDS in call
- to vm_allocate.
-
- * info.c (S_proc_getprocinfo): Don't take address of PIARRAY
- in call to vm_allocate. Dereference PIARRAY in call to
- vm_deallocate.
-
-Fri Oct 14 04:54:46 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * mgt.c (new_proc): Don't assume MACH_PORT_NULL is zero.
- (genpid): Deal with all pids between STAR_OVER and WRAP_AROUND
- being used.
-
-Mon Oct 10 14:23:00 1994 Jim Blandy <jimb@geech.gnu.ai.mit.edu>
-
- * primes.c (nextprime): Doc fix.
-
-Mon Oct 10 02:18:02 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * host.c (rebuild_uname): If all the server versions after [0]
- (the microkernel) match, merge them all into one "Hurd-VERSION"
- element in the uname version string.
-
-Sun Oct 2 20:36:57 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * host.c (S_proc_sethostname): Don't write off end of
- uname_info.nodename.
- (rebuild_uname): Rewritten.
- (initialize_version_info): Write Mach version info as first
- element of server_versions.
- (machversion): Variable removed.
-
-Sat Sep 10 11:37:32 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * mgt.c (make_ids): Copy from UIDS and GIDS into newly allocated
- space, not vice versa.
-
-Wed Aug 31 11:03:13 1994 Michael I Bushnell <mib@geech.gnu.ai.mit.edu>
-
- * mgt.c (S_proc_reassign): Rather than getting a new request port,
- preserve STUBP's request port. This is more convenient for
- users (and equally good security), and it's what the protocol spec
- says anyway.
-
-Tue Aug 30 12:44:37 1994 Michael I Bushnell <mib@geech.gnu.ai.mit.edu>
-
- * primes.c: Replaced file with new version from Jim Blandy
- (jimb@gnu.ai.mit.edu), David Carlton (carlton@math.mit.edu).
-
- * proc.h (check_dead_execdata_notify): Add prototype.
-
-Mon Aug 29 12:53:27 1994 Michael I Bushnell <mib@geech.gnu.ai.mit.edu>
-
- * mgt.c (S_proc_reauthenticate): Use new authentication protocol.
-
-Tue Aug 23 11:41:26 1994 Michael I Bushnell <mib@geech.gnu.ai.mit.edu>
-
- * pgrp.c (S_proc_setpgrp): If we don't actually change the pgrp,
- still send proc_newids; the library depends on always getting it.
-
-Mon Aug 22 17:09:21 1994 Michael I Bushnell <mib@geech.gnu.ai.mit.edu>
-
- * wait.c (S_proc_mark_stop): Removed now meaningless assert.
-
- * info.c (S_proc_getloginpids): Compute size in realloc correctly.
-
-Mon Aug 22 13:29:21 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * wait.c (S_proc_mod_stopchild): Negate VALUE; sense of
- p_nostopcld flag is opposite of flag value described in process.defs.
-
-Fri Aug 19 10:21:57 1994 Michael I Bushnell <mib@geech.gnu.ai.mit.edu>
-
- * pgrp.c (S_proc_getpgrppids): Understand PGID of zero as meaning
- caller's pgrp.
-
- * mgt.c (S_proc_child): Check CHILDP->p_msgport against
- MACH_PORT_NULL explicitly.
-
- * pgrp.c (join_pgrp): If pg->pg_orphcnt has significantly changed,
- then notify all the processes in the pgrp.
- (leave_pgrp): Only send newids message if ip->p_msgport is set.
- * mgt.c (S_proc_child): Becase join_pgrp now always sends
- newids; don't do it here if we called join_pgrp.
-
-Fri Aug 19 04:53:04 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * pgrp.c (leave_pgrp): Fix swapped args to nowait_proc_newids.
- (join_pgrp): Call nowait_proc_newids to notify the process.
-
-Thu Aug 18 10:40:13 1994 Michael I Bushnell <mib@geech.gnu.ai.mit.edu>
-
- * mgt.c (S_proc_reauthenticate): Use MACH_MSG_TYPE_MAKE_SEND
- to create a send right from P->p_reqport.
-
- * main.c (main): Removed var `authhandle'. Use global
- `authserver' instead.
-
-Wed Aug 17 14:02:31 1994 Michael I Bushnell <mib@geech.gnu.ai.mit.edu>
-
- * host.c (init_stdarrays): Removed function.
- (S_proc_execdata_notify): Never call init_stdarrays.
- Only call exec_setexecdata if std_port_array is set.
- (S_proc_getexecdata): Return error if there is no std_port_array.
-
-Mon Aug 15 16:12:22 1994 Michael I Bushnell <mib@geech.gnu.ai.mit.edu>
-
- * host.c (check_dead_execdata_notify): New function.
- * notify.c (do_mach_notify_dead_name): For notifications sent
- to GENERIC_PORT, call check_dead_execdata_notify.
- * main.c (main): Create GENERIC_PORT and put it in
- REQUEST_PORTSET.
-
- * host.c (init_stdarrays): New function.
- (S_proc_execdata_notify): Call init_stdarrays the first time.
- (S_proc_getexecdata): Likewise.
-
- * host.c: Include <hurd.h> for various frobs. Include
- <unistd.h> for getpid.
-
-Fri Jul 22 11:01:53 1994 Michael I Bushnell <mib@geech.gnu.ai.mit.edu>
-
- * Makefile: Rewritten in accord with new scheme.
- * wait.c: Include "ourmsg_U.h" instead of "msg.h".
- Include "process_reply_U.h" instead of "process_reply.h".
- Include "process_S.h" instead of "proc_S.h".
- * mgt.c: Include "proc_exc_U.h" instead of "proc_exc.h".
- Include "proc_excrepl_U.h" insted of "proc_excrepl.h".
- Include "ourmsg_U.h" instead of "msg.h".
- Include "process_S.h" instead of "proc_S.h".
- * pgrp.c: Include "process_S.h" instead of "proc_S.h".
- Include "ourmsg_U.h" instead of "msg.h".
- * msg.c: Include "process_reply_U.h" instead of "process_reply.h".
- * host.c: Include "process_S.h" instead of "proc_S.h".
- * info.c: Likewise.
-
-Wed Jul 20 16:18:31 1994 Michael I Bushnell <mib@geech.gnu.ai.mit.edu>
-
- * wait.c (alert_parent): Delete unused variable `err'.
-
-Tue Jul 19 12:45:43 1994 Michael I Bushnell (mib@churchy.gnu.ai.mit.edu)
-
- * Makefile (proc): Don't use variable $(link) anymore.
-
-Mon Jul 11 14:32:17 1994 Michael I Bushnell (mib@churchy.gnu.ai.mit.edu)
-
- * pgrp.c (leave_pgrp): When pulling process off of pgrp list,
- mutate *both* links.
- (free_pgrp): When pulling pgrp off of session list, mutate
- *both* links.
-
-Tue Jul 5 14:23:21 1994 Michael I Bushnell (mib@churchy.gnu.ai.mit.edu)
-
- * Makefile (TAGSLIBS, TAGSHDRS): New variables.
-
-Fri Jul 1 10:57:07 1994 Michael I Bushnell (mib@churchy.gnu.ai.mit.edu)
-
- * stubs.c (send_signal): Rewrote to be machine independent
- and cleaner.
-
-Thu Jun 30 14:05:21 1994 Michael I Bushnell (mib@churchy.gnu.ai.mit.edu)
-
- * stubs.c: New file.
- * wait.c (alert_parent): Call send_signal instead of nowait_sig_post.
- (S_proc_mark_stop): Likewise.
- * pgrp.c (leave_pgrp): Likewise.
- * proc.h (send_signal): New prototype.
- * Makefile (OBJS): Added stubs.o.
- (SRCS): Added stubs.c.
- (LIBS): New var to get cthreads library.
-
- * wait.c (alert_parent): Eliminate pointless assert with confusingly
- incorrect comment.
-
- * hash.c (findhash): If we find a slot with ID matching the
- one we're looking for, but it has been deleted, then return
- 0 rather than HASH_DEL.
-
- * wait.c (S_proc_wait, reparent_zombies, alert_parent): Use
- macros WAIT_ANY and WAIT_MYPGRP instead of magic values -1
- and 0.
-
- * wait.c (S_proc_wait): Implement correct interpretation of PID
- argument: -1 means any child; 0 means child in the same pgrp.
- [Incorrect semantics were in loop to search zombies, and loop
- looking for stopped children]
- (reparent_zombies): Likewise. [Incorrect semantics were in
- PID check before returning startup_proc's wait.]
- (alert_parent): Likewise. [Incorrect semantics were in
- PID check before returning P->p_parent's wait.]
-
- * wait.c (S_proc_wait): Only return wait on stopped child if
- it passes the PID test.
-
- * pgrp.c (S_proc_setpgrp): Don't do process group change if we are
- changing into our own process group.
- * mgt.c (S_proc_child): Likewise.
-
- * pgrp.c (S_proc_setpgrp): When PID is zero, act on calling
- process; when PGID is zero, use pid of affected process.
- (S_proc_setpgrp): EPERM check should succeed if pgid is the
- affected process's *pid*, not pgrp.
-
-Thu Jun 30 08:40:35 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
-
- * mgt.c (S_proc_dostop): Use the proper allocation for task_threads.
- Check for errors. Deallocate the send right from CONTTHREAD too.
-
- * wait.c (alert_parent): Send SIGCHLD to the parent.
-
-Tue Jun 28 18:12:43 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
-
- * primes.c: Include <assert.h>.
- (nextprime): Use calloc instead of alloca, bzero. P might be
- bigger than will fit on the stack. Assert non-null return
- from calloc and realloc.
-
-Tue Jun 28 13:57:08 1994 Michael I Bushnell (mib@churchy.gnu.ai.mit.edu)
-
- * main.c (main): Set priority of proc server to 2 so that we
- get more CPU than ordinary programs.
-
-Fri Jun 24 17:29:55 1994 Michael I Bushnell (mib@churchy.gnu.ai.mit.edu)
-
- * hash.c (struct htable): New member `locps'.
- (addhash): Store LOCP into hash table for use during rehash.
- During rehash, then provide correct LOCP parm for old elements.
- Allocate and free HT->locps as appropriate.
-
-Fri Jun 24 04:15:16 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
-
- * mgt.c (S_proc_setprocargs): Renamed to S_proc_set_arg_locations.
- (S_proc_get_arg_locations): New function.
-
-Mon Jun 20 15:07:00 1994 Michael I Bushnell (mib@churchy.gnu.ai.mit.edu)
-
- * Makefile (install): Use $(INSTALL_BIN) instead of cp.
-
-Fri Jun 17 13:00:27 1994 Michael I Bushnell (mib@geech.gnu.ai.mit.edu)
-
- * mgt.c (S_proc_child): Reverse Roland's change of June 11.
-
-Sat Jun 11 11:20:16 1994 Roland McGrath (roland@geech.gnu.ai.mit.edu)
-
- * mgt.c (S_proc_child): Inherit the argv and envp values from the
- parent.
-
-Fri May 27 16:03:53 1994 Michael I Bushnell (mib@geech.gnu.ai.mit.edu)
-
- * primes.c: Doc fix, with appreciation to Jim Blandy.
-
-Fri May 13 16:58:13 1994 Michael I Bushnell (mib@churchy.gnu.ai.mit.edu)
-
- * info.c (S_proc_getprocinfo): Only scan through the threads
- if task_info succeeds.
-
- * info.c (S_proc_getprocinfo): Behave properly if one of the
- threads has died in between the call to task_threads and the
- calls to thread_info (just pretend it never existed).
-
- * info.c (get_string, get_vector, S_proc_getprocinfo): If the task
- has died (there's a race between pending requests and processing
- of dead-name notifications) then convert MACH_SEND_INVALID_DEST to
- ESRCH.
-
-Thu May 12 00:59:03 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
-
- * main.c (main): Take three args. Store ARGV and ENVP in SELF_PROC.
-
- * info.c (S_proc_getprocargs): Remove `#ifdef notyet's.
- (get_string, get_vector, get_string_array): Functions exposed.
- (get_string_array): Set BP before the loop. Use a for loop that
- iterates over elts in VECTOR. Fix check of LEN to reallocate buffer.
- (S_proc_getprocargs): Cast BUF to vm_address_t * for get_string_array.
- (get_vector): Fix pointer arithmetic; break out of loop when done.
- Check for error from malloc.
- (get_string): Use memchr for scanning. Check for error from
- malloc. Pass READLEN correctly to vm_deallocate.
-
- * msg.c (S_proc_setmsgport): Take new reply port args.
- Send reply before trying startup_essential_task.
- Include <hurd/startup.h> to declare startup_essential_task.
-
- * cpu-types.c: New file.
- * Makefile (SRCS, OBJS): Add it.
- * host.c: Include <stdio.h> for sprintf.
- (rebuild_uname): Removed unused variable J.
- (S_proc_register_version): Fix arg types.
- Use master_host_port, not host_priv.
- Remove unused variable J.
- (server_versions): Fix syntax errors in struct definition.
- (S_proc_uname): Fixed type of first arg.
- (rebuild_uname): Fix typo.
- (initialize_version_info): Cast args to host_info.
- (initialize_version_info): Allocate space for machversion.
-
-Mon May 9 14:32:37 1994 Michael I Bushnell (mib@geech.gnu.ai.mit.edu)
-
- * mgt.c (new_proc): Regard init as having a dead message
- port initially.
-
- * msg.c (S_proc_setmsgport): When init chimes in, tell it
- we are essential.
-
- * proc.h (OUR_VERSION, OUR_SERVER_NAME): New macros.
- * host.c (uname_info, machversion, server_versions,
- nserver_versions, server_version_nalloc): New variables.
- (S_proc_register_version, rebuild_uname, initialize_version_info,
- S_proc_uname): New functions.
- (S_proc_sethostname): Also set uname_info.nodename.
- * main.c (main): Call initialize_version_info.
-
-Fri May 6 13:00:36 1994 Michael I Bushnell (mib@geech.gnu.ai.mit.edu)
-
- * host.c (S_proc_gethostname): If HOSTNAME is null, return
- an empty hostname instead of crashing.
- (S_proc_gethostname): Test buffer length properly; allocate
- space for the null too.
-
- * mgt.c (process_has_exited): delete unused variable LAST.
- * msg.c (check_message_return): delete unused variables I,
- MSGPORTS, and CP. Changed type of second arg to `void *'
- so that the function type is appropriate for the first arg
- to prociterate.
- (check_message_dying): delete unused variable I.
-
- * wait.c, host.c, info.c, mgt.c, notify.c, pgrp.c: Changed MiG
- server stubs' return types from error_t to kern_return_t; the
- types are incompatible right now.
-
-Thu May 5 07:50:24 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
-
- * Makefile: Change uses of $(headers) to $(includedir).
diff --git a/proc/host.c b/proc/host.c
index 0bf292e2..2b3c4f3c 100644
--- a/proc/host.c
+++ b/proc/host.c
@@ -474,6 +474,7 @@ S_proc_register_version (pstruct_t server,
rebuild_uname ();
out:
- mach_port_deallocate (mach_task_self (), credential);
+ if (!err)
+ mach_port_deallocate (mach_task_self (), credential);
return err;
}
diff --git a/proc/info.c b/proc/info.c
index ec072fa5..11625442 100644
--- a/proc/info.c
+++ b/proc/info.c
@@ -426,7 +426,11 @@ S_proc_getprocinfo (struct proc *callerp,
{
err = errno;
if (*flags & PI_FETCH_THREADS)
- munmap (thds, nthreads * sizeof (thread_t));
+ {
+ for (i = 0; i < nthreads; i++)
+ mach_port_deallocate (mach_task_self (), thds[i]);
+ munmap (thds, nthreads * sizeof (thread_t));
+ }
return err;
}
pi_alloced = 1;
@@ -495,6 +499,12 @@ S_proc_getprocinfo (struct proc *callerp,
(task_info_t) &pi->taskevents, &tkcount);
if (err == MACH_SEND_INVALID_DEST)
err = ESRCH;
+ if (err)
+ {
+ /* Something screwy, give up on this bit of info. */
+ *flags &= ~PI_FETCH_TASKEVENTS;
+ err = 0;
+ }
}
for (i = 0; i < nthreads; i++)
@@ -759,3 +769,35 @@ S_proc_get_tty (struct proc *p, pid_t pid,
{
return EOPNOTSUPP; /* XXX */
}
+
+/* Implement proc_getnports as described in <hurd/process.defs>. */
+kern_return_t
+S_proc_getnports (struct proc *callerp,
+ pid_t pid,
+ mach_msg_type_number_t *nports)
+{
+ struct proc *p = pid_find (pid);
+ mach_port_array_t names;
+ mach_msg_type_number_t ncount;
+ mach_port_type_array_t types;
+ mach_msg_type_number_t tcount;
+ error_t err = 0;
+
+ /* No need to check CALLERP here; we don't use it. */
+
+ if (!p)
+ return ESRCH;
+
+ err = mach_port_names (p->p_task, &names, &ncount, &types, &tcount);
+ if (err == KERN_INVALID_TASK)
+ err = ESRCH;
+
+ if (!err) {
+ *nports = ncount;
+
+ munmap (names, ncount * sizeof (mach_port_t));
+ munmap (types, tcount * sizeof (mach_port_type_t));
+ }
+
+ return err;
+}
diff --git a/proc/mgt.c b/proc/mgt.c
index 5373d101..1180c700 100644
--- a/proc/mgt.c
+++ b/proc/mgt.c
@@ -499,7 +499,7 @@ S_proc_exception_raise (mach_port_t excport,
mach_port_destroy (mach_task_self (), thread);
- return 0;
+ return MIG_NO_REPLY;
}
}
diff --git a/proc/notify.c b/proc/notify.c
index 07fc376d..5a112b07 100644
--- a/proc/notify.c
+++ b/proc/notify.c
@@ -41,12 +41,10 @@ do_mach_notify_dead_name (mach_port_t notify,
{
struct proc *p;
- /* Drop gratuitous extra reference that the notification creates. */
- mach_port_deallocate (mach_task_self (), deadport);
-
if (notify == generic_port)
{
check_dead_execdata_notify (deadport);
+ mach_port_deallocate (mach_task_self (), deadport);
return 0;
}
@@ -59,6 +57,7 @@ do_mach_notify_dead_name (mach_port_t notify,
{
process_has_exited (p);
ports_port_deref (p);
+ mach_port_deallocate (mach_task_self (), deadport);
return 0;
}
else
diff --git a/release/ChangeLog b/release/ChangeLog
deleted file mode 100644
index 2874cd9c..00000000
--- a/release/ChangeLog
+++ /dev/null
@@ -1,298 +0,0 @@
-1999-09-07 Thomas Bushnell, BSG <tb@mit.edu>
-
- * SETUP: Also set /servers/password.
-
-1999-07-30 Roland McGrath <roland@baalperazim.frob.com>
-
- * mksmallso, mkemptyso: Files removed. The *.sh files are the source.
-
-1999-05-15 Roland McGrath <roland@baalperazim.frob.com>
-
- * servers.boot: Remove obsolete $(default-pager) tag.
-
-1997-07-22 Miles Bader <miles@gnu.ai.mit.edu>
-
- * rfloppy.copy: Remove hurd/devport.
-
-1997-07-21 Miles Bader <miles@gnu.ai.mit.edu>
-
- * bfloppy1.copy: Compress boot/serverboot again.
- * bfloppy1.grub: Use it.
-
-1997-07-15 Miles Bader <miles@gnu.ai.mit.edu>
-
- * mkfsimage.sh: Let uncompressed images be smaller than the
- maximum size.
-
-1997-07-14 Miles Bader <miles@gnu.ai.mit.edu>
-
- * rfloppy.copy: Add bin/rm.
-
-1997-07-09 Miles Bader <miles@gnu.ai.mit.edu>
-
- * bfloppy1.grub: Use /boot/serverboot uncompressed.
-
- * rfloppy.nss: New file.
- * rfloppy-special.copy: etc/nsswitch.conf.
- * rfloppy.copy: Add sbin/swapon, servers/socket/inet, servers/socket/local.
-
- * bfloppy2.boot: Specify a sync interval of two seconds to avoid
- accumulating tons of memory when doing massive copies.
-
-1997-07-08 Miles Bader <miles@gnu.ai.mit.edu>
-
- * bfloppy2.boot: Renamed from bfloppy1.boot.
- Use ext2fs.static rather than ufs.static.
- * bfloppy2-special.copy: mkdir boot.
- Use bfloppy2.boot rather than bfloppy1.boot.
- * bfloppy1.copy: Don't compress boot/serverboot (grub can't handle it).
-
-1997-07-07 Miles Bader <miles@gnu.ai.mit.edu>
-
- * mkfsimage.sh: Add support for dependency generation.
- * Makefile (floppy-copy, scripts): New variables.
- (DIST_FILES): Use them.
- (boot-floppies): New rule.
- (%.ext2.gz, %.ext2): New rules.
- [$(no_deps) != t]: Include boot floppy dependency files (.f_d).
- (%.ext2.f_d %.ext2.gz.f_d): New rule for generating floppy dep files.
-
-1997-07-03 Miles Bader <miles@gnu.ai.mit.edu>
-
- * rfloppy.copy: Remove bin/ps, lib/libps.so, sbin/fsck.ufs, & sbin/libnss_db*.
-
-1997-06-30 Miles Bader <miles@gnu.ai.mit.edu>
-
- * rfloppy.copy: Add bin/ed, sbin/fdisk.
- * Makefile: Make floppy targets depend on the appropriate .copy files.
-
- * bfloppy1.copy, bfloppy1-special.copy, bfloppy2.copy,
- bfloppy2-special.copy, bfloppy1.grub, bfloppy1.boot: New files.
- * Makefile (bfloppy1.ext2, bfloppy2.ext2): New targets.
-
-1997-06-27 Miles Bader <miles@gnu.ai.mit.edu>
-
- * rfloppy.group, rfloppy.passwd, rfloppy-special.copy: New files.
- * rfloppy.copy: Add etc/protocols & etc/services.
- Put dev & lib at end (since they're big & monotonous).
- * Makefile (rfloppy.ext2.gz): Copy from $(srcdir) using
- rfloppy-special.copy.
-
- * mkfsimage.sh: Get rid of debugging noise.
- Use the tar --same-owner option work around a bug with tar
- not preserving ownership when the current user isn't root.
- Don't pre-touch `makedev's.
-
-1997-06-25 Miles Bader <miles@gnu.ai.mit.edu>
-
- * mkfsimage.sh: Correct parsing of delayed translator specs.
-
-1997-06-24 Miles Bader <miles@gnu.ai.mit.edu>
-
- * mkfsimage.sh: Set the owner of created files. Add --owner option.
- Rename `settrans' copy-op to `copytrans', & implement `settrans'.
- * rfloppy.copy: Add bin/fsysopts, bin/devprobe, bin/vmstat.
- Explicitly specify a translator for servers/socket/1.
- * Makefile (bfloppy.ext2, rfloppy.ext2.gz): Set owner to root.wheel.
- Use $(bfloppy-src) as the source, rather than /.
- (bfloppy-src): New variable.
-
- * mkfsimage.sh: New file.
- * bfloppy.copy, rfloppy.copy, bfloppy-special.copy: New files.
- * Makefile (tool-files): Variable removed.
- (install-tools): Rule removed.
- (bfloppy.ext2, rfloppy.ext2.gz): New rules.
- (dist-files): Include mkfsimage.sh, bfloppy.copy,
- bfloppy-special.copy, rfloppy.copy.
-
-1997-06-19 Miles Bader <miles@gnu.ai.mit.edu>
-
- * bfloppy.boot: New file.
- * tool-Makefile: Trash everything but floppy production rules.
-
-Mon Jun 23 11:47:51 1997 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * INSTALL-binary (STEP I): Tell to use e2os if the filesystem was
- made with Linux.
-
-1997-06-17 Miles Bader <miles@gnu.ai.mit.edu>
-
- * mksmallso, mkemptyso: New files.
- * Makefile (tool-files): add mksmallso & mkemptyso.
-
-Mon Jun 16 11:56:33 1997 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * Makefile (dist-links): Make $(dist-root)/boot/grub and
- $(dist-root)/share/misc. Reported by Marcus G. Daniels
- (marcus@cathcart.sysc.pdx.edu).
-
-Wed Jun 11 12:05:02 1997 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * Makefile (dist-links): Create /servers/exec node.
-
- * servers.boot: Dynamic linker is now `ld.so.1', not `ld.so'.
-
- * menu.lst: Kernel is now `gnumach', not `kernel'.
-
-Tue Jun 10 18:48:10 1997 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * INSTALL-binary (Subroutine): Update location of NetBSD install
- floppies. Also specify to use -P mount option on nfs mount.
-
- * menu.lst: Fix typo in floppy -> hd install.
-
- * Makefile (dist-files): Replace SOURCES.0.0 with SOURCES.0.2.
- (install-dist): Install SOURCES.0.2 instead of SOURCES.0.0.
-
-Mon Jun 9 12:18:50 1997 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * dist-README: Update version number.
- * INSTALL-binary: Likewise. Also added some instructions to help
- Linux users.
-
-Mon May 26 23:03:41 1997 Miles Bader <miles@gnu.ai.mit.edu>
-
- * checklist: Add su, addauth, setauth, ids, & vminfo to list of
- setuid programs.
-
-Wed May 7 15:07:48 1997 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * INSTALL-binary (STEP VI): Suggest building a kernel.
-
-Fri Apr 11 14:21:29 1997 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * SETUP: Comment out frobbing of BOOT_DEV; grub does that on it's
- own now.
- * INSTALL-GRUB-MBR: Delete file.
- * Makefile (dist-files): Omit INSTALL-GRUB-MBR.
- (install-dist): Likewise.
- * menu.lst (title): Replace install entries with new versions.
- * INSTALL-binary (STEP IV): Revised instructions to correspond to
- new reality, with Grub 0.4.
-
-Tue Sep 24 16:47:04 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * servers.boot (/hurd/ufs.static): Change --machdev to -Tdevice.
-
-Tue Sep 17 14:36:39 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * SETUP: Don't prepend `r' to $BOOT_DEV when invoking INSTALL-GRUB-MBR.
-
-Fri Aug 16 10:50:01 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * SETUP: Set `PATH'.
-
-Wed Aug 14 16:23:11 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * tool-Makefile (INSTALL, IMAGE): New variables.
- Change all rules &c to use these variables instead of
- `../hurdinst' and `hurd-image'.
-
-Mon Aug 5 11:44:30 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * SETUP: Put `r' before BOOT_DEV in call to INSTALL-GRUB-MBR.
- Repair syntax of test to see if BOOT_DEV is valid.
-
- * Makefile (dist-links): Use correct pathnames for `ln' commands;
- use -f. Repair touch command to avoid {}.
-
-Wed Jul 31 13:15:38 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * install-stripped (copy/copyattrs): New function.
- (copy/plaincopy, copy/objcopy, copy): Use copyattrs.
-
- * Makefile (install-tools): Copy from the right place. Make the
- installed install-stripped executable.
-
-Tue Jul 30 12:05:54 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * INSTALL-binary: Don't make stupid claims about avoiding use of
- cylinder zero.
-
-Mon Jul 29 14:47:53 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * checklist: Add cc to the list of symlinks to check.
-
-Thu Jul 25 23:22:47 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * checklist: Add vmstat to the list of setuid programs.
-
-Thu Jul 18 18:27:14 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * SETUP: Install grub with INSTALL-GRUB-MBR if desired.
-
- * INSTALL-GRUB-MBR: Fix quoting in last echo.
-
-Wed Jul 17 00:17:05 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * INSTALL-binary: Yet more changes.
-
-Tue Jul 16 23:41:09 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * Makefile (dist-files): boot-menu.grub -> menu.lst.
- (install-dist): Likewise; also put it in /boot/grub and don't
- bother with link in /etc.
- * menu.lst: Renamed from boot-menu.grub.
-
-Mon Jul 15 17:18:05 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * INSTALL-binary: Many changes.
-
- * boot-menu.grub: Rewritten; much nicer now.
-
-Mon Jul 15 15:58:46 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * INSTALL-GRUB-MBR: Only read first block of disk as mbr.
- "in)" -> "in".
-
- (INSTALL-GRUB-MBR): New file.
- * Makefile (dist-files): Add INSTALL-GRUB-MBR.
- (install-dist): Install INSTALL-GRUB-MBR.
-
-Sun Jul 14 20:21:12 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * servers.boot: That's STATIC ufs.
-
-Sat Jul 13 18:06:03 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * SETUP: Make ptys too.
-
- * SETUP: Setup /servers/crash too.
-
- * COPYING.LIB: New file.
- * Makefile (install-dist): Install COPYING.LIB and COPYING.
- Fix commands to install most everything from $(srcdir).
-
- * boot-menu.grub: New file.
- * servers.boot: New file.
- * Makefile (dist-files): Add servers.boot and boot-menu.grub.
- (install-dist): Install servers.boot and boot-menu.grub.
- (dist-links): Create $(dist-root)/boot.
-
- * INSTALL-binary: Various changes.
-
-Fri Jul 12 15:18:25 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * install-stripped (makelocalhardlink): Only do cleverness if TO
- already exists. If it's not there, just make the link.
-
-Tue Jul 9 20:10:21 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * INSTALL-binary: Changed.
-
-Tue Jul 9 18:03:45 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * INSTALL-binary: Various changes.
-
- * Makefile (install-dist): Depend on dist-links.
- (dist-links): New target.
-
- * SETUP: Put pflocal on /servers/socket/local (which will be a
- link to /servers/socket/1).
-
- * SETUP: Set root writable before doing anything else; offer to
- reboot the system when through.
-
-Mon Jul 8 17:47:58 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * INSTALL-binary: Various changes.
diff --git a/release/SOURCES.0.0 b/release/SOURCES.0.0
index 1f561ad6..673f8dd1 100644
--- a/release/SOURCES.0.0
+++ b/release/SOURCES.0.0
@@ -107,5 +107,5 @@ sh-utils (1.12m from alpha.gnu.ai.mit.edu)
[ copy libc's time/strftime.c into lib/strftime.c to fix a date bug. ]
make (3.74.5 from alpha.gnu.ai.mit.edu; unmodified)
gdb (Modified from Cygnus snapshot of 960526)
-mach4 (UK22, slighly hacked) [already includes `serverboot' program.]
+mach4 (UK22, slightly hacked) [already includes `serverboot' program.]
libc (1.93, with modifications)
diff --git a/release/mkfsimage.sh b/release/mkfsimage.sh
index 181928f8..07b142f0 100644
--- a/release/mkfsimage.sh
+++ b/release/mkfsimage.sh
@@ -75,7 +75,7 @@ while :; do
--help Display this help and exit
--version Output version information and exit
-If multiple SRCs are specified, then each occurance of --files pertains only to
+If multiple SRCs are specified, then each occurrence of --files pertains only to
the corresponding SRC.
Each FILE named in a --copy-rules option contains lines of the form:
@@ -83,8 +83,8 @@ Each FILE named in a --copy-rules option contains lines of the form:
[gzip] [rename TARGET] COPY-OP NAME
and says to copy NAME from the source tree to the destination, using the
-method specified by COPY-OP. A preceeding "\`"rename TARGET"\'" says to give
-NAME a different name in the target tree, and a preceeding "\`"gzip"\'" says
+method specified by COPY-OP. A preceding "\`"rename TARGET"\'" says to give
+NAME a different name in the target tree, and a preceding "\`"gzip"\'" says
to compress the result (appending .gz to the name). COPY-OP may be one of the
following:
diff --git a/release/servers.boot b/release/servers.boot
index 3e1895de..9ba7f6a4 100644
--- a/release/servers.boot
+++ b/release/servers.boot
@@ -3,7 +3,8 @@
# First, the bootstrap filesystem. It needs several ports as arguments,
# as well as the user flags from the boot loader.
-/hurd/ufs.static --bootflags=${boot-args} --host-priv-port=${host-port} --device-master-port=${device-port} --exec-server-task=${exec-task} -Tdevice ${root-device} $(task-create) $(task-resume)
+/hurd/ext2fs.static --multiboot-command-line=${kernel-command-line} --host-priv-port=${host-port} --device-master-port=${device-port} --exec-server-task=${exec-task} -T typed ${root} $(task-create) $(task-resume)
+
# Now the exec server; to load the dynamically-linked exec server program,
# we have the boot loader in fact load and run ld.so, which in turn
@@ -11,6 +12,3 @@
# in ${exec-task} to be passed to the fs above, but it is left suspended;
# the fs will resume the exec task once it is ready.
/lib/ld.so.1 /hurd/exec $(exec-task=task-create)
-
-# default pager
-/dev/sd0b $(add-paging-file)
diff --git a/serverboot/ChangeLog b/serverboot/ChangeLog
deleted file mode 100644
index 8dc836cc..00000000
--- a/serverboot/ChangeLog
+++ /dev/null
@@ -1,473 +0,0 @@
-2007-06-06 Thomas Schwinge <tschwinge@gnu.org>
-
- * default_pager.c (default_pager_object_create, default_pager_info)
- (default_pager_objects, default_pager_object_pages)
- (default_pager_object_set_size, default_pager_paging_file): Rename to
- `S_default_pager_object_create', `S_default_pager_info',
- `S_default_pager_objects', `S_default_pager_object_pages',
- `S_default_pager_object_set_size' and `S_default_pager_paging_file'.
-
-2006-03-15 Alfred M. Szmidt <ams@gnu.org>
-
- * kalloc.c: #include <malloc.h>.
- (init_hook, malloc_hook, free_hook): New functions.
- (__malloc_initialize_hook): New variable.
- (malloc, free): Functions removed.
-
-2003-05-07 Ognyan Kulev <ogi@fmi.uni-sofia.bg>
-
- * strfcns.c: #include <stdarg.h> instead of <varargs.h>.
- (strbuild): Use <stdarg.h>-style for handling variable argument
- list.
- * load.c: Don't #include <varargs.h>.
-
-2002-07-03 Roland McGrath <roland@frob.com>
-
- * elf-load.c (exec_load): Fix e_machine checking.
-
- * elf-load.c (exec_load): Fix typos in last change.
-
-2002-06-22 Roland McGrath <roland@frob.com>
-
- * load.c (boot_script_exec_cmd): Twiddle decls of serverboot_bunzip2
- and serverboot_gunzip.
-
- * elf-load.c (exec_load) [__alpha__]: Grok Elf64_* headers and check
- for EM_ALPHA.
- * exec.c (set_regs) [__alpha__]: Alpha implementation snarfed from CMU
- file bootstrap/alpha/exec.c in MK83a.
-
- * load.c (boot_script_exec_cmd): Cast int to intptr_t before char *.
-
-2002-06-14 Roland McGrath <roland@frob.com>
-
- * default_pager.c: #include "default_pager_S.h"
-
-2002-05-29 Roland McGrath <roland@frob.com>
-
- * bootstrap.c (main): int -> integer_t for boot_script values.
-
-2002-05-23 Marcus Brinkmann <marcus@gnu.org>
-
- * Makefile: Fix last change properly, by relaxing the rule again
- and adding our source dir before the exec dir.
-
-2002-05-23 Marcus Brinkmann <marcus@gnu.org>
-
- * Makefile: Fix last change, constraining vpath even further.
-
-2002-05-20 Ognyan Kulev <ogi@fmi.uni-sofia.bg>
-
- * Makefile: Move inclusion of ../Makeconf before using $(srcdir)
- and constrain vpath directives to avoid using ../exec/exec.o.
-
-2002-05-07 Roland McGrath <roland@frob.com>
-
- * default_pager.c (part_id): Add const to argument type.
-
-2002-03-23 Roland McGrath <roland@frob.com>
-
- Excised default pager functionality from serverboot.
- * Makefile (SRCS): Move def_pager_setup.c default_pager.c kalloc.c to
- (EXTRA_DIST): ... here.
- (OBJS): Remove *Server.o from here.
- (MIGSFLAGS): Variable removed.
- * bootstrap.c (main): Replace paging-file boot-script functions with a
- stub that prints an error. No longer call partition_init,
- default_pager_initialize, or default_pager.
- (default_pager_bootstrap_port): Variable removed.
- (main): Don't use it.
- (default_pager_exception_port): Declaration removed.
- (main): Don't use it.
- * default_pager.c (default_pager_bootstrap_port): Variable removed.
- (default_pager_demux_default): Don't use it.
- (default_pager_initialize): Likewise.
- (default_pager): Likewise.
- (do_bootstrap_privileged_ports, bootstrap_compat): Functions removed.
- [mips] (set_ras_address): Likewise.
-
- * default_pager.c (pager_truncate): New function.
- (struct dpager): New member `limit'.
- (pager_alloc): Initialize it.
- (default_pager_object_set_size): New function.
- (seqnos_memory_object_lock_completed): Rewritten, no longer a stub.
- (default_pager_demux_object): Try default_pager_server too.
-
-2001-11-24 Roland McGrath <roland@frob.com>
-
- * Makefile (installationdir): Use $(bootdir).
-
-2001-08-16 Roland McGrath <roland@frob.com>
-
- * Makefile (OBJS): Add userland-boot.o here.
- Add a vpath to find userland-boot.c in boot/ too.
- * bootstrap.c (parse_script): Pass new arg to boot_script_parse_line.
- * load.c: Include <stddef.h> before "boot_script.h".
-
-2001-07-20 Roland McGrath <roland@frob.com>
-
- * panic.c: Fix obsolescent #endif syntax.
- * ext2_file_io.c: Likewise.
- * disk_inode_ffs.h: Likewise.
- * ffs_file_io.c: Likewise.
-
-2001-03-31 Roland McGrath <roland@frob.com>
-
- * assert.h: Fix obsolescent #endif syntax.
- * default_pager.c: Likewise.
- * queue.h: Likewise.
- * load.c: Likewise.
-
-2001-02-28 Roland McGrath <roland@frob.com>
-
- * default_pager.c: Use <file_io.h> instead of "file_io.h",
- so mach-defpager gets its own version when it uses this source file.
- (new_partition): If CHECK_LINUX_SIGNATURE arg is -3, don't print out.
-
-2001-01-11 Marcus Brinkmann <marcus@gnu.org>
-
- * def_pager_setup.c: Include <mach/mig_errors.h> and
- <mach/default_pager_types.h>.
- (default_pager_paging_storage): New stub.
-
-2000-04-03 Roland McGrath <roland@baalperazim.frob.com>
-
- * panic.c: Include <stdarg.h> instead of <varargs.h>.
- (panic): Use stdarg style.
-
-2000-01-03 Roland McGrath <roland@baalperazim.frob.com>
-
- * file_io.h: Include "../ext2fs/ext2_fs.h" instead of "ext2_fs.h".
- * ext2_file_io.c (search_directory): Use `struct ext2_dir_entry_2' in
- place of `struct ext2_dir_entry', so as to grok newer dir formats.
- * ext2_fs.h: File removed.
- * Makefile (LCLHDRS): Remove it from the list.
- * ffs_compat.c (EXT2_INODES_PER_BLOCK): New macro, no longer in
- ext2_fs.h.
-
-1999-11-18 Roland McGrath <roland@baalperazim.frob.com>
-
- * default_pager.c (default_pager): Instead of suspending this thread,
- just become the default_pager_default_thread thread ourselves.
-
- * wiring.c (wire_all_memory): Touch pages before wiring.
-
-1999-11-16 Roland McGrath <roland@baalperazim.frob.com>
-
- * default_pager.c (default_pager_initialize): Use MACH_PORT_VALID to
- check old DMM port, rather than just checking for MACH_PORT_NULL.
-
- * strfcns.c (index): Function removed.
-
- * ffs_file_io.c (ffs_open_file): Use memmove instead of ovbcopy.
- * ext2_file_io.c (ext2_open_file): Likewise.
- * strfcns.c (ovbcopy): Function removed.
-
-1999-11-08 Roland McGrath <roland@baalperazim.frob.com>
-
- * bootstrap.c (main): Further spruce up prompting and error reporting
- for root device and boot script.
-
-1999-10-28 Roland McGrath <roland@baalperazim.frob.com>
-
- * load.c, bootstrap.c: Back out some debugging printfs accidentally
- included in the last commit.
- * bootstrap.c (main): Increase size of NEW_ROOT buffer.
- This change was included in the last commit, but not logged then.
-
- * file_io.h: Include <errno.h>.
- (FS_* macros): Define these to equivalent errno codes.
- * def_pager_setup.c (add_paging_file): Put strerror of result code in
- error messages.
- * bootstrap.c (parse_script): Likewise.
- * load.c (boot_script_exec_cmd): Include NAMEBUF in error messages,
- and use strerror to format result code.
- * panic.c (panic): Use program_invocation_name in message.
-
-1999-10-08 Thomas Bushnell, BSG <tb@mit.edu>
-
- * bootstrap.c: (DEFAULT_ROOT): Remove macro.
- (main): If no root device was specified, then prompt as if the
- user had specified -a. Don't use strcpy to move NEW_ROOT into
- ROOT_NAME; that's unsafe.
-
-1999-10-06 Roland McGrath <roland@baalperazim.frob.com>
-
- * bootstrap.c (DEFAULT_ROOT): Change to "hd0s1".
-
-1999-08-20 Roland McGrath <roland@baalperazim.frob.com>
-
- * bootstrap.c (parse_script): Add one to the buffer size so we can
- null-terminate after the end of the file.
-
-1999-07-20 Roland McGrath <roland@baalperazim.frob.com>
-
- * ext2_file_io.c, ffs_file_io.c, minix_file_io.c: Remove fs-specific
- routines *_page_{read,write}_file_direct. Moved to ...
- * file_io.c (page_read_file_direct, page_write_file_direct): Don't
- call fs-specific routine, these are not fs-specific. Instead,
- replaced with former fs-specific routines (which were all identical).
- Read and write more than a fs block when disk blocks are contiguous.
-
- * default_pager.c (new_partition): When reading Linux signature page,
- handle pager_read_file_direct returning sub-page blocks.
-
-1999-06-03 Mark Kettenis <kettenis@gnu.org>
-
- * default_pager.c (new_partition): Declare `waste' as `int'
- instead of `unsigned int'.
-
-1999-06-02 Roland McGrath <roland@baalperazim.frob.com>
-
- * load.c (boot_script_exec_cmd): Copy environment from our `environ'
- onto the new task's stack along with its arguments.
-
- * bootstrap.c (main): If we have a MULTIBOOT_CMDLINE environment
- variable, set its value as ${kernel-command-line} for boot scripts.
-
-1999-05-29 Roland McGrath <roland@baalperazim.frob.com>
-
- * bootstrap.c (main): Define $(serverboot) function for "serverboot
- controls", control command replacing the pathname. For command "die",
- terminate ourselves after running the boot script, no default pager.
-
-1999-05-23 Roland McGrath <roland@baalperazim.frob.com>
-
- * default_pager.c (new_partition): Fix arg order in printf for
- linux-2.2 signature page.
-
-1999-05-20 Roland McGrath <roland@baalperazim.frob.com>
-
- * default_pager.c (new_partition): Fix SWAP-SPACE page handling.
-
-1999-05-17 Roland McGrath <roland@baalperazim.frob.com>
-
- * default_pager.c (new_partition): Deallocate signature page when
- rejecting it for wrong version. Fix typo in SWAPSPACE2 v1 bad block
- bitmap handling. Free bitmap and partition structure if we reject the
- partition signature.
- Reported by Kalle Olavi Niemitalo <tosi@ees2.oulu.fi>.
-
- * default_pager.c (new_partition): Print out for
- CHECK_LINUX_SIGNATURE<0 case.
-
-1999-05-15 Roland McGrath <roland@baalperazim.frob.com>
-
- * default_pager.c (new_partition): Check if requested partition is
- already in our list, and refuse it.
-
- * bootstrap.c (main): Remove vars HAD_A_PARITION, DOING_DEFAULT_PAGER.
- Remove $(default-pager) boot script tag. We always stick around and
- act as the default pager (this was already the case, just removed some
- dead code). Don't print anything about having no swap partitions,
- since that is a fine way to boot (just use swapon later).
-
- * default_pager.c (new_partition): Print out partition name and size
- when no signature.
-
-1998-09-06 OKUJI Yoshinori <okuji@kuicr.kyoto-u.ac.jp>
-
- * bunzip2.c: New file.
- * load.c (GZIP) (BZIP2): New cpp constants.
- (boot_script_exec_cmd): If GZIP is defined, gunzip engine is enabled.
- If BZIP2 is defined, bunzip2 engine is enabled.
- * Makefile (SRCS): Add bunzip2.c.
- (UNZIP_OBJS): Add do-bunzip2.o.
- (CPPFLAGS): Add -DGZIP, -DBZIP2 and -DSMALL_BZIP2.
-
-1998-09-03 OKUJI Yoshinori <okuji@kuicr.kyoto-u.ac.jp>
-
- * gunzip.c: New file.
- Copy libstore/gunzip.c and modify for use in serverboot.
- * load.c (struct stuff): Add members, image_addr and image_size.
- (mem_read) (mem_read_exec): New functions.
- (boot_script_exec_cmd): Add gzexe feature.
- * Makefile: Add unzip stuffs.
-
-1999-03-06 Roland McGrath <roland@baalperazim.frob.com>
-
- * def_pager_setup.c (default_pager_setup): #if 0 out unused function.
-
- * default_pager.c (default_pager_paging_file): Pass 0 for new
- LINUX_SIGNATURE arg to add_paging_file.
-
- * bootstrap.c (main: scrript_paging_file): Pass LINUX_SIGNATURE arg
- through to add_paging_file.
-
-1999-02-27 Roland McGrath <roland@baalperazim.frob.com>
-
- * def_pager_setup.c (add_paging_file): New arg CHECK_LINUX_SIGNATURE,
- pass down to create_paging_partition.
- * default_pager.c (create_paging_partition): New arg
- CHECK_LINUX_SIGNATURE, pass down new_partition.
- (new_partition): New arg CHECK_LINUX_SIGNATURE: if not < 0,
- check first page of swap for Linux 2.0 or 2.2 signature page and obey
- its bad-block map; if > 0, refuse the partition if no signature found.
- * bootstrap.c (main): Add new boot script functions
- `add-raw-paging-file', `add-linux-paging-file'. Make those
- and `add-paging-file' all call add_paging_file with new
- LINUX_SIGNATURE arg of -1, 1, and 0, respectively.
- * default_pager.c (create_paging_partition): If new_partition returns
- null, return and do nothing more.
-
-1998-07-25 Roland McGrath <roland@baalperazim.frob.com>
-
- * default_pager.c (pager_read_offset): Cast NO_BLOCK twice, to real
- return type of this function.
-
-Tue May 12 12:11:36 1998 Thomas Bushnell, n/BSG <tb@mit.edu>
-
- * bootstrap.c (parse_script): Free BUF before returning. Reported
- by Katusya Tanaka (wyvern@pb3.so-net.ne.jp).
-
-1997-07-15 Miles Bader <miles@gnu.ai.mit.edu>
-
- * bootstrap.c (main): Rearrange default pager initialization.
-
- * bootstrap.c (safe_gets): Use strchr instead of index.
- : Include <string.h>
-
- * bootstrap.c (main): Change "(bootstrap)" to "(serverboot)" in msgs.
- * load.c (boot_script_exec_cmd): Likewise.
-
-1997-07-09 Miles Bader <miles@gnu.ai.mit.edu>
-
- * bootstrap.c (main): Don't exit when no paging partition.
-
-1997-07-08 Miles Bader <miles@gnu.ai.mit.edu>
-
- * bootstrap.c: Don't include "translate_root.h".
- (main): Don't call translate_root.
- Pass more than a single character to safe_gets.
- (DEFAULT_ROOT): New macro.
- (safe_gets): Make sure a newline exists before removing it.
- Ensure that the cursor moves to the beginning of the next line.
- * translate_root.c, translate_root.h: Files removed.
- * Makefile (SRCS): Remove translate_root.c.
- (LCLHDRS): Remove translate_root.h.
-
-Fri Jun 20 15:37:15 1997 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * bootstrap.c (main/script_paging_file): Instead of returning an
- error use new variable `had_a_partition' to record whether we
- successfully opened a partition.
- (main/script_default_pager): Only start pager if HAD_A_PARTITION;
- otherwise print warning message.
-
-Mon Jun 16 11:52:40 1997 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * Makefile (installationdir): Use `=' to set this instead of :=;
- $(prefix) is not yet available and `=' postpones the evaluation
- properly. Reported by Marcus G. Daniels,
- marcus@cathcart.sysc.pdx.edu.
-
-Tue Jun 10 21:54:52 1997 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * disk_inode.h (struct icommon): Use short instead of uid_t/gid_t
- in structure definition; those are now 32 bit types.
-
- * bootstrap.c (main): Support running from command line too; this
- is useful at least for simple debugging.
-
-1997-06-09 Miles Bader <miles@gnu.ai.mit.edu>
-
- * Makefile (LCLHDRS): Add mach-exec.h.
-
-Thu May 1 18:40:53 1997 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * bootstrap.c (cthread_stack_size): Don't set special value here;
- use the default.
-
-Wed Apr 30 12:01:53 1997 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * default_pager.c (default_pager_default_thread): Now that this is
- forked, rather than run directly by the first thread, we have to
- gain kernel privileges to acquire reserved pages.
-
-Fri Apr 18 16:44:49 1997 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * wiring.c (__vm_allocate): New function.
-
-Wed Apr 16 14:18:28 1997 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * default_pager.c (debug): Turn off.
-
-Mon Apr 14 12:50:20 1997 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * default_pager.c: Remove debugging printfs.
-
-Thu Apr 10 15:10:25 1997 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * Makefile (installationdir): Set variable.
-
-Wed Apr 9 13:57:44 1997 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * default_pager.c (default_pager_default_thread): New function.
- Delete old variable with this name, it was never used.
- (default_pager): Fork default_pager_default_thread instead of
- doing it here to avoid the possibility that we are on a tiny
- stack. Current thread dies.
-
-Thu Apr 3 20:00:58 1997 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * elf-load.c (exec_load): Include <elf.h> instead of
- <mach/exec/elf.h>. Include "mach-exec.h" instead of
- <mach/exec/elf.h>.
- (exec_load) [i386]: Check for i386 types directly; abandon old
- MY_EI_DATA and MY_E_MACHINE.
- * load.c: Include "mach-exec.h" instead of <mach/exec/elf.h>.
- * exec.c: Likewise.
- * mach-exec.h: New file.
-
-Wed Mar 19 14:45:27 1997 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * panic.c (panic): Clear possible errors on stdout before printing
- panic string.
-
-Mon Mar 17 13:13:50 1997 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * wiring.c (wire_all_memory): Don't attempt wire if PROTECTION is
- VM_PROT_NONE.
-
- * panic.c (panic): Be more informative about where the error is
- coming from.
-
- * default_pager.c (create_paging_partition): Don't print
- gratuitous output noise.
- * load.c (boot_script_exec_cmd): Likewise.
-
-Wed Mar 12 10:53:00 1997 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * ext2_file_io.c (ext2_open_file): Clear FP before beginning
- work.
- * ffs_file_io.c (ffs_open_file): Likewise.
- * minix_file_io.c (minix_open_file): Likewise.
-
- * bootstrap.c (printf_init, safe_gets): New functions.
- * console.c: Deleted file.
- * Makefile (SRCS): Omit console.c and gets.c.
-
- * load.c (read_symtab_from_file): Comment out body of function.
- We don't want this.
-
- * defs.h: Comment out redefinitions of common types.
-
- * default_pager.c: Include <cthreads.h> instead of
- <mach/cthreads.h>.
- * file_io.h: Likewise.
- * kalloc.c: Likewise.
-
- * panic.c: Include <varargs.h> instead of <sys/varargs.h>.
-
- * default_pager.c (pager_read_offset): Cast return of NO_BLOCK
- properly.
-
-Mon Mar 10 17:07:50 1997 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * load.c: Find boot_script.h in ../boot.
- * bootstrap.c: Likewise.
-
- * bootstrap.c (boot_panic): Repair syntax.
-
- * strfcns.c: Include <varargs.h> instead of <sys/varargs.h>.
- * load.c: Likewise.
diff --git a/serverboot/Makefile b/serverboot/Makefile
deleted file mode 100644
index 653d5963..00000000
--- a/serverboot/Makefile
+++ /dev/null
@@ -1,53 +0,0 @@
-# Copyright (C) 1997,99,2001,02 Free Software Foundation, Inc.
-# This file is part of the GNU Hurd.
-#
-# The GNU Hurd is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# The GNU Hurd is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with the GNU Hurd; see the file COPYING. If not, write to
-# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
-
-dir := serverboot
-makemode := utility
-
-SRCS = bootstrap.c ffs_compat.c load.c wiring.c \
- ffs_file_io.c minix_ffs_compat.c file_io.c \
- minix_file_io.c ext2_file_io.c strfcns.c exec.c \
- panic.c elf-load.c gunzip.c bunzip2.c
-LCLHDRS = assert.h disk_inode_ffs.h fs.h queue.h defs.h \
- minix_ffs_compat.h wiring.h dir.h ffs_compat.h minix_fs.h \
- disk_inode.h file_io.h minix_super.h mach-exec.h
-EXTRA_DIST = def_pager_setup.c default_pager.c kalloc.c
-target = serverboot
-HURDLIBS = threads
-installationdir = $(bootdir)
-
-UNZIP_OBJS = unzip.o inflate.o util.o do-bunzip2.o
-OBJS = $(subst .c,.o,$(SRCS)) \
- boot_script.o userland-boot.o \
- $(UNZIP_OBJS)
-
-include ../Makeconf
-
-vpath boot_script.c $(srcdir)/../boot
-vpath userland-boot.c $(srcdir)/../boot
-
-# Look for zip stuff
-vpath %.c $(srcdir) $(srcdir)/../exec
-
-# If SMALL_BZIP2 is defined, use relatively small memory.
-# It's crucial for serverboot, because swap is not enabled yet.
-CPPFLAGS += -I$(srcdir)/../exec -DGZIP -DBZIP2 -DSMALL_BZIP2
-
-LDFLAGS += -static
-
-# Don't even bother.
-CFLAGS := $(filter-out -Wall,$(CFLAGS))
diff --git a/serverboot/assert.h b/serverboot/assert.h
deleted file mode 100644
index 9f70aec3..00000000
--- a/serverboot/assert.h
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Mach Operating System
- * Copyright (c) 1991,1990,1989,1988,1987 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.
- */
-
-#ifndef _ASSERT_H_
-#define _ASSERT_H_
-
-#ifdef ASSERTIONS
-extern void Assert();
-
-#define assert(ex) \
- do { \
- if (!(ex)) \
- Assert(__FILE__, __LINE__); \
- } while (0)
-
-#ifdef lint
-#define assert_static(x)
-#else /* lint */
-#define assert_static(x) assert(x)
-#endif /* lint */
-
-#else /* ASSERTIONS */
-#define assert(ex)
-#define assert_static(ex)
-#endif /* ASSERTIONS */
-
-#endif /* _ASSERT_H_ */
diff --git a/serverboot/bootstrap.c b/serverboot/bootstrap.c
deleted file mode 100644
index 64f7c5eb..00000000
--- a/serverboot/bootstrap.c
+++ /dev/null
@@ -1,438 +0,0 @@
-/*
- * Mach Operating System
- * Copyright (c) 1992,1991,1990,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
- * 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 the
- * rights to redistribute these changes.
- */
-/*
- * Bootstrap the various built-in servers.
- */
-
-#include <mach.h>
-#include <mach/message.h>
-#include <sys/reboot.h>
-
-#include <file_io.h>
-
-#include <stdio.h>
-#include <string.h>
-
-#include "../boot/boot_script.h"
-
-#if 0
-/*
- * Use 8 Kbyte stacks instead of the default 64K.
- * Use 4 Kbyte waiting stacks instead of the default 8K.
- */
-#if defined(alpha)
-vm_size_t cthread_stack_size = 16 * 1024;
-#else
-vm_size_t cthread_stack_size = 8 * 1024;
-#endif
-#endif
-
-extern
-vm_size_t cthread_wait_stack_size;
-
-mach_port_t bootstrap_master_device_port; /* local name */
-mach_port_t bootstrap_master_host_port; /* local name */
-
-int boot_load_program();
-
-char *root_name;
-char boot_script_name[MAXPATHLEN];
-
-extern void default_pager();
-extern void default_pager_initialize();
-extern void default_pager_setup();
-
-/*
- * Convert ASCII to integer.
- */
-int atoi(str)
- register const char *str;
-{
- register int n;
- register int c;
- int is_negative = 0;
-
- n = 0;
- while (*str == ' ')
- str++;
- if (*str == '-') {
- is_negative = 1;
- str++;
- }
- while ((c = *str++) >= '0' && c <= '9') {
- n = n * 10 + (c - '0');
- }
- if (is_negative)
- n = -n;
- return (n);
-}
-
-__main ()
-{
-}
-
-static void
-boot_panic (kern_return_t err)
-{
-#define PFX "bootstrap: "
- char *err_string = boot_script_error_string (err);
- char panic_string[strlen (err_string) + sizeof (PFX)];
- strcpy (panic_string, PFX);
- strcat (panic_string, err_string);
- panic (panic_string);
-#undef PFX
-}
-
-void
-safe_gets (char *str, int maxlen)
-{
- char *c = fgets (str, maxlen, stdin);
- if (c == 0) {
- perror ("fgets");
- panic ("cannot read from console");
- }
- c = strchr (c, '\n');
- if (c)
- *c = '\0';
- printf ("\r\n");
-}
-
-printf_init (device_t master)
-{
- mach_port_t cons;
- kern_return_t rc;
- rc = device_open (master, D_READ|D_WRITE, "console", &cons);
- if (rc)
- while (1) {
- volatile int x = 0;
- (void) host_reboot(bootstrap_master_host_port, RB_DEBUGGER);
- x = x / x;
- }
- stdin = mach_open_devstream (cons, "r");
- stdout = stderr = mach_open_devstream (cons, "w");
- mach_port_deallocate (mach_task_self (), cons);
- setbuf (stdout, 0);
-}
-
-/*
- * Bootstrap task.
- * Runs in user spacep.
- *
- * Called as 'boot -switches host_port device_port root_name'
- *
- */
-main(argc, argv)
- int argc;
- char **argv;
-{
- int die = 0;
- int script_paging_file (const struct cmd *cmd, integer_t *val)
- {
- printf ("*** paging files no longer supported in boot scripts ***\n\a"
- "*** use swapon %s and/or /etc/fstab instead ***\n",
- cmd->path);
- return 0;
- }
- int script_serverboot_ctl (const struct cmd *cmd, integer_t *val)
- {
- const char *const ctl = cmd->path;
- if (!strcmp (ctl, "die"))
- die = 1;
- else
- printf ("(serverboot): Unknown control word `%s' ignored\n", ctl);
- return 0;
- }
-
- void prompt_for_root ()
- {
- static char new_root[MAXPATHLEN/2];
-
- if (!root_name)
- root_name = "UNKNOWN";
- printf ("Root device name? [%s] ", root_name);
- safe_gets(new_root, sizeof(new_root));
-
- if (new_root[0] != '\0') {
- root_name = new_root;
- (void) strbuild(boot_script_name,
- "/dev/",
- root_name,
- "/boot/servers.boot",
- (char *)0);
- }
- }
-
- register kern_return_t result;
- struct file scriptf;
-
- task_t my_task = mach_task_self();
-
- char *flag_string;
-
- boolean_t ask_boot_script = 0;
- boolean_t ask_root_name = 0;
-
- /*
- * Use 4Kbyte cthread wait stacks.
- */
- cthread_wait_stack_size = 4 * 1024;
-
- /*
- * Arg 1 is flags
- */
- if (argv[1][0] != '-')
- panic("bootstrap: no flags");
-
- flag_string = argv[1];
-
- /*
- * Parse the arguments.
- */
- if (argc >= 5)
- {
- /*
- * Arg 0 is program name
- */
-
- /*
- * Arg 2 is host port number
- */
- bootstrap_master_host_port = atoi(argv[2]);
-
- /*
- * Arg 3 is device port number
- */
- bootstrap_master_device_port = atoi(argv[3]);
-
- /*
- * Arg 4 is root name
- */
- root_name = argv[4];
- }
- else if (argc == 3)
- {
- root_name = argv[2];
-
- get_privileged_ports (&bootstrap_master_host_port,
- &bootstrap_master_device_port);
- }
-
- printf_init(bootstrap_master_device_port);
-#ifdef pleasenoXXX
- panic_init(bootstrap_master_host_port);
-#endif
-
-
- /*
- * If the '-a' (ask) switch was specified, or if no
- * root device was specificed, ask for the root device.
- */
-
- if (!root_name || root_name [0] == '\0' || index(flag_string, 'a'))
- prompt_for_root ();
-
- (void) strbuild(boot_script_name,
- "/dev/",
- root_name,
- "/boot/servers.boot",
- (char *)0);
- /*
- * If the '-q' (query) switch was specified, ask for the
- * server boot script.
- */
-
- if (index(flag_string, 'q'))
- ask_boot_script = TRUE;
-
- while (TRUE) {
- if (ask_root_name)
- prompt_for_root ();
-
- if (ask_boot_script) {
- char new_boot_script[MAXPATHLEN];
-
- printf("Server boot script? [%s] ", boot_script_name);
- safe_gets(new_boot_script, sizeof(new_boot_script));
- if (new_boot_script[0] != '\0')
- strcpy(boot_script_name, new_boot_script);
- }
-
- result = open_file(bootstrap_master_device_port,
- boot_script_name,
- &scriptf);
- if (result == D_NO_SUCH_DEVICE)
- {
- printf ("Root device `%s' does not exist!\n", root_name);
- ask_root_name = ask_boot_script = TRUE;
- continue;
- }
- else
- ask_root_name = FALSE;
- if (result != 0) {
- printf("Can't open server boot script %s: %s\n",
- boot_script_name,
- strerror (result));
- ask_boot_script = TRUE;
- continue;
- }
- break;
- }
-
- /*
- * If the server boot script name was changed,
- * then use the new device name as the root device.
- */
- {
- char *dev, *end;
- int len;
-
- dev = boot_script_name;
- if (strncmp(dev, "/dev/", 5) == 0)
- dev += 5;
- end = strchr(dev, '/');
- len = end ? end-dev : strlen(dev);
- memcpy(root_name, dev, len);
- root_name[len] = 0;
- }
-
- {
- char *cmdline;
-
- /* Initialize boot script variables. */
- if (boot_script_set_variable ("host-port", VAL_PORT,
- (integer_t) bootstrap_master_host_port)
- || boot_script_set_variable ("device-port", VAL_PORT,
- (integer_t) bootstrap_master_device_port)
- || boot_script_set_variable ("root-device", VAL_STR,
- (integer_t) root_name)
- || boot_script_set_variable ("boot-args", VAL_STR,
- (integer_t) flag_string)
- || boot_script_define_function ("add-paging-file", VAL_NONE,
- &script_paging_file)
- || boot_script_define_function ("add-raw-paging-file", VAL_NONE,
- &script_paging_file)
- || boot_script_define_function ("add-linux-paging-file",
- VAL_NONE,
- &script_paging_file)
- || boot_script_define_function ("serverboot",
- VAL_NONE,
- &script_serverboot_ctl)
- )
- panic ("bootstrap: error setting boot script variables");
-
- cmdline = getenv ("MULTIBOOT_CMDLINE");
- if (cmdline != NULL
- && boot_script_set_variable ("kernel-command-line",
- VAL_STR,
- (integer_t) cmdline))
- panic ("bootstrap: error setting boot script variables");
-
- parse_script (&scriptf);
- close_file (&scriptf);
- }
-
- if (index (flag_string, 'd'))
- {
- char xx[5];
- printf ("Hit return to boot...");
- safe_gets (xx, sizeof xx);
- }
-
- result = boot_script_exec ();
-
- if (result)
- boot_panic (result);
-
-#if 0
- {
- /*
- * Delete the old stack (containing only the arguments).
- */
- vm_offset_t addr = (vm_offset_t) argv;
-
- vm_offset_t r_addr;
- vm_size_t r_size;
- vm_prot_t r_protection, r_max_protection;
- vm_inherit_t r_inheritance;
- boolean_t r_is_shared;
- memory_object_name_t r_object_name;
- vm_offset_t r_offset;
- kern_return_t kr;
-
- r_addr = addr;
-
- kr = vm_region(my_task,
- &r_addr,
- &r_size,
- &r_protection,
- &r_max_protection,
- &r_inheritance,
- &r_is_shared,
- &r_object_name,
- &r_offset);
- if ((kr == KERN_SUCCESS) && MACH_PORT_VALID(r_object_name))
- (void) mach_port_deallocate(my_task, r_object_name);
- if ((kr == KERN_SUCCESS) &&
- (r_addr <= addr) &&
- ((r_protection & (VM_PROT_READ|VM_PROT_WRITE)) ==
- (VM_PROT_READ|VM_PROT_WRITE)))
- (void) vm_deallocate(my_task, r_addr, r_size);
- }
-#endif
-
- printf ("(serverboot): terminating\n");
- while (1)
- task_terminate (mach_task_self ());
- /*NOTREACHED*/
-}
-
-/* Parse the boot script. */
-parse_script (struct file *f)
-{
- char *p, *line, *buf;
- int amt, fd, err;
- int n = 0;
-
- buf = malloc (f->f_size + 1); /* add one for null terminator we will write */
- err = read_file (f, 0, buf, f->f_size, 0);
- if (err)
- panic ("bootstrap: error reading boot script file: %s", strerror (err));
-
- line = p = buf;
- while (1)
- {
- while (p < buf + f->f_size && *p != '\n')
- p++;
- *p = '\0';
- err = boot_script_parse_line (0, line);
- if (err)
- boot_panic (err);
- if (p == buf + f->f_size)
- break;
- line = ++p;
- }
- free (buf);
-}
diff --git a/serverboot/bunzip2.c b/serverboot/bunzip2.c
deleted file mode 100644
index 9f79ade5..00000000
--- a/serverboot/bunzip2.c
+++ /dev/null
@@ -1,169 +0,0 @@
-/* Modified by okuji@kuicr.kyoto-u.ac.jp for use in serverboot. */
-/* Decompressing store backend
-
- Copyright (C) 1997 Free Software Foundation, Inc.
- Written by Miles Bader <miles@gnu.ai.mit.edu>
- This file is part of the GNU Hurd.
-
- The GNU Hurd is free software; you can redistribute it and/or
- modify it under the terms of the GNU General Public License as
- published by the Free Software Foundation; either version 2, or (at
- your option) any later version.
-
- The GNU Hurd is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. */
-
-#include <stdio.h>
-#include <string.h>
-#include <setjmp.h>
-#include <cthreads.h>
-#include <errno.h>
-
-#include <file_io.h>
-
-#define IN_BUFFERING (256*1024)
-#define OUT_BUFFERING (512*1024)
-
-static struct mutex bunzip2_lock = MUTEX_INITIALIZER;
-
-/* Uncompress the contents of FROM, which should contain a valid bzip2 file,
- into memory, returning the result buffer in BUF & BUF_LEN. */
-int
-serverboot_bunzip2 (struct file *from, void **buf, size_t *buf_len)
-{
- /* Callbacks from do_bunzip2 for I/O and error interface. */
- extern int (*unzip_read) (char *buf, size_t maxread);
- extern void (*unzip_write) (const char *buf, size_t nwrite);
- extern void (*unzip_read_error) (void);
- extern void (*unzip_error) (const char *msg);
-
- /* How we return errors from our hook functions. */
- jmp_buf zerr_jmp_buf;
- int zerr;
-
- size_t offset = 0; /* Offset of read point in FROM. */
-
- /* Read at most MAXREAD (or 0 if eof) bytes into BUF from our current
- position in FROM. */
- int zread (char *buf, size_t maxread)
- {
- vm_size_t resid;
- size_t did_read;
-
- if (from->f_size - offset < maxread)
- did_read = from->f_size - offset;
- else
- did_read = maxread;
-
- zerr = read_file (from, offset, buf, did_read, &resid);
- if (zerr)
- longjmp (zerr_jmp_buf, 1);
-
- did_read -= resid;
- offset += did_read;
-
- return did_read;
- }
-
- size_t out_buf_offs = 0; /* Position in the output buffer. */
-
- /* Write uncompress data to our output buffer. */
- void zwrite (const char *wbuf, size_t nwrite)
- {
- size_t old_buf_len = *buf_len;
-
- if (out_buf_offs + nwrite > old_buf_len)
- /* Have to grow the output buffer. */
- {
- void *old_buf = *buf;
- void *new_buf = old_buf + old_buf_len; /* First try. */
- size_t new_buf_len = round_page (old_buf_len + old_buf_len + nwrite);
-
- /* Try to grow the buffer. */
- zerr =
- vm_allocate (mach_task_self (),
- (vm_address_t *)&new_buf, new_buf_len - old_buf_len,
- 0);
- if (zerr)
- /* Can't do that, try to make a bigger buffer elsewhere. */
- {
- new_buf = old_buf;
- zerr =
- vm_allocate (mach_task_self (),
- (vm_address_t *)&new_buf, new_buf_len, 1);
- if (zerr)
- longjmp (zerr_jmp_buf, 1);
-
- if (out_buf_offs > 0)
- /* Copy the old buffer into the start of the new & free it. */
- bcopy (old_buf, new_buf, out_buf_offs);
-
- vm_deallocate (mach_task_self (),
- (vm_address_t)old_buf, old_buf_len);
-
- *buf = new_buf;
- }
-
- *buf_len = new_buf_len;
- }
-
- bcopy (wbuf, *buf + out_buf_offs, nwrite);
- out_buf_offs += nwrite;
- }
-
- void zreaderr (void)
- {
- zerr = EIO;
- longjmp (zerr_jmp_buf, 1);
- }
- void zerror (const char *msg)
- {
- zerr = EINVAL;
- longjmp (zerr_jmp_buf, 2);
- }
-
- /* Try to guess a reasonable output buffer size. */
- *buf_len = round_page (from->f_size * 2);
- zerr = vm_allocate (mach_task_self (), (vm_address_t *)buf, *buf_len, 1);
- if (zerr)
- return zerr;
-
- mutex_lock (&bunzip2_lock);
-
- unzip_read = zread;
- unzip_write = zwrite;
- unzip_read_error = zreaderr;
- unzip_error = zerror;
-
- if (! setjmp (zerr_jmp_buf))
- {
- /* Call the bunzip2 engine. */
- do_bunzip2 ();
- zerr = 0;
- }
-
- mutex_unlock (&bunzip2_lock);
-
- if (zerr)
- {
- if (*buf_len > 0)
- vm_deallocate (mach_task_self (), (vm_address_t)*buf, *buf_len);
- }
- else if (out_buf_offs < *buf_len)
- /* Trim the output buffer to be the right length. */
- {
- size_t end = round_page (out_buf_offs);
- if (end < *buf_len)
- vm_deallocate (mach_task_self (),
- (vm_address_t)(*buf + end), *buf_len - end);
- *buf_len = out_buf_offs;
- }
-
- return zerr;
-}
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
diff --git a/serverboot/defs.h b/serverboot/defs.h
deleted file mode 100644
index 7b872fd6..00000000
--- a/serverboot/defs.h
+++ /dev/null
@@ -1,95 +0,0 @@
-/*
- * Mach Operating System
- * Copyright (c) 1991,1990 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.
- */
-/*
- * Common definitions for Berkeley Fast File System.
- */
-
-/*
- * Compatibility definitions for disk IO.
- */
-
-/*
- * Disk devices do all IO in 512-byte blocks.
- */
-#define DEV_BSIZE 512
-
-/*
- * Conversion between bytes and disk blocks.
- */
-#define btodb(byte_offset) ((byte_offset) >> 9)
-#define dbtob(block_number) ((block_number) << 9)
-
-/*
- * Compatibility definitions for old type names.
- */
-
-typedef struct _quad_ {
- unsigned int val[2]; /* 2 int values make... */
-} quad; /* an 8-byte item */
-
-#if 0
-typedef unsigned char u_char; /* unsigned char */
-typedef unsigned short u_short; /* unsigned short */
-typedef unsigned int u_int; /* unsigned int */
-
-typedef unsigned int time_t; /* an unsigned int */
-typedef unsigned int daddr_t; /* an unsigned int */
-typedef unsigned int off_t; /* another unsigned int */
-
-typedef unsigned short uid_t;
-typedef unsigned short gid_t;
-typedef unsigned int ino_t;
-#endif
-
-#define NBBY 8
-
-/*
- * The file system is made out of blocks of at most MAXBSIZE units,
- * with smaller units (fragments) only in the last direct block.
- * MAXBSIZE primarily determines the size of buffers in the buffer
- * pool. It may be made larger without any effect on existing
- * file systems; however, making it smaller may make some file
- * systems unmountable.
- *
- * Note that the disk devices are assumed to have DEV_BSIZE "sectors"
- * and that fragments must be some multiple of this size.
- */
-#define MAXBSIZE 8192
-#define MAXFRAG 8
-
-/*
- * MAXPATHLEN defines the longest permissible path length
- * after expanding symbolic links.
- *
- * MAXSYMLINKS defines the maximum number of symbolic links
- * that may be expanded in a path name. It should be set
- * high enough to allow all legitimate uses, but halt infinite
- * loops reasonably quickly.
- */
-
-#define MAXPATHLEN 1024
-#define MAXSYMLINKS 8
-
diff --git a/serverboot/dir.h b/serverboot/dir.h
deleted file mode 100644
index 208df5ce..00000000
--- a/serverboot/dir.h
+++ /dev/null
@@ -1,142 +0,0 @@
-/*
- * Mach Operating System
- * Copyright (c) 1991,1990 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.
- */
-/*
- * Copyright (c) 1982, 1986, 1989 The Regents of the University of California.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms are permitted
- * provided that the above copyright notice and this paragraph are
- * duplicated in all such forms and that any documentation,
- * advertising materials, and other materials related to such
- * distribution and use acknowledge that the software was developed
- * by the University of California, Berkeley. The name of the
- * University may not be used to endorse or promote products derived
- * from this software without specific prior written permission.
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * @(#)dir.h 7.6 (Berkeley) 5/9/89
- */
-
-#ifndef _BOOT_UFS_DIR_H_
-#define _BOOT_UFS_DIR_H_
-
-/*
- * A directory consists of some number of blocks of DIRBLKSIZ
- * bytes, where DIRBLKSIZ is chosen such that it can be transferred
- * to disk in a single atomic operation (e.g. 512 bytes on most machines).
- *
- * Each DIRBLKSIZ byte block contains some number of directory entry
- * structures, which are of variable length. Each directory entry has
- * a struct direct at the front of it, containing its inode number,
- * the length of the entry, and the length of the name contained in
- * the entry. These are followed by the name padded to a 4 byte boundary
- * with null bytes. All names are guaranteed null terminated.
- * The maximum length of a name in a directory is MAXNAMLEN.
- *
- * The macro DIRSIZ(dp) gives the amount of space required to represent
- * a directory entry. Free space in a directory is represented by
- * entries which have dp->d_reclen > DIRSIZ(dp). All DIRBLKSIZ bytes
- * in a directory block are claimed by the directory entries. This
- * usually results in the last entry in a directory having a large
- * dp->d_reclen. When entries are deleted from a directory, the
- * space is returned to the previous entry in the same directory
- * block by increasing its dp->d_reclen. If the first entry of
- * a directory block is free, then its dp->d_ino is set to 0.
- * Entries other than the first in a directory do not normally have
- * dp->d_ino set to 0.
- */
-#define DIRBLKSIZ DEV_BSIZE
-#define MAXNAMLEN 255
-
-struct direct {
- u_int d_ino; /* inode number of entry */
- u_short d_reclen; /* length of this record */
- u_short d_namlen; /* length of string in d_name */
- char d_name[MAXNAMLEN + 1]; /* name with length <= MAXNAMLEN */
-};
-
-/*
- * The DIRSIZ macro gives the minimum record length which will hold
- * the directory entry. This requires the amount of space in struct direct
- * without the d_name field, plus enough space for the name with a terminating
- * null byte (dp->d_namlen+1), rounded up to a 4 byte boundary.
- */
-#undef DIRSIZ
-#define DIRSIZ(dp) \
- ((sizeof (struct direct) - (MAXNAMLEN+1)) + (((dp)->d_namlen+1 + 3) &~ 3))
-
-#ifdef KERNEL
-/*
- * Template for manipulating directories.
- * Should use struct direct's, but the name field
- * is MAXNAMLEN - 1, and this just won't do.
- */
-struct dirtemplate {
- u_int dot_ino;
- short dot_reclen;
- short dot_namlen;
- char dot_name[4]; /* must be multiple of 4 */
- u_int dotdot_ino;
- short dotdot_reclen;
- short dotdot_namlen;
- char dotdot_name[4]; /* ditto */
-};
-#endif
-
-/*
- * The following information should be obtained from <dirent.h>
- * and is provided solely (and temporarily) for backward compatibility.
- */
-#ifndef KERNEL
-#define d_fileno d_ino /* compatibility with POSIX */
-#ifndef DEV_BSIZE
-#define DEV_BSIZE 512
-#endif
-/*
- * Definitions for library routines operating on directories.
- */
-typedef struct _dirdesc {
- int dd_fd;
- int dd_loc;
- int dd_size;
- char dd_buf[DIRBLKSIZ];
-} DIR;
-
-#define dirfd(dirp) ((dirp)->dd_fd)
-
-#ifndef NULL
-#define NULL 0
-#endif
-extern DIR *opendir();
-extern struct direct *readdir();
-extern int telldir();
-extern void seekdir();
-#define rewinddir(dirp) seekdir((dirp), (long)0)
-extern void closedir();
-#endif /* not KERNEL */
-#endif /* _BOOT_UFS_DIR_H_ */
diff --git a/serverboot/disk_inode.h b/serverboot/disk_inode.h
deleted file mode 100644
index 6eed9104..00000000
--- a/serverboot/disk_inode.h
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
- * Mach Operating System
- * Copyright (c) 1991,1990 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.
- */
-/*
- * Copyright (c) 1982, 1989 The Regents of the University of California.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms are permitted
- * provided that the above copyright notice and this paragraph are
- * duplicated in all such forms and that any documentation,
- * advertising materials, and other materials related to such
- * distribution and use acknowledge that the software was developed
- * by the University of California, Berkeley. The name of the
- * University may not be used to endorse or promote products derived
- * from this software without specific prior written permission.
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * @(#)inode.h 7.5 (Berkeley) 7/3/89
- */
-
-#ifndef _BOOT_UFS_DISK_INODE_H_
-#define _BOOT_UFS_DISK_INODE_H_
-
-/*
- * The I node is the focus of all file activity in the BSD Fast File System.
- * There is a unique inode allocated for each active file,
- * each current directory, each mounted-on file, text file, and the root.
- * An inode is 'named' by its dev/inumber pair. (iget/iget.c)
- * Data in icommon is read in from permanent inode on volume.
- */
-
-#define FFS_NDADDR 12 /* direct addresses in inode */
-#define FFS_NIADDR 3 /* indirect addresses in inode */
-
-#define FFS_MAX_FASTLINK_SIZE ((FFS_NDADDR + FFS_NIADDR) * sizeof(daddr_t))
-
-struct icommon {
- u_short ic_mode; /* 0: mode and type of file */
- short ic_nlink; /* 2: number of links to file */
- short ic_uid; /* 4: owner's user id */
- short ic_gid; /* 6: owner's group id */
- quad ic_size; /* 8: number of bytes in file */
- time_t ic_atime; /* 16: time last accessed */
- int ic_atspare;
- time_t ic_mtime; /* 24: time last modified */
- int ic_mtspare;
- time_t ic_ctime; /* 32: last time inode changed */
- int ic_ctspare;
- union {
- struct {
- daddr_t Mb_db[FFS_NDADDR]; /* 40: disk block addresses */
- daddr_t Mb_ib[FFS_NIADDR]; /* 88: indirect blocks */
- } ic_Mb;
- char ic_Msymlink[FFS_MAX_FASTLINK_SIZE];
- /* 40: symbolic link name */
- } ic_Mun;
-#define ic_db ic_Mun.ic_Mb.Mb_db
-#define ic_ib ic_Mun.ic_Mb.Mb_ib
-#define ic_symlink ic_Mun.ic_Msymlink
- int ic_flags; /* 100: status, currently unused */
- int ic_blocks; /* 104: blocks actually held */
- int ic_gen; /* 108: generation number */
- int ic_spare[4]; /* 112: reserved, currently unused */
-} i_ic;
-
-/*
- * Same structure, but on disk.
- */
-struct dinode {
- union {
- struct icommon di_com;
- char di_char[128];
- } di_un;
-};
-#define di_ic di_un.di_com
-
-#endif /* _BOOT_UFS_DISK_INODE_H_ */
diff --git a/serverboot/disk_inode_ffs.h b/serverboot/disk_inode_ffs.h
deleted file mode 100644
index ab352f84..00000000
--- a/serverboot/disk_inode_ffs.h
+++ /dev/null
@@ -1,99 +0,0 @@
-/*
- * Mach Operating System
- * Copyright (c) 1991,1990 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.
- */
-/*
- * Copyright (c) 1982, 1989 The Regents of the University of California.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms are permitted
- * provided that the above copyright notice and this paragraph are
- * duplicated in all such forms and that any documentation,
- * advertising materials, and other materials related to such
- * distribution and use acknowledge that the software was developed
- * by the University of California, Berkeley. The name of the
- * University may not be used to endorse or promote products derived
- * from this software without specific prior written permission.
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * @(#)inode.h 7.5 (Berkeley) 7/3/89
- */
-
-#ifndef _BOOT_UFS_DISK_INODE_FFS_H_
-#define _BOOT_UFS_DISK_INODE_FFS_H_
-
-#define NDADDR FFS_NDADDR
-#define NIADDR FFS_NIADDR
-
-#define MAX_FASTLINK_SIZE FFS_MAX_FASTLINK_SIZE
-
-#define IC_FASTLINK 0x0001 /* Symbolic link in inode */
-
-#define i_mode i_ic.ic_mode
-#define i_nlink i_ic.ic_nlink
-#define i_uid i_ic.ic_uid
-#define i_gid i_ic.ic_gid
-#if BYTE_MSF
-#define i_size i_ic.ic_size.val[1]
-#else /* BYTE_LSF */
-#define i_size i_ic.ic_size.val[0]
-#endif
-#define i_db i_ic.ic_db
-#define i_ib i_ic.ic_ib
-#define i_atime i_ic.ic_atime
-#define i_mtime i_ic.ic_mtime
-#define i_ctime i_ic.ic_ctime
-#define i_blocks i_ic.ic_blocks
-#define i_rdev i_ic.ic_db[0]
-#define i_symlink i_ic.ic_symlink
-#define i_flags i_ic.ic_flags
-#define i_gen i_ic.ic_gen
-
-/* modes */
-#define IFMT 0xf000 /* type of file */
-#define IFCHR 0x2000 /* character special */
-#define IFDIR 0x4000 /* directory */
-#define IFBLK 0x6000 /* block special */
-#define IFREG 0x8000 /* regular */
-#define IFLNK 0xa000 /* symbolic link */
-#define IFSOCK 0xc000 /* socket */
-
-
-#define ISUID 0x0800 /* set user id on execution */
-#define ISGID 0x0400 /* set group id on execution */
-#define ISVTX 0x0200 /* save swapped text even after use */
-#define IREAD 0x0100 /* read, write, execute permissions */
-#define IWRITE 0x0080
-#define IEXEC 0x0040
-
-#define f_fs u.ffs.ffs_fs
-#define i_ic u.ffs.ffs_ic
-#define f_nindir u.ffs.ffs_nindir
-#define f_blk u.ffs.ffs_blk
-#define f_blksize u.ffs.ffs_blksize
-#define f_blkno u.ffs.ffs_blkno
-
-#endif /* _BOOT_UFS_DISK_INODE_FFS_H_ */
diff --git a/serverboot/elf-load.c b/serverboot/elf-load.c
deleted file mode 100644
index 603eadf0..00000000
--- a/serverboot/elf-load.c
+++ /dev/null
@@ -1,143 +0,0 @@
-/*
- * Copyright (c) 1995, 1994, 1993, 1992, 1991, 1990
- * Open Software Foundation, Inc.
- *
- * Permission to use, copy, modify, and distribute this software and
- * its documentation for any purpose and without fee is hereby granted,
- * provided that the above copyright notice appears in all copies and
- * that both the copyright notice and this permission notice appear in
- * supporting documentation, and that the name of ("OSF") or Open Software
- * Foundation not be used in advertising or publicity pertaining to
- * distribution of the software without specific, written prior permission.
- *
- * OSF DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL OSF BE LIABLE FOR ANY
- * SPECIAL, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
- * ACTION OF CONTRACT, NEGLIGENCE, OR OTHER TORTIOUS ACTION, ARISING
- * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE
- */
-/*
- * OSF Research Institute MK6.1 (unencumbered) 1/31/1995
- */
-
-#include <alloca.h>
-#include <mach/machine/vm_types.h>
-#include <elf.h>
-#include "mach-exec.h"
-
-int exec_load(exec_read_func_t *read, exec_read_exec_func_t *read_exec,
- void *handle, exec_info_t *out_info)
-{
- vm_size_t actual;
- union { Elf32_Ehdr h; Elf64_Ehdr h64; } x;
- int i;
- int result;
-
- /* Read the ELF header. */
- if ((result = (*read)(handle, 0, &x, sizeof(x), &actual)) != 0)
- return result;
- if (actual < sizeof(x))
- return EX_NOT_EXECUTABLE;
-
- if ((x.h.e_ident[EI_MAG0] != ELFMAG0) ||
- (x.h.e_ident[EI_MAG1] != ELFMAG1) ||
- (x.h.e_ident[EI_MAG2] != ELFMAG2) ||
- (x.h.e_ident[EI_MAG3] != ELFMAG3))
- return EX_NOT_EXECUTABLE;
-
- /* Make sure the file is of the right architecture. */
-#ifdef i386
-# define MY_CLASS ELFCLASS32
-# define MY_DATA ELFDATA2LSB
-# define MY_MACHINE EM_386
-#elif defined __alpha__
-# define MY_CLASS ELFCLASS64
-# define MY_DATA ELFDATA2LSB
-# define MY_MACHINE EM_ALPHA
-#else
-#error Not ported to this architecture!
-#endif
-
- if ((x.h.e_ident[EI_CLASS] != MY_CLASS) ||
- (x.h.e_ident[EI_DATA] != MY_DATA))
- return EX_WRONG_ARCH;
-
- if (MY_CLASS == ELFCLASS64)
- {
- Elf64_Phdr *phdr, *ph;
- vm_size_t phsize;
-
- if (x.h64.e_machine != MY_MACHINE)
- return EX_WRONG_ARCH;
-
- /* XXX others */
- out_info->entry = (vm_offset_t) x.h64.e_entry;
- out_info->init_dp = 0; /* ? */
-
- phsize = x.h64.e_phnum * x.h64.e_phentsize;
- phdr = (Elf64_Phdr *)alloca(phsize);
-
- result = (*read)(handle, x.h64.e_phoff, phdr, phsize, &actual);
- if (result)
- return result;
- if (actual < phsize)
- return EX_CORRUPT;
-
- for (i = 0; i < x.h64.e_phnum; i++)
- {
- ph = (Elf64_Phdr *)((vm_offset_t)phdr + i * x.h64.e_phentsize);
- if (ph->p_type == PT_LOAD)
- {
- exec_sectype_t type = EXEC_SECTYPE_ALLOC |
- EXEC_SECTYPE_LOAD;
- if (ph->p_flags & PF_R) type |= EXEC_SECTYPE_READ;
- if (ph->p_flags & PF_W) type |= EXEC_SECTYPE_WRITE;
- if (ph->p_flags & PF_X) type |= EXEC_SECTYPE_EXECUTE;
- result = (*read_exec)(handle,
- ph->p_offset, ph->p_filesz,
- ph->p_vaddr, ph->p_memsz, type);
- }
- }
- }
- else
- {
- Elf32_Phdr *phdr, *ph;
- vm_size_t phsize;
-
- if (x.h.e_machine != MY_MACHINE)
- return EX_WRONG_ARCH;
-
- /* XXX others */
- out_info->entry = (vm_offset_t) x.h.e_entry;
- out_info->init_dp = 0; /* ? */
-
- phsize = x.h.e_phnum * x.h.e_phentsize;
- phdr = (Elf32_Phdr *)alloca(phsize);
-
- result = (*read)(handle, x.h.e_phoff, phdr, phsize, &actual);
- if (result)
- return result;
- if (actual < phsize)
- return EX_CORRUPT;
-
- for (i = 0; i < x.h.e_phnum; i++)
- {
- ph = (Elf32_Phdr *)((vm_offset_t)phdr + i * x.h.e_phentsize);
- if (ph->p_type == PT_LOAD)
- {
- exec_sectype_t type = EXEC_SECTYPE_ALLOC |
- EXEC_SECTYPE_LOAD;
- if (ph->p_flags & PF_R) type |= EXEC_SECTYPE_READ;
- if (ph->p_flags & PF_W) type |= EXEC_SECTYPE_WRITE;
- if (ph->p_flags & PF_X) type |= EXEC_SECTYPE_EXECUTE;
- result = (*read_exec)(handle,
- ph->p_offset, ph->p_filesz,
- ph->p_vaddr, ph->p_memsz, type);
- }
- }
- }
-
- return 0;
-}
diff --git a/serverboot/exec.c b/serverboot/exec.c
deleted file mode 100644
index a487fb5d..00000000
--- a/serverboot/exec.c
+++ /dev/null
@@ -1,147 +0,0 @@
-/*
- * Mach Operating System
- * Copyright (c) 1993-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.
- */
-/*
- * i386-specific routines for loading a.out files.
- */
-
-#include <mach.h>
-#include <mach/machine/vm_param.h>
-#include "mach-exec.h"
-
-#include <file_io.h>
-
-#ifdef i386
-
-#include <mach/machine/eflags.h>
-
-/*
- * Machine-dependent portions of execve() for the i386.
- */
-
-#define STACK_SIZE (64*1024)
-
-char *set_regs(
- mach_port_t user_task,
- mach_port_t user_thread,
- struct exec_info *info,
- int arg_size)
-{
- vm_offset_t stack_start;
- vm_offset_t stack_end;
- struct i386_thread_state regs;
- unsigned int reg_size;
-
- /*
- * Add space for 5 ints to arguments, for
- * PS program. XXX
- */
- arg_size += 5 * sizeof(int);
-
- /*
- * Allocate stack.
- */
- stack_end = VM_MAX_ADDRESS;
- stack_start = VM_MAX_ADDRESS - STACK_SIZE;
- (void)vm_allocate(user_task,
- &stack_start,
- (vm_size_t)(stack_end - stack_start),
- FALSE);
-
- reg_size = i386_THREAD_STATE_COUNT;
- (void)thread_get_state(user_thread,
- i386_THREAD_STATE,
- (thread_state_t)&regs,
- &reg_size);
-
- regs.eip = info->entry;
- regs.uesp = (int)((stack_end - arg_size) & ~(sizeof(int)-1));
-
- /* regs.efl |= EFL_TF; trace flag*/
-
- (void)thread_set_state(user_thread,
- i386_THREAD_STATE,
- (thread_state_t)&regs,
- reg_size);
-
- return (char *)regs.uesp;
-}
-
-#elif defined __alpha__
-
-
-/*
- * Object:
- * set_regs EXPORTED function
- *
- * Initialize enough state for a thread to run, including
- * stack memory and stack pointer, and program counter.
- *
- */
-#define STACK_SIZE (vm_size_t)(128*1024)
-
-char *set_regs(
- mach_port_t user_task,
- mach_port_t user_thread,
- struct exec_info *info,
- int arg_size)
-{
- vm_offset_t stack_start;
- vm_offset_t stack_end;
- struct alpha_thread_state regs;
-
- natural_t reg_size;
-
- /*
- * Allocate stack.
- */
- stack_end = VM_MAX_ADDRESS;
- stack_start = stack_end - STACK_SIZE;
- (void)vm_allocate(user_task,
- &stack_start,
- (vm_size_t)(STACK_SIZE),
- FALSE);
-
- reg_size = ALPHA_THREAD_STATE_COUNT;
- (void)thread_get_state(user_thread,
- ALPHA_THREAD_STATE,
- (thread_state_t)&regs,
- &reg_size);
-
- regs.pc = info->entry;
- regs.r29 = info->init_dp;
- regs.r30 = (integer_t)((stack_end - arg_size) & ~(sizeof(integer_t)-1));
-
- (void)thread_set_state(user_thread,
- ALPHA_THREAD_STATE,
- (thread_state_t)&regs,
- reg_size);
-
- return (char *)regs.r30;
-}
-
-#else
-# error "Not ported to this architecture!"
-#endif
diff --git a/serverboot/ext2_file_io.c b/serverboot/ext2_file_io.c
deleted file mode 100644
index cb915c4a..00000000
--- a/serverboot/ext2_file_io.c
+++ /dev/null
@@ -1,983 +0,0 @@
-/*
- * Mach Operating System
- * Copyright (c) 1991,1990 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.
- */
-/*
- * Stand-alone file reading package.
- */
-
-#include <device/device_types.h>
-#include <device/device.h>
-
-#include <mach/mach_traps.h>
-#include <mach/mach_interface.h>
-
-#include "file_io.h"
-#include "ffs_compat.h"
-
-void ext2_close_file(); /* forward */
-
-/*
- * Free file buffers, but don't close file.
- */
-static void
-free_file_buffers(fp)
- register struct file *fp;
-{
- register int level;
-
- /*
- * Free the indirect blocks
- */
- for (level = 0; level < NIADDR; level++) {
- if (fp->f_blk[level] != 0) {
- (void) vm_deallocate(mach_task_self(),
- fp->f_blk[level],
- fp->f_blksize[level]);
- fp->f_blk[level] = 0;
- }
- fp->f_blkno[level] = -1;
- }
-
- /*
- * Free the data block
- */
- if (fp->f_buf != 0) {
- (void) vm_deallocate(mach_task_self(),
- fp->f_buf,
- fp->f_buf_size);
- fp->f_buf = 0;
- }
- fp->f_buf_blkno = -1;
-}
-
-/*
- * Read a new inode into a file structure.
- */
-static int
-read_inode(inumber, fp)
- ino_t inumber;
- register struct file *fp;
-{
- vm_offset_t buf;
- mach_msg_type_number_t buf_size;
- register
- struct ext2_super_block *fs;
- daddr_t disk_block;
- kern_return_t rc;
-
- fs = fp->f_fs;
- disk_block = ino2blk(fs, fp->f_gd, inumber);
-
- rc = device_read(fp->f_dev,
- 0,
- (recnum_t) fsbtodb(fp->f_fs, disk_block),
- (int) EXT2_BLOCK_SIZE(fs),
- (char **)&buf,
- &buf_size);
- if (rc != KERN_SUCCESS)
- return (rc);
-
- {
- register struct ext2_inode *dp;
-
- dp = (struct ext2_inode *)buf;
- dp += itoo(fs, inumber);
- fp->i_ic = *dp;
- fp->f_size = dp->i_size;
- }
-
- (void) vm_deallocate(mach_task_self(), buf, buf_size);
-
- /*
- * Clear out the old buffers
- */
- free_file_buffers(fp);
-
- return (0);
-}
-
-/*
- * Given an offset in a file, find the disk block number that
- * contains that block.
- */
-static int
-block_map(fp, file_block, disk_block_p)
- struct file *fp;
- daddr_t file_block;
- daddr_t *disk_block_p; /* out */
-{
- int level;
- int idx;
- daddr_t ind_block_num;
- kern_return_t rc;
-
- vm_offset_t olddata[NIADDR+1];
- vm_size_t oldsize[NIADDR+1];
-
- /*
- * Index structure of an inode:
- *
- * i_db[0..NDADDR-1] hold block numbers for blocks
- * 0..NDADDR-1
- *
- * i_ib[0] index block 0 is the single indirect
- * block
- * holds block numbers for blocks
- * NDADDR .. NDADDR + NINDIR(fs)-1
- *
- * i_ib[1] index block 1 is the double indirect
- * block
- * holds block numbers for INDEX blocks
- * for blocks
- * NDADDR + NINDIR(fs) ..
- * NDADDR + NINDIR(fs) + NINDIR(fs)**2 - 1
- *
- * i_ib[2] index block 2 is the triple indirect
- * block
- * holds block numbers for double-indirect
- * blocks for blocks
- * NDADDR + NINDIR(fs) + NINDIR(fs)**2 ..
- * NDADDR + NINDIR(fs) + NINDIR(fs)**2
- * + NINDIR(fs)**3 - 1
- */
-
- mutex_lock(&fp->f_lock);
-
- if (file_block < NDADDR) {
- /* Direct block. */
- *disk_block_p = fp->i_ic.i_block[file_block];
- mutex_unlock(&fp->f_lock);
- return (0);
- }
-
- file_block -= NDADDR;
-
- /*
- * nindir[0] = NINDIR
- * nindir[1] = NINDIR**2
- * nindir[2] = NINDIR**3
- * etc
- */
- for (level = 0; level < NIADDR; level++) {
- if (file_block < fp->f_nindir[level])
- break;
- file_block -= fp->f_nindir[level];
- }
- if (level == NIADDR) {
- /* Block number too high */
- mutex_unlock(&fp->f_lock);
- return (FS_NOT_IN_FILE);
- }
-
- ind_block_num = fp->i_ic.i_block[level + NDADDR];
-
- /*
- * Initialize array of blocks to free.
- */
- for (idx = 0; idx < NIADDR; idx++)
- oldsize[idx] = 0;
-
- for (; level >= 0; level--) {
-
- vm_offset_t data;
- mach_msg_type_number_t size;
-
- if (ind_block_num == 0)
- break;
-
- if (fp->f_blkno[level] == ind_block_num) {
- /*
- * Cache hit. Just pick up the data.
- */
-
- data = fp->f_blk[level];
- }
- else {
- /*
- * Drop our lock while doing the read.
- * (The f_dev and f_fs fields don`t change.)
- */
- mutex_unlock(&fp->f_lock);
-
- rc = device_read(fp->f_dev,
- 0,
- (recnum_t) fsbtodb(fp->f_fs, ind_block_num),
- EXT2_BLOCK_SIZE(fp->f_fs),
- (char **)&data,
- &size);
- if (rc != KERN_SUCCESS)
- return (rc);
-
- /*
- * See if we can cache the data. Need a write lock to
- * do this. While we hold the write lock, we can`t do
- * *anything* which might block for memory. Otherwise
- * a non-privileged thread might deadlock with the
- * privileged threads. We can`t block while taking the
- * write lock. Otherwise a non-privileged thread
- * blocked in the vm_deallocate (while holding a read
- * lock) will block a privileged thread. For the same
- * reason, we can`t take a read lock and then use
- * lock_read_to_write.
- */
-
- mutex_lock(&fp->f_lock);
-
- olddata[level] = fp->f_blk[level];
- oldsize[level] = fp->f_blksize[level];
-
- fp->f_blkno[level] = ind_block_num;
- fp->f_blk[level] = data;
- fp->f_blksize[level] = size;
-
- /*
- * Return to holding a read lock, and
- * dispose of old data.
- */
-
- }
-
- if (level > 0) {
- idx = file_block / fp->f_nindir[level-1];
- file_block %= fp->f_nindir[level-1];
- }
- else
- idx = file_block;
-
- ind_block_num = ((daddr_t *)data)[idx];
- }
-
- mutex_unlock(&fp->f_lock);
-
- /*
- * After unlocking the file, free any blocks that
- * we need to free.
- */
- for (idx = 0; idx < NIADDR; idx++)
- if (oldsize[idx] != 0)
- (void) vm_deallocate(mach_task_self(),
- olddata[idx],
- oldsize[idx]);
-
- *disk_block_p = ind_block_num;
- return (0);
-}
-
-/*
- * Read a portion of a file into an internal buffer. Return
- * the location in the buffer and the amount in the buffer.
- */
-static int
-buf_read_file(fp, offset, buf_p, size_p)
- register struct file *fp;
- vm_offset_t offset;
- vm_offset_t *buf_p; /* out */
- vm_size_t *size_p; /* out */
-{
- register
- struct ext2_super_block *fs;
- vm_offset_t off;
- register daddr_t file_block;
- daddr_t disk_block;
- int rc;
- vm_offset_t block_size;
-
- if (offset >= fp->i_ic.i_size)
- return (FS_NOT_IN_FILE);
-
- fs = fp->f_fs;
-
- off = blkoff(fs, offset);
- file_block = lblkno(fs, offset);
- block_size = blksize(fs, fp, file_block);
-
- if (file_block != fp->f_buf_blkno) {
- rc = block_map(fp, file_block, &disk_block);
- if (rc != 0)
- return (rc);
-
- if (fp->f_buf)
- (void)vm_deallocate(mach_task_self(),
- fp->f_buf,
- fp->f_buf_size);
-
- if (disk_block == 0) {
- (void)vm_allocate(mach_task_self(),
- &fp->f_buf,
- block_size,
- TRUE);
- fp->f_buf_size = block_size;
- }
- else {
- rc = device_read(fp->f_dev,
- 0,
- (recnum_t) fsbtodb(fs, disk_block),
- (int) block_size,
- (char **) &fp->f_buf,
- (mach_msg_type_number_t *)&fp->f_buf_size);
- }
- if (rc)
- return (rc);
-
- fp->f_buf_blkno = file_block;
- }
-
- /*
- * Return address of byte in buffer corresponding to
- * offset, and size of remainder of buffer after that
- * byte.
- */
- *buf_p = fp->f_buf + off;
- *size_p = block_size - off;
-
- /*
- * But truncate buffer at end of file.
- */
- if (*size_p > fp->i_ic.i_size - offset)
- *size_p = fp->i_ic.i_size - offset;
-
- return (0);
-}
-
-/*
- * Search a directory for a name and return its
- * i_number.
- */
-static int
-search_directory(name, fp, inumber_p)
- char * name;
- register struct file *fp;
- ino_t *inumber_p; /* out */
-{
- vm_offset_t buf;
- vm_size_t buf_size;
- vm_offset_t offset;
- struct ext2_dir_entry_2 *dp;
- int length;
- kern_return_t rc;
- char tmp_name[256];
-
- length = strlen(name);
-
- offset = 0;
- while (offset < fp->i_ic.i_size) {
- rc = buf_read_file(fp, offset, &buf, &buf_size);
- if (rc != KERN_SUCCESS)
- return (rc);
-
- dp = (struct ext2_dir_entry_2 *)buf;
- if (dp->inode != 0) {
- strncpy (tmp_name, dp->name, dp->name_len);
- tmp_name[dp->name_len] = '\0';
- if (dp->name_len == length &&
- !strcmp(name, tmp_name))
- {
- /* found entry */
- *inumber_p = dp->inode;
- return (0);
- }
- }
- offset += dp->rec_len;
- }
- return (FS_NO_ENTRY);
-}
-
-static int
-read_fs(dev, fsp, gdp, gd_size_p)
- mach_port_t dev;
- struct ext2_super_block **fsp;
- struct ext2_group_desc **gdp;
- vm_size_t *gd_size_p;
-{
- register
- struct ext2_super_block *fs;
- vm_offset_t buf;
- vm_offset_t buf2;
- mach_msg_type_number_t buf_size;
- mach_msg_type_number_t buf2_size;
- int error;
- int gd_count;
- int gd_blocks;
- int gd_size;
- int gd_location;
- int gd_sector;
-
- /*
- * Read the super block
- */
- error = device_read(dev, 0, (recnum_t) SBLOCK, SBSIZE,
- (char **) &buf, &buf_size);
- if (error)
- return (error);
-
- /*
- * Check the superblock
- */
- fs = (struct ext2_super_block *)buf;
- if (fs->s_magic != EXT2_SUPER_MAGIC) {
- (void) vm_deallocate(mach_task_self(), buf, buf_size);
- return (FS_INVALID_FS);
- }
-
- *fsp = fs;
-
- /*
- * Compute the groups informations
- */
- gd_count = (fs->s_blocks_count - fs->s_first_data_block +
- fs->s_blocks_per_group - 1) / fs->s_blocks_per_group;
- gd_blocks = (gd_count + EXT2_DESC_PER_BLOCK(fs) - 1) /
- EXT2_DESC_PER_BLOCK(fs);
- gd_size = gd_blocks * EXT2_BLOCK_SIZE(fs);
- gd_location = fs->s_first_data_block + 1;
- gd_sector = (gd_location * EXT2_BLOCK_SIZE(fs)) / DEV_BSIZE;
-
- /*
- * Read the groups descriptors
- */
- error = device_read(dev, 0, (recnum_t) gd_sector, gd_size,
- (char **) &buf2, &buf2_size);
- if (error) {
- (void) vm_deallocate(mach_task_self(), buf, buf_size);
- return error;
- }
-
- *gdp = (struct ext2_group_desc *) buf2;
- *gd_size_p = gd_size;
-
- return 0;
-}
-
-static int
-mount_fs(fp)
- register struct file *fp;
-{
- register struct ext2_super_block *fs;
- int error;
-
- error = read_fs(fp->f_dev, &fp->f_fs, &fp->f_gd, &fp->f_gd_size);
- if (error)
- return (error);
-
- fs = fp->f_fs;
-
- /*
- * Calculate indirect block levels.
- */
- {
- register int mult;
- register int level;
-
- mult = 1;
- for (level = 0; level < NIADDR; level++) {
- mult *= NINDIR(fs);
- fp->f_nindir[level] = mult;
- }
- }
-
- return (0);
-}
-
-static void
-unmount_fs(fp)
- register struct file *fp;
-{
- if (file_is_structured(fp)) {
- (void) vm_deallocate(mach_task_self(),
- (vm_offset_t) fp->f_fs,
- SBSIZE);
- (void) vm_deallocate(mach_task_self(),
- (vm_offset_t) fp->f_gd,
- fp->f_gd_size);
- fp->f_fs = 0;
- }
-}
-
-/*
- * Open a file.
- */
-int
-ext2_open_file(master_device_port, path, fp)
- mach_port_t master_device_port;
- char * path;
- struct file *fp;
-{
-#define RETURN(code) { rc = (code); goto exit; }
-
- register char *cp, *component;
- register int c; /* char */
- register int rc;
- ino_t inumber, parent_inumber;
- int nlinks = 0;
-
- char namebuf[MAXPATHLEN+1];
-
- if (path == 0 || *path == '\0') {
- return FS_NO_ENTRY;
- }
-
- /*
- * Copy name into buffer to allow modifying it.
- */
- strcpy(namebuf, path);
-
- /*
- * Look for '/dev/xxx' at start of path, for
- * root device.
- */
- if (!strprefix(namebuf, "/dev/")) {
- printf("no device name\n");
- return FS_NO_ENTRY;
- }
-
- cp = namebuf + 5; /* device */
- component = cp;
- while ((c = *cp) != '\0' && c != '/') {
- cp++;
- }
- *cp = '\0';
-
- bzero (fp, sizeof (struct file));
-
- rc = device_open(master_device_port,
- D_READ|D_WRITE,
- component,
- &fp->f_dev);
- if (rc)
- return rc;
-
- if (c == 0) {
- fp->f_fs = 0;
- goto out_ok;
- }
-
- *cp = c;
-
- rc = mount_fs(fp);
- if (rc)
- return rc;
-
- inumber = (ino_t) ROOTINO;
- if ((rc = read_inode(inumber, fp)) != 0) {
- printf("can't read root inode\n");
- goto exit;
- }
-
- while (*cp) {
-
- /*
- * Check that current node is a directory.
- */
- if ((fp->i_ic.i_mode & IFMT) != IFDIR)
- RETURN (FS_NOT_DIRECTORY);
-
- /*
- * Remove extra separators
- */
- while (*cp == '/')
- cp++;
-
- /*
- * Get next component of path name.
- */
- component = cp;
- {
- register int len = 0;
-
- while ((c = *cp) != '\0' && c != '/') {
- if (len++ > MAXNAMLEN)
- RETURN (FS_NAME_TOO_LONG);
- if (c & 0200)
- RETURN (FS_INVALID_PARAMETER);
- cp++;
- }
- *cp = 0;
- }
-
- /*
- * Look up component in current directory.
- * Save directory inumber in case we find a
- * symbolic link.
- */
- parent_inumber = inumber;
- rc = search_directory(component, fp, &inumber);
- if (rc) {
- printf("%s: not found\n", path);
- goto exit;
- }
- *cp = c;
-
- /*
- * Open next component.
- */
- if ((rc = read_inode(inumber, fp)) != 0)
- goto exit;
-
- /*
- * Check for symbolic link.
- */
- if ((fp->i_ic.i_mode & IFMT) == IFLNK) {
-
- int link_len = fp->i_ic.i_size;
- int len;
-
- len = strlen(cp) + 1;
-
- if (link_len + len >= MAXPATHLEN - 1)
- RETURN (FS_NAME_TOO_LONG);
-
- if (++nlinks > MAXSYMLINKS)
- RETURN (FS_SYMLINK_LOOP);
-
- memmove(&namebuf[link_len], cp, len);
-
-#ifdef IC_FASTLINK
- if (fp->i_ic.i_blocks == 0) {
- bcopy(fp->i_ic.i_block, namebuf, (unsigned) link_len);
- }
- else
-#endif /* IC_FASTLINK */
- {
- /*
- * Read file for symbolic link
- */
- vm_offset_t buf;
- mach_msg_type_number_t buf_size;
- daddr_t disk_block;
- register struct ext2_super_block *fs = fp->f_fs;
-
- (void) block_map(fp, (daddr_t)0, &disk_block);
- rc = device_read(fp->f_dev,
- 0,
- (recnum_t) fsbtodb(fs, disk_block),
- (int) blksize(fs, fp, 0),
- (char **) &buf,
- &buf_size);
- if (rc)
- goto exit;
-
- bcopy((char *)buf, namebuf, (unsigned)link_len);
- (void) vm_deallocate(mach_task_self(), buf, buf_size);
- }
-
- /*
- * If relative pathname, restart at parent directory.
- * If absolute pathname, restart at root.
- * If pathname begins '/dev/<device>/',
- * restart at root of that device.
- */
- cp = namebuf;
- if (*cp != '/') {
- inumber = parent_inumber;
- }
- else if (!strprefix(cp, "/dev/")) {
- inumber = (ino_t)ROOTINO;
- }
- else {
- cp += 5;
- component = cp;
- while ((c = *cp) != '\0' && c != '/') {
- cp++;
- }
- *cp = '\0';
-
- /*
- * Unmount current file system and free buffers.
- */
- ext2_close_file(fp);
-
- /*
- * Open new root device.
- */
- rc = device_open(master_device_port,
- D_READ,
- component,
- &fp->f_dev);
- if (rc)
- return (rc);
-
- if (c == 0) {
- fp->f_fs = 0;
- goto out_ok;
- }
-
- *cp = c;
-
- rc = mount_fs(fp);
- if (rc)
- return (rc);
-
- inumber = (ino_t)ROOTINO;
- }
- if ((rc = read_inode(inumber, fp)) != 0)
- goto exit;
- }
- }
-
- /*
- * Found terminal component.
- */
- out_ok:
- mutex_init(&fp->f_lock);
- return 0;
-
- /*
- * At error exit, close file to free storage.
- */
- exit:
- ext2_close_file(fp);
- return rc;
-}
-
-/*
- * Close file - free all storage used.
- */
-void
-ext2_close_file(fp)
- register struct file *fp;
-{
- register int i;
-
- /*
- * Free the disk super-block.
- */
- unmount_fs(fp);
-
- /*
- * Free the inode and data buffers.
- */
- free_file_buffers(fp);
-}
-
-int
-ext2_file_is_directory(struct file *fp)
-{
- return (fp->i_ic.i_mode & IFMT) == IFDIR;
-}
-
-int
-ext2_file_is_regular(struct file *fp)
-{
- return (fp->i_ic.i_mode & IFMT) == IFREG;
-}
-
-/*
- * Copy a portion of a file into kernel memory.
- * Cross block boundaries when necessary.
- */
-int
-ext2_read_file(fp, offset, start, size, resid)
- register struct file *fp;
- vm_offset_t offset;
- vm_offset_t start;
- vm_size_t size;
- vm_size_t *resid; /* out */
-{
- int rc;
- register vm_size_t csize;
- vm_offset_t buf;
- vm_size_t buf_size;
-
- while (size != 0) {
- rc = buf_read_file(fp, offset, &buf, &buf_size);
- if (rc)
- return (rc);
-
- csize = size;
- if (csize > buf_size)
- csize = buf_size;
- if (csize == 0)
- break;
-
- bcopy((char *)buf, (char *)start, csize);
-
- offset += csize;
- start += csize;
- size -= csize;
- }
- if (resid)
- *resid = size;
-
- return (0);
-}
-
-/* simple utility: only works for 2^n */
-static int
-log2(n)
- register unsigned int n;
-{
- register int i = 0;
-
- while ((n & 1) == 0) {
- i++;
- n >>= 1;
- }
- return i;
-}
-
-/*
- * Make an empty file_direct for a device.
- */
-int
-ext2_open_file_direct(dev, fdp, is_structured)
- mach_port_t dev;
- register struct file_direct *fdp;
- boolean_t is_structured;
-{
- struct ext2_super_block *fs;
- struct ext2_group_desc *gd;
- vm_size_t gd_size;
- int rc;
-
- if (!is_structured) {
- fdp->fd_dev = dev;
- fdp->fd_blocks = (daddr_t *) 0;
- fdp->fd_bsize = vm_page_size;
- fdp->fd_bshift = log2(vm_page_size);
- fdp->fd_fsbtodb = 0; /* later */
- fdp->fd_size = 0; /* later */
- return 0;
- }
-
- rc = read_fs(dev, &fs, &gd, &gd_size);
- if (rc)
- return rc;
-
- fdp->fd_dev = dev;
- fdp->fd_blocks = (daddr_t *) 0;
- fdp->fd_size = 0;
- fdp->fd_bsize = EXT2_BLOCK_SIZE(fs);
- fdp->fd_bshift = log2(fdp->fd_bsize);
- fdp->fd_fsbtodb = log2(fdp->fd_bsize / DEV_BSIZE);
-
- (void) vm_deallocate(mach_task_self(),
- (vm_offset_t) fs,
- SBSIZE);
- (void) vm_deallocate(mach_task_self(),
- (vm_offset_t) gd,
- gd_size);
-
- return 0;
-}
-
-/*
- * Add blocks from a file to a file_direct.
- */
-int
-ext2_add_file_direct(fdp, fp)
- register struct file_direct *fdp;
- register struct file *fp;
-{
- register struct ext2_super_block *fs;
- long num_blocks, i;
- vm_offset_t buffer;
- vm_size_t size;
- int rc;
-
- /* the file must be on the same device */
-
- if (fdp->fd_dev != fp->f_dev)
- return FS_INVALID_FS;
-
- if (!file_is_structured(fp)) {
- int result[DEV_GET_SIZE_COUNT];
- natural_t count;
-
- count = DEV_GET_SIZE_COUNT;
- rc = device_get_status( fdp->fd_dev, DEV_GET_SIZE,
- result, &count);
- if (rc)
- return rc;
- fdp->fd_size = result[DEV_GET_SIZE_DEVICE_SIZE] >> fdp->fd_bshift;
- fdp->fd_fsbtodb = log2(fdp->fd_bsize/result[DEV_GET_SIZE_RECORD_SIZE]);
- return 0;
- }
-
- /* it must hold a file system */
-
- fs = fp->f_fs;
-/*
- if (fdp->fd_bsize != fs->fs_bsize ||
- fdp->fd_fsbtodb != fs->fs_fsbtodb)
-*/
- if (fdp->fd_bsize != EXT2_BLOCK_SIZE(fs))
- return FS_INVALID_FS;
-
- /* calculate number of blocks in the file, ignoring fragments */
-
- num_blocks = lblkno(fs, fp->i_ic.i_size);
-
- /* allocate memory for a bigger array */
-
- size = (num_blocks + fdp->fd_size) * sizeof(daddr_t);
- rc = vm_allocate(mach_task_self(), &buffer, size, TRUE);
- if (rc != KERN_SUCCESS)
- return rc;
-
- /* lookup new block addresses */
-
- for (i = 0; i < num_blocks; i++) {
- daddr_t disk_block;
-
- rc = block_map(fp, (daddr_t) i, &disk_block);
- if (rc != 0) {
- (void) vm_deallocate(mach_task_self(), buffer, size);
- return rc;
- }
-
- ((daddr_t *) buffer)[fdp->fd_size + i] = disk_block;
- }
-
- /* copy old addresses and install the new array */
-
- if (fdp->fd_blocks != 0) {
- bcopy((char *) fdp->fd_blocks, (char *) buffer,
- fdp->fd_size * sizeof(daddr_t));
-
- (void) vm_deallocate(mach_task_self(),
- (vm_offset_t) fdp->fd_blocks,
- (vm_size_t) (fdp->fd_size * sizeof(daddr_t)));
- }
- fdp->fd_blocks = (daddr_t *) buffer;
- fdp->fd_size += num_blocks;
-
- /* deallocate cached blocks */
-
- free_file_buffers(fp);
-
- return 0;
-}
-
-int
-ext2_remove_file_direct(fdp)
- struct file_direct *fdp;
-{
- if (fdp->fd_blocks)
- (void) vm_deallocate(mach_task_self(),
- (vm_offset_t) fdp->fd_blocks,
- (vm_size_t) (fdp->fd_size * sizeof(daddr_t)));
- fdp->fd_blocks = 0; /* sanity */
- /* xxx should lose a ref to fdp->fd_dev here (and elsewhere) xxx */
-}
diff --git a/serverboot/ffs_compat.c b/serverboot/ffs_compat.c
deleted file mode 100644
index 6e322b63..00000000
--- a/serverboot/ffs_compat.c
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * BSD FFS like functions used to ease porting bootstrap to Linux ext2 fs
- * Copyright (C) 1994 Remy Card
- *
- * This file is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#include <device/device_types.h>
-#include <device/device.h>
-
-#include <mach/mach_traps.h>
-#include <mach/mach_interface.h>
-
-#include <file_io.h>
-
-#define EXT2_INODES_PER_BLOCK(s) (EXT2_BLOCK_SIZE(s) / sizeof (struct ext2_inode))
-
-int ino2blk (struct ext2_super_block *fs, struct ext2_group_desc *gd, int ino)
-{
- int group;
- int blk;
-
- group = (ino - 1) / EXT2_INODES_PER_GROUP(fs);
- blk = gd[group].bg_inode_table +
- (((ino - 1) % EXT2_INODES_PER_GROUP(fs)) /
- EXT2_INODES_PER_BLOCK(fs));
- return blk;
-}
-
-int fsbtodb (struct ext2_super_block *fs, int b)
-{
- return (b * EXT2_BLOCK_SIZE(fs)) / DEV_BSIZE;
-}
-
-int itoo (struct ext2_super_block *fs, int ino)
-{
- return (ino - 1) % EXT2_INODES_PER_BLOCK(fs);
-}
-
-int blkoff (struct ext2_super_block * fs, vm_offset_t offset)
-{
- return offset % EXT2_BLOCK_SIZE(fs);
-}
-
-int lblkno (struct ext2_super_block * fs, vm_offset_t offset)
-{
- return offset / EXT2_BLOCK_SIZE(fs);
-}
-
-int blksize (struct ext2_super_block *fs, struct file *fp, daddr_t file_block)
-{
- return EXT2_BLOCK_SIZE(fs); /* XXX - fix for fragments */
-}
diff --git a/serverboot/ffs_compat.h b/serverboot/ffs_compat.h
deleted file mode 100644
index d78840f5..00000000
--- a/serverboot/ffs_compat.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * BSD FFS like declarations used to ease porting bootstrap to Linux ext2 fs
- * Copyright (C) 1994 Remy Card
- *
- * This file is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#define SBSIZE EXT2_MIN_BLOCK_SIZE /* Size of superblock */
-#define SBLOCK ((daddr_t) 2) /* Location of superblock */
-
-#define NDADDR EXT2_NDIR_BLOCKS
-#define NIADDR (EXT2_N_BLOCKS - EXT2_NDIR_BLOCKS)
-
-#define MAXNAMLEN 255
-
-#define ROOTINO EXT2_ROOT_INO
-
-#define NINDIR(fs) EXT2_ADDR_PER_BLOCK(fs)
-
-#define IC_FASTLINK
-
-#define IFMT 00170000
-#define IFSOCK 0140000
-#define IFLNK 0120000
-#define IFREG 0100000
-#define IFBLK 0060000
-#define IFDIR 0040000
-#define IFCHR 0020000
-#define IFIFO 0010000
-#define ISUID 0004000
-#define ISGID 0002000
-#define ISVTX 0001000
-
-#define f_fs u.ext2.ext2_fs
-#define f_gd u.ext2.ext2_gd
-#define f_gd_size u.ext2.ext2_gd_size
-#define i_ic u.ext2.ext2_ic
-#define f_nindir u.ext2.ext2_nindir
-#define f_blk u.ext2.ext2_blk
-#define f_blksize u.ext2.ext2_blksize
-#define f_blkno u.ext2.ext2_blkno
-
diff --git a/serverboot/ffs_file_io.c b/serverboot/ffs_file_io.c
deleted file mode 100644
index 1105eacc..00000000
--- a/serverboot/ffs_file_io.c
+++ /dev/null
@@ -1,969 +0,0 @@
-/*
- * Mach Operating System
- * Copyright (c) 1991,1990 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.
- */
-/*
- * Stand-alone file reading package.
- */
-
-#include <device/device_types.h>
-#include <device/device.h>
-
-#include <mach/mach_traps.h>
-#include <mach/mach_interface.h>
-
-#include "file_io.h"
-#include "fs.h"
-#include "dir.h"
-#include "disk_inode_ffs.h"
-
-void close_file(); /* forward */
-
-/*
- * Free file buffers, but don't close file.
- */
-static void
-free_file_buffers(fp)
- register struct file *fp;
-{
- register int level;
-
- /*
- * Free the indirect blocks
- */
- for (level = 0; level < NIADDR; level++) {
- if (fp->f_blk[level] != 0) {
- (void) vm_deallocate(mach_task_self(),
- fp->f_blk[level],
- fp->f_blksize[level]);
- fp->f_blk[level] = 0;
- }
- fp->f_blkno[level] = -1;
- }
-
- /*
- * Free the data block
- */
- if (fp->f_buf != 0) {
- (void) vm_deallocate(mach_task_self(),
- fp->f_buf,
- fp->f_buf_size);
- fp->f_buf = 0;
- }
- fp->f_buf_blkno = -1;
-}
-
-/*
- * Read a new inode into a file structure.
- */
-static int
-read_inode(inumber, fp)
- ino_t inumber;
- register struct file *fp;
-{
- vm_offset_t buf;
- mach_msg_type_number_t buf_size;
- register struct fs *fs;
- daddr_t disk_block;
- kern_return_t rc;
-
- fs = fp->f_fs;
- disk_block = itod(fs, inumber);
-
- rc = device_read(fp->f_dev,
- 0,
- (recnum_t) fsbtodb(fp->f_fs, disk_block),
- (int) fs->fs_bsize,
- (char **)&buf,
- &buf_size);
- if (rc != KERN_SUCCESS)
- return (rc);
-
- {
- register struct dinode *dp;
-
- dp = (struct dinode *)buf;
- dp += itoo(fs, inumber);
- fp->i_ic = dp->di_ic;
- fp->f_size = fp->i_size;
- }
-
- (void) vm_deallocate(mach_task_self(), buf, buf_size);
-
- /*
- * Clear out the old buffers
- */
- free_file_buffers(fp);
-
- return (0);
-}
-
-/*
- * Given an offset in a file, find the disk block number that
- * contains that block.
- */
-static int
-block_map(fp, file_block, disk_block_p)
- struct file *fp;
- daddr_t file_block;
- daddr_t *disk_block_p; /* out */
-{
- int level;
- int idx;
- daddr_t ind_block_num;
- kern_return_t rc;
-
- vm_offset_t olddata[NIADDR+1];
- vm_size_t oldsize[NIADDR+1];
-
- /*
- * Index structure of an inode:
- *
- * i_db[0..NDADDR-1] hold block numbers for blocks
- * 0..NDADDR-1
- *
- * i_ib[0] index block 0 is the single indirect
- * block
- * holds block numbers for blocks
- * NDADDR .. NDADDR + NINDIR(fs)-1
- *
- * i_ib[1] index block 1 is the double indirect
- * block
- * holds block numbers for INDEX blocks
- * for blocks
- * NDADDR + NINDIR(fs) ..
- * NDADDR + NINDIR(fs) + NINDIR(fs)**2 - 1
- *
- * i_ib[2] index block 2 is the triple indirect
- * block
- * holds block numbers for double-indirect
- * blocks for blocks
- * NDADDR + NINDIR(fs) + NINDIR(fs)**2 ..
- * NDADDR + NINDIR(fs) + NINDIR(fs)**2
- * + NINDIR(fs)**3 - 1
- */
-
- mutex_lock(&fp->f_lock);
-
- if (file_block < NDADDR) {
- /* Direct block. */
- *disk_block_p = fp->i_db[file_block];
- mutex_unlock(&fp->f_lock);
- return (0);
- }
-
- file_block -= NDADDR;
-
- /*
- * nindir[0] = NINDIR
- * nindir[1] = NINDIR**2
- * nindir[2] = NINDIR**3
- * etc
- */
- for (level = 0; level < NIADDR; level++) {
- if (file_block < fp->f_nindir[level])
- break;
- file_block -= fp->f_nindir[level];
- }
- if (level == NIADDR) {
- /* Block number too high */
- mutex_unlock(&fp->f_lock);
- return (FS_NOT_IN_FILE);
- }
-
- ind_block_num = fp->i_ib[level];
-
- /*
- * Initialize array of blocks to free.
- */
- for (idx = 0; idx < NIADDR; idx++)
- oldsize[idx] = 0;
-
- for (; level >= 0; level--) {
-
- vm_offset_t data;
- mach_msg_type_number_t size;
-
- if (ind_block_num == 0)
- break;
-
- if (fp->f_blkno[level] == ind_block_num) {
- /*
- * Cache hit. Just pick up the data.
- */
-
- data = fp->f_blk[level];
- }
- else {
- /*
- * Drop our lock while doing the read.
- * (The f_dev and f_fs fields don`t change.)
- */
- mutex_unlock(&fp->f_lock);
-
- rc = device_read(fp->f_dev,
- 0,
- (recnum_t) fsbtodb(fp->f_fs, ind_block_num),
- fp->f_fs->fs_bsize,
- (char **)&data,
- &size);
- if (rc != KERN_SUCCESS)
- return (rc);
-
- /*
- * See if we can cache the data. Need a write lock to
- * do this. While we hold the write lock, we can`t do
- * *anything* which might block for memory. Otherwise
- * a non-privileged thread might deadlock with the
- * privileged threads. We can`t block while taking the
- * write lock. Otherwise a non-privileged thread
- * blocked in the vm_deallocate (while holding a read
- * lock) will block a privileged thread. For the same
- * reason, we can`t take a read lock and then use
- * lock_read_to_write.
- */
-
- mutex_lock(&fp->f_lock);
-
- olddata[level] = fp->f_blk[level];
- oldsize[level] = fp->f_blksize[level];
-
- fp->f_blkno[level] = ind_block_num;
- fp->f_blk[level] = data;
- fp->f_blksize[level] = size;
-
- /*
- * Return to holding a read lock, and
- * dispose of old data.
- */
-
- }
-
- if (level > 0) {
- idx = file_block / fp->f_nindir[level-1];
- file_block %= fp->f_nindir[level-1];
- }
- else
- idx = file_block;
-
- ind_block_num = ((daddr_t *)data)[idx];
- }
-
- mutex_unlock(&fp->f_lock);
-
- /*
- * After unlocking the file, free any blocks that
- * we need to free.
- */
- for (idx = 0; idx < NIADDR; idx++)
- if (oldsize[idx] != 0)
- (void) vm_deallocate(mach_task_self(),
- olddata[idx],
- oldsize[idx]);
-
- *disk_block_p = ind_block_num;
- return (0);
-}
-
-/*
- * Read a portion of a file into an internal buffer. Return
- * the location in the buffer and the amount in the buffer.
- */
-static int
-buf_read_file(fp, offset, buf_p, size_p)
- register struct file *fp;
- vm_offset_t offset;
- vm_offset_t *buf_p; /* out */
- vm_size_t *size_p; /* out */
-{
- register struct fs *fs;
- vm_offset_t off;
- register daddr_t file_block;
- daddr_t disk_block;
- int rc;
- vm_offset_t block_size;
-
- if (offset >= fp->i_size)
- return (FS_NOT_IN_FILE);
-
- fs = fp->f_fs;
-
- off = blkoff(fs, offset);
- file_block = lblkno(fs, offset);
- block_size = blksize(fs, fp, file_block);
-
- if (file_block != fp->f_buf_blkno) {
- rc = block_map(fp, file_block, &disk_block);
- if (rc != 0)
- return (rc);
-
- if (fp->f_buf)
- (void)vm_deallocate(mach_task_self(),
- fp->f_buf,
- fp->f_buf_size);
-
- if (disk_block == 0) {
- (void)vm_allocate(mach_task_self(),
- &fp->f_buf,
- block_size,
- TRUE);
- fp->f_buf_size = block_size;
- }
- else {
- rc = device_read(fp->f_dev,
- 0,
- (recnum_t) fsbtodb(fs, disk_block),
- (int) block_size,
- (char **) &fp->f_buf,
- (mach_msg_type_number_t *)&fp->f_buf_size);
- }
- if (rc)
- return (rc);
-
- fp->f_buf_blkno = file_block;
- }
-
- /*
- * Return address of byte in buffer corresponding to
- * offset, and size of remainder of buffer after that
- * byte.
- */
- *buf_p = fp->f_buf + off;
- *size_p = block_size - off;
-
- /*
- * But truncate buffer at end of file.
- */
- if (*size_p > fp->i_size - offset)
- *size_p = fp->i_size - offset;
-
- return (0);
-}
-
-/* In 4.4 d_reclen is split into d_type and d_namlen */
-struct dirent_44 {
- unsigned long d_fileno;
- unsigned short d_reclen;
- unsigned char d_type;
- unsigned char d_namlen;
- char d_name[255 + 1];
-};
-
-/*
- * Search a directory for a name and return its
- * i_number.
- */
-static int
-search_directory(name, fp, inumber_p)
- char * name;
- register struct file *fp;
- ino_t *inumber_p; /* out */
-{
- vm_offset_t buf;
- vm_size_t buf_size;
- vm_offset_t offset;
- register struct dirent_44 *dp;
- int length;
- kern_return_t rc;
-
- length = strlen(name);
-
- offset = 0;
- while (offset < fp->i_size) {
- rc = buf_read_file(fp, offset, &buf, &buf_size);
- if (rc != KERN_SUCCESS)
- return (rc);
-
- dp = (struct dirent_44 *)buf;
- if (dp->d_ino != 0) {
- unsigned short namlen = dp->d_namlen;
- /*
- * If namlen is zero, then either this is a 4.3 file
- * system or the namlen is really zero. In the latter
- * case also the 4.3 d_namlen field is zero
- * interpreted either way.
- */
- if (namlen == 0)
- namlen = ((struct direct *)dp)->d_namlen;
-
- if (namlen == length &&
- !strcmp(name, dp->d_name))
- {
- /* found entry */
- *inumber_p = dp->d_ino;
- return (0);
- }
- }
- offset += dp->d_reclen;
- }
- return (FS_NO_ENTRY);
-}
-
-static int
-read_fs(dev, fsp)
- mach_port_t dev;
- struct fs **fsp;
-{
- register struct fs *fs;
- vm_offset_t buf;
- mach_msg_type_number_t buf_size;
- int error;
-
- error = device_read(dev, 0, (recnum_t) SBLOCK, SBSIZE,
- (char **) &buf, &buf_size);
- if (error)
- return (error);
-
- fs = (struct fs *)buf;
- if (fs->fs_magic != FS_MAGIC ||
- fs->fs_bsize > MAXBSIZE ||
- fs->fs_bsize < sizeof(struct fs)) {
- (void) vm_deallocate(mach_task_self(), buf, buf_size);
- return (FS_INVALID_FS);
- }
- /* don't read cylinder groups - we aren't modifying anything */
-
- *fsp = fs;
- return 0;
-}
-
-static int
-mount_fs(fp)
- register struct file *fp;
-{
- register struct fs *fs;
- int error;
-
- error = read_fs(fp->f_dev, &fp->f_fs);
- if (error)
- return (error);
- fs = fp->f_fs;
-
- /*
- * Calculate indirect block levels.
- */
- {
- register int mult;
- register int level;
-
- mult = 1;
- for (level = 0; level < NIADDR; level++) {
- mult *= NINDIR(fs);
- fp->f_nindir[level] = mult;
- }
- }
-
- return (0);
-}
-
-static void
-unmount_fs(fp)
- register struct file *fp;
-{
- if (file_is_structured(fp)) {
- (void) vm_deallocate(mach_task_self(),
- (vm_offset_t) fp->f_fs,
- SBSIZE);
- fp->f_fs = 0;
- }
-}
-
-/*
- * Open a file.
- */
-int
-ffs_open_file(master_device_port, path, fp)
- mach_port_t master_device_port;
- char * path;
- struct file *fp;
-{
-#define RETURN(code) { rc = (code); goto exit; }
-
- register char *cp, *component;
- register int c; /* char */
- register int rc;
- ino_t inumber, parent_inumber;
- int nlinks = 0;
-
- char namebuf[MAXPATHLEN+1];
-
- if (path == 0 || *path == '\0') {
- return FS_NO_ENTRY;
- }
-
- /*
- * Copy name into buffer to allow modifying it.
- */
- strcpy(namebuf, path);
-
- /*
- * Look for '/dev/xxx' at start of path, for
- * root device.
- */
- if (!strprefix(namebuf, "/dev/")) {
- printf("no device name\n");
- return FS_NO_ENTRY;
- }
-
- cp = namebuf + 5; /* device */
- component = cp;
- while ((c = *cp) != '\0' && c != '/') {
- cp++;
- }
- *cp = '\0';
-
- bzero (fp, sizeof (struct file));
-
- rc = device_open(master_device_port,
- D_READ|D_WRITE,
- component,
- &fp->f_dev);
- if (rc)
- return rc;
-
- if (c == 0) {
- fp->f_fs = 0;
- goto out_ok;
- }
-
- *cp = c;
-
- rc = mount_fs(fp);
- if (rc)
- return rc;
-
- inumber = (ino_t) ROOTINO;
- if ((rc = read_inode(inumber, fp)) != 0) {
- printf("can't read root inode\n");
- goto exit;
- }
-
- while (*cp) {
-
- /*
- * Check that current node is a directory.
- */
- if ((fp->i_mode & IFMT) != IFDIR)
- RETURN (FS_NOT_DIRECTORY);
-
- /*
- * Remove extra separators
- */
- while (*cp == '/')
- cp++;
-
- /*
- * Get next component of path name.
- */
- component = cp;
- {
- register int len = 0;
-
- while ((c = *cp) != '\0' && c != '/') {
- if (len++ > MAXNAMLEN)
- RETURN (FS_NAME_TOO_LONG);
- if (c & 0200)
- RETURN (FS_INVALID_PARAMETER);
- cp++;
- }
- *cp = 0;
- }
-
- /*
- * Look up component in current directory.
- * Save directory inumber in case we find a
- * symbolic link.
- */
- parent_inumber = inumber;
- rc = search_directory(component, fp, &inumber);
- if (rc) {
- printf("%s: not found\n", path);
- goto exit;
- }
- *cp = c;
-
- /*
- * Open next component.
- */
- if ((rc = read_inode(inumber, fp)) != 0)
- goto exit;
-
- /*
- * Check for symbolic link.
- */
- if ((fp->i_mode & IFMT) == IFLNK) {
-
- int link_len = fp->i_size;
- int len;
-
- len = strlen(cp) + 1;
-
- if (link_len + len >= MAXPATHLEN - 1)
- RETURN (FS_NAME_TOO_LONG);
-
- if (++nlinks > MAXSYMLINKS)
- RETURN (FS_SYMLINK_LOOP);
-
- memmove (&namebuf[link_len], cp, len);
-
-#ifdef IC_FASTLINK
- if ((fp->i_flags & IC_FASTLINK) != 0) {
- bcopy(fp->i_symlink, namebuf, (unsigned) link_len);
- }
- else
-#endif /* IC_FASTLINK */
-#if !defined(DISABLE_BSD44_FASTLINKS)
- /*
- * There is no bit for fastlinks in 4.4 but instead
- * all symlinks that fit into the inode are fastlinks.
- * If the second block (ic_db[1]) is zero the symlink
- * can't be a fastlink if its length is at least five.
- * For symlinks of length one to four there is no easy
- * way of knowing whether we are looking at a 4.4
- * fastlink or a 4.3 slowlink. This code always
- * guesses the 4.4 way when in doubt. THIS BREAKS 4.3
- * SLOWLINKS OF LENGTH FOUR OR LESS.
- */
- if ((link_len <= MAX_FASTLINK_SIZE && fp->i_ic.ic_db[1] != 0)
- || (link_len <= 4))
- {
- bcopy(fp->i_symlink, namebuf, (unsigned) link_len);
- }
- else
-#endif /* !DISABLE_BSD44_FASTLINKS */
-
- {
- /*
- * Read file for symbolic link
- */
- vm_offset_t buf;
- mach_msg_type_number_t buf_size;
- daddr_t disk_block;
- register struct fs *fs = fp->f_fs;
-
- (void) block_map(fp, (daddr_t)0, &disk_block);
- rc = device_read(fp->f_dev,
- 0,
- (recnum_t) fsbtodb(fs, disk_block),
- (int) blksize(fs, fp, 0),
- (char **) &buf,
- &buf_size);
- if (rc)
- goto exit;
-
- bcopy((char *)buf, namebuf, (unsigned)link_len);
- (void) vm_deallocate(mach_task_self(), buf, buf_size);
- }
-
- /*
- * If relative pathname, restart at parent directory.
- * If absolute pathname, restart at root.
- * If pathname begins '/dev/<device>/',
- * restart at root of that device.
- */
- cp = namebuf;
- if (*cp != '/') {
- inumber = parent_inumber;
- }
- else if (!strprefix(cp, "/dev/")) {
- inumber = (ino_t)ROOTINO;
- }
- else {
- cp += 5;
- component = cp;
- while ((c = *cp) != '\0' && c != '/') {
- cp++;
- }
- *cp = '\0';
-
- /*
- * Unmount current file system and free buffers.
- */
- close_file(fp);
-
- /*
- * Open new root device.
- */
- rc = device_open(master_device_port,
- D_READ,
- component,
- &fp->f_dev);
- if (rc)
- return (rc);
-
- if (c == 0) {
- fp->f_fs = 0;
- goto out_ok;
- }
-
- *cp = c;
-
- rc = mount_fs(fp);
- if (rc)
- return (rc);
-
- inumber = (ino_t)ROOTINO;
- }
- if ((rc = read_inode(inumber, fp)) != 0)
- goto exit;
- }
- }
-
- /*
- * Found terminal component.
- */
- out_ok:
- mutex_init(&fp->f_lock);
- return 0;
-
- /*
- * At error exit, close file to free storage.
- */
- exit:
- close_file(fp);
- return rc;
-}
-
-/*
- * Close file - free all storage used.
- */
-void
-ffs_close_file(fp)
- register struct file *fp;
-{
- register int i;
-
- /*
- * Free the disk super-block.
- */
- unmount_fs(fp);
-
- /*
- * Free the inode and data buffers.
- */
- free_file_buffers(fp);
-}
-
-int
-ffs_file_is_directory(struct file *fp)
-{
- return (fp->i_mode & IFMT) == IFDIR;
-}
-
-int
-ffs_file_is_regular(struct file *fp)
-{
- return (fp->i_mode & IFMT) == IFREG;
-}
-
-/*
- * Copy a portion of a file into kernel memory.
- * Cross block boundaries when necessary.
- */
-int
-ffs_read_file(fp, offset, start, size, resid)
- register struct file *fp;
- vm_offset_t offset;
- vm_offset_t start;
- vm_size_t size;
- vm_size_t *resid; /* out */
-{
- int rc;
- register vm_size_t csize;
- vm_offset_t buf;
- vm_size_t buf_size;
-
- while (size != 0) {
- rc = buf_read_file(fp, offset, &buf, &buf_size);
- if (rc)
- return (rc);
-
- csize = size;
- if (csize > buf_size)
- csize = buf_size;
- if (csize == 0)
- break;
-
- bcopy((char *)buf, (char *)start, csize);
-
- offset += csize;
- start += csize;
- size -= csize;
- }
- if (resid)
- *resid = size;
-
- return (0);
-}
-
-/* simple utility: only works for 2^n */
-static int
-log2(n)
- register unsigned int n;
-{
- register int i = 0;
-
- while ((n & 1) == 0) {
- i++;
- n >>= 1;
- }
- return i;
-}
-
-/*
- * Make an empty file_direct for a device.
- */
-int
-ffs_open_file_direct(dev, fdp, is_structured)
- mach_port_t dev;
- register struct file_direct *fdp;
- boolean_t is_structured;
-{
- struct fs *fs;
- int rc;
-
- if (!is_structured) {
- fdp->fd_dev = dev;
- fdp->fd_blocks = (daddr_t *) 0;
- fdp->fd_bsize = vm_page_size;
- fdp->fd_bshift = log2(vm_page_size);
- fdp->fd_fsbtodb = 0; /* later */
- fdp->fd_size = 0; /* later */
- return 0;
- }
-
- rc = read_fs(dev, &fs);
- if (rc)
- return rc;
-
- fdp->fd_dev = dev;
- fdp->fd_blocks = (daddr_t *) 0;
- fdp->fd_size = 0;
- fdp->fd_bsize = fs->fs_bsize;
- fdp->fd_bshift = fs->fs_bshift;
- fdp->fd_fsbtodb = fs->fs_fsbtodb;
-
- (void) vm_deallocate(mach_task_self(),
- (vm_offset_t) fs,
- SBSIZE);
-
- return 0;
-}
-
-/*
- * Add blocks from a file to a file_direct.
- */
-int
-ffs_add_file_direct(fdp, fp)
- register struct file_direct *fdp;
- register struct file *fp;
-{
- register struct fs *fs;
- long num_blocks, i;
- vm_offset_t buffer;
- vm_size_t size;
- int rc;
-
- /* the file must be on the same device */
-
- if (fdp->fd_dev != fp->f_dev)
- return FS_INVALID_FS;
-
- if (!file_is_structured(fp)) {
- int result[DEV_GET_SIZE_COUNT];
- natural_t count;
-
- count = DEV_GET_SIZE_COUNT;
- rc = device_get_status( fdp->fd_dev, DEV_GET_SIZE,
- result, &count);
- if (rc)
- return rc;
- fdp->fd_size = result[DEV_GET_SIZE_DEVICE_SIZE] >> fdp->fd_bshift;
- fdp->fd_fsbtodb = log2(fdp->fd_bsize/result[DEV_GET_SIZE_RECORD_SIZE]);
- return 0;
- }
-
- /* it must hold a file system */
-
- fs = fp->f_fs;
- if (fdp->fd_bsize != fs->fs_bsize ||
- fdp->fd_fsbtodb != fs->fs_fsbtodb)
- return FS_INVALID_FS;
-
- /* calculate number of blocks in the file, ignoring fragments */
-
- num_blocks = lblkno(fs, fp->i_size);
-
- /* allocate memory for a bigger array */
-
- size = (num_blocks + fdp->fd_size) * sizeof(daddr_t);
- rc = vm_allocate(mach_task_self(), &buffer, size, TRUE);
- if (rc != KERN_SUCCESS)
- return rc;
-
- /* lookup new block addresses */
-
- for (i = 0; i < num_blocks; i++) {
- daddr_t disk_block;
-
- rc = block_map(fp, (daddr_t) i, &disk_block);
- if (rc != 0) {
- (void) vm_deallocate(mach_task_self(), buffer, size);
- return rc;
- }
-
- ((daddr_t *) buffer)[fdp->fd_size + i] = disk_block;
- }
-
- /* copy old addresses and install the new array */
-
- if (fdp->fd_blocks != 0) {
- bcopy((char *) fdp->fd_blocks, (char *) buffer,
- fdp->fd_size * sizeof(daddr_t));
-
- (void) vm_deallocate(mach_task_self(),
- (vm_offset_t) fdp->fd_blocks,
- (vm_size_t) (fdp->fd_size * sizeof(daddr_t)));
- }
- fdp->fd_blocks = (daddr_t *) buffer;
- fdp->fd_size += num_blocks;
-
- /* deallocate cached blocks */
-
- free_file_buffers(fp);
-
- return 0;
-}
-
-int
-ffs_remove_file_direct(fdp)
- struct file_direct *fdp;
-{
- if (fdp->fd_blocks)
- (void) vm_deallocate(mach_task_self(),
- (vm_offset_t) fdp->fd_blocks,
- (vm_size_t) (fdp->fd_size * sizeof(daddr_t)));
- fdp->fd_blocks = 0; /* sanity */
- /* xxx should lose a ref to fdp->fd_dev here (and elsewhere) xxx */
-}
diff --git a/serverboot/file_io.c b/serverboot/file_io.c
deleted file mode 100644
index 99966f95..00000000
--- a/serverboot/file_io.c
+++ /dev/null
@@ -1,317 +0,0 @@
-/*
- * Copyright (c) 1994 The University of Utah and
- * the Computer Systems Laboratory at the University of Utah (CSL).
- * All rights reserved.
- *
- * Permission to use, copy, modify and distribute this software is hereby
- * granted provided that (1) source code retains these copyright, permission,
- * and disclaimer notices, and (2) redistributions including binaries
- * reproduce the notices in supporting documentation, and (3) all advertising
- * materials mentioning features or use of this software display the following
- * acknowledgement: ``This product includes software developed by the
- * Computer Systems Laboratory at the University of Utah.''
- *
- * THE UNIVERSITY OF UTAH AND CSL ALLOW FREE USE OF THIS SOFTWARE IN ITS "AS
- * IS" CONDITION. THE UNIVERSITY OF UTAH AND CSL DISCLAIM ANY LIABILITY OF
- * ANY KIND FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
- *
- * CSL requests users of this software to return to csl-dist@cs.utah.edu any
- * improvements that they make and grant CSL redistribution rights.
- *
- * Author: Bryan Ford, University of Utah CSL
- * MINIX FS patches: Csizmazia Balazs, University ELTE, Hungary
- */
-/* This is just an icky kludgy "VFS layer" (harhar) for ffs and ext2 and minix. */
-
-#include "file_io.h"
-
-int
-open_file(master_device_port, path, fp)
- mach_port_t master_device_port;
- char * path;
- struct file *fp;
-{
- int rc;
-
- if ((rc = ext2_open_file(master_device_port, path, fp))
- != FS_INVALID_FS)
- {
- if (rc == 0)
- fp->f_fstype = EXT2_FS;
- return rc;
- }
- if ( (rc = minix_open_file(master_device_port, path, fp))
- != FS_INVALID_FS )
- {
- if (rc == 0)
- fp->f_fstype = MINIX_FS;
- return rc;
- }
- fp->f_fstype = BSD_FFS;
- return ffs_open_file(master_device_port, path, fp);
-}
-
-void
-close_file(fp)
- register struct file *fp;
-{
- switch (fp->f_fstype) {
- case EXT2_FS:
- ext2_close_file(fp);
- return;
- case MINIX_FS:
- minix_close_file(fp);
- return;
- default:
- ffs_close_file(fp);
- return;
- }
-}
-
-int
-read_file(fp, offset, start, size, resid)
- register struct file *fp;
- vm_offset_t offset;
- vm_offset_t start;
- vm_size_t size;
- vm_size_t *resid; /* out */
-{
- switch (fp->f_fstype) {
- case EXT2_FS:
- return ext2_read_file(fp, offset, start, size, resid);
- case MINIX_FS:
- return minix_read_file(fp, offset, start, size, resid);
- default:
- return ffs_read_file(fp, offset, start, size, resid);
- }
-
-}
-
-int
-file_is_directory(struct file *f)
-{
- switch (f->f_fstype) {
- case EXT2_FS:
- return ext2_file_is_directory(f);
- case MINIX_FS:
- return minix_file_is_directory(f);
- default:
- return ffs_file_is_directory(f);
- }
-}
-
-int
-file_is_regular(struct file *f)
-{
- switch (f->f_fstype) {
- case EXT2_FS:
- return ext2_file_is_regular(f);
- case MINIX_FS:
- return minix_file_is_regular(f);
- default:
- return ffs_file_is_regular(f);
- }
-
-}
-
-int
-open_file_direct(dev, fdp, is_structured)
- mach_port_t dev;
- register struct file_direct *fdp;
- boolean_t is_structured;
-{
- int rc;
-
-
- if ((rc = ext2_open_file_direct(dev, fdp, is_structured))
- != FS_INVALID_FS)
- {
- if (rc == 0)
- fdp->f_fstype = EXT2_FS;
- return rc;
- }
- if ( (rc = minix_open_file_direct(dev, fdp, is_structured) )
- != FS_INVALID_FS )
- {
- if (rc == 0)
- fdp->f_fstype = MINIX_FS;
- return rc;
- }
- fdp->f_fstype = BSD_FFS;
- return ffs_open_file_direct(dev, fdp, is_structured);
-}
-
-int
-add_file_direct(fdp, fp)
- register struct file_direct *fdp;
- register struct file *fp;
-{
- switch (fp->f_fstype) {
- case EXT2_FS:
- return ext2_add_file_direct(fdp, fp);
- case MINIX_FS:
- return minix_add_file_direct(fdp, fp);
- default:
- return ffs_add_file_direct(fdp, fp);
- }
-}
-
-
-int
-remove_file_direct(fdp)
- struct file_direct *fdp;
-{
- switch (fdp->f_fstype) {
- case EXT2_FS:
- return ext2_remove_file_direct(fdp);
- case MINIX_FS:
- return minix_remove_file_direct(fdp);
- default:
- return ffs_remove_file_direct(fdp);
- }
-}
-
-/*
- * some other stuff, that was previously defined as macro
- */
-
-int
-file_is_structured(fp)
- register struct file *fp;
-{
- switch (fp->f_fstype) {
- case EXT2_FS:
- return (fp)->u.ext2.ext2_fs != 0;
- case MINIX_FS:
- return (fp)->u.minix.minix_fs != 0;
- default:
- return (fp)->u.ffs.ffs_fs != 0;
- }
-}
-
-/*
- * Special read and write routines for default pager.
- * Assume that all offsets and sizes are multiples
- * of DEV_BSIZE.
- */
-
-#define fdir_blkoff(fdp, offset) /* offset % fd_bsize */ \
- ((offset) & ((fdp)->fd_bsize - 1))
-#define fdir_lblkno(fdp, offset) /* offset / fd_bsize */ \
- ((offset) >> (fdp)->fd_bshift)
-
-#define fdir_fsbtodb(fdp, block) /* offset * fd_bsize / DEV_BSIZE */ \
- ((block) << (fdp)->fd_fsbtodb)
-
-/*
- * Read all or part of a data block, and
- * return a pointer to the appropriate part.
- * Caller must deallocate the block when done.
- */
-int
-page_read_file_direct(fdp, offset, size, addr, size_read)
- register struct file_direct *fdp;
- vm_offset_t offset;
- vm_size_t size;
- vm_offset_t *addr; /* out */
- mach_msg_type_number_t *size_read; /* out */
-{
- vm_offset_t off;
- register daddr_t file_block;
- daddr_t disk_block;
-
- if (offset % DEV_BSIZE != 0 ||
- size % DEV_BSIZE != 0)
- panic("page_read_file_direct");
-
- if (offset >= (fdp->fd_size << fdp->fd_bshift))
- return (FS_NOT_IN_FILE);
-
- off = fdir_blkoff(fdp, offset);
- file_block = fdir_lblkno(fdp, offset);
-
- if (file_is_device(fdp)) {
- disk_block = file_block;
- } else {
- disk_block = fdp->fd_blocks[file_block];
- if (disk_block == 0)
- return (FS_NOT_IN_FILE);
-
- if (size > fdp->fd_bsize) {
- /* Read only as much as is contiguous on disk. */
- daddr_t b = file_block + 1;
- while (b < file_block + fdp->fd_size &&
- fdp->fd_blocks[b] == disk_block + fdir_fsbtodb(fdp, 1))
- ++b;
- size = (b - file_block) * fdp->fd_bsize;
- }
- }
-
- return (device_read(fdp->fd_dev,
- 0,
- (recnum_t) (fdir_fsbtodb(fdp, disk_block) + btodb(off)),
- (int) size,
- (char **) addr,
- size_read));
-}
-
-/*
- * Write all or part of a data block, and
- * return the amount written.
- */
-int
-page_write_file_direct(fdp, offset, addr, size, size_written)
- register struct file_direct *fdp;
- vm_offset_t offset;
- vm_offset_t addr;
- vm_size_t size;
- vm_offset_t *size_written; /* out */
-{
- vm_offset_t off;
- register daddr_t file_block;
- daddr_t disk_block;
- int rc, num_written;
- vm_offset_t block_size;
-
- if (offset % DEV_BSIZE != 0 ||
- size % DEV_BSIZE != 0)
- panic("page_write_file");
-
- if (offset >= (fdp->fd_size << fdp->fd_bshift))
- return (FS_NOT_IN_FILE);
-
- off = fdir_blkoff(fdp, offset);
- file_block = fdir_lblkno(fdp, offset);
-
- if (file_is_device(fdp)) {
- disk_block = file_block;
- } else {
- disk_block = fdp->fd_blocks[file_block];
- if (disk_block == 0)
- return (FS_NOT_IN_FILE);
-
- if (size > fdp->fd_bsize) {
- /* Write only as much as is contiguous on disk. */
- daddr_t b = file_block + 1;
- while (b < file_block + fdp->fd_size &&
- fdp->fd_blocks[b] == disk_block + fdir_fsbtodb(fdp, 1))
- ++b;
- size = (b - file_block) * fdp->fd_bsize;
- }
- }
-
- /*
- * Write the data. Wait for completion to keep
- * reads from getting ahead of writes and reading
- * stale data.
- */
- rc = device_write(
- fdp->fd_dev,
- 0,
- (recnum_t) (fdir_fsbtodb(fdp, disk_block) + btodb(off)),
- (char *) addr,
- size,
- &num_written);
- *size_written = num_written;
- return rc;
-}
diff --git a/serverboot/file_io.h b/serverboot/file_io.h
deleted file mode 100644
index 323e4e9a..00000000
--- a/serverboot/file_io.h
+++ /dev/null
@@ -1,200 +0,0 @@
-/*
- * Mach Operating System
- * Copyright (c) 1991,1990,1989,1988 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.
- */
-
-#ifndef _FILE_IO_H_
-#define _FILE_IO_H_
-
-/*
- * Read-only file IO.
- */
-
-#include <mach.h>
-#include <cthreads.h>
-
-#include <stdint.h>
-#include <device/device_types.h>
-
-/* Types used by the ext2 header files. */
-typedef u_int32_t __u32;
-typedef int32_t __s32;
-typedef u_int16_t __u16;
-typedef int16_t __s16;
-typedef u_int8_t __u8;
-typedef int8_t __s8;
-
-#include <defs.h>
-#include "minix_fs.h"
-#include "../ext2fs/ext2_fs.h" /* snarf stolen linux header from ext2fs */
-#include "disk_inode.h"
-
-#define BSD_FFS 0
-#define EXT2_FS 1
-#define MINIX_FS 2
-
-#define EXT2_NIADDR (EXT2_N_BLOCKS - EXT2_NDIR_BLOCKS)
-
-/*
- * In-core open file.
- */
-struct file {
- struct mutex f_lock; /* lock */
- mach_port_t f_dev; /* port to device */
- vm_offset_t f_buf; /* buffer for data block */
- vm_size_t f_buf_size; /* size of data block */
- daddr_t f_buf_blkno; /* block number of data block */
- vm_size_t f_size; /* size in bytes of the file */
-
- int f_fstype; /* contains fs-id */
-
- union {
- struct {
- struct fs * ffs_fs; /* pointer to super-block */
- struct icommon ffs_ic; /* copy of on-disk inode */
-
- /* number of blocks mapped by
- indirect block at level i */
- int ffs_nindir[FFS_NIADDR+1];
-
- /* buffer for indirect block at level i */
- vm_offset_t ffs_blk[FFS_NIADDR];
-
- /* size of buffer */
- vm_size_t ffs_blksize[FFS_NIADDR];
-
- /* disk address of block in buffer */
- daddr_t ffs_blkno[FFS_NIADDR];
- } ffs;
- struct {
- /* pointer to super-block */
- struct ext2_super_block*ext2_fs;
-
- /* pointer to group descriptors */
- struct ext2_group_desc* ext2_gd;
-
- /* size of group descriptors */
- vm_size_t ext2_gd_size;
-
- /* copy of on-disk inode */
- struct ext2_inode ext2_ic;
-
- /* number of blocks mapped by
- indirect block at level i */
- int ext2_nindir[EXT2_NIADDR+1];
-
- /* buffer for indirect block at level i */
- vm_offset_t ext2_blk[EXT2_NIADDR];
-
- /* size of buffer */
- vm_size_t ext2_blksize[EXT2_NIADDR];
-
- /* disk address of block in buffer */
- daddr_t ext2_blkno[EXT2_NIADDR];
- } ext2;
- struct {
- /* pointer to super-block */
- struct minix_super_block* minix_fs;
-
- /* copy of on-disk inode */
- struct minix_inode minix_ic;
-
- /* number of blocks mapped by
- indirect block at level i */
- int minix_nindir[MINIX_NIADDR+1];
-
- /* buffer for indirect block at level i */
- vm_offset_t minix_blk[MINIX_NIADDR];
-
- /* size of buffer */
- vm_size_t minix_blksize[MINIX_NIADDR];
-
- /* disk address of block in buffer */
- minix_daddr_t minix_blkno[MINIX_NIADDR];
- } minix;
- } u;
-};
-
-/*
- * In-core open file, with in-core block map.
- */
-struct file_direct {
- int f_fstype; /* XXX was: true if ext2, false if ffs */
-
- mach_port_t fd_dev; /* port to device */
- daddr_t * fd_blocks; /* array of disk block addresses */
- long fd_size; /* number of blocks in the array */
- long fd_bsize; /* disk block size */
- long fd_bshift; /* log2(fd_bsize) */
- long fd_fsbtodb; /* log2(fd_bsize / disk sector size) */
-};
-
-#define file_is_device(_fd_) ((_fd_)->fd_blocks == 0)
-
-/*
- * Exported routines.
- */
-
-extern int open_file();
-extern void close_file();
-extern int read_file();
-
-extern int open_file_direct();
-extern int add_file_direct();
-extern int remove_file_direct();
-extern int file_wire_direct();
-extern int page_read_file_direct();
-extern int page_write_file_direct();
-
-/*
- * Error codes for file system errors.
- */
-
-#include <errno.h>
-
-/* Just use the damn Hurd error numbers. This is old CMU/Utah code from
- the days of personality-independent Mach where it made sense for this to
- be a standalone universe. In the Hurd, we compile serverboot against
- the regular C library anyway. */
-
-#define FS_NOT_DIRECTORY ENOTDIR
-#define FS_NO_ENTRY ENOENT
-#define FS_NAME_TOO_LONG ENAMETOOLONG
-#define FS_SYMLINK_LOOP ELOOP
-#define FS_INVALID_FS EFTYPE /* ? */
-#define FS_NOT_IN_FILE EINVAL
-#define FS_INVALID_PARAMETER EINVAL
-
-#if 0
-#define FS_NOT_DIRECTORY 5000 /* not a directory */
-#define FS_NO_ENTRY 5001 /* name not found */
-#define FS_NAME_TOO_LONG 5002 /* name too long */
-#define FS_SYMLINK_LOOP 5003 /* symbolic link loop */
-#define FS_INVALID_FS 5004 /* bad file system */
-#define FS_NOT_IN_FILE 5005 /* offset not in file */
-#define FS_INVALID_PARAMETER 5006 /* bad parameter to routine */
-#endif
-
-
-#endif /* _FILE_IO_H_ */
diff --git a/serverboot/fs.h b/serverboot/fs.h
deleted file mode 100644
index 5809ed93..00000000
--- a/serverboot/fs.h
+++ /dev/null
@@ -1,455 +0,0 @@
-/*
- * Mach Operating System
- * Copyright (c) 1991,1990 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.
- */
-/*
- * Copyright (c) 1982, 1986 Regents of the University of California.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms are permitted
- * provided that the above copyright notice and this paragraph are
- * duplicated in all such forms and that any documentation,
- * advertising materials, and other materials related to such
- * distribution and use acknowledge that the software was developed
- * by the University of California, Berkeley. The name of the
- * University may not be used to endorse or promote products derived
- * from this software without specific prior written permission.
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * @(#)fs.h 7.7 (Berkeley) 5/9/89
- */
-
-/*
- * Each disk drive contains some number of file systems.
- * A file system consists of a number of cylinder groups.
- * Each cylinder group has inodes and data.
- *
- * A file system is described by its super-block, which in turn
- * describes the cylinder groups. The super-block is critical
- * data and is replicated in each cylinder group to protect against
- * catastrophic loss. This is done at `newfs' time and the critical
- * super-block data does not change, so the copies need not be
- * referenced further unless disaster strikes.
- *
- * For file system fs, the offsets of the various blocks of interest
- * are given in the super block as:
- * [fs->fs_sblkno] Super-block
- * [fs->fs_cblkno] Cylinder group block
- * [fs->fs_iblkno] Inode blocks
- * [fs->fs_dblkno] Data blocks
- * The beginning of cylinder group cg in fs, is given by
- * the ``cgbase(fs, cg)'' macro.
- *
- * The first boot and super blocks are given in absolute disk addresses.
- * The byte-offset forms are preferred, as they don't imply a sector size.
- */
-#define BBSIZE 8192
-#define SBSIZE 8192
-#define BBOFF ((off_t)(0))
-#define SBOFF ((off_t)(BBOFF + BBSIZE))
-#define BBLOCK ((daddr_t)(0))
-#define SBLOCK ((daddr_t)(BBLOCK + BBSIZE / DEV_BSIZE))
-
-/*
- * Addresses stored in inodes are capable of addressing fragments
- * of `blocks'. File system blocks of at most size MAXBSIZE can
- * be optionally broken into 2, 4, or 8 pieces, each of which is
- * addressible; these pieces may be DEV_BSIZE, or some multiple of
- * a DEV_BSIZE unit.
- *
- * Large files consist of exclusively large data blocks. To avoid
- * undue wasted disk space, the last data block of a small file may be
- * allocated as only as many fragments of a large block as are
- * necessary. The file system format retains only a single pointer
- * to such a fragment, which is a piece of a single large block that
- * has been divided. The size of such a fragment is determinable from
- * information in the inode, using the ``blksize(fs, ip, lbn)'' macro.
- *
- * The file system records space availability at the fragment level;
- * to determine block availability, aligned fragments are examined.
- *
- * The root inode is the root of the file system.
- * Inode 0 can't be used for normal purposes and
- * historically bad blocks were linked to inode 1,
- * thus the root inode is 2. (inode 1 is no longer used for
- * this purpose, however numerous dump tapes make this
- * assumption, so we are stuck with it)
- */
-#define ROOTINO ((ino_t)2) /* i number of all roots */
-
-/*
- * MINBSIZE is the smallest allowable block size.
- * In order to insure that it is possible to create files of size
- * 2^32 with only two levels of indirection, MINBSIZE is set to 4096.
- * MINBSIZE must be big enough to hold a cylinder group block,
- * thus changes to (struct cg) must keep its size within MINBSIZE.
- * Note that super blocks are always of size SBSIZE,
- * and that both SBSIZE and MAXBSIZE must be >= MINBSIZE.
- */
-#define MINBSIZE 4096
-
-/*
- * The path name on which the file system is mounted is maintained
- * in fs_fsmnt. MAXMNTLEN defines the amount of space allocated in
- * the super block for this name.
- * The limit on the amount of summary information per file system
- * is defined by MAXCSBUFS. It is currently parameterized for a
- * maximum of two million cylinders.
- */
-#define MAXMNTLEN 512
-#define MAXCSBUFS 32
-
-/*
- * Per cylinder group information; summarized in blocks allocated
- * from first cylinder group data blocks. These blocks have to be
- * read in from fs_csaddr (size fs_cssize) in addition to the
- * super block.
- *
- * N.B. sizeof(struct csum) must be a power of two in order for
- * the ``fs_cs'' macro to work (see below).
- */
-struct csum {
- int cs_ndir; /* number of directories */
- int cs_nbfree; /* number of free blocks */
- int cs_nifree; /* number of free inodes */
- int cs_nffree; /* number of free frags */
-};
-
-/*
- * Super block for a file system.
- */
-#define FS_MAGIC 0x011954
-struct fs
-{
- int xxx1; /* struct fs *fs_link;*/
- int xxx2; /* struct fs *fs_rlink;*/
- daddr_t fs_sblkno; /* addr of super-block in filesys */
- daddr_t fs_cblkno; /* offset of cyl-block in filesys */
- daddr_t fs_iblkno; /* offset of inode-blocks in filesys */
- daddr_t fs_dblkno; /* offset of first data after cg */
- int fs_cgoffset; /* cylinder group offset in cylinder */
- int fs_cgmask; /* used to calc mod fs_ntrak */
- time_t fs_time; /* last time written */
- int fs_size; /* number of blocks in fs */
- int fs_dsize; /* number of data blocks in fs */
- int fs_ncg; /* number of cylinder groups */
- int fs_bsize; /* size of basic blocks in fs */
- int fs_fsize; /* size of frag blocks in fs */
- int fs_frag; /* number of frags in a block in fs */
-/* these are configuration parameters */
- int fs_minfree; /* minimum percentage of free blocks */
- int fs_rotdelay; /* num of ms for optimal next block */
- int fs_rps; /* disk revolutions per second */
-/* these fields can be computed from the others */
- int fs_bmask; /* ``blkoff'' calc of blk offsets */
- int fs_fmask; /* ``fragoff'' calc of frag offsets */
- int fs_bshift; /* ``lblkno'' calc of logical blkno */
- int fs_fshift; /* ``numfrags'' calc number of frags */
-/* these are configuration parameters */
- int fs_maxcontig; /* max number of contiguous blks */
- int fs_maxbpg; /* max number of blks per cyl group */
-/* these fields can be computed from the others */
- int fs_fragshift; /* block to frag shift */
- int fs_fsbtodb; /* fsbtodb and dbtofsb shift constant */
- int fs_sbsize; /* actual size of super block */
- int fs_csmask; /* csum block offset */
- int fs_csshift; /* csum block number */
- int fs_nindir; /* value of NINDIR */
- int fs_inopb; /* value of INOPB */
- int fs_nspf; /* value of NSPF */
-/* yet another configuration parameter */
- int fs_optim; /* optimization preference, see below */
-/* these fields are derived from the hardware */
- int fs_npsect; /* # sectors/track including spares */
- int fs_interleave; /* hardware sector interleave */
- int fs_trackskew; /* sector 0 skew, per track */
- int fs_headswitch; /* head switch time, usec */
- int fs_trkseek; /* track-to-track seek, usec */
-/* sizes determined by number of cylinder groups and their sizes */
- daddr_t fs_csaddr; /* blk addr of cyl grp summary area */
- int fs_cssize; /* size of cyl grp summary area */
- int fs_cgsize; /* cylinder group size */
-/* these fields are derived from the hardware */
- int fs_ntrak; /* tracks per cylinder */
- int fs_nsect; /* sectors per track */
- int fs_spc; /* sectors per cylinder */
-/* this comes from the disk driver partitioning */
- int fs_ncyl; /* cylinders in file system */
-/* these fields can be computed from the others */
- int fs_cpg; /* cylinders per group */
- int fs_ipg; /* inodes per group */
- int fs_fpg; /* blocks per group * fs_frag */
-/* this data must be re-computed after crashes */
- struct csum fs_cstotal; /* cylinder summary information */
-/* these fields are cleared at mount time */
- char fs_fmod; /* super block modified flag */
- char fs_clean; /* file system is clean flag */
- char fs_ronly; /* mounted read-only flag */
- char fs_flags; /* currently unused flag */
- char fs_fsmnt[MAXMNTLEN]; /* name mounted on */
-/* these fields retain the current block allocation info */
- int fs_cgrotor; /* last cg searched */
-#if 1
- int was_fs_csp[MAXCSBUFS];
-#else
- struct csum *fs_csp[MAXCSBUFS];/* list of fs_cs info buffers */
-#endif
- int fs_cpc; /* cyl per cycle in postbl */
- short fs_opostbl[16][8]; /* old rotation block list head */
- long fs_sparecon[50]; /* reserved for future constants */
- long fs_contigsumsize; /* size of cluster summary array */
- long fs_maxsymlinklen; /* max length of an internal symlink */
- long fs_inodefmt; /* format of on-disk inodes */
- quad fs_maxfilesize; /* maximum representable file size */
- quad fs_qbmask; /* ~fs_bmask - for use with quad size */
- quad fs_qfmask; /* ~fs_fmask - for use with quad size */
- long fs_state; /* validate fs_clean field */
- int fs_postblformat; /* format of positional layout tables */
- int fs_nrpos; /* number of rotaional positions */
- int fs_postbloff; /* (short) rotation block list head */
- int fs_rotbloff; /* (u_char) blocks for each rotation */
- int fs_magic; /* magic number */
- u_char fs_space[1]; /* list of blocks for each rotation */
-/* actually longer */
-};
-/*
- * Preference for optimization.
- */
-#define FS_OPTTIME 0 /* minimize allocation time */
-#define FS_OPTSPACE 1 /* minimize disk fragmentation */
-
-/*
- * Rotational layout table format types
- */
-#define FS_42POSTBLFMT -1 /* 4.2BSD rotational table format */
-#define FS_DYNAMICPOSTBLFMT 1 /* dynamic rotational table format */
-/*
- * Macros for access to superblock array structures
- */
-#define fs_postbl(fs, cylno) \
- (((fs)->fs_postblformat == FS_42POSTBLFMT) \
- ? ((fs)->fs_opostbl[cylno]) \
- : ((short *)((char *)(fs) + (fs)->fs_postbloff) + (cylno) * (fs)->fs_nrpos))
-#define fs_rotbl(fs) \
- (((fs)->fs_postblformat == FS_42POSTBLFMT) \
- ? ((fs)->fs_space) \
- : ((u_char *)((char *)(fs) + (fs)->fs_rotbloff)))
-
-/*
- * Convert cylinder group to base address of its global summary info.
- *
- * N.B. This macro assumes that sizeof(struct csum) is a power of two.
- */
-#define fs_cs(fs, indx) \
- fs_csp[(indx) >> (fs)->fs_csshift][(indx) & ~(fs)->fs_csmask]
-
-/*
- * Cylinder group block for a file system.
- */
-#define CG_MAGIC 0x090255
-struct cg {
- int xxx1; /* struct cg *cg_link;*/
- int cg_magic; /* magic number */
- time_t cg_time; /* time last written */
- int cg_cgx; /* we are the cgx'th cylinder group */
- short cg_ncyl; /* number of cyl's this cg */
- short cg_niblk; /* number of inode blocks this cg */
- int cg_ndblk; /* number of data blocks this cg */
- struct csum cg_cs; /* cylinder summary information */
- int cg_rotor; /* position of last used block */
- int cg_frotor; /* position of last used frag */
- int cg_irotor; /* position of last used inode */
- int cg_frsum[MAXFRAG]; /* counts of available frags */
- int cg_btotoff; /* (long) block totals per cylinder */
- int cg_boff; /* (short) free block positions */
- int cg_iusedoff; /* (char) used inode map */
- int cg_freeoff; /* (u_char) free block map */
- int cg_nextfreeoff; /* (u_char) next available space */
- int cg_sparecon[16]; /* reserved for future use */
- u_char cg_space[1]; /* space for cylinder group maps */
-/* actually longer */
-};
-/*
- * Macros for access to cylinder group array structures
- */
-#define cg_blktot(cgp) \
- (((cgp)->cg_magic != CG_MAGIC) \
- ? (((struct ocg *)(cgp))->cg_btot) \
- : ((int *)((char *)(cgp) + (cgp)->cg_btotoff)))
-#define cg_blks(fs, cgp, cylno) \
- (((cgp)->cg_magic != CG_MAGIC) \
- ? (((struct ocg *)(cgp))->cg_b[cylno]) \
- : ((short *)((char *)(cgp) + (cgp)->cg_boff) + (cylno) * (fs)->fs_nrpos))
-#define cg_inosused(cgp) \
- (((cgp)->cg_magic != CG_MAGIC) \
- ? (((struct ocg *)(cgp))->cg_iused) \
- : ((char *)((char *)(cgp) + (cgp)->cg_iusedoff)))
-#define cg_blksfree(cgp) \
- (((cgp)->cg_magic != CG_MAGIC) \
- ? (((struct ocg *)(cgp))->cg_free) \
- : ((u_char *)((char *)(cgp) + (cgp)->cg_freeoff)))
-#define cg_chkmagic(cgp) \
- ((cgp)->cg_magic == CG_MAGIC || ((struct ocg *)(cgp))->cg_magic == CG_MAGIC)
-
-/*
- * The following structure is defined
- * for compatibility with old file systems.
- */
-struct ocg {
- int xxx1; /* struct ocg *cg_link;*/
- int xxx2; /* struct ocg *cg_rlink;*/
- time_t cg_time; /* time last written */
- int cg_cgx; /* we are the cgx'th cylinder group */
- short cg_ncyl; /* number of cyl's this cg */
- short cg_niblk; /* number of inode blocks this cg */
- int cg_ndblk; /* number of data blocks this cg */
- struct csum cg_cs; /* cylinder summary information */
- int cg_rotor; /* position of last used block */
- int cg_frotor; /* position of last used frag */
- int cg_irotor; /* position of last used inode */
- int cg_frsum[8]; /* counts of available frags */
- int cg_btot[32]; /* block totals per cylinder */
- short cg_b[32][8]; /* positions of free blocks */
- char cg_iused[256]; /* used inode map */
- int cg_magic; /* magic number */
- u_char cg_free[1]; /* free block map */
-/* actually longer */
-};
-
-/*
- * Turn file system block numbers into disk block addresses.
- * This maps file system blocks to device size blocks.
- */
-#define fsbtodb(fs, b) ((b) << (fs)->fs_fsbtodb)
-#define dbtofsb(fs, b) ((b) >> (fs)->fs_fsbtodb)
-
-/*
- * Cylinder group macros to locate things in cylinder groups.
- * They calc file system addresses of cylinder group data structures.
- */
-#define cgbase(fs, c) ((daddr_t)((fs)->fs_fpg * (c)))
-#define cgstart(fs, c) \
- (cgbase(fs, c) + (fs)->fs_cgoffset * ((c) & ~((fs)->fs_cgmask)))
-#define cgsblock(fs, c) (cgstart(fs, c) + (fs)->fs_sblkno) /* super blk */
-#define cgtod(fs, c) (cgstart(fs, c) + (fs)->fs_cblkno) /* cg block */
-#define cgimin(fs, c) (cgstart(fs, c) + (fs)->fs_iblkno) /* inode blk */
-#define cgdmin(fs, c) (cgstart(fs, c) + (fs)->fs_dblkno) /* 1st data */
-
-/*
- * Macros for handling inode numbers:
- * inode number to file system block offset.
- * inode number to cylinder group number.
- * inode number to file system block address.
- */
-#define itoo(fs, x) ((x) % INOPB(fs))
-#define itog(fs, x) ((x) / (fs)->fs_ipg)
-#define itod(fs, x) \
- ((daddr_t)(cgimin(fs, itog(fs, x)) + \
- (blkstofrags((fs), (((x) % (fs)->fs_ipg) / INOPB(fs))))))
-
-/*
- * Give cylinder group number for a file system block.
- * Give cylinder group block number for a file system block.
- */
-#define dtog(fs, d) ((d) / (fs)->fs_fpg)
-#define dtogd(fs, d) ((d) % (fs)->fs_fpg)
-
-/*
- * Extract the bits for a block from a map.
- * Compute the cylinder and rotational position of a cyl block addr.
- */
-#define blkmap(fs, map, loc) \
- (((map)[(loc) / NBBY] >> ((loc) % NBBY)) & (0xff >> (NBBY - (fs)->fs_frag)))
-#define cbtocylno(fs, bno) \
- ((bno) * NSPF(fs) / (fs)->fs_spc)
-#define cbtorpos(fs, bno) \
- (((bno) * NSPF(fs) % (fs)->fs_spc / (fs)->fs_nsect * (fs)->fs_trackskew + \
- (bno) * NSPF(fs) % (fs)->fs_spc % (fs)->fs_nsect * (fs)->fs_interleave) % \
- (fs)->fs_nsect * (fs)->fs_nrpos / (fs)->fs_npsect)
-
-/*
- * The following macros optimize certain frequently calculated
- * quantities by using shifts and masks in place of divisions
- * modulos and multiplications.
- */
-#define blkoff(fs, loc) /* calculates (loc % fs->fs_bsize) */ \
- ((loc) & ~(fs)->fs_bmask)
-#define fragoff(fs, loc) /* calculates (loc % fs->fs_fsize) */ \
- ((loc) & ~(fs)->fs_fmask)
-#define lblkno(fs, loc) /* calculates (loc / fs->fs_bsize) */ \
- ((loc) >> (fs)->fs_bshift)
-#define numfrags(fs, loc) /* calculates (loc / fs->fs_fsize) */ \
- ((loc) >> (fs)->fs_fshift)
-#define blkroundup(fs, size) /* calculates roundup(size, fs->fs_bsize) */ \
- (((size) + (fs)->fs_bsize - 1) & (fs)->fs_bmask)
-#define fragroundup(fs, size) /* calculates roundup(size, fs->fs_fsize) */ \
- (((size) + (fs)->fs_fsize - 1) & (fs)->fs_fmask)
-#define fragstoblks(fs, frags) /* calculates (frags / fs->fs_frag) */ \
- ((frags) >> (fs)->fs_fragshift)
-#define blkstofrags(fs, blks) /* calculates (blks * fs->fs_frag) */ \
- ((blks) << (fs)->fs_fragshift)
-#define fragnum(fs, fsb) /* calculates (fsb % fs->fs_frag) */ \
- ((fsb) & ((fs)->fs_frag - 1))
-#define blknum(fs, fsb) /* calculates rounddown(fsb, fs->fs_frag) */ \
- ((fsb) &~ ((fs)->fs_frag - 1))
-
-/*
- * Determine the number of available frags given a
- * percentage to hold in reserve
- */
-#define freespace(fs, percentreserved) \
- (blkstofrags((fs), (fs)->fs_cstotal.cs_nbfree) + \
- (fs)->fs_cstotal.cs_nffree - ((fs)->fs_dsize * (percentreserved) / 100))
-
-/*
- * Determining the size of a file block in the file system.
- */
-#define blksize(fs, ip, lbn) \
- (((lbn) >= NDADDR || (ip)->i_size >= ((lbn) + 1) << (fs)->fs_bshift) \
- ? (fs)->fs_bsize \
- : (fragroundup(fs, blkoff(fs, (ip)->i_size))))
-#define dblksize(fs, dip, lbn) \
- (((lbn) >= NDADDR || (dip)->di_size >= ((lbn) + 1) << (fs)->fs_bshift) \
- ? (fs)->fs_bsize \
- : (fragroundup(fs, blkoff(fs, (dip)->di_size))))
-
-/*
- * Number of disk sectors per block; assumes DEV_BSIZE byte sector size.
- */
-#define NSPB(fs) ((fs)->fs_nspf << (fs)->fs_fragshift)
-#define NSPF(fs) ((fs)->fs_nspf)
-
-/*
- * INOPB is the number of inodes in a secondary storage block.
- */
-#define INOPB(fs) ((fs)->fs_inopb)
-#define INOPF(fs) ((fs)->fs_inopb >> (fs)->fs_fragshift)
-
-/*
- * NINDIR is the number of indirects in a file system block.
- */
-#define NINDIR(fs) ((fs)->fs_nindir)
-
diff --git a/serverboot/gets.c b/serverboot/gets.c
deleted file mode 100644
index 61d14460..00000000
--- a/serverboot/gets.c
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- * Mach Operating System
- * Copyright (c) 1993-1989 Carnegie Mellon University.
- * Copyright (c) 1994 The University of Utah and
- * the Computer Systems Laboratory (CSL).
- * 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, THE UNIVERSITY OF UTAH AND CSL ALLOW FREE USE OF
- * THIS SOFTWARE IN ITS "AS IS" CONDITION, AND DISCLAIM 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 <device/device.h>
-#include <varargs.h>
-
-extern mach_port_t __libmach_console_port;
-
-safe_gets(str, maxlen)
- char *str;
- int maxlen;
-{
- register char *lp;
- register int c;
-
- char inbuf[IO_INBAND_MAX];
- mach_msg_type_number_t count;
- register char *ip;
- char *strmax = str + maxlen - 1; /* allow space for trailing 0 */
-
- lp = str;
- for (;;) {
- count = IO_INBAND_MAX;
- (void) device_read_inband(__libmach_console_port,
- (dev_mode_t)0, (recnum_t)0,
- sizeof(inbuf), inbuf, &count);
- for (ip = inbuf; ip < &inbuf[count]; ip++) {
- c = *ip;
- switch (c) {
- case '\n':
- case '\r':
- printf("\n");
- *lp++ = 0;
- return;
-
- case '\b':
- case '#':
- case '\177':
- if (lp > str) {
- printf("\b \b");
- lp--;
- }
- continue;
- case '@':
- case 'u'&037:
- lp = str;
- printf("\n\r");
- continue;
- default:
- if (c >= ' ' && c < '\177') {
- if (lp < strmax) {
- *lp++ = c;
- printf("%c", c);
- }
- else {
- printf("%c", '\007'); /* beep */
- }
- }
- }
- }
- }
-}
-
diff --git a/serverboot/gunzip.c b/serverboot/gunzip.c
deleted file mode 100644
index f74da111..00000000
--- a/serverboot/gunzip.c
+++ /dev/null
@@ -1,188 +0,0 @@
-/* Modified by okuji@kuicr.kyoto-u.ac.jp for use in serverboot. */
-/* Decompressing store backend
-
- Copyright (C) 1997 Free Software Foundation, Inc.
- Written by Miles Bader <miles@gnu.ai.mit.edu>
- This file is part of the GNU Hurd.
-
- The GNU Hurd is free software; you can redistribute it and/or
- modify it under the terms of the GNU General Public License as
- published by the Free Software Foundation; either version 2, or (at
- your option) any later version.
-
- The GNU Hurd is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. */
-
-#include <stdio.h>
-#include <string.h>
-#include <setjmp.h>
-#include <cthreads.h>
-#include <errno.h>
-
-#include <file_io.h>
-
-/* gzip.h makes several annoying defines & decls, which we have to work
- around. */
-#define file_t gzip_file_t
-#include "gzip.h"
-#undef file_t
-#undef head
-
-#define IN_BUFFERING (256*1024)
-#define OUT_BUFFERING (512*1024)
-
-static struct mutex unzip_lock = MUTEX_INITIALIZER;
-
-/* Uncompress the contents of FROM, which should contain a valid gzip file,
- into memory, returning the result buffer in BUF & BUF_LEN. */
-int
-serverboot_gunzip (struct file *from, void **buf, size_t *buf_len)
-{
- /* Entry points to unzip engine. */
- int get_method (int);
- extern long int bytes_out;
- /* Callbacks from unzip for I/O and error interface. */
- extern int (*unzip_read) (char *buf, size_t maxread);
- extern void (*unzip_write) (const char *buf, size_t nwrite);
- extern void (*unzip_read_error) (void);
- extern void (*unzip_error) (const char *msg);
-
- /* How we return errors from our hook functions. */
- jmp_buf zerr_jmp_buf;
- int zerr;
-
- size_t offset = 0; /* Offset of read point in FROM. */
-
- /* Read at most MAXREAD (or 0 if eof) bytes into BUF from our current
- position in FROM. */
- int zread (char *buf, size_t maxread)
- {
- vm_size_t resid;
- size_t did_read;
-
- if (from->f_size - offset < maxread)
- did_read = from->f_size - offset;
- else
- did_read = maxread;
-
- zerr = read_file (from, offset, buf, did_read, &resid);
- if (zerr)
- longjmp (zerr_jmp_buf, 1);
-
- did_read -= resid;
- offset += did_read;
-
- return did_read;
- }
-
- size_t out_buf_offs = 0; /* Position in the output buffer. */
-
- /* Write uncompress data to our output buffer. */
- void zwrite (const char *wbuf, size_t nwrite)
- {
- size_t old_buf_len = *buf_len;
-
- if (out_buf_offs + nwrite > old_buf_len)
- /* Have to grow the output buffer. */
- {
- void *old_buf = *buf;
- void *new_buf = old_buf + old_buf_len; /* First try. */
- size_t new_buf_len = round_page (old_buf_len + old_buf_len + nwrite);
-
- /* Try to grow the buffer. */
- zerr =
- vm_allocate (mach_task_self (),
- (vm_address_t *)&new_buf, new_buf_len - old_buf_len,
- 0);
- if (zerr)
- /* Can't do that, try to make a bigger buffer elsewhere. */
- {
- new_buf = old_buf;
- zerr =
- vm_allocate (mach_task_self (),
- (vm_address_t *)&new_buf, new_buf_len, 1);
- if (zerr)
- longjmp (zerr_jmp_buf, 1);
-
- if (out_buf_offs > 0)
- /* Copy the old buffer into the start of the new & free it. */
- bcopy (old_buf, new_buf, out_buf_offs);
-
- vm_deallocate (mach_task_self (),
- (vm_address_t)old_buf, old_buf_len);
-
- *buf = new_buf;
- }
-
- *buf_len = new_buf_len;
- }
-
- bcopy (wbuf, *buf + out_buf_offs, nwrite);
- out_buf_offs += nwrite;
- }
-
- void zreaderr (void)
- {
- zerr = EIO;
- longjmp (zerr_jmp_buf, 1);
- }
- void zerror (const char *msg)
- {
- zerr = EINVAL;
- longjmp (zerr_jmp_buf, 2);
- }
-
- /* Try to guess a reasonable output buffer size. */
- *buf_len = round_page (from->f_size * 2);
- zerr = vm_allocate (mach_task_self (), (vm_address_t *)buf, *buf_len, 1);
- if (zerr)
- return zerr;
-
- mutex_lock (&unzip_lock);
-
- unzip_read = zread;
- unzip_write = zwrite;
- unzip_read_error = zreaderr;
- unzip_error = zerror;
-
- if (! setjmp (zerr_jmp_buf))
- {
- if (get_method (0) != 0)
- /* Not a happy gzip file. */
- zerr = EINVAL;
- else
- /* Matched gzip magic number. Ready to unzip.
- Set up the output stream and let 'er rip. */
- {
- /* Call the gunzip engine. */
- bytes_out = 0;
- unzip (17, 23); /* Arguments ignored. */
- zerr = 0;
- }
- }
-
- mutex_unlock (&unzip_lock);
-
- if (zerr)
- {
- if (*buf_len > 0)
- vm_deallocate (mach_task_self (), (vm_address_t)*buf, *buf_len);
- }
- else if (out_buf_offs < *buf_len)
- /* Trim the output buffer to be the right length. */
- {
- size_t end = round_page (out_buf_offs);
- if (end < *buf_len)
- vm_deallocate (mach_task_self (),
- (vm_address_t)(*buf + end), *buf_len - end);
- *buf_len = out_buf_offs;
- }
-
- return zerr;
-}
diff --git a/serverboot/load.c b/serverboot/load.c
deleted file mode 100644
index aa481943..00000000
--- a/serverboot/load.c
+++ /dev/null
@@ -1,555 +0,0 @@
-/*
- * Mach Operating System
- * Copyright (c) 1991,1990,1989,1988 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 <stddef.h>
-#include <assert.h>
-#include <mach/mach_interface.h>
-#include "mach-exec.h"
-#include "../boot/boot_script.h"
-
-#include <file_io.h>
-
-
-boolean_t load_protect_text = TRUE;
-
-
-struct stuff
-{
- struct file *fp;
- task_t user_task;
-
- /* uncompressed image */
- vm_offset_t image_addr;
- vm_size_t image_size;
-
- vm_offset_t aout_symtab_ofs;
- vm_size_t aout_symtab_size;
- vm_offset_t aout_strtab_ofs;
- vm_size_t aout_strtab_size;
-};
-
-char *set_regs(
- mach_port_t user_task,
- mach_port_t user_thread,
- struct exec_info *info,
- int arg_size);
-
-static void read_symtab_from_file(
- struct file *fp,
- mach_port_t host_port,
- task_t task,
- char * symtab_name,
- struct stuff *st);
-
-/* Callback functions for reading the executable file. */
-static int prog_read(void *handle, vm_offset_t file_ofs, void *buf, vm_size_t size,
- vm_size_t *out_actual)
-{
- struct stuff *st = handle;
- vm_size_t resid;
- int result;
-
- result = read_file(st->fp, file_ofs, buf, size, &resid);
- if (result)
- return result;
- *out_actual = size - resid;
- return 0;
-}
-
-static int prog_read_exec(void *handle, vm_offset_t file_ofs, vm_size_t file_size,
- vm_offset_t mem_addr, vm_size_t mem_size,
- exec_sectype_t sec_type)
-{
- struct stuff *st = handle;
- vm_offset_t page_start = trunc_page(mem_addr);
- vm_offset_t page_end = round_page(mem_addr + mem_size);
- vm_prot_t mem_prot = sec_type & EXEC_SECTYPE_PROT_MASK;
- vm_offset_t area_start;
- int result;
-
- if (sec_type & EXEC_SECTYPE_AOUT_SYMTAB)
- {
- st->aout_symtab_ofs = file_ofs;
- st->aout_symtab_size = file_size;
- }
- if (sec_type & EXEC_SECTYPE_AOUT_STRTAB)
- {
- st->aout_strtab_ofs = file_ofs;
- st->aout_strtab_size = file_size;
- }
-
- if (!(sec_type & EXEC_SECTYPE_ALLOC))
- return 0;
-
- assert(mem_size > 0);
- assert(mem_size > file_size);
-
- /*
- printf("section %08x-%08x-%08x prot %08x (%08x-%08x)\n",
- mem_addr, mem_addr+file_size, mem_addr+mem_size, mem_prot, page_start, page_end);
- */
-
- result = vm_allocate(mach_task_self(), &area_start, page_end - page_start, TRUE);
- if (result) return (result);
-
- if (file_size > 0)
- {
- vm_size_t resid;
-
- result = read_file(st->fp, file_ofs, area_start + (mem_addr - page_start),
- file_size, &resid);
- if (result) return result;
- if (resid) return EX_CORRUPT;
- }
-
- if (mem_size > file_size)
- {
- bzero((void*)area_start + (mem_addr + file_size - page_start),
- mem_size - file_size);
- }
-
- result = vm_allocate(st->user_task, &page_start, page_end - page_start, FALSE);
- if (result) return (result);
- assert(page_start == trunc_page(mem_addr));
-
- result = vm_write(st->user_task, page_start, area_start, page_end - page_start);
- if (result) return (result);
-
- result = vm_deallocate(mach_task_self(), area_start, page_end - page_start);
- if (result) return (result);
-
- /*
- * Protect the segment.
- */
- if (load_protect_text && (mem_prot != VM_PROT_ALL)) {
- result = vm_protect(st->user_task, page_start, page_end - page_start,
- FALSE, mem_prot);
- if (result) return (result);
- }
-
- return 0;
-}
-
-/* Callback functions for reading the uncompressed image. */
-static int image_read(void *handle, vm_offset_t file_ofs, void *buf,
- vm_size_t size, vm_size_t *out_actual)
-{
- struct stuff *st = handle;
- bcopy(st->image_addr + file_ofs, buf, size);
- *out_actual = size;
- return 0;
-}
-
-static int image_read_exec(void *handle, vm_offset_t file_ofs,
- vm_size_t file_size, vm_offset_t mem_addr,
- vm_size_t mem_size, exec_sectype_t sec_type)
-{
- struct stuff *st = handle;
- vm_offset_t page_start = trunc_page(mem_addr);
- vm_offset_t page_end = round_page(mem_addr + mem_size);
- vm_prot_t mem_prot = sec_type & EXEC_SECTYPE_PROT_MASK;
- vm_offset_t area_start;
- int result;
-
- if (sec_type & EXEC_SECTYPE_AOUT_SYMTAB)
- {
- st->aout_symtab_ofs = file_ofs;
- st->aout_symtab_size = file_size;
- }
- if (sec_type & EXEC_SECTYPE_AOUT_STRTAB)
- {
- st->aout_strtab_ofs = file_ofs;
- st->aout_strtab_size = file_size;
- }
-
- if (!(sec_type & EXEC_SECTYPE_ALLOC))
- return 0;
-
- assert(mem_size > 0);
- assert(mem_size > file_size);
-
- /*
- printf("section %08x-%08x-%08x prot %08x (%08x-%08x)\n",
- mem_addr, mem_addr+file_size, mem_addr+mem_size, mem_prot, page_start, page_end);
- */
-
- result = vm_allocate(mach_task_self(), &area_start, page_end - page_start, TRUE);
- if (result) return (result);
-
- if (file_size > 0)
- {
- bcopy(st->image_addr + file_ofs, area_start + (mem_addr - page_start),
- file_size);
- }
-
- if (mem_size > file_size)
- {
- bzero((void*)area_start + (mem_addr + file_size - page_start),
- mem_size - file_size);
- }
-
- result = vm_allocate(st->user_task, &page_start, page_end - page_start, FALSE);
- if (result) return (result);
- assert(page_start == trunc_page(mem_addr));
-
- result = vm_write(st->user_task, page_start, area_start, page_end - page_start);
- if (result) return (result);
-
- result = vm_deallocate(mach_task_self(), area_start, page_end - page_start);
- if (result) return (result);
-
- /*
- * Protect the segment.
- */
- if (load_protect_text && (mem_prot != VM_PROT_ALL)) {
- result = vm_protect(st->user_task, page_start, page_end - page_start,
- FALSE, mem_prot);
- if (result) return (result);
- }
-
- return 0;
-}
-
-mach_port_t boot_script_read_file (const char *file)
-{ return MACH_PORT_NULL; } /* XXX */
-
-int
-boot_script_exec_cmd (void *hook,
- task_t user_task,
- char *file_name,
- int arg_count, char **argv,
- char *argstrings, int argslen)
-{
- extern mach_port_t bootstrap_master_device_port, bootstrap_master_host_port;
- extern char *root_name;
- extern char **environ;
- int envc, env_len;
-
- int arg_len = argslen;
- char *arg_pos;
-
- kern_return_t result;
- thread_t user_thread;
- struct file file;
- char namebuf[MAXPATHLEN+1];
-
- struct stuff st;
- struct exec_info info;
-
- extern char * strbuild();
-
- if (strcmp (file_name, "/dev/"))
- (void) strbuild(namebuf, "/dev/", root_name, "/", file_name,
- (char *)0);
- else
- strcpy (namebuf, file_name);
-
- /*
- * Open the file
- */
- bzero((char *)&file, sizeof(file));
-
- result = open_file(bootstrap_master_device_port, namebuf, &file);
- if (result != 0) {
- panic ("%s: %s", namebuf, strerror (result));
- }
-
- env_len = 0;
- for (envc = 0; environ[envc]; ++envc)
- env_len += strlen (environ[envc]) + 1;
-
- /*
- * Add space for:
- * arg_count
- * pointers to arguments
- * trailing 0 pointer
- * environment variables
- * trailing 0 pointer
- * and align to integer boundary
- */
- arg_len += sizeof(integer_t) + (envc + 2 + arg_count) * sizeof(char *);
- arg_len += env_len;
- arg_len = (arg_len + (sizeof(integer_t) - 1)) & ~(sizeof(integer_t)-1);
-
- /*
- * We refrain from checking IEXEC bits to make
- * things a little easier when things went bad.
- * Say you have ftp(1) but chmod(1) is gone.
- */
- if (!file_is_regular(&file))
- panic("boot_load_program: %s is not a regular file", namebuf);
-
- /*
- * Load the executable file.
- */
- st.fp = &file;
- st.user_task = user_task;
- st.aout_symtab_size = 0;
- st.aout_strtab_size = 0;
- result = exec_load(prog_read, prog_read_exec, &st, &info);
-#ifdef GZIP
- if (result)
- {
- /*
- * It might be gzip file.
- */
- int err;
- extern int serverboot_gunzip(struct file *,
- vm_offset_t *, size_t *);
-
- err = serverboot_gunzip(st.fp,
- &(st.image_addr),
- &(st.image_size));
- if (!err)
- {
- result = exec_load(image_read,
- image_read_exec,
- &st,
- &info);
- vm_deallocate(mach_task_self(),
- st.image_addr,
- st.image_size);
- }
- }
-#endif /* GZIP */
-#ifdef BZIP2
- if (result)
- {
- /*
- * It might be bzip2 file.
- */
- int err;
- extern int serverboot_bunzip2(struct file *,
- vm_offset_t *, size_t *);
-
- err = serverboot_bunzip2(st.fp,
- &(st.image_addr),
- &(st.image_size));
- if (!err)
- {
- result = exec_load(image_read,
- image_read_exec,
- &st,
- &info);
- vm_deallocate(mach_task_self(),
- st.image_addr,
- st.image_size);
- }
- }
-#endif /* BZIP2 */
- if (result)
- panic ("cannot load %s: %s", namebuf, strerror (result));
-#if 0
- printf("(serverboot): loaded %s; entrypoint %08x\n", namebuf, info.entry);
-#endif
-
- /*
- * Set up the stack and user registers.
- */
- result = thread_create (user_task, &user_thread);
- if (result)
- panic ("can't create user thread for %s: %s", namebuf,
- strerror (result));
- arg_pos = set_regs(user_task, user_thread, &info, arg_len);
-
- /*
- * Read symbols from the executable file.
- */
-#if 0
- printf("(serverboot): loading symbols from %s\n", namebuf);
- read_symtab_from_file(&file, bootstrap_master_host_port, user_task, namebuf, &st);
-#endif
-
- /*
- * Copy out the arguments.
- */
- {
- vm_offset_t u_arg_start;
- /* user start of argument list block */
- vm_offset_t k_arg_start;
- /* kernel start of argument list block */
- vm_offset_t u_arg_page_start;
- /* user start of args, page-aligned */
- vm_size_t arg_page_size;
- /* page_aligned size of args */
- vm_offset_t k_arg_page_start;
- /* kernel start of args, page-aligned */
-
- register
- char ** k_ap; /* kernel arglist address */
- char * u_cp; /* user argument string address */
- register
- char * k_cp; /* kernel argument string address */
- register
- int i;
-
- /*
- * Get address of argument list in user space
- */
- u_arg_start = (vm_offset_t)arg_pos;
-
- /*
- * Round to page boundaries, and allocate kernel copy
- */
- u_arg_page_start = trunc_page(u_arg_start);
- arg_page_size = (vm_size_t)(round_page(u_arg_start + arg_len)
- - u_arg_page_start);
-
- result = vm_allocate(mach_task_self(),
- &k_arg_page_start,
- (vm_size_t)arg_page_size,
- TRUE);
- if (result)
- panic("boot_load_program: arg size");
-
- /*
- * Set up addresses corresponding to user pointers
- * in the kernel block
- */
- k_arg_start = k_arg_page_start + (u_arg_start - u_arg_page_start);
-
- k_ap = (char **)k_arg_start;
-
- /*
- * Start the strings after the arg-count and pointers
- */
- u_cp = (char *)u_arg_start + arg_count * sizeof(char *)
- + envc * sizeof(char *)
- + 2 * sizeof(char *)
- + sizeof(integer_t);
- k_cp = (char *)k_arg_start + arg_count * sizeof(char *)
- + envc * sizeof(char *)
- + 2 * sizeof(char *)
- + sizeof(integer_t);
-
- /*
- * first the argument count
- */
- *k_ap++ = (char *)(intptr_t)arg_count;
-
- /*
- * Then the strings and string pointers for each argument
- */
- for (i = 0; i < arg_count; i++)
- *k_ap++ = argv[i] - argstrings + u_cp;
- *k_ap++ = (char *)0;
- bcopy (argstrings, k_cp, argslen);
- k_cp += argslen;
- u_cp += argslen;
-
- for (i = 0; i < envc; i++)
- *k_ap++ = environ[i] - environ[0] + u_cp;
- *k_ap = (char *)0;
- bcopy (environ[0], k_cp, env_len);
-
- /*
- * Now write all of this to user space.
- */
- (void) vm_write(user_task,
- u_arg_page_start,
- k_arg_page_start,
- arg_page_size);
-
- (void) vm_deallocate(mach_task_self(),
- k_arg_page_start,
- arg_page_size);
- }
-
- /*
- * Close the file.
- */
- close_file(&file);
-
- /* Resume the thread. */
- thread_resume (user_thread);
- mach_port_deallocate (mach_task_self (), user_thread);
-
- return (0);
-}
-
-/*
- * Load symbols from file into kernel debugger.
- */
-static void read_symtab_from_file(
- struct file *fp,
- mach_port_t host_port,
- task_t task,
- char * symtab_name,
- struct stuff *st)
-{
- vm_size_t resid;
- kern_return_t result;
- vm_size_t table_size;
- vm_offset_t symtab;
-
-#if 0
-
- if (!st->aout_symtab_size || !st->aout_strtab_size)
- return;
-
- /*
- * Allocate space for the symbol table.
- */
- table_size = sizeof(vm_size_t)
- + st->aout_symtab_size
- + st->aout_strtab_size;
- result= vm_allocate(mach_task_self(),
- &symtab,
- table_size,
- TRUE);
- if (result) {
- printf("[ error %d allocating space for %s symbol table ]\n",
- result, symtab_name);
- return;
- }
-
- /*
- * Set the symbol table length word,
- * then read in the symbol table and string table.
- */
- *(vm_size_t*)symtab = st->aout_symtab_size;
- result = read_file(fp, st->aout_symtab_ofs,
- symtab + sizeof(vm_size_t),
- st->aout_symtab_size + st->aout_strtab_size,
- &resid);
- if (result || resid) {
- printf("[ no valid symbol table present for %s ]\n",
- symtab_name);
- }
- else {
- /*
- * Load the symbols into the kernel.
- */
- result = host_load_symbol_table(
- host_port,
- task,
- symtab_name,
- symtab,
- table_size);
- }
- (void) vm_deallocate(mach_task_self(), symtab, table_size);
-#endif
-}
diff --git a/serverboot/mach-exec.h b/serverboot/mach-exec.h
deleted file mode 100644
index 94b234b0..00000000
--- a/serverboot/mach-exec.h
+++ /dev/null
@@ -1,130 +0,0 @@
-/*
- * Mach Operating System
- * Copyright (c) 1991,1990,1989,1988 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
- * 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 the
- * rights to redistribute these changes.
- */
-
-#ifndef _MACH_EXEC_H_
-#define _MACH_EXEC_H_
-
-#include <mach/machine/vm_types.h>
-#include <mach/vm_prot.h>
-
-/* XXX */
-typedef enum
-{
- EXEC_ELF = 1,
- EXEC_AOUT = 2,
-} exec_format_t;
-
-typedef struct exec_info
-{
- /* Format of executable loaded - see above. */
- exec_format_t format;
-
- /* Program entrypoint. */
- vm_offset_t entry;
-
- /* Initial data pointer - only some architectures use this. */
- vm_offset_t init_dp;
-
- /* (ELF) Address of interpreter string for loading shared libraries, null if none. */
- vm_offset_t interp;
-
-} exec_info_t;
-
-typedef int exec_sectype_t;
-#define EXEC_SECTYPE_READ VM_PROT_READ
-#define EXEC_SECTYPE_WRITE VM_PROT_WRITE
-#define EXEC_SECTYPE_EXECUTE VM_PROT_EXECUTE
-#define EXEC_SECTYPE_PROT_MASK VM_PROT_ALL
-#define EXEC_SECTYPE_ALLOC ((exec_sectype_t)0x000100)
-#define EXEC_SECTYPE_LOAD ((exec_sectype_t)0x000200)
-#define EXEC_SECTYPE_DEBUG ((exec_sectype_t)0x010000)
-#define EXEC_SECTYPE_AOUT_SYMTAB ((exec_sectype_t)0x020000)
-#define EXEC_SECTYPE_AOUT_STRTAB ((exec_sectype_t)0x040000)
-
-typedef int exec_read_func_t(void *handle, vm_offset_t file_ofs,
- void *buf, vm_size_t size,
- vm_size_t *out_actual);
-
-typedef int exec_read_exec_func_t(void *handle,
- vm_offset_t file_ofs, vm_size_t file_size,
- vm_offset_t mem_addr, vm_size_t mem_size,
- exec_sectype_t section_type);
-
-/*
- * Routines exported from libmach_exec.a
- */
-
-/* Generic function to interpret an executable "file"
- and "load" it into "memory".
- Doesn't really know about files, loading, or memory;
- all file I/O and destination memory accesses
- go through provided functions.
- Thus, this is a very generic loading mechanism.
-
- The read() function is used to read metadata from the file
- into the local address space.
-
- The read_exec() function is used to load the actual sections.
- It is used for all kinds of sections - code, data, bss, debugging data.
- The 'section_type' parameter specifies what type of section is being loaded.
-
- For code, data, and bss, the EXEC_SECTYPE_ALLOC flag will be set.
- For code and data (i.e. stuff that's actually loaded from the file),
- EXEC_SECTYPE_LOAD will also be set.
- The EXEC_SECTYPE_PROT_MASK contains the intended access permissions
- for the section.
- 'file_size' may be less than 'mem_size';
- the remaining data must be zero-filled.
- 'mem_size' is always greater than zero, but 'file_size' may be zero
- (e.g. in the case of a bss section).
- No two read_exec() calls for one executable
- will load data into the same virtual memory page,
- although they may load from arbitrary (possibly overlapping) file positions.
-
- For sections that aren't normally loaded into the process image
- (e.g. debug sections), EXEC_SECTYPE_ALLOC isn't set,
- but some other appropriate flag is set to indicate the type of section.
-
- The 'handle' is an opaque pointer which is simply passed on
- to the read() and read_exec() functions.
-
- On return, the specified info structure is filled in
- with information about the loaded executable.
-*/
-int exec_load(exec_read_func_t *read, exec_read_exec_func_t *read_exec,
- void *handle, exec_info_t *out_info);
-
-/*
- * Error codes
- */
-
-#define EX_NOT_EXECUTABLE 6000 /* not a recognized executable format */
-#define EX_WRONG_ARCH 6001 /* valid executable, but wrong arch. */
-#define EX_CORRUPT 6002 /* recognized executable, but mangled */
-#define EX_BAD_LAYOUT 6003 /* something wrong with the memory or file image layout */
-
-
-#endif /* _MACH_EXEC_H_ */
diff --git a/serverboot/minix_ffs_compat.c b/serverboot/minix_ffs_compat.c
deleted file mode 100644
index 7d493520..00000000
--- a/serverboot/minix_ffs_compat.c
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * BSD FFS like functions used to ease porting bootstrap to MINIX fs
- * Copyright (C) 1994 Csizmazia Balazs, University ELTE, Hungary
- *
- * This file is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#include <device/device_types.h>
-#include <device/device.h>
-
-#include <mach/mach_traps.h>
-#include <mach/mach_interface.h>
-
-#include <file_io.h>
-
-#define MINIX_BLOCK_SIZE 1024
-
-int minix_ino2blk (struct minix_super_block *fs, int ino)
-{
- int blk;
-
- blk=0 /* it's Mach */+2 /* boot+superblock */ + fs->s_imap_blocks +
- fs->s_zmap_blocks + (ino-1)/MINIX_INODES_PER_BLOCK;
- return blk;
-}
-
-int minix_fsbtodb (struct minix_super_block *fs, int b)
-{
- return (b * MINIX_BLOCK_SIZE) / DEV_BSIZE;
-}
-
-int minix_itoo (struct minix_super_block *fs, int ino)
-{
- return (ino - 1) % MINIX_INODES_PER_BLOCK;
-}
-
-int minix_blkoff (struct minix_super_block * fs, vm_offset_t offset)
-{
- return offset % MINIX_BLOCK_SIZE;
-}
-
-int minix_lblkno (struct minix_super_block * fs, vm_offset_t offset)
-{
- return offset / MINIX_BLOCK_SIZE;
-}
-
-int minix_blksize (struct minix_super_block *fs, struct file *fp, minix_daddr_t file_block)
-{
- return MINIX_BLOCK_SIZE;
-}
diff --git a/serverboot/minix_ffs_compat.h b/serverboot/minix_ffs_compat.h
deleted file mode 100644
index cc038032..00000000
--- a/serverboot/minix_ffs_compat.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * BSD FFS like declarations used to ease porting bootstrap to MINIX fs
- * Copyright (C) 1994 Csizmazia Balazs, University ELTE, Hungary
- *
- * This file is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#define MINIX_SBSIZE MINIX_BLOCK_SIZE /* Size of superblock */
-#define MINIX_SBLOCK ((minix_daddr_t) 2) /* Location of superblock */
-
-#define MINIX_NDADDR 7
-#define MINIX_NIADDR 2
-
-#define MINIX_MAXNAMLEN 14
-
-#define MINIX_ROOTINO 1 /* MINIX ROOT INODE */
-
-#define MINIX_NINDIR(fs) 512 /* DISK_ADDRESSES_PER_BLOCKS */
-
-#define IFMT 00170000
-#define IFREG 0100000
-#define IFDIR 0040000
-#define ISVTX 0001000
-
-#define f_fs u.minix.minix_fs
-#define i_ic u.minix.minix_ic
-#define f_nindir u.minix.minix_nindir
-#define f_blk u.minix.minix_blk
-#define f_blksize u.minix.minix_blksize
-#define f_blkno u.minix.minix_blkno
-
diff --git a/serverboot/minix_file_io.c b/serverboot/minix_file_io.c
deleted file mode 100644
index 17beb18c..00000000
--- a/serverboot/minix_file_io.c
+++ /dev/null
@@ -1,851 +0,0 @@
-/*
- * Mach Operating System
- * Copyright (c) 1991,1990 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.
- */
-/*
- * Stand-alone file reading package.
- */
-
-#include <device/device_types.h>
-#include <device/device.h>
-
-#include <mach/mach_traps.h>
-#include <mach/mach_interface.h>
-
-#include "file_io.h"
-#include "minix_ffs_compat.h"
-#include "minix_fs.h"
-
-void minix_close_file(); /* forward */
-
-#define MINIX_NAME_LEN 14
-#define MINIX_BLOCK_SIZE 1024
-
-/*
- * Free file buffers, but don't close file.
- */
-static void
-free_file_buffers(fp)
- register struct file *fp;
-{
- register int level;
-
- /*
- * Free the indirect blocks
- */
- for (level = 0; level < MINIX_NIADDR; level++) {
- if (fp->f_blk[level] != 0) {
- (void) vm_deallocate(mach_task_self(),
- fp->f_blk[level],
- fp->f_blksize[level]);
- fp->f_blk[level] = 0;
- }
- fp->f_blkno[level] = -1;
- }
-
- /*
- * Free the data block
- */
- if (fp->f_buf != 0) {
- (void) vm_deallocate(mach_task_self(),
- fp->f_buf,
- fp->f_buf_size);
- fp->f_buf = 0;
- }
- fp->f_buf_blkno = -1;
-}
-
-/*
- * Read a new inode into a file structure.
- */
-static int
-read_inode(inumber, fp)
- ino_t inumber;
- register struct file *fp;
-{
- vm_offset_t buf;
- mach_msg_type_number_t buf_size;
- register
- struct minix_super_block *fs;
- minix_daddr_t disk_block;
- kern_return_t rc;
-
- fs = fp->f_fs;
- disk_block = minix_ino2blk(fs, inumber);
-
- rc = device_read(fp->f_dev,
- 0,
- (recnum_t) minix_fsbtodb(fp->f_fs, disk_block),
- (int) MINIX_BLOCK_SIZE,
- (char **)&buf,
- &buf_size);
- if (rc != KERN_SUCCESS)
- return (rc);
-
- {
- register struct minix_inode *dp;
-
- dp = (struct minix_inode *)buf;
- dp += minix_itoo(fs, inumber);
- fp->i_ic = *dp;
- fp->f_size = dp->i_size;
- }
-
- (void) vm_deallocate(mach_task_self(), buf, buf_size);
-
- /*
- * Clear out the old buffers
- */
- free_file_buffers(fp);
-
- return (0);
-}
-
-/*
- * Given an offset in a file, find the disk block number that
- * contains that block.
- */
-static int
-block_map(fp, file_block, disk_block_p)
- struct file *fp;
- minix_daddr_t file_block;
- minix_daddr_t *disk_block_p; /* out */
-{
- int level;
- int idx;
- minix_daddr_t ind_block_num;
- kern_return_t rc;
-
- vm_offset_t olddata[MINIX_NIADDR+1];
- vm_size_t oldsize[MINIX_NIADDR+1];
-
- /*
- * Index structure of an inode:
- *
- * i_db[0..NDADDR-1] hold block numbers for blocks
- * 0..NDADDR-1
- *
- * i_ib[0] index block 0 is the single indirect
- * block
- * holds block numbers for blocks
- * NDADDR .. NDADDR + NINDIR(fs)-1
- *
- * i_ib[1] index block 1 is the double indirect
- * block
- * holds block numbers for INDEX blocks
- * for blocks
- * NDADDR + NINDIR(fs) ..
- * NDADDR + NINDIR(fs) + NINDIR(fs)**2 - 1
- *
- * i_ib[2] index block 2 is the triple indirect
- * block
- * holds block numbers for double-indirect
- * blocks for blocks
- * NDADDR + NINDIR(fs) + NINDIR(fs)**2 ..
- * NDADDR + NINDIR(fs) + NINDIR(fs)**2
- * + NINDIR(fs)**3 - 1
- */
-
- mutex_lock(&fp->f_lock);
-
- if (file_block < MINIX_NDADDR) {
- /* Direct block. */
- *disk_block_p = fp->i_ic.i_zone[file_block];
- mutex_unlock(&fp->f_lock);
- return (0);
- }
-
- file_block -= MINIX_NDADDR;
-
- /*
- * nindir[0] = NINDIR
- * nindir[1] = NINDIR**2
- * nindir[2] = NINDIR**3
- * etc
- */
- for (level = 0; level < MINIX_NIADDR; level++) {
- if (file_block < fp->f_nindir[level])
- break;
- file_block -= fp->f_nindir[level];
- }
- if (level == MINIX_NIADDR) {
- /* Block number too high */
- mutex_unlock(&fp->f_lock);
- return (FS_NOT_IN_FILE);
- }
-
- ind_block_num = fp->i_ic.i_zone[level + MINIX_NDADDR];
-
- /*
- * Initialize array of blocks to free.
- */
- for (idx = 0; idx < MINIX_NIADDR; idx++)
- oldsize[idx] = 0;
-
- for (; level >= 0; level--) {
-
- vm_offset_t data;
- mach_msg_type_number_t size;
-
- if (ind_block_num == 0)
- break;
-
- if (fp->f_blkno[level] == ind_block_num) {
- /*
- * Cache hit. Just pick up the data.
- */
-
- data = fp->f_blk[level];
- }
- else {
- /*
- * Drop our lock while doing the read.
- * (The f_dev and f_fs fields don`t change.)
- */
- mutex_unlock(&fp->f_lock);
-
- rc = device_read(fp->f_dev,
- 0,
- (recnum_t) minix_fsbtodb(fp->f_fs, ind_block_num),
- MINIX_BLOCK_SIZE,
- (char **)&data,
- &size);
- if (rc != KERN_SUCCESS)
- return (rc);
-
- /*
- * See if we can cache the data. Need a write lock to
- * do this. While we hold the write lock, we can`t do
- * *anything* which might block for memory. Otherwise
- * a non-privileged thread might deadlock with the
- * privileged threads. We can`t block while taking the
- * write lock. Otherwise a non-privileged thread
- * blocked in the vm_deallocate (while holding a read
- * lock) will block a privileged thread. For the same
- * reason, we can`t take a read lock and then use
- * lock_read_to_write.
- */
-
- mutex_lock(&fp->f_lock);
-
- olddata[level] = fp->f_blk[level];
- oldsize[level] = fp->f_blksize[level];
-
- fp->f_blkno[level] = ind_block_num;
- fp->f_blk[level] = data;
- fp->f_blksize[level] = size;
-
- /*
- * Return to holding a read lock, and
- * dispose of old data.
- */
-
- }
-
- if (level > 0) {
- idx = file_block / fp->f_nindir[level-1];
- file_block %= fp->f_nindir[level-1];
- }
- else
- idx = file_block;
-
- ind_block_num = ((minix_daddr_t *)data)[idx];
- }
-
- mutex_unlock(&fp->f_lock);
-
- /*
- * After unlocking the file, free any blocks that
- * we need to free.
- */
- for (idx = 0; idx < MINIX_NIADDR; idx++)
- if (oldsize[idx] != 0)
- (void) vm_deallocate(mach_task_self(),
- olddata[idx],
- oldsize[idx]);
-
- *disk_block_p = ind_block_num;
- return (0);
-}
-
-/*
- * Read a portion of a file into an internal buffer. Return
- * the location in the buffer and the amount in the buffer.
- */
-static int
-buf_read_file(fp, offset, buf_p, size_p)
- register struct file *fp;
- vm_offset_t offset;
- vm_offset_t *buf_p; /* out */
- vm_size_t *size_p; /* out */
-{
- register
- struct minix_super_block *fs;
- vm_offset_t off;
- register minix_daddr_t file_block;
- minix_daddr_t disk_block;
- int rc;
- vm_offset_t block_size;
-
- if (offset >= fp->i_ic.i_size)
- return (FS_NOT_IN_FILE);
-
- fs = fp->f_fs;
-
- off = minix_blkoff(fs, offset);
- file_block = minix_lblkno(fs, offset);
- block_size = minix_blksize(fs, fp, file_block);
-
- if (((daddr_t) file_block) != fp->f_buf_blkno) {
- rc = block_map(fp, file_block, &disk_block);
- if (rc != 0)
- return (rc);
-
- if (fp->f_buf)
- (void)vm_deallocate(mach_task_self(),
- fp->f_buf,
- fp->f_buf_size);
-
- if (disk_block == 0) {
- (void)vm_allocate(mach_task_self(),
- &fp->f_buf,
- block_size,
- TRUE);
- fp->f_buf_size = block_size;
- }
- else {
- rc = device_read(fp->f_dev,
- 0,
- (recnum_t) minix_fsbtodb(fs, disk_block),
- (int) block_size,
- (char **) &fp->f_buf,
- (mach_msg_type_number_t *)&fp->f_buf_size);
- }
- if (rc)
- return (rc);
-
- fp->f_buf_blkno = (daddr_t) file_block;
- }
-
- /*
- * Return address of byte in buffer corresponding to
- * offset, and size of remainder of buffer after that
- * byte.
- */
- *buf_p = fp->f_buf + off;
- *size_p = block_size - off;
-
- /*
- * But truncate buffer at end of file.
- */
- if (*size_p > fp->i_ic.i_size - offset)
- *size_p = fp->i_ic.i_size - offset;
-
- return (0);
-}
-
-/*
- * Search a directory for a name and return its
- * i_number.
- */
-static int
-search_directory(name, fp, inumber_p)
- char * name;
- register struct file *fp;
- ino_t *inumber_p; /* out */
-{
- vm_offset_t buf;
- vm_size_t buf_size;
- vm_offset_t offset;
- register struct minix_directory_entry *dp;
- int length;
- kern_return_t rc;
- char tmp_name[15];
-
- length = strlen(name);
-
- offset = 0;
- while (offset < fp->i_ic.i_size) {
- rc = buf_read_file(fp, offset, &buf, &buf_size);
- if (rc != KERN_SUCCESS)
- return (rc);
-
- dp = (struct minix_directory_entry *)buf;
- if (dp->inode != 0) {
- strncpy (tmp_name, dp->name, MINIX_NAME_LEN /* XXX it's 14 */);
- tmp_name[MINIX_NAME_LEN] = '\0';
- if (strlen(tmp_name) == length &&
- !strcmp(name, tmp_name))
- {
- /* found entry */
- *inumber_p = dp->inode;
- return (0);
- }
- }
- offset += 16 /* MINIX dir. entry length - MINIX FS Ver. 1. */;
- }
- return (FS_NO_ENTRY);
-}
-
-static int
-read_fs(dev, fsp)
- mach_port_t dev;
- struct minix_super_block **fsp;
-{
- register
- struct minix_super_block *fs;
- vm_offset_t buf;
- mach_msg_type_number_t buf_size;
- int error;
-
- /*
- * Read the super block
- */
- error = device_read(dev, 0, (recnum_t) MINIX_SBLOCK, MINIX_SBSIZE,
- (char **) &buf, &buf_size);
- if (error)
- return (error);
-
- /*
- * Check the superblock
- */
- fs = (struct minix_super_block *)buf;
- if (fs->s_magic != MINIX_SUPER_MAGIC) {
- (void) vm_deallocate(mach_task_self(), buf, buf_size);
- return (FS_INVALID_FS);
- }
-
-
- *fsp = fs;
-
- return 0;
-}
-
-static int
-mount_fs(fp)
- register struct file *fp;
-{
- register struct minix_super_block *fs;
- int error;
-
- error = read_fs(fp->f_dev, &fp->f_fs);
- if (error)
- return (error);
-
- fs = fp->f_fs;
-
- /*
- * Calculate indirect block levels.
- */
- {
- register int mult;
- register int level;
-
- mult = 1;
- for (level = 0; level < MINIX_NIADDR; level++) {
- mult *= MINIX_NINDIR(fs);
- fp->f_nindir[level] = mult;
- }
- }
-
- return (0);
-}
-
-static void
-unmount_fs(fp)
- register struct file *fp;
-{
- if (file_is_structured(fp)) {
- (void) vm_deallocate(mach_task_self(),
- (vm_offset_t) fp->f_fs,
- MINIX_SBSIZE);
- fp->f_fs = 0;
- }
-}
-
-/*
- * Open a file.
- */
-int
-minix_open_file(master_device_port, path, fp)
- mach_port_t master_device_port;
- char * path;
- struct file *fp;
-{
-#define RETURN(code) { rc = (code); goto exit; }
-
- register char *cp, *component;
- register int c; /* char */
- register int rc;
- ino_t inumber, parent_inumber;
- int nlinks = 0;
-
- char namebuf[MAXPATHLEN+1];
-
- if (path == 0 || *path == '\0') {
- return FS_NO_ENTRY;
- }
-
- /*
- * Copy name into buffer to allow modifying it.
- */
- strcpy(namebuf, path);
-
- /*
- * Look for '/dev/xxx' at start of path, for
- * root device.
- */
- if (!strprefix(namebuf, "/dev/")) {
- printf("no device name\n");
- return FS_NO_ENTRY;
- }
-
- cp = namebuf + 5; /* device */
- component = cp;
- while ((c = *cp) != '\0' && c != '/') {
- cp++;
- }
- *cp = '\0';
-
- bzero (fp, sizeof (struct file));
-
- rc = device_open(master_device_port,
- D_READ|D_WRITE,
- component,
- &fp->f_dev);
- if (rc)
- return rc;
-
- if (c == 0) {
- fp->f_fs = 0;
- goto out_ok;
- }
-
- *cp = c;
-
- rc = mount_fs(fp);
- if (rc)
- return rc;
-
- inumber = (ino_t) MINIX_ROOTINO;
- if ((rc = read_inode(inumber, fp)) != 0) {
- printf("can't read root inode\n");
- goto exit;
- }
-
- while (*cp) {
-
- /*
- * Check that current node is a directory.
- */
- if ((fp->i_ic.i_mode & IFMT) != IFDIR)
- RETURN (FS_NOT_DIRECTORY);
-
- /*
- * Remove extra separators
- */
- while (*cp == '/')
- cp++;
-
- /*
- * Get next component of path name.
- */
- component = cp;
- {
- register int len = 0;
-
- while ((c = *cp) != '\0' && c != '/') {
- if (len++ > MINIX_MAXNAMLEN)
- RETURN (FS_NAME_TOO_LONG);
- if (c & 0200)
- RETURN (FS_INVALID_PARAMETER);
- cp++;
- }
- *cp = 0;
- }
-
- /*
- * Look up component in current directory.
- * Save directory inumber in case we find a
- * symbolic link.
- */
- parent_inumber = inumber;
- rc = search_directory(component, fp, &inumber);
- if (rc) {
- printf("%s: not found\n", path);
- goto exit;
- }
- *cp = c;
-
- /*
- * Open next component.
- */
- if ((rc = read_inode(inumber, fp)) != 0)
- goto exit;
-
- /*
- * Check for symbolic link.
- */
- }
-
- /*
- * Found terminal component.
- */
- out_ok:
- mutex_init(&fp->f_lock);
- return 0;
-
- /*
- * At error exit, close file to free storage.
- */
- exit:
- minix_close_file(fp);
- return rc;
-}
-
-/*
- * Close file - free all storage used.
- */
-void
-minix_close_file(fp)
- register struct file *fp;
-{
- register int i;
-
- /*
- * Free the disk super-block.
- */
- unmount_fs(fp);
-
- /*
- * Free the inode and data buffers.
- */
- free_file_buffers(fp);
-}
-
-int
-minix_file_is_directory(struct file *fp)
-{
- return (fp->i_ic.i_mode & IFMT) == IFDIR;
-}
-
-int
-minix_file_is_regular(struct file *fp)
-{
- return (fp->i_ic.i_mode & IFMT) == IFREG;
-}
-
-/*
- * Copy a portion of a file into kernel memory.
- * Cross block boundaries when necessary.
- */
-int
-minix_read_file(fp, offset, start, size, resid)
- register struct file *fp;
- vm_offset_t offset;
- vm_offset_t start;
- vm_size_t size;
- vm_size_t *resid; /* out */
-{
- int rc;
- register vm_size_t csize;
- vm_offset_t buf;
- vm_size_t buf_size;
-
- while (size != 0) {
- rc = buf_read_file(fp, offset, &buf, &buf_size);
- if (rc)
- return (rc);
-
- csize = size;
- if (csize > buf_size)
- csize = buf_size;
- if (csize == 0)
- break;
-
- bcopy((char *)buf, (char *)start, csize);
-
- offset += csize;
- start += csize;
- size -= csize;
- }
- if (resid)
- *resid = size;
-
- return (0);
-}
-
-/* simple utility: only works for 2^n */
-static int
-log2(n)
- register unsigned int n;
-{
- register int i = 0;
-
- while ((n & 1) == 0) {
- i++;
- n >>= 1;
- }
- return i;
-}
-
-/*
- * Make an empty file_direct for a device.
- */
-int
-minix_open_file_direct(dev, fdp, is_structured)
- mach_port_t dev;
- register struct file_direct *fdp;
- boolean_t is_structured;
-{
- struct minix_super_block *fs;
- int rc;
-
- if (!is_structured) {
- fdp->fd_dev = dev;
- fdp->fd_blocks = (daddr_t *) 0;
- fdp->fd_bsize = vm_page_size;
- fdp->fd_bshift = log2(vm_page_size);
- fdp->fd_fsbtodb = 0; /* later */
- fdp->fd_size = 0; /* later */
- return 0;
- }
-
- rc = read_fs(dev, &fs);
- if (rc)
- return rc;
-
- fdp->fd_dev = dev;
- fdp->fd_blocks = (daddr_t *) 0;
- fdp->fd_size = 0;
- fdp->fd_bsize = MINIX_BLOCK_SIZE;
- fdp->fd_bshift = log2(fdp->fd_bsize);
- fdp->fd_fsbtodb = log2(fdp->fd_bsize / DEV_BSIZE);
-
- (void) vm_deallocate(mach_task_self(),
- (vm_offset_t) fs,
- MINIX_SBSIZE);
-
- return 0;
-}
-
-/*
- * Add blocks from a file to a file_direct.
- */
-int
-minix_add_file_direct(fdp, fp)
- register struct file_direct *fdp;
- register struct file *fp;
-{
- register struct minix_super_block *fs;
- long num_blocks, i;
- vm_offset_t buffer;
- vm_size_t size;
- int rc;
-
- /* the file must be on the same device */
-
- if (fdp->fd_dev != fp->f_dev)
- return FS_INVALID_FS;
-
- if (!file_is_structured(fp)) {
- int result[DEV_GET_SIZE_COUNT];
- natural_t count;
-
- count = DEV_GET_SIZE_COUNT;
- rc = device_get_status( fdp->fd_dev, DEV_GET_SIZE,
- result, &count);
- if (rc)
- return rc;
- fdp->fd_size = result[DEV_GET_SIZE_DEVICE_SIZE] >> fdp->fd_bshift;
- fdp->fd_fsbtodb = log2(fdp->fd_bsize/result[DEV_GET_SIZE_RECORD_SIZE]);
- return 0;
- }
-
- /* it must hold a file system */
-
- fs = fp->f_fs;
-/*
- if (fdp->fd_bsize != fs->fs_bsize ||
- fdp->fd_fsbtodb != fs->fs_fsbtodb)
-*/
- if (fdp->fd_bsize != MINIX_BLOCK_SIZE)
- return FS_INVALID_FS;
-
- /* calculate number of blocks in the file, ignoring fragments */
-
- num_blocks = minix_lblkno(fs, fp->i_ic.i_size);
-
- /* allocate memory for a bigger array */
-
- size = (num_blocks + fdp->fd_size) * sizeof(minix_daddr_t);
- rc = vm_allocate(mach_task_self(), &buffer, size, TRUE);
- if (rc != KERN_SUCCESS)
- return rc;
-
- /* lookup new block addresses */
-
- for (i = 0; i < num_blocks; i++) {
- minix_daddr_t disk_block;
-
- rc = block_map(fp, (minix_daddr_t) i, &disk_block);
- if (rc != 0) {
- (void) vm_deallocate(mach_task_self(), buffer, size);
- return rc;
- }
-
- ((minix_daddr_t *) buffer)[fdp->fd_size + i] = disk_block;
- }
-
- /* copy old addresses and install the new array */
-
- if (fdp->fd_blocks != 0) {
- bcopy((char *) fdp->fd_blocks, (char *) buffer,
- fdp->fd_size * sizeof(minix_daddr_t));
-
- (void) vm_deallocate(mach_task_self(),
- (vm_offset_t) fdp->fd_blocks,
- (vm_size_t) (fdp->fd_size * sizeof(minix_daddr_t)));
- }
- fdp->fd_blocks = (daddr_t *) buffer;
- fdp->fd_size += num_blocks;
-
- /* deallocate cached blocks */
-
- free_file_buffers(fp);
-
- return 0;
-}
-
-int
-minix_remove_file_direct(fdp)
- struct file_direct *fdp;
-{
- if (fdp->fd_blocks)
- (void) vm_deallocate(mach_task_self(),
- (vm_offset_t) fdp->fd_blocks,
- (vm_size_t) (fdp->fd_size * sizeof(minix_daddr_t)));
- fdp->fd_blocks = 0; /* sanity */
- /* xxx should lose a ref to fdp->fd_dev here (and elsewhere) xxx */
-}
diff --git a/serverboot/minix_fs.h b/serverboot/minix_fs.h
deleted file mode 100644
index 678f3a0d..00000000
--- a/serverboot/minix_fs.h
+++ /dev/null
@@ -1,107 +0,0 @@
-/*
- * minix_fs.h
- * stolen (and slightly extended by csb) from the Linux distribution
- * Copyright (C) 1994 Linus Torvalds
- *
- * This file is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#ifndef _LINUX_MINIX_FS_H
-#define _LINUX_MINIX_FS_H
-
-/*
- * The minix filesystem constants/structures
- */
-
-/*
- * Thanks to Kees J Bot for sending me the definitions of the new
- * minix filesystem (aka V2) with bigger inodes and 32-bit block
- * pointers. It's not actually implemented yet, but I'll look into
- * it.
- */
-
-#define MINIX_ROOT_INO 1
-
-/* Not the same as the bogus LINK_MAX in <linux/limits.h>. Oh well. */
-#define MINIX_LINK_MAX 250
-
-#define MINIX_I_MAP_SLOTS 8
-#define MINIX_Z_MAP_SLOTS 8
-#define MINIX_SUPER_MAGIC 0x137F /* original minix fs */
-#define MINIX_SUPER_MAGIC2 0x138F /* minix fs, 30 char names */
-#define NEW_MINIX_SUPER_MAGIC 0x2468 /* minix V2 - not implemented */
-#define MINIX_VALID_FS 0x0001 /* Clean fs. */
-#define MINIX_ERROR_FS 0x0002 /* fs has errors. */
-
-#define MINIX_INODES_PER_BLOCK ((MINIX_BLOCK_SIZE)/(sizeof (struct minix_inode)))
-
-struct minix_inode {
- unsigned short i_mode;
- unsigned short i_uid;
- unsigned long i_size;
- unsigned long i_time;
- unsigned char i_gid;
- unsigned char i_nlinks;
- unsigned short i_zone[9];
-};
-
-/*
- * The new minix inode has all the time entries, as well as
- * long block numbers and a third indirect block (7+1+1+1
- * instead of 7+1+1). Also, some previously 8-bit values are
- * now 16-bit. The inode is now 64 bytes instead of 32.
- */
-struct new_minix_inode {
- unsigned short i_mode;
- unsigned short i_nlinks;
- unsigned short i_uid;
- unsigned short i_gid;
- unsigned long i_size;
- unsigned long i_atime;
- unsigned long i_mtime;
- unsigned long i_ctime;
- unsigned long i_zone[10];
-};
-
-/*
- * minix super-block data on disk
- */
-struct minix_super_block {
- unsigned short s_ninodes;
- unsigned short s_nzones;
- unsigned short s_imap_blocks;
- unsigned short s_zmap_blocks;
- unsigned short s_firstdatazone;
- unsigned short s_log_zone_size;
- unsigned long s_max_size;
- unsigned short s_magic;
- unsigned short s_state;
-};
-
-struct minix_dir_entry {
- unsigned short inode;
- char name[0];
-};
-
-struct minix_directory_entry {
- unsigned short inode;
- char name[14];
-};
-
-#define MINIX_NIADDR 2
-
-typedef unsigned short minix_daddr_t;
-
-#endif
diff --git a/serverboot/minix_super.h b/serverboot/minix_super.h
deleted file mode 100644
index 144cf064..00000000
--- a/serverboot/minix_super.h
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * minix_super.h
- * stolen from the Linux distribution
- * Copyright (C) 1994 Linus Torvalds
- *
- * This file is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#ifndef _LINUX_MINIX_FS_H
-#define _LINUX_MINIX_FS_H
-
-struct minix_super_block {
- unsigned short s_ninodes;
- unsigned short s_nzones;
- unsigned short s_imap_blocks;
- unsigned short s_zmap_blocks;
- unsigned short s_firstdatazone;
- unsigned short s_log_zone_size;
- unsigned long s_max_size;
- unsigned short s_magic;
- unsigned short s_state;
-};
-
-
-struct minix_inode {
- unsigned short i_mode;
- unsigned short i_uid;
- unsigned long i_size;
- unsigned long i_time;
- unsigned char i_gid;
- unsigned char i_nlinks;
- unsigned short i_zone[9];
-};
-
-#define MINIX_NIADDR 2
-
-#endif
diff --git a/serverboot/panic.c b/serverboot/panic.c
deleted file mode 100644
index 25924099..00000000
--- a/serverboot/panic.c
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Mach Operating System
- * Copyright (c) 1991,1990,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/port.h>
-#include <stdarg.h>
-#include <stdio.h>
-#include <errno.h>
-
-static mach_port_t master_host_port;
-
-panic_init(port)
- mach_port_t port;
-{
- master_host_port = port;
-}
-
-/*VARARGS1*/
-panic (const char *s, ...)
-{
- va_list listp;
-
- clearerr (stdout);
- printf("%s: panic: ", program_invocation_name);
- va_start(listp, s);
- vprintf(s, listp);
- va_end(listp);
- printf("\n");
-
-#ifdef PC532
- { int l; for (l=0;l < 1000000;l++) ; }
-#endif /* PC532 */
-#define RB_DEBUGGER 0x1000 /* enter debugger NOW */
- (void) host_reboot(master_host_port, RB_DEBUGGER);
- for (;;);
-}
diff --git a/serverboot/strfcns.c b/serverboot/strfcns.c
deleted file mode 100644
index cbead7e4..00000000
--- a/serverboot/strfcns.c
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * Mach Operating System
- * Copyright (c) 1991 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.
- */
-/*
- * Character subroutines
- */
-
-#include <stdarg.h>
-
-#define EXPORT_BOOLEAN
-#include <mach/boolean.h>
-
-/*
- * Concatenate a group of strings together into a buffer.
- * Return a pointer to the trailing '\0' character in
- * the result string.
- * The list of strings ends with a '(char *)0'.
- */
-/*VARARGS1*/
-char *
-strbuild(char *dest, ...)
-{
- va_list argptr;
- register char * src;
- register int c;
-
- va_start(argptr, dest);
- while ((src = va_arg(argptr, char *)) != (char *)0) {
-
- while ((c = *src++) != '\0')
- *dest++ = c;
- }
- *dest = '\0';
- va_end(argptr);
- return (dest);
-}
-
-/*
- * Return TRUE if string 2 is a prefix of string 1.
- */
-boolean_t
-strprefix(s1, s2)
- register char *s1, *s2;
-{
- register int c;
-
- while ((c = *s2++) != '\0') {
- if (c != *s1++)
- return (FALSE);
- }
- return (TRUE);
-}
diff --git a/storeio/ChangeLog b/storeio/ChangeLog
deleted file mode 100644
index e14aaed4..00000000
--- a/storeio/ChangeLog
+++ /dev/null
@@ -1,348 +0,0 @@
-2006-06-15 Thomas Schwinge <tschwinge@gnu.org>
-
- * open.c (open_seek): Seek into the correct direction for `SEEK_END'.
- Return EINVAL if file pointer would become negative.
-
-2005-01-08 Marco Gerards <metgerards@student.han.nl>
-
- * storeio.c (trivfs_modify_stat): Don't initialize st_blocks.
-
-2002-06-22 Roland McGrath <roland@frob.com>
-
- * storeio.c (parse_opt): Fix fencepost error in -n arg parsing.
- Reported by Nicola Girardi <nicola@g-n-u.de>.
-
-2002-06-13 Roland McGrath <roland@frob.com>
-
- * io.c (trivfs_S_io_read, trivfs_S_io_write): off_t -> loff_t.
- Fix DATA argument type.
- (trivfs_S_file_sync): Add missing last arg.
-
-2002-05-08 Roland McGrath <roland@frob.com>
-
- * pager.c (pager_read_page, pager_write_page): int -> size_t
-
-2002-03-10 Roland McGrath <roland@frob.com>
-
- * dev.c (dev_read): Return success with *LEN = 0 when reading
- exactly at the end of the store.
-
-2001-12-28 Roland McGrath <roland@frob.com>
-
- * dev.h (struct dev): New member `no_fileio' (flag).
- * storeio.c (options): Add --no-file-io/-F.
- (parse_opt): Parse it to set PARAMS->dev->no_fileio.
- (trivfs_append_args): Add --no-file-io if it's set.
- * dev.c (dev_open): Pass STORE_NOFILEIO flag if DEV->no_fileio is set.
-
-2001-08-12 Neal H Walfield <neal@cs.uml.edu>
-
- * pager.c: Include <errno.h>.
- (pager_read_page): Use memset, not bzero.
- * storeio.c (check_open_hook): Typo fix in comment.
- (trivfs_modify_stat): STORE->size is a store_offset_t.
- It not a vm_size_t.
-
-2001-05-06 Marcus Brinkmann <marcus@gnu.org>
-
- * dev.c (dev_open): Do not create/open the store with
- STORE_INACTIVE, as this doesn't work correctly. Inactivate the
- store afterwards instead.
-
-2001-02-18 Marcus Brinkmann <marcus@gnu.org>
-
- * dev.h (struct dev): New member nperopens.
- * storeio.c (open_hook): Hold device lock and check if this is the
- first open. If yes, activate the store.
- (close_hook): Hold global_lock and check if this was the last
- open. If yes, inactivate the store.
- * dev.c (dev_open): Open the store with STORE_INACTIVE
- (in store_parsed_open as well as in store_create).
-
-2001-01-17 Roland McGrath <roland@frob.com>
-
- * dev.c (dev_buf_discard): Don't check AMOUNT if store_write failed.
-
-2001-01-16 Marcus Brinkmann <marcus@gnu.org>
-
- * dev.c (dev_open): Add missing argument `classes' to invocation
- of store_create.
-
- * dev.h: Include <hurd/trivfs.h> for struct trivfs_control.
-
-2001-01-16 Roland McGrath <roland@frob.com>
-
- * storeio.c (parse_opt): Set PARAMS->store_params.store_optional.
- (storeio_fsys): New global variable.
- (main): Use it.
- * dev.h: Declare it.
- * dev.c (dev_open): If DEV->store_name is null, open the underlying
- node using store_create.
-
-2000-07-26 Mark Kettenis <kettenis@gnu.org>
-
- * Makefile (HURDLIBS): Reorder libs such that the threads lib
- comes before the ports lib. This makes sure the functions in
- libthreads properly override the stubs in libports with the new
- dynamic linker semantics in glibc 2.2.
-
-2000-03-19 Roland McGrath <roland@baalperazim.frob.com>
-
- * io.c: Comments.
-
- * dev.h (struct dev): New members store_name, readonly, rdev.
- (dev_is_readonly): New inline function.
- * dev.c (dev_open): Take just one arg, a struct dev whose store==0.
- (dev_close): Shut down the store, but leave DEV intact with store==0.
- * storeio.c (struct storeio_argp_params): New type.
- (device, device_lock, store_name): Variables removed.
- (readonly, inhibit_cache, enforce_store, rdev): Likewise.
- These are all now members in struct storeio_argp_params or struct dev;
- rdev now uses dev_t instead of int.
- (parse_opt): Find a struct storeio_argp_params in STATE->input
- and fill it in accordingly. Use makedev macro to construct rdev.
- (trivfs_append_args): Find options in struct dev off control hook.
- Use major, minor macros.
- (main): Make DEVICE a local here, and point FSYS->hook at it.
- Don't modify trivfs_allow_open.
- (getroot_hook): New static function.
- (trivfs_getroot_hook): New variable, initialized to that.
- (check_open_hook): Find struct dev in CNTL->hook and
- use new dev_open interface. Use dev_is_readonly.
- (open_hook): Find struct dev in PEROPEN->cntl->hook and
- check DEV->store.
- (trivfs_modify_stat): Find struct dev in CRED->po->cntl->hook.
- Use dev_is_readonly.
- (trivfs_goaway): Find struct dev in FSYS->hook and use its lock.
- (trivfs_S_fsys_syncfs): Find struct dev in CNTL->hook.
-
-1999-11-24 Roland McGrath <roland@baalperazim.frob.com>
-
- * storeio.c (trivfs_modify_stat): Clear writable bits if open store is
- readonly, not just if we got the --readonly switch.
-
-1999-11-20 Roland McGrath <roland@baalperazim.frob.com>
-
- * dev.c (dev_read, dev_write): In DEV->inhibit_cache case,
- handle zero (i.e. unknown) block_size by treating it as 1.
- Use shift and bitwise-and rather than multiply and modulus
- for block size arithmetic, since it's a known power of two.
-
-1999-11-14 Roland McGrath <roland@baalperazim.frob.com>
-
- * io.c (trivfs_S_file_get_storage_info): Fail with EOPNOTSUPP when
- there is no store open.
-
- * storeio.c (check_open_hook): Don't check for D_NO_SUCH_DEVICE here.
- Translation to ENXIO now done in libstore.
-
- * dev.h (struct dev): New member `enforced'.
- * storeio.c (enforce_store): New variable.
- (options, parse_opt, trivfs_append_args): Grok new option
- --enforced/-e to set enforce_store.
- (check_open_hook): Set DEVICE->enforced from enforce_store.
- * io.c (trivfs_S_file_get_storage_info): If DEV->enforced is set
- and the store flags lack STORE_ENFORCED, then return STORAGE_OTHER.
-
-1999-09-13 Roland McGrath <roland@baalperazim.frob.com>
-
- * io.c: Reverted changes related to io_map_segment.
-
-1999-09-07 Thomas Bushnell, BSG <tb@mit.edu>
-
- * io.c (trivfs_S_io_map): Renamed to ...
- (trivfs_S_io_map_segment): ... here, and accept parameter `index'.
-
-1999-07-11 Roland McGrath <roland@baalperazim.frob.com>
-
- * dev.c (dev_read: ensure_buf): Fix sloppy bugs in last change.
-
-1999-07-09 Thomas Bushnell, BSG <tb@mit.edu>
-
- * dev.c (dev_open): Use mmap instead of vm_allocate.
- (dev_read): Likewise.
-
-1999-07-10 Roland McGrath <roland@baalperazim.frob.com>
-
- * dev.c: Add #include <sys/mman.h> for munmap decl.
- * pager.c: Likewise.
-
-1999-07-03 Thomas Bushnell, BSG <tb@mit.edu>
-
- * dev.c (dev_buf_fill): Use munmap instead of vm_deallocate.
- (dev_close): Likewise.
- (dev_read): Likewise.
- * pager.c (pager_write_page): Likewise.
-
-1999-05-23 Roland McGrath <roland@baalperazim.frob.com>
-
- * storeio.c (check_open_hook): Translate D_NO_SUCH_DEVICE to ENXIO.
-
-1999-05-09 Mark Kettenis <kettenis@gnu.org>
-
- * pager.c (dev_stop_paging): Do not try to count ports in
- PAGER_PORT_BUCKET if it has not been created.
-
-1999-04-30 Mark Kettenis <kettenis@gnu.org>
-
- * storeio.c (trivfs_modify_stat): Do not assume that we have the
- device open in the caculation of st_mode. If the device is not
- open, only return S_IFCHR if inhibit_cache is set.
-
-1999-01-31 Roland McGrath <roland@baalperazim.frob.com>
-
- * storeio.c (trivfs_modify_stat): Return S_IFCHR if block size is 1.
-
- * storeio.c (trivfs_modify_stat): Return S_IFCHR iff inhibit_cache
- set, otherwsie S_IFBLK. For a block-addressed device, S_IFCHR means
- "must do whole-block i/o".
-
-1999-01-28 Roland McGrath <roland@baalperazim.frob.com>
-
- * io.c (trivfs_S_file_syncfs): Fix inverted test.
- Reported by OKUJI Yoshinori <okuji@kuicr.kyoto-u.ac.jp>.
-
-1999-01-27 Roland McGrath <roland@baalperazim.frob.com>
-
- * storeio.c (options): New option -c/--no-cache.
- (inhibit_cache): New variable.
- (parse_opt): Make -c set it.
- (trivfs_append_args): Report --no-cache if set.
- (check_open_hook): Pass inhibit_cache flag to dev_open.
- * dev.h (struct dev): New member `inhibit_cache'.
- (dev_open): Update decl.
- * dev.c (dev_open): Take new arg inhibit_cache, store in new dev.
- If set, don't initialize buf_offs, io_lock, pager, pager_lock.
- (dev_read, dev_write): If DEV->inhibit_cache is set, allow only
- whole-block i/o: EINVAL for non-whole-block attempts.
- * pager.c (dev_get_memory_object): If DEV->inhibit_cache is set, don't
- make our own pager; if store_map returns EOPNOTSUPP, so do we.
-
-1998-10-20 Roland McGrath <roland@baalperazim.frob.com>
-
- * dev.c (dev_buf_fill): Add braces to silence gcc warning.
-
-1998-07-20 Roland McGrath <roland@baalperazim.frob.com>
-
- * storeio.c (main): Fix return type to int, and use return.
-
-Wed Aug 20 14:07:05 1997 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * pager.c (dev_get_memory_object): Deal with errors from
- pager_create properly.
-
- * pager.c (service_paging_requests): New args for
- ports_manage_port_operations_multithread.
- * storeio.c (main): Likewise.
-
-1997-07-23 Miles Bader <miles@gnu.ai.mit.edu>
-
- * io.c (trivfs_S_io_readable, trivfs_S_io_read, trivfs_S_io_map):
- Return EBADF instead of EINVAL.
- (trivfs_S_io_select): Don't bother returning EBADF.
-
-1997-07-22 Miles Bader <miles@gnu.ai.mit.edu>
-
- * io.c (trivfs_S_io_read): Return EINVAL instead of EBADF.
- (trivfs_S_io_map): Return EINVAL if CRED cannot be read or written.
-
-1997-07-21 Miles Bader <miles@gnu.ai.mit.edu>
-
- * Makefile (HURDLIBS): Add iohelp.
-
-1997-07-17 Miles Bader <miles@gnu.ai.mit.edu>
-
- * io.c (trivfs_S_io_map): Pass PROT argument to dev_get_memory_object.
- * pager.c (dev_get_memory_object): Add PROT arg. Use store_map.
- * dev.h (dev_get_memory_object): Add PROT arg.
-
-1997-07-16 Miles Bader <miles@gnu.ai.mit.edu>
-
- * pager.c (pager_read_page): Initialize READ to 0.
-
- * pager.c (dev_get_memory_object): Implement correctly.
- (dev_stop_paging): Work entirely by flushing user pagers; don't kill pager.
- (pager_clear_user_data): Zero our pointer to the pager.
-
- * io.c (trivfs_S_io_map): Make sure there are enough references to
- MEMOBJ for both read & write ports.
-
-Wed Feb 19 21:42:45 1997 Miles Bader <miles@gnu.ai.mit.edu>
-
- * storeio.c (fsys_port_class, root_port_class, port_bucket,
- trivfs_protid_portclasses, trivfs_protid_nportclasses,
- trivfs_cntl_portclasses, trivfs_cntl_nportclasses): Variables removed.
- (main): Don't set or use port class/bucket variables, let
- trivfs_startup do it.
- Add FSYS variable.
- (doc): Make an initialized array.
- (parse_opt): New function (was nested in main).
- (argp, argp_kids): New variables (were nested in main).
- (trivfs_goaway): Get ROOT_PORT_CLASS from FSYS.
-
-Fri Nov 15 17:54:10 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * storeio.c (trivfs_check_open_hook): New arg syntax.
- (check_open_hook): Likewise.
-
-Thu Oct 24 16:24:53 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * storeio.c (main): Use elements of type `struct argp_child' for KIDS.
-
-Mon Oct 7 16:38:06 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * io.c (trivfs_S_file_get_storage_info): If necessary to enforce
- security, make a copy of STORE and inactivate it before returning.
-
-Thu Sep 26 14:26:17 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * storeio.c (trivfs_S_file_check_access): Function removed (trivfs
- default is now sufficient).
-
-Tue Sep 24 15:52:04 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * storeio.c (trivfs_S_file_check_access): New function.
- (check_open_hook): Return EROFS if O_WRITE on a readonly device.
-
-Mon Sep 23 17:21:23 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * storeio.c (trivfs_append_args): Make ARGZ_LEN of type `size_t *'.
- Narrow scope of BUF.
- <argz.h>: New include.
-
-Thu Sep 19 18:12:48 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * storeio.c (trivfs_append_args): New function.
-
-Wed Sep 18 15:16:27 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * io.c (trivfs_S_io_read, trivfs_S_io_write): Use void * buffers.
- * open.h (open_read, open_write): Likewise.
- * open.c (open_read, open_write): Likewise.
- * dev.h (struct dev, dev_read, dev_write): Likewise.
- * dev.c (dev_buf_fill, dev_read, dev_write): Likewise.
- * pager.c (pager_read_page): Cast BUF into void ** for dev_read.
-
- * storeio.c (main): Use STORE_PARAMS variable to get result from
- parsing STORE_ARGP.
-
- * dev.c (dev_open): Remove CLASSES argument to store_parsed_open.
-
-Thu Sep 19 17:18:11 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * Makefile (HURDLIBS): New variable.
- (storeio): Deleted special dependencies.
-
-Fri Sep 13 11:05:06 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * storeio.c (argp_program_version): New variable.
- <version.h>: New include.
-
-Tue Sep 10 17:13:55 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * dev.c (dev_rw): Return EINVAL instead of EIO for too-large offsets.
-
- * dev.c (dev_open, dev_close): Remove ifdef'd-out code for allocating
- DEV's buffer with valloc; other things depend on it being vm_allocated.
-
- * io.c (trivfs_S_file_get_storage_info): Use store_return.
diff --git a/storeio/dev.c b/storeio/dev.c
index 9a9694b2..31b084f9 100644
--- a/storeio/dev.c
+++ b/storeio/dev.c
@@ -1,6 +1,7 @@
/* store `device' I/O
- Copyright (C) 1995,96,98,99,2000,01,02 Free Software Foundation, Inc.
+ Copyright (C) 1995, 1996, 1998, 1999, 2000, 2001, 2002, 2008
+ Free Software Foundation, Inc.
Written by Miles Bader <miles@gnu.org>
This program is free software; you can redistribute it and/or
@@ -100,8 +101,8 @@ dev_buf_fill (struct dev *dev, off_t offs)
/* Do an in-buffer partial-block I/O operation. */
static error_t
dev_buf_rw (struct dev *dev, size_t buf_offs, size_t *io_offs, size_t *len,
- inline error_t (*const buf_rw) (size_t buf_offs,
- size_t io_offs, size_t len))
+ error_t (*const buf_rw) (size_t buf_offs,
+ size_t io_offs, size_t len))
{
size_t block_size = dev->store->block_size;
@@ -225,16 +226,16 @@ dev_sync(struct dev *dev, int wait)
}
/* Takes care of buffering I/O to/from DEV for a transfer at position OFFS,
- length LEN; the amount of I/O sucessfully done is returned in AMOUNT.
+ length LEN; the amount of I/O successfully done is returned in AMOUNT.
BUF_RW is called to do I/O that's entirely inside DEV's internal buffer,
and RAW_RW to do I/O directly to DEV's store. */
static inline error_t
buffered_rw (struct dev *dev, off_t offs, size_t len, size_t *amount,
- inline error_t (* const buf_rw) (size_t buf_offs,
- size_t io_offs, size_t len),
- inline error_t (* const raw_rw) (off_t offs,
- size_t io_offs, size_t len,
- size_t *amount))
+ error_t (* const buf_rw) (size_t buf_offs,
+ size_t io_offs, size_t len),
+ error_t (* const raw_rw) (off_t offs,
+ size_t io_offs, size_t len,
+ size_t *amount))
{
error_t err = 0;
unsigned block_mask = dev->block_mask;
@@ -291,11 +292,11 @@ buffered_rw (struct dev *dev, off_t offs, size_t len, size_t *amount,
buffered in DEV, and RAW_RW to do I/O directly to DEV's store. */
static inline error_t
dev_rw (struct dev *dev, off_t offs, size_t len, size_t *amount,
- inline error_t (* const buf_rw) (size_t buf_offs,
- size_t io_offs, size_t len),
- inline error_t (* const raw_rw) (off_t offs,
- size_t io_offs, size_t len,
- size_t *amount))
+ error_t (* const buf_rw) (size_t buf_offs,
+ size_t io_offs, size_t len),
+ error_t (* const raw_rw) (off_t offs,
+ size_t io_offs, size_t len,
+ size_t *amount))
{
error_t err;
unsigned block_mask = dev->block_mask;
@@ -311,8 +312,8 @@ dev_rw (struct dev *dev, off_t offs, size_t len, size_t *amount,
/* Some non-aligned I/O has been done, or is needed, so we need to deal
with DEV's buffer, which means getting an exclusive lock. */
{
- /* Aquire a writer lock instead of a reader lock. Note that other
- writers may have aquired the lock by the time we get it. */
+ /* Acquire a writer lock instead of a reader lock. Note that other
+ writers may have acquired the lock by the time we get it. */
rwlock_reader_unlock (&dev->io_lock);
err = buffered_rw (dev, offs, len, amount, buf_rw, raw_rw);
}
diff --git a/storeio/pager.c b/storeio/pager.c
index 0ad126c1..1fb1d07e 100644
--- a/storeio/pager.c
+++ b/storeio/pager.c
@@ -33,7 +33,7 @@
/* For pager PAGER, read one page from offset PAGE. Set *BUF to be the
address of the page, and set *WRITE_LOCK if the page must be provided
- read-only. The only permissable error returns are EIO, EDQUOT, and
+ read-only. The only permissible error returns are EIO, EDQUOT, and
ENOSPC. */
error_t
pager_read_page (struct user_pager_info *upi,
@@ -65,7 +65,7 @@ pager_read_page (struct user_pager_info *upi,
}
/* For pager PAGER, synchronously write one page from BUF to offset PAGE. In
- addition, vm_deallocate (or equivalent) BUF. The only permissable error
+ addition, vm_deallocate (or equivalent) BUF. The only permissible error
returns are EIO, EDQUOT, and ENOSPC. */
error_t
pager_write_page (struct user_pager_info *upi,
diff --git a/sutils/ChangeLog b/sutils/ChangeLog
deleted file mode 100644
index 71edeb8c..00000000
--- a/sutils/ChangeLog
+++ /dev/null
@@ -1,460 +0,0 @@
-2007-04-07 Thomas Schwinge <tschwinge@gnu.org>
-
- * swapon.c (main, doc) [!SWAPOFF]: Unless overridden, consider a
- swap signature when deciding whether to add a paging device or not.
-
- * MAKEDEV.sh (mkdev): Specify the creation of `lpr[0-9]' devices.
-
-2002-09-17 Marcus Brinkmann <marcus@gnu.org>
-
- * MAKEDEV.sh (mkdev: vcs): New console device.
- (mkdev: tty[0-9a-f]|tty[0-9][0-9a-f]): Replaced with new rules for
- tty[1-9][0-9].
-
-2002-06-26 Roland McGrath <roland@frob.com>
-
- * swapon.c (swaponoff): Fix last change.
-
-2002-06-14 Roland McGrath <roland@frob.com>
-
- * swapon.c (swaponoff): If get_privileged_ports fails with EPERM, try
- to open /servers/default-pager instead.
-
-2002-05-07 Roland McGrath <roland@frob.com>
-
- * swapon.c (check_signature): Use %zu for size_t arg.
-
-2002-05-03 Roland McGrath <roland@frob.com>
-
- * reboot.c: Include <error.h>.
- * halt.c: Likewise.
-
-2002-03-23 James A. Morrison <ja2morri@uwaterloo.ca>
-
- * halt.c (main): Use error, not perror.
- * reboot.c (main): Likewise.
- * update.c (main): Use error, not perror and exit.
-
-2002-03-23 Roland McGrath <roland@frob.com>
-
- * MAKEDEV.sh (mkdev: shm): Change tmpfs size argument to 50%.
-
- * MAKEDEV.sh (mkdev: shm): Give the file mode 644 and pass
- options to tmpfs: -m 1777 512M.
-
- * MAKEDEV.sh (mkdev: shm): New, uses /hurd/tmpfs filesystem.
- (mkdev: std): Add shm to the standard list.
-
-2001-09-06 Roland McGrath <roland@frob.com>
-
- * MAKEDEV.sh (pty cases): Remove ptyT? from the set. Add pty?[g-v].
-
-2001-02-27 Roland McGrath <roland@frob.com>
-
- Use a new, more flexible RPC interface to the default pager.
- This allows swapon to do its own interpretation of Linux swap
- signature pages, and to support partial-device stores such as
- store_open will return for regular files on disk filesystems.
- * swapon.c: Include <hurd/default_pager.h>, not <mach/default_pager.h>.
- (ignore_signature, require_signature, quiet): New variables.
- (options): Add --silent, --no-signature, --require-signature.
- (main: parse_opt): Parse them.
- (check_signature): New function.
- (swaponoff): Use it unless --no-signature set, to get a remapped store
- using the pages indicated by the Linux signature page. Try new
- default_pager_paging_storage RPC first, using a possibly-remapped
- device store. If the default pager does not support that, fall back
- to the old protocol that only supports whole devices (and wherein the
- default pager itself interprets a Linux signature page).
- * Makefile (swapon, swapoff): Depend on default_pagerUser.o.
-
-2001-02-18 Marcus Brinkmann <marcus@gnu.org>
-
- * fstab.c (STORE): Only copy when field exists (is non-zero).
- Reported by Alexey Dejeka <alexey@comail.ru>.
-
-2001-01-14 Marcus Brinkmann <marcus@gnu.org>
-
- * MAKEDEV.sh (mkdev: klog): New device, using /hurd/streamio kmsg.
- (mkdev: std): Add klog to the standard list.
-
-2000-03-17 Thomas Bushnell, BSG <tb@mit.edu>
-
- * clookup.c (file_name_lookup_carefully): Don't use MOVE_SEND in
- Hurd RPC.
-
-1999-12-03 Roland McGrath <roland@baalperazim.frob.com>
-
- * MAKEDEV.sh (mkdev: full): New device, using /hurd/null --full.
- (mkdev: std): Add full to the standard list.
-
-1999-11-19 Roland McGrath <roland@baalperazim.frob.com>
-
- * MAKEDEV.sh (mkdev: time): Use --no-cache flag.
- (mkdev: mem): New storeio device.
- (mkdev: std): Add mem to standard list.
-
- * Makefile (progs, scripts): New variables.
- (targets, special-targets, SRCS, OBJS): Define in terms of those.
- (libshouldbeinlibc dep rule): Replaced with static pattern rule
- with $(progs) as target list, giving %.o dep as well.
-
-1999-11-16 Roland McGrath <roland@baalperazim.frob.com>
-
- * swapon.c (swaponoff): Check for a null default pager port.
-
-1999-10-01 Roland McGrath <roland@baalperazim.frob.com>
-
- * fstab.c (fstypes_get): Check strdup return for ENOMEM failure.
- (fstypes_find_program): New function, #if 0'd out for now.
- (fstab_argp, fstab_argp_create, options, parse_opt): New variables
- and functions.
- * fstab.h: Misc comment fixes.
- (struct fstab_argp_params): New type.
- (fstab_argp, fstab_argp_create): Declare them.
- * fsck.c (options): Remove --fstab/-F, --search-fmts/-S,
- --exclude-root/-R, --exclude/-X, --fstype/-t, --all/-A;
- all of these are now factored out into fstab_argp.
- (main): Remove parsing code for options now in fstab_argp.
- Instead, use fstab_argp as an argp_child and use fstab_argp_create
- to process the option-parsing results into a struct fstab * to process.
-
- * fstab.c (fstab_read): Undo change of 1999-09-17.
- It should not be necessary at all, given 1999-05-23 change, and:
- (fstab_find_mount): Do not consider name "ignore" to match any mount.
-
-1999-10-11 Roland McGrath <roland@baalperazim.frob.com>
-
- * MAKEDEV.sh (fd): Pass --directory to /hurd/magic translator.
-
-1999-09-17 Thomas Bushnell, BSG <tb@mit.edu>
-
- * fstab.c (fstab_read): Ignore filesystems with types of ignore,
- nfs, or swap.
-
-1999-09-14 Thomas Bushnell, BSG <tb@mit.edu>
-
- * MAKEDEV.sh (mkdev): pty master and slave nodes should have mode
- 666, not 640. Reported by Marcus Brinkmann
- <Marcus.Brinkmann@ruhr-uni-bochum.de>.
-
-1999-07-10 Roland McGrath <roland@baalperazim.frob.com>
-
- * clookup.c: Add #include <sys/mman.h>.
-
- * Makefile (special-targets): Add losetup.
- (SCRIPTS): Add losetup.sh.
- * losetup.sh: New file.
-
-1999-07-03 Thomas Bushnell, BSG <tb@mit.edu>
-
- * clookup.c (file_name_lookup_carefully): Use munmap instead of
- vm_deallocate.
-
-1999-06-11 Roland McGrath <roland@baalperazim.frob.com>
-
- * fstab.c (fstypes_get): Don't free PROGRAM twice on ENOENT failure.
-
- * fsck.c (options): Add -t/--fstype option.
- (main): Parse that option, and use it to constrain fstab list.
-
- * fsck.c (FSCK_F_DRYRUN): New macro.
- (options, main): Add -N/--dry-run option to set it.
- (fs_start_fsck): If FSCK_F_DRYRUN set, just print out and return zero.
- * fsck.c (fscks_start_fsck): If FSCK_F_DRYRUN is set, don't try to
- make read-only, just print a message that we would.
-
- * fsck.c (options, main): Change --fstab from -t to -F.
-
-1999-06-10 Roland McGrath <roland@baalperazim.frob.com>
-
- * fsck.c (options): Add -A/--all and -R/--exclude-root options for
- compatibility with Linux, and --exclude=PATTERN as general form.
- (main): Parse them. Constrain fstab list by exclude patterns.
-
- * fsck.c (fsck): Don't check for "noauto" mntopt. No other system
- skips a filesystem because of it.
- (fsck): Always start at pass 1, not 0. In every other system,
- "pass 0" always means to skip that filesystem entirely.
-
-1999-05-23 Roland McGrath <roland@baalperazim.frob.com>
-
- * MAKEDEV.sh (ECHO, EXEC): Do not export.
- (DEVDIR): Initialize to `pwd` before argument parsing.
- (_CWD): Don't set this.
- (lose): New function. Use it for all miscellaneous fatal errors.
- (mkdev): Disallow directory names. Always use ${DEVDIR} for name to
- embed in translator settings.
- Rewrite syntax checking for disk device names.
-
- * fstab.c, fstab.h: Add numerous `const' qualifiers.
-
- * fstab.c (fstab_find_mount): Don't count "none" or "-" as matching
- any other entry.
-
- * fsck.c (struct fsck): Don't use bitfield.
-
-1999-05-15 Roland McGrath <roland@baalperazim.frob.com>
-
- * swapon.c: Support -a (reading fstab).
-
-1999-05-13 Roland McGrath <roland@baalperazim.frob.com>
-
- * MAKEDEV.sh (case 'time'): Make /dev/time mode 644, not 666.
-
-Thu Feb 18 02:13:47 1999 Thomas Bushnell, BSG <tb@mit.edu>
-
- * MAKEDEV.sh (mkdev): put `time' in single-quotes; it's a reserved
- word in bash 2.02 and this protects it. Reported by OKUJI
- Yoshinori <okuji@kuicr.kyoto-u.ac.jp>.
-
-Mon Feb 1 16:27:15 1999 Thomas Bushnell, BSG <tb@mit.edu>
-
- * MAKEDEV.sh (PATH): Add /usr/bin out of deference to users
- lacking the /usr symlink. Requested by Marcus Brinkmann
- <Marcus.Brinkmann@ruhr-uni-bochum.de>.
-
-1998-11-29 Roland McGrath <roland@baalperazim.frob.com>
-
- * fsck.c (main): Add braces to silence gcc warning.
-
- * fstab.c: Rename fsys_remount -> fsys_update in extern decl.
-
-1998-11-28 Roland McGrath <roland@baalperazim.frob.com>
-
- * clookup.c (file_name_lookup_carefully): Change __getuids to geteuids.
- Use hurd_file_name_lookup instead of __hurd_file_name_lookup.
-
-1998-10-24 Roland McGrath <roland@baalperazim.frob.com>
-
- * clookup.c (file_name_lookup_carefully): Use getdport instead of
- __getdport, getumask () instead of _hurd_umask.
-
-1998-10-20 Roland McGrath <roland@baalperazim.frob.com>
-
- * fstab.c (fstab_add_mntent): Add braces to silence gcc warning.
- (fs_readonly): Likewise.
-
-1998-07-19 Roland McGrath <roland@baalperazim.frob.com>
-
- * swapon.c (main): Fix return type to int, and use return.
-
-1997-10-28 Miles Bader <miles@gnu.ai.mit.edu>
-
- * MAKEDEV.sh (mkdev): Support 256 ptys.
-
-1997-08-20 Miles Bader <miles@gnu.ai.mit.edu>
-
- * fstab.c (_fs_check_mounted): file_get_translator_cntl can also
- return ENXIO for an inactive translator.
-
-1997-08-19 Miles Bader <miles@gnu.ai.mit.edu>
-
- * MAKEDEV.sh (mkdev): Handle devices of the form "cd*".
-
-1997-07-22 Miles Bader <miles@gnu.ai.mit.edu>
-
- * MAKEDEV.sh (time): Use /hurd/storeio instead of /hurd/devport.
-
-1997-07-09 Miles Bader <miles@gnu.ai.mit.edu>
-
- * Makefile (targets): Add swapon & swapoff.
- (SRCS): Add swapon.c & swapoff.c.
- Add dependencies on libstore.
- (HURDLIBS): Add libstore.
-
-1997-06-25 Miles Bader <miles@gnu.ai.mit.edu>
-
- * MAKEDEV.sh (mkdev): Add missing `ln' to command for stderr.
-
-1997-06-24 Miles Bader <miles@gnu.ai.mit.edu>
-
- * MAKEDEV.sh: Use bash fancy variables instead of various programs.
- Try to get the correct devdir even if it's not the cwd.
- Add new options --verbose/-v and --dry-run/-n.
- (cmd): New function.
- (st, mkdir): Use cmd to execute any real commands.
-
-1997-06-23 Miles Bader <miles@gnu.ai.mit.edu>
-
- * MAKEDEV.sh: Add the --devdir/-D option.
- Use the basename of $I instead of $I for various things.
- Correctly put derived names in the same directory as the arg.
-
-1997-06-21 Miles Bader <miles@gnu.ai.mit.edu>
-
- * e2os.sh: Use conv=notrunc when writing the superblock back to
- the filesystem device, in case it's a file and not a real device.
-
- * e2os.sh: If $OD & $AWK don't exist, try to get them from
- /usr/bin, so that this script works under linux too.
-
-Fri Feb 28 21:27:20 1997 Miles Bader <miles@gnu.ai.mit.edu>
-
- * fsck.c (fsck_cleanup): Correctly remove from fscks chain.
-
-Sun Feb 23 02:57:46 1997 Miles Bader <miles@gnu.ai.mit.edu>
-
- * MAKEDEV.sh (mkdev): Make I local.
-
-Wed Feb 19 23:08:04 1997 Miles Bader <miles@gnu.ai.mit.edu>
-
- * halt.c, reboot.c, fsck.c (argp_program_version): Make const.
-
-Wed Feb 5 11:50:19 1997 Miles Bader <miles@gnu.ai.mit.edu>
-
- * fstab.c (fstypes_get): Improve error behavior a bit.
-
- * fsck.c (fsck): In non-automatic mode, print a warning if a
- filesystem is of a type that can't be fscked.
-
-Tue Feb 4 17:09:39 1997 Miles Bader <miles@gnu.ai.mit.edu>
-
- * fstab.c (fs_set_mntent): Avoid null deferences.
- (fstypes_get): Fill in FSTYPE in the case where we added a new type.
-
-Thu Sep 26 15:36:55 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * Makefile (targets, special-targets): Add MAKEDEV.
- (SCRIPTS): Add MAKEDEV.sh.
- (DIST_FILES): Variable removed.
- (all): Target removed.
- ($(prefix)/dev/MAKEDEV): Get rid of dependencies.
- Implement with a symbolic link to /sbin/MAKEDEV.
- (%: %.sh): Variable removed.
-
-Tue Sep 24 14:46:11 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * MAKEDEV.sh: Fix argument parsing.
- (zero): Use `storeio -Tzero' instead of `null -z'.
-
-Thu Sep 19 17:48:59 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * fstab.c (fs_remount): Use fsys_update instead of fsys_remount.
-
-Wed Sep 18 19:12:19 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * MAKEDEV.sh: Use a shell function `mkdev' for recursion, rather
- than calling this script recursively.
-
-Thu Sep 12 18:53:42 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * fsck.c (fs_start_fsck): Print an error for filesystem types we
- don't know how to fsck, instead of dying with an assertion failure.
-
-Thu Sep 19 16:58:18 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * Makefile (install): Depend on installation directory directly;
- don't make installed files depend on it.
-
-Tue Sep 17 12:36:09 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * Makefile ($(prefix)/dev/MAKEDEV): Depend on $(prefix)/dev.
- ($(prefix)/dev): New target.
-
-Thu Sep 12 16:38:11 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * Makefile (HURDLIBS): New variable.
-
-Sun Sep 8 13:57:34 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * MAKEDEV.sh: New file.
- * Makefile (DIST_FILES): New variable.
- (install): Depend on $(prefix)/dev/MAKEDEV.
- (all): Depend on MAKEDEV.
- ($(prefix)/dev/MAKEDEV): New rule.
-
-Thu Sep 5 11:40:00 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * Makefile: Use $(top_srcdir)/sh-version.sed to make executables
- from .sh files.
-
- * fsck.c: Include <version.h>.
- (argp_program_version): Define with STANDARD_HURD_VERSION.
- * halt.c: Likewise.
- * reboot.c: Likewise.
-
-Tue Aug 27 12:06:55 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * reboot.c, halt.c (main): Add argument parsing.
- (argp_program_version): New variable.
- <argp.h>, <hurd.h>: New includes.
- * Makefile (fsck): Remove dependency on libshouldbeinlibc.a.
- (reboot halt fsck): Add dependency on libshouldbeinlibc.a.
-
-Mon Aug 19 15:17:38 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * fsck.c (doc): Supply a useful value.
-
-Wed Aug 14 13:32:12 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * e2os.sh: Add `;' before last commands inside { } pairs.
- (OS_FREEBSD, OS_LITES): New variables.
- Add symbolic names for freebsd & lites.
-
-Mon Aug 12 10:51:24 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * e2os.sh: New file.
- * Makefile (targets): Add e2os.
- (SRCS): Add $(SCRIPTS).
- (special-targets, SCRIPTS, LCLHDRS): New variables.
-
-Thu Aug 1 16:29:31 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * clookup.c (file_name_lookup_carefully/lookup): When appending
- TAIL to RETRY_NAME, use strcpy instead of strcat.
-
-Sat Jul 6 19:55:22 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * fsck.c: (argp_program_version): New variable.
-
-Wed Jul 3 14:22:03 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * fstab.c (fstab_add_fs): Don't SEGV if COPY is 0.
-
-Thu Jun 27 00:01:04 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * fsck.c (fsck): Fsck pass 0 if not in automatic mode. Respect
- `noauto' option in automatic mode.
- (main): Set FSCK_F_AUTO flag if in automatic mode.
- (FSCK_F_AUTO): New macro.
- (fs_start_fsck): When deciding to use a flags arg, mask flags
- against an explicit list of valid ones.
-
-Tue Jun 25 18:39:44 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * fsck.c (main, options): Add --writable/-w option.
- (FSCK_F_WRITABLE): New macro.
- (struct fsck): Rename WAS_READONLY field to MAKE_WRITABLE.
- (fscks_start_fsck): Change to set make_writable field instead of
- was_readonly.
- (fsck_cleanup): Change RESTORE_WRITABLE to MAKE_WRITABLE.
- (fscks_wait): Likewise.
-
-Thu Jun 20 14:08:12 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * fsck.c (fsck): Wait for fscks to finish.
- * fstab.c (fstypes_create): Copy SEARCH_FMTS contents into NEW.
- (fs_set_mntent): Don't keep old fsys fields if the mnt_dir is changed.
- (fstab_add_mntent): Initialize fields in FS with non-zero values.
- (_fs_check_mounted): The root is always mounted.
-
-Wed Jun 19 10:44:16 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * fstab.c (fs_set_readonly, fs_remount): If fsys_set_options
- returns EINVAL, return EOPNOTSUPP instead.
- (fs_set_readonly): Use fsys_set_readonly.
- (fs_remount): Use fsys_remount.
- (fs_readonly): Use fsys_get_readonly.
- (_fs_check_mounted): Use file_name_lookup_carefully.
- * clookup.c: New file.
- * fsck.c (_debug): New variable.
- (debug, fs_debug): New macros.
- (fs_start_fsck, fscks_start_fsck, fsck_cleanup, fscks_wait, fsck, main):
- Add debugging noise.
- (main): Use FSTAB_PATH instead of _PATH_MNTTAB.
- (args_doc): Fix.
-
-Tue Jun 18 22:56:11 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * fsck.c (options): Rename `--max-parallel' to `--parallel'.
diff --git a/sutils/MAKEDEV.sh b/sutils/MAKEDEV.sh
index c9bd209f..4277b052 100644
--- a/sutils/MAKEDEV.sh
+++ b/sutils/MAKEDEV.sh
@@ -51,12 +51,12 @@ case "$#" in 0)
exit 1;;
esac
-function cmd {
+cmd() {
eval $ECHO "$@"
eval $EXEC "$@"
}
-function st {
+st() {
local NODE="$1"
local OWNER="$2"
local PERM="$3"
@@ -68,7 +68,7 @@ function st {
fi
}
-function lose {
+lose() {
local line
for line; do
echo 1>&2 "$0: $line"
@@ -76,7 +76,7 @@ function lose {
exit 1
}
-function mkdev {
+mkdev() {
local I
for I; do
case $I in
@@ -120,7 +120,7 @@ function mkdev {
# ptys
[pt]ty[pqrstuvwxyzPQRS]?)
# Make one pty, both the master and slave halves.
- local id="${I:3}"
+ local id="${I#???}"
st pty$id root 666 /hurd/term ${DEVDIR}/pty$id \
pty-master ${DEVDIR}/tty$id
st tty$id root 666 /hurd/term ${DEVDIR}/tty$id \
diff --git a/sutils/Makefile b/sutils/Makefile
index be2da539..b2383579 100644
--- a/sutils/Makefile
+++ b/sutils/Makefile
@@ -1,6 +1,6 @@
# Makefile for sutils
#
-# Copyright (C) 1996,97,99,2000 Free Software Foundation, Inc.
+# Copyright (C) 1996,97,99,2000,2010 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
@@ -25,7 +25,7 @@ scripts = e2os MAKEDEV losetup
targets = $(special-targets) $(progs)
special-targets = $(scripts)
installationdir = $(sbindir)
-SRCS = $(progs:=.c) $(scripts:=.sh)
+SRCS = $(progs:=.c) clookup.c fstab.c update.c $(scripts:=.sh)
LCLHDRS = fstab.h
OBJS = $(progs:=.c)
diff --git a/sutils/clookup.c b/sutils/clookup.c
index 8fe015e1..0107799c 100644
--- a/sutils/clookup.c
+++ b/sutils/clookup.c
@@ -36,7 +36,7 @@
any passive translators. If a node with an unstarted passive translator
is encountered, ENXIO is returned in ERRNO; other errors are as for
file_name_lookup. Note that checking for an active translator currently
- requires fetching the control port, which is a priveleged operation. */
+ requires fetching the control port, which is a privileged operation. */
file_t
file_name_lookup_carefully (const char *name, int flags, mode_t mode)
{
diff --git a/sutils/fsck.c b/sutils/fsck.c
index 424e3f17..1ab9caa5 100644
--- a/sutils/fsck.c
+++ b/sutils/fsck.c
@@ -41,7 +41,7 @@
Although it knows something about the hurd, this fsck still uses
/etc/fstab, and is generally not very integrated. That will have to wait
- until the appropiate mechanisms for doing so are decided. */
+ until the appropriate mechanisms for doing so are decided. */
#include <stdlib.h>
#include <string.h>
diff --git a/sutils/fstab.c b/sutils/fstab.c
index e40572e2..b66e5195 100644
--- a/sutils/fstab.c
+++ b/sutils/fstab.c
@@ -497,7 +497,29 @@ fstab_find_mount (const struct fstab *fstab, const char *name)
inline struct fs *
fstab_find (const struct fstab *fstab, const char *name)
{
- return fstab_find_device (fstab, name) ?: fstab_find_mount (fstab, name);
+ struct fs *ret;
+ const char *real_name;
+
+ ret = fstab_find_device (fstab, name);
+ if (ret)
+ return ret;
+
+ ret = fstab_find_mount (fstab, name);
+ if (ret)
+ return ret;
+
+ real_name = realpath (name, NULL);
+
+ ret = fstab_find_device (fstab, real_name);
+ if (ret) {
+ free (real_name);
+ return ret;
+ }
+
+ ret = fstab_find_mount (fstab, real_name);
+ free (real_name);
+
+ return ret;
}
/* Cons FS onto the beginning of FSTAB's entry list. */
@@ -571,7 +593,7 @@ fstab_add_mntent (struct fstab *const fstab, const struct mntent *mntent,
free (fs);
}
- if (!err && mounted_fs)
+ if (!err && mounted_fs && mounted_fs != fs)
/* Get rid of the conflicting entry MOUNTED_FS. */
fs_free (mounted_fs);
diff --git a/tasks b/tasks
index 0637a880..871bde17 100644
--- a/tasks
+++ b/tasks
@@ -94,7 +94,7 @@ Please discuss proposed microkernel work with thomas@gnu.org.
can be device_open'd, as well as to get the type of a device.
* A way to have the kernel send a message on some designated port
- everytime a new task is started.
+ every time a new task is started.
* OSF has enhanced the exception_raise protocol to include thread_state
information. This code should be merged into the kernel; OSF people
diff --git a/term/ChangeLog b/term/ChangeLog
deleted file mode 100644
index aa997d57..00000000
--- a/term/ChangeLog
+++ /dev/null
@@ -1,1023 +0,0 @@
-2004-03-05 Marcus Brinkmann <marcus@gnu.org>
-
- * term.h (QUEUE_LOWAT): Increase to 200.
- (QUEUE_HIWAT): Increase to 8100.
-
-2003-04-25 Alfred M. Szmidt <ams@kemisten.nu>
-
- * term.h (rdev): Change type to dev_t.
-
-2002-11-20 Roland McGrath <roland@frob.com>
-
- * main.c (parse_opt: case ARGP_KEY_SUCCESS): After initializing a new
- bottomhalf, call its assert_dtr hook if TTY_OPEN is set in termflags.
-
-2002-11-19 Roland McGrath <roland@frob.com>
-
- * main.c (parse_opt: case ARGP_KEY_SUCCESS): Set tty_arg along with
- tty_type from new argument value.
- Reported by David Walter <dwalter@syr.edu>.
-
-2002-09-10 Marcus Brinkmann <marcus@gnu.org>
-
- * hurdio.c (hurdio_writer_loop): Check output_stopped instead termflags.
- Move the code that signals the underlying file to ...
- (hurdio_start_output): ... here.
-
- * munge.c (input_character): Really toggle USER_OUTPUT_SUSP if
- VSTART == VSTOP.
-
- * hurdio.c (hurdio_writer_loop): Desert the DTR on all errors, not
- only EIO.
- (hurdio_reader_loop): Likewise.
-
-2002-08-18 Roland McGrath <roland@frob.com>
-
- * main.c (main): Open with O_RDWR only for hurdio bottomhalf.
-
-2002-06-25 Roland McGrath <roland@frob.com>
-
- * term.h (struct bottomhalf): New member `fini'.
- * hurdio.c (hurdio_fini): New function.
- (hurdio_bottom): Use it.
- * devio.c (devio_fini): New function.
- (devio_bottom): Use it.
- * ptyio.c (ptyio_bottom): Add 0 entry for `fini'.
-
- * main.c (trivfs_runtime_argp): New variable.
- (options): Add --name/-N and --type/-T options.
- (parse_opt): Collect parsed options in temporary storage and apply
- them only at final success. For T_HURDIO, allow absent arg.
- For non-startup parsing call, allow any missing args.
- (tty_type_names): New const variable.
- (trivfs_append_args): New function.
- (main): Open underlying node with O_RDWR.
- * hurdio.c (wait_for_dtr): If tty_arg is null, use termctl->underlying
- instead of opening a node by name.
- (hurdio_desert_dtr): If tty_arg is null, don't deallocate ioport.
-
-2002-06-25 Marcus Brinkmann <marcus@gnu.org>
-
- * term.h (struct bottomhalf): New member GWINSZ.
- * devio.c (devio_bottom): Add new member.
- * ptyio.c (ptyio_bottom): Likewise.
- * hurdio.c (hurdio_bottom): Likewise.
- (hurdio_gwinsz): New function.
- (tioc_caps): Change type to unsigned int.
- (TIOC_CAP_GWINSZ): New symbol.
- * users.c (open_hook): Call GWINSZ of bottom layer after
- establishing the carrier.
-
-2002-06-13 Roland McGrath <roland@frob.com>
-
- * ptyio.c (pty_io_readable): int -> size_t in argument type.
- * term.h: Update decl.
- * users.c (trivfs_S_io_write): int -> size_t in AMT argument type.
- (trivfs_S_io_readable): Likewise.
- (trivfs_S_io_read): Likewise. Also u_int -> size_t, off_t -> loff_t.
- (trivfs_S_io_write): Likewise.
- (trivfs_S_io_map): Add reply port args.
-
-2002-05-28 Roland McGrath <roland@frob.com>
-
- * devio.c (device_open_reply): int -> size_t
- (devio_set_bits, devio_mdmctl, devio_mdmstate): Likewise.
-
-2002-05-08 Roland McGrath <roland@frob.com>
-
- * main.c (main): Add a return after `error' call to clue compiler in.
-
-2002-05-03 Roland McGrath <roland@frob.com>
-
- * hurdio.c (hurdio_reader_loop): Add a return stmt.
- (hurdio_writer_loop): Likewise.
-
-2002-03-23 James A. Morrison <ja2morri@uwaterloo.ca>
-
- * main.c: Include <error.h>.
- (main): Use error, not fprintf and exit or perror and exit. Use
- ERR, not errno. Use MACH_PORT_NULL explicitly.
- * users.c: Include <error.h>.
- (init_users): Use ERR, not errno. Use error, not perror and exit.
-
-2002-03-05 Marcus Brinkmann <marcus@gnu.org>
-
- * main.c (main): Use memset instead bzero.
- Fix error message, and formatting of some comments.
- * ptyio.c (pty_io_read): Use memcpy instead bcopy.
-
- * users.c (S_tioctl_tiocflush): Ignore error by bottom handler's
- notice_input_flushed.
- * users.c (set_state): Likewise.
- If bottom handler's set_bits fails, don't adjust terminal state
- but return success anyway.
-
-2002-02-10 Marcus Brinkmann <marcus@gnu.org>
-
- * term.h: Declare rdev.
- * main.c (options): New variable.
- (parse_opt): Handle case `n' to set rdev number.
- Also return EINVAL if terminal type is invalid.
- * users.c (trivfs_modify_stat): Set ST->st_rdev to global rdev.
-
-2002-02-10 Marcus Brinkmann <marcus@gnu.org>
-
- * hurdio.c: New file.
- * Makefile (SRCS): Add hurdio.c.
- * term.h: Add hurdio_bottom declaration.
- * main.c: Add T_HURDIO to enum of tty_type.
- (parse_opt): Add case for hurdio bottom handler.
- (term_argp): Likewise.
- (main): Likewise.
-
-2002-02-10 Marcus Brinkmann <marcus@gnu.org>
-
- * main.c: Include `argp.h' and `version.h'.
- (argp_program_version): New global variable.
- (tty_name, tty_type, tty_arg): Likewise.
- (parse_opt): New function.
- (term_argp): New global variable.
- (main): Call argp_parse, use new global variables to parse the
- options. Remove TYPE variable. Get the bootstrap port after
- checking the argument line.
- * term.h (pterm_name): Remove variable.
- (tty_arg): Declare variable.
- * devio.c (initial_open): Use tty_arg instead pterm_name.
- (devio_assert_dtr): Likewise.
-
-2002-02-10 Marcus Brinkmann <marcus@gnu.org>
-
- * term.h: Include `hurd/hurd_types.h'.
- (struct bottomhalf): Change the return types of the following
- members from void to error_t: abandon_physical_output,
- suspend_physical_output, notice_input_flushed, desert_dtr,
- set_break, clear_break, start_output, set_bits (which now takes an
- struct termios * as argument), mdmctl and mdmstate (which now
- takes an int * as argument). Add new members init and type.
- (bottom): Define as const.
- (devio_bottom, ptyio_bottom): Declare as const.
- (drop_output): Change return type from void to error_t.
- (ptyio_init): Remove prototype.
- * devio.c (devio_abandon_physical_output): Change return value to
- error_t, and return 0.
- (devio_suspend_physical_output): Likewise.
- (devio_notice_input_flushed): Likewise.
- (devio_desert_dtr): Likewise.
- (devio_set_break): Likewise.
- (devio_clear_break): Likewise.
- (devio_start_output): Likewise.
- (devio_set_bits): Likewise.
- (devio_mdmctl): Likewise.
- (devio_mdmstate): Likewise.
- (init_devio): Rename to ...
- (devio_init): ... this. Do not give constructor attribute.
- Change return type to error_t, and return an error value, rather
- than bailing out. Declare as static.
- (devio_bottom): Add type TERM_ON_MACHDEV and init function
- devio_init, and define as const.
- (devio_set_bits): Accept new argument STATE and use that to work
- out the terminal state, rather than changing the global termstate.
- (devio_mdmstate): Accept new argument STATE and use that to return
- the bits.
- * ptyio.c: Do not include `hurd/hurd_types.h'.
- (ptyio_suspend_physical_output): Change return value to error_t,
- and return 0. Likewise.
- (ptyio_notice_input_flushed): Likewise.
- (ptyio_desert_dtr): Likewise.
- (ptyio_set_bits): Likewise.
- (ptyio_set_break): Likewise.
- (ptyio_clear_break): Likewise.
- (ptyio_mdmctl): Likewise.
- (ptyio_start_output): Likewise.
- (ptyio_abandon_physical_output): Likewise.
- (ptyio_mdmstate): Likewise, and accept new argument STATE.
- (ptyio_init): Declare as static and change return type to error_t.
- (ptyio_bottom): Add type TERM_ON_MASTERPTY and init function
- ptyio_init, and define as const.
- (ptyio_set_bits): Accept new argument STATE and use that to work
- out the terminal state, rather than changing the global termstate.
- (ptyio_mdmstate): Accept new argument STATE and use that to return
- the bits.
- * munge.c (drop_output): Change return value to error_t. Only
- clear queue if there was no error.
- * users.c (S_term_get_bottom_type): Just return bottom->type.
- (set_state): Rework logic to take possible errors into account,
- and to delay changing the termstate until we know that we won't
- fail.
- (S_tioctl_tiocflush): Return errors properly, and clear queue only
- if notice_input_flushed succeeded.
- (open_hook): Save error value of set_bits. Save old termflags and
- restore them if if set_bits failed. Call set_bits with correct
- arguments.
- (S_tioctl_tiocmods): Set err to result of mdmctl.
- (S_tioctl_tiocmset): Likewise.
- (S_tioctl_tiocmbic): Likewise.
- (S_tioctl_tiocmbis): Likewise.
- (S_tioctl_tioccdtr): Likewise.
- (S_tioctl_tiocsdtr): Likewise.
- (S_tioctl_tioccbrk): Likewise for clear_break.
- (S_tioctl_tiocsbrk): Likewise for set_break.
- (S_tioctl_tiocstart): Likewise for start_output. Save old
- termflags and restore them if if start_output failed.
- (S_tioctl_tiocstop): Likewise for stop_output.
- (S_trivfs_io_write): Abort the operation if start_output fails.
- Do not call start_output if it just failed, or if there was no
- data to be written.
- * main.c (main): Initialize bottom handler (rather than special
- casing this for ptyio).
-
- * users.c (open_hook): Use memcpy instead bcopy and memset instead
- bzero.
- (S_tioctl_tiocgeta): Likewise.
- (set_state): Likewise.
- (open_hook): Likewise.
- * munge.c (rescan_inputq): Likewise.
-
-2002-01-30 Marcus Brinkmann <marcus@gnu.org>
-
- * users.c (trivfs_S_io_select): Remove IDTAG argument.
- Also in invocation of pty_io_select.
- * ptyio.c (pty_io_select): Likewise.
- * term.h (pty_io_select): Likewise.
-
-2002-01-04 Marcus Brinkmann <marcus@gnu.org>
-
- * devio.c (bogus_speed_to_real_speed): Handle B57600, B115200 if
- they are defined. Reported by Diego Roversi <diegor@tiscalinet.it>.
-
-2001-12-17 Roland McGrath <roland@frob.com>
-
- * munge.c (input_character): Fix DISCARD character handling
- so it doesn't process the character as plain input.
-
-2001-10-14 Roland McGrath <roland@frob.com>
-
- * devio.c (real_speed_to_bogus_speed): Handle B57600, B115200 if they
- are defined. Reported by Diego Roversi <diegor@tiscalinet.it>.
-
-2001-04-01 Neal H Walfield <neal@cs.uml.edu>
-
- * users.c (S_termctty_open_terminal): Use iohelp_create_empty_iouser.
-
-2001-06-01 Roland McGrath <roland@frob.com>
-
- * users.c (trivfs_S_io_select): Fix typo in last change.
-
-2001-05-30 Roland McGrath <roland@frob.com>
-
- * users.c (trivfs_S_io_select): Mask out SELECT_READ and/or
- SELECT_WRITE if those accesses are not allowed by the peropen.
- Don't keep old bits in AVAILABLE across waits, return only
- what is true at the moment we return.
-
-2001-05-27 Roland McGrath <roland@frob.com>
-
- * users.c (trivfs_S_io_select): Don't mask out SELECT_URG bit.
- Just let it never be set in the eventual result. Yes, this
- can mean blocking forever when SELECT_URG is the only bit set.
-
-2001-05-26 Roland McGrath <roland@frob.com>
-
- * users.c (trivfs_S_io_select): Don't diagnose an error for *TYPE
- containing irrelevant bits (i.e. SELECT_URG). It's always ok to
- ask even when the answer is always no.
-
-2000-07-26 Mark Kettenis <kettenis@gnu.org>
-
- * Makefile (HURDLIBS): Reorder libs such that the threads lib
- comes before the ports lib. This makes sure the functions in
- libthreads properly override the stubs in libports with the new
- dynamic linker semantics in glibc 2.2.
-
-2000-03-17 Thomas Bushnell, BSG <tb@mit.edu>
-
- * main.c (main): Don't use MAKE_SEND in Hurd RPC.
-
-2000-03-17 Roland McGrath <roland@baalperazim.frob.com>
-
- * devio.c (devio_abandon_physical_output): Use ports_get_send_right.
- (initial_open): Use ports_get_send_right.
- (device_open_reply): Use ports_get_send_right.
-
- * users.c (send_signal): Use ports_get_send_right.
-
-1999-10-04 Thomas Bushnell, BSG <tb@mit.edu>
-
- * term.h, devio.c, users.c: Revert previous change. Do it this
- way instead:
- * users.c (report_carrier_error): New function.
- (carrier_error): New static global variable.
- (open_hook): Deal with errors from carrier open.
- * devio.c (device_open_reply): Move the !RETURNCODE case out of
- the "initial open" case and use report_carrier_error.
- * term.h (report_carrier_error): Declare new function.
-
-1999-10-01 Roland McGrath <roland@baalperazim.frob.com>
-
- * term.h (NO_DEVICE): New macro, bit for termflags.
- (termflags): Change type to uint_fast32_t.
- * devio.c (device_open_reply): For D_NO_SUCH_DEVICE error reply, set
- NO_DEVICE flag in termflags.
- * users.c (open_hook): If NO_DEVICE flag set, return ENXIO immediately.
- If we put out an open request, check for that bit as well as
- NO_CARRIER changing in termflags and diagnose with ENXIO.
-
- * Makefile (device_replyServer-CPPFLAGS): New variable, turn off
- TypeCheck for this stub. This is necessary for error replies to get
- through to our server-side functions in devio.c.
-
-1999-09-13 Roland McGrath <roland@baalperazim.frob.com>
-
- * users.c: Reverted changes related to io_map_segment.
-
-1999-09-07 Thomas Bushnell, BSG <tb@mit.edu>
-
- * users.c (trivfs_S_io_map): Renamed to ...
- (trivfs_S_io_map_segment): ... here.
-
-1999-07-23 Roland McGrath <roland@baalperazim.frob.com>
-
- * term.h (ILCASE, OLCASE): Use IUCLC, OLCUC if defined.
-
-1999-07-11 Roland McGrath <roland@baalperazim.frob.com>
-
- * term.h: Add #include <sys/mman.h>.
-
-1999-07-09 Thomas Bushnell, BSG <tb@mit.edu>
-
- * ptyio.c (pty_io_read): Use mmap instead of vm_allocate.
- * users.c (trivfs_S_io_read): Likewise.
-
-1999-05-24 Mark Kettenis <kettenis@gnu.org>
-
- * devio.c: Include <assert.h>, <errno.h> and <error.h>. Do
- not include <stdio.h> and <sys/types.h>.
- Reorganize the order of inclusion of the header files a bit and
- document the baud-rate hackery. Include <termios.h> explicitely.
- (init_devio): Use new local variable ERR instead of ERRNO. Use
- error instead of perror and exit to report failure.
- (devio_desert_dtr): Declare BITS as `int' instead of
- `dev_status_t'.
-
-1999-05-13 Roland McGrath <roland@baalperazim.frob.com>
-
- * users.c (trivfs_S_file_chown): Either arg being -1 means don't
- change that id.
-
-1999-03-22 Roland McGrath <roland@baalperazim.frob.com>
-
- * devio.c (initial_open): Fix typos.
-
-Wed Mar 17 16:32:05 1999 Thomas Bushnell, BSG <tb@mit.edu>
-
- * users.c (S_term_get_peername): Compare BOTTOM against the
- correct value, and call ports_port_deref with the proper name.
- Reported by Yamashita TAKAO (az207@epa.go.jp).
-
- * devio.c (devio_desert_dtr): Cast &BITS correctly in call to
- device_set_status.
- (device_open_reply): Alwas clean open_pending no matter what. Use
- ERR instead of ERRNO. On fake opens, close the device before
- deallocating the port.
- Reported by Mark Kettenis (kettenis@gnu.org).
-
-Tue Mar 16 01:04:06 1999 Thomas Bushnell, BSG <tb@mit.edu>
-
- * devio.c (open_pending): Make an enum.
- (devio_desert_dtr): Don't close the device, just set the TM_HUP
- modem bit, which should cause a hangup to occur.
- (devio_assert_dtr): Don't always open the device, instead use
- initial_open the first time, and schedule a fake open the other
- times.
- (initial_open): New function, guts from old device_assert_dtr.
- (device_open_reply): Distinguish replies from initial and fake
- opens appropriately.
- (ports_do_mach_notify_send_once): Test and set open_pending using
- new enum values.
-
-Mon Mar 15 14:58:33 1999 Thomas Bushnell, BSG <tb@mit.edu>
-
- * users.c (S_term_get_peername): Implement new RPC.
-
- * users.c (S_term_get_nodename): Return ENOENT if the name is not
- set.
-
-1999-03-13 Mark Kettenis <kettenis@gnu.org>
-
- * users.c (po_destroy_hook): Only reset state and hardware if
- TTY_OPEN bit is set in TERMFLAGS.
-
-Mon Mar 1 09:11:06 1999 Thomas Bushnell, BSG <tb@mit.edu>
-
- * munge.c (output_width): If C is a tab, then the width is the
- offset from LOC, not the total final position of the tab.
- Reported by Kalle Olavi Niemitalo <tosi@ees2.oulu.fi).
-
-1999-02-28 Roland McGrath <roland@baalperazim.frob.com>
-
- * users.c (trivfs_S_io_revoke): Use ports_class_iterate.
-
-Mon Feb 22 04:34:55 1999 Thomas Bushnell, BSG <tb@mit.edu>
-
- * users.c (trivfs_S_io_revoke): Protect the revocation by blocking
- all other rpcs.
-
-Sat Feb 20 04:59:15 1999 Thomas Bushnell, BSG <tb@mit.edu>
-
- * users.c (trivfs_S_io_revoke): Release global_lock before
- beginning the iteration.
-
- * users.c (trivfs_S_io_revoke): Add reply, reply_type args.
-
-1999-02-06 Mark Kettenis <kettenis@gnu.org>
-
- * main.c (main): Initialize status from underlying node.
- * users.c (check_access_hook): New function. Correctly implement
- access permission checking.
- (trivfs_check_access_hook): Initialize with check_access_hook.
- (trivfs_S_file_check_access): Removed.
-
-Thu Feb 18 00:57:30 1999 Thomas Bushnell, BSG <tb@mit.edu>
-
- * devio.c (devio_assert_dtr): Bother to set open_pending.
- Reported by OKUJI Yoshinori (okuji@kuicr.kyoto-u.ac.jp).
-
-1999-02-16 Roland McGrath <roland@baalperazim.frob.com>
-
- * users.c (trivfs_S_io_revoke): Fix typos.
-
-Tue Feb 16 06:10:08 1999 Thomas Bushnell, BSG <tb@mit.edu>
-
- * users.c (trivfs_S_io_revoke): New function.
-
-1999-02-05 Mark Kettenis <kettenis@gnu.org>
-
- * users.c (trivfs_S_file_chmod): Clear S_ISVTX bit instead of
- clearing all other bits.
-
-Sat Jan 30 00:27:14 1999 Thomas Bushnell, BSG <tb@mit.edu>
-
- * munge.c (create_queue): Make sure that malloc succeeds.
- Reported by OKUJI Yoshinori <okuji@kuicr.kyoto-u.ac.jp>.
-
-1998-10-24 Roland McGrath <roland@baalperazim.frob.com>
-
- * users.c (open_hook): Assert DTR if NO_CARRIER, even for CLOCAL.
- This is the only thing that tells it to open the device.
-
-Mon Oct 26 16:47:18 1998 Thomas Bushnell, BSG <tb@mit.edu>
-
- * devio.c (char_size_mask_xxx): New variable.
- (devio_set_bits): Don't munge c_cflag here. Instead,
- set char_size_mask_xxx.
- (device_read_reply_inband): Mask off high bits from the input to
- simulate less than 8-bit channels.
-
-1998-09-04 Roland McGrath <roland@baalperazim.frob.com>
-
- * devio.c: Add #undef's for B19200, B38400, B57600, B115200, in case
- they are defined in <device/tty_status.h> too.
-
-1998-07-20 Roland McGrath <roland@baalperazim.frob.com>
-
- * users.c: Include <hurd/fshelp.h> for fshelp_isowner decl.
-
- * term.h (clear_queue): Change return type to void.
-
-Wed Aug 20 14:07:35 1997 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * main.c (main): New args for
- ports_manage_port_operations_multithread.
-
-Mon Jun 9 12:19:51 1997 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * users.c (trivfs_S_file_chmod): Fix typo.
-
-Tue May 27 12:04:00 1997 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * users.c (trivfs_S_file_chmod): Turn off S_ISPARE too.
-
-Fri Feb 21 13:17:48 1997 Miles Bader <miles@gnu.ai.mit.edu>
-
- * users.c (open_hook): Add OPEN_COUNT hack to try and detect lossage.
-
-Thu Feb 20 02:25:29 1997 Miles Bader <miles@gnu.ai.mit.edu>
-
- * main.c (main): Initialize TTY_CLASS & PTY_CLASS too instead of
- doing TTY_CNTL_CLASS & PTY_CNTL_CLASS twice.
-
-Wed Feb 19 13:10:47 1997 Miles Bader <miles@gnu.ai.mit.edu>
-
- * main.c (trivfs_protid_portclasses, trivfs_protid_nportclasses,
- trivfs_cntl_portclasses, trivfs_cntl_nportclasses): Variables removed.
- (main): Don't set port class/bucket variables, use
- trivfs_add_{protid,control}_port_class instead.
-
- * Makefile (HURDLIBS): Add iohelp & shouldbeinlibc.
-
-Thu Dec 12 18:33:52 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * main.c (main): Add S_IROOT to TERM_MODE.
- * users.c (trivfs_S_file_chmod): Turn off S_ITRANS bits, and turn
- on S_IROOT in TERM_MODE.
-
-Sat Nov 23 16:28:36 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * users.c: Include <hurd/iohelp.h>.
- (trivfs_S_file_chmod): Bother to fill in ST.
-
-Mon Nov 18 18:16:29 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * users.c (trivfs_modify_stat): Omit pointless assignment.
-
-Fri Nov 15 17:37:12 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * users.c (open_hook): New arg syntax.
- (trivfs_check_open_hook): Likewise.
- * ptyio.c (pty_open_hook): Likewise.
- * term.h (pty_open_hook): Likewise.
-
- * users.c (S_termctty_open_terminal): New syntax of trivfs_open.
-
- * users.c (trivfs_S_file_chown): Rewrite using idvecs.
- (trivfs_S_file_chmod): Likewise.
-
-Thu Oct 24 14:44:57 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * users.c (open_hook): Always assert DTR (even if O_NONBLOCK).
- Don't return any errors if O_NONBLOCK and we don't have carrier.
-
-Tue Oct 8 22:46:09 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * users.c (open_hook): Zero WINDOW_SIZE during initialization.
-
-Fri Oct 4 12:30:22 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * users.c (S_tioctl_tiocswinsz): Correct test for a changed winsize.
-
- * ptyio.c (pty_open_hook): Reinitialize pty variables.
-
- * ptyio.c (pty_io_select): Return SELECT_READ if the slave isn't open.
- (pty_io_read): If the slave isn't open, return EOF.
-
- * users.c (set_state, open_hook): Call (*BOTTOM)->set_bits
- unconditionally.
- * devio.c (devio_set_bits): Only execute guts if CIGNORE isn't set.
-
- * ptyio.c (pty_io_read, pty_io_write): Honor O_NONBLOCK.
-
-Wed Oct 2 10:49:18 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * ptyio.c (S_tioctl_tiocsig, S_tioctl_tiocucntl, S_tioctl_tiocpkt):
- Hold GLOBAL_LOCK while frobbing (especially around send_signal).
-
- * ptyio.c (ptyio_set_bits): We need only be in packet mode to send
- TIOCPKT_NOSTOP & TIOCPKT_DOSTOP, regardless of the value of
- EXTERNAL_PROCESSING.
-
-Thu Sep 26 14:24:16 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * ptyio.c: Include "tioctl_S.h".
-
-Thu Sep 12 16:34:37 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * Makefile (HURDLIBS): New variable.
- (OBJS): Don't list libraries here.
-
-Thu Aug 29 17:26:37 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * devio.c (device_open_reply): After error from ports_create_port,
- unlock global_lock before returning.
- * users.c (trivfs_S_io_readable): Likewise before returning
- EBADF.
-
-Thu Aug 15 16:07:07 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * users.c (trivfs_S_io_pathconf): Implement function.
-
- * term.h (QUEUE_HIWAT, QUEUE_LOWAT): New macros.
- * main.c (main): Use these new macros to create inputq, rawq, and
- outputq.
-
-Thu Aug 15 15:32:47 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * users.c (trivfs_S_file_check_access): Renamed from
- `trivfs_S_file_access'.
-
-Mon Aug 12 11:04:28 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * term.h (CTRL_BIT): Correct value is 0x40, not 0x20.
-
- * munge.c (poutput): Compute tab width using the same loop
- strategy as output_character and output_width.
-
-Thu Aug 8 17:16:06 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * munge.c (echo_char): Compute non-ctrl version of control
- character correctly.
- * term.h (CHAR_SOH): Delete macro.
- (CTRL_BIT): New macro.
-
-Mon Jul 29 02:46:12 1996 Roland McGrath <roland@baalperazim.frob.com>
-
- * munge.c (input_character): In LAST_LNEXT case, jump to `alldone'
- after putting the char on the queue.
-
-Fri Jul 19 23:46:39 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * users.c (trivfs_S_file_access): Implement locally always
- returning all access. Eventually, this needs to do the right
- thing when trivfs wises up wrt modes.
-
-Tue Jul 16 20:49:29 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * users.c (trivfs_S_io_read): Bother to set atime when
- appropriate.
-
- * users.c (trivfs_modify_stat): Fill in st->st_mode, st->st_uid,
- and st->st_gid ourselves.
- (trivfs_S_file_chown): New routine, to override trivfs default.
- (trivfs_S_file_chmod): Likewise.
- * main.c (main): Initialize term_owner, term_group, and term_mode.
- * term.h (term_owner, term_group, term_mode): New variables.
-
-Thu Jun 20 16:45:57 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * devio.c (devio_abandon_physical_output): Don't do anything if
- carrier is off.
-
-Thu Jun 20 16:26:07 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * Makefile (OBJS): Add ../libfshelp/libfshelp.a.
-
-Sat May 11 01:18:41 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * iomux.c (parse_opt): Use ARGP_ERR_UNKNOWN instead of EINVAL.
-
-Fri May 10 09:27:46 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * users.c: Include <stdio.h>.
-
- * users.c (init_users): Order args correctly in call to
- ports_create_port.
-
-Thu May 9 19:32:50 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * users.c (call_asyncs): Provide sigcode arg in call to
- nowait_msg_sig_post.
-
- * users.c (init_users): Use new ports_create_port.
- * devio.c (device_open_reply): Likewise.
-
-Thu Apr 25 16:04:17 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * ptyio.c (pty_open_hook): Don't do increment of nptyperopens
- here.
- (pty_po_create_hook): Increment nptyperopens here, but only if this is
- for O_READ or O_WRITE.
- (pty_po_destroy_hook): Only do decrement if this was for O_READ or
- O_WRITE.
- * users.c (open_hook): Don't circumvent pty_open_hook, not even
- when FLAGS is clear.
-
-Wed Apr 24 09:24:29 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * users.c (call_asyncs): Add DIR argument; all callers changed.
- * term.h: Include <fcntl.h>.
-
- * users.c (call_asyncs): Remove FORCE argument; all callers changed.
- * term.h (enqueue_internal): Go back to only using call_asyncs
- when inputq becomes non-empty.
- (SUPPRESS_ASYNC): Flag removed.
-
-Tue Apr 23 17:44:25 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * term.h (enqueue_internal): Use call_asyncs on every character.
- (SUPPRESS_ASYNC): New flag.
- * users.c (po_create_hook, trivfs_S_io_set_some_openmodes,
- trivfs_S_io_set_all_openmodes): If setting ICKY_ASYNC, then use
- call_asyncs.
- (call_asyncs): New argument, FORCE, which use. All callers changed.
- (init_users): Give our self send rights to the async id ports, since
- hurd_sig_post uses COPY_SEND.
- (trivfs_S_io_get_icky_async_id): Renamed from ..._get_async_icky.
- (trivfs_S_file_set_size, trivfs_S_io_seek,
- trivfs_S_io_get_icky_async_id, trivfs_S_io_async): Add reply port args.
-
- * users.c (num_icky_async_peropens): New variable.
- (po_create_hook, po_destroy_hook, trivfs_S_io_set_all_openmodes,
- trivfs_S_io_set_some_openmodes, trivfs_S_io_clear_some_openmodes): Use
- it to enable ICKY_ASYNC to be turned off.
-
-Tue Apr 23 14:26:22 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * users.c (call_asyncs): Delete local decl; no longer static.
- * term.h (dequeue_quote): If this is the outputq, send SIGIO as
- appropriate with call_asyncs.
- (enqueue_internal): If this is the inputq, send SIGIO as appropriate
- with call_asyncs.
- (call_asyncs): Add decl.
-
-Mon Apr 22 14:55:20 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * devio.c (real_speed_to_bogus_speed): EXTB should be 38400, not
- 24800.
-
-Tue Apr 2 16:18:09 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * ptyio.c (pty_po_create_hook): Don't do anything here.
- (pty_open_hook): Increment nptyperopens here.
-
-Wed Mar 27 11:51:43 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * users.c (trivfs_S_io_read): Call call_asyncs *before* we release
- GLOBAL_LOCK.
- (pi_destroy_hook): Leak the hook for now, to try and catch a bug. XXX
-
- * ptyio.c (pty_io_read): Block using hurd_condition_wait instead
- of condition_wait.
-
-Sat Feb 24 13:56:46 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * ptyio.c (ptyio_init): This can't be a constructor because it
- frobs INPUTQ, which is assigned in main.
- * main.c (main): Call ptyio_init if appropriate.
- * term.h: Declare ptyio_init.
-
-Wed Feb 14 14:02:54 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * users.c (trivfs_S_io_set_all_openmodes,
- trivfs_S_io_set_some_openmodes): Set ICKY_ASYNC in TERMFLAGS if
- O_ASYNC is set in BITS.
-
-Thu Jan 25 22:54:04 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * main.c (main): Use trivfs_startup & trivfs_create_port instead
- of trivfs_handle_port.
- * devio.c (devio_assert_dtr): Use ports_create_port instead of
- ports_allocate_port.
-
-Thu Jan 18 11:50:29 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * users.c (report_carrier_off): Flush queues when carrier turns
- off.
-
-Tue Dec 26 16:58:55 1995 Miles Bader <miles@gnu.ai.mit.edu>
-
- * users.c (trivfs_S_io_select): Ask for notification if our reply
- port dies. Pass REPLY to pty_io_select().
- * ptyio.c (pty_io_select): Add new reply port parameter, and ask
- for notification if it dies.
- * term.h (pty_io_select): Add new reply port parameter.
-
-Fri Dec 22 14:34:38 1995 Miles Bader <miles@gnu.ai.mit.edu>
-
- * main.c (main): Set PEERCNTL to &PTYCTL if we're a slave, not 0.
-
-Wed Dec 20 13:56:09 1995 Miles Bader <miles@gnu.ai.mit.edu>
-
- * users.c (S_term_get_nodename, S_term_set_nodename): Get the node
- name from our cred->po->cntl->hook rather than NODENAME.
- * main.c (main): Put the nodename on ourcntl->hook rather than
- NODENAME, and also put our peer's nodname on peercntl->hook.
- * term.h (nodename): Variable removed.
-
- * ptyio.c (ptyopen, nptyperopens, pktnostop, output_stopped):
- Initialize to 0.
-
-Tue Dec 19 19:57:53 1995 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * users.c (trivfs_S_io_read): After a block on the input queue,
- don't go back and check the input queue if there is a signal in
- progress; wait for the signal to complete first.
- (send_signal): Release global_lock around signal RPC. Call
- report_sig_start and report_sig_end around signal RPC.
- (call_asyncs): Likewise.
- (report_sig_start, report_sig_end): New functions.
- (sigs_in_progress, input_sig_wait, input_sig_wakeup): New variables.
-
-Thu Dec 14 12:48:08 1995 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * ptyio.c (pty_io_read): When copying TIOCPKT_DATA; account for
- size correctly.
-
- * ptyio.c (pty_io_write): Always tell the user everything was
- written.
-
-Wed Dec 13 19:32:52 1995 Miles Bader <miles@gnu.ai.mit.edu>
-
- * ptyio.c (pty_io_write): Keep track of how mount we wrote.
-
-Tue Dec 12 13:53:40 1995 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * ptyio.c (ptyio_init): Make this a constructor function.
-
- * ptyio.c (pty_open_hook, pty_po_create_hook,
- pty_po_destroy_hook): New functions.
- (ptyopen, nptyperopens): New variables.
- * term.h (pty_open_hook, pty_po_create_hook, pty_po_destroy_hook):
- New declarations.
- * users.c (open_hook): If this is the pty, then call pty specific
- function.
- (po_create_hook): Likewise.
- (po_destroy_hook): Likewise.
- (pi_create_hook): Don't do anything for pty.
- (pi_destroy_hook): Likewise.
-
- * users.c (open_hook): Don't require carrier for opens that don't
- want to read or write.
-
- * users.c (S_tioctl_tiocgpgrp): Omit bogus extra attempt to lock
- global_lock.
-
- * users.c (S_term_get_bottom_type): Return TERM_ON_MASTERPTY when
- appropriate.
-
- * main.c (main): Set BOTTOM.
-
-Tue Dec 5 15:30:36 1995 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * main.c (main): Totally rework arg parsing and translator
- linkage. No longer support being started s a shell program. Now
- support pty's, though no attempt is made to deal nicely with the
- node collision problem.
-
-Mon Dec 4 20:09:21 1995 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * term.h (pty_cntl_class, ptyctl): New variables.
- * main.c (main): Initialize pty_class, pty_cntl_class,
- trivfs_protid_portclasses[1], and trivfs_cntl_portclasses[1].
- (trivfs_protid_portclasses): Increase size to 2.
- (trivfs_cntl_portclasses): Likewise.
- (trivfs_protid_nportclasses): Increase initialization to 2.
- (trivfs_cntl_nportclasses): Likewise.
-
- * ptyio.c: Include <unistd.h>.
- (ptyio_set_bits): If the stop char state has changed, dinkle the
- stop bits in the control_byte accordingly.
-
- * term.h: Include <hurd/trivfs.h> and <sys/types.h>.
- (pty_io_write, pty_io_read, pty_io_readable, pty_io_select): New
- declarations.
- * ptyio.c: Include <fcntl.h>.
- (pty_io_read): Add CRED arg.
- (pty_io_write): Likewise.
- (pty_io_select): Likewise.
- * users.c (trivfs_S_io_write): If this is a pty master, call pty
- routine to do the work.
- (trivfs_S_io_read): Likewise.
- (trivfs_S_io_readable): Likewise.
- (trivfs_S_io_select): Likewise.
- (S_tioctl_tiocmodg): Accept both pty and tty ports.
- (S_tioctl_tiocmods): Likewise.
- (S_tioctl_tiocexcl): Likewise.
- (S_tioctl_tiocnxcl): Likewise.
- (S_tioctl_tiocflush): Likewise.
- (S_tioctl_tiocgeta): Likewise.
- (set_state): Likewise.
- (S_tioctl_tiocgetd): Likewise.
- (S_tioctl_tiocsetd): Likewise.
- (S_tioctl_tiocdrain): Likewise.
- (S_tioctl_tiocswinsz): Likewise.
- (S_tioctl_tiocgwinsz): Likewise.
- (S_tioctl_tiocmget): Likewise.
- (S_tioctl_tiocmset): Likewise.
- (S_tioctl_tiocmbic): Likewise.
- (S_tioctl_tiocmbis): Likewise.
- (S_tioctl_tiocstart): Likewise.
- (S_tioctl_tiocstop): Likewise.
- (S_tioctl_tiocsti): Likewise.
- (S_tioctl_tiocoutq): Likewise.
- (S_tioctl_tiocspgrp): Likewise.
- (S_tioctl_tiocgpgrp): Likewise.
- (S_tioctl_tioccdtr): Likewise.
- (S_tioctl_tiocsdtr): Likewise.
- (S_tioctl_tioccbrk): Likewise.
- (S_tioctl_tiocsbrk): Likewise.
- (set_state): If this op is being done on the pty master, then
- flush output before beginning work.
-
-Fri Dec 1 14:08:44 1995 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * users.c (trivfs_S_interrupt_operation): Delete function.
-
- * users.c (S_tioctl_tiocdrain): Free reference on CRED before
- returning.
-
- * munge.c (input_character): Skip much processing if
- external_processing is on.
- (output_character): Don't do tab expansion of external_processing
- is on.
- (echo_p): Never echo if external_processing is on.
- * users.c (set_state): Make EXTPROC bit read only. When
- external_processing, call set_bits even if CIGNORE.
- (S_tioctl_tiocext): Deleted function.
- * term.h (external_processing): New variable.
-
- * users.c (trivfs_S_io_readable): If remote_input_mode, then don't
- include extra final character as input.
- trivfs_S_io_read): If remote_input_mode, copy characters without
- interpretation; treat last character left in queue as junk.
- (S_tioctl_tiocremote): Deleted function.
- * term.h (remote_input_mode): New variable.
-
- * users.c (S_tioctl_tiocsig, S_tioctl_tiocpkt,
- S_tioctl_tiocucntl): Deleted functions.
-
- * term.h (ptyio_bottom, pty_class): New variables.
- * Makefile (SRCS): Added ptyio.c.
- * ptyio.c: New file.
-
- * term.h (struct bottomhalf): New member `notice_input_flushed'.
- * devio.c (devio_notice_input_flushed): New function.
- (devio_bottom): Add devio_notice_input_flushed.
- * users.c (po_destroy_hook): Call notice_input_flushed after
- flushing input queues.
- (S_tioctl_tiocflush): Likewise.
- (set_state): Likewise.
-
- * munge.c (input_character) [VSTOP]: Suspend physical output after
- setting flag.
- * term.h (struct bottomhalf): New member `suspend_physical_output'.
- * users.c (S_tioctl_tiocstart): Start output after clearing
- USER_OUTPUT_SUSP.
- (S_tioctl_tiocstop): Suspend physical output after setting flag.
- * devio.c (devio_start_output): Honor USER_OUTPUT_SUSP flag.
- Restart output if USER_OUTPUT_SUSP flag off and output_stopped true.
- (output_stopped): New variable.
- (devio_suspend_physical_output): New function.
- (devio_bottom): Add devio_suspend_physical_output.
-
- * users.c (trivfs_S_io_select): Return EINTR if we are cancelled.
-
- * munge.c (reprint_line): C-r is CHAR_DC2, not DC3.
- * term.h (CHAR_DC3): Correct value is '\023'.
- (CHAR_DC1, CHAR_DC2): New macros.
-
-Thu Nov 30 15:50:01 1995 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * devio.c (start_output): Add devio_ prefix; declare static.
- All callers changed.
- (set_break): Likewise.
- (clear_break): Likewise.
- (abandon_physical_output): Likewise.
- (pending_output_size): Likewise.
- (assert_dtr): Likewise.
- (desert_dtr): Likewise.
- (set_bits): Likewise.
- (mdmctl): Likewise.
- (mdmstate): Likewise.
- (devio_bottom): New variable.
- * term.h (struct bottomhalf): New type.
- (bottom, devio_bottom): New variables.
- (start_output, set_break, clear_break, abandon_physical_output,
- pending_output_size, assert_dtr, desert_dtr, set_bits, mdmctl,
- mdmstate): Deleted declarations.
-
- * devio.c (ports_do_mach_notify_send_once): New function.
-
-Sun Nov 5 02:07:56 1995 Miles Bader <miles@gnu.ai.mit.edu>
-
- * main.c (main): Add flags arg to fsys_startup call.
-
-Sat Sep 23 00:48:17 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * term.h: Include errno.h.
-
-Mon Sep 18 14:51:40 1995 Miles Bader <miles@churchy.gnu.ai.mit.edu>
-
- * users.c (trivfs_S_file_set_size): Renamed from
- trivfs_S_file_truncate.
-
-Sat Sep 16 13:03:40 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * Makefile (DIST_FILES): Added ourmsg.defs.
- (ourmsg_U.h ourmsgUser.c, ourmsg.defs): Targets removed.
-
-Thu Sep 7 13:08:55 1995 Michael I. Bushnell, p/BSG <mib@duality.gnu.ai.mit.edu>
-
- * users.c (trivfs_S_io_write): Start pending output before
- blocking.
-
-Fri Sep 1 09:51:11 1995 Michael I. Bushnell, p/BSG <mib@duality.gnu.ai.mit.edu>
-
- * munge.c (input_character): Clear input queues correctly for
- VINTR/VQUIT, VSUSP, and input queue full.
-
- * users.c (init_users): New function.
- * main.c (main): Call init_users.
- * term.h (init_users): New decl.
-
- * users.c (open_hook): Turn on NO_OWNER for fresh opens.
- * main.c (main): Assert NO_OWNER in initial state.
-
- * term.h (output_psize): Delete decl.
- (write_character): New decl.
- * munge.c (output_character): Don't set echo_qsize or echo_pstart
- here.
- (write_character): New function.
- (echo_char): Use write_character for closing '/' of hderase.
- (output_psize): New decl.
- * users.c (trivfs_S_io_write): Use write_character instead of
- output_character.
- * main.c (main): Don't initialize output_psize.
diff --git a/term/main.c b/term/main.c
index 516a2dcf..405e7cd8 100644
--- a/term/main.c
+++ b/term/main.c
@@ -405,7 +405,7 @@ main (int argc, char **argv)
}
if (err)
- error (1, err, peer_name);
+ error (1, err, "%s", peer_name);
(*peercntl)->hook = peer_name;
ports_port_deref (*peercntl);
diff --git a/term/munge.c b/term/munge.c
index 74d82888..660a99bd 100644
--- a/term/munge.c
+++ b/term/munge.c
@@ -582,7 +582,7 @@ input_character (int c)
echo_char (c, 0, 0);
if (CCEQ (cc[VEOF], c) && (lflag & ECHO))
{
- /* Special bizzare echo processing for VEOF character. */
+ /* Special bizarre echo processing for VEOF character. */
int n;
n = echo_double (c, 0) ? 2 : output_width (c, output_psize);
while (n--)
@@ -642,7 +642,7 @@ input_break ()
enqueue_quote (qp, '\0');
}
-/* Called when a character is recived with a framing error. */
+/* Called when a character is received with a framing error. */
void
input_framing_error (int c)
{
diff --git a/tmpfs/ChangeLog b/tmpfs/ChangeLog
deleted file mode 100644
index a5cb2989..00000000
--- a/tmpfs/ChangeLog
+++ /dev/null
@@ -1,172 +0,0 @@
-2005-03-20 Marcus Brinkmann <marcus@gnu.org>
-
- * tmpfs.c (parse_opt): Use the right argument for parsing the
- mode.
-
-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.
-
-2002-06-13 Roland McGrath <roland@frob.com>
-
- * dir.c (diskfs_lookup_hard): Cast int to intptr_t before ino_t.
-
- * dir.c (diskfs_lookup_hard): int -> ino_t
-
-2002-06-08 Roland McGrath <roland@frob.com>
-
- * node.c (diskfs_cached_lookup): Use ino_t for argument.
- * node.c (diskfs_alloc_node): Case to uintptr_t before ino_t.
- (diskfs_cached_lookup): Likewise, and vice versa.
- * dir.c (diskfs_get_directs, diskfs_lookup_hard): Likewise.
-
- * tmpfs.c (diskfs_append_args): Use %Ld format for off_t value.
-
-2002-05-29 Roland McGrath <roland@frob.com>
-
- * node.c (diskfs_S_file_get_storage_info): Return a null port when the
- peropen is not open for read/write. Set STORE_READONLY if O_WRITE set.
-
-2002-05-28 Roland McGrath <roland@frob.com>
-
- * dir.c (diskfs_get_directs): u_int -> size_t
- * tmpfs.c (diskfs_append_args): unsigned -> size_t
-
-2002-05-13 Marcus Brinkmann <marcus@gnu.org>
-
- * tmpfs.c (diskfs_extra_version): New variable.
-
-2002-05-03 Roland McGrath <roland@frob.com>
-
- * tmpfs.c (startup_argp): Use OPTIONS array in initializer.
-
-2002-03-23 Roland McGrath <roland@frob.com>
-
- * tmpfs.c (parse_opt): Grok % suffix on number to mean percentage
- of the machine's RAM.
-
- * tmpfs.c (options): New static const variable. Add --mode/-m.
- (struct option_values): New type.
- (parse_opt): Use that for VALUES. Grok -m to set VALUES->mode.
- Grok ARGP_KEY_FINI and free our data structure.
- (tmpfs_root_mode): New variable, set by -m.
- (main): If -m was given, use that instead of underlying node's
- permissions.
-
- * tmpfs.c (main): Don't release REALNODE.
-
- * node.c: Include "default_pager_U.h", not <mach/default_pager.h>.
- (diskfs_truncate): Return early if page-rounded size is unchanged.
- Call default_pager_object_set_size on the memory object.
- (diskfs_grow): Likewise.
-
- * Makefile (OBJS): Add default_pagerUser.o here.
-
-2001-09-30 Roland McGrath <roland@frob.com>
-
- * node.c (diskfs_S_file_get_storage_info): Implement it to return
- the memory object port with STORAGE_MEMORY.
-
-2001-04-23 Neal H Walfield <neal@cs.uml.edu>
-
- * tmpfs.c (main): Pass diskfs_demuxer to
- diskfs_spawn_first_thread to conform to new libdiskfs semantics.
-
-2001-05-05 Roland McGrath <roland@frob.com>
-
- * node.c (diskfs_truncate): Set st_size before rounding it up,
- and do set it when there is a memory object.
-
-2001-05-01 Neal H Walfield <neal@cs.uml.edu>
-
- * tmpfs.c (main): Set diskfs_root_node->dn_stat.st_nlink to 2.
-
-2001-04-15 Neal H Walfield <neal@cs.uml.edu>
-
- * dir.c (diskfs_get_directs): Total rewrite.
- (diskfs_lookup_hard): Likewise.
- (diskfs_enter_hard): Count node size in the size of the dirent so
- diskfs_get_directs does not have to guess; this is only a few
- bytes different. Check the amount of space correctly, i.e.
- we cannot compare bytes and pages.
- * node.c: (diskfs_free_node): We already hold
- diskfs_node_refcnt_lock; do not try to lock it again.
- (diskfs_cached_lookup): Use diskfs_nref, that is why we have it.
- Link the nodes correctly.
- (diskfs_set_translator): Add or remove S_IPTRANS from
- np->dn_stat.st_mode as appropriate.
- (diskfs_truncate): Set the new np->dn_stat.st_size.
- (diskfs_grow): Move the assert up.
-
-2001-04-10 Neal H Walfield <neal@cs.uml.edu>
-
- * tmpfs.c (diskfs_shortcurt_chrdev): Rename to diskfs_shortcut_chrdev.
- (diskfs_shortcurt_blkdev): Rename to diskfs_shortcut_blkdev.
- (diskfs_shortcurt_fifo): Rename to diskfs_shortcut_fifo.
- (diskfs_shortcurt_ifsock): Rename to diskfs_shortcut_ifsock.
-
-2001-02-26 Roland McGrath <roland@frob.com>
-
- * node.c (diskfs_free_node): Reset hnext's hprevp.
- (diskfs_node_norefs): Likewise.
- (diskfs_cached_lookup): Fix insane code for finding existing node ptr.
- (diskfs_get_filemap_pager_struct): Remove spurious assert.
- (diskfs_get_filemap): Always add a reference to the send right.
-
- * dir.c (diskfs_get_directs): When using st_size, calculate additional
- space for . and .. entries. Skip . and .. entries when ENTRY says to.
- Set d_fileno=2 for .. entry when it is the parent of the filesystem.
-
- * tmpfs.c (main): Don't lock diskfs_root_node after alloc,
- which already locks it. In root node's mode, clear S_ITRANS bits
- and set S_IROOT bit.
-
-2001-02-25 Roland McGrath <roland@frob.com>
-
- * pager-stubs.c: New file.
- * Makefile (SRCS): Add it.
-
- * node.c (diskfs_S_file_get_storage_info): New function.
- * tmpfs.c (diskfs_synchronous): New variable.
-
- * dir.c (diskfs_lookup_hard): Look up .. disknode's in-core node.
-
- * node.c: #include <mach/default_pager.h>.
-
-2000-12-30 Marcus Brinkmann <marcus@gnu.org>
-
- * dir.c: Include <stddef.h>, <unistd.h>, <sys/mman.h>
- (diskfs_get_directs): Cast *data to struct dirent *.
-
- * node.c: Include <stddef.h>.
- (diskfs_alloc_node): Remove unused variables err, st, np.
- (diskfs_free_node): Use *np->dn, not *dn to calculate used space.
- (recompute_blocks): Replace DT_DEV with DT_BLK.
- (diskfs_node_norefs): Likewise.
- (recompute_blocks): Take address of np->dn_stat for pointer st.
- (diskfs_cached_lookup): New variable st.
- (diskfs_cached_lookup): Set st to &np->dn_stat, not &dn->dn_stat.
- (create_symlink_hook): Fix malloc call and return code check.
- (read_symlink_hook): Return 0.
-
- * tmpfs.c: Include <argp.h>, <string.h>, <inttypes.h>, <argz.h>,
- <error.h>.
- (parse_opt): Reverse second and third argument of strtoimax call.
-
- * tmpfs.h (struct disknode): Remove blind passenger (unnamed copy
- of anonymous struct {} reg).
-
- Some of the above were also reported by Alexey Dejneka
- <adejneka@comail.ru>.
-
-2000-12-28 Roland McGrath <roland@frob.com>
-
- * node.c (recompute_blocks): New function, broken out of ...
- (diskfs_cached_lookup): here. Now use call that.
- (diskfs_set_translator): Likewise.
- (create_symlink_hook): Likewise. Do nothing for zero-length target.
-
-2000-12-26 Roland McGrath <roland@frob.com>
-
- * Makefile, tmpfs.c, tmpfs.h, node.c, dir.c: New files.
diff --git a/tmpfs/dir.c b/tmpfs/dir.c
index 25b99bd8..65386e0a 100644
--- a/tmpfs/dir.c
+++ b/tmpfs/dir.c
@@ -58,9 +58,6 @@ diskfs_get_directs (struct node *dp, int entry, int n,
struct dirent *entp;
int i;
- assert (offsetof (struct tmpfs_dirent, name)
- >= offsetof (struct dirent, d_name));
-
if (bufsiz == 0)
bufsiz = dp->dn_stat.st_size
+ 2 * ((offsetof (struct dirent, d_name[3]) + 7) & ~7);
@@ -247,7 +244,7 @@ diskfs_direnter_hard (struct node *dp, const char *name,
> tmpfs_page_limit)
return ENOSPC;
- new = malloc (entsize);
+ new = malloc (offsetof (struct tmpfs_dirent, name) + namelen + 1);
if (new == 0)
return ENOSPC;
diff --git a/tmpfs/node.c b/tmpfs/node.c
index fd6bd722..17fe8ce7 100644
--- a/tmpfs/node.c
+++ b/tmpfs/node.c
@@ -61,8 +61,10 @@ diskfs_free_node (struct node *np, mode_t mode)
switch (np->dn->type)
{
case DT_REG:
- if (np->dn->u.reg.memobj != MACH_PORT_NULL)
+ if (np->dn->u.reg.memobj != MACH_PORT_NULL) {
+ vm_deallocate (mach_task_self (), np->dn->u.reg.memref, 4096);
mach_port_deallocate (mach_task_self (), np->dn->u.reg.memobj);
+ }
break;
case DT_DIR:
assert (np->dn->u.dir.entries == 0);
@@ -96,9 +98,9 @@ diskfs_node_norefs (struct node *np)
np->dn->uid = np->dn_stat.st_uid;
np->dn->author = np->dn_stat.st_author;
np->dn->gid = np->dn_stat.st_gid;
- np->dn->atime = np->dn_stat.st_atime;
- np->dn->mtime = np->dn_stat.st_mtime;
- np->dn->ctime = np->dn_stat.st_ctime;
+ np->dn->atime = np->dn_stat.st_atim;
+ np->dn->mtime = np->dn_stat.st_mtim;
+ np->dn->ctime = np->dn_stat.st_ctim;
np->dn->flags = np->dn_stat.st_flags;
switch (np->dn->type)
@@ -200,9 +202,9 @@ diskfs_cached_lookup (ino_t inum, struct node **npp)
st->st_uid = dn->uid;
st->st_author = dn->author;
st->st_gid = dn->gid;
- st->st_atime = dn->atime;
- st->st_mtime = dn->mtime;
- st->st_ctime = dn->ctime;
+ st->st_atim = dn->atime;
+ st->st_mtim = dn->mtime;
+ st->st_ctim = dn->ctime;
st->st_flags = dn->flags;
st->st_rdev = 0;
@@ -500,6 +502,13 @@ diskfs_get_filemap (struct node *np, vm_prot_t prot)
past the specified size of the file. */
err = default_pager_object_set_size (np->dn->u.reg.memobj,
np->allocsize);
+ assert_perror (err);
+
+ /* XXX we need to keep a reference to the object, or GNU Mach
+ will terminate it when we release the map. */
+ vm_map (mach_task_self (), &np->dn->u.reg.memref, 4096, 0, 1,
+ np->dn->u.reg.memobj, 0, 0, VM_PROT_NONE, VM_PROT_NONE,
+ VM_INHERIT_NONE);
}
/* XXX always writable */
diff --git a/tmpfs/pager-stubs.c b/tmpfs/pager-stubs.c
index 361724a9..25d70fe2 100644
--- a/tmpfs/pager-stubs.c
+++ b/tmpfs/pager-stubs.c
@@ -24,7 +24,7 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
/* The user must define this function. For pager PAGER, read one
page from offset PAGE. Set *BUF to be the address of the page,
and set *WRITE_LOCK if the page must be provided read-only.
- The only permissable error returns are EIO, EDQUOT, and ENOSPC. */
+ The only permissible error returns are EIO, EDQUOT, and ENOSPC. */
error_t
pager_read_page (struct user_pager_info *pager,
vm_offset_t page,
@@ -37,7 +37,7 @@ pager_read_page (struct user_pager_info *pager,
/* The user must define this function. For pager PAGER, synchronously
write one page from BUF to offset PAGE. In addition, mfree
- (or equivalent) BUF. The only permissable error returns are EIO,
+ (or equivalent) BUF. The only permissible error returns are EIO,
EDQUOT, and ENOSPC. */
error_t
pager_write_page (struct user_pager_info *pager,
diff --git a/tmpfs/tmpfs.c b/tmpfs/tmpfs.c
index 1539054f..cd67dd74 100644
--- a/tmpfs/tmpfs.c
+++ b/tmpfs/tmpfs.c
@@ -355,9 +355,9 @@ main (int argc, char **argv)
diskfs_root_node->dn_stat.st_uid = st.st_uid;
diskfs_root_node->dn_stat.st_author = st.st_author;
diskfs_root_node->dn_stat.st_gid = st.st_gid;
- diskfs_root_node->dn_stat.st_atime = st.st_atime;
- diskfs_root_node->dn_stat.st_mtime = st.st_mtime;
- diskfs_root_node->dn_stat.st_ctime = st.st_ctime;
+ diskfs_root_node->dn_stat.st_atim = st.st_atim;
+ diskfs_root_node->dn_stat.st_mtim = st.st_mtim;
+ diskfs_root_node->dn_stat.st_ctim = st.st_ctim;
diskfs_root_node->dn_stat.st_flags = st.st_flags;
}
diskfs_root_node->dn_stat.st_mode &= ~S_ITRANS;
diff --git a/tmpfs/tmpfs.h b/tmpfs/tmpfs.h
index 4fb418a2..3cb31e6b 100644
--- a/tmpfs/tmpfs.h
+++ b/tmpfs/tmpfs.h
@@ -35,7 +35,7 @@ struct disknode
nlink_t nlink;
uid_t uid, author;
gid_t gid;
- time_t atime, mtime, ctime;
+ struct timespec atime, mtime, ctime;
unsigned int flags;
char *trans;
@@ -47,6 +47,7 @@ struct disknode
struct
{
mach_port_t memobj;
+ vm_address_t memref;
unsigned int allocpages; /* largest size while memobj was live */
} reg;
struct
diff --git a/trans/ChangeLog b/trans/ChangeLog
deleted file mode 100644
index 93c91df6..00000000
--- a/trans/ChangeLog
+++ /dev/null
@@ -1,997 +0,0 @@
-2007-06-06 Thomas Schwinge <tschwinge@gnu.org>
-
- * Makefile (default_pager-MIGCOMSFLAGS): Remove variable.
- * proxy-defpager.c (proxy_defpager_demuxer): Invoke
- `default_pager_server' instead of `S_default_pager_server'.
-
-2007-05-01 Thomas Schwinge <tschwinge@gnu.org>
-
- * crash.c (S_msg_startup_dosync): Remove function.
-
-2006-11-27 Ben Asselstine <benasselstine@canada.com>
- Thomas Schwinge <tschwinge@gnu.org>
-
- * crash.c (trivfs_append_args): Handle CRASH_ORPHANS_HOW.
-
-2006-11-27 Thomas Schwinge <tschwinge@gnu.org>
-
- * crash.c: Correct the usage of the argp documentation string.
-
- * Makefile (HURDLIBS): Add `netfs'.
-
-2006-06-15 Thomas Schwinge <tschwinge@gnu.org>
-
- * hello-mt.c (trivfs_S_io_seek): Seek into the correct direction for
- `SEEK_END'. Return EINVAL if file pointer would become negative.
- * hello.c (trivfs_S_io_seek): Likewise.
-
-2006-03-25 Thomas Schwinge <tschwinge@gnu.org>
-
- [bug #15808]
- * ifsock.c: Include <argp.h>, <sys/cdefs.h> and <version.h>.
- (__XSTRING): New macro.
- (argp_program_version, doc, argp): New variables.
- (main): Call argp_parse().
- Based on a patch by Ben Asselstine <benasselstine@gmail.com>.
-
-2005-07-12 Marcus Brinkmann <marcus@gnu.org>
-
- * magic.c (magic_getroot): Deallocate DOTDOT if processing here.
- (magic_open): Do not allocate and deallocate DOTDOT, just consume
- the reference given to us.
- (magic_peropen_destroy): New function.
- (main): If in directory mode, install magic_peropen_destroy hook.
-
-2003-08-17 Marcus Brinkmann <marcus@gnu.org>
-
- * fakeroot.c: Include <stddef.h>.
- (struct netnode): Change type of member idport_locp
- to hurd_ihash_locp_t.
- (idport_ihash): Change type to struct hurd_ihash and initialize
- with HURD_IHASH_INITIALIZER.
- (new_node): Call hurd_ihash_add instead of ihash_add.
- (netfs_node_norefs): Call hrd_ihash_locp_remove instead
- ihash_locp_remove.
- (netfs_S_dir_lookup): Call hurd_ihash_find instead ihash_find.
-
-2003-09-05 Greg Buchholz <greg@sleepingsquirrel.org>
-
- * fifo.c, new-fifo.c, null.c (trivfs_S_io_map): Change return value to
- EOPNOTSUPP (was EINVAL).
-
-2003-03-05 Roland McGrath <roland@frob.com>
-
- Make /hurd/magic support translator delegation via /servers/magic.
- * magic.c (struct magic): New structure.
- (magic, directory, dirbuf, dirbufsize): Variables removed,
- not members of struct magic.
- (trivfs_modify_stat, magic_getroot, trivfs_S_dir_readdir): Use a
- struct magic hanging off CNTL->hook rather than global variables.
- (trivfs_append_args): Likewise.
- (trivfs_S_dir_lookup): Likewise. Let magic string be null to indicate
- prepending nothing in --directory mode.
- (parse_opt): Use struct magic in STATE->input instead of globals.
- If no argument, turn on --directory and leave M->magic null.
- (argp): New static variable, instead of auto in main.
- (main): Set both trivfs hook functions unconditionally.
- Use a struct magic, pass it to argp_parse and store it in FSYS->hook.
- Move directory buffer setup to ...
- (parse_opt): ... here, do it on ARGP_KEY_SUCCESS.
- (magic_open): Track users with a count.
- (magic_protid_destroy): New function to track users.
- (main): Set trivfs_protid_destroy_hook to that.
- (trivfs_goaway): Call ports_destroy_right if FSYS has no users.
- (all_fsys): New variable, list of all filesystems.
- (trivfs_clean_cntl): New function, exit if no filesystems left.
- (main): Put FSYS on that list. On timeout with no RPCs, try
- trivfs_goaway on each filesystem on the list.
- (trivfs_S_fsys_forward): New function.
- (delegate): New variable.
- (options): New option -U/--use-server to set it.
-
-2002-12-08 Roland McGrath <roland@frob.com>
-
- * pump.c: File removed.
-
-2002-08-16 Marcus Brinkmann <marcus@gnu.org>
-
- * proxy-defpager.c (S_default_pager_object_pages): New function.
- (proxy_defpager_demuxer): Use S_default_pager_server (ie add the
- prefix).
-
-2002-08-14 Marcus Brinkmann <marcus@gnu.org>
-
- * Makefile: Revert undocumented changes related to devpts that
- were checked in unintentionally with the last change.
-
-2002-08-06 Roland McGrath <roland@frob.com>
-
- * proxy-defpager.c: Rename all the server functions with S_ prefix.
- Include "default_pager_U.h" for client stub prototypes.
- * Makefile (default_pager-MIGCOMSFLAGS): New variable, give -prefix S_.
- (OBJS): Add default_pagerUser.o here.
- (proxy-defpager): Depend on it.
-
-2002-08-05 Marcus Brinkmann <marcus@gnu.org>
-
- * proxy-defpager.c (allowed): Check CRED, not PORT.
- (default_pager_info): Use real_defpager, not DEFAULT_PAGER.
- (proxy_defpager_demuxer): New demuxer.
- (main): Use it.
-
-2002-06-14 Roland McGrath <roland@frob.com>
-
- * proxy-defpager.c: New file.
- * Makefile (targets, SRCS): Add it.
- (proxy-defpager): New target.
- (OBJS): Add default_pagerServer.o here.
-
-2002-06-21 Roland McGrath <roland@frob.com>
-
- * streamio.c (parse_opt): Fix fencepost error in -n arg parsing.
- Reported by Nicola Girardi <nicola@g-n-u.de>.
-
-2002-06-20 Roland McGrath <roland@frob.com>
-
- * firmlink.c (trivfs_S_io_read): Fix pointer arithmetic.
- Reported by Nicola Girardi <nicola@g-n-u.de>.
-
-2002-06-15 Roland McGrath <roland@frob.com>
-
- * magic.c (trivfs_S_dir_readdir): u_int -> size_t
-
-2002-06-13 Roland McGrath <roland@frob.com>
-
- * firmlink.c (trivfs_S_io_read): Fix type of DATA argument.
- * streamio.c (trivfs_S_io_read): Likewise.
- (trivfs_S_io_write): Likewise.
- * hello.c (trivfs_S_io_read): Likewise.
- * hello-mt.c (trivfs_S_io_read): Likewise.
- * null.c (trivfs_S_io_read): Likewise.
- (trivfs_S_io_write): Likewise.
- (trivfs_S_file_set_size): Add reply port args.
-
- * hello.c (trivfs_S_io_read): off_t -> loff_t
- * hello-mt.c (trivfs_S_io_read): Likewise.
- * streamio.c (trivfs_S_io_read, trivfs_S_io_write): Likewise.
- (trivfs_S_file_sync): Add missing arg.
-
- * new-fifo.c (trivfs_S_io_map): Add reply port args.
- (trivfs_S_io_select): Remove bogus last arg.
-
- * fifo.c (trivfs_S_io_map): Add reply port args.
- (trivfs_S_io_select): Remove bogus last arg.
-
- * null.c (trivfs_S_io_map): Add reply port args.
- (trivfs_S_io_read, trivfs_S_io_write): off_t -> loff_t
- (trivfs_S_file_set_size): Likewise.
- (trivfs_S_io_select): Remove bogus last arg.
-
- * firmlink.c (trivfs_S_io_read): off_t -> loff_t
- (trivfs_S_io_select): Remove bogus last arg.
-
-2002-06-09 Roland McGrath <roland@frob.com>
-
- * fakeroot.c (new_node): Use ino_t for io_identity argument.
- (netfs_S_dir_lookup): Likewise.
-
-2002-06-07 Roland McGrath <roland@frob.com>
-
- * firmlink.c (trivfs_S_io_readable): Use intptr_t, not off_t.
- (trivfs_S_io_read): Likewise.
-
-2002-05-28 Roland McGrath <roland@frob.com>
-
- * symlink.c (S_fsys_getroot, S_fsys_getfile): u_int -> size_t
- * streamio.c (device_open_reply): size_t -> int for dev_status_t
- * crash.c (S_msg_report_wait): int -> mach_msg_id_t
- (S_crash_dump_task): int -> integer_t
-
-2002-05-26 Marcus Brinkmann <marcus@gnu.org>
-
- * magic.c (trivfs_S_dir_readdir): Increment I after comparing it
- with ENTRY, to fix off-by-one error.
-
-2002-05-23 Roland McGrath <roland@frob.com>
-
- * fakeroot.c (netfs_report_access): Always report O_RDWR|O_EXEC.
-
-2002-05-23 Marcus Brinkmann <marcus@gnu.org>
-
- * fakeroot.c (check_openmodes): Remove spurious if clause.
- (netfs_attempt_mksymlink): Don't evaluate stat information to get
- the length of the name, but use the string length of NAME and
- store it in the new variable NAMELEN.
- (netfs_S_dir_lookup): Don't always add O_NOLINK to FLAGS, but add
- it to the mask instead.
-
-2002-05-18 Roland McGrath <roland@frob.com>
-
- * fakeroot.c (netfs_S_file_exec): Call check_openmodes and extract a
- ref to the send right with the node locked.
-
- * fakeroot.c (new_node): Get a reference on NP to return to the caller.
- (netfs_attempt_mkfile): Unlock before new_node call.
- (new_node): Take new arg LOCKED, says idport_ihash_lock already held.
- (netfs_S_dir_lookup, netfs_attempt_mkfile, main): Update callers.
-
- * fakeroot.c (fakeroot_auth_port): New variable.
- (main): Initialize it.
- (check_openmodes): New static function.
- (netfs_check_open_permissions): Rewritten using it.
- (netfs_S_dir_lookup): New function.
- (netfs_attempt_lookup, netfs_attempt_create_file): Replaced with stubs.
-
-2002-05-13 Roland McGrath <roland@frob.com>
-
- * fakeroot.c (netfs_validate_stat): Set NP->nn_translated.
-
- * fakeroot.c (netfs_S_file_exec): Don't lock the node (no need).
- Don't use MACH_MSG_TYPE_MOVE_SEND.
-
- * fakeroot.c (netfs_attempt_chmod): Handle a MODE argument with no
- S_IFMT bits set.
-
-2002-05-13 Marcus Brinkmann <marcus@gnu.org>
-
- * fakeroot.c (netfs_server_name, netfs_server_version): New
- variables.
-
-2002-05-13 Marcus Brinkmann <marcus@gnu.org>
-
- * symlink.c: Include <argp.h> and <version.h>.
- (argp_program_version, options, args_doc, doc, argp): New
- variables.
- (parse_opt): New function.
- (main): Replace argument count check and usage output by
- argp_parse invocation.
-
-2002-05-13 Marcus Brinkmann <marcus@gnu.org>
-
- * fakeroot.c (netfs_S_file_exec): New function.
- (netfs_S_io_prenotify): Fix last change.
- (netfs_S_io_postnotify): Likewise.
-
-2002-05-13 Marcus Brinkmann <marcus@gnu.org>
-
- * fakeroot.c (NETFS_S_SIMPLE): New macro.
- (netfs_S_io_get_conch): New function.
- (netfs_S_io_release_conch): New function.
- (netfs_S_io_eofnotify): New function.
- (netfs_S_io_prenotify): New function.
- (netfs_S_io_postnotify): New function.
- (netfs_S_io_readnotify): New function.
- (netfs_S_io_readsleep): New function.
- (netfs_S_io_sigio): New function.
- (netfs_S_io_map_cntl): New function.
-
-2002-05-12 Roland McGrath <roland@frob.com>
-
- * fakeroot.c (netfs_attempt_lookup): Treat EOPNOTSUPP like EACCES.
- When all modes fail, try opening the node with zero openmodes.
-
- * fakeroot.c (netfs_demuxer): New function. Reflect unrecognized
- messages to the underlying node port.
-
-2002-05-11 Roland McGrath <roland@frob.com>
-
- * fakeroot.c (main): Stat the root node and fake its st_mode
- immediately to remove translator bits.
-
-2002-05-06 Marcus Brinkmann <marcus@gnu.org>
-
- * fakeroot.c (netfs_attempt_lookup): Really check for EROFS or
- EISDIR error from O_RDWR lookup (the last change checked for
- O_RDWR | O_EXEC look ups, which is also necessary).
- (netfs_attempt_mkfile): Unlock DIR.
- (netfs_attempt_create_file): Likewise.
- (netfs_S_io_map): New function.
-
-2002-05-05 Roland McGrath <roland@frob.com>
-
- * fakeroot.c (netfs_attempt_lookup): Check for EROFS or EISDIR error
- from O_RDWR lookup.
-
- * fakeroot.c (netfs_attempt_lookup): Check io_identity result for our
- own fsys identity port; on match, look up the existing node for the
- port to ourselves.
-
- * fakeroot.c (netfs_attempt_lookup): Unlock DIR before doing RPCs.
-
-2002-05-03 Marcus Brinkmann <marcus@gnu.org>
-
- * fakeroot.c (netfs_node_norefs): Unlock node after not dropping
- it at all.
-
-2002-05-03 Roland McGrath <roland@frob.com>
-
- * Makefile (fakeroot): New target.
- (targets): Add it.
- (SRCS): Add fakeroot.c.
- * fakeroot.c: New file.
-
-2002-03-23 James A. Morrison <ja2morri@uwaterloo.ca>
-
- * ifsock.c (main): Use ERR, not errno.
- * symlink.c: Include <error.h> and <errno.h>.
- (main): Use err, not fprintf and exit. Use error, not perror and
- exit. Use err, not error. Check for MACH_PORT_NULL
- explicitly. Check for proper usage of symlink before checking if
- symlink is started as a translator.
-
-2002-03-11 Roland McGrath <roland@frob.com>
-
- * crash.c: Add `corelimit' parameter to `dump_core' forward decl.
- (S_crash_dump_task): Change caller, pass (off_t)-1 for now.
- (struct crasher): New member `core_limit'.
- (dead_crasher): Pass C->core_limit to dump_core.
- (S_crash_dump_task): Set C->core_limit, to (off_t) -1 for now.
- (dump_core): Function removed; now ../exec/elfcore.c defines it.
- * Makefile (OBJS, crash): Add elfcore.o.
- (elfcore.c): vpath decl to find this in $(top_srcdir)/exec.
-
-2001-12-22 Roland McGrath <roland@frob.com>
-
- * streamio.c (create_buffer): extern inline -> static inline
- (buffer_size, buffer_readable, buffer_writable): Likewise.
- (clear_buffer, buffer_read): Likewise.
-
-2001-12-11 Marcus Brinkmann <marcus@gnu.org>
-
- * streamio.c (device_open_reply): In the D_INVALID_OPERATION case,
- clear ERR, which is a global variable.
-
-2001-04-01 Neal H Walfield <neal@cs.uml.edu>
-
- * magic.c (trivfs_S_dir_lookup): Use iohelp_dup_iouser
- as per the new semantics.
-
-2001-02-28 Roland McGrath <roland@frob.com>
-
- * streamio.c (trivfs_modify_stat): Fix inverted sense of tests
- for O_READ, O_WRITE bits.
-
-2001-02-25 Roland McGrath <roland@frob.com>
-
- * symlink.c: Include <string.h> for decls of built-ins.
- * firmlink.c: Include <stdlib.h> for exit decl.
- * ifsock.c: Likewise.
- * null.c: Likewise.
- * magic.c: Likewise.
- * fifo.c: Likewise.
- * hello.c: Likewise.
- * hello-mt.c: Likewise.
-
-2001-02-12 Marcus Brinkmann <marcus@gnu.org>
-
- * fifo.c: Make version string say `fifo', not `null'.
- Add period to doc text in ARGP.
- * firmlink.c: Add period to doc text in ARGP_DOC, convert
- semi-colon to colon.
- * magic.c (options): Add period to DOC.
- * new-fifo.c (fifo_trans_parse_args): Add doc string to ARGP.
- Include <version.h>, new global variable ARGP_PROGRAM_VERSION.
- * crash.c: Include <version.h>, add global variable
- ARGP_PROGRAM_VERSION.
- * hello.c: Include <version.h>, add global variable
- ARGP_PROGRAM_VERSION.
- (hello_argp): Add doc string.
- * hello-mt.c: Likewise.
- * streamio.c: Add period to DOC. Change streamdev to streamio in
- version string.
- * password.c (main): Add period to doc string in ARGP.
-
-2001-01-17 Neal H Walfield <neal@cs.uml.edu>
-
- * pump.c (start_pfinet): Conform to new fshelp_start_translator
- semantics.
-
-2001-01-20 Roland McGrath <roland@frob.com>
-
- * streamio.c (options): Add aliases --rdonly, --ro for -r.
- Add aliases --rdwr, -rw for -w.
- Add new option --writeonly/--wronly/-W.
- (readonly): Variable removed.
- (parse_opt): Set trivfs_allow_open for -r/-w/-W.
- (main): Don't set trivfs_allow_open here. Instead, use it to decide
- whether to set up input_buffer/output_buffer or not.
- (open_hook): Use trivfs_allow_open instead of readonly.
- Check whether read is allowed too.
- (trivfs_modify_stat): Likewise.
- (clear_buffer): Do nothing if argument is null.
-
- * streamio.c (stream_name, readonly, rdev, nperopens): Remove
- superfluous zero initializers.
-
-2001-01-13 Marcus Brinkmann <marcus@gnu.org>
-
- * Makefile (SRCS): Add streamio.c
- (streamio): Add dependency on device_replyServer.o.
- Other dependencies identical to those for crash and password.
-
- (OBJS): Add missing object files to list (crashServer.o
- crash_replyUser.o msgServer.o device_replyServer.o).
-
- * streamio.c: New file by OKUJI Yoshinori.
-
-2000-07-26 Mark Kettenis <kettenis@gnu.org>
-
- * Makefile: Reorder libs such that the threads lib comes before
- the ports lib. This makes sure the functions in libthreads
- properly override the stubs in libports with the new dynamic
- linker semantics in glibc 2.2.
-
-2000-03-19 Roland McGrath <roland@baalperazim.frob.com>
-
- * new-fifo.c (trivfs_protid_portclasses, trivfs_protid_nportclasses):
- Fix to size 2.
-
-2000-03-17 Thomas Bushnell, BSG <tb@mit.edu>
-
- * symlink.c (main): Don't use MAKE_SEND in Hurd RPC.
-
-2000-03-17 Roland McGrath <roland@baalperazim.frob.com>
-
- * crash.c (S_crash_dump_task): Use ports_get_send_right.
-
-2000-01-28 Roland McGrath <roland@baalperazim.frob.com>
-
- * crash.c (enum crash_action): New alternative crash_unspecified (0).
- (crash_orphans_how): New variable.
- (S_crash_dump_task): If crash_how != crash_orphans_how, ascertain if
- the task is an orphan before deciding what to do.
- (options): New options --action, --orphan-action.
- Old options now compatability aliases for --action=foo.
- (parse_opt): Parse them.
- (doc): New variable.
- (crash_argp): Use DOC.
-
-1999-12-03 Roland McGrath <roland@baalperazim.frob.com>
-
- * null.c: Support --full/-f option to be /dev/full (ENOSPC writes).
- (write_error_code): New variable.
- (options, argp): New static const variables.
- (parse_opt): New function.
- (main): Move local ARGP out to static.
- (trivfs_S_io_write): Return write_error_code instead of zero.
-
-1999-11-08 Roland McGrath <roland@baalperazim.frob.com>
-
- * hello-mt.c: New file, modified from hello.c to be multithreaded.
- * Makefile (targets, SRCS): Add hello-mt, hello-mt.c.
- (hello-mt): Add appropriate deps.
-
- * Makefile (hello): Don't depend on libthreads.
-
- * hello.c (trivfs_modify_stat): Set st_size from contents_len, not
- sizeof (hello) - 1.
-
- * hello.c: New file. From Gord with some cleanups and hacks from me.
- * Makefile (targets, SRCS): Add hello, hello.c.
- (hello): Add appropriate deps.
-
-1999-10-11 Roland McGrath <roland@baalperazim.frob.com>
-
- * magic.c: Rewritten using libtrivfs.
- With new flag --directory/-d, present an empty directory that
- has . and .. as normal and lists no other contents, but
- looking up anything else within it does the magical retry.
- * Makefile (magic): Update library deps accordingly.
-
-1999-09-13 Roland McGrath <roland@baalperazim.frob.com>
-
- * fifo.c, null.c, new-fifo.c: Reverted changes related to
- io_map_segment.
-
-1999-09-07 Thomas Bushnell, BSG <tb@mit.edu>
-
- * null.c (trivfs_S_io_map): Renamed to ...
- (trivfs_S_io_map_segment): ... here, with new parameter `index'.
- * new-fifo.c (trivfs_S_io_map): Renamed to ...
- (trivfs_S_io_map_segment): ... here, with new parameter `index'.
- * fifo.c (trivfs_S_io_map): Renamed to ...
- (trivfs_S_io_map_segment): ... here, with new parameter `index'.
-
-1999-08-31 Marcus Brinkmann <Marcus.Brinkmann@ruhr-uni-bochum.de>
-
- * crash.c (trivfs_modify_stat): Remove redundant fstype setting.
- * password.c (trivfs_modify_stat): Likewise.
-
- * bogus-fifo.c (main): Deallocate bootstrap port after using it.
- * fifo.c (main): Likewise.
- * firmlink.c (main): Likewise.
- * ifsock.c (main): Likewise.
- * magic.c (main): Likewise.
- * null.c (main): Likewise.
- * symlink.c (main): Likewise.
-
-1999-07-11 Roland McGrath <roland@baalperazim.frob.com>
-
- * firmlink.c: Add #include <sys/mman.h>.
-
-1999-07-09 Thomas Bushnell, BSG <tb@mit.edu>
-
- * firmlink.c (trivfs_S_io_read): Use mmap instead of vm_allocate.
-
-1999-07-10 Roland McGrath <roland@baalperazim.frob.com>
-
- * crash.c: Add #include <sys/mman.h> for munmap decl.
-
-1999-07-03 Thomas Bushnell, BSG <tb@mit.edu>
-
- * crash.c (stop_pgrp): Use munmap instead of vm_deallocate.
-
-1999-06-01 Roland McGrath <roland@baalperazim.frob.com>
-
- * crash.c (options): Add --dump-core as alias for --core-file.
-
- * crash.c: Support three modes of operation, selected by command line
- switches:
- -s/--suspend suspend crashing process (old behavior)
- -k/--kill kill crashing process, no core dump
- -c/--core-file dump core file
- (enum crash_action): New type.
- (crash_how): New variable.
- (options, crash_argp, trivfs_runtime_argp): New variables.
- (parse_opt, trivfs_append_args): New functions.
- (main): Call argp_parse.
-
-1999-05-19 Roland McGrath <roland@baalperazim.frob.com>
-
- * null.c (trivfs_S_io_read): Fix return value.
- Reported by Steinar Hamre <steinarh@fim.ntnu.no>.
-
-1999-05-01 Roland McGrath <roland@baalperazim.frob.com>
-
- * fwd.c (main): Add missing newline in usage msg.
- From Marcus Brinkmann.
-
-1999-02-20 Mark Kettenis <kettenis@gnu.org>
-
- * password.c: New file.
- * Makefile (targets): Add password.
- (SRCS): Add password.c.
- (OBJS): Add passwordServer.o.
- (password-LDLIBS): New variable.
- Use dependencies identical to those for crash.
-
-1998-10-20 Roland McGrath <roland@baalperazim.frob.com>
-
- * fifo.c (open_hook: WAIT): Add braces to silence gcc warning.
- (trivfs_S_io_select): Likewise.
- * new-fifo.c (fifo_trans_open): Likewise.
- (trivfs_S_io_select): Likewise.
-
-1998-07-20 Roland McGrath <roland@baalperazim.frob.com>
-
- * firmlink.c (main): Fix return type to int, and use return.
- * fwd.c (main): Likewise.
- * new-fifo.c (main): Likewise.
- * magic.c (main): Likewise.
- * fifo.c (main): Likewise.
- * null.c (main): Likewise.
-
-1997-09-04 Miles Bader <miles@gnu.ai.mit.edu>
-
- * null.c (main): Fix typo.
-
-Wed Aug 20 14:07:56 1997 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * crash.c (main): New args for
- ports_manage_port_operations_multithread.
- * fifo.c (main): Likewise.
- * firmlink.c (main): Likewise.
- * new-fifo.c (main): Likewise.
- * null.c (main): Likewise.
-
-1997-07-22 Miles Bader <miles@gnu.ai.mit.edu>
-
- * devport.c: File removed.
- * Makefile (targets): Remove devport.
- (SRCS): Remove devport.c.
-
-1997-07-15 Miles Bader <miles@gnu.ai.mit.edu>
-
- * magic.c (main): Actually parse the arg.
-
-1997-07-14 Miles Bader <miles@gnu.ai.mit.edu>
-
- * magic.c (argp_program_version, args_doc, doc): New variables.
- (main): Use argp to parse args.
- Add new includes <argp.h> & <version.h>.
-
-Fri Feb 28 20:00:14 1997 Miles Bader <miles@gnu.ai.mit.edu>
-
- * Makefile (fwd null ifsock fifo new-fifo devport firmlink):
- Add firmlink to targets depending on libthreads.
-
- * null.c (main): Make multithreaded.
-
-Tue Feb 25 15:42:40 1997 Miles Bader <miles@gnu.ai.mit.edu>
-
- * firmlink.c (main): Make multithreaded.
-
-Sun Feb 23 00:23:49 1997 Miles Bader <miles@gnu.ai.mit.edu>
-
- * firmlink.c (argp): Use OPTIONS.
- (getroot): If firmlink returns ENOENT, act like an unresolvable link.
- Don't support visible mode.
- (options, parse_opt): Remove -i.
-
-Wed Feb 19 21:34:01 1997 Miles Bader <miles@gnu.ai.mit.edu>
-
- * null.c (argp_program_version): Make const.
-
- * fifo.c (argp_program_version, argp): New variables.
- (parse_opt): New function.
- (options): Use argp structures instead of getopt ones.
- (main): Use argp instead of getopt.
- <argp.h>: New include.
- <getopt.h>: Include removed.
- (trivfs_protid_port_class, trivfs_cntl_portclasses,
- trivfs_protid_nportclasses, trivfs_cntl_nportclasses):
- Variables removed.
- (main): Don't use them.
- Don't create our own port classes/bucket, let trivfs_startup do it.
-
-Tue Feb 18 12:55:50 1997 Miles Bader <miles@gnu.ai.mit.edu>
-
- * fifo.c <version.h>: New include.
- (parse_opt): Use KEY, not OPT.
-
-Fri Feb 14 03:05:59 1997 Miles Bader <miles@gnu.ai.mit.edu>
-
- * null.c (control_class, node_class, port_bucket,
- trivfs_protid_port_class, trivfs_cntl_portclasses,
- trivfs_protid_nportclasses, trivfs_cntl_nportclasses):
- Variables removed.
- (main): Don't use them.
-
-Thu Feb 13 19:42:38 1997 Miles Bader <miles@gnu.ai.mit.edu>
-
- * firmlink.c: New file.
- * Makefile (targets): Add firmlink.
- (SRCS): Add firmlink.c.
- (firmlink): New target.
-
-Thu Sep 26 14:27:02 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * null.c (trivfs_S_file_check_access): Function removed (trivfs
- default is now sufficient).
-
-Tue Sep 24 15:39:36 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * null.c (provide_zeros): Variable removed.
- (trivfs_S_io_read): Don't return zeros anymore.
- (trivfs_S_io_readable): Always return 0.
- (argp_program_version): New variable.
- (main): Use argp for argument parsing.
- (trivfs_S_file_check_access): New function.
-
-Thu Sep 12 16:39:47 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * Makefile (HURDLIBS): New variable.
-
-Fri Jul 12 23:02:36 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * crash.c (stop_pgrp): Fetch pgrp using correct call.
-
-Mon Jul 8 13:52:36 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * crash.c (stop_pgrp): Don't do anything if ORPHANED.
-
-Mon Jul 8 08:54:05 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
-
- * crash.c (stop_pgrp): Take second arg CTTYID. Fetch each pgrp
- member's msgpor and send msg_sig_post with that as refport instead of
- calling POSIX.1 kill function like a bonehead.
- (S_crash_dump_task): Pass CTTY_ID arg through to stop_pgrp.
-
-Sun Jul 7 22:43:23 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * crash.c (stop_pgrp): New function.
- (S_crash_dump_task): Call stop_pgrp.
-
- * Makefile (fwd): Depend on libports.
-
-Mon Jul 1 16:09:10 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * Makefile (crash): New target.
- * Makefile (SRCS): Added crash.c.
- * crash.c: Moved here from ../exec.
- (S_crash_dump_task): New args EXC, CODE, SUBCODE, CTTY_ID.
- Supply SIGCODE arg to proc_mark_stop.
- (signal_crasher): New arg SIGCODE, supply to proc_mark_exit. All
- callers changed.
- (S_msg_sig_post_untraced): Supply C->sigcode to proc_mark_stop.
- (S_crash_dump_task): Drop arg TARGET.
- (dump_core): Likewise; all callers changed.
- (struct crasher): Delete member `target'.
- (S_msg_describe_ports): New function.
-
-Thu Jun 20 16:28:33 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * Makefile (null ifsock fifo new-fifo devport): Depend on
- ../libfshelp/libfshelp.a.
-
-Wed May 29 10:31:16 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * devport.c (trivfs_S_file_get_storage_info): Implement new interface.
-
-Sat May 11 01:19:21 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * new-fifo.c (fifo_trans_parse_args): Use ARGP_ERR_UNKNOWN instead
- of EINVAL.
-
-Tue Apr 30 09:58:47 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * Makefile (all): Delete target.
- (include ../Makeconf): *Before* all dependences.
- ($(targets)): Each program depends on its associated .o.
-
-Mon Apr 15 12:50:37 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * new-fifo.c (fifo_trans_parse_args): Supply missing arg to
- argp_parse.
-
-Sun Mar 31 13:26:48 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * Makefile (targets): Add devport.
- (SRCS): Add devport.c.
- Add devport as a target to various dependency rules.
-
-Wed Feb 7 17:51:49 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * fifo.c (trivfs_S_file_set_size): Add #!$@&* reply port args.
- * new-fifo.c (trivfs_S_file_set_size): Likewise.
-
-Mon Jan 29 09:53:01 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * fifo.c (close_hook): Also disconnect ACTIVE_FIFO if the laster
- writer is going away and there were no readers.
- (open_hook): Unbreak a new read pipe even if not waiting for writers.
-
- * new-fifo.c (fifo_trans_open): Typo.
-
-Sun Jan 28 21:52:00 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * fifo.c (open_hook): Only bother to do anything if O_READ | O_WRITE.
- * new-fifo.c (fifo_trans_open): Likewise.
- When O_NONBLOCK is set, just don't block if possible, instead of
- of returning EWOULDBLOCK.
- (trivfs_S_io_select): The pipe is on CRED->po->hook, not CRED->hook.
- (trivfs_modify_stat): Zero the returned size if there's no pipe.
-
-Sat Jan 27 19:30:25 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * fifo.c (open_hook): When O_NONBLOCK is set, just don't block if
- possible, instead of of returning EWOULDBLOCK.
- Only set PO->hook if O_READ or O_WRITE is set.
- (trivfs_S_io_select): The pipe is on CRED->po->hook, not CRED->hook.
- (trivfs_modify_stat): Zero the returned size if there's no pipe.
-
-Thu Jan 25 18:34:26 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * fifo.c (trivfs_goaway): Handle errors from ports_inhibit_bucket_rpcs.
- * new-fifo.c (trivfs_goaway): Likewise.
- Call ports_interrupt_rpcs instead of ports_interrupt_rpc.
-
-Tue Jan 16 14:18:57 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * new-fifo.c (trivfs_S_io_select): Request interruption if the
- reply-port dies.
- Don't block if there's an error immediately available.
- * fifo.c (trivfs_S_io_select): Ditto.
-
-Mon Nov 6 12:39:32 1995 Miles Bader <miles@gnu.ai.mit.edu>
-
- * magic.c (S_fsys_get_options): New function.
- * symlink.c (S_fsys_get_options): New function.
-
-Sun Nov 5 01:56:20 1995 Miles Bader <miles@gnu.ai.mit.edu>
-
- * ifsock.c (main): Add flags argument to trivfs_startup call.
- * null.c (main): Ditto.
- * fifo.c (main): Ditto.
- * new-fifo.c (fifo_trans_start): Ditto.
- * symlink.c (main): Add flags argument to fsys_startup call.
- (S_fsys_startup): Add FLAGS arg.
- * magic.c (main): Add flags argument to fsys_startup call.
- (S_fsys_startup): Add FLAGS arg.
-
-Sat Oct 7 23:41:02 1995 Miles Bader <miles@gnu.ai.mit.edu>
-
- * symlink.c (S_fsys_getpriv): Add new extra args.
- * magic.c (S_fsys_getpriv): Ditto.
-
-Mon Sep 18 14:54:55 1995 Miles Bader <miles@churchy.gnu.ai.mit.edu>
-
- * fifo.c (trivfs_S_file_set_size): Renamed from trivfs_S_file_truncate;
- Return EINVAL if the new size isn't 0.
- * new-fifo.c (trivfs_S_file_truncate): Ditto.
- * null.c (trivfs_S_file_set_size): Renamed from trivfs_S_file_truncate.
-
-Fri Sep 8 12:27:35 1995 Miles Bader <miles@churchy.gnu.ai.mit.edu>
-
- * fifo.c, new-fifo.c (open_hook): Block for read only when there's
- really someone reading already, or until there's a writer.
- (open_hook): Use the WAIT macro to block.
- * fifo.c (wait_for_writer): New variable.
- (main): Set WAIT_FOR_WRITER with WAIT_FOR_READER.
- * new-fifo.c (struct fifo_trans): Added wait_for_writer field.
- Delete standalone field. Add some comments.
- (fifo_trans_create): Propagate and set the wait_for_writer field.
- (fifo_trans_parse_args): Set the wait_for_writer field.
-
- * fifo.c (trivfs_modify_stat): Only return pipe info if there's a pipe.
- (close_hook): Don't die if there's no pipe.
- * new-fifo.c (trivfs_modify_stat): Only return pipe info if
- there's a pipe.
- (fifo_trans_close): Don't die if there's no pipe.
-
-Thu Aug 31 19:16:25 1995 Miles Bader <miles@churchy.gnu.ai.mit.edu>
-
- * fifo.c (trivfs_S_io_select): Use pipe_pair_select.
- (trivfs_S_io_write): Pass in the NOBLOCK parameter to pipe_write.
-
-Wed Aug 30 12:14:58 1995 Miles Bader <miles@geech.gnu.ai.mit.edu>
-
- * fifo.c (trivfs_goaway): Implement correctly.
- (main): When we time out, don't exit unless there are no opens.
- (main): Add timeouts.
- (port_bucket): Now a local variable in main.
- (trivfs_S_io_select): Implement correctly.
-
-Tue Aug 29 17:31:45 1995 Miles Bader <miles@geech.gnu.ai.mit.edu>
-
- * fifo.c (open_hook): Use hurd_condition_wait to detect interrupts.
-
-Thu Aug 24 10:41:31 1995 Miles Bader <miles@churchy.gnu.ai.mit.edu>
-
- * Makefile (all): New target.
- (symlink, magic, ifsock, fifo, null): Put all dependencies in
- these targets.
- (null-HURDLIBS, ifsock-HURDLIBS, fifo-HURDLIBS): Removed.
- Get rid of rules dealing with error.o
-
-Wed Aug 23 13:11:18 1995 Miles Bader <miles@duality.gnu.ai.mit.edu>
-
- * magic.c (S_fsys_forward): New function.
- * symlink.c (S_fsys_forward): New function.
- * bogus-fifo.c (S_fsys_forward): New function.
-
-Tue Aug 22 10:48:47 1995 Miles Bader <miles@churchy.gnu.ai.mit.edu>
-
- * Makefile (HURDLIBS): Add libshouldbeinlibc (everyone uses it).
- (symlink, magic, fifo, null, ifsock): Remove error.o.
- Get rid of rules dealing with error.o.
-
- * fifo.c (trivfs_goaway, trivfs_modify_stat): Update arguments.
- (trivfs_modify_stat): Give the size of the fifo now that we've got
- a handle on it.
-
-Mon Aug 21 14:43:46 1995 Miles Bader <miles@churchy.gnu.ai.mit.edu>
-
- * null.c (trivfs_goaway, trivfs_modify_stat): Update arguments.
- * ifsock.c (trivfs_goaway, trivfs_modify_stat): Update arguments.
-
- * fifo.c (open_hook): Use condition_broadcast instead of
- condition_signal on active_fifo_changed, as all waiters need be
- notified of changes.
-
-Tue Jul 25 13:53:30 1995 Miles Bader <miles@churchy.gnu.ai.mit.edu>
-
- * fifo.c: New file.
- (main): Don't pass in the MACH_RCV_TIMEOUT flag with a zero timeout.
- * Makefile (SRCS): Add fifo.c.
- (targets): Add fifo.
- (fifo): New target.
-
-Thu Jul 6 15:42:25 1995 Michael I Bushnell <mib@duality.gnu.ai.mit.edu>
-
- * Makefile (OBJS): New var.
-
- * Makefile: Removed dependencies that are now automatically
- generated.
-
-Wed Jul 5 21:17:34 1995 Michael I Bushnell <mib@duality.gnu.ai.mit.edu>
-
- * Makefile (ifsock-HURDLIBS, null-HURDLIBS): New vars.
- (null, ifsock): Fix dependencies.
-
-Wed Jun 28 15:07:25 1995 Michael I Bushnell <mib@duality.gnu.ai.mit.edu>
-
- * null.c (PT_CTL, PT_NODE): Deleted macros.
- (trivfs_protid_porttypes, trivfs_cntl_porttypes,
- trivfs_protid_nporttypes, trivfs_cntl_nporttypes): Deleted vars.
- (trivfs_protid_portclasses, trivfs_cntl_portclasses,
- trivfs_protid_nportclasses, trivfs_cntl_nportclasses): New vars.
- (control_class, node_class, port_bucket): New vars.
- (main): Initialize control_class, node_class, port_bucket,
- trivfs_protid_portclasses, and trivfs_cntl_portclasses.
- (ports_cleanroutines): Delete initialization.
- (main): Convert to new trivfs interface.
- (trivfs_goaway): Likewise.
- (main): Convert to new ports interface.
- (ports_demuxer, ports_notice_idle, ports_no_live_ports,
- ports_no_hard_ports): Deleted functions.
-
- * Makefile (ifsock): Add dependency on libihash.
- (null): Likewise.
-
- * ifsock.c (PT_CTL, PT_NODE): Deleted macros.
- (ports_cleanroutines): Deleted var.
- (ports_notice_idle, ports_no_live_ports, ports_no_hard_ports):
- Deleted functions.
- (control_class, node_class, port_bucket): New vars.
- (trivfs_protid_porttypes, trivfs_cntl_porttypes,
- trivfs_protid_nporttypes, trivfs_cntl_nporttypes): Deleted vars.
- (trivfs_protid_portclasses, trivfs_cntl_portclasses,
- trivfs_protid_nportclasses, trivfs_cntl_nportclasses): New vars.
- (main): Initialize control_class, node_class, port_bucket,
- trivfs-protid_portclasses, and trivfs_cntl_portclasses.
- (main): Use new trivfs interface.
- (trivfs_goaway): Likewise.
- (main): Use new ports interface.
- (S_ifsock_getsockaddr): Likewise.
- (demuxer): Renamed from ports_demuxer.
- (demuxer): Declare ifsock_server.
-
-Fri May 12 19:07:54 1995 Miles Bader <miles@churchy.gnu.ai.mit.edu>
-
- * magic.c (S_fsys_set_options, S_fsys_mod_readonly): Change from
- mod_readonly to set_options.
- * symlink.c (S_fsys_set_options, S_fsys_mod_readonly): Ditto.
-
-Thu May 11 13:36:28 1995 Miles Bader <miles@churchy.gnu.ai.mit.edu>
-
- * null.c (trivfs_modify_stat): Make st_blksize really large.
-
-Mon Apr 10 20:38:49 1995 Miles Bader <miles@churchy.gnu.ai.mit.edu>
-
- * null.c (trivfs_S_file_truncate): Always return 0, so O_TRUNC works.
-
-Sun Apr 9 00:26:07 1995 Miles Bader <miles@churchy.gnu.ai.mit.edu>
-
- * null.c (main): Use trivfs_startup() instead of doing things manually.
- Get rid of _libports_initialize() [it gets called automatically].
- * ifsock.c (main): Ditto; also, use error() to print error messages.
-
-Mon Apr 3 16:39:33 1995 Miles Bader <miles@churchy.gnu.ai.mit.edu>
-
- * null.c (trivfs_modify_stat): Return more useful values for the
- st_blksize and st_fstype fields.
-
-Fri Mar 31 12:20:48 1995 Miles Bader <miles@churchy.gnu.ai.mit.edu>
-
- * null.c (main): Move the check for the bootstrap port after the
- args check, so that users can run it from the shell to get a usage
- message.
-
- * magic.c (main): Don't deallocate our right to the underlying
- disk node, so we don't get garbage collected prematurely. Also
- move the check for the bootstrap port after the args check, so
- that users can run it from the shell to get a usage message.
-
-Wed Mar 29 19:30:33 1995 Miles Bader <miles@churchy.gnu.ai.mit.edu>
-
- * magic.c: New file: Translator to return F_RETRY_MAGIC strings.
- * null.c: New file: Translator for /dev/null & /dev/zero.
- * Makefile: Add support for the magic and null servers.
-
-Wed Aug 31 11:08:10 1994 Michael I Bushnell <mib@geech.gnu.ai.mit.edu>
-
- * symlink.c (S_fsys_mod_readonly, S_fsys_syncfs): New functions.
-
-Tue Aug 30 16:42:29 1994 Michael I Bushnell <mib@geech.gnu.ai.mit.edu>
-
- * ifsock.c (main): Call file_name_lookup instead af path_lookup.
-
-Tue Aug 16 11:38:26 1994 Michael I Bushnell <mib@geech.gnu.ai.mit.edu>
-
- * Makefile (symlink, symlink.o): New targets.
- Change to be type `servers.'.
-
-Fri Jul 22 15:15:49 1994 Michael I Bushnell <mib@geech.gnu.ai.mit.edu>
-
- * Makefile: Rewritten in accord with new scheme.
diff --git a/trans/Makefile b/trans/Makefile
index 9d610952..4e6a22dd 100644
--- a/trans/Makefile
+++ b/trans/Makefile
@@ -1,6 +1,6 @@
#
-# Copyright (C) 1994, 1995, 1996, 1997, 1999, 2000, 2001, 2002, 2006, 2007
-# Free Software Foundation, Inc.
+# Copyright (C) 1994, 1995, 1996, 1997, 1999, 2000, 2001, 2002, 2006, 2007,
+# 2008 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
@@ -28,7 +28,7 @@ OBJS = $(SRCS:.c=.o) fsysServer.o ifsockServer.o passwordServer.o \
crashServer.o crash_replyUser.o msgServer.o \
default_pagerServer.o default_pagerUser.o \
device_replyServer.o elfcore.o
-HURDLIBS = threads ports netfs trivfs fshelp pipe ihash shouldbeinlibc
+HURDLIBS = threads ports netfs trivfs iohelp fshelp pipe ihash shouldbeinlibc
password-LDLIBS = $(LIBCRYPT)
include ../Makeconf
@@ -46,6 +46,7 @@ proxy-defpager crash password streamio: ../libthreads/libthreads.a ../libports/l
fifo new-fifo: ../libpipe/libpipe.a
fwd: ../libfshelp/libfshelp.a ../libports/libports.a
hello-mt magic null ifsock fifo new-fifo firmlink: ../libtrivfs/libtrivfs.a ../libfshelp/libfshelp.a ../libthreads/libthreads.a ../libports/libports.a ../libihash/libihash.a
+magic: ../libiohelp/libiohelp.a
hello: ../libtrivfs/libtrivfs.a ../libfshelp/libfshelp.a ../libports/libports.a ../libihash/libihash.a
fakeroot: ../libnetfs/libnetfs.a ../libfshelp/libfshelp.a ../libiohelp/libiohelp.a ../libthreads/libthreads.a ../libports/libports.a ../libihash/libihash.a
$(targets): ../libshouldbeinlibc/libshouldbeinlibc.a
diff --git a/trans/fakeroot.c b/trans/fakeroot.c
index 6f1cd748..c1102343 100644
--- a/trans/fakeroot.c
+++ b/trans/fakeroot.c
@@ -1,5 +1,5 @@
/* fakeroot -- a translator for faking actions that aren't really permitted
- Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2003, 2008 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
@@ -502,22 +502,26 @@ error_t
netfs_attempt_utimes (struct iouser *cred, struct node *np,
struct timespec *atime, struct timespec *mtime)
{
- struct timeval a, m;
+ union tv
+ {
+ struct timeval tv;
+ time_value_t tvt;
+ };
+ union tv a, m;
if (atime)
{
- TIMESPEC_TO_TIMEVAL (&a, atime);
+ TIMESPEC_TO_TIMEVAL (&a.tv, atime);
}
else
- a.tv_sec = a.tv_usec = -1;
+ a.tv.tv_sec = a.tv.tv_usec = -1;
if (mtime)
{
- TIMESPEC_TO_TIMEVAL (&m, mtime);
+ TIMESPEC_TO_TIMEVAL (&m.tv, mtime);
}
else
- m.tv_sec = m.tv_usec = -1;
+ m.tv.tv_sec = m.tv.tv_usec = -1;
- return file_utimes (np->nn->file,
- *(time_value_t *) &a, *(time_value_t *) &m);
+ return file_utimes (np->nn->file, a.tvt, m.tvt);
}
error_t
diff --git a/ufs-fsck/ChangeLog b/ufs-fsck/ChangeLog
deleted file mode 100644
index c050a94e..00000000
--- a/ufs-fsck/ChangeLog
+++ /dev/null
@@ -1,326 +0,0 @@
-2003-07-29 Marcus Brinkmann <marcus@g10code.de>
-
- * fsck.h (num_files): Change type to long.
-
-2002-06-13 Roland McGrath <roland@frob.com>
-
- * fsck.h (struct dirinfo): Revert i_isize to using u_int.
-
-2002-06-08 Roland McGrath <roland@frob.com>
-
- * dir.c, pass1.c, pass1b.c, pass2.c: Use %Ld for ino_t values.
- * utilities.c: Likewise.
-
- * fsck.h: Use ino_t for lfdir.
- * setup.c: Likewise.
-
- * fsck.h (struct dirinfo): Use size_t for i_isize.
-
-2001-09-30 Roland McGrath <roland@frob.com>
-
- * pass5.c (pass5): A little manual CSE makes buggy gcc not to crash.
-
-2001-02-25 Roland McGrath <roland@frob.com>
-
- * utilities.c: Include <time.h> for decl.
-
-Thu May 6 10:25:27 1999 Thomas Bushnell, BSG <tb@mit.edu>
-
- * utilities.c (pextend): Free MORE before returning.
- * dir.c (linkup): Don't free tempname until after we're done using
- it in the call to warning.
- Reported by Katsuya Tanaka (tanaka@boarderz.com).
-
-1999-03-25 Roland McGrath <roland@baalperazim.frob.com>
-
- * setup.c (setup): Don't complain if the device is a block device.
-
-Wed Feb 19 23:10:39 1997 Miles Bader <miles@gnu.ai.mit.edu>
-
- * main.c (argp_program_version): Make const.
-
-Thu Sep 12 16:40:10 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * Makefile (HURDLIBS): New variable.
- ($(target)): Delete special depedency.
-
- * Makefile (vpath tables.c): Put after Makeconf inclusion to catch
- setting of $(top_srcdir).
-
-Fri Sep 6 16:44:07 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * main.c (argp_program_version): Fix typo.
-
-Thu Sep 5 11:42:21 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * main.c: Include <version.h>.
- (argp_program_version): Define with STANDARD_HURD_VERSION.
-
-Fri Aug 16 10:25:37 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * dir.c (record_directory): Maximum number of block pointers to
- record is NDADDR + NIADDR, not NDADDR * NIADDR.
- * pass2.c: Include <assert.h>.
- (pass2): Before copying block addresses to DINO in basic
- integrity check, assert that DNP->i_numblks isn't too big.
-
-Mon Aug 12 11:39:12 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * Makefile (dir): Now ufs-fsck.
-
-Tue Jul 23 19:32:09 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * inode.c (allocino): `struct timespec' now uses a field prefix
- of `tv_'.
- * utilities.c (pinode): Likewise.
-
-Thu Jul 18 14:55:14 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * pass2.c (pass2): If an entire directory block is null, allow
- preen to patch it into a normal empty directory entry.
-
-Sat Jul 6 19:59:27 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * main.c (argp_program_version): New variable.
- <hurd.h>: New include.
-
-Mon Jul 1 12:55:48 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * pass2.c (pass2): Don't skip empty directories in `.' and `..'
- correctness check; we don't clear them the way BSD does, so we
- want `.' and `..' to get created for us. Also handle `.' before
- `..' so that they get created in the usual order for empty
- directories.
-
- * dir.c (makeentry): After successful directory expansion, write
- out modified directory inode.
-
- * pass4.c (pass4): If a reconnect fails while we are preening,
- give up.
-
-Mon Jun 24 10:19:39 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * utilities.c (errexit, punt): Exit with status 8 for catastrophic
- failures.
-
-Thu May 23 14:12:21 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * pass2.c (pass2): Don't clear all node types in directories, just
- clear those that are wrong.
-
-Tue May 14 16:49:46 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * pass2.c (pass2): Fix up test in preen case.
-
-Tue May 14 15:29:36 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * pass2.c (pass2): Handle directory entry type fields better for
- Hurd.
-
-Sat May 11 01:07:49 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * main.c (parse_opt): Use ARGP_ERR_UNKNOWN instead of EINVAL.
-
-Thu May 9 20:12:51 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * pass1b.c (pass1b): Bother to initialize NUMBER.
-
-Fri May 3 00:48:39 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * main.c (nice_size, show_stats): New functions.
- (main): Use show_stats.
-
-Wed May 1 13:59:06 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * main.c (main): Shorten summary message so that it fits on one line.
- * utilities.c (no_preen): New function.
- (problem, warning, pinode): Use it.
- (warning): Don't flush all pending problems, just our own.
- * dir.c (linkup): Consistently put quotes around filenames.
-
- * main.c (preen, num_files): New variables.
- (main): Implement clean-bit checking in preen mode, and print
- summary statistics.
- (main, options): Add --force & --silent options.
- * pass1.c (pass1): Increment NUM_FILES.
- When clearing inode due to bad blocks, continue.
- * inode.c (allocino, freeino): Frob NUM_FILES.
- * fsck.h (force): New declaration.
- * pass5.c (pass5): Vary clean msg depending on whether FSMODIFIED.
- * setup.c (setup): Use error to print error msgs.
- <error.h>, <errno.h>: New includes.
-
- * utilities.c (problem, warning, pextend, pfail): New functions.
- (pinode, pfix, reply): Use new problem recording stuff.
- (push_problem, resolve_problem, flush_problems): New functions.
- (struct problem): New type.
- (problems, free_problems): New variables.
- (retch, punt): New functions.
- * fsck.h (problem, warning, pextend, pfail): New declarations.
- (pinode): Update declaration.
- * dir.c (validdir, makeentry, linkup): Use new printing functions.
- * pass1.c (pass1): Likewise.
- * pass1b.c (pass1b): Likewise.
- * pass2.c (pass2): Likewise.
- * pass3.c (pass3): Likewise.
- * pass4.c (pass4): Likewise.
- * pass5.c (pass5): Likewise.
- * setup.c (setup): Likewise.
-
-Tue Apr 30 19:06:42 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * pass5.c (pass5): Be sure to call pwarn before pfix.
- * main.c (main): Don't print large obnoxious banner if PREEN.
-
-Fri Apr 26 16:20:37 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * inode.c (allocino): Parenthesize test correctly.
-
- * fsck.h (swab_disk): Define as constant zero.
-
- * pass5.c (pass5): If not marked clean, but now it is, then offer
- to mark it clean.
- * utilities.c (reply): Set fix_denied anytime we return 0.
- * fsck.h (fix_denied): New variable.
-
-Wed Apr 24 13:32:39 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * pass1.c (pass1): Don't print block numbers as we go anymore.
-
-Tue Apr 23 10:11:49 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * pass5.c (pass5): Correctly track contig summaries even though
- they aren't used by the filesystem; we still need to preserve the
- format.
-
-Mon Apr 15 12:51:41 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * Makefile (vpath tables.c): Find ufs directory in $(top_srcdir).
-
-Tue Apr 2 09:00:53 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * pass1.c (pass1): Print mode correctly in unknown file type case.
- Recognize inode type IFSOCK too.
-
-Mon Mar 18 19:48:39 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * main.c (main): Pass new arg to argp_parse. Use argp_usage correctly.
-
-Thu Oct 19 17:45:12 1995 Miles Bader <miles@gnu.ai.mit.edu>
-
- * main.c (main): Exit with a non-zero status if we fixed anything.
- Use argp to parse options.
- (options): Converted to argp format.
- (args_doc): New variable.
- (USAGE, usage, SHORT_OPTIONS): Removed.
- Include <argp.h> instead of <getopt.h>.
- * Makefile ($(target)): Depend on libshouldbeinlibc.a.
-
-Fri Sep 22 16:55:03 1995 Miles Bader <miles@gnu.ai.mit.edu>
-
- * utilities.c (pfix): New function.
- (pfatal, pwarn, errexit): Print DEVICE_NAME too if in preen mode.
- * fsck.h: Declare DEVICE_NAME.
- * setup.c (setup): Set DEVICE_NAME.
- * pass1.c, pass2.c, pass3.c, pass4.c, pass5.c (pass1, pass2,
- pass3, pass4, pass5): Call pfix instead of printf.
- * pass1.c (pass1): Only print progress report if not in preen mode.
- * main.c (main): Only print section headers if not in preen mode.
-
-Wed Sep 20 09:11:59 1995 Miles Bader <miles@churchy.gnu.ai.mit.edu>
-
- * utilities.c (pinode): Take a message & args to print as well.
- * fsck.h: Change declaration of pinode.
- * pass2.c (pass2): Use changed pinode.
- * pass3.c (pass3): Use changed pinode.
- * pass4.c (pass4): Use changed pinode.
-
-Tue Sep 19 15:37:02 1995 Miles Bader <miles@churchy.gnu.ai.mit.edu>
-
- * pass1.c (pass1): Change the extent of DBWARN & IBWARN so that
- they actually work.
- * pass2.c (pass2): Adjust our record of link counts when we
- add/change dir entries; also print error messages when we can't.
- * pass4.c (pass4): If an unlinked file can't be reconnected, offer
- to clear it. Once a reconnect attempt fails, don't try again.
- * dir.c (linkup): Print the value of LFNAME rather than `lost+found'.
- (searchdir, changeino): Fix backward compare.
- (linkup): Don't fail when makeentry succeeds.
- (searchdir): Make searchdir return zero if there's an error
- during the search.
- (linkup): Print appropiate error messages if searchdir fails.
- (validdir): Get rid of extra newlines in error messages --
- everyone who calls this routine prints extra information if it
- fails, which should immediately follow.
- * main.c (main): Use getopt to parse command line options.
- (usage): New function.
- (options): New variable.
- (lfname, lfmode): Variables moved here from setup.c.
- (lfname): Made into a char* so that we can change it.
- (lfmode): Get rid of IFDIR; it's added when necessary.
- * fsck.h: Change LFNAME to char*.
- * setup.c (lfname, lfmode): Variables moved to main.c.
-
-Sat Sep 9 12:12:59 1995 Miles Bader <miles@churchy.gnu.ai.mit.edu>
-
- * Makefile (target): Changed to `fsck.ufs'.
- (installationdir): New variable, install into $(sbindir).
-
-Thu Jul 6 15:33:46 1995 Michael I Bushnell <mib@duality.gnu.ai.mit.edu>
-
- * fsck.h (lookup_directory): New decl.
-
- * pass1.c (pass1): Remove assignment from if test.
- * utilities.c (pinode): Likewise.
-
- * Makefile (tables.o): Delete rule.
- (vpath tables.c): Tell where to find tables.c.
-
- * Makefile: Removed dependencies that are now automatically
- generated.
-
-Thu Nov 3 17:19:03 1994 Michael I Bushnell <mib@geech.gnu.ai.mit.edu>
-
- * Makefile (dir): Changed to fsck.
- (target): Changed to fsck.
-
-Wed Nov 2 14:39:13 1994 Michael I Bushnell <mib@geech.gnu.ai.mit.edu>
-
- * pass2.c (pass2): Use DIRECT_NAMLEN instead of d_namlen
- throughout.
- * dir.c (searchdir): Likewise.
- (changeino): Likewise.
- (makeentry): Likewise.
-
-Mon Oct 17 16:07:56 1994 Michael I Bushnell <mib@geech.gnu.ai.mit.edu>
-
- * inode.c (inode_iterate): FN takes new third arg.
- Keep track of new var `offset' and pass it to FN.
- * pass2.c (pass2/checkdirblock): New third arg.
- Only scan DIRBLKSIZ chunks to the total size of the file.
- * dir.c (searchdir/checkdirblock): Likewise.
- (changeino/checkdirblock): Likewise.
- (makeentry/checkdirblock): Likewise.
- * pass1.c (pass1/checkblock): New third arg (ignored).
- * pass1b.c (pass1b/checkblock): Likewise.
-
- * inode.c (inode_iterate): Compute MAXB correctly.
-
- * utilities.c (getinode): Multiple ino_to_fsbo by
- sizeof (struct dinode).
- (write_inode): Likewise.
- (getinode): Inode buffer needs to be a full block, not a
- fragment.
-
-Fri Oct 14 21:07:09 1994 Michael I Bushnell <mib@churchy.gnu.ai.mit.edu>
-
- * utilities.c (lastifrag): New variable.
- (getinode): Use lastifrag instead of buf; Only I/O new block
- if lastifrag isn't what we want.
- (write_inode): Likewise.
-
-Fri Oct 14 17:44:59 1994 Michael I Bushnell <mib@geech.gnu.ai.mit.edu>
-
- * setup.c (setup): Test ISCHR, not ISDIR.
- Fix NCYL against NCG * CPG test.
- Bother to set MAXFSBLOCK, MAXINO, and DIRECT_SYMLINK_EXTENSION.
diff --git a/ufs-fsck/utilities.c b/ufs-fsck/utilities.c
index 5e081fe8..14705f84 100644
--- a/ufs-fsck/utilities.c
+++ b/ufs-fsck/utilities.c
@@ -270,7 +270,7 @@ retch (char *reason)
static void
punt (char *msg)
{
- problem (0, msg);
+ problem (0, "%s", msg);
flush_problems ();
exit (8);
}
diff --git a/ufs-utils/ChangeLog b/ufs-utils/ChangeLog
deleted file mode 100644
index 24b373c0..00000000
--- a/ufs-utils/ChangeLog
+++ /dev/null
@@ -1,163 +0,0 @@
-2006-03-15 Thomas Schwinge <tschwinge@gnu.org>
-
- * mkfs.c (parse_opt): Move UP's functionality into UP_INT in order to
- fix invalid lvalues.
-
-2002-06-08 Roland McGrath <roland@frob.com>
-
- * mkfs.c (iput): Use %Ld format for ino_t values.
-
-2001-12-06 Roland McGrath <roland@frob.com>
-
- * dlabel.c (fd_get_device): Only deallocate NODE if store_create fails.
- Found by Michael Teichgraeber <gnubert@web.de>.
-
-2001-12-02 Roland McGrath <roland@frob.com>
-
- * mkfs.c (fsinit): Set the root directory's owner/group to the user's.
- Suggested by Michael Teichgraeber <gnubert@web.de>.
-
-2001-02-25 Roland McGrath <roland@frob.com>
-
- * mkfs.c [!STANDALONE]: Include <time.h> for decl.
- * stati.c: Likewise.
-
-1999-11-20 Roland McGrath <roland@baalperazim.frob.com>
-
- * dlabel.c (fd_get_device): Check STORE->class->id, not STORE->class.
-
-1998-09-04 Roland McGrath <roland@baalperazim.frob.com>
-
- * mkfs.c (main): Fix return type to int, use return.
-
-Fri Jun 20 13:39:02 1997 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * mkfs.c (mkfs): Set SBLOCK.fs_clean. New file systems are always
- clean.
-
-Thu Apr 10 13:54:31 1997 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * dlabel.c: Don't include <mach/sa/sys/ioctl.h>.
- (_IOR, _IOC, IOC_OUT, IOCPARM_MASK): New macros.
-
-Wed Feb 19 23:10:54 1997 Miles Bader <miles@gnu.ai.mit.edu>
-
- * mkfs.c (argp_program_version): Make const.
-
-Thu Sep 5 11:44:38 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * mkfs.c: Include <version.h>.
- (argp_program_version): Define with STANDARD_HURD_VERSION.
-
-Mon Aug 19 15:18:30 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * mkfs.c (doc): Supply a useful value.
-
-Tue Jul 23 19:34:58 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * mkfs.c (fsinit): `struct timespec' now uses a field prefix of `tv_'.
- * stati.c (timespec_rep): Likewise.
-
-Fri Jun 21 02:12:16 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * dlabel.c (fd_get_device): Supply new args to store_create.
-
-Sat May 11 01:20:18 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * mkfs.c (parse_opt): Use ARGP_ERR_UNKNOWN instead of EINVAL.
-
-Fri May 10 15:50:38 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * dlabel.c (fd_get_device): Update to use libstore.
- <hurd/store.h>: New include.
- * Makefile (mkfs.ufs): Depend on ../libstore/libstore.a.
-
-Tue Apr 30 10:06:21 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * Makefile (include ../Makeconf): BEFORE dependencies.
- (all): Delete target.
- ($(targets)): Each target depends on its associated .o.
-
-Wed Apr 3 16:31:13 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * mkfs.c (main): In `Can't get disklabel' error message, specify
- which flag the user can use to supply the needed information.
- (mkfs): Fiddle with info message.
-
-Sun Mar 31 14:34:28 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * stati.c (mode_rep): Prefix octal number with `0'.
-
-Fri Mar 29 11:56:52 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * stati.c (main): Print mode & {in,}direct blocks too.
- (mode_rep): New function.
- (timespec_rep): P shouldn't be static.
-
- * mkfs.c (main): Argp interface changes.
-
-Wed Mar 13 18:30:55 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * mkfs.c (options, args_doc, doc): New variables for option parsing.
- (struct amark): New type.
- (amarks_add, amarks_contains): New functions.
- (default_disklabel): New variable.
- (main): Most arguments are now options (and optional). Allow many
- more parameters to be specified. Consult the disk label for some
- defaults.
- (most functions): Add explicit return type declarations. Fix
- printf format specifications. Get rid of #ifdefs for MFS.
- (started, malloc, realloc, calloc, free): Functions removed.
- (mfs, membase): Variables removed.
- <stddef.h>, <stdlib.h>, <argp.h>, <assert.h>, <error.h>,
- <string.h>: New includes
- * dlabel.c: New file.
- * Makefile (SRCS): Add dlabel.c.
- (mkfs.ufs): New target.
-
-Tue Feb 27 14:52:00 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * clri.c: Move here from ../utils.
-
- [Entire directory renamed to `ufs-utils' from `newfs']
-
-Sat Sep 9 12:17:11 1995 Miles Bader <miles@churchy.gnu.ai.mit.edu>
-
- * Makefile (target): Changed to `mkfs.ufs'.
- (installationdir): New variable, install into $(sbindir).
-
-Thu Nov 24 18:39:30 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * mkfs.c: Protect all mfs code with #ifdef MFS.
-
-Wed Oct 12 12:59:01 1994 Michael I Bushnell <mib@churchy.gnu.ai.mit.edu>
-
- * mkfs.c (main): MAXCONTIG should be zero because we don't
- do clustering.
-
-Fri Sep 9 09:45:23 1994 Michael I Bushnell <mib@churchy.gnu.ai.mit.edu>
-
- * mkfs.c: Include <sys/stat.h> and <fcntl.h>.
- (main): New function. Punt newfs.c for now.
- * Makefile (SRCS, OBJS): Comment out uses of newfs.c.
- (target): Build mkfs, not newfs.
-
- * newfs.c (mopts): Comment out.
- (mntflags): Comment out.
- (main): Omit check for `mfs'. Omit var `partition'.
- (main) [case 'o']: Comment out mfs specific code.
- (main): Comment out check for already-mounted partition.
- (main): Comment out MFS specific open of FSI.
-
- * mkfs.c (fsinit): Use DI_MODE to read mode from NODE, and
- set di_model and di_modeh instead of di_mode.
- (mkfs): Don't set fields in *PP.
-
- * newfs.c: Include ufs header files with "../ufs/foo.h" instead of
- <ufs/ufs/foo.h>. Don't include <sys/disklabel.h>, <sys/mount.h>,
- or "mntopts.h".
-
-Thu Sep 8 15:52:05 1994 Michael I Bushnell <mib@churchy.gnu.ai.mit.edu>
-
- * mkfs.c: Include ufs header files with "../ufs/foo.h" instead of
- <ufs/ufs/foo.h>. Don't include <sys/disklabel.h>.
diff --git a/ufs-utils/Makefile b/ufs-utils/Makefile
index b27b76c4..df22440e 100644
--- a/ufs-utils/Makefile
+++ b/ufs-utils/Makefile
@@ -1,5 +1,5 @@
#
-# Copyright (C) 1994, 1996 Free Software Foundation
+# Copyright (C) 1994, 1996, 2008 Free Software Foundation
# Written by Michael I. Bushnell.
#
# This file is part of the GNU Hurd.
@@ -27,6 +27,7 @@ SRCS = mkfs.c clri.c stati.c dlabel.c
installationdir = $(sbindir)
OBJS = $(SRCS:.c=.o)
+HURDLIBS = store shouldbeinlibc
include ../Makeconf
diff --git a/ufs/ChangeLog b/ufs/ChangeLog
deleted file mode 100644
index aa30e784..00000000
--- a/ufs/ChangeLog
+++ /dev/null
@@ -1,2001 +0,0 @@
-2006-03-15 Thomas Schwinge <tschwinge@gnu.org>
-
- * dir.h (DIRECT_NAMELEN): Don't use ?: as a lvalue.
-
-2002-10-03 Roland McGrath <roland@frob.com>
-
- * dir.h (MAXNAMLEN): #undef before defining.
-
-2002-07-31 Roland McGrath <roland@frob.com>
-
- * dir.c (diskfs_direnter_hard): Fix test in last change.
-
-2002-06-08 Roland McGrath <roland@frob.com>
-
- * inode.c (diskfs_cached_lookup): Use ino_t for argument.
-
- * dir.c (diskfs_direnter_hard): Use size_t for OLDSIZE.
- Fail with EOVERFLOW when it would exceed that width.
-
- * alloc.c, dir.c: Use %Ld format for ino_t values.
- * alloc.c (diskfs_alloc_node): Use %Ld format for blkcnt_t values.
-
-2002-05-08 Roland McGrath <roland@frob.com>
-
- * main.c (diskfs_append_args): Fix argument type.
- (main): Use %z format modifier for size_t arg.
- * dir.c (dirscanblock): Use %z format modifier for vm_address_t arg.
- (diskfs_dirempty): int -> vm_address_t
- (count_dirents): int -> size_t
- (diskfs_get_directs): u_int -> size_t
-
-2002-03-11 Roland McGrath <roland@frob.com>
-
- * Makefile (ufs.static): Depend on
- $(boot-store-types:%=../libstore/libstore_%.a).
-
-2001-11-21 Roland McGrath <roland@frob.com>
-
- * inode.c (read_disknode): Just always call getpid for the fsid value.
-
-2001-10-01 Marcus Brinkmann <marcus@gnu.org>
-
- * ufs.h (swab_long_long): Use LL, not lL, for constant.
- Submitted by Maurizio Boriani <baux@debian.org>.
-
-2001-08-09 Roland McGrath <roland@frob.com>
-
- * inode.c (diskfs_get_translator): Fail with EFTYPE if the length
- field stored on disk is unreasonable. Don't crash on ENOMEM.
- Use memcpy instead of bcopy.
-
-2001-06-09 Mark Kettenis <kettenis@gnu.org>
-
- * inode.c (diskfs_set_statfs): If number of free blocks is less
- than the number of reserved blocks, set the number of available
- blocks to 0.
-
-2001-01-08 Marcus Brinkmann <marcus@gnu.org>
-
- * main.c (main): Use %Ld instead %ld to print store->size.
- * hyper.c (get_hypermetadata): Likewise.
- * inode.c (diskfs_S_file_get_storage_info): Change type of variables
- start and length from off_t to store_offset_t.
-
-2001-01-07 Marcus Brinkmann <marcus@gnu.org>
-
- * dir.c: Make diskfs_dirstat_size const.
-
-2000-12-02 Roland McGrath <roland@frob.com>
-
- * inode.c (write_node): Remove assert that dn_set_mtime et al are
- clear. It is ok if they are set in parallel, because the latter
- setting will be carried out eventually.
-
-2000-11-30 Marcus Brinkmann <marcus@gnu.org>
-
- * dir.c (diskfs_lookup_hard): If name is too long, clear
- DS before returning ENAMETOOLONG.
-
-2000-07-26 Mark Kettenis <kettenis@gnu.org>
-
- * Makefile (HURDLIBS): Reorder libs such that the threads lib
- comes before the ports lib. This makes sure the functions in
- libthreads properly override the stubs in libports with the new
- dynamic linker semantics in glibc 2.2.
-
-2000-03-03 Roland McGrath <roland@baalperazim.frob.com>
-
- * dir.c (diskfs_get_directs): Don't allocate buffer for *DATA until
- after scanning for ENTRY and possibly returning EOF.
-
-1999-10-13 Roland McGrath <roland@baalperazim.frob.com>
-
- * consts.c (diskfs_name_max): New variable.
-
-1999-09-13 Roland McGrath <roland@baalperazim.frob.com>
-
- * dir.c, sizes.c, pager.c: Reverted changes related to io_map_segment.
-
-1999-09-09 Roland McGrath <roland@baalperazim.frob.com>
-
- * Makefile (makemode): servers -> server.
- (targets): Replaced with target; remove ufs.static.
- (ufs.static-LDFLAGS): Variable removed.
- (ufs.static, ufs): Remove deps.
-
-1999-09-08 Thomas Bushnell, BSG <tb@mit.edu>
-
- * dir.c (diskfs_get_directs): Initialize `err' to shut gcc up.
-
-1999-09-07 Thomas Bushnell, BSG <tb@mit.edu>
-
- * dir.c (diskfs_lookup_hard): Pass additional parameter to
- diskfs_get_filemap.
- (diskfs_dirempty): Likewise.
- * sizes.c (diskfs_truncate): Likewise.
- (block_extended): Likewise.
- (diskfs_grow): Likewise.
- * pager.c (diskfs_get_filemap): Accept additional parameter.
-
-1999-09-04 Thomas Bushnell, BSG <tb@mit.edu>
-
- * pager.c (find_address): If !ISREAD, then don't return errors for
- access past NP->allocsize, and clear *ADDR and *DISKSIZE. These
- can happen through harmless races against truncate.
- (pager_write_page): Don't print annoying messages for writes to
- unallocated disk. These can happen through harmless races against
- truncate, and so we should not pester the console with them.
-
-1999-07-10 Roland McGrath <roland@baalperazim.frob.com>
-
- * ufs.h: Add #include <sys/mman.h> for munmap decl.
-
-1999-07-09 Thomas Bushnell, BSG <tb@mit.edu>
-
- * dir.c (diskfs_get_directs): Use mmap instead of vm_allocate.
- * hyper.c (get_hypermetadata): Likewise.
- * pager.c (pager_read_page): Likewise.
-
-1999-07-06 Thomas Bushnell, BSG <tb@mit.edu>
-
- * hyper.c (diskfs_readonly_changed): Use mprotect instead of
- vm_protect.
-
-Mon Jul 5 20:04:58 1999 Thomas Bushnell, BSG <tb@mit.edu>
-
- * dir.c (diskfs_lookup_hard): Repair typo. Reported by Yamashita
- TAKAO <jargon@lares.dti.ne.jp>.
-
-1999-07-03 Thomas Bushnell, BSG <tb@mit.edu>
-
- * dir.c (diskfs_lookup_hard): Use munmap instead of
- vm_deallocate.
- (diskfs_direnter_hard): Likewise.
- (diskfs_dirremove_hard): Likewise.
- (diskfs_dirrewrite_hard): Likewise.
- (diskfs_dirempty): Likewise.
- (diskfs_drop_dirstat): Likewise.
- (diskfs_get_directs): Likewise.
- * sizes.c (block_extended): Likewise.
- (poke_pages): Likewise.
- * hyper.c (get_hypermetadata): Likewise.
- (diskfs_set_hypermetadata): Likewise.
-
-1999-06-29 Thomas Bushnell, BSG <tb@mit.edu>
-
- * hyper.c (diskfs_readonly_changed): Adjust whether the store
- should permit writes too.
-
-1999-05-02 Roland McGrath <roland@baalperazim.frob.com>
-
- * main.c (main): Remove bogus uninitialized variable ERR.
-
-1999-01-23 Roland McGrath <roland@baalperazim.frob.com>
-
- * main.c (main): Use diskfs_init_main.
-
-1998-12-27 Roland McGrath <roland@baalperazim.frob.com>
-
- * inode.c (diskfs_set_statfs): Remove __ from struct members.
-
-1998-12-21 Mark Kettenis <kettenis@phys.uva.nl>
-
- * inode.c (diskfs_set_statfs): Fill in statfs members that are
- used to implement statvfs.
-
-1998-12-27 Roland McGrath <roland@baalperazim.frob.com>
-
- * main.c (main): Pass ARGP_IN_ORDER flag to argp_parse because
- diskfs options need it.
-
-1998-12-20 Roland McGrath <roland@baalperazim.frob.com>
-
- * alloc.c (diskfs_alloc_node): Fix printf format to silence warning.
- * hyper.c (get_hypermetadata): Likewise.
-
-1998-09-04 Roland McGrath <roland@baalperazim.frob.com>
-
- * dir.c (diskfs_lookup_hard): Fix defn with `const'.
- (diskfs_direnter_hard): Likewise.
- (dirscanblock): Likewise.
- * inode.c (diskfs_create_symlink_hook, create_symlink_hook): Likewise.
- (diskfs_set_translator): Likewise.
-
-Wed Aug 20 14:34:24 1997 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * dir.c (diskfs_lookup_hard): Cope with error return from
- diskfs_get_filemap.
- * sizes.c (diskfs_grow): Likewise.
- * dir.c (diskfs_dirempty): Cope (poorly) with error return from
- diskfs_get_filemap.
- * sizes.c (diskfs_truncate): Likewise.
- (block_extended): Likewise.
-
- * pager.c (diskfs_get_filemap): If pager_create fails, return
- error to caller.
-
-Mon Jun 30 17:38:57 1997 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * main.c (main): If the store cannot be made writable, then set
- diskfs_hard_readonly and diskfs_readonly.
-
-1997-06-20 Miles Bader <miles@gnu.ai.mit.edu>
-
- * hyper.c (diskfs_set_hypermetadata): Adjust device addresses for
- possible differences between DEV_BSIZE & device block size.
- * inode.c (diskfs_S_file_get_storage_info): Likewise.
- * pager.c (pager_read_page, pager_write_page, pager_unlock_page):
- Likewise.
- * ufs.h (log2_dev_blocks_per_bsize): New declaration.
- * main.c (main): Only require device-block-size to be <= DEV_BSIZE.
- Get rid of device-block-size-is-power-of-2 check.
- Set LOG2_DEV_BLOCKS_PER_BSIZE.
- Exit with an error if the disk is too small rather than assert failing.
- (log2_dev_blocks_per_bsize): New variable.
-
-Thu Feb 6 01:56:27 1997 Miles Bader <miles@gnu.ai.mit.edu>
-
- (diskfs_S_file_getfh, diskfs_S_fsys_getfile): Functions removed.
-
-Tue Nov 19 18:28:26 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * inode.c (read_disknode): If SBLOCK->fs_inodefmt < FS_44INODEFMT,
- set ST->st_author to st->st_uid, and NP->author_tracks_uid to true.
- (diskfs_validate_author_change): New function.
-
-Mon Nov 18 17:10:00 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * inode.c (read_disknode): When setting ST->st_mode, Clear
- S_ITRANS bits, and set S_IPTRANS if necessary. Don't set
- NP->istranslated anymore.
- (diskfs_set_translator): Frob S_IPTRANS bit in mode bits instead
- of NP->istranslated.
- (write_node): Don't write any bits in S_ITRANS to disk.
- * alloc.c (ffs_alloc): Use S_IPTRANS in NP->dn_stat.st_mode
- instead of NP->istranslated.
-
-Sat Nov 16 17:21:40 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * inode.c (diskfs_S_fsys_getfile): Delete var `fakecred'.
- diskfs_access -> fshelp_access.
- * alloc.c (ffs_alloc): diskfs_isuid -> idvec_contains.
- (ffs_realloccg): Likewise.
-
-Thu Nov 14 16:43:36 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * inode.c (diskfs_S_file_getfh): diskfs_isuid -> idvec_contains.
- (diskfs_S_fsys_getfile): Use idvecs and iousers.
-
-Thu Oct 24 16:07:17 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * main.c (startup_children, runtime_children): New variables.
- (startup_parents, runtime_parents): Variables removed.
- (startup_argp, runtime_argp): Use new *_CHILDREN variables instead of
- corresponding *_PARENT ones.
-
-Thu Sep 19 18:02:40 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * Makefile (HURDLIBS): Add store.
-
-Wed Sep 18 15:30:00 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * inode.c (diskfs_S_file_get_storage_info): Narrow scope of RUN.
-
- * consts.c (diskfs_extra_version): New variable.
-
- * main.c (main): Remove CLASSES argument to store_parsed_open.
- Use STORE_PARAMS variable to get result from parsing STORE_ARGP.
- Don't force COMPAT_GNU on bootstrap filesystems (it's the default
- anyway).
-
-Mon Sep 16 13:27:38 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * Makefile (ufs.static ufs): Add ../libstore/libstore.a.
-
- * hyper.c (zeroblock): Change type to `void *'.
- (get_hypermetadata): Cast ZEROBLOCK when vm_{de,}allocating.
- * ufs.h (zeroblock): Change type to `void *'.
- * sizes.c (diskfs_truncate): Don't cast ZEROBLOCK to diskfs_node_rw.
- (block_extended, diskfs_grow): Do cast it to offer_data.
-
- * main.c (main): Don't set DISKFS_USE_MACH_DEVICE (which is no longer).
-
- * inode.c (diskfs_S_file_get_storage_info): Coalesce adjacent
- blocks when constructing RUNS.
- Set *PORTS_TYPE, not *STORAGE_PORT_TYPE.
- * inode.c (diskfs_S_file_getfh): Variable ERR removed.
-
- * sizes.c (indir_release): Use DISKFS_DISK_PAGER instead of DISK_PAGER.
- * ufs.h (sync_disk_blocks): Likewise.
- * pokeloc.c (sync_disk): Likewise.
- * main.c (diskfs_reload_global_state): Likewise.
- * pager.c (create_disk_pager, diskfs_shutdown_pager,
- diskfs_sync_everything): Likewise.
- * main.c <argp.h>, <hurd/store.h>: New includes.
- * hyper.c, pager.c, inode.c <hurd/store.h>: New include.
- (get_hypermetadata): Use %Zd for printfing size_t.
- (diskfs_set_hypermetadata): Return EIO for incomplete writes.
- Cast BUF when calling vm_deallocate.
-
- * dir.c (diskfs_direnter_hard): Initialize OLDSIZE to shut up gcc.
-
-Sat Sep 14 20:38:47 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * ufs.h (store, store_parsed, disk_image): New declarations.
-
- * pager.c (thread_function): Function removed.
- (create_disk_pager): Create PAGER_BUCKET.
- Use diskfs_start_disk_pager instead of disk_pager_setup.
- (disk_image): New variable.
-
- * main.c (store, store_parsed, diskfs_disk_name): New variables.
- (parse_opt): Propagate our input to the first child parser.
- (diskfs_append_args): New function.
- (diskfs_get_options): Function removed.
- (startup_parents): Use DISKFS_STORE_STARTUP_ARGP instead of
- DISKFS_STD_DEVICE_STARTUP_ARGP.
-
- * hyper.c (get_hypermetadata): Use DISKFS_DISK_NAME instead of
- DISKFS_DEVICE_ARG.
- * main.c (main): Likewise.
-
- * hyper.c (get_hypermetadata, diskfs_readonly_changed): Use
- fields in STORE instead of DISKFS_DEVICE_* variables.
- * inode.c (diskfs_S_file_get_storage_info): Likewise.
- * pager.c (pager_report_extent): Likewise.
- * main.c (main): Likewise.
- * pager.c (pager_read_page, pager_write_page, pager_unlock_page):
- Use store_{read,write} instead of diskfs_device_{read,write}_sync.
- * hyper.c (diskfs_set_hypermetadata): Likewise.
- * inode.c (diskfs_S_file_get_storage_info): Rewrite to use
- libstore functions (still has NDADDR block limit, though).
-
-Thu Sep 12 16:36:19 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * Makefile (HURDLIBS): New variable.
- (ufs.static ufs): Depend on $(library_deps) instead of long list
- of libraries.
-
-Fri Sep 6 16:00:42 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * consts.c: Include <version.h>.
- (diskfs_major_version, diskfs_minor_version, diskfs_edit_version):
- Deleted variables.
- (diskfs_server_version): New variable.
-
-Thu Aug 29 16:07:07 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * dir.c (diskfs_lookup_hard): When setting ds->stat to EXTEND, set
- ds->idx by looking at the size of the file. (IDX itself is no
- longer at the end because of the change on Aug 16 1996.)
-
-Wed Aug 28 12:15:15 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * dir.c (dirscanblock): Size dirents correctly when mallocing it.
- (diskfs_direnter_hard): Be more careful when sizing or resizing
- dirents. Correctly set to -1 all the new entries we create after
- realloc call.
-
-Fri Aug 16 18:51:31 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * ufs.h (struct disknode): New member `dir_idx'.
- * inode.c (diskfs_cached_lookup): Initialize DN->dir_idx.
- * dir.c (diskfs_lookup_hard): After successful dirscanblock,
- record index where we finished in DP->dn->dir_idx. Start searches
- at that index.
-
-Mon Aug 12 13:43:46 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * hyper.c (diskfs_set_hypermetadata): Bother to return 0 at end of
- function.
-
-Wed Aug 7 13:00:30 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * inode.c (diskfs_set_statfs): Compute st->f_blocks correctly; set
- bsize to be fs_fsize, not fs_bsize.
-
- * hyper.c (diskfs_set_hypermetadata): Return an error as
- appropriate.
-
- * inode.c (struct ufs_fhandle): Layout filehandle more like Unixy
- NFSD.
- (diskfs_S_file_getfh): Bother to clear unused parts of a
- file handle so that they always compare equal.
-
-Tue Aug 6 12:19:38 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * inode.c: Include <fcntl.h>.
- (struct ufs_fhandle): New type.
- (diskfs_S_fsys_getfile, diskfs_S_file_getfh): New functions.
-
-Tue Jul 23 15:58:28 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * inode.c (write_node, read_disknode): `struct timespec' now uses
- a field prefix of `tv_'.
-
-Sat Jul 6 16:14:10 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * main.c (ufs_version): Variable removed.
-
-Sat Jul 6 12:45:36 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * inode.c (read_disknode): Don't set allocsize based on st->size
- for kludged symlinks.
-
- * sizes.c (diskfs_truncate): Call record_poke after truncating a
- kludged symlink.
-
-Wed Jul 3 13:27:04 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * main.c: Include <argz.h>.
- (startup_parents, runtime_parents): Declare const.
-
-Tue Jun 25 14:02:02 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * main.c (diskfs_get_options): Include `--compat=' in options.
-
-Mon Jun 24 16:59:12 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * dir.c (diskfs_lookup_hard): Use diskfs_check_readonly instead of
- diskfs_readonly.
- (diskfs_dirempty): Likewise.
-
- * dir.c (diskfs_lookup_hard): Use diskfs_check_readonly instead of
- diskfs_readonly.
- (diskfs_dirempty): Likewise.
- * inode.c (diskfs_cached_lookup): Likewise.
- (read_symlink_hook): Likewise.
- * sizes.c (diskfs_truncate): Call diskfs_check_readonly.
- (diskfs_grow): Likewise.
- * hyper.c (diskfs_set_hypermetadata): If CLEAN is not set, make
- sure we clear the clean bit on disk. Always call sync_disk (with
- appropriate WAIT).
- (diskfs_readonly_changed): Don't do set_hypermetadata here.
- (copy_sblock): Don't track clean state here.
-
- * pager.c (diskfs_shutdown_pager): Don't shutdown DISKPAGER ever,
- just sync it instead.
-
-Sat Jun 22 17:45:34 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * main.c (diskfs_get_options): New function.
- (options): Make const.
-
-Fri Jun 21 01:32:09 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * main.c (parse_opt): Handle runtime invalid selection of 4.2 mode.
- Save select mode until we're done to correctly deal with external
- errors at runtime.
- (startup_parents, startup_argp, runtime_parents, runtime_argp):
- New variables.
- (main): Argp vars made global.
- (argp_parents): diskfs_device_startup_argp -->
- &diskfs_std_device_startup_argp.
-
-Sat Jun 15 13:57:27 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * main.c (options): New variable.
- (parse_opt): New function.
- (main): Parse ufs-specific options too.
- <string.h>: New include.
-
-Fri May 10 09:29:03 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * inode.c (diskfs_set_statfs): Fix one reference to old name of ST
- member.
-
-Thu May 9 11:54:13 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * Makefile (ufs.static ufs): s/ioserver/iohelp/g
- * ufs.h: ioserver.h -> iohelp.h.
-
- * inode.c (diskfs_set_statfs): Use and fill in new statfs
- structure.
-
-Mon May 6 14:23:54 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * main.c (ufs_version): Upgrade to 0.0.
-
-Fri May 3 09:15:33 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * sizes.c (block_extended): Rewrite code that moves pages
- to be more efficient, and not deadlock too, using unlocked
- pagein permission feature (read "hack"). Return value
- now indicates whether we expect a sync.
- (diskfs_grow): If a call to block_extended returns nonzero,
- then sync the file before returning.
- * pager.c (diskfs_get_filemap): Initialize
- UPI->allow_unlocked_pagein and UPI->unlocked_pagein_length.
- (unlocked_pagein_lock): New variable.
- (find_address): New parameter `isread'; all callers changed.
- If ISREAD and we are in the unlocked pagein region, don't
- attempt to acquire NP->dn->allocptrlock.
- * ufs.h (struct user_pager_info): New members
- `allow_unlocked_pagein' and `unlocked_pagein_length'.
- (unlocked_pagein_lock): New variable.
-
-Thu May 2 10:56:10 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * sizes.c (offer_data): Offer pages at ADDR each time through the
- loop, not the same page over and over.
- (block_extended): When moving data, sync in-core pager both before
- reading from disk and after providing data to kernel.
- (diskfs_grow): Always call block_extended or offer_data before
- adjusting block pointer.
-
-Tue Apr 30 13:38:42 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * sizes.c (diskfs_grow): In last offer_data, don't offer a block
- number as an address.
-
-Fri Apr 26 15:35:53 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * Makefile (makemode): Now `servers'.
- (targets): Renamed from `target'; now include ufs.static.
- (ufs.static-LDFLAGS): Renamed from `LDFLAGS'.
- (ufs.static): Depend on same things as `ufs'.
- (include ../Makeconf): Must come before dependency information.
-
-Wed Apr 24 14:05:48 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * dir.h (DIRECT_NAMLEN) [! LITTLE_ENDIAN]: Deal correctly with the
- case where it was written on a little endian machine without the
- extension.
- (DIRECT_NAMLEN) [LITTLE_ENDIAN]: Deal with case correctly where it
- was written without the extension on a big endian machine.
- * dir.c (dirscanblock): Use read/write_disk_entry when reading or
- writing fields from directory entries.
- (diskfs_direnter_hard): Likewise.
- (diskfs_dirremove_hard): Likewise.
- (diskfs_dirrewrite_hard): Likewise.
- (diskfs_get_directs): Likewise.
- (diskfs_dirempty): Likewise.
- (count_dirents): Likewise.
-
-Tue Apr 23 11:28:42 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * dir.c (diskfs_dirempty): node_update -> diskfs_node_update.
-
- * hyper.c (swab_sblock, swab_csums): New functions.
- (get_hypermetadata): If this is a swapped filesystem, set swab_disk.
- Also swap csum and sblock after reading them.
- (diskfs_set_hypermetadata): If swab_disk, swap the csums back before
- writing them.
- (copy_sblock): If swab_disk, swap the sblock before writing it.
- * ufs.h (swab_disk): New variable.
- (swab_short, swab_long, swab_long_long): New functions.
- (read_disk_entry, write_disk_entry): New macros.
- * alloc.c (ffs_realloccg): Use read/write_disk_entry when
- reading/writing on-disk inode fields.
- * bmap.c (fetch_indir_spec): Likewise.
- * inode.c (read_disknode): Likewise.
- (write_node): Likewise.
- (diskfs_set_translator): Likewise.
- (diskfs_get_translator): Likewise.
- (diskfs_S_file_get_storage_info): Likewise.
- * sizes.c (diskfs_truncate): Likewise.
- (diskfs_grow): Likewise.
- * pager.c (pager_unlock_page): Likewise.
- * bmap.c (fetch_indir_spec): Use read/write_disk_entry when
- reading/writing on-disk indirect blocks.
- * sizes.c (diskfs_truncate): Likewise.
- (indir_release): Likewise.
- (diskfs_grow): Likewise.
- * pager.c (pager_unlock_page): Likewise.
- * alloc.c: Include <string.h>
- (ffs_blkpref): Use read_disk_entry when reading from BAP array.
- (swab_cg, read_cg, release_cg): New functions.
- (ffs_fragextend, ffs_alloccg, ffs_nodealloccg, ffs_blkfree,
- diskfs_free_node): Use new cg access functions.
-
-Thu Apr 18 14:50:30 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * sizes.c (diskfs_grow): New variable `pagerpt'.
- (offer_zeroes, block_extended): New functions.
- (diskfs_grow): In initializing newly allocated data disk blocks with
- zeroes, use less aggressive offer_zeroes instead of immediate
- synchronous writes. After ffs_realloccg succeeds, use
- block_extended to handle the magic. Get rid of old poke calls.
- * alloc.c (ffs_realloccg): If we are allocating a new block, don't
- actually free the old one here.
- * sizes.c (diskfs_grow): New variable `pagerpt'.
- (offer_zeroes, block_extended): New functions.
- (diskfs_grow): In initializing newly allocated data disk blocks
- with zeroes, use less aggressive offer_zeroes instead of immediate
- synchronous writes. After ffs_realloccg succeeds, use
- block_extended to handle the magic. Get rid of old poke calls.
-
-Tue Apr 16 15:20:07 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * dir.c (diskfs_lookup_hard): Set atime appropriately, and sync
- the new atime if we are running synchronously (!).
- (diskfs_dirempty): Likewise.
- (diskfs_direnter_hard): Set mtime appropriately.
- (diskfs_dirremove_hard): Likewise.
- (diskfs_dirrewrite_hard): Likewise.
-
- * inode.c (diskfs_write_disknode): Only do sync if WAIT is set.
-
-Thu Apr 4 16:39:22 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * inode.c (diskfs_cached_lookup): Intialize NP->cache_id *after*
- NP exists.
-
-Wed Apr 3 16:03:51 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * inode.c (diskfs_cached_lookup): Renamed from `iget'. All
- callers changed. Initialize NP->cache_id.
-
-Fri Mar 29 16:52:31 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * sizes.c (diskfs_truncate): Cast DI->di_shortlink to correct type
- before adding a character count to it.
-
-Mon Mar 25 13:08:10 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * dir.c (diskfs_null_dirstat): New function.
-
-Fri Mar 22 23:43:53 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * inode.c (read_symlink_hook): Only set NP's atime if !readonly.
-
-Wed Mar 20 14:36:31 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * dir.c (diskfs_lookup_hard): Don't do initial or final permission
- checking here.
- * dir.c (diskfs_dirrewrite_hard): Renamed from diskfs_dirrewrite.
- No longer call modification tracking routines.
- (diskfs_dirremove_hard): Renamed from diskfs_dirremove. No longer call
- modification tracking routines.
- (diskfs_direnter_hard): Renamed from diskfs_direnter. No longer call
- modification tracking routines.
- (diskfs_lookup_hard): Renamed from diskfs_lookup.
-
-Mon Mar 18 19:50:41 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * main.c (main): Pass new arg to argp_parse.
-
-Mon Mar 18 12:33:06 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * pager.c (diskfs_max_user_pager_prot) [add_pager_max_prot]:
- (a == b) ? 1 : 0 ====> (a == b).
-
-Fri Feb 23 15:27:05 1996 Roland McGrath <roland@charlie-brown.gnu.ai.mit.edu>
-
- * hyper.c (get_hypermetadata): Use diskfs_device_arg in unclean msgs.
-
-Wed Feb 21 05:57:12 1996 Roland McGrath <roland@charlie-brown.gnu.ai.mit.edu>
-
- * hyper.c: Implement proper handling of the filesystem `clean bit'.
- (ufs_clean): New variable.
- (get_hypermetadata): Set it from the fs_clean flag. If not clean,
- complain and force read-only. Complain when ignoring COMPAT_BSD42.
- (diskfs_set_hypermetadata): Set the clean flag in the superblock
- when CLEAN and fs was clean to start with.
- (copy_sblock): Remove bogus clean flag frobnication.
-
-Fri Feb 16 17:05:36 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * main.c (main): Check error return from diskfs_init_diskfs.
-
-Sat Jan 6 11:50:14 1996 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * ufs.h (diskpager, diskpagerport, disk_image): Variables removed.
- Include <hurd/diskfs-pager.h> instead.
- (sync_disk_blocks): Use `disk_pager' in place of `diskpager->p'.
- * pager.c (diskfs_shutdown_pager, diskfs_sync_everything): Use
- `disk_pager' in place of `diskpager->p'.
- (create_disk_pager): Rewritten using disk_pager_setup.
- * pokeloc.c (sync_disk): Use `disk_pager' in place of `diskpager->p'.
- * sizes.c (indir_release): Likewise.
- * main.c (diskfs_reload_global_state): Likewise.
-
-Thu Jan 4 19:10:11 1996 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * main.c (main): Don't map disk image here; create_disk_pager now
- does it.
-
- * hyper.c (get_hypermetadata, copy_sblock): Don't put
- diskfs_catch_exception () inside assert, bonehead! Use
- assert_perror on a variable of its result.
-
-Mon Jan 1 16:38:14 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * pager.c (pager_unlock_page): When allocating block in direct
- array, clear it synchronously just like we do when it goes in the
- indirect array.
-
-Thu Nov 9 14:01:30 1995 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * dir.c (struct dirstat): New member `nbytes'.
- (dirscanblock): If DS->type is COMPRESS, still look
- for TAKE/SHRINK possibilities. Also, if it's COMPRESS,
- still look to see if the current block can be compressed
- with fewer byte copies.
-
-Sun Nov 5 02:08:38 1995 Miles Bader <miles@gnu.ai.mit.edu>
-
- * main.c (main): Add flags arg to diskfs_startup_diskfs call.
-
-Sat Nov 4 20:01:58 1995 Miles Bader <miles@gnu.ai.mit.edu>
-
- * inode.c (diskfs_S_file_get_storage_info): Add FLAGS argument.
-
-Thu Oct 19 12:50:11 1995 Miles Bader <miles@gnu.ai.mit.edu>
-
- * pager.c (diskfs_max_user_pager_prot): Return what we discovered,
- instead of 1.
-
- * dir.c (diskfs_lookup, diskfs_dirempty): Give diskfs_get_filemap
- a protection arg.
- * sizes.c (diskfs_truncate, diskfs_grow): Ditto.
-
- * hyper.c (diskfs_readonly_changed): Give the 2nd arg to
- vm_protect an appropiate type.
-
- * pager.c (diskfs_max_user_pager_prot): Stop iterating early if poss.
-
-Wed Oct 18 16:28:42 1995 Miles Bader <miles@gnu.ai.mit.edu>
-
- * ufs.h (struct user_pager_info): Add max_prot field.
- * pager.c (diskfs_get_filemap): Add PROT parameter, & use it.
- (diskfs_pager_users): Split out block_caching & enable_caching.
- (block_caching, enable_caching): New function.
- (diskfs_max_user_pager_prot): New function.
-
- * main.c (main): Always include VM_PROT_WRITE in max prot.
- * hyper.c (diskfs_readonly_changed): Change the protection of
- DISK_IMAGE to reflect the new state. Clear SBLOCK_DIRTY if readonly.
-
- * inode.c (read_disknode): Bother to set the allocsize field.
-
- * ufs.h (struct rwlock): Structure deleted.
- (rwlock_init, rwlock_reader_unlock, rwlock_reader_lock,
- rwlock_writer_lock, rwlock_writer_unlock): Functions deleted.
-
-
-Tue Oct 17 14:49:43 1995 Miles Bader <miles@gnu.ai.mit.edu>
-
- * inode.c (diskfs_node_reload): New function.
- (iget): Move allocsize setting into read_disknode.
- * pager.c (flush_node_pager): New function.
- * ufs.h (zeroblock, sblock, csum): Declare extern.
- (flush_node_pager, flush_pokes): New declarations.
- * pokeloc.c (flush_pokes): New function.
- * hyper.c (diskfs_readonly_changed): New function.
- (get_hypermetadata): Move compat_mode futzing & disk size
- validation here from main.
- (zeroblock, sblock, csum): Define (were common).
- (get_hypermetadata): Only allocate SBLOCK if not already done.
- Deallocate any old ZEROBLOCK and CSUM storage.
- (diskfs_readonly_changed): New function.
- * main.c (main): Move stuff into get_hypermetadata.
- Writable init code moved to diskfs_readonly_changed.
- (diskfs_reload_global_state): New function.
-
-Fri Oct 13 15:03:37 1995 Miles Bader <miles@gnu.ai.mit.edu>
-
- * main.c (main): Use new handy diskfs routines and get rid of
- tons of junk. Main should be almost all ufs-specific now.
- (USAGE, usage, SHORT_OPTS, long_opts, parse_opt, trans_parse_arg): RIP.
- (printf_lock): Initialize.
-
-Thu Oct 12 18:48:04 1995 Miles Bader <miles@gnu.ai.mit.edu>
-
- * pager.c (pager_unlock_page, pager_write_page, pager_read_page):
- Use diskfs_device_{read,write}_sync instead of dev_{read,write}_sync.
- * hyper.c (diskfs_set_hypermetadata): Ditto.
- * sizes.c (diskfs_grow): Ditto.
- * pager.c (pager_report_extent): Calculate the pager size.
- * ufs.h (dev_read_sync, dev_write_sync, dev_write, diskpagersize):
- Decls removed.
-
- * Makefile (SRCS): Remove devio.c.
- * ufs.h (ufs_device, ufs_device_name): Variables removed.
- * inode.c (diskfs_S_file_get_storage_info): Use DISKFS_DEVICE
- instead of UFS_DEVICE, and DISKFS_DEVICE_NAME instead of
- UFS_DEVICE_NAME.
-
-Sat Oct 7 20:47:56 1995 Miles Bader <miles@gnu.ai.mit.edu>
-
- * main.c (diskfs_init_completed): Function deleted (now in libdiskfs).
- (thread_cancel): Function deleted.
-
-Fri Oct 6 17:30:23 1995 Miles Bader <miles@gnu.ai.mit.edu>
-
- * inode.c (diskfs_S_file_get_storage_info): Change type of
- ADDRESSES to off_t **, and add the BLOCK_SIZE parameter.
-
-Wed Oct 4 17:21:33 1995 Miles Bader <miles@gnu.ai.mit.edu>
-
- * inode.c (diskfs_set_statfs): fsys_stb_bsize -> fsys_stb_iosize.
- fsys_stb_fsize -> fsys_stb_bsize.
-
- * main.c (parse_opt): Rearrange slightly.
-
-Tue Sep 26 11:54:35 1995 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * inode.c: Include <netinet/in.h>.
- (diskfs_S_file_get_storage_info): New function.
- * main.c (main): Delete var `devname'. Use `ufs_device_name'
- throughout instead.
- * ufs.h (ufs_device_name): New var.
-
-Fri Sep 22 13:22:42 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * hyper.c (get_hypermetadata): Use %Zd format for result of sizeof.
-
-Tue Sep 19 13:41:46 1995 Miles Bader <miles@churchy.gnu.ai.mit.edu>
-
- * Makefile (LDFLAGS): New variable.
-
-Wed Sep 13 12:30:23 1995 Michael I. Bushnell, p/BSG <mib@duality.gnu.ai.mit.edu>
-
- * dir.c (diskfs_lookup): Don't attempt to lock NP if NPP is not
- set. Don't even set NP if NPP is not set; use INUM as "lookup
- succeeded flag" instead. Lookups for REMOVE and RENAME now *must*
- set NPP.
-
-Wed Sep 6 11:01:50 1995 Miles Bader <miles@churchy.gnu.ai.mit.edu>
-
- * pager.c (diskfs_pager_users): Ignore the disk pager when seeing
- if there are any active pagers.
-
-Mon Aug 28 17:07:36 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * Makefile (ufs): Depend on ../libshouldbeinlibc/libshouldbeinlibc.a.
-
-Fri Aug 25 17:14:09 1995 Michael I. Bushnell, p/BSG <mib@duality.gnu.ai.mit.edu>
-
- * sizes.c (diskfs_truncate): When freeing direct blocks mentioned
- in a single indirect block, or single indirect blocks mentioned in
- a double, only call the free routine (ffs_blkfree or
- indir_release, respectively) if the block is actually allocated.
-
-Wed Aug 23 12:24:07 1995 Miles Bader <miles@churchy.gnu.ai.mit.edu>
-
- * Makefile (ufs): Add explicit dependencies.
- (HURDLIBS, LDFLAGS, REMHDRS): Removed.
- Rules associated with ../lib removed.
-
-Fri Jul 21 17:48:12 1995 Michael I Bushnell <mib@geech.gnu.ai.mit.edu>
-
- * pager.c (diskfs_get_filemap): Drop initial reference created by
- pager_create.
-
- * pager.c (diskfs_get_filemap): Avoid race with simultaneous
- termination by looping until we win.
- (pager_clear_user_data): Only clear UPI->np->dn->fileinfo if it
- still points to us.
-
-Mon Jul 17 14:35:25 1995 Michael I Bushnell <mib@geech.gnu.ai.mit.edu>
-
- * pager.c (thread_function): Don't have any global timeout here;
- we don't use it anyhow.
-
-Thu Jul 6 15:42:52 1995 Michael I Bushnell <mib@duality.gnu.ai.mit.edu>
-
- * Makefile: Removed dependencies that are now automatically
- generated.
-
-Mon Jun 26 20:17:42 1995 Michael I Bushnell <mib@duality.gnu.ai.mit.edu>
-
- * pager.c: Include <unistd.h>.
- (diskfs_pager_users): New function.
-
-Thu Jun 22 11:41:04 1995 Michael I Bushnell <mib@duality.gnu.ai.mit.edu>
-
- * pager.c (thread_function): Move thread_function to be non-local,
- of course, because it needs to live even after create_disk_pager
- returns.
-
- * main.c (thread_cancel): New function (HACK).
-
- * Makefile (HURDLIBS): Add libihash.
-
- * main.c (main): Have main thread exit when done instead of
- calling a diskfs function.
-
-Wed Jun 21 12:20:01 1995 Michael I Bushnell <mib@duality.gnu.ai.mit.edu>
-
- * ufs.h (user_pager_info): Removed members next and prevp.
- * pager.c (pager_clear_user_data): Don't maintain pager linked
- list.
- (diskfs_get_filemap): Don't maintain pager linked list.
- (pager_dropweak): New function.
- (pager_traverse): Delete function.
- (diskfs_shutdown_pager): Use ports_bucket_iterate instead of
- pager_traverse.
- (diskfs_sync_everything): Likewise.
-
- * pager.c (pager_bucket): New variable.
- (create_disk_pager): Provide pager_bucket in call to pager_create.
- (diskfs_get_filemap): Likewise.
- (diskfs_file_update): Use ports reference calls directly instead
- of pager wrappers.
- (drop_pager_softrefs): Likewise.
- (allow_pager_softrefs): Likewise.
- (pager_traverse): Likewise.
- (create_disk_pager): Initialize pager_bucket here and fork off
- service thread for pager ports.
-
- * sizes.c (diskfs_truncate): Likewise.
-
- * dir.c (diskfs_lookup): Provide initialization for BUFLEN.
- (diskfs_direnter): Move assignment out of if test.
-
-Tue Jun 20 11:48:06 1995 Michael I Bushnell <mib@duality.gnu.ai.mit.edu>
-
- * sizes.c (diskfs_grow): Provide initialization of POKE_OFF.
- * alloc.c (ffs_realloccg): Remove assignment from if tests.
- * sizes.c (diskfs_truncate): Likewise.
- * bmap.c (fetch_indir_spec): Likewise.
-
-Mon Jun 19 21:17:21 1995 Michael I Bushnell <mib@duality.gnu.ai.mit.edu>
-
- * inode.c (diskfs_node_iterate): New function.
- (write_all_disknodes): Use it.
-
-Wed Jun 14 16:18:55 1995 Michael I Bushnell <mib@duality.gnu.ai.mit.edu>
-
- * inode.c (diskfs_get_translator): Conform to new memory usage
- semantic.
-
-Sat May 20 00:17:30 1995 Miles Bader <miles@churchy.gnu.ai.mit.edu>
-
- * main.c (trans_parse_args): Use options_parse &
- diskfs_standard_startup_options to parse our translator options.
- (usage): New function.
- (parse_opt): New function.
-
- * Makefile (CPPFLAGS): Add -I../lib, to get include lib include files,
- and $(CPPFLAGS-$(notdir $<)) to get file-specific cpp options.
- Add a vpath for %.c to ../lib, so we can use source files from there.
-
-Mon May 15 13:14:48 1995 Michael I Bushnell <mib@duality.gnu.ai.mit.edu>
-
- * pager.c (pager_clear_user_data): Doc fix.
-
-Sat May 13 05:04:11 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * Makefile (OBJS): Remove exec_server_image.o.
- (exec_server_image.o): Rule removed.
-
-Mon May 8 08:43:43 1995 Miles Bader <miles@churchy.gnu.ai.mit.edu>
-
- * dir.c (diskfs_lookup): When looping back to try_again: because
- we're looking up "..", be sure and trash the mapping we made of
- the directory's pager -- otherwise the reference to the pager
- never gets dropped and we can never free the node.
-
- * dir.c (diskfs_lookup): ds->type was being compared to LOOKING, which
- value it can never have. Compare ds->stat against LOOKING instead.
-
- * pager.c (pager_clear_user_data): Don't die when called on the
- disk pager.
-
- * inode.c (write_all_disknodes): Fix typo `alloc' --> `alloca'.
-
-Tue May 2 11:59:09 1995 Michael I Bushnell <mib@duality.gnu.ai.mit.edu>
-
- * pager.c (pager_clear_user_data): Acquire pagerlistlock around
- modifications to UPI->next/prevp list structure.
-
-Fri Apr 28 19:02:05 1995 Michael I Bushnell <mib@geech.gnu.ai.mit.edu>
-
- * inode.c (write_all_disknodes): We have to really lock the nodes
- around the calls to diskfs_set_node_times and write_node; this in
- turn forces us to have real refereces.
-
-Thu Apr 13 16:36:57 1995 Miles Bader <miles@churchy.gnu.ai.mit.edu>
-
- * main.c (main): Don't abort if a std file descriptor is already open.
-
-Tue Apr 4 20:08:25 1995 Michael I Bushnell <mib@geech.gnu.ai.mit.edu>
-
- * inode.c (diskfs_set_translator): When freeing passive
- translator, account for blocks freed in NP->dn_stat.st_blocks.
-
-Fri Mar 31 13:43:27 1995 Michael I Bushnell <mib@geech.gnu.ai.mit.edu>
-
- * sizes.c (diskfs_truncate): Don't acquire writer lock on
- NP->dn->allocptrlock until after forcing delayed copies through;
- otherwise the pageins will deadlock attempting to get a reader
- lock to service them. This is safe, because we only need
- NP->allocsize here, and that can't change as long as we hold
- NP->lock.
-
-Mon Mar 20 13:58:44 1995 Michael I Bushnell <mib@duality.gnu.ai.mit.edu>
-
- * consts.c (diskfs_synchronous): New variable.
-
-Fri Mar 17 14:31:04 1995 Michael I Bushnell <mib@duality.gnu.ai.mit.edu>
-
- * alloc.c (ffs_clusteracct): Make static.
- (alloc_sync): New function.
- (ffs_alloc): Call alloc_sync.
- (ffs_realloccg): Likewise.
- (diskfs_alloc_node): Likewise.
- (ffs_blkfree): Likewise.
- (diskfs_free_node): Likewise.
-
-Sat Jan 28 14:59:26 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * Makefile (OBJS): Remove reference to libc's devstream.o.
-
-Fri Nov 11 11:45:38 1994 Michael I Bushnell <mib@churchy.gnu.ai.mit.edu>
-
- * hyper.c (diskfs_set_hypermetadata): Always use dev_write_sync to
- avoid device_write bug that says you can't modify the buffer until
- device_write returns. Also remember to deallocate BUF.
-
-Thu Nov 10 13:27:09 1994 Michael I Bushnell <mib@churchy.gnu.ai.mit.edu>
-
- * main.c (main): Issue decent prompt.
-
- * hyper.c (diskfs_set_hypermetadata): Copy CSUM into a
- page-aligned page-sized buffer for disk write to avoid inane
- kernel bug.
-
-Wed Nov 9 05:43:14 1994 Michael I Bushnell <mib@geech.gnu.ai.mit.edu>
-
- * main.c (main): Behave more reasonably if we can't open DEVNAME.
-
-Tue Nov 8 00:03:20 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * pager.c (pager_write_page): Use %p for printing PAGER.
-
- * ufs.h: Declare copy_sblock.
-
-Wed Nov 2 16:06:10 1994 Michael I Bushnell <mib@geech.gnu.ai.mit.edu>
-
- * hyper.c (copy_sblock): Don't copy csum here.
- (diskfs_set_hypermetadata): Write csum directly to disk here.
-
-Thu Oct 27 20:58:08 1994 Michael I Bushnell <mib@churchy.gnu.ai.mit.edu>
-
- * dir.c (diskfs_lookup): diskfs_get_filemap returns a send right,
- so don't create an additional one here.
- (diskfs_dirempty): Likewise.
- * sizes.c (diskfs_truncate): Likewise.
- (diskfs_grow): Likewise.
-
-Tue Oct 25 12:49:41 1994 Michael I Bushnell <mib@churchy.gnu.ai.mit.edu>
-
- * hyper.c (copy_sblock): Call record_poke for csum and superblock
- after modifying them.
-
- * pager.c (diskfs_shutdown_pager): Call copy_sblock.
- (diskfs_sync_everything): Likewise.
-
- * alloc.c (ffs_fragextend): Call record_poke for CG after
- modifying it. Also set CSUM_DIRTY and SBLOCK_DIRTY.
- (ffs_alloccg): Likewise.
- (ffs_alloccgblk): Likewise.
- (ffs_nodealloccg): Likewise.
- (ffs_blkfree): Likewise.
- (diskfs_free_node): Likewise.
-
-Fri Oct 7 01:32:56 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * main.c (diskfs_init_completed): Don't call _hurd_proc_init.
- (saved_argv): Variable removed.
- (main): Don't set saved_argv. Pass ARGV to diskfs_start_bootstrap.
-
-Wed Oct 5 22:18:46 1994 Michael I Bushnell <mib@churchy.gnu.ai.mit.edu>
-
- * inode.c (read_disknode): If we are the bootstrap filesystem,
- then getpid changes once proc starts up. So only call getpid
- once, thus not allowing st_dev values to mysteriously change.
-
-Wed Oct 5 12:56:53 1994 Michael I Bushnell <mib@geech.gnu.ai.mit.edu>
-
- * alloc.c (diskfs_alloc_node): Abort if free inode has
- translator attached.
-
-Tue Oct 4 18:33:35 1994 Michael I Bushnell <mib@churchy.gnu.ai.mit.edu>
-
- * pager.c (pager_unlock_page): Call diskfs_catch_exception.
-
-Tue Oct 4 00:16:04 1994 Michael I Bushnell <mib@geech.gnu.ai.mit.edu>
-
- * inode.c (diskfs_lost_hardrefs): Comment out body.
- * ufs.h (node2pagelock): New variable.
- * pager.c (node2pagelock): Initialize.
- (diskfs_get_filemap): Don't let node hold a reference to the pager.
- (pager_clear_user_data): Acquire node2pagelock and clear
- the node's reference to the pager.
- (diskfs_file_update): Hold node2pagelock for reference
- of NP->dn->fileinfo.
- (drop_pager_softrefs): Likewise.
- (allow_pager_softrefs): Likewise.
- (diskfs_get_filemap): Likewise.
- * sizes.c (diskfs_truncate): Likewise.
-
- * Makefile (SRCS): Added pokeloc.c.
-
-Mon Oct 3 15:03:38 1994 Michael I Bushnell <mib@geech.gnu.ai.mit.edu>
-
- * sizes.c (diskfs_truncate): Rewritten.
-
- * bmap.c (fetch_indir_spec): Initialize OFFSET values to -2,
- meaning that the entry is not needed. If LBN is negative,
- then don't set values for the data block.
-
- * inode.c (write_node): Call record_poke after writing
- dinode.
- (create_symlink_hook): Likewise.
- (diskfs_set_translator): Likewise.
- * pager.c (pager_unlock_page): Likewise.
- * sizes.c (diskfs_truncate): Likewise.
- * pager.c (pager_unlock_page): Call record_poke after writing
- indirect block.
- * sizes.c (diskfs_grow): Likewise.
- (diskfs_grow): Likewise.
- * pager.c (diskfs_sync_everything) [sync_one]: If this is the
- disk pager, call sync_disk instead.
- * pokeloc.c: New file.
-
-Fri Sep 30 11:25:36 1994 Michael I Bushnell <mib@churchy.gnu.ai.mit.edu>
-
- * dir.h: Delete DT_* definitions; they are now in <dirent.h>.
- * dir.c (diskfs_get_directs): Set USERP->d_type as DT_UNKNOWN.
- When the bugs in the type fields are fixed (dealing with
- multiple links and mode changes) then this can actually return
- the value.
-
-Thu Sep 29 17:16:58 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * main.c (main): Test getpid()>0 to decide we are a normal
- translator instead of the boot fs. Fetch bootstrap port after
- possibly calling diskfs_parse_bootargs, not before.
-
-Tue Sep 27 15:24:58 1994 Michael I Bushnell <mib@churchy.gnu.ai.mit.edu>
-
- * sizes.c (diskfs_grow) [computation of newallocsize]: Last block
- number is one less than the total number of blocks.
-
-Tue Sep 27 11:58:44 1994 Michael I Bushnell <mib@geech.gnu.ai.mit.edu>
-
- * bmap.c (fetch_indir_spec): Single indirect block pointer is
- in the INDIR_SINGLE slot, not the INDIR_DOUBLE slot.
-
-Mon Sep 26 20:47:30 1994 Michael I Bushnell <mib@geech.gnu.ai.mit.edu>
-
- * Makefile (SRCS): Added bmap.c.
-
- * main.c (main): Don't call pager_init.
-
- * inode.c (diskfs_get_translator): Repair to read translator
- correctly.
-
- * sizes.c (diskfs_grow): Compute block numbers in a more clean
- (and confidently correct) fashion.
- (diskfs_truncate): Set NP->allocsize from a properly rounded
- value.
-
-Mon Sep 26 12:50:38 1994 Michael I Bushnell <mib@churchy.gnu.ai.mit.edu>
-
- * inode.c (diskfs_lost_hardrefs): "Know" that a pager starts
- with a portinfo; we don't actually have access to the pager
- struct here.
-
-Fri Sep 23 14:21:55 1994 Michael I Bushnell <mib@churchy.gnu.ai.mit.edu>
-
- [ Continuing yesterday's changes. ]
- * ufs.h (struct dirty_indir): New type.
- (struct disknode): New member `dirty'.
- * inode.c (iget): Initialize DN->dirty.
- * bmap.c (mark_indir_dirty): New function.
- * pager.c (pager_unlock_page): Call mark_indir_dirty before
- writing into indirect blocks.
- (diskfs_file_update): Sync indirect blocks here.
- (pager_traverse): Simplify; do FILE_DATA and diskpager.
- (pager_init): Removed function.
- (create_disk_pager): New function.
- * sizes.c: Completely rewritten.
- * main.c (main): Spawn first thread sooner so we can
- map and look at the disk image.
- * hyper.c (get_hypermetadata): Moved firewall asserts
- here from pager_init.
-
-Thu Sep 22 11:28:46 1994 Michael I Bushnell <mib@churchy.gnu.ai.mit.edu>
-
- [This long series of changes deletes the DINODE, CG, SINDIR,
- and DINDIR pagers and adds a new pager type DISK.]
- * ufs.h (struct disknode) Removed DINLOCK, SINLOCK, and
- SININFO members. New member ALLOCPTRLOCK renamed from DATALOCK.
- Removed SINLOC, DINLOC, SINLOCLEN, and DINLOCLEN.
- (struct user_pager_info) [enum pager_type]: Removed types
- DINODE, CG, SINDIR and DINDIR; added type DISK.
- (dinpager, dinodepager, cgpager): Deleted vars.
- (diskpager): New var.
- (dinmaplock, sinmaplock, pagernplock): Deleted vars.
- (sblock_dirty, csum_dirty, cgs, dinodes): Deleted vars.
- (fsaddr): New macro.
- (dino, indir_block, cg_locate): New inline functions.
- (sync_disk_blocks, sync_dinode): New inline functions.
- (struct iblock_spec): New type.
- * pager.c (dinport, dinodeport, cgport, sinlist): Deleted vars.
- (filepagerlist): Renamed from filelist.
- (pagernplock): Deleted variable.
- (find_address): Removed switch; support only DISK and FILE_DATA.
- (pager_report_extent): Likewise.
- (pager_unlock_page): Removed switch. Return without comment for
- DISK; allocate indirect blocks as necessary right here for
- FILE_DATA.
- (sin_map, sin_remap, sin_unmap, din_map, din_unmap): Deleted
- functions.
- (indir_alloc, sync_dinode): Deleted functions.
- (enqueue_pager, dequeue_pager): Deleted functions.
- (diskfs_file_update): No longer lock pagernplock; nothing
- to do with sininfo.
- (drop_pager_softrefs): Likewise.
- (allow_pager_softrefs): Likewise.
- (diskfs_get_filemap): Put pager on filepagerlist right here
- instead of through pager_enqueue.
- (pager_clear_user_data): Likewise, mutatis mutandis.
- * main.c (main): Call create_disk_pager and then map the
- entire disk into disk_image.
- * hyper.c (get_hypermetadata): Use bcopy instead of dev_read_sync.
- (diskfs_set_hypermetadata): NOP out function.
- (copy_sblock): New function, substance of code is from old
- diskfs_set_hypermetadata.
- * inode.c (iget): Don't initialize deleted disknode fields.
- (diskfs_node_norefs): Don't verify that deleted disknode
- fields are not set.
- (read_disknode): Get dinode from DINO, not DINODES array.
- (write_node): Likewise.
- (create_symlink_hook): Likewise.
- (read_symlink_hook): Likewise.
- (diskfs_set_translator): Likewise.
- (diskfs_get_translator): Likewise.
- (diskfs_node_translated): Likewise.
- * alloc.c (ffs_realloccg): Likewise.
- (ffs_fragextend): Use cg_locate instead of cgs array.
- (ffs_alloccg): Likewise.
- (ffs_nodealloccg): Likewise.
- (ffs_blkfree): Likewise.
- (diskfs_free_node): Likewise.
- * inode.c (diskfs_set_translator): Use bcopy and sync_disk_blocks
- instead of dev_write_sync.
- (diskfs_get_translator): Likewise, mutatis mutandis.
- (read_disknode): Initialize NP->istranslated.
- (diskfs_set_translator): Set/clear NP->istranslated as appropriate.
- (diskfs_node_translated): Removed function.
- * bmap.c: New file.
-
- [This improves the RWLOCK mechanism and makes it more
- orthogonal. It should probably be moved into a library.]
- * ufs.h (struct rwlock): Added MASTER and WAKEUP members.
- (struct disknode): Removed RWLOCK_MASTER and RWLOCK_WAKEUP
- fields.
- (rwlock_reader_lock): Ommitted arg DN; use new MASTER and WAKEUP
- members inside LOCK instead.
- (rwlock_writer_lock): Likewise.
- (rwlock_reader_unlock): Likewise.
- (rwlock_init): Initialize new MASTER and WAKEUP fields.
- * inode.c (iget): Don't deal with RWLOCK_MASTER and RWLOCK_WAKEUP.
- * pager.c (find_address): Deleted arg DNP. Only pass one
- arg to rwlock functions.
- (pager_read_page): Deleted var DN; only pass one arg to rwlock
- functions.
- (pager_write_page): Likewise.
-
-Wed Sep 21 00:26:25 1994 Michael I Bushnell <mib@churchy.gnu.ai.mit.edu>
-
- * pager.c (allow_pager_softrefs): Unlock PAGERNPLOCK when
- we're done with it.
- (sin_map): Hold PAGERNPLOCK all the way until we're done
- with the sininfo pointer.
- (pagernplock): No longer static.
- * ufs.h (pagernplock): Declare here.
-
- * sizes.c (diskfs_grow): Don't call diskfs_file_update here.
- This was done to prevent too much dirty data from accumulating
- and then overwhelming the pager later. But that's really the
- pager's responsibility.
-
- * ufs.h (struct disknode): New members `dinloclen' and `sinloclen'.
- * inode.c (iget): Initialize DN->dinloclen and DN->sinloclen.
- (diskfs_node_norefs): Verify that DN->dinloclen and DN->sinloclen
- are both zero.
- * pager.c (find_address) [SINDIR]: Verify that reference is
- within bounds of NP->dn->dinloc.
- (pager_unlock_page) [SINDIR]: Likewise.
- (din_map): Set NP->dn->dinloclen.
- (din_unmap): Clear NP->dn->dinloclen.
- (find_address) [FILE_DATA]: Verify that reference is within
- bounds of NP->dn->sinloc.
- (pager_unlock_page) [FILE_DATE]: Likewise.
- (sin_map): Set NP->dn->sinloclen.
- (sin_remap): Reset NP->dn->sinloclen.
- (sin_unmap): Clean NP->dn->sinloclen.
-
- * pager.c (pager_write_page): Flush stdout after printf.
- (pager_unlock_page) [FILE_DATA]: Likewise.
-
- * sizes.c (diskfs_truncate): In all references to sinloc and
- dinloc arrays, verify that references are within allocated bounds.
- (diskfs_grow): Likewise.
- (sindir_drop): Likewise.
-
- * pager.c: Create new mapping with extent NEWSIZE, not SIZE (which
- was the old size of the mapping).
-
-Tue Sep 20 15:51:35 1994 Michael I Bushnell <mib@churchy.gnu.ai.mit.edu>
-
- * pager.c (pager_report_extent) [SINDIR]: Remove erroneous extra
- division by block size.
- (sin_remap): Likewise.
-
-Mon Sep 19 17:34:11 1994 Michael I Bushnell <mib@churchy.gnu.ai.mit.edu>
-
- * inode.c (create_symlink_hook): Write assert test correctly.
-
- * dir.c (diskfs_direnter) [EXTEND]: Reference file size only
- *once*; don't rely on the behavior if diskfs_grow vis a vis
- file size.
-
-Fri Sep 16 10:29:42 1994 Michael I Bushnell <mib@churchy.gnu.ai.mit.edu>
-
- * dir.c (dirscanblock): Compute offset correctly for mangled
- entry notice.
-
- * dir.c (diskfs_direnter) [EXTEND]: Reference file size only
- once before calling diskfs_grow in case diskfs_grow actually
- increases the size.
-
- * inode.c (diskfs_set_statfs): Set fsid from getpid.
- (read_disknode): Likewise.
-
- * dir.h (struct directory_entry): Renamed from struct direct.
- * dir.c: All uses of struct direct changed to use
- struct directory_entry.
- (diskfs_get_directs): New var `userp'. Copy from *ENTRYP into
- it (set at DATAP) more cleanly.
-
-Mon Sep 12 11:30:48 1994 Michael I Bushnell <mib@churchy.gnu.ai.mit.edu>
-
- * hyper.c (diskfs_set_hypermetadata): Don't frob clean and dirty
- bits if we are readonly.
-
-Sat Sep 10 11:41:06 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * main.c (main): When started up as a passive translator,
- open fds 0, 1, and 2 on /dev/console for debugging messages.
- Call diskfs_init_diskfs with no args; after warp_root, call
- diskfs_startup_diskfs on BOOTSTRAP. Compare BOOTSTRAP to
- MACH_PORT_NULL instead of zero.
-
-Fri Sep 9 13:02:33 1994 Michael I Bushnell <mib@churchy.gnu.ai.mit.edu>
-
- * main.c (trans_parse_args): Fix and enable.
-
-Tue Sep 6 11:29:55 1994 Michael I Bushnell <mib@churchy.gnu.ai.mit.edu>
-
- * inode.c (iget): Remove old assert test that checked for bad
- inode block allocations.
-
-Thu Sep 1 11:39:12 1994 Michael I Bushnell <mib@geech.gnu.ai.mit.edu>
-
- * tables.c: Don't include "ufs.h"; include <sys/types.h>. Then
- this file can be used unmodified by fsck.
-
-Tue Aug 30 13:36:37 1994 Michael I Bushnell <mib@geech.gnu.ai.mit.edu>
-
- * inode.c (diskfs_set_translator): ffs_blkfree doesn't have
- a return value.
-
-Mon Aug 29 12:49:17 1994 Michael I Bushnell <mib@geech.gnu.ai.mit.edu>
-
- * inode.c (diskfs_set_translator): If NAMELEN is zero, then
- make the node have no translator.
-
-Fri Aug 26 12:28:20 1994 Michael I Bushnell <mib@geech.gnu.ai.mit.edu>
-
- * inode.c (read_disknode): 4.4 fsck sometimes sets the author
- field to -1 to mean "ignore old uid location"; take that to mean
- "author == uid".
- (diskfs_set_translator): If we are allocating a new block for
- the translator, then account for it in st_blocks.
-
-Thu Aug 18 12:41:12 1994 Michael I Bushnell <mib@geech.gnu.ai.mit.edu>
-
- * Makefile (HURDLIBS): Use short version.
-
- * alloc.c (diskfs_alloc_node): Bother to set *NPP before
- returning.
-
-Tue Aug 16 10:48:04 1994 Michael I Bushnell <mib@geech.gnu.ai.mit.edu>
-
- * Makefile (LDFLAGS): New variable.
-
-Fri Aug 5 15:51:09 1994 Michael I Bushnell <mib@churchy.gnu.ai.mit.edu>
-
- * dir.c (diskfs_direnter) [EXTEND]: Crash if the entry won't
- fit in the new block.
- (diskfs_lookup): Return ENAMETOOLONG if the name is bigger than
- MAXNAMLEN.
-
- * dir.c (diskfs_get_directs): Set USERD->d_reclen correctly.
-
-Fri Jul 22 15:12:35 1994 Michael I Bushnell <mib@geech.gnu.ai.mit.edu>
-
- * Makefile: Rewritten in accord with new scheme.
-
-Wed Jul 20 13:28:38 1994 Michael I Bushnell <mib@geech.gnu.ai.mit.edu>
-
- * main.c (main): Don't set diskfs_dotdot_file.
-
-Tue Jul 19 21:51:54 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
-
- * ufs.h: Removed defns of u_quad_t, quad_t; now in <sys/types.h>.
- Removed defn of struct timespec; now in <sys/time.h>.
-
-Tue Jul 19 12:47:31 1994 Michael I Bushnell (mib@churchy.gnu.ai.mit.edu)
-
- * main.c (main): Deleted var `diskfs_dotdot_file'.
- (trans_parse_args): Don't set diskfs_dotdot_file; don't expect
- dotdot from fsys_getroot.
-
- * Makefile (LDFLAGS): Moved to rule for `ufs' and commented out.
- (ufs): Don't use variable $(link) anymore.
-
-Mon Jul 18 14:55:17 1994 Michael I Bushnell (mib@churchy.gnu.ai.mit.edu)
-
- * dir.c (diskfs_get_directs): Return data to user in old format.
- Add new code for new format, maintaining compatibility correctly,
- but comment it out until the library is ready.
-
- * hyper.c (diskfs_set_hypermetadata): If we presumed to
- set new values of fs_maxfilesize, fs_qbmask, and fs_qfmask,
- then restore the originals before writing out the superblock.
-
- * pager.c (diskfs_get_filemap): Test should be S_ISLNK, not
- S_ISSOCK.
-
- * hyper.c (get_hypermetadata): Set new constants in filesystems
- which don't have them yet.
- (get_hypermetadata): Cast MAXSYMLINKLEN to long to avoid
- converting sblock->fs_maxsymlinklen into an unsigned.
-
- * subr.c (scanc, skipc): New functions.
- (ffs_setblock): Use assert instead of panic.
-
- * inode.c (read_disknode): Set old stat structure until the header
- file gets changed.
-
-Fri Jul 15 12:07:15 1994 Michael I Bushnell (mib@churchy.gnu.ai.mit.edu)
-
- * sizes.c: Include <string.h> for bzero.
- * fs.h (blksize): Comment out dblksize macro. In blksize
- macro, use NP->allocsize instead of IP->i_size.
-
- * dinode.h (INDIR_SINGLE, INDIR_DOUBLE, INDIR_TRIPLE): New macros.
-
- * inode.c (read_disknode, write_node): Use new stat and dinode
- fields for times.
-
- * ufs.h: Change `nextgennumber' to be `u_long' instead of int.
- Change prototypes of some alloc.c functions.
- * alloc.c (ffs_alloc): Declare to return error_t.
- (ffs_realloccg): Likewise.
- (ffs_hashalloc, ffs_alloccg, ffs_fragextend, ffs_alloccg,
- ffs_dirpref, ffs_nodealloccg, ffs_allccgblk, ffs_mapsearch,
- ffs_clusteracct): Provide forward declarations.
- (ffs_realloccg): Use printf instead of log.
- Make BPREF volatile for setjmp safety.
- (diskfs_alloc_node): Use diskfs global variable instead of TIME.
- (ffs_nodealloccg): Likewise.
- (ffs_blkfree): Likewise.
- (diskfs_free_node): Likewise.
- (ffs_blkfree, ffs_clusteracct): Declare as void.
- (ffs_alloccg, ffs_nodealloccg): Declare as u_long.
-
- * ufs.h: Change prototypes of some subr.c functions.
- * subr.c (ffs_isblock): Use assert instead of panic.
- (ffs_clrblock): Likewise.
-
- * hyper.c: Include "dinode.h".
-
- * dinode.h (LINK_MAX): New macro, from BSD sys/sys/syslimits.h.
- * fs.h (MAXBSIZE, MAXFRAG): New macros, from BSD sys/sys/param.h.
-
- * hyper.c (get_hypermetadata): Provide first arg in call to
- fsbtodb.
- (diskfs_set_hypermetadata): Likewise.
- * inode.c (diskfs_set_translator): Likewise.
- (diskfs_get_translator): Likewise.
- * pager.c (find_address): Likewise.
- (indir_alloc): Likewise.
- * inode.c (iget): Provide first arg in call to lblkno.
- * sizes.c (diskfs_truncate): Likewise.
- * pager.c (find_address): Likewise.
- * sizes.c (diskfs_grow): Likewise.
- * inode.c (iget): Provide first arg in call to fragroundup.
- * sizes.c (diskfs_trucate): Likewise.
- * sizes.c (diskfs_grow): Likewise.
- * inode.c (iget): Provide first arg in call to blkroundup.
- * pager.c (pager_unlock_page): Likewise.
- * sizes.c (diskfs_truncate): Likewise.
- * sizes.c (diskfs_grow): Likewise.
- * pager.c (find_address): Provide first arg in call to cgtod.
- * pager.c (find_address): Provide first arg in call to cgimin.
- * pager.c (find_address): Provide first arg in call to blktofrags.
- * pager.c (find_address): Provide first arg in call to blkoff.
- * sizes.c (diskfs_truncate): Likewise.
- * sizes.c (diskfs_grow): Likewise.
- * sizes.c (diskfs_truncate): Provide first arg in call to blksize.
- * sizes.c (diskfs_grow): Likewise.
- * sizes.c (diskfs_truncate): Provide first arg in call to numfrags.
-
- * ufs.h: Added temporary declarations of `u_quad_t', `quad_t', and
- `struct timespec'.
-
- * pager.c (diskfs_get_filemap): Make sure that this is
- a kind of node that can be validly read.
-
- * inode.c (create_symlink_hook): Renamed from symlink_hook.
- (read_symlink_hook): New function.
- (diskfs_read_symlink_hook): Initialize.
-
-Thu Jul 14 12:23:45 1994 Michael I Bushnell (mib@churchy.gnu.ai.mit.edu)
-
- * alloc.c: New from 4.4 BSD; BSD version `8.8 2/21/94'.
- Remove old includes; include "ufs.h", "fs.h", "dinode.h",
- and <stdio.h>. Replace panics with asserts and comment out
- uprintfs. Use prototypes throughout. Replace calls
- to ffs_fserr with printf.
- (alloclock): New variable.
- (ffs_alloc): Variable struct inode *IP is now struct node *NP;
- refer to it appropriately. Initialize FS to sblock.
- Lock alloclock around actual allocation steps. Reverse order
- of BNP and CRED arguments; declare CRED as a protid and use
- accordingly. Permit CRED to be null.
- (ffs_realloccg): Variable struct inode *IP is now struct node *NP;
- refer to it accordingly. Comment out U*x buffer management code.
- Lock alloclock around actual allocation steps. Initialize FS
- from sblock. Declare CRED as a protid and use it accordingly.
- Change BUF arg to PBN (physical block number); return new block
- there.
- (ffs_reallocblks): Comment out.
- (diskfs_alloc_node): Renamed from ialloc. Initialize FS from
- sblock. Use calling sequence from <hurd/diskfs.h>. Acquire
- alloclock aroud actual allocation steps. Deleted vars
- `pip', `pvp' (use dir instead). Use iget instead of VFS_VGET.
- Var struct inode *IP now struct node *NP. Lock gennumberlock
- around frobbing of nextgennumber.
- (ffs_blkpref): Arg struct inode *ip is now struct node *np;
- refer to it accordingly. Initialize FS to sblock. Lock
- alloclock during actual work. Use csum instead of fs_cs macro.
- (ffs_hashalloc): Arg struct inode *IP is now struct node *NP;
- use it accordingly. Initialize FS from sblock.
- (ffs_fragextend): Arg struct inode *IP is now struct node *NP;
- use it accordingly. Initialize FS from sblock. Initialize
- CGP from cgs array; don't use bread. Comment out calls to brelse
- and bdwrite. Set CGP->time from diskfs global var. Use csum
- instead of fs_cs macro.
- (ffs_alloccg): Arg struct inode *IP is now struct node *NP.
- Initialize FS from sblock. Initialize CGP from cgs array;
- don't use bread. Comment out calls to brelse and bdwrite.
- Set CGP->time from diskfs global var. Use csum instead of
- fs_cs macro.
- (ffs_nodealloccg): Arg struct inode *IP is now struct node *NP.
- Initialize FS from sblock. Initialize CGP from cgs array;
- don't use bread. Comment out calls to brelse and bdwrite. Use
- csum instead of fs_cs macro.
- (ffs_blkfree): Arg struct inode *IP is now struct node *NP.
- Initialize FS from sblock. Initialize CGP from cgs array;
- don't use bread. Comment out calls to brelse and bdwrite. Use
- csum instead of fs_cs macro.
- (diskfs_free_node): Renamed from ffs_vfree. Use calling
- sequence from <hurd/diskfs.h>. Initialize FS from sblock.
- Deleted vars pip,pvp (use NP instead). Initialize CGP from
- cgs array; don't use bread. Comment out calls to brelse and
- bdwrite. Use csum instead of fs_cs macro.
- (ffs_fserr): Commented out.
- (ffs_dirpref): Use csum instead of fs_cs macro.
-
- * ufs.h (ffs_alloc): Renamed from alloc; all callers changed.
- (ffs_blkfree): New arg NP; renamed from blkfree; all callers changed.
- (ffs_blkpref): Renamed from blkpref; all callers changed.
- (ffs_realloocg): Rename from realloccg; all callers changed.
-
- * fs.h: New from 4.4 BSD; BSD version `8.7 4/19/94'.
- (fs_cs): Don't use fs_csp; use global csum instead.
-
- * subr.c: New from 4.4 BSD; BSD version `8.2 9/21/93'.
- Remove old includes. Include "ufs.h" and "fs.h".
- (ffs_blkatoff, ffs_checkoverlap): Comment out.
-
- * tables.c: New from 4.4 BSD; BSD version `8.1 6/11/93'.
- Don't include <param.h>; do include "ufs.h" and "fs.h".
-
- * dinode.h: New from 4.4 BSD; BSD version `8.3 1/21/94'.
- Remove oldids/inum union; replace with author.
- Renamed di_mode to be di_model; allocated di_modeh from spare.
- Allocate di_trans from spare.
- (di_inumber): Remove macro.
- * inode.c (read_disknode): Fetch uid and gid from new (long)
- fields in dinode unless we are the old inode format, in which
- case fetch them from the old fields.
- (write_node): Only set new uid and gid fields if we are not
- COMPAT_BSD4. Set old fields if the superblock says to.
- (symlink_hook): New function.
- (diskfs_create_symlink_hook): Initialize.
- * sizes.c (diskfs_truncate): Deal with truncation of short
- symlink properly.
-
- * dir.h: New from 4.4 BSD; BSD version `8.2 1/21/94'.
- Substitute our version of DIRSIZ which uses the namelen.
- Comment out declarations of struct dirtemplate and struct
- odirtemplate.
- (DIRECT_TYPE, DIRECT_NAMLEN): New macros.
- * ufs.h (direct_symlink_extension): New variable.
- * hyper.c (get_hypermetadata): Set direct_symlink_extension.
- * dir.c (dirscanblock): Use DIRECT_NAMLEN instead of d_namlen.
- (diskfs_direnter): Likewise.
- (diskfs_dirempty): Likewise.
- (diskfs_get_directs): Likewise.
- (diskfs_direnter): Set d_type field of new slot if
- direct_symlink_extension is set.
- (diskfs_dirrewrite): Likewise.
-
- * ufs.h (compat_mode): New variable.
- * main.c (main): Set compat_mode to zero if we are the bootstrap
- filesystem.
- * inode.c (diskfs_set_translator): Return error if compat_mode
- is set.
- (write_node): Don't set GNU dinode field extensions unless
- compat_mode is COMPAT_GNU.
-
-Mon Jul 11 18:14:26 1994 Michael I Bushnell (mib@churchy.gnu.ai.mit.edu)
-
- * dir.c (diskfs_get_directs): When copying entries into DATAP,
- set the d_reclen parameter of the copy to the minimum length
- (because that's all we use) rather than the size that it had
- in the directory itself.
-
-Wed Jul 6 14:41:48 1994 Michael I Bushnell (mib@churchy.gnu.ai.mit.edu)
-
- * dir.c (dirscanblock): In main loop, initialize PREVOFF
- to zero, not BLOCKADDR. Otherwise, the wrong value is
- stored into DS->prevoff and then diskfs_dirremove crashes.
-
-Tue Jul 5 14:07:38 1994 Michael I Bushnell (mib@churchy.gnu.ai.mit.edu)
-
- * dinode.h: Include <endian.h> before test of BYTE_ORDER.
-
- * Makefile (TAGSLIBS): New variable.
-
-Tue Jun 21 13:45:04 1994 Michael I Bushnell (mib@churchy.gnu.ai.mit.edu)
-
- * dir.c (diskfs_direnter): Update dirents of DP, not NP.
-
-Mon Jun 20 16:43:48 1994 Michael I Bushnell (mib@churchy.gnu.ai.mit.edu)
-
- * dir.c (diskfs_direnter) [case SHRINK]: NEW should be set to
- OLDNEEDED past DS->entry, not to the start of the next entry.
-
- * dir.c (diskfs_direnter) [case EXTEND]: Cast in assignment
- to NEW needs proper scope.
-
- * inode.c (diskfs_node_norefs): Free dirents list of structure
- being deallocated. Also add assert checks to make sure other
- state is already clean.
-
-Thu Jun 16 11:38:17 1994 Michael I Bushnell (mib@geech.gnu.ai.mit.edu)
-
- * dir.c (diskfs_dirempty): Map directory contents ourselves
- instead of using diskfs_node_rdwr.
- (struct dirstat): New structure to cache mapping between
- lookup and commit operation and avoid use of diskfs_node_rdwr.
- (diskfs_lookup): Map directory ourselves. Keep mapping in
- DS if DS is nonzero and we might use it in direnter, dirremove,
- or dirrewrite. Deallocate mapped buffer if we return some
- error (other than ENOENT), or if DS is zero, or if there is
- no possible commit operation to follow. When setting DS->stat
- to EXTEND, do it the new way.
- (dirscanblock): Changed BLKOFF to be virtual address of mapped
- block and renamed it BLKADDR. New arg IDX. Use mapped block
- instead of calling diskfs_node_rdwr. Set DS according to the new
- rules.
- (diskfs_direnter): Interpret new dirstat format.
- (diskfs_dirremove): Likewise.
- (diskfs_dirrewrite): Likewise.
- (diskfs_drop_dirstat): Deallocate cached mapping here.
-
- * dir.c (dirscanblock): When we find the node for type CREATE,
- invalidate DS by setting type to LOOKUP, not LOOKING.
-
- * dir.c (diskfs_direnter, diskfs_dirremove, diskfs_dirrewrite):
- Call diskfs_notice_dirchange when appropriate.
-
- * dir.c (diskfs_get_directs): Deal properly with case where
- BUFSIZ==0 and where NENTRIES==-1.
-
-Wed Jun 15 16:40:12 1994 Michael I Bushnell (mib@geech.gnu.ai.mit.edu)
-
- * main.c (main): Check device sector size and media size
- on startup.
-
-Tue Jun 14 14:41:17 1994 Michael I Bushnell (mib@geech.gnu.ai.mit.edu)
-
- * ufs.h (struct disknode) [dirents]: New member.
- * inode.c (iget): Initialize DN->dirents.
- * dir.c (diskfs_direnter, diskfs_dirremove): Keep track
- of dirents member.
- (dirscanblock): New var `nentries'; use it to count the
- number of directory entries in this block and set it if
- we end up scanning the entire block.
- (count_dirents): New function.
- (diskfs_get_directs): New function.
-
-Mon Jun 13 13:50:00 1994 Michael I Bushnell (mib@geech.gnu.ai.mit.edu)
-
- * ufs.h (sinmaplock, dinmaplock): New global vars.
- * inode.c (inode_init): Initialize sinmaplock and dinmaplock.
- * pager.c (find_address, pager_unlock_page): Protect use
- if dinloc array with dinmaplock.
- (din_map, din_unmap): Doc fix.
- (find_address, pager_unlock_page): Protect use of sinloc array
- with sinmaplock.
- (sin_map, sin_remap, sin_unmap): Doc fix.
- (pager_clear_user_data): Acquire sinmaplock and dinmaplock
- instead of NP->dn->datalock and NP->dn->sinlock respectively.
-
- * sizes.c (diskfs_truncate, diskfs_grow): Protect use of sinloc
- and sindir mapping functions with sinmaplock.
- (sindir_drop): Protect use of dinloc and dindir mapping functions
- with dinmaplock.
-
- * ufs.h (struct rwlock): New type.
- (struct disknode) [dinlock, sinlock, datalock]: Use read-write lock.
- Change comments so that these don't lock dinloc and sinloc anymore.
- [rwlock_master, rwlock_wakeup]: New members.
- (rwlock_reader_lock, rwlock_writer_lock, rwlock_reader_unlock,
- rwlock_writer_unlock, rwlock_init): New functions.
- * inode.c (iget): Initialize DN->rwlock_master and
- DN->rwlock_wakeup. Change initialization of DN->dinlock,
- DN->sinlock, and DN->datalock to use rwlock_init.
- * pager.c (find_address): Lock NP->dn->dinlock, NP->dn->sinlock,
- and NP->dn->datalock with rwlock_reader_lock. Change type of
- parameter NPLOCK to be a read-write lock. New parm DNP. Callers
- changed.
- (pager_read_page, pager_write_page): Change type of NPLOCK to be
- read-write lock; call rwlock_reader_unlock instead of
- mutex_unlock. New variable DN.
- (pager_unlock_page): Use rwlock_writer_lock to lock
- NP->dn->dinlock, NP->dn->sinlock, and NP->dn->datalock.
- * sizes.c (diskfs_truncate, diskfs_grow): Change locks of DATALOCK
- field to use rwlock_writer_{un,}lock.
- (sindir_drop): Ditto for SINLOCK field.
- (dindir_drop): Ditto for DINLOCK field.
-
-Mon Jun 6 19:23:26 1994 Michael I Bushnell (mib@churchy.gnu.ai.mit.edu)
-
- * sizes.c (diskfs_grow): After realloccg, zero new data (which I'm
- not sure is really necessary, but until I figure it out, this is
- safest). Also poke old data (the latter only if the block has
- moved)--otherwise the kernel won't know to page it out to the new
- location.
- (poke_pages): When poking, be careful not to actually change the data.
- LEN should be end - start, not start - end.
-
-Fri Jun 3 12:37:27 1994 Michael I Bushnell (mib@churchy.gnu.ai.mit.edu)
-
- * inode.c (iget): When we find the node in the table, acquire the
- mutex *after* incrementing NP->references and unlocking
- diskfs_node_refcnt_lock; otherwise we can deadlock against
- diskfs_nput.
-
-Thu Jun 2 12:16:09 1994 Michael I Bushnell (mib@churchy.gnu.ai.mit.edu)
-
- * ufs.h (sblock_dirty, csum_dirty, alloclock): New global variables.
- * alloc.c (alloclock): Remove static keyword..
- * alloc.c (realloccg): Set sblock_dirty after changing sblock.
- (blkpref): Likewise.
- (fragextend): Likewise.
- (alloccg): Likewise.
- (alloccgblk): Likewise.
- (ialloccg): Likewise.
- (blkfree): Likewise.
- (diskfs_free_node): Likewise.
- * hyper.c (diskfs_set_hypermetadata): Likewise.
- * alloc.c (fragextend): Set csum_dirty after changi csum.
- (alloccg): Likewise.
- (alloccgblk): Likewise.
- (ialloccg): Likewise.
- (blkfree): Likewise.
- (diskfs_free_node): Likewise.
- * hyper.c (diskfs_set_hypermetadata): Acquire alloclock while
- writing hypermetadata. Only write csum and sblock if
- csum_dirty or sblock_dirty, respectively, is set, and then
- clear it after starting the write.
-
- * main.c (main): Likewise.
-
- * sizes.c (diskfs_truncate): Don't turn off caching; the new
- light reference system takes care of this.
- * pager.c (diskfs_get_filemap): No longer necessary to turn
- on caching here, because truncate no longer turns it off.
-
- * inode.c (diskfs_lost_hardrefs, diskfs_new_hardrefs): New functions.
- * pager.c (drop_pager_softrefs, allow_pager_softrefs): New functions.
- (sin_map): Use diskfs_nref_light, not diskfs_nref.
- (diskfs_get_filemap): Use diskfs_nref_light, not diskfs_nref.
- (pager_clear_user_data): Use diskfs_nrele_light, not diskfs_nrele.
- * ufs.h (drop_pager_softrefs, allow_pager_softrefs): New
- declarations.
-
-Wed Jun 1 13:35:11 1994 Michael I Bushnell (mib@churchy.gnu.ai.mit.edu)
-
- * sizes.c (diskfs_truncate): After calling sin_unmap, turn
- off caching on the sininfo pager so that it gets freed promptly
- (there's generally no value in keeping it around because there
- is no live fileinfo pager).
- * pager.c (diskfs_get_filemap): Make sure we turn caching back on
- here, however, if we start using the file pager.
-
- * pager.c (sin_map): When np->dn->sininfo is set, we have
- to insert a valid send right after fetching the receive name.
-
- * pager.c (sin_unmap, din_unmap): New functions.
- (pager_clear_user_data): Call sin_unmap and din_unmap
- instead of doing it right here.
-
- * sizes.c (diskfs_truncate): Call sin_unmap instead of
- doing it right here.
- (sindir_drop): Call din_unmap instead of doing it right
- here. Also, call it always, not just when wo do dindir_drop.
-
- * sizes.c (diskfs_grow): After alloc into sindir area,
- unmap it if we don't have an active data pager.
- * ufs.h (sin_unmap, din_unmap): New declarations.
-
- * sizes.c (diskfs_grow): In computing OSIZE in the realloc
- case of lbn < NDADDR, deal correctly with the case where
- np->allocsize is already an integral number of blocks.
-
- * sizes.c (diskfs_grow): Compute SIZE correctly.
-
- * alloc.c (alloc, realloccg, blkfree): When checking validity
- of size arguments, also make sure the size isn't zero.
-
- * alloc.c (diskfs_alloc_node): Lock ALLOCLOCK before checking
- sblock->fs_cstotal.cs_nifree.
-
-Tue May 31 18:47:42 1994 Roland McGrath (roland@geech.gnu.ai.mit.edu)
-
- * ufs.h (DONT_CACHE_MEMORY_OBJECTS): Define it.
-
- * dir.c (diskfs_direnter: case TAKE): Assert that OLD->d_reclen >=
- NEEDED, not that it is strictly >.
-
-Tue May 31 11:10:28 1994 Michael I Bushnell (mib@churchy.gnu.ai.mit.edu)
-
- * sizes.c (diskfs_grow): Call diskfs_node_update (but don't wait)
- after successful completion to prevent old data from hanging around
- too long and getting flushed all at once from the kernel.
-
- * sizes.c (diskfs_grow): Change SIZE to be the size of the last
- block allocated. Delete variable NSIZE; use SIZE instead.
-
-Fri May 27 13:15:26 1994 Michael I Bushnell (mib@geech.gnu.ai.mit.edu)
-
- * sizes.c (diskfs_truncate): Set NP->dn_stat_dirty after each
- modification of NP->dn_stat.
-
- * sizes.c (diskfs_truncate): Compute new value of NP->allocsize
- correctly.
-
- * inode.c (iget): Set NP->allocsize to be the *actual* allocsize.
-
-Thu May 26 11:51:45 1994 Michael I Bushnell (mib@churchy.gnu.ai.mit.edu)
-
- * sizes.c (diskfs_truncate): In blkfree loop of blocks past
- NDADDR, subtract NDADDR from idx to index correctly into
- sinloc array. Start this loop with idx not less than NDADDR.
- (diskfs_truncate): If olastblock == NDADDR, then we also
- need to truncate blocks (one) mapped by single indirect blocks.
- (diskfs_truncate): New variable `first2free'. Use in place
- of older losing calculations involving lastblock.
- (sindir_drop): Rename parameters to be FIRST and LAST. Change
- interpretation of FIRST by one to correspond with changed call
- in diskfs_truncate.
-
- * pager.c (sin_remap): When computing NEWSIZE, round up to
- a page boundary, thus mimicing the SINDIR computation in
- pager_report_extent properly.
-
- * pager.c (pager_unlock_page) [case SINDIR; vblkno == 0]: Read
- from ....di_ib[INDIR_SINGLE] rather than invalid data before
- NP->dn->dinloc.
-
- * alloc.c (alloc) [nospace]: Unlock alloclock.
- (realloccg): Unlock alloclock before jumping to nospace.
- (blkpref) [!(lbn < NDADDR)]: Unlock alloclock before returning
- success.
-
- * sizes.c (diskfs_grow): When allocing a block past NDADDR, the
- tbl arg to blkpref is the table of direct block pointers
- NP->dn->sinloc, not the table of indirect block pointers
- ...->di_ib.
-
- * sizes.c (diskfs_grow): When writing into the SINDIR area, call
- sin_map instead of sin_remap if the sindir isn't already mapped.
- Also set np->allocsize *before* calling sin_map, but *after*
- calling sin_remap, to meet the requirements of those separate
- routines.
-
- * sizes.c (diskfs_grow): If END isn't bigger than NP->allocsize,
- then don't try and do anything. In computation of LBN and the
- first use of NB, round up to block boundary correctly. Don't
- attempt to realloc an old block if the size is 0 (in which case
- NB is -1 and unsigned comparison rules might foul things up).
-
-Mon May 23 13:18:33 1994 Michael I Bushnell (mib@churchy.gnu.ai.mit.edu)
-
- * Makefile (ufs): Give -n in the proper order to rsh.
-
- * main.c: Include <hurd/startup.h>.
-
- * ufs.h (DONT_CACHE_MEMORY_OBJECTS): New compilation flag.
- * pager.c (pager_report_attributes): Deleted function.
- (MAY_CACHE): New macro; more useful form for using
- DONT_CACHE_MEMORY_OBJECTS.
- (sin_map, pager_init, diskfs_get_filemap): Provide new
- args in calls to pager_create.
- * sizes.c (MAY_CACHE): New macro; more useful form for
- using DONT_CACHE_MEMORY_OBJECTS.
- (diskfs_truncate): Use MAY_CACHE in calls to pager_change_attributes.
-
-Fri May 20 18:52:41 1994 Michael I Bushnell (mib@geech.gnu.ai.mit.edu)
-
- * sizes.c (diskfs_truncate): Force any delayed copies of the
- vanishing region to be taken immediately before stopping, and
- prevent any new delayed copies from being made until we are done
- manipulating things.
- (poke_pages): New function.
- * pager.c (pager_report_attributes): New function.
-
-Wed May 18 15:51:40 1994 Michael I Bushnell (mib@churchy.gnu.ai.mit.edu)
-
- * alloc.c (alloc, realloccg, diskfs_alloc_node, alloccgblk,
- blkfree, diskfs_free_node, mapsearch): Added helpful strings to
- asserts.
- (realloccg): Split up assert.
-
-Tue May 17 13:26:22 1994 Michael I Bushnell (mib@churchy.gnu.ai.mit.edu)
-
- * main.c (main): Delete unused variable PROC.
-
-Mon May 16 15:32:07 1994 Michael I Bushnell (mib@churchy.gnu.ai.mit.edu)
-
- * alloc.c (realloccg): When fragextend succeeds, bother to set
- *PBN.
-
- * sizes.c (diskfs_grow): In fragment growth case, NSIZE should
- not be the amount to hold SIZE (SIZE is the amount the file is
- growing by), but rather the old size of the fragment plus the
- SIZE.
-
- * dir.c (diskfs_direnter case COMPRESS): Rewrite loop to deal
- properly with the case where from and to overlap.
-
-Mon May 9 16:51:44 1994 Michael I Bushnell (mib@geech.gnu.ai.mit.edu)
-
- * main.c (ufs_version): New variable.
- (save_argv): New variable.
- (main): Set save_argv.
- (diskfs_init_completed): New function.
-
-Thu May 5 19:06:54 1994 Michael I Bushnell (mib@geech.gnu.ai.mit.edu)
-
- * Makefile (exec_server_image.o): Use -n when calling rsh.
-
-Thu May 5 07:39:38 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
-
- * Makefile ($(OBJS)): Use $(includedir) instead of $(headers) in deps.
diff --git a/ufs/alloc.c b/ufs/alloc.c
index 48ee60cc..d8f92255 100644
--- a/ufs/alloc.c
+++ b/ufs/alloc.c
@@ -215,7 +215,7 @@ release_cg (struct cg *cgp)
* 3) allocate a block in the same cylinder group.
* 4) quadradically rehash into other cylinder groups, until an
* available block is located.
- * If no block preference is given the following heirarchy is used
+ * If no block preference is given the following hierarchy is used
* to allocate a block:
* 1) allocate a block in the cylinder group that contains the
* inode for the file.
@@ -472,7 +472,7 @@ nospace:
* logical blocks to be made contiguous is given. The allocator attempts
* to find a range of sequential blocks starting as close as possible to
* an fs_rotdelay offset from the end of the allocation for the logical
- * block immediately preceeding the current range. If successful, the
+ * block immediately preceding the current range. If successful, the
* physical block numbers in the buffer pointers and in the inode are
* changed to reflect the new allocation. If unsuccessful, the allocation
* is left unchanged. The success in doing the reallocation is returned.
@@ -638,7 +638,7 @@ fail:
* 2) allocate an inode in the same cylinder group.
* 3) quadradically rehash into other cylinder groups, until an
* available inode is located.
- * If no inode preference is given the following heirarchy is used
+ * If no inode preference is given the following hierarchy is used
* to allocate an inode:
* 1) allocate an inode in cylinder group 0.
* 2) quadradically rehash into other cylinder groups, until an
diff --git a/ufs/dir.c b/ufs/dir.c
index 83b30e72..3c5f152a 100644
--- a/ufs/dir.c
+++ b/ufs/dir.c
@@ -1,5 +1,7 @@
/* Directory management routines
- Copyright (C) 1994,95,96,97,98,99,2000,02 Free Software Foundation, Inc.
+
+ Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2002, 2007
+ Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
@@ -162,8 +164,7 @@ diskfs_lookup_hard (struct node *dp, const char *name, enum lookup_type type,
inum = 0;
- if (!diskfs_check_readonly ())
- dp->dn_set_atime = 1;
+ diskfs_set_node_atime (dp);
/* Start the lookup at DP->dn->dir_idx. */
idx = dp->dn->dir_idx;
@@ -200,8 +201,7 @@ diskfs_lookup_hard (struct node *dp, const char *name, enum lookup_type type,
}
}
- if (!diskfs_check_readonly ())
- dp->dn_set_atime = 1;
+ diskfs_set_node_atime (dp);
if (diskfs_synchronous)
diskfs_node_update (dp, 1);
@@ -664,7 +664,7 @@ diskfs_direnter_hard(struct node *dp,
/* Following a lookup call for REMOVE, this removes the link from the
directory. DP is the directory being changed and DS is the cached
information returned from lookup. This call is only valid if the
- directory has been locked continously since the call to lookup, and
+ directory has been locked continuously since the call to lookup, and
only if that call succeeded. */
error_t
diskfs_dirremove_hard(struct node *dp,
@@ -752,8 +752,7 @@ diskfs_dirempty(struct node *dp,
mach_port_deallocate (mach_task_self (), memobj);
assert (!err);
- if (!diskfs_check_readonly ())
- dp->dn_set_atime = 1;
+ diskfs_set_node_atime (dp);
for (curoff = buf;
curoff < buf + dp->dn_stat.st_size;
@@ -768,15 +767,13 @@ diskfs_dirempty(struct node *dp,
&& entry->d_name[1] != '\0')))
{
munmap ((caddr_t) buf, dp->dn_stat.st_size);
- if (!diskfs_check_readonly ())
- dp->dn_set_atime = 1;
+ diskfs_set_node_atime (dp);
if (diskfs_synchronous)
diskfs_node_update (dp, 1);
return 0;
}
}
- if (!diskfs_check_readonly ())
- dp->dn_set_atime = 1;
+ diskfs_set_node_atime (dp);
if (diskfs_synchronous)
diskfs_node_update (dp, 1);
munmap ((caddr_t) buf, dp->dn_stat.st_size);
diff --git a/ufs/inode.c b/ufs/inode.c
index a8bb661f..77a45edb 100644
--- a/ufs/inode.c
+++ b/ufs/inode.c
@@ -1,5 +1,7 @@
/* Inode management routines
- Copyright (C) 1994,95,96,97,98,2000,01,02 Free Software Foundation, Inc.
+
+ Copyright (C) 1994, 1995, 1996, 1997, 1998, 2000, 2001, 2002, 2007
+ Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
@@ -179,7 +181,7 @@ diskfs_lost_hardrefs (struct node *np)
spin_unlock (&_libports_portrefcntlock);
/* Right now the node is locked with no hard refs;
- this is an anomolous situation. Before messing with
+ this is an anomalous situation. Before messing with
the reference count on the file pager, we have to
give ourselves a reference back so that we are really
allowed to hold the lock. Then we can do the
@@ -231,18 +233,12 @@ read_disknode (struct node *np)
| (di->di_trans ? S_IPTRANS : 0));
st->st_nlink = read_disk_entry (di->di_nlink);
st->st_size = read_disk_entry (di->di_size);
-#ifdef notyet
- st->st_atimespec = di->di_atime;
- st->st_mtimespec = di->di_mtime;
- st->st_ctimespec = di->di_ctime;
-#else
- st->st_atime = read_disk_entry (di->di_atime.tv_sec);
- st->st_atime_usec = read_disk_entry (di->di_atime.tv_nsec) / 1000;
- st->st_mtime = read_disk_entry (di->di_mtime.tv_sec);
- st->st_mtime_usec = read_disk_entry (di->di_mtime.tv_nsec) / 1000;
- st->st_ctime = read_disk_entry (di->di_ctime.tv_sec);
- st->st_ctime_usec = read_disk_entry (di->di_ctime.tv_nsec) / 1000;
-#endif
+ st->st_atim.tv_sec = read_disk_entry (di->di_atime.tv_sec);
+ st->st_atim.tv_nsec = read_disk_entry (di->di_atime.tv_nsec);
+ st->st_mtim.tv_sec = read_disk_entry (di->di_mtime.tv_sec);
+ st->st_mtim.tv_nsec = read_disk_entry (di->di_mtime.tv_nsec);
+ st->st_ctim.tv_sec = read_disk_entry (di->di_ctime.tv_sec);
+ st->st_ctim.tv_nsec = read_disk_entry (di->di_ctime.tv_nsec);
st->st_blksize = sblock->fs_bsize;
st->st_blocks = read_disk_entry (di->di_blocks);
st->st_flags = read_disk_entry (di->di_flags);
@@ -357,18 +353,12 @@ write_node (struct node *np)
write_disk_entry (di->di_nlink, st->st_nlink);
write_disk_entry (di->di_size, st->st_size);
-#ifdef notyet
- di->di_atime = st->st_atimespec;
- di->di_mtime = st->st_mtimespec;
- di->di_ctime = st->st_ctimespec;
-#else
- write_disk_entry (di->di_atime.tv_sec, st->st_atime);
- write_disk_entry (di->di_atime.tv_nsec, st->st_atime_usec * 1000);
- write_disk_entry (di->di_mtime.tv_sec, st->st_mtime);
- write_disk_entry (di->di_mtime.tv_nsec, st->st_mtime_usec * 1000);
- write_disk_entry (di->di_ctime.tv_sec, st->st_ctime);
- write_disk_entry (di->di_ctime.tv_nsec, st->st_ctime_usec * 1000);
-#endif
+ write_disk_entry (di->di_atime.tv_sec, st->st_atim.tv_sec);
+ write_disk_entry (di->di_atime.tv_nsec, st->st_atim.tv_nsec);
+ write_disk_entry (di->di_mtime.tv_sec, st->st_mtim.tv_sec);
+ write_disk_entry (di->di_mtime.tv_nsec, st->st_mtim.tv_nsec);
+ write_disk_entry (di->di_ctime.tv_sec, st->st_ctim.tv_sec);
+ write_disk_entry (di->di_ctime.tv_nsec, st->st_ctim.tv_nsec);
write_disk_entry (di->di_blocks, st->st_blocks);
write_disk_entry (di->di_flags, st->st_flags);
@@ -431,8 +421,7 @@ read_symlink_hook (struct node *np,
bcopy ((dino (np->dn->number))->di_shortlink, buf, np->dn_stat.st_size);
- if (! diskfs_check_readonly ())
- np->dn_set_atime = 1;
+ diskfs_set_node_atime (np);
diskfs_end_catch_exception ();
return 0;
diff --git a/usermux/ChangeLog b/usermux/ChangeLog
deleted file mode 100644
index 28feeced..00000000
--- a/usermux/ChangeLog
+++ /dev/null
@@ -1,61 +0,0 @@
-2004-10-23 Marcus Brinkmann <marcus@gnu.org>
-
- * usermux-xinl.c (__OPTIMIZE__): Define to 1 instead of nothing.
-
-2002-05-13 Roland McGrath <roland@frob.com>
-
- * mux.c (netfs_attempt_chmod): Handle MODE arg with no S_IFMT bits set.
-
- * leaf.c (create_user_node): Set NEW->nn_translated appropriately.
- * usermux.c (main): Set netfs_root_node->nn_translated to zero.
-
-2002-05-13 Marcus Brinkmann <marcus@gnu.org>
-
- * usermux.c (netfs_server_name, netfs_server_version): New
- variables.
-
-2001-02-12 Marcus Brinkmann <marcus@gnu.org>
-
- * usermux.c (options): Include <version.h>. Add global variable
- ARGP_PROGRAM_VERSION. Add period to DOC.
-
-2000-07-26 Mark Kettenis <kettenis@gnu.org>
-
- * Makefile (HURDLIBS): Reorder libs such that the threads lib
- comes before the ports lib. This makes sure the functions in
- libthreads properly override the stubs in libports with the new
- dynamic linker semantics in glibc 2.2.
-
-2000-07-18 Thomas Bushnell, BSG <tb@mit.edu>
-
- * mux.c (free_name): Fix typo in comment.
- * usermux.c: Likewise.
- * usermux.h: Likewise
- (struct usermux): Likewise.
-
-1999-07-10 Roland McGrath <roland@baalperazim.frob.com>
-
- * mux.c: Add #include <sys/mman.h> for munmap decl.
-
-1999-07-09 Thomas Bushnell, BSG <tb@mit.edu>
-
- * mux.c (get_dirents): Use mmap instead of vm_allocate.
- (netfs_get_dirents): Likewise.
-
-1999-07-03 Thomas Bushnell, BSG <tb@mit.edu>
-
- * mux.c (get_dirents): Use munmap instead of vm_deallocate.
- (netfs_get_dirents): Likewise.
-
-1999-02-28 Roland McGrath <roland@baalperazim.frob.com>
-
- * node.c (netfs_attempt_utimes): Fix typo in last change.
-
-Sun Jan 31 18:41:17 1999 Thomas Bushnell, BSG <tb@mit.edu>
-
- * node.c (netfs_attempt_utimes): Handle new possibility that ATIME
- or MTIME might be null.
-
-1998-10-20 Roland McGrath <roland@baalperazim.frob.com>
-
- * mux.c (get_dirents): Add braces to silence gcc warning.
diff --git a/usermux/mux.c b/usermux/mux.c
index 722ba2ec..12da1e14 100644
--- a/usermux/mux.c
+++ b/usermux/mux.c
@@ -1,6 +1,7 @@
/* Root usermux node
- Copyright (C) 1997,98,99,2000,02 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1998, 1999, 2000, 2002, 2008
+ Free Software Foundation, Inc.
Written by Miles Bader <miles@gnu.org>
This file is part of the GNU Hurd.
@@ -384,10 +385,14 @@ lookup_user (struct usermux *mux, const char *user, struct node **node)
if (was_cached)
return 0;
- else if (getpwnam_r (user, &_pw, pwent_data, sizeof pwent_data, &pw) == 0)
- return lookup_pwent (mux, user, pw, node);
- else
- return ENOENT;
+ else
+ {
+ if (getpwnam_r (user, &_pw, pwent_data, sizeof pwent_data, &pw))
+ return ENOENT;
+ if (pw == NULL)
+ return ENOENT;
+ return lookup_pwent (mux, user, pw, node);
+ }
}
/* This should sync the entire remote filesystem. If WAIT is set, return
diff --git a/usermux/node.c b/usermux/node.c
index 47fccf67..f4a5f7d7 100644
--- a/usermux/node.c
+++ b/usermux/node.c
@@ -1,7 +1,9 @@
/* General fs node functions
- Copyright (C) 1997, 1999 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1999, 2007 Free Software Foundation, Inc.
+
Written by Miles Bader <miles@gnu.ai.mit.edu>
+
This file is part of the GNU Hurd.
The GNU Hurd is free software; you can redistribute it and/or
@@ -79,18 +81,12 @@ netfs_attempt_utimes (struct iouser *cred, struct node *node,
if (! err)
{
if (mtime)
- {
- node->nn_stat.st_mtime = mtime->tv_sec;
- node->nn_stat.st_mtime_usec = mtime->tv_nsec / 1000;
- }
+ node->nn_stat.st_mtim = *mtime;
else
flags |= TOUCH_MTIME;
if (atime)
- {
- node->nn_stat.st_atime = atime->tv_sec;
- node->nn_stat.st_atime_usec = atime->tv_nsec / 1000;
- }
+ node->nn_stat.st_atim = *atime;
else
flags |= TOUCH_ATIME;
diff --git a/utils/ChangeLog b/utils/ChangeLog
deleted file mode 100644
index 86883d70..00000000
--- a/utils/ChangeLog
+++ /dev/null
@@ -1,2180 +0,0 @@
-2006-11-27 Ben Asselstine <benasselstine@canada.com>
- Thomas Schwinge <tschwinge@gnu.org>
-
- [task #5994 --- ``rpctrace: Consider PREFIX/shared/msgids/*.msgids by
- default'']
- * rpctrace.c: Include <stdbool.h> and <argz.h>.
- (scan_msgids_dir): New function, factored out of the <case 'I'> code,
- with the change of not directly parsing the files, but instead adding
- them to an argz vector.
- (STD_MSGIDS_DIR): New definition.
- (options): Add new `--nostdinc' option.
- (main): Handle that new option. Utilize an argz vector. Include the
- files in STD_MSGIDS_DIR unless prohibited by the new option.
- * Makefile (rpctrace-CPPFLAGS): New variable.
-
-2006-07-24 Ben Asselstine <benasselstine@canada.com>
-
- [bug #17135]
- * psout.c (psout): Exit returning `1' if there aren't any applicable
- processes.
-
-2006-03-15 Thomas Schwinge <tschwinge@gnu.org>
-
- * ps.c (current_tty_name): Don't declare as static.
- * rpctrace.c (print_contents): Don't use ?: as a lvalue.
- (msgids_file_p): Don't declare as static.
-
-2005-07-26 Alfred M. Szmidt <ams@gnu.org>
-
- * rpctrace.c: Include <fnmatch.h>, <sys/stat.h>, and <dirent.h>.
- (main, options): Renamed the option `-I' to `-i', and
- reimplemented `-I' to search a given directory for message ID
- files.
- (main): Variable `err' removed.
-
-2004-09-21 Alfred M. Szmidt <ams@kemisten.nu>
-
- * fsysopts.c (doc): Changed `--remount' to `--update'.
-
- * mount.c (argp_opts): Enabled never-enabled options and added
- long versions: --verbose/-v, --remount/--update/-u,
- --writable/-w, --readonly/-r and --options/-o. Reported by
- Ben Asselstine.
-
- * mount.c (parse_opt): For -u, use "update" instead of the deprecated
- "remount" argument.
-
-2004-03-09 Marcus Brinkmann <marcus@gnu.org>
-
- * login.c (main): Remove extern declaration and invocation of
- _argp_unlock_xxx.
-
-2004-03-14 Marcus Brinkmann <marcus@gnu.org>
-
- * storeread.c (main): Call argp_usage if store is not set at
- ARGP_KEY_END.
-
-2003-08-17 Marcus Brinkmann <marcus@gnu.org>
-
- * rpctrace.c: Include <stddef.h>.
- (struct traced_info): Change type of LOCP to hurd_ihash_locp_t.
- (msgid_ihash): Change type to struct hurd_ihash, and initialize
- with HURD_IHASH_INITIALIZER, don't set cleanup here.
- (traced_names): Likewise.
- (main): Call hurd_ihash_set_cleanup for msgid_ihash. Don't create
- traced_names.
- (parse_msgid_list): Call hurd_ihash_add instead ihash_add.
- (new_send_wrapper): Likewise.
- (msgid_info): Likewise. Call hurd_ihash_find instead ihash_find.
- (rewrite_right): Likewise.
- (traced_dropweak): Call hurd_ihash_locp_remove instead
- ihash_locp_remove.
-
-2003-10-26 Roland McGrath <roland@frob.com>
-
- * storeread.c (doc, arg_doc): Make arrays, not pointers; make const.
- (doc): Add leading short description line before \v.
-
- * rpctrace.c (docs, args_doc): Make arrays, not pointers.
- (doc): Remove "\v.". Reported by Alfred M. Szmidt <ams@kemisten.nu>.
-
-2002-06-16 James A. Morrison <ja2morri@uwaterloo.ca>
-
- * vmstat.c (vm_state_refresh): Use memset instead of bzero.
- (main): Likewise.
-
-2002-09-17 Marcus Brinkmann <marcus@gnu.org>
-
- * console-ncurses.c: File removed (the ncursesw console client is
- now a driver in the console-client).
- * Makefile: Revert 2002-08-22 change:
- Do not include`../config.make'.
- (targets) [LIBNCURSES]: Removed.
- (SRCS) [LIBNCURSES]: Likewise.
- (HURDLIBS) [LIBNCURSES]: Likewise.
- (console-ncurses): Target removed.
- (console-ncurses-CPPFLAGS): Removed.
- (console-ncurses-LDLIBS): Likewise.
-
-2002-09-09 Marcus Brinkmann <marcus@gnu.org>
-
- * console-ncurses.c (cons_vcons_set_scroll_lock): New function.
-
- * console-ncurses.c (console_switch): Keep a reference to the port
- instead refering to it by number.
-
- * console-ncurses.c: New global variable global_lock.
- (main): Initialize global_lock.
- (cons_vcons_activate): Removed.
- (console_switch): New function.
- (cons_vcons_add): New function.
- (input_loop): Call console_switch, not cons_switch. Do not take
- active_vcons lock but global_lock.
- (cons_vcons_update): Take global lock.
- (cons_vcons_set_cursor_pos): Likewise.
- (cons_vcons_set_cursor_status): Likewise.
- (cons_vcons_scroll): Likewise.
- (cons_vcons_write): Likewise.
- (cons_vcons_beep): Likewise.
- (cons_vcons_flash): Likewise.
-
-2002-08-29 Marcus Brinkmann <marcus@gnu.org>
-
- * console-ncurses.c (main): Call endwin () before bailing out
- because of an error.
- (cons_vcons_write): Use getyx and wmove on stdscr instead getsyx
- and setsyx (which operate on newscr, and mess up the cursor
- anyway, probably because we don't commit the change immediately).
- Submitted by David Walter <dwalter@syr.edu>.
-
-2002-08-22 Marcus Brinkmann <marcus@gnu.org>
-
- * Makefile: Include `../config.make' early on to get LIBNCURSESW
- variable from configure before including Makeconf.
- (targets) [LIBNCURSES]: Add console-ncurses.
- (SRCS) [LIBNCURSES]: Add console-ncurses.c.
- (HURDLIBS) [LIBNCURSES]: Add cons.
- (console-ncurses): New target.
- (console-ncurses-CPPFLAGS): New variable.
- (console-ncurses-LDLIBS): Likewise.
-
-2002-08-18 Roland McGrath <roland@frob.com>
-
- * fakeroot.sh: Dont use "exec" command, since the original script
- does not and some users use sh syntax here and not just commands.
-
-2002-06-25 Roland McGrath <roland@frob.com>
-
- * ping.c: File removed.
- * Makefile (targets, SRCS): Remove it.
- (ping-CPPFLAGS, INSTALL-ping-ops, ping): And all its little friends.
-
-2002-06-14 Roland McGrath <roland@frob.com>
-
- * Makefile (INSTALL-vminfo-ops): Variable removed (no setuid).
-
- * vmstat.c (ensure_def_pager_info): If get_privileged_ports fails with
- EPERM, try to open /servers/default-pager instead.
- * Makefile (INSTALL-vmstat-ops): Variable removed (no setuid).
-
-2002-06-13 Roland McGrath <roland@frob.com>
-
- * vminfo.c: Use `z' modifier format modifier for address/size values.
-
-2002-06-08 Roland McGrath <roland@frob.com>
-
- * ftpdir.c (pdirent): Use %lld format for off_t value.
-
-2002-05-28 Roland McGrath <roland@frob.com>
-
- * fakeauth.c (idvec_copyout): Fix argument type.
-
- * rpctrace.c (print_data): Use if instead of switch to handle FP type
- sizes, in case double == long double.
-
- * storeinfo.c (print_store): Use %z format.
-
- * pids.c (add_fn_pids): unsigned -> size_t
- * w.c (add_utmp_procs): Likewise.
- * login.c (add_canonical_host): Likewise.
- * ps.c (main): Likewise.
- * login.c (add_entry, main): Likewise.
- * settrans.c (main): int -> size_t
- * showtrans.c (main): Likewise.
- * fsysopts.c (main): Likewise.
- * vmstat.c (main): Use int for FWIDTHS.
- * ping.c (main): size_t -> socklen_t
- * fakeauth.c (S_auth_getids, S_auth_makeauth,
- S_auth_server_authenticate): u_int -> size_t
- * showtrans.c (main): Cast field width/precision args to int.
-
-2002-05-20 Ognyan Kulev <ogi@fmi.uni-sofia.bg>
-
- * rpctrace.c (parse_msgid_list): Fixed the check that tests if we
- read exactly 3 fields from each line.
-
-2002-05-13 Marcus Brinkmann <marcus@gnu.org>
-
- * fakeauth.c (main): Register NEWTASK as a child with the proc
- server.
-
-2002-05-13 Marcus Brinkmann <marcus@gnu.org>
-
- * devprobe.c: Include <version.h>.
- (argp_program_version): New variable.
- * storecat.c: Include <version.h>.
- (argp_program_version): New variable.
- * storeread.c: Include <version.h>.
- (argp_program_version): New variable.
- * gcore.c: Include <version.h>.
- (argp_program_version): New variable.
-
-2002-05-12 Roland McGrath <roland@frob.com>
-
- * fakeroot.sh: Inside the chroot'd fakeauth environment,
- run a shell that chdir's to what was our original current
- directory (by name) before exec'ing the user's command.
-
- * fakeauth.c (main): Don't use posix_spawnp. Use _hurd_exec instead.
-
-2002-05-06 Marcus Brinkmann <marcus@gnu.org>
-
- * settrans.c (main): Return 0 instead of using break (which only
- gets us out of the while loop).
-
-2002-05-05 Marcus Brinkmann <marcus@gnu.org>
-
- * fakeauth.c (main): Add ARGP_IN_ORDER to argp_parse invocation.
- (main: parse_opt): New function.
- (main): Set parser in ARGP to parse_opt.
-
-2002-05-04 Roland McGrath <roland@frob.com>
-
- * fakeauth.c (main): Update doc strings, clean up argp_parse call.
-
- * fakeroot.sh: New file.
- * Makefile (targets, special-targets, SRCS): Add it.
-
- * settrans.c (options): Add --chroot/-C option.
- (main_opt): Parse that option, take following args until "--"
- as a command to exec chroot'd to the translated node.
-
-2002-05-03 Roland McGrath <roland@frob.com>
-
- * msgport.c (str2flags): Add break after default: label.
-
- * vmstat.c (print_val): Use %lld printf format for val_t.
-
- * fakeauth.c: New file.
- * Makefile (fakeauth): New target.
- (targets): Add it.
- (SRCS): Add fakeauth.c.
- (auth-MIGSFLAGS, fakeauth-CPPFLAGS, authServer-CPPFLAGS,
- auth_requestUser-CPPFLAGS): New variables.
-
- * shd.c: Include <error.h> for `error' decl.
-
- * Makefile (rpctrace): Put libthreads before libports.
-
-2002-03-23 James A. Morrison <ja2morri@uwaterloo.ca>
-
- * rpctrace.c (parse_msgid_list): Use ERR, not errno.
- * shd.c (reap): Use error, not perror.
- (command): Likewise.
- (main): Likewise.
- (run): Use error, not perror. Use ERR, not errno.
-
-2002-01-30 Roland McGrath <roland@frob.com>
-
- * rpctrace.c (struct msgid_info): New type.
- (msgid_ihash_cleanup): Updated to use it.
- (parse_msgid_list): Use it to also record subsystem name in table.
- (msgid_info): New function, guts of msgid_name.
- (msgid_name): Use that.
- (msgid_display, msgid_trace_replies): New stub functions.
- (trace_and_forward): Use them to conditionalize tracing and printing.
-
-2002-01-29 Roland McGrath <roland@frob.com>
-
- * rpctrace.c (options): Add -I/--rpc-list.
- (msgid_ihash): New static variable.
- (msgid_ihash_cleanup): New function.
- (parse_msgid_list, magid_name): New functions.
- (main: parse_opt): Grok -I using parse_msgid_list.
- (trace_and_forward, print_request_header, print_reply_header):
- Look up msgh_id values using msgid_name and print strings if possible.
-
-2002-01-04 Roland McGrath <roland@frob.com>
-
- * msgport.c (str2flags): Use const in argument type; make static.
- Set O_CREAT for "w" mode. Grok "a" to set O_APPEND.
- (cmd_setfd): Always call str2flags, giving it a default string.
- (cmd_stdin, cmd_stdout, cmd_stderr): Likewise.
- (cmd_options): Update doc strings.
-
-2002-01-02 Roland McGrath <roland@frob.com>
-
- * rpctrace.c (traced_spawn) [KERN_INVALID_LEDGER]:
- Pass extra arguments to task_create for OSF variant.
- * shd.c (run): Likewise.
-
-2001-12-30 Roland McGrath <roland@frob.com>
-
- * storeread.c (main): Fix argument order in `error' call.
-
-2001-12-28 Roland McGrath <roland@frob.com>
-
- * storeinfo.c (main): Pass STORE_NO_FILEIO to store_create.
-
-2001-11-23 Roland McGrath <roland@frob.com>
-
- * gcore.c: New file (previously ../exec/gcore.c). Update the code.
- * Makefile (targets): Add gcore.
-
-2001-10-14 Roland McGrath <roland@frob.com>
-
- * rpctrace.c (trace_and_forward): Move assert on expected port type to
- after check for notifications (which always use fake send-once rights).
-
-2001-08-10 Roland McGrath <roland@frob.com>
-
- * showtrans.c (main): Use %.*s formats to be robust in the
- face of an unterminated argz in a translator setting.
-
-2001-06-15 Neal H Walfield <neal@cs.uml.edu>
-
- * settrans.c (options): New option `--orphan'.
- Fix other comments to avoid confusion.
- (main): Add FS_TRANS_ORPHAN to ACTIVE_FLAGS if `--orphan' is
- specified.
-
-2001-06-06 Roland McGrath <roland@frob.com>
-
- * rpctrace.c (trace_and_forward): Assert that INFO has the same port
- right type as the right we looked up. Don't consider a message a
- reply unless its receiver is a send-once right.
-
- * rpctrace.c (print_reply_header): Don't call unfinished_line if
- expected_reply_port is null, indicating the last line was finished as
- a simpleroutine.
-
-2001-03-31 Roland McGrath <roland@frob.com>
-
- * pids.h: Fix obsolescent #endif syntax.
-
-2001-02-27 Roland McGrath <roland@frob.com>
-
- * rpctrace.c: Overhaul output handling.
-
-2001-02-25 Roland McGrath <roland@frob.com>
-
- * storecat.c: Include <stdlib.h> for decls.
- * w.c: Include <time.h> for decls.
-
-2001-01-17 Neal H Walfield <neal@cs.uml.edu>
-
- * mount.c (do_mount): Conform to new fshelp_start_translator
- semantics.
-
- * settrans.c (main): Conform to new fshelp_start_translator
- semantics therby allowing us to print the pid of the an
- active translator.
-
-2001-01-08 Marcus Brinkmann <marcus@gnu.org>
-
- * storeread.c (main): Change type of addr to store_offset_t,
- also for first argument of local function dump.
- Add comment about store->size as len parameter for store_read.
- Use atoll instead atoi for addr argument.
-
- * storeinfo.c (print_store): Remove local function pint, add two
- similar functions psiz and poff, accepting and printing a size_t
- or store_offset_t respectively.
- Use psiz to print block_size, poff to print blocks and size of
- store.
- Use %Ld instead %ld to print runs.
-
- * storecat.c (main): Change type of addr and left to store_offset_t.
-
-2000-10-18 Marcus Brinkmann <marcus@gnu.org>
-
- * devprobe.c (main): Call device_close before freeing the device
- port.
-
-2000-07-27 Thomas Bushnell, BSG <tb@mit.edu>
-
- * portinfo.c: Comment out unimplemented argument
- `--show-targets'. Reported by
- Marcus.Brinkmann@ruhr-uni-bochum.de.
-
-2000-07-26 Mark Kettenis <kettenis@gnu.org>
-
- * Makefile (HURDLIBS): Reorder libs such that the threads lib
- comes before the ports lib. This makes sure the functions in
- libthreads properly override the stubs in libports with the new
- dynamic linker semantics in glibc 2.2.
-
-2000-03-17 Thomas Bushnell, BSG <tb@mit.edu>
-
- * frobauth-mod.c (frobauth_modify): Don't use MOVE_SEND in Hurd RPC.
- * msgport.c (do_setfd, cmd_chcwdir, cmd_cdroot, cmd_chcrdir):
- Likewise.
-
-2000-02-08 Roland McGrath <roland@baalperazim.frob.com>
-
- Remove the su utility, which is incompatible with traditional su
- as provided by sh-utils and used by some portable shell scripts.
- The Hurdish su functionality is available as `setauth --save'.
- * su.c: File removed.
- * Makefile (targets): Remove su.
- (SRCS): Remove su.c.
- (su): Target removed from various dependency rules.
- (su-LDLIBS): Variable removed.
- * unsu.c (doc): Refer to setauth --save rather than su.
-
-2000-01-22 Roland McGrath <roland@baalperazim.frob.com>
-
- * nonsugid.c (get_nonsugid_ids): Remove saved set IDs from available
- sets before merging effective sets.
-
-1999-11-20 Roland McGrath <roland@baalperazim.frob.com>
-
- * storeinfo.c (print_store: pstr): Add const to parameter type.
-
-1999-11-19 Roland McGrath <roland@baalperazim.frob.com>
-
- * mount.c: New file.
- * mount.sh: File removed.
- * Makefile (special-targets): Remove mount.
- (SRCS): mount.sh -> mount.c
- (mount): Add deps on ../sutils/fstab.o, ../sutils/clookup.o,
- libfshelp and libports.
- (../sutils/fstab.o ../sutils/clookup.o): Rule to build in ../sutils.
-
-1999-11-18 Roland McGrath <roland@baalperazim.frob.com>
-
- * vmstat.c (BADVAL): New macro.
- (SWAP_FIELD): New macro. This properly takes care of exciting C
- type promotion rules to properly indicate errors.
- (get_swap_size, get_swap_free, get_swap_active): Replace definitions
- with ones using SWAP_FIELD macro.
- (ensure_def_pager_info): Give an error message for lack of a default
- pager; check only once.
-
-1999-09-23 Mark Kettenis <kettenis@gnu.org>
-
- * login.c (main): Pass controlling terminal ID port to the child.
-
-1999-09-19 Roland McGrath <roland@baalperazim.frob.com>
-
- * w.c (add_utmp_procs): Ignore entries whose ut_type is not
- LOGIN_PROCESS or USER_PROCESS, or whose ut_line is empty.
-
-1999-08-10 Thomas Bushnell, BSG <tb@mit.edu>
-
- * portinfo.c: Correct documentation for (currently implemented)
- --target-send and --target-send-once options. Reported by Marcus
- Brinkmann (Marcus.Brinkmann@ruhr-uni-bochum.de).
-
-1999-07-23 Roland McGrath <roland@baalperazim.frob.com>
-
- * Makefile (targets): Remove freeauth, added accidentally.
-
-1999-07-17 Roland McGrath <roland@baalperazim.frob.com>
-
- * rpctrace.c (rewrite_right): If we see our own wrapper right,
- unwrap and replace it with the original send right.
- (trace_and_forward): Remove vm_map special case.
-
- * rpctrace.c: Mostly rewritten. Now mostly working with skeletal
- functionality.
-
-1999-07-15 Roland McGrath <roland@baalperazim.frob.com>
-
- * rpctrace.c: New file, from josem and gord. Not yet functional.
- * Makefile (rpctrace): New target.
- (targets): Add rpctrace.
- (SRCS): Add rpctrace.c.
-
-1999-07-10 Roland McGrath <roland@baalperazim.frob.com>
-
- * pids.c: Add #include <sys/mman.h> for munmap decl.
- * showtrans.c: Likewise.
- * login.c: Likewise.
- * storeread.c: Likewise.
- * msgport.c: Likewise.
-
-1999-07-03 Thomas Bushnell, BSG <tb@mit.edu>
-
- * login.c (cat): Use munmap instead of vm_deallocate.
- (check_owned): Likewise.
- (kill_login): Likewise.
- * storeread.c (main): Likewise.
- * showtrans.c (main): Likewise.
- * pids.c (add_fn_pids): Likewise.
- * msgport.c (cmd_getenv): Likewise.
-
-1999-07-01 Mark Kettenis <kettenis@gnu.org>
-
- * Makefile (INSTALL-addauth-ops, INSTALL-setauth-ops,
- INSTALL-su-ops): Removed. These programs don't have to be
- installed suid-root anymore.
- * frobauth-mod.c (frobauth_modify): Do not try to set the owner of
- the processes we're frobbing. The process set their owner
- themselves when we pass them their new authentication.
-
-1999-06-21 Roland McGrath <roland@baalperazim.frob.com>
-
- * login.c (main): For no-uids shell, default SH_ARG0 to informative
- value. Use asprintf to construct it.
-
-1999-06-20 Roland McGrath <roland@baalperazim.frob.com>
-
- * ps.c (options): Doc fix.
-
-1999-05-29 Roland McGrath <roland@baalperazim.frob.com>
-
- * w.c (fetch_boot_time): New function. Use libps to get
- task_basic_info for PID 1 (init); its creation_time is "boot time".
- (uptime): Use it, instead of stat'ing /var/run/uptime.
-
- * ps.c (output_fmts): Add %start and %time specs before %command
- in "user" (ps -u) format.
-
-1999-05-16 Roland McGrath <roland@baalperazim.frob.com>
-
- * portinfo.c (parse_task): Fail with appropriate error message if the
- fetched task is MACH_PORT_NULL.
-
-1999-04-25 Roland McGrath <roland@baalperazim.frob.com>
-
- * shd.c (run): Print child's PID when pausing before exec.
-
-Fri Mar 12 15:22:02 1999 Thomas Bushnell, BSG <tb@mit.edu>
-
- * login.c (add_utmp_entry): Properly call setutent and endutent
- around the getutline call.
-
-1999-03-11 Roland McGrath <roland@baalperazim.frob.com>
-
- * portinfo.c (main): Grok -E and inhibit error msg for
- print_xlated_port_info if set.
- (options): #if 0 -q option until we implement it.
-
-1999-02-17 Roland McGrath <roland@baalperazim.frob.com>
-
- * mount.sh: Use `awk' instead of `gawk'.
-
-Fri Feb 19 02:43:11 1999 Thomas Bushnell, BSG <tb@mit.edu>
-
- * login.c (main): Correctly implement -f instead of always
- acting as if it were set.
-
- * login.c (main): When transitioning from no UID's to having UID's
- create a new session like normal. Reported by Mark M. Kettenis
- <kettenis@wins.uva.nl>.
-
-1999-02-06 Mark Kettenis <kettenis@gnu.org>
-
- * login.c (main): If no effective uid, really use first auxiliary
- uid to use as password entry to get parameters from.
-
-1999-01-03 Roland McGrath <roland@baalperazim.frob.com>
-
- * syncfs.c: Replace -a/--asynchronous with -s/--synchronous.
- Default is now asynchronous.
-
-1998-12-31 Roland McGrath <roland@baalperazim.frob.com>
-
- * Makefile (SRCS, targets, targets rule): Rename sync to syncfs.
- * syncfs.c: Renamed from sync.c.
- Take flags -a/--asynchronous and -c/--no-children,
- and optional file arguments. Diagnose errors.
-
-1998-10-20 Roland McGrath <roland@baalperazim.frob.com>
-
- * Makefile (OBJS): Use % pattern instead of explicit list.
-
- * parse.c (parse_enum): Add braces to silence gcc warning.
- * psout.c (psout): Likewise.
- * settrans.c (main): Likewise.
- * showtrans.c (main): Likewise.
- * w.c (w_fetch): Likewise.
- * vminfo.c (main): Likewise.
-
-1998-09-05 Roland McGrath <roland@baalperazim.frob.com>
-
- * ping.c: <linux/icmp.h> -> <netinet/ip_icmp.h>;
- struct icmphdr -> struct icmp;
- Remove macro hacks to cope with old headers.
- (pinger_wrapper): Take and return void *, so we're a cthread_fn_t.
-
-1998-09-04 Roland McGrath <roland@baalperazim.frob.com>
-
- * portinfo.c (hold): Declare explicit `int' to silence warning.
-
- * Makefile (OBJS): Use pattern %.sh instead of explicit list.
-
-Fri Aug 21 19:25:12 1998 Jose M. Moya <josem@gnu.org>
-
- * msgport.c: Comments added.
- (add_cmd): cmd_add renamed to add_cmd.
- (parse_cmd_opt): cmd_parse_opt renamed to parse_cmd_opt.
-
-Mon Aug 3 17:10:05 1998 Joel N. Weber II <devnull@theobromine.ai.mit.edu>
-
- * Makefile (msgport): Add dependency on libshouldbeinlibc.
-
-1998-07-25 Jose M. Moya <josem@gnu.org>
-
- * msgport.c: Fixed to deallocate ports.
-
-1998-07-24 Jose M. Moya <josem@gnu.org>
-
- * msgport.c: New file.
- * Makefile (targets): Add `msgport'.
- (SRCS): Add `msgport.c'.
- (msgport): Add dependencies on parse.o and pids.o.
-
-1998-07-20 Roland McGrath <roland@baalperazim.frob.com>
-
- * ps.c (main): Fix return type to int, and use return.
- * ids.c (main): Likewise.
- * w.c (main): Likewise.
- * login.c (main): Likewise.
- * settrans.c (main): Likewise.
- * showtrans.c (main): Likewise.
- * fsysopts.c (main): Likewise.
- * storeinfo.c (main): Likewise.
- * unsu.c (main): Likewise.
- * setauth.c (main): Likewise.
- * rmauth.c (main): Likewise.
- * addauth.c (main): Likewise.
-
- * w.c (main): Avoid warning from `while (a = b)'.
-
-Wed Apr 22 16:38:59 1998 Thomas Bushnell, n/BSG <tb@mit.edu>
-
- * ping.c (MAXHOSTNAMELEN): Don't define.
- (main): Delete variable `hnamebuf'. Store directly into properly
- malloced `hostname' variable.
-
-Wed Apr 22 16:29:18 1998 Thomas Bushnell, n/BSG <tb@mit.edu>
-
- * ping.c: New file. Originally P.D. from US Army; then modified
- by BSD, then added to Linux. Taken from Linux ping and adapted
- for Hurd and submitted for inclusion by Kunihiro Ishiguro
- (kunihiro@zebra.org).
- * Makefile (targets): Add `ping'.
- (SRCS): Add `ping.c'.
- (ping-CPPFLAGS): New variable, to find <linux/icmp.h> in the
- pfinet sources.
- (INSTALL-ping-ops): Install ping suid root.
- (ping): Depend on `../libthreads/libthreads.a'.
-
-1997-09-29 Miles Bader <miles@gnu.ai.mit.edu>
-
- * unsu.c (argp_program_version): Use correct program name.
-
-1997-09-26 Miles Bader <miles@gnu.ai.mit.edu>
-
- * frobauth-mod.c (frobauth_modify): Add AUTHS & NUM_AUTHS parameters.
- * frobauth.h (frobauth_modify): Add AUTHS & NUM_AUTHS parameters.
- * rmauth.c (main): Supply new args to frobauth_modify.
- * unsu.c (main): Likewise.
- * setauth.c (main): Likewise.
- * login.c (main): Use ugids_verify_make_auth instead of
- ugids_verify and ugids_make_auth.
- * addauth.c (main): Likewise.
- * setauth.c (main): Likewise.
-
- * w.c (main): Remove DEFAULT_OUTPUT variable.
-
-1997-08-08 Miles Bader <miles@gnu.ai.mit.edu>
-
- * ftpcp.c (eappend, ebasename): New functions.
- (append_basename): New function.
- (main): Move target directory handling to append_basename.
- Use it also with remote transfers.
-
- * ftpcp.c (cntl_debug): Print CONN->hook as a string before any output.
- (main): Set the connection hooks to appropriate strings.
- (econnect): Add NAME parameter, & set connection hook from it.
-
-1997-07-29 Miles Bader <miles@gnu.ai.mit.edu>
-
- * ftpcp.c (main): When mungeing the destination to copy into a
- directory, do the name used to print error messages too.
-
-1997-07-15 Miles Bader <miles@gnu.ai.mit.edu>
-
- * vmstat.c (ensure_def_pager_info): Don't report any errors if
- there's no default pager.
-
-1997-07-10 Miles Bader <miles@gnu.ai.mit.edu>
-
- * vmstat.c (main): Don't print fields we cannot get.
-
-1997-07-03 Miles Bader <miles@gnu.ai.mit.edu>
-
- * ftpdir.c (main): Flush stdout after printing prefix/separator.
-
-1997-06-19 Miles Bader <miles@gnu.ai.mit.edu>
-
- * storecat.c, storeread.c: Moved here from ../libstore.
- * Makefile (SRCS): Add storecat.c & storeread.c.
- (targets): Add storecat & storeread.
- Add storecat & storeread to appropriate dependency rules.
-
-1997-06-13 Miles Bader <miles@gnu.ai.mit.edu>
-
- * settrans.c (main): Print the translated-node name instead of the
- translator name if the translator startup error is due to opening it.
-
-1997-06-10 Miles Bader <miles@gnu.ai.mit.edu>
-
- * ids.c (argp_program_version): Change name to `ids'.
-
-Mon Jun 9 12:45:24 1997 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * Makefile (SRCS): Add setauth.c, pids.c, unsu.c, and nonsugid.c.
-
-Wed Jun 4 14:26:53 1997 Miles Bader <miles@gnu.ai.mit.edu>
-
- * ftpcp.c, ftpdir.c: Files moved from ../libftpconn.
- * Makefile (HURDLIBS): Add ftpconn.
- (ftpcp ftpdir): Add dependency on ../liftpconn/libftpconn.a.
- (SRCS): Add ftpcp.c & ftpdir.c.
- (targets): Add ftpcp & ftpdir.
-
-Tue May 27 14:55:30 1997 Miles Bader <miles@gnu.ai.mit.edu>
-
- * ps.c (args_doc): Variable removed.
- (main): Don't use ARGS_DOC.
- Correct filtering of process-owners when processes are explicitly
- specified.
-
-Mon May 26 02:21:19 1997 Miles Bader <miles@gnu.ai.mit.edu>
-
- * su.c, addauth.c: Totally rewritten.
- * rmauth.c, setauth.c, unsu.c, frobauth.h, frobauth.c,
- frobauth-mod.c, nonsugid.c, pids.c, pids.h: New files.
- * Makefile: Add appropriate dependencies on parse.o, pids.o,
- frobauth.o, & frobauth-mod.o.
- (addauth-LDLIBS, setauth-LDLIBS, su-LDLIBS): New variables.
-
- * ids.c: Renamed from hurdids.c.
- * Makefile (targets): hurdids renamed to ids.
- (SRCS): hurdids.c renamed to ids.c.
- (INSTALL-ids-ops): Renamed from INSTALL-hurdids-ops.
-
- * login.c (child_argps): New variable.
- (options): Remove uid/gid args.
- (main): Use ugids operations instead of doing [ug]id frobbing
- ourselves.
- <ugids.h>: New include.
-
- * ps.c (options): Rearranged to group similar options.
- Process-selection options removed.
- (current_lid, current_sid): Functions removed.
- (lookup_user): Take new STATE argument.
- (main): Use PIDS_ARGP to select processes.
- Use new forms of parse_ functions.
- "pids.h": New include.
-
-Tue May 20 14:38:22 1997 Miles Bader <miles@gnu.ai.mit.edu>
-
- * parse.c (parse_enum, parse_numlist, parse_strlist, _parse_strlist):
- Change void * HOOK parameters to struct argp_state *STATE.
- * parse.h (parse_enum, parse_numlist, parse_strlist): Likewise.
-
-Mon May 19 23:04:54 1997 Miles Bader <miles@gnu.ai.mit.edu>
-
- * parse.c (parse_enum, parse_numlist, parse_strlist, _parse_strlist):
- Add HOOK argument, and pass it to callback functions.
- * parse.h (parse_enum, parse_numlist, parse_strlist): Likewise.
-
-Thu May 15 14:04:29 1997 Miles Bader <miles@gnu.ai.mit.edu>
-
- * ps.c (procset_names, fmt_sortkeys, fmt_names, fmts): Variables
- removed.
- (enum procsets): Type removed.
- (struct output_fmt): New type.
- (output_fmt): New variable.
- (parse_enum): Function removed.
- (main): Use new version of parse_enum & output_fmts variable.
-
- * login.c, addauth.c (main: verify_passwd): Make
- user-in-group-0-can-use-his-own-password-to-su work.
-
- * parse.c, parse.h: New files.
- * addauth.c: Replace include of "psout.h" with one of "parse.h".
- (_parse_strlist, parse_numlist): Functions removed.
- * ps.c: Include "parse.h".
- (_parse_strlist, parse_strlist, parse_numlist): Functions removed.
- * Makefile (SRCS): Add parse.c.
- (LCLHDRS): Add parse.h.
- Add dependencies on parse.o.
-
- * addauth.c: Renamed from addu.c.
- * Makefile: Change references to addu into ones to addauth.
-
-Fri Apr 25 13:06:29 1997 Miles Bader <miles@gnu.ai.mit.edu>
-
- * hurdids.c (main): Use the parent process's auth port instead of
- the hurdids process's, because hurdids is usually installed setuid.
-
- * login.c, addu.c (main: verify_passwd): Add
- user-in-group-0-can-use-his-own-password-to-su hack.
-
-Wed Apr 16 15:59:41 1997 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * login.c (add_utmp_entry): Revert change of December 10, 1996.
-
-Fri Mar 7 11:53:02 1997 Miles Bader <miles@gnu.ai.mit.edu>
-
- * addu.c: New file.
- * Makefile: Add addu to dependents of libshouldbeinlibc & libps.
- (INSTALL-hurdids-ops, INSTALL-addu-ops): New variables.
- (SRCS): Add addu.c.
- (targets): Add addu.
-
- * hurdids.c (args_doc): Initialize with "[PID]".
- (main): Get the ids from the auth port instead of using libc grot.
- Support getting ids from other processes.
-
-Sat Mar 1 21:27:03 1997 Miles Bader <miles@gnu.ai.mit.edu>
-
- * w.c (add_utmp_procs): Ignore unused utmp entries.
- (main): Support USER... args.
-
-Wed Feb 26 17:47:04 1997 Miles Bader <miles@gnu.ai.mit.edu>
-
- * devprobe.c (main): Fetch DEVICE_MASTER *before* we use it.
- Use argp_failure instead of error.
- Open device read-only.
-
-Wed Feb 19 22:16:40 1997 Miles Bader <miles@gnu.ai.mit.edu>
-
- * fsysopts.c, hurdids.c, login.c, portinfo.c, ps.c, settrans.c,
- showtrans.c, storeinfo.c, sync.c, vminfo.c, vmstat.c, w.c
- (argp_program_version): Make const.
-
- * devprobe.c (main): Parse arguments before getting device master port.
-
-Tue Feb 11 20:51:51 1997 Miles Bader <miles@gnu.ai.mit.edu>
-
- * settrans.c (options): Update to reflect some minor changes in
- the way argp works.
-
-Thu Feb 6 01:40:19 1997 Miles Bader <miles@gnu.ai.mit.edu>
-
- * login.c (main): Look for NOBODY in ARGS_DEFS too, and use a last
- ditch default if we can't find it anywhere.
- Deal with crypt failing.
-
- * w.c (w_get_host): Don't use strlen on it if *HOST is 0.
-
-Mon Dec 16 20:52:19 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * psout.c (psout): Use last N processes if TOP is negative.
- * ps.c (options): Update doc for --top.
- Add --head and --bottom/--tail/-b options.
- (main): Implement --bottom/--tail/-b.
-
-Tue Dec 10 11:40:04 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * login.c (add_utmp_entry): ut_addr has changed to be an array;
- stash the IP address in the first slot.
-
-Sat Nov 23 16:30:16 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * psout.c (psout): Delete var REMOVE.
-
-Fri Nov 15 19:05:46 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * w.c (read_utmp_procs): Function removed.
- (main): Use utmp.h functions for reading utmp.
-
-Thu Oct 24 15:00:49 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * vmstat.c (options): Remove header for run-time supplied fields.
- (main): And add it back here as a child header.
-
-Wed Oct 23 14:04:47 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * vmstat.c (main): Replace PARENTS with CHILDREN, which uses the
- new argp_child structure.
-
-Thu Oct 10 13:53:23 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * ps.c (options, main): Add --top/-h option.
- * psout.c (psout): Add TOP parameter.
- * psout.h (psout): Add TOP parameter.
- * w.c (main): Supply new TOP arg to psout.
-
-Wed Oct 9 14:24:54 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * w.c (w_fetch): Use tty st_atime for idle time.
-
- * w.c (_w_specs): Use ps_cmp_unames for `Name'.
- Use ps_nominal_string for `Name' and `From'.
- (ps_cmp_unames, ps_nominal_string): New declarations.
- (DEFAULT_FMT_STRING): Add %pid.
-
-Tue Oct 8 14:44:04 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * storeinfo.c (print_store): Properly ignore STORE_INACTIVE.
-
- * w.c (w_fetch): Set HAVE bits even if the values are `nominal'.
- Correctly propagate PS->inapp bits.
- (_w_specs): Add PS_FMT_FIELD_COLON_MOD to Idle's flags.
- (main): Initialize dependencies field of USER_HOOKS to w_deps.
- (w_deps): New function.
-
- * storeinfo.c (print_store): Correctly print unknown flags.
- Don't ever print STORE_INACTIVE flag.
-
-Mon Oct 7 15:48:23 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * storeinfo.c (main): Use STORE_INACTIVE flag to store_create.
-
-Thu Oct 3 16:08:21 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * vmstat.c (name_to_option): Correct test for malloc failure.
- (get_memobj_hit_ratio): Renamed from get_cache_hit_ratio.
- (fields): Add `max' field.
- Rename `cache *' fields to `memobj *', and reword doc strings.
- (val_width): New function.
- (main): Calculate verbose output widths differently.
- (main: FWIDTH): New macro.
- (VAL_MAX_MEM, VAL_MAX_SWAP, K, M, G): New macros.
-
-Wed Oct 2 10:24:04 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * vmstat.c (struct field): Remove desc field, add doc field.
- (fields): Initialize doc field, and not desc.
- (name_to_option): New function.
- (main): Rearrange use of name, doc, and desc fields in struct field.
-
- * sush.sh: Handle `-' and `--' args properly.
-
-Fri Sep 27 13:01:31 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * storeinfo.c (options, main): Change --runs/-r to --block-list/-l.
- (print_store): Print runs in grub block-list format.
-
-Fri Sep 27 01:07:20 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * storeinfo.c (options, main): Change --kind/-k to --type/-t.
- Add --flags/-f option.
- (W_TYPE): Renamed from W_KIND; all uses changed.
- (W_FLAGS): New macro.
- (print_store): Print flags separately from type.
- (doc): Updated.
-
-Thu Sep 26 16:10:03 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * Makefile (%: %.sh): Rule removed.
-
-Tue Sep 24 17:05:08 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * login.c (main: verify_passwd): Only declare reference to crypt
- weak if HAVE_CRYPT isn't defined.
-
- * sush.sh: Fix option parsing.
-
-Mon Sep 23 00:19:05 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * sush.sh, uptime.sh: Add option parsing, version number, &c.
- Add copyright notice.
-
- * Makefile (login-LDLIBS): Add $(LIBCRYPT).
-
-Thu Sep 12 16:37:42 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * Makefile (HURDLIBS): New variable.
-
-Thu Sep 5 11:45:58 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * Makefile: Use $(top_srcdir)/sh-version.h to make executables
- from .sh files.
-
- * fsysopts.c: Include <version.h>.
- (argp_program_version): Define with STANDARD_HURD_VERSION.
- * w.c: Likewise.
- * vmstat.c: Likewise.
- * vminfo.c: Likewise.
- * sync.c: Likewise.
- * storeinfo.c: Likewise.
- * showtrans.c: Likewise.
- * settrans.c: Likewise.
- * ps.c: Likewise.
- * portinfo.c: Likewise.
- * login.c: Likewise.
- * hurdids.c: Likewise.
-
-Sun Sep 1 14:15:46 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * sync.c (argp_program_version): New variable.
- (main): Call argp_parse with just a doc string.
- <argp.h>: New include.
- * Makefile (sync): Depend on libshouldbeinlibc.a.
-
-Fri Aug 30 16:54:57 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * vminfo.c: New file.
- * Makefile (targets): Add vminfo.
- (SRCS): Add vminfo.c.
- (INSTALL-vminfo-ops): New variable.
-
-Mon Aug 19 15:19:20 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * devprobe.c, fsysopts.c, hurdids.c, login.c, portinfo.c, ps.c,
- settrans.c, showtrans.c, storeinfo.c, vmstat.c, w.c, x.c (doc):
- Add program description.
-
-Wed Aug 14 10:18:41 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * Makefile (login-LDLIBS): New variable.
- (login): Dependency on -lutil removed.
- (libutil-libsubst): Variable removed.
-
-Sat Aug 10 10:03:57 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * ps.c (options): Whoops, short option for --sort is -s.
-
- * Makefile (LCLHDRS): New variable.
-
-Wed Jul 31 14:23:31 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * login.c (main/verify_passwd): Use #pragma weak instead of
- __attribute__ ((weak)).
- * su.c (check_password): Likewise.
-
- * login.c (options): Change --inherit-environ to --preserve-environment.
- Change --no-environ to --no-environment-args.
- Change --environ to --envvar and --environ-default to --envvar-default.
- * ps.c (options, main): Change --fmt to --format/-F.
- Change --posix-fmt/-o to --posix-format/-o.
- Change --sort to --sort/-s.
- Change --pgrp to --pgrp/-G.
- Change --login to --login/-L.
- Change --threads/-s to --threads/-T.
- Change --session to --session/-S.
- (OPT_FMT, OPT_SORT, OPT_PGRP, OPT_LOGIN, OPT_SESS): Macros removed.
- * w.c (options, main): Change --fmt to --format/-F.
- Change --sort to --sort/-s.
- (OPT_FMT, OPT_SORT): Macros removed.
-
-Wed Jul 31 14:24:05 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * login.c (main/verify_passwd): Declare crypt weak in a portable
- way.
- * su.c (check_password): Likewise.
-
-Tue Jul 30 14:49:48 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
-
- * login.c (main/verify_passwd): If government is broken, don't use
- crypt.
- * su.c (check_password): Likewise.
-
- * login.c (main/verify_passwd): Provide correct prototype for
- crypt.
- * su.c (check_password): Likewise.
-
-Mon Jul 29 03:22:07 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * vmstat.c (val_t): Make `long long'.
-
-Sun Jul 28 21:13:31 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * w.c (main): Correctly parse the -w/--width option.
-
-Fri Jul 26 12:34:00 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * vmstat.c (enum val_display_type): Add `PAGESZ'.
- `SIZES' -> `SIZE'; all uses updated. Remove BYTES, PAGES, and KBYTES.
- (fields): disp_type of "pagesize" and "swap-pagesize" changed to PAGESZ.
- (val_display_type_is_size): Function removed.
- (struct field): `disp_type' field -> `type'; all used updated.
- (print_val): Add TYPE & SIZE_UNITS arguments; remove HOW & PSIZE.
- (main): Variable user_disp_type removed. Variable size_units added.
- Add SIZE_UNITS macro, remove FDISPTYPE macro.
- Calls to print_val now use new PVAL macro.
- (get_vmstats_field): Just test against a type of SIZE, instead of
- using val_display_type_is_size.
-
-Thu Jul 25 22:36:38 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * Makefile (INSTALL-vmstat-ops): New variable.
-
- * vmstat.c (options, main): -k/--kilobytes, -v/--pages, and
- -b/--bytes options added.
- (fields): New struct members initialized. `size',
- `cache-hit-ratio', `swap-size', `swap-active', `swap-free', and
- `swap-pagesize' added.
- (val_t, enum val_display_type, enum field_change_type): New types.
- (val_display_type_is_size, print_val, vm_state_refresh,
- vm_state_get_field, get_vmstats_field, get_size,
- ensure_def_pager_info, get_swap_size, get_swap_free,
- get_swap_page_size, get_swap_active): New functions.
- (struct field): CHANGE_TYPE, DISP_TYPE, STANDARD, and COMPUTE
- fields added. CUM field removed.
- (struct vm_state): New type.
- (main): Changed greatly to use vm_state type & functions, use
- print_val, and support CONST display types nicely.
- (argp_program_version): Version changed to 1.1.
-
-Sun Jul 21 03:00:10 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * fsysopts.c (main): Print an error for no args.
- * portinfo.c (main): For no args, use argp_usage.
- (options): Minor fixes.
-
-Sat Jul 20 15:54:10 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * Makefile (DIST_FILES): Deleted var (which was `shd.ChangeLog').
- (shd.ChangeLog): Deleted file.
-
-Fri Jul 19 21:09:57 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * settrans.c (options): Rearrange slightly.
-
-Tue Jul 16 21:38:01 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * login.c (main): If chown fails, print error message using errno,
- not -1.
-
-Fri Jul 12 15:49:09 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * login.c (dog): Get rid of `Beware of dog' -- it can't ever happen.
- Rename watch_login calls to check_login; don't use return value.
- (check_login): Renamed from watch_login. Change type to void.
- Exit if there's no such process.
-
- * login.c (main): Only start a watchdog timer if in a new login coll.
-
- * login.c (watch_login): New function.
- (dog): Use watch_login. Get rid of wierd rules for root-gone-away.
-
- * Makefile (INSTALL-ps-ops, INSTALL-w-ops): New variables.
-
-Fri Jul 12 14:20:44 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * Makefile (INSTALL-login-ops): New variable.
-
-Sun Jul 7 21:31:36 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * settrans.c (main): Don't use unsafe MOVE_SEND in call to
- file_set_translator.
-
-Sat Jul 6 18:06:52 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * portinfo.c, vmstat.c, hurdids.c, fsysopts.c, settrans.c,
- showtrans.c, storeinfo.c, login.c, w.c, ps.c
- (argp_program_version): New variable.
- * vmstat.c <hurd.h>: New include.
-
-Fri Jul 5 22:28:11 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * login.c (add_utmp_entry): Pass the the basename of TTY to getutline.
-
-Wed Jul 3 14:00:08 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * login.c (add_utmp_entry): Don't fill in ut_line or ut_type
- fields in UTMP.
- Fill in the ut_addr field.
-
- * Makefile (settrans): Depend on ../libports/libports.a.
-
-Tue Jul 2 14:54:43 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * login.c (dog): Include all args in the asprintf.
- Put the ARGV message in parens.
-
-Mon Jul 1 13:05:53 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * login.c (kill_login): Don't kill dog.
- (dog): Take new ARGV argument, and record status in it for ps.
- (main): Pass ARGV to dog.
-
- * w.c (_w_specs): Don't use utmp buffer sizes for field widths, as
- they can be very large.
-
- * login.c (add_utmp_entry): Always fill in UTMP.ut_line.
- Set UTMP.ut_type.
-
-Fri Jun 28 15:44:15 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * login.c (add_utmp_entry): Increment TTY_FD while searching for a
- TTY.
-
-Mon Jun 24 16:02:04 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * ps.c (main): Fix heuristic to decide whether native booted.
-
-Thu Jun 20 14:41:25 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * login.c (main): No need for EXEC_NEWTASK or EXEC_SECURE.
-
- * Makefile (getty): Remove rule.
- (targets): Remove `getty'.
- (SRCS): Remove getty.c.
- * getty.c: Removed file to daemons directory.
-
-Wed Jun 19 14:11:14 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * login.c (hurd_file_name_path_lookup): Declaration removed.
- (main: child_lookup): Pass 0 for new LOOKUP arg to
- hurd_file_name_path_lookup.
-
-Mon Jun 17 18:06:03 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * Makefile (targets): Add `getty'.
- (SRCS): Add `getty.c'.
- (getty): Depend on -lutil.
-
-Mon Jun 17 10:41:28 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * Makefile (targets): Remove reboot & halt.
- (SRCS): Remove reboot.c & halt.c.
- (login): Depend on -lutil instead of grot.
-
-Tue Jun 11 13:43:18 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * login.c (get_utmp_host): Function removed.
- (add_utmp_entry): Get rid of TTY_FD parameter. Don't search for
- the tty unless we need it to get the old host, since login does it
- for us.
- Also use the `existing host' in the case that a new one isn't specified.
- (main): Update call to add_utmp_entry.
-
- * login.c (dog): Don't print stupid message if login session is empty.
- (add_utmp_entry): Use gettimeofday instead of time to get the time.
-
-Wed May 29 11:01:18 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * sush.sh: Don't use -z flag to login.
-
-Tue May 28 17:48:12 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * login.c (main): Fetch the parent uids before checking their number.
- (dog): Don't kill session if the user logged in!
- Print newline before message.
- (check_owned): Return OWNED, not NOTOWNED.
-
- * ps.c (fmts): Use %sz for vmem format, not %size.
- (spec_abbrevs): Still use `NTH' for field name, just `TH' for title.
- (fmts): Use %nth.
-
-Tue May 21 12:18:38 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * storeinfo.c (print_store): Get rid of class-name printing code,
- and use store->class->name. Print all flags.
-
-Tue May 14 09:50:21 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * login.c (dog): Use error to print messages. Use pretty time fmting.
- (main): Fork login timeout watchdog before clearing the process owner.
-
- * login.c (main): Only allow real users to make new login collections.
-
-Mon May 13 18:10:43 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * login.c (options, main): Remove -z/--no-utmp option.
- (main): Only add utmp entry for session leader.
- Clear process owner if no uids.
- Fork self-destruct timer when appropiate.
- (default_args): Add NOAUTH_TIMEOUT entry.
- (check_owned, kill_login, dog): New functions.
-
-Sun May 12 13:38:34 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * psout.c (psout): When printing result of ps_fmt_creation_error,
- don't pass ERR to error (it should already be in PROBLEM if necessary).
-
-Sat May 11 01:00:39 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * ps.c (_parse_strlist, parse_strlist, parse_numlist, lookup_user,
- main): Slather on consts, in a misguided attempt to shut up the
- compiler.
-
-Fri May 10 13:53:30 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * devprobe.c (parse_opt): Use ARGP_ERR_UNKNOWN instead of EINVAL.
- * showtrans.c (parse_opt): Likewise.
- * portinfo.c (parse_opt): Likewise.
- * ps.c (parse_opt): Likewise.
- * settrans.c (parse_opt): Likewise.
- * login.c (parse_opt): Likewise.
- * hurdids.c (parse_opt): Likewise.
- * fsysopts.c (parse_opt): Likewise.
-
- * showtrans.c (parse_opt): Print a usage msg with no args.
- (options, main): Add --translated/-t option.
-
- * Makefile (storeinfo): Depend on ../libstore/libstore.a.
-
- * settrans.c (main): Remove const cast from first arg to argz_create.
- * fsysopts.c (main): Likewise.
- * login.c (main): Likewise.
- (main): Remove const from decl of USER & ARG.
- (fail): Remove const from decl of VIA.
-
- * ps.c (parse_strlist): Make DEFAULT_FN return a const char *.
-
- * storeinfo.c (print_store): New function.
- (info): Use store_create to make a store and print_store to print it.
- (parse_opt): Print a usage message for no args.
- (options, parse_opt): Add --children option.
-
-Thu May 9 19:46:14 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * w.c (uptime): Cast arg to localtime appropriately.
-
- * login.c (add_utmp_entry): Declare HOST `char const *'.
- (main) [fail]: Declare VIA `char const *'.
- (main): Declare USER `char const *'.
- Declare ARG `char const *'.
-
- * login.c (main): Provide new third arg to proc_setowner.
-
- * fsysopts.c (main) [parse_opt]: Cast first arg of argz_create
- appropriately.
- * settrans.c (main) [parse_opt]: Likewise.
- * login.c (main) [parse_opt] [case ARGP_KEY_ARG]: Likewise.
- (main): Likewise.
-
- * ps.c (main) [current_tty_name]: Remove `const' keyword to avoid
- type clash.
-
- * ps.c (main) [proc_stat_has_ctty]: Add parentheses around
- assignment used as truth value.
-
-Mon May 6 17:36:22 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * psout.c (psout): Take a field, not a spec. Honor PS_FMT_FIELD_KEEP.
-
- * w.c (w_user_getter): New function.
- (w_get_user): New function.
- (w_fetch): Implement W_PSTAT_USER.
- (struct w_hook): Add user field.
- (_w_specs): Add "Name" entry.
- (w_get_uname): Renamed from w_get_user.
- (w_uname_getter): Renamed from w_user_getter.
- * ps.c (fmts): Upcase most format strings.
-
-Sun May 5 01:05:54 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * psout.h: New file.
- * ps.c (fmts): Use new field syntax.
- (options): Add -o/--posix-fmt option. -A is an alias.
- "psout.h": New include.
- * w.c (_w_specs): Add precision & keep fields.
- (DEFAULT_FMT_STRING): Use new field syntax.
- "psout.h": New include.
- (main): Update call to psout.
- * psout.c (psout): Add posix_fmt arg.
-
-Thu May 2 00:10:53 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * psout.c (psout): Use ps_fmt_creation_error to find out in detail
- why ps_fmt_create fails.
-
-Wed May 1 19:53:51 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * settrans.c (main): Default KILL_ACTIVE to 0.
-
-Tue Apr 30 19:04:01 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * w.c (_w_specs): Use ps_emit_past_time to show login times.
-
-Tue Apr 30 09:47:03 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
-
- * Makefile (all): Remove target.
- (include ../Makeconf): Place before all dependencies.
- ($(targets)): Each separate target should depend on its own .o.
-
-Tue Apr 23 13:49:36 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * ps.c (main): Try to intuit whether this is a native-booted hurd
- system, and if so, don't filtered out non-parented processes.
-
-Wed Apr 10 19:47:45 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * devprobe.c: New file.
- * Makefile (targets): Add devprobe.
- (SRCS): Add devprobe.c.
-
-Mon Apr 8 17:09:55 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * portinfo.c (options, doc): Change meaning of --translate's
- argument, in preparation for other changes.
- (options, main): Add, but don't really implement, --search option.
-
-Fri Mar 29 14:37:49 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * settrans.c (options): Add --exclusive option, change descriptions.
- (main): Rearrange meanings of arguments somewhat.
-
-Thu Mar 28 13:58:36 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * portinfo.c (main): Use new names for functions, and pass stdout.
- (port_info, ports_info, xlated_port_info, xlated_ports_info,
- name_xlator_create, name_xlator_free, name_xlator_xlate):
- Functions removed (renamed and put in libshouldbeinlibc).
-
- * portinfo.c (parse_task): Use strtoul instead of atoi so pid 0 works.
-
-Mon Mar 25 14:19:40 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * w.c (uptime): Correctly calculate uptime.
- (...various...): Use real types instead of old ps typedefs.
- * ps.c (spec_abbrevs): Make const.
- (ps_specs): Make non-const.
- (...various...): Use real types instead of old ps typedefs.
- * psout.c (psout): Use real types instead of old ps typedefs.
-
-Sat Mar 23 01:02:37 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * w.c (uptime): Add a temporary hack to pretend to show uptime.
-
-Mon Mar 18 18:34:51 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * ps.c (main): Pass new arg to argp_parse.
- * w.c (main): Likewise.
- * storeinfo.c (main): Likewise.
- * fsysopts.c (main): Likewise.
- * hurdids.c (main): Likewise.
- * login.c (main): Likewise.
- * vmstat.c (main): Likewise.
- * showtrans.c (main): Likewise.
- * settrans.c (main): Likewise. Also use argp_usage correctly.
- * portinfo.c (main): Likewise.
-
-Tue Mar 5 14:17:22 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * portinfo.c (main): Fix arg order to name_xlator_create.
- (name_xlator_create): Return X in XLATOR.
- (name_xlator_free): Deallocate all ports in X too.
- (main): Use xlated_port_info / xlated_ports_info.
- (xlated_port_info, xlated_ports_info): New functions.
- (struct name_xlator, name_xlator_create, name_xlator_xlate): Don't
- depend on a specified receive/send type for the source being specified.
- (name_xlator_xlate): Take FROM_TYPE arg, & return TO_TYPE.
- (options, main): Get rid of -R/-S options, and add --translate/-t
- option.
-
-Mon Mar 4 15:25:41 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * portinfo.c (struct name_xlator): New structure.
- (name_xlator_create, name_xlator_free, name_xlator_xlate): New funcs.
- (options, main): Add --translate-{receive,send}/-R/-S options.
-
-Fri Mar 1 18:55:07 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * Makefile (targets, SRCS): Add portinfo & portinfo.c.
-
-Tue Feb 27 14:51:16 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * Makefile (targets, SRCS): Remove clri & clri.c.
-
-Mon Feb 26 13:50:38 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * settrans.c (main): Don't print a newline after `Pausing...' msg.
-
- * ps.c: Include <error.h> instead of "error.h".
- "common.h": Don't include this anymore.
-
-Wed Feb 21 11:47:01 1996 Roland McGrath <roland@charlie-brown.gnu.ai.mit.edu>
-
- * w.c (uptime): Use %.2f format for load average numbers.
-
-Mon Feb 19 15:49:46 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * settrans.c (STRINGIFY): Make work. Is this in a header somewhere?
- (_STRINGIFY): New macro. Ick.
-
- * fsysopts.c (main): Use ARGP_IN_ORDER.
-
-Sat Feb 17 23:47:36 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * uptime.sh: New file.
- * Makefile (targets, special-targets): Add uptime.
- (SRCS): Add uptime.sh.
-
-Thu Feb 15 15:47:45 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * ps.c (main): Don't make -a imply -g.
-
- * sush.sh: Change -aBACKUP_SHELL to -aBACKUP_SHELLS.
-
- * login.c (child_lookup): Pass last arg to hurd_file_name_path_lookup.
-
-Wed Feb 14 17:38:31 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * w.c (add_utmp_procs): Correctly add terminal processes using new
- libps functionality.
- (read_utmp_procs): Emit all utmp entries, even the last one.
-
- * ps.c (main): Get rid of totally dead processes/threads.
- (add_pid): Complain about non-existant processes.
- (psout): New declaration.
-
- * ps.c (parse_numlist): Correctly handle NULL hook functions.
- (parse_opt): Deref STATE correctly.
- (main): Update calls to changed proc_stat_list_add_* functions.
-
- * login.c (main): Don't set old SAW_USER_ARG variable.
-
-Tue Feb 13 13:54:03 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * sush.sh: Exec login.
-
- * login.c (main): Deal with the shell args reasonably.
-
- * ps.c (parse_opt): Don't turn quoted args into options.
-
-Mon Feb 12 14:54:38 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * settrans.c (options, main): Add --timeout/-t option.
- (main): Pass ARGP_IN_ORDER to argp_parse (it's no longer the
- default), and deal with the fallout.
-
-Wed Feb 7 23:11:10 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * login.c (main): Allow switches in the login args naturally.
-
-Mon Feb 5 14:18:03 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * vmstat.c (main, args_doc, doc): Add repeat mode.
- (FVAL): New macro.
-
- * vmstat.c (main): Slightly decrease the space for numbers in the
- verbose output format.
- Twiddle the widths of the terse fields to make sure there's room
- for typical numbers.
-
-Sat Feb 3 01:28:20 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * vmstat.c (fields, options): Make const.
-
- * vmstat.c: New file.
- * Makefile (targets): Add vmstat.
- (SRCS): Add vmstat.c
-
- * login.c (main): Correctly add gids.
- Avoid duplicating the old real id when keeping the old ids.
- Don't ask for a password unnecessarily.
-
-Thu Feb 1 19:15:53 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * sush.sh: Don't save the parent ids.
-
- * login.c (main): When the user is specified as the first
- argument, always add it as both effective, real, and saved ids,
- even if there are others already.
-
- * login.c (main): Get the ttyname to chown.
- Only do the chown if NO_LOGIN isn't set.
-
- * settrans.c (options, main): Add --pause option.
-
-Thu Feb 1 16:27:24 1996 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * login.c (main): Chown the terminal.
-
-Tue Jan 30 15:25:23 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * login.c (main): Put LOGNAME in the environ even if it was already.
- (copied_args): Add "USER".
-
-Mon Jan 29 09:52:08 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * login.c (add_utmp_entry): Get rid of declaration for login().
- (main, default_args): Replace the BACKUP_SHELL param with
- BACKUP_SHELLS, which is a list of things to try. The default
- includes both bash and the /bin/sh.
- (main): Try to set the default path using confstr().
-
-Mon Jan 15 12:29:49 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * settrans.c (options, main): Make -g/--goaway only apply to
- active translators.
- (options): Rearrange a bit.
-
-Sun Jan 14 12:45:40 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * login.c (main): Call setlogin().
-
-Thu Jan 11 19:30:27 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * login.c (options, main): Change the -R/--retry option so that
- the optional argument is an argument to add to those passed to
- login when retrying, and remove all the hardwired arguments
- (except propagating -h/--via).
- (default_args, options, main): Get rid of the -n/--nobody option
- and variables, making it an additional login parameter.
-
- * login.c (default_args): Make the default shell /bin/bash instead of
- _PATH_BSHELL.
- (default_args, default_env): Make the default path just /bin.
-
- * loginpr.sh (user): Pass the appropiate -R options to login.
-
-Wed Jan 10 15:32:19 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * login.c (main): Turn on RETRY when the -h option is specified.
-
-Fri Jan 5 15:21:36 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * login.c (add_canonical_host): Try harder to get the actual host name.
-
-Thu Jan 4 22:37:46 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * login.c (add_canonical_host): New function.
- (add_utmp_entry): Use VIA_ADDR instead of VIA in the utmp entry if
- it fits better.
- (add_entry): Function moved out of main.
- (main): Use add_canonical_host() to implement the -h option. Only
- let root specify the login host.
-
- * login.c (main): child_lookup() now takes an additional PATH arg,
- and calls hurd_file_name_path_lookup() instead. Pass a path when
- looking up the shell executable.
-
-Tue Jan 2 01:15:13 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * sush.sh: Instead of giving --su to login, use all the component
- options it stood for. Also use --program-name for nice errors.
-
- * login.c (main): Do all file-name lookups using the target
- authentication, so that login isn't a security hole.
- Rework how password-checking is done somewhat (only ask when necess).
- Call exec_reauth() with SECURE==0 so that it reauths all the ports.
- If setting the real [ug]id, also add it as the `saved id'.
- (cat): Take an io_t port instead of a file descriptor.
- (options, main): Get rid of the -s/--su option, and add -S/--shell-arg.
- (FAILURE_SHELL): Macro deleted.
- (default_args): Add BACKUP_SHELL param.
- (main): Use BACKUP_SHELL instead of FAILURE_SHELL define.
-
-Mon Jan 1 20:51:41 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * login.c (main): Use exec_reauth() instead of our own.
- (options, main): Add -k/--keep & -s/--su options.
- (options, main): Remove -m/--umask option; use UMASK param instead.
- (main): Get rid of various string vars only used once.
-
-Fri Dec 29 12:16:13 1995 Miles Bader <miles@gnu.ai.mit.edu>
-
- * loginpr.sh: New program.
- * login.c (main): Add optional shell argument for --retry.
- Add --paranoid/-P option.
-
- * login.c (main): Don't ask for password by name if only one user.
-
-Thu Dec 28 17:41:11 1995 Miles Bader <miles@gnu.ai.mit.edu>
-
- * login.c (main, options): Add --retry/-R option.
-
- * login.c (main): If -f/--no-passwd is specified, get rid of the
- effect of the login executable being setuid/gid.
- Only set the shell proc's owner to an effective uid.
-
-Sun Dec 24 14:26:18 1995 Miles Bader <miles@gnu.ai.mit.edu>
-
- * ps.c (main): Move a bunch of stuff into psout() in psout.c.
- * psout.c: New file.
-
-Sat Dec 23 20:49:26 1995 Miles Bader <miles@gnu.ai.mit.edu>
-
- * ps.c (main): Allow user to use `-' prefix to invert sort as well.
- (main): Use ps_fmt_set_output_width() to set the output width.
-
- * login.c (add_utmp_entry): Only remove a prefix from the tty name
- if it's _PATH_DEV.
-
-Thu Dec 21 11:15:42 1995 Miles Bader <miles@gnu.ai.mit.edu>
-
- * ps.c (spec_abbrevs, ps_specs): New variables.
- (fmts): Get rid of redundant header specifications.
- (fmt_sortrevs): Variable removed.
- (main): Don't allow sorting on field names any more, just spec
- names (prob ok, since most things ps prints are now spec names).
- (main, options): Rename -o flag to -U for posix compat (ick).
-
- * login.c (options): Add --no-utmp/-z option.
- (add_utmp_entry): New function.
- (main): Call add_utmp_entry().
- (main): Ivec routines are now idvec routines.
- Include <idvec.h> instead of <ivec.h>.
- (options): --host/-h is now --via/-h.
- (main): Store the host were logged in from via in VIA, in the
- login parameters instead of the child environment; optionally copy
- it into the environment too.
- (main): Enable EXEC_SECURE.
- * Makefile (libutil-libsubst): New hack.
- (login): Depend on -lutil.
-
- * ps.c (main): Ivec routines are now idvec routines.
- Include <idvec.h> instead of <ivec.h>.
- Use argz functions to store tty_names instead of our own.
-
-Sun Dec 17 00:24:26 1995 Miles Bader <miles@gnu.ai.mit.edu>
-
- * ps.c (main, options): If the specified sort field begins with
- `-', reverse the sort.
-
- * ps.c (main): If there is no current uid, don't try to filter with it.
- (FILTER_NOT_LEADER): Renamed from FILTER_NSESSLDR.
- (main): Rename ps_not_leader_filter from ps_not_sess_leader_filter.
-
- * ps.c (main): Use ivec routines instead of ids.
- (make_ids, ids_add, ids_contains): Routines deleted.
- Include <ivec.h>.
-
-Sat Dec 16 22:13:32 1995 Miles Bader <miles@gnu.ai.mit.edu>
-
- * ps.c (options): Reformat doc string for --tty option.
-
- * ps.c (options): Add argument and doc for 'w' option.
- (main): Implement 'w' option.
-
- * login.c: Zillions of changes.
-
-Tue Dec 12 20:16:22 1995 Miles Bader <miles@gnu.ai.mit.edu>
-
- * login.c: New file.
- * Makefile (SRCS): Add login.c
- (targets): Add login.
- (login): Depends on ../libshouldbelibc/libshouldbelibc.
-
-Wed Dec 6 15:12:15 1995 Miles Bader <miles@gnu.ai.mit.edu>
-
- * fsysopts.c (main): Supply the new SEP argument to argz_stringify.
- * showtrans.c (main): Ditto.
-
- * fsysopts.c (main): Change uses of the INDEX field in argp_state
- structures to use NEXT instead.
- * ps.c (main): Ditto.
- * settrans.c (main): Ditto.
- * showtrans.c (main): Ditto. Fix default prefix-printing test.
- * storeinfo.c (main): Ditto.
-
-Mon Dec 4 15:41:06 1995 Miles Bader <miles@gnu.ai.mit.edu>
-
- * storeinfo.c (main): Correctly whether to print prefix by default.
- (options): Fix help strings.
-
-Wed Nov 15 19:56:21 1995 Miles Bader <miles@gnu.ai.mit.edu>
-
- * ps.c (main): Use new libps stream type.
-
-Tue Nov 14 18:28:20 1995 Miles Bader <miles@gnu.ai.mit.edu>
-
- * ps.c (main): Grow TTY_NAMES properly even when it's empty.
-
-Mon Nov 6 12:41:21 1995 Miles Bader <miles@gnu.ai.mit.edu>
-
- * ps.c (ids_add): Increase the size of IDS even when 0.
-
- * fsysopts.c (main): Use file_get_fs_options, not fsys_get_options.
- (doc): `filesystem' --> `FILESYS'.
-
-Sat Nov 4 19:56:38 1995 Miles Bader <miles@gnu.ai.mit.edu>
-
- * storeinfo.c (print_info): Use the new FLAGS argument to
- file_get_storage_info. Add new storage types.
-
-Wed Nov 1 19:30:42 1995 Miles Bader <miles@gnu.ai.mit.edu>
-
- * settrans.c (main): Change to use the new wierd callback
- interface to fshelp_start_translator.
-
- * ps.c (options): Add --not-owner/-O option.
- (id_t, struct ids): New type.
- (make_ids, ids_add, ids_contains): New functions.
- (main): Use a struct ids instead of multiple variables to hold the
- wanted uids list, which renamed to ONLY_UIDS. Add the NOT_UIDS
- list to contain the opposite sense, and use it.
-
- * ps.c (main): Use proc_stat_proc_info instead of proc_stat_info and
- PSTAT_PROC_INFO instead of PSTAT_INFO.
-
-Tue Oct 31 17:57:25 1995 Miles Bader <miles@gnu.ai.mit.edu>
-
- * fsysopts.c (doc, args_doc): Mention usage without any options.
- (main): If no options are supplied, print existing options.
-
- * ps.c (fmts): Add RPC field to the -l format.
-
-Mon Oct 30 16:24:37 1995 Miles Bader <miles@gnu.ai.mit.edu>
-
- * ps.c (options): --all is -e, not -a.
-
-Mon Oct 23 15:17:42 1995 Miles Bader <miles@gnu.ai.mit.edu>
-
- * settrans.c (options): Change --force/-f to --goaway/-g. Add
- flags for killing translators: --recurse/-r, --force/-f, --nosync/-S.
- (doc): New variable.
- (main): Support new flags. Have some of the options update flag
- words instead of setting variables.
-
- * storeinfo.c (print_info): Calculate total size/blocks correctly.
-
-Fri Oct 20 15:44:45 1995 Miles Bader <miles@gnu.ai.mit.edu>
-
- * settrans.c (args_doc): New variable.
- (main): Set ARGZ inside of parse_opt.
-
- * fsysopts.c (options): FILE --> FILESYS in help msg.
- (args_doc): OPTION --> FS_OPTION, since the usage message already
- uses OPTION to mean those to fsysopts.
- (doc): New variable; give some common choices for FS_OPTION.
-
-Thu Oct 19 19:07:26 1995 Miles Bader <miles@gnu.ai.mit.edu>
-
- * ps.c (parse_enum): Use argp_error.
-
-Thu Oct 12 15:22:24 1995 Miles Bader <miles@gnu.ai.mit.edu>
-
- * ps.c (parse_enum): Use ARGP_HELP_STD_ERR.
-
-Wed Oct 11 19:03:19 1995 Miles Bader <miles@gnu.ai.mit.edu>
-
- * ps.c (main): Use realloc on a variable in main instead of
- alloca, since the storage gets used after parse_opt returns.
-
- * fsysopts.c (main): Use argp_help instead of argp_usage.
-
-Tue Oct 10 15:02:17 1995 Miles Bader <miles@gnu.ai.mit.edu>
-
- * showtrans.c (options): Converted to argp format.
- (main): Use argp, not getopt.
- (usage, USAGE, SHORT_OPTIONS): Deleted.
- (arg_doc, doc): New variables.
- Include <argp.h> not <getopt.h>.
- * fsysopts.c (options): Converted to argp format.
- (main): Use argp, not getopt.
- (usage, USAGE, SHORT_OPTIONS): Deleted.
- (arg_doc): New variable.
- Include <argp.h> not <getopt.h>.
- * settrans.c (options): Converted to argp format.
- (main): Use argp, not getopt.
- (usage, USAGE, SHORT_OPTIONS): Deleted.
- Include <argp.h> not <getopt.h>.
- * ps.c (options): Converted to argp format.
- (main): Use argp, not getopt.
- (usage, USAGE, SHORT_OPTIONS): Deleted.
- (arg_doc, doc): New variables.
- Include <argp.h> not <getopt.h>.
-
-Fri Oct 6 17:33:01 1995 Miles Bader <miles@gnu.ai.mit.edu>
-
- * storeinfo.c (print_info): Use the new block_size value returned
- from file_get_storage_info.
-
-Wed Oct 4 18:15:59 1995 Miles Bader <miles@gnu.ai.mit.edu>
-
- * showtrans.c (usage, options, main): Change -h/--no-header options to
- -p/--prefix and -P/--no-prefix.
- (main): Unless overridden by -p/-P, only print a FILE: prefix when
- there are multiple files on the command line.
-
-Mon Oct 2 19:00:27 1995 Miles Bader <miles@gnu.ai.mit.edu>
-
- * Makefile (targets): Add storeinfo.
- (SRCS): Add storeinfo.c.
-
-Fri Sep 1 11:35:12 1995 Miles Bader <miles@churchy.gnu.ai.mit.edu>
-
- * settrans.c (main): Use fshelp_start_translator instead of
- start_translator from ../lib.
- * Makefile: Get rid of rules related to ../lib.
- (settrans): Depend on libfshelp.a instead of starttrans.o.
-
-Thu Aug 24 10:44:17 1995 Miles Bader <miles@churchy.gnu.ai.mit.edu>
-
- * Makefile (all): New target.
- (ps, settrans, showtrans, fsysopts): Put all dependencies in these
- targets.
- (settrans-HURDLIBS, showtrans-HURDLIBS, ps-HURDLIBS): Removed.
-
-Tue Aug 22 17:56:09 1995 Miles Bader <miles@churchy.gnu.ai.mit.edu>
-
- * Makefile (settrans-HURDLIBS, showtrans-HURDLIBS, ps-HURDLIBS):
- Add libshouldbeinlibc.
- (settrans, showtrans, fsysopts, ps): Get rid of things that are
- now in libshouldbeinlibc.
- Get rid of rules dealing with error.o.
-
-Sun Jul 23 15:58:06 1995 Michael I Bushnell <mib@geech.gnu.ai.mit.edu>
-
- * Makefile (DIST_FILES): sh.ChangeLog -> shd.ChangeLog.
-
-Fri Jul 7 19:20:21 1995 Michael I Bushnell <mib@duality.gnu.ai.mit.edu>
-
- * clri.c (copyright, sccsid): Correct syntax.
-
-Fri Jul 7 18:56:45 1995 Miles Bader <miles@churchy.gnu.ai.mit.edu>
-
- * settrans.c (SHORT_OPTIONS): Remove '?' as getopt usurps it.
- (options, main): Use '&' instead of '?' to mean help.
-
-Thu Jul 6 21:04:04 1995 Michael I Bushnell <mib@duality.gnu.ai.mit.edu>
-
- * su.c (main, apply_auth_to_loginid, apply_auth_to_pgrp): Remove
- assignments from inside if tests.
-
- * sync.c (main): Declare return type.
-
- * clri.c (copyright, sccsid): Declare unused.
- (main): Correct format for fourth arg in printf call.
-
- * ps.c (lookup_user): Declare return to be `int' to avoid type
- clash in use as 4th parameter to parse_numlist.
-
- * shd.c (run): Remove assignments from inside if tests.
- (command): Likewise.
-
- * Makefile (special-targets): New var.
- (mount): Provide command.
- (OBJS): New var.
- (shd, su, clri, sync, reboot, halt): List object files here.
-
-Thu Jul 6 16:12:22 1995 Miles Bader <miles@geech.gnu.ai.mit.edu>
-
- * settrans.c (main): Give an error message instead of dying when
- no filename argument is given.
-
-Thu Jul 6 15:43:15 1995 Michael I Bushnell <mib@duality.gnu.ai.mit.edu>
-
- * Makefile: Removed dependencies that are now automatically
- generated.
-
-Wed Jul 5 21:18:42 1995 Michael I Bushnell <mib@duality.gnu.ai.mit.edu>
-
- * Makefile (ps-HURDLIBS): Renamed from HURDLIBS.
- (ps): Fix dependencies.
-
-Mon Jun 26 16:13:47 1995 Miles Bader <miles@churchy.gnu.ai.mit.edu>
-
- * Makefile (CPPFLAGS): Put -I../lib back in.
- Put back the vpath for %.c to ../lib.
-
-Tue Jun 6 13:22:52 1995 Michael I Bushnell <mib@duality.gnu.ai.mit.edu>
-
- * Makefile (HURDLIBS): Added libihash.
- (CPPFLAGS): Deleted addition of -I../lib.
- (vpath): Deleted spec.
- (ps): Deleted ihash.o and primes.o.
-
-Thu Jun 1 11:33:47 1995 Miles Bader <miles@churchy.gnu.ai.mit.edu>
-
- * Makefile (ps.o, fsysopts.o, showtrans.o, settrans.o): Add
- dependencies on header files.
- (REMHDRS): Define this variable.
-
-Tue May 30 12:17:33 1995 Michael I Bushnell <mib@duality.gnu.ai.mit.edu>
-
- * Makefile (SCRS): Removed update.c.
- (targets): Removed update.
-
-Sat May 20 00:51:50 1995 Miles Bader <miles@churchy.gnu.ai.mit.edu>
-
- * fsysopts.c (main): Check for a missing filesystem name.
- (main): Tweak the error msgs a bit.
-
- * fsysopts.c (options, main): Don't use '?' as the --help key.
-
-Mon May 15 20:31:31 1995 Miles Bader <miles@duality.gnu.ai.mit.edu>
-
- * Makefile (SRCS, targets): Add fsysopts.
-
-Wed May 3 11:37:39 1995 Miles Bader <miles@churchy.gnu.ai.mit.edu>
-
- * ps.c (main, usage, SHORT_OPTIONS, options): Add the -n flag
- (--nominal-fields), which prevents elision of uninteresting fields.
- Also add elision of uninteresting fields...
-
-Tue May 2 17:22:11 1995 Miles Bader <miles@geech.gnu.ai.mit.edu>
-
- * ps.c (fmts): Add the SC (suspend count) field to various output fmts.
- (usage, main, SHORT_OPTIONS): Add the (ignored) -w flag for BSD compat.
- (main): Use the new name for ps_fmt_squash: ps_fmt_squash_flags.
-
-Tue May 2 14:37:07 1995 Michael I Bushnell <mib@duality.gnu.ai.mit.edu>
-
- * shd.c (reap): Check for ECHILD, not ESRCH.
-
-Wed Apr 26 21:40:57 1995 Miles Bader <miles@churchy.gnu.ai.mit.edu>
-
- * settrans.c (main): Allow options before and immediately after
- the node name to be rearranged by getopt without affecting those
- following the translator name.
-
-Fri Apr 14 10:18:34 1995 Miles Bader <miles@churchy.gnu.ai.mit.edu>
-
- * mount.sh: Move the test for a valid translator to just before we
- use it. Gratuitously change the "unknown" value for type to "".
- Don't use `--' when invoking settrans, as getopt doesn't seem to
- be handling it correctly. Use `usage' not `USAGE'.
-
-Wed Apr 12 14:38:25 1995 Michael I Bushnell <mib@duality.gnu.ai.mit.edu>
-
- * Makefile (DIST_FILES): Omit ps.ChangeLog.
-
-Tue Apr 11 15:21:46 1995 Michael I Bushnell <mib@duality.gnu.ai.mit.edu>
-
- * Makefile (targets): Changed `sh' to `shd'.
- (SRCS): Changed `sh.c' to `shd.c'.
- * shd.c: Renamed from `sh.c'.
-
-Mon Apr 10 20:01:20 1995 Miles Bader <miles@churchy.gnu.ai.mit.edu>
-
- * ps.c (main): Tweak things so that the -t flag works correctly
- for processes whose tty we can't figure out.
-
-Sun Apr 9 14:00:09 1995 Miles Bader <miles@duality.gnu.ai.mit.edu>
-
- * su.c (main): Getopt now returns '\001' for non-switch options
- instead of '\0', no doubt to work around an obscure bug in some
- brain-dead system only used by 2 people twice a decade.
-
-Fri Apr 7 11:55:25 1995 Miles Bader <miles@churchy.gnu.ai.mit.edu>
-
- * ps.c (parse_enum): Renamed from enum_name.
- (main, usage): Add lots of sysvish options, and generalize some
- existing ones to deal with sysvish usage. Make -t & -o work.
-
-Thu Apr 6 11:56:23 1995 Miles Bader <miles@churchy.gnu.ai.mit.edu>
-
- * ps.c (main): Add the `jobc' (-j) output format from netbsd.
-
-Wed Apr 5 22:10:50 1995 Miles Bader <miles@churchy.gnu.ai.mit.edu>
-
- * ps.c (main): When processes are specified on the command line by PID,
- turn off all filtering so that they don't disappear later. Also
- minor changes in some spec names.
-
-Tue Apr 4 11:32:53 1995 Miles Bader <miles@churchy.gnu.ai.mit.edu>
-
- * Makefile: Add showtrans & mount, and uncomment-out su.
-
- * settrans.c (main): Get rid of the `show passive translator'
- functionality, as this is now done by showtrans.
-
- * ps.c (main): Make -a imply -g as well, to be compatible with bsd.
- Add the -M (--no-msg-port) switch, which disables all fields that
- would use any process's message port.
-
- * showtrans.c: New file: Show passive translators.
-
- * su.c (apply_auth): Use msg_add_auth & msg_del_auth instead of
- add_auth & del_auth.
- (apply_auth_to_pids, apply_auth_to_loginid, apply_auth_to_pgrp):
- Don't use the IDS variable, it's no longer around; I think AUTH is
- the right thing to replace it with.
-
-Tue Apr 4 01:47:57 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * ps.c (main): Treat argument without leading - as if it had one,
- unless it's a number.
-
-Mon Mar 20 20:17:04 1995 Michael I Bushnell <mib@duality.gnu.ai.mit.edu>
-
- * Makefile (ps): Link in ihash.o, error.o, and primes.o too.
- * Makefile (vpath %.c): New decl.
-
- * ps.c: Include <hurd/ps.h> instead of "ps.h".
- Include <unistd.h>.
- (enum_name): Avoid warning.
- (program_name): New variable.
- (main): Don't set program_invocation_short_name (the library does it
- for us). Do set program_name.
-
- * ps.c: Replace with new version by Miles Bader. See ps.ChangeLog
- for some changes made to the new version before the replacement.
- Old ps.c and ps.ChangeLog are now ps.c.old and ps.ChangeLog.old.
- * Makefile (HURDLIBS): Define, for ps.
- (CPPFLAGS): Define, for ps.
- (ps): Add rule to get library.
-
-Sat Jan 28 15:02:08 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * sh.c (main): Only open /dev/tty if stdin is unreadable.
-
-Wed Nov 16 20:28:40 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * reboot.c: Include unistd.h, stdio.h, not hurd/anything.
- (main): If reboot returns, give error message and return 1.
- * halt.c: Likewise.
-
-Sat Nov 12 21:20:07 1994 Michael I Bushnell <mib@churchy.gnu.ai.mit.edu>
-
- * reboot.c (main): Just use the reboot function.
- * halt.c (main): Likewise.
-
-Fri Nov 11 12:05:38 1994 Michael I Bushnell <mib@churchy.gnu.ai.mit.edu>
-
- * Makefile (targets): Added reboot and halt.
- (SRCS): Added reboot.c and halt.c.
- * reboot.c: New file
- * halt.c: New file.
-
- * ps.c (main): Print in shorter format by default; take -v flag to
- print in longer format.
-
-Wed Nov 9 04:43:54 1994 Michael I Bushnell <mib@geech.gnu.ai.mit.edu>
-
- * ps.c (time_str): Specify format for decimals correctly.
-
-Wed Nov 9 00:20:09 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * ps.c (time_str): Use %.2d instead of %2d to get 0 pads.
-
-Mon Nov 7 14:15:10 1994 Michael I Bushnell <mib@churchy.gnu.ai.mit.edu>
-
- * ps.c (time_str): Don't use floating point conversion;
- it's buggy.
-
-Wed Nov 2 13:34:56 1994 Michael I Bushnell <mib@geech.gnu.ai.mit.edu>
-
- * sync.c: New file.
- * Makefile (targets): Added sync.
- (SRCS): Added sync.c.
-
-Thu Oct 27 22:19:29 1994 Michael I Bushnell <mib@churchy.gnu.ai.mit.edu>
-
- * ps.c (main): Also print out a field with the number of threads.
-
-Tue Oct 4 19:40:22 1994 Michael I Bushnell <mib@churchy.gnu.ai.mit.edu>
-
- * clri.c: New file.
- * Makefile (targets): Added clri.
- (SRCS): Added clri.c.
-
-Sat Oct 1 03:44:55 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * update.c: Take optional arg to specify sleep time.
- Use daemon instead of doing its work by hand.
-
-Fri Sep 30 11:53:53 1994 Michael I Bushnell <mib@churchy.gnu.ai.mit.edu>
-
- * update.c: New file.
- * Makefile (SRCS): Added update.c.
- (targets): Added update.
-
-Sat Sep 10 08:22:34 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * settrans.c (main): Give usage message when given no args.
- Use O_NOTRANS in file name lookup.
- Don't use FS_TRANS_EXCL in file_set_translator.
- If given args "FILE -show", get translator and print it out.
-
-Thu Sep 1 11:50:51 1994 Michael I Bushnell <mib@geech.gnu.ai.mit.edu>
-
- * settrans.c: New file.
- * Makefile (SRCS): Added settrans.c.
- (targets): Added settrans.
-
-Tue Aug 30 16:40:54 1994 Michael I Bushnell <mib@geech.gnu.ai.mit.edu>
-
- * sh.c (run): Use file_name_lookup instead of path_lookup.
-
-Tue Aug 23 10:44:16 1994 Michael I Bushnell <mib@geech.gnu.ai.mit.edu>
-
- * Makefile (targets): Comment out `su' until Roland gets it back
- into a usable state.
-
-Mon Aug 22 12:18:09 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * sh.c (main): Open /dev/tty with O_IGNORE_CTTY and fdopen that
- onto stdin/out/err.
-
-Fri Jul 22 12:26:27 1994 Michael I Bushnell <mib@geech.gnu.ai.mit.edu>
-
- * Makefile: Rewritten to use new scheme.
diff --git a/utils/devprobe.c b/utils/devprobe.c
index b5ebafe4..d7020322 100644
--- a/utils/devprobe.c
+++ b/utils/devprobe.c
@@ -35,7 +35,7 @@ static const struct argp_option options[] = {
{0}
};
static const char *args_doc = "DEVNAME...";
-static const char *doc = "Test for the existance of mach device DEVNAME..."
+static const char *doc = "Test for the existence of mach device DEVNAME..."
"\vThe exit status is 0 if any devices were found.";
int
diff --git a/utils/ftpcp.c b/utils/ftpcp.c
index 4c4c151a..67ccb1a0 100644
--- a/utils/ftpcp.c
+++ b/utils/ftpcp.c
@@ -240,7 +240,7 @@ efinish (struct epoint *e)
}
/* Give a name which refers to a directory file, and a name in that
- directory, this should return in COMPOSITE the composite name refering to
+ directory, this should return in COMPOSITE the composite name referring to
that name in that directory, in malloced storage. */
error_t
eappend (struct epoint *e,
diff --git a/utils/ftpdir.c b/utils/ftpdir.c
index 9b496add..4ccb821d 100644
--- a/utils/ftpdir.c
+++ b/utils/ftpdir.c
@@ -39,7 +39,7 @@ static struct argp_option options[] =
{"account", 'a', "ACCT",0, "Account to login as"},
{"separator",'S', "SEP", 0, "String to separate multiple listings"},
{"prefix", 'P', "PFX", 0, "String to proceed listings; the first and second"
- " occurances of %s are replace by HOST and DIR"},
+ " occurrences of %s are replace by HOST and DIR"},
{"host", 'h', "HOST",0, "Use HOST as a default host"},
{"debug", 'D', 0, 0, "Turn on debugging output for ftp connections"},
{"intepret", 'i', 0, 0, "Parse the directory output"},
diff --git a/utils/login.c b/utils/login.c
index 58c82148..cad3b1ed 100644
--- a/utils/login.c
+++ b/utils/login.c
@@ -406,7 +406,6 @@ main(int argc, char *argv[])
struct idvec parent_uids = IDVEC_INIT; /* Parent uids, -SETUID. */
struct idvec parent_gids = IDVEC_INIT; /* Parent gids, -SETGID. */
mach_port_t exec; /* The shell executable. */
- mach_port_t cwd; /* The child's CWD. */
mach_port_t root; /* The child's root directory. */
mach_port_t ports[INIT_PORT_MAX]; /* Init ports for the new process. */
int ints[INIT_INT_MAX]; /* Init ints for it. */
@@ -664,7 +663,7 @@ main(int argc, char *argv[])
if (ugids.eff_uids.num + ugids.avail_uids.num == 0)
/* We're transiting from having some uids to having none, which means
this is probably a new login session. Unless specified otherwise,
- set a timer to kill this session if it hasn't aquired any ids by
+ set a timer to kill this session if it hasn't acquired any ids by
then. Note that we fork off the timer process before clearing the
process owner: because we're interested in killing unowned
processes, proc's in-same-login-session rule should apply to us
@@ -703,11 +702,10 @@ main(int argc, char *argv[])
if (err)
error (40, err, "Port reauth failure");
- /* These are the default values for the child's root/cwd. We don't want to
+ /* These are the default values for the child's root. We don't want to
modify PORTS just yet, because we use it to do child-authenticated
lookups. */
root = ports[INIT_PORT_CRDIR];
- cwd = ports[INIT_PORT_CWDIR];
/* Find the shell executable (we copy the name, as ARGS may be changed). */
if (shell_arg && sh_args && *sh_args)
@@ -762,13 +760,15 @@ main(int argc, char *argv[])
arg = envz_get (args, args_len, "HOME");
if (arg && *arg)
{
- cwd = child_lookup (arg, 0, O_RDONLY);
+ mach_port_t cwd = child_lookup (arg, 0, O_RDONLY);
if (cwd == MACH_PORT_NULL)
{
error (0, errno, "%s", arg);
error (0, 0, "Using HOME=/");
envz_add (&args, &args_len, "HOME", "/");
}
+ else
+ ports[INIT_PORT_CWDIR] = cwd;
}
arg = envz_get (args, args_len, "ROOT");
@@ -835,7 +835,7 @@ main(int argc, char *argv[])
if (err)
error (21, err, "Error building shell args");
- /* Maybe output the message of the day. Note that we we the child's
+ /* Maybe output the message of the day. Note that we use the child's
authentication to do it, so that this program can't be used to read
arbitrary files! */
arg = envz_get (args, args_len, "MOTD");
@@ -855,9 +855,8 @@ main(int argc, char *argv[])
}
/* Now that we don't need to use PORTS for lookups anymore, put the correct
- ROOT and CWD in. */
+ ROOT in. */
ports[INIT_PORT_CRDIR] = root;
- ports[INIT_PORT_CWDIR] = cwd;
/* Get rid of any accumulated null entries in env. */
envz_strip (&env, &env_len);
diff --git a/utils/mount.c b/utils/mount.c
index 8e593aac..8b059c23 100644
--- a/utils/mount.c
+++ b/utils/mount.c
@@ -48,7 +48,7 @@ static const struct argp_option argp_opts[] =
{"timeout", 'T', "MILLISECONDS", 0, "Timeout for translator startup"},
{"format", 'p', "mount|fstab|translator", OPTION_ARG_OPTIONAL,
"Output format for query (no filesystem arguments)"},
- {"options", 'o', "OPTIONS", 0, "A `,' seperated list of options"},
+ {"options", 'o', "OPTIONS", 0, "A `,' separated list of options"},
{"readonly", 'r', 0, 0, "Never write to disk or allow opens for writing"},
{"writable", 'w', 0, 0, "Use normal read/write behavior"},
{"update", 'u', 0, 0, "Flush any meta-data cached in core"},
@@ -248,7 +248,7 @@ do_mount (struct fs *fs, int remount)
{
ARGZ (add (&fsopts, &fsopts_len, o));
}
- else
+ else if (strcmp (o, "defaults") != 0)
{
/* Prepend `--' to the option to make a long option switch,
e.g. `--ro' or `--rsize=1024'. */
diff --git a/utils/ps.c b/utils/ps.c
index 6f209655..992b467d 100644
--- a/utils/ps.c
+++ b/utils/ps.c
@@ -324,6 +324,28 @@ main(int argc, char *argv[])
state->child_inputs[0] = &pids_argp_params;
break;
+ case ARGP_KEY_SUCCESS:
+ /* Select an explicit format string if FMT_STRING is a format
+ name. This is done here because parse_enum needs STATE. */
+ {
+ const char *fmt_name (unsigned n)
+ {
+ return
+ n >= (sizeof output_fmts / sizeof *output_fmts)
+ ? 0
+ : output_fmts[n].name;
+ }
+ int fmt_index = parse_enum (fmt_string, fmt_name,
+ "format type", 1, state);
+ if (fmt_index >= 0)
+ {
+ fmt_string = output_fmts[fmt_index].fmt;
+ if (sort_key_name == NULL)
+ sort_key_name = output_fmts[fmt_index].sort_key;
+ }
+ }
+ break;
+
default:
return ARGP_ERR_UNKNOWN;
}
@@ -343,24 +365,6 @@ main(int argc, char *argv[])
/* Parse our command line. This shouldn't ever return an error. */
argp_parse (&argp, argc, argv, 0, 0, 0);
- /* Select an explicit format string if FMT_STRING is a format name. */
- {
- const char *fmt_name (unsigned n)
- {
- return
- n >= (sizeof output_fmts / sizeof *output_fmts)
- ? 0
- : output_fmts[n].name;
- }
- int fmt_index = parse_enum (fmt_string, fmt_name, "format type", 1, 0);
- if (fmt_index >= 0)
- {
- fmt_string = output_fmts[fmt_index].fmt;
- if (sort_key_name == NULL)
- sort_key_name = output_fmts[fmt_index].sort_key;
- }
- }
-
err = proc_stat_list_create(context, &procset);
if (err)
error(1, err, "proc_stat_list_create");
diff --git a/utils/rpctrace.c b/utils/rpctrace.c
index d80f41dd..996d4bae 100644
--- a/utils/rpctrace.c
+++ b/utils/rpctrace.c
@@ -1,6 +1,6 @@
/* Trace RPCs sent to selected ports
- Copyright (C) 1998, 1999, 2001, 2002, 2003, 2005, 2006
+ Copyright (C) 1998, 1999, 2001, 2002, 2003, 2005, 2006, 2009, 2011
Free Software Foundation, Inc.
This file is part of the GNU Hurd.
@@ -44,6 +44,8 @@ const char *argp_program_version = STANDARD_HURD_VERSION (rpctrace);
#define STD_MSGIDS_DIR DATADIR "/msgids/"
+static unsigned strsize = 80;
+
#define OPT_NOSTDINC -1
static const struct argp_option options[] =
{
@@ -56,6 +58,7 @@ static const struct argp_option options[] =
{0, 'I', "DIR", 0,
"Add the directory DIR to the list of directories to be searched for files "
"containing message ID numbers."},
+ {0, 's', "SIZE", 0, "Specify the maximum string size to print (the default is 80)."},
{0}
};
@@ -631,11 +634,13 @@ print_contents (mach_msg_header_t *inp,
else
type->msgt_name = name;
}
- else if (newtypes[0] != name)
- if (type->msgt_longform)
- lt->msgtl_name = newtypes[0];
- else
- type->msgt_name = newtypes[0];
+ else if (nelt > 0 && newtypes[0] != name)
+ {
+ if (type->msgt_longform)
+ lt->msgtl_name = newtypes[0];
+ else
+ type->msgt_name = newtypes[0];
+ }
}
else
print_data (name, data, nelt, eltsize);
@@ -955,6 +960,8 @@ print_data (mach_msg_type_name_t type,
case MACH_MSG_TYPE_STRING:
case MACH_MSG_TYPE_CHAR:
+ if (nelt > strsize)
+ nelt = strsize;
fprintf (ostream, "\"%.*s\"",
(int) (nelt * eltsize), (const char *) data);
return;
@@ -1149,6 +1156,10 @@ main (int argc, char **argv, char **envp)
arg, TRUE);
break;
+ case 's':
+ strsize = atoi (arg);
+ break;
+
case ARGP_KEY_NO_ARGS:
argp_usage (state);
return EINVAL;
diff --git a/utils/settrans.c b/utils/settrans.c
index d2d30a69..a8814016 100644
--- a/utils/settrans.c
+++ b/utils/settrans.c
@@ -45,8 +45,8 @@ const char *argp_program_version = STANDARD_HURD_VERSION (settrans);
static struct argp_option options[] =
{
- {"active", 'a', 0, 0, "Set NODE's active translator" },
- {"passive", 'p', 0, 0, "Set NODE's passive translator" },
+ {"active", 'a', 0, 0, "Start TRANSLATOR and set it as NODE's active translator" },
+ {"passive", 'p', 0, 0, "Change NODE's passive translator record (default)" },
{"create", 'c', 0, 0, "Create NODE if it doesn't exist" },
{"dereference", 'L', 0, 0, "If a translator exists, put the new one on top"},
{"pause", 'P', 0, 0, "When starting an active translator, prompt and"
diff --git a/utils/shd.c b/utils/shd.c
index 0587fa42..a1a4b26b 100644
--- a/utils/shd.c
+++ b/utils/shd.c
@@ -86,7 +86,7 @@ run (char **argv, int fd0, int fd1)
file = file_name_lookup (program, O_EXEC, 0);
if (file == MACH_PORT_NULL)
{
- error (0, errno, program);
+ error (0, errno, "%s", program);
return -1;
}
else
diff --git a/utils/storeinfo.c b/utils/storeinfo.c
index 411bf11a..a738d50d 100644
--- a/utils/storeinfo.c
+++ b/utils/storeinfo.c
@@ -204,7 +204,7 @@ main (int argc, char *argv[])
struct store *store;
if (file == MACH_PORT_NULL)
- error (3, err, source);
+ error (3, err, "%s", source);
if (print_prefix < 0)
/* By default, only print filename prefixes for multiple files. */
@@ -220,7 +220,7 @@ main (int argc, char *argv[])
of what the unknown data looked like. */
err = store_create (file, STORE_INACTIVE|STORE_NO_FILEIO, 0, &store);
if (err)
- error (4, err, source);
+ error (4, err, "%s", source);
print_store (store, 0, what);
store_free (store);
diff --git a/utils/vmstat.c b/utils/vmstat.c
index 86494dce..7d852992 100644
--- a/utils/vmstat.c
+++ b/utils/vmstat.c
@@ -111,7 +111,7 @@ print_val (val_t val, enum val_type type,
float fval = val;
char *units = " KMGT", *u = units;
- while (fval > 1024)
+ while (fval >= 10000)
{
fval /= 1024;
u++;
@@ -456,7 +456,7 @@ main (int argc, char **argv)
if (field->standard)
output_fields |= (1 << (field - fields));
- /* Returns an appropiate SIZE_UNITS for printing FIELD. */
+ /* Returns an appropriate SIZE_UNITS for printing FIELD. */
#define SIZE_UNITS(field) \
(size_units >= 0 \
? size_units \
diff --git a/utils/w.c b/utils/w.c
index 43bce025..37555088 100644
--- a/utils/w.c
+++ b/utils/w.c
@@ -253,7 +253,7 @@ static void
add_utmp_procs (struct proc_stat_list *procs, struct utmp *u)
{
/* The tty name, with space for '\0' termination and an
- appropiate prefix. */
+ appropriate prefix. */
char tty[sizeof _PATH_DEV + sizeof u->ut_line];
io_t tty_node;
error_t err;