diff options
author | Thomas Bushnell <thomas@gnu.org> | 1996-08-12 18:31:04 +0000 |
---|---|---|
committer | Thomas Bushnell <thomas@gnu.org> | 1996-08-12 18:31:04 +0000 |
commit | 9474c6318ad2effa3e80246d1012cb111e726bf0 (patch) | |
tree | b1f5dbfbd38913dcc4ebf721f81443472937dec0 | |
parent | 4b4fc640461f0f6e152204deda38a4e9272fe9e1 (diff) |
*** empty log message ***
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | Makeconf | 4 | ||||
-rw-r--r-- | TODO | 12 | ||||
-rw-r--r-- | boot/ChangeLog | 7 | ||||
-rw-r--r-- | boot/Makefile | 4 | ||||
-rw-r--r-- | config.make.in | 6 | ||||
-rw-r--r-- | ext2fs/ChangeLog | 4 | ||||
-rw-r--r-- | ext2fs/hyper.c | 5 | ||||
-rw-r--r-- | hurd/=pending-changes | 2 | ||||
-rw-r--r-- | init/ChangeLog | 21 | ||||
-rw-r--r-- | init/init.c | 85 | ||||
-rw-r--r-- | libdiskfs/ChangeLog | 10 | ||||
-rw-r--r-- | libdiskfs/dev-io.c | 13 | ||||
-rw-r--r-- | libdiskfs/diskfs.h | 2 | ||||
-rw-r--r-- | libdiskfs/readonly.c | 13 | ||||
-rw-r--r-- | libports/ChangeLog | 5 | ||||
-rw-r--r-- | libports/ports.h | 14 | ||||
-rw-r--r-- | nfs/ChangeLog | 18 | ||||
-rw-r--r-- | nfs/mount.c | 2 | ||||
-rw-r--r-- | nfs/nfs.c | 35 | ||||
-rw-r--r-- | nfs/nfs.h | 3 | ||||
-rw-r--r-- | nfs/rpcsvc/nfs_prot.h | 15 | ||||
-rw-r--r-- | nfsd/ChangeLog | 19 | ||||
-rw-r--r-- | nfsd/Makefile | 2 | ||||
-rw-r--r-- | nfsd/loop.c | 2 | ||||
-rw-r--r-- | nfsd/main.c | 7 | ||||
-rw-r--r-- | nfsd/nfsd.h | 2 | ||||
-rw-r--r-- | nfsd/xdr.c | 21 | ||||
-rw-r--r-- | release/SOURCES.0.0 | 2 | ||||
-rw-r--r-- | release/checklist | 1 | ||||
-rw-r--r-- | term/ChangeLog | 2 | ||||
-rw-r--r-- | term/term.h | 2 | ||||
-rw-r--r-- | ufs-fsck/ChangeLog | 4 | ||||
-rw-r--r-- | ufs-fsck/Makefile | 2 | ||||
-rw-r--r-- | ufs/ChangeLog | 11 | ||||
-rw-r--r-- | ufs/devio.c | 70 | ||||
-rw-r--r-- | ufs/hyper.c | 25 | ||||
-rw-r--r-- | ufs/inode.c | 4 |
38 files changed, 320 insertions, 141 deletions
@@ -1,3 +1,8 @@ +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'. @@ -292,8 +292,8 @@ relink: # Building libraries from other directories. We force both libraries to be # built if either is, because it will use the appropriate one even if the other # is specified in someone's dependency list. -../%.a ../%.so: FORCE - $(MAKE) -C $(dir $@) libs +#../%.a ../%.so: FORCE +# $(MAKE) -C $(dir $@) libs # Tell make where to find other -l libraries that we use vpath libutil.% $(libdir)/ @@ -23,7 +23,9 @@ See `tasks', the exported task list. * Libraries ** general: -*** fsys_get_options should return: prog name in argv[0]; non-option program args, e.g. the diskfs device, or nfs mount +*** fsys_get_options should return: prog name in argv[0]; non-option + program args, e.g. the diskfs device, or nfs mount +*** Enable compilation without -O ** libmom work: *** Hack interface definitions so that args are mom-ish @@ -42,7 +44,6 @@ See `tasks', the exported task list. special-case interrupt_operation. *** Drop wire parms to manage-operations; instead have a new-thread hook function. -*** Add ports_create_port_noinstall to ports.h. ** libstore: *** test it and make diskfs use it. @@ -69,9 +70,7 @@ See `tasks', the exported task list. getopt into more primitive functions, which both argp and getopt can call. - ** libdiskfs -*** detect write-protected media and turn on diskfs_readonly *** Add the short-circuited-but-not-builtin translator startup code from dir-lookup to fsys_getroot. Compare and match carefully these two routines and then share common code. @@ -117,7 +116,6 @@ See `tasks', the exported task list. *** Wizzior columnation (autosizing?) *** Make getters more robust. - * Servers ** write default pager ** Implement goaway in all the servers that don't already have it. @@ -185,8 +183,7 @@ See `tasks', the exported task list. *** Write core files. ** init -*** SIGHUP and SIGQUIT don't seem to do the right thing. - +*** SIGHUP and SIGTERM don't seem to do the right thing. * Utilities ** Write a real mount program. @@ -206,7 +203,6 @@ See `tasks', the exported task list. ** fsck should use (not-yet-added) fsys_get_options returned device instead of /etc/fstab. - ** ps: *** ps should timeout quickly (one second?) on non-responsive message ports. *** help displays for: stat letters, format specs. diff --git a/boot/ChangeLog b/boot/ChangeLog index 19d13d51..fa66def0 100644 --- a/boot/ChangeLog +++ b/boot/ChangeLog @@ -1,3 +1,10 @@ +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'. diff --git a/boot/Makefile b/boot/Makefile index 30838e5d..a1329b5a 100644 --- a/boot/Makefile +++ b/boot/Makefile @@ -36,9 +36,9 @@ include ../Makeconf #/usr/local/bin/uxboot: uxboot # cp $< $@ -all: boot uxboot +all: boot # uxboot -ourdevice.defs: $(includedir)/device/device.defs +ourdevice.defs: $(install_includedir)/device/device.defs sed -e '/out device : device_t/s/device_t/mach_port_send_t/' $< > $@ boot: ../libthreads/libthreads.so diff --git a/config.make.in b/config.make.in index 4dbe7513..427347ab 100644 --- a/config.make.in +++ b/config.make.in @@ -20,6 +20,12 @@ sysconfdir = $(prefix)/etc localstatedir = $(prefix)/var sharedstatedir = $(prefix)/com +# Where the installation dir is to be found during compilation +install_prefix = @install_prefix@ + +# Where to find libc header files during compilation +install_includedir = $(install_prefix)/include + # All of those directories together: installationdirlist = $(hurddir) $(libdir) $(bindir) $(sbindir) \ $(includedir) $(libexecdir) $(infodir) $(sysconfdir) \ diff --git a/ext2fs/ChangeLog b/ext2fs/ChangeLog index d8741b9c..235c4d6e 100644 --- a/ext2fs/ChangeLog +++ b/ext2fs/ChangeLog @@ -1,3 +1,7 @@ +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 diff --git a/ext2fs/hyper.c b/ext2fs/hyper.c index f46d0fcb..293574a6 100644 --- a/ext2fs/hyper.c +++ b/ext2fs/hyper.c @@ -144,7 +144,7 @@ get_hypermetadata (void) vm_allocate (mach_task_self (), &zeroblock, block_size, 1); } -void +error_t diskfs_set_hypermetadata (int wait, int clean) { if (clean && ext2fs_clean && !(sblock->s_state & EXT2_VALID_FS)) @@ -168,6 +168,9 @@ diskfs_set_hypermetadata (int wait, int clean) } sync_global (wait); + + /* Should check writability here and return EROFS if necessary. XXX */ + return 0; } void diff --git a/hurd/=pending-changes b/hurd/=pending-changes index 33660b46..df3efdcf 100644 --- a/hurd/=pending-changes +++ b/hurd/=pending-changes @@ -18,6 +18,8 @@ abort auth_user_authenticate when it's dead. Add io_revoke. +Add optional timeout arg to msg.defs. + Not user visible: diff --git a/init/ChangeLog b/init/ChangeLog index 5e1d8a2b..09c325bb 100644 --- a/init/ChangeLog +++ b/init/ChangeLog @@ -1,3 +1,24 @@ +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. diff --git a/init/init.c b/init/init.c index 58a33410..40d96a6f 100644 --- a/init/init.c +++ b/init/init.c @@ -113,6 +113,7 @@ struct terminal int on; int pid; + int read; char *name; }; @@ -474,13 +475,38 @@ run_for_real (char *filename, char *args, int arglen, mach_port_t ctty, /** /etc/ttys support **/ +/* Set up the getty and window fields of terminal spec T corresponding + to line TT. */ +void +setup_terminal (struct terminal *t, struct ttyent *tt) +{ + char *line; + + if (t->getty_argz) + free (t->getty_argz); + if (t->window_argz) + free (t->window_argz); + + if ((tt->ty_status & TTY_ON) && tt->ty_getty) + { + asprintf (&line, "%s %s", tt->ty_getty, tt->ty_name); + argz_create_sep (line, ' ', &t->getty_argz, &t->getty_argz_len); + if (tt->ty_window) + argz_create_sep (tt->ty_window, ' ', + &t->window_argz, &t->window_argz_len); + else + t->window_argz = 0; + } + else + t->getty_argz = t->window_argz = 0; +} + /* Add a new terminal spec for TT and return it. */ struct terminal * add_terminal (struct ttyent *tt) { struct terminal *t; - char *line; if (nttys >= ttyslen) { @@ -495,30 +521,12 @@ add_terminal (struct ttyent *tt) t->name = malloc (strlen (tt->ty_name) + 1); strcpy (t->name, tt->ty_name); + setup_terminal (t, tt); if (t->getty_argz) - free (t->getty_argz); - if (t->window_argz) - free (t->window_argz); + t->on = 1; - if ((tt->ty_status & TTY_ON) && tt->ty_getty) - { - asprintf (&line, "%s %s", tt->ty_getty, tt->ty_name); - argz_create_sep (line, ' ', &t->getty_argz, &t->getty_argz_len); - if (tt->ty_window) - argz_create_sep (tt->ty_window, ' ', - &t->window_argz, &t->window_argz_len); - else - t->window_argz = 0; - t->on = 1; - } - else - { - t->getty_argz = t->window_argz = 0; - t->on = 0; - } return t; } - /* Read /etc/ttys and initialize ttys array. Return non-zero if we fail. */ int @@ -649,22 +657,34 @@ restart_terminal (int pid) } } +/* Shutdown the things running on terminal spec T. */ +void +shutdown_terminal (struct terminal *t) +{ + kill (t->pid, SIGHUP); + /* revoke?? */; +} + /* Re-read /etc/ttys. If a line has turned off, kill what's there. - If a line has turned on, start it. If an on line has changed, - kill it, and then restart it. */ + If a line has turned on, start it. */ void reread_ttys (void) { struct ttyent *tt; struct terminal *t; int on; - + int i; + if (!setttyent ()) { error (0, errno, "%s", _PATH_TTYS); return; } + /* Mark all the lines not yet read */ + for (i = 0; i < nttys; i++) + ttys[i].read = 0; + while ((tt = getttyent ())) { if (!tt->ty_name) @@ -678,11 +698,12 @@ reread_ttys (void) if (t->on && !on) { t->on = 0; - kill (t->pid, SIGHUP); + shutdown_terminal (t); } else if (!t->on && on) { t->on = 1; + setup_terminal (t, tt); startup_terminal (t); } } @@ -692,8 +713,18 @@ reread_ttys (void) if (on) startup_terminal (t); } + + t->read = 1; } endttyent (); + + /* Scan tty entries; any that were not found and were on, turn off. */ + for (i = 0; i < nttys; i++) + if (!ttys[i].read && ttys[i].on) + { + ttys[i].on = 0; + shutdown_terminal (&ttys[i]); + } } @@ -1213,8 +1244,10 @@ kill_everyone (int signo) { /* Skip this one */ mach_port_deallocate (mach_task_self (), tk); - continue; + break; } + if (es) + continue; /* Kill it */ if (signo == SIGKILL) diff --git a/libdiskfs/ChangeLog b/libdiskfs/ChangeLog index 531ad50b..d5ea48a4 100644 --- a/libdiskfs/ChangeLog +++ b/libdiskfs/ChangeLog @@ -1,5 +1,15 @@ +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. diff --git a/libdiskfs/dev-io.c b/libdiskfs/dev-io.c index 9d0ed9d0..d3be449f 100644 --- a/libdiskfs/dev-io.c +++ b/libdiskfs/dev-io.c @@ -1,5 +1,5 @@ /* Device input and output - Copyright (C) 1992, 1993, 1994, 1995 Free Software Foundation, Inc. + Copyright (C) 1992, 1993, 1994, 1995, 1996 Free Software Foundation, Inc. This file is part of the GNU Hurd. @@ -29,10 +29,15 @@ error_t diskfs_device_write_sync (off_t addr, vm_address_t data, size_t len) { int written; + error_t err; + assert (!diskfs_readonly); - if (device_write (diskfs_device, 0, diskfs_device_start + addr, - (io_buf_ptr_t) data, len, &written) - || written != len) + err = device_write (diskfs_device, 0, diskfs_device_start + addr, + (io_buf_ptr_t) data, len, &written); + + if (err == D_READ_ONLY) + return EROFS; + else if (err || written != len) return EIO; return 0; } diff --git a/libdiskfs/diskfs.h b/libdiskfs/diskfs.h index 8cada32f..fe8374de 100644 --- a/libdiskfs/diskfs.h +++ b/libdiskfs/diskfs.h @@ -364,7 +364,7 @@ error_t diskfs_grow (struct node *np, off_t size, struct protid *cred); metadata. If CLEAN is nonzero, then after this is written the filesystem will be absolutely clean, and the non-paged metadata can so indicate. */ -void diskfs_set_hypermetadata (int wait, int clean); +error_t diskfs_set_hypermetadata (int wait, int clean); /* The user must define this function. Allocate a new node to be of mode MODE in locked directory DP (don't actually set the mode or diff --git a/libdiskfs/readonly.c b/libdiskfs/readonly.c index 18ade09a..17ed312e 100644 --- a/libdiskfs/readonly.c +++ b/libdiskfs/readonly.c @@ -21,6 +21,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include <fcntl.h> +#include <error.h> #include "priv.h" @@ -29,13 +30,23 @@ int _diskfs_diskdirty; int diskfs_check_readonly () { + error_t err; + if (diskfs_readonly) return 1; else { if (!_diskfs_diskdirty) { - diskfs_set_hypermetadata (1, 0); + err = diskfs_set_hypermetadata (1, 0); + if (err) + { + error (0, 0, + "%s: MEDIA NOT WRITABLE; switching to READ-ONLY", + diskfs_device_arg); + diskfs_readonly = 1; + return 1; + } _diskfs_diskdirty = 1; } return 0; diff --git a/libports/ChangeLog b/libports/ChangeLog index 2a50f7ce..a81fdd34 100644 --- a/libports/ChangeLog +++ b/libports/ChangeLog @@ -1,3 +1,8 @@ +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. diff --git a/libports/ports.h b/libports/ports.h index 2d52daa4..aba53a4d 100644 --- a/libports/ports.h +++ b/libports/ports.h @@ -162,6 +162,18 @@ error_t ports_create_port (struct port_class *class, struct port_bucket *bucket, size_t size, void *result); + +/* Just like ports_create_port, except don't actually put the port + into the portset underlying BUCKET. This is intended to be used + for cases where the port right must be given out before the port is + fully initialized; with this call you are guaranteed that no RPC + service will occur on the port until you have finished initializing + it and installed it into the portset yourself. */ +error_t +ports_create_port_noinstall (struct port_class *class, + struct port_bucket *bucket, + size_t size, + void *result); /* For an existing RECEIVE right, create and return in RESULT a new port structure; BUCKET, SIZE, and CLASS args are as for ports_create_port. */ @@ -376,5 +388,7 @@ extern int _ports_flags; #define _PORTS_BLOCKED PORTS_BLOCKED #define _PORTS_INHIBIT_WAIT PORTS_INHIBIT_WAIT void _ports_complete_deallocate (struct port_info *); +error_t _ports_create_port_internal (struct port_class *, struct port_bucket *, + size_t, void *, int); #endif diff --git a/nfs/ChangeLog b/nfs/ChangeLog index e213507e..23d5ba38 100644 --- a/nfs/ChangeLog +++ b/nfs/ChangeLog @@ -1,3 +1,21 @@ +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 diff --git a/nfs/mount.c b/nfs/mount.c index 59363073..687257c1 100644 --- a/nfs/mount.c +++ b/nfs/mount.c @@ -59,6 +59,8 @@ short nfs_port = NFS_PORT; /* True iff NFS_PORT should be used even if portmapper present. */ int nfs_port_override = 0; +int protocol_version = 2; + /* Set up an RPC for procedure PROCNUM for talking to the portmapper. Allocate storage with malloc and point *BUF at it; caller must free this when done. Return the address where the args for the @@ -401,8 +401,39 @@ nfs_error_trans (int error) return ESTALE; case NFSERR_WFLUSH: - default: + /* Not known in v3, but we just give EINVAL for unknown errors + so it's the same. */ return EINVAL; + + default: + if (protocol_version == 2) + return EINVAL; + else + switch (error) + { + case NFSERR_XDEV: + return EXDEV; + + case NFSERR_INVAL: + case NFSERR_REMOTE: /* not sure about this one */ + default: + return EINVAL; + + case NFSERR_MLINK: + return EMLINK; + + case NFSERR_NOTSUPP: + return EOPNOTSUPP; + + case NFSERR_BADHANDLE: + case NFSERR_NOT_SYNC: + case NFSERR_BAD_COOKIE: + case NFSERR_TOOSMALL: + case NFSERR_SERVERFAULT: /* perhaps EIO instead?? */ + case NFSERR_BADTYPE: + case NFSERR_JUKEBOX: /* ??? */ + /* These indicate bugs in the client, so EGRATUITOUS is right. */ + return EGRATUITOUS; + } } } - @@ -142,6 +142,9 @@ extern short nfs_port; portmapper. */ extern int nfs_port_override; +/* Which NFS protocol version we are using */ +extern int protocol_version; + /* Count how many four-byte chunks it takss to hold LEN bytes. */ #define INTSIZE(len) (((len)+3)>>2) diff --git a/nfs/rpcsvc/nfs_prot.h b/nfs/rpcsvc/nfs_prot.h index 7f974930..a5af07e0 100644 --- a/nfs/rpcsvc/nfs_prot.h +++ b/nfs/rpcsvc/nfs_prot.h @@ -22,17 +22,30 @@ enum nfsstat { NFSERR_NXIO = 6, NFSERR_ACCES = 13, NFSERR_EXIST = 17, + NFSERR_XDEV = 18, /* v3 only */ NFSERR_NODEV = 19, NFSERR_NOTDIR = 20, NFSERR_ISDIR = 21, + NFSERR_INVAL = 22, /* v3 only */ NFSERR_FBIG = 27, NFSERR_NOSPC = 28, NFSERR_ROFS = 30, + NFSERR_MLINK = 31, /* v3 only */ NFSERR_NAMETOOLONG = 63, NFSERR_NOTEMPTY = 66, NFSERR_DQUOT = 69, NFSERR_STALE = 70, - NFSERR_WFLUSH = 99, + NFSERR_REMOTE = 71, /* v3 only */ + NFSERR_WFLUSH = 99, /* v2 only */ + NFSERR_BADHANDLE = 10001, /* v3 only */ + NFSERR_NOT_SYNC = 10002, /* v3 only */ + NFSERR_BAD_COOKIE = 10003, /* v3 only */ + NFSERR_NOTSUPP = 10004, /* v3 only */ + NFSERR_TOOSMALL = 10005, /* v3 only */ + NFSERR_SERVERFAULT = 10006, /* v3 only */ + NFSERR_BADTYPE = 10007, /* v3 only */ + NFSERR_JUKEBOX = 10008, /* v3 only */ +#define NFSERR_TRYLATER NFSERR_JUKEBOX }; typedef enum nfsstat nfsstat; bool_t xdr_nfsstat(); diff --git a/nfsd/ChangeLog b/nfsd/ChangeLog index 08f6dbb5..6edf4199 100644 --- a/nfsd/ChangeLog +++ b/nfsd/ChangeLog @@ -1,3 +1,22 @@ +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. diff --git a/nfsd/Makefile b/nfsd/Makefile index 4460b4ba..265301f3 100644 --- a/nfsd/Makefile +++ b/nfsd/Makefile @@ -29,6 +29,6 @@ installationdir = $(sbindir) include ../Makeconf -CPPFLAGS += -DLOCALSTATEDIR=$(localstatedir) +CPPFLAGS += -DLOCALSTATEDIR=\"$(localstatedir)\" nfsd: ../libthreads/libthreads.a ../libshouldbeinlibc/libshouldbeinlibc.a
\ No newline at end of file diff --git a/nfsd/loop.c b/nfsd/loop.c index c7053234..38edae62 100644 --- a/nfsd/loop.c +++ b/nfsd/loop.c @@ -195,7 +195,7 @@ server_loop (int fd) if (proc->process_error && err) { r = errloc; - *r++ = htonl (nfs_error_trans (err)); + *r++ = htonl (nfs_error_trans (err, version)); } cred_rele (cred); diff --git a/nfsd/main.c b/nfsd/main.c index b4b8464a..d4d040c6 100644 --- a/nfsd/main.c +++ b/nfsd/main.c @@ -27,8 +27,7 @@ int main_udp_socket, pmap_udp_socket; struct sockaddr_in main_address, pmap_address; -#define INDEX_FILE_NAME(dir) # dir "/state/misc/nfsd.index" -static char index_file[] = INDEX_FILE_NAME (LOCALSTATEDIR); +static char index_file[] = LOCALSTATEDIR "/state/misc/nfsd.index"; char *index_file_name = index_file; int @@ -79,11 +78,11 @@ main (int argc, char **argv) init_filesystems (); cthread_detach (cthread_fork ((cthread_fn_t) server_loop, - pmap_udp_socket)); + (any_t) pmap_udp_socket)); while (nthreads--) cthread_detach (cthread_fork ((cthread_fn_t) server_loop, - main_udp_socket)); + (any_t) main_udp_socket)); for (;;) { diff --git a/nfsd/nfsd.h b/nfsd/nfsd.h index 0ea93703..c8ec86e2 100644 --- a/nfsd/nfsd.h +++ b/nfsd/nfsd.h @@ -116,7 +116,7 @@ void server_loop (int); extern struct proctable nfstable, mounttable, pmaptable; /* xdr.c */ -int nfs_error_trans (error_t); +int nfs_error_trans (error_t, int); int *encode_fattr (int *, struct stat *); int *decode_name (int *, char **); int *encode_fhandle (int *, char *); @@ -139,7 +139,7 @@ encode_statfs (int *p, struct statfs *st) /* Return an NFS error corresponding to Hurd error ERR. */ int -nfs_error_trans (error_t err) +nfs_error_trans (error_t err, int version) { switch (err) { @@ -153,7 +153,6 @@ nfs_error_trans (error_t err) return NFSERR_NOENT; case EIO: - default: return NFSERR_IO; case ENXIO: @@ -194,6 +193,24 @@ nfs_error_trans (error_t err) case ESTALE: return NFSERR_STALE; + + default: + if (version == 2) + return NFSERR_IO; + else switch (err) + { + case EXDEV: + return NFSERR_XDEV; + + case EINVAL: + return NFSERR_INVAL; + + case EOPNOTSUPP: + return NFSERR_NOTSUPP; /* are we sure here? */ + + default: + return NFSERR_IO; + } } } diff --git a/release/SOURCES.0.0 b/release/SOURCES.0.0 index e75c176b..1f561ad6 100644 --- a/release/SOURCES.0.0 +++ b/release/SOURCES.0.0 @@ -2,7 +2,7 @@ Sources for binaries in Hurd version 0.0. The following packages were built from the sources of the indicated -version in ftp://prep.gnu.ai.edu/pub.gnu according to the provided +version in ftp://prep.gnu.ai.edu/pub/gnu according to the provided instructions without modification: autoconf (2.10) diff --git a/release/checklist b/release/checklist index 13c31f65..4d3cc4b5 100644 --- a/release/checklist +++ b/release/checklist @@ -1,6 +1,7 @@ Checklist for Hurd releases. * Symlinks in /bin; esp. sh, awk, more, cc. +* Check all symlinks to make sure they don't reference /gd4/hurdinst. * Build some static fileutils: ls, ln, cp, mv, chmod. * Make sure /i486-gnu contains hard links, not copies. * Make sure we are using Hurd versions of su and uptime, not sh-utils. diff --git a/term/ChangeLog b/term/ChangeLog index aceb513b..986cf2e6 100644 --- a/term/ChangeLog +++ b/term/ChangeLog @@ -1,5 +1,7 @@ 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. diff --git a/term/term.h b/term/term.h index 44a5e248..b30ac826 100644 --- a/term/term.h +++ b/term/term.h @@ -40,7 +40,7 @@ #define CHAR_USER_QUOTE '\377' /* break quoting, etc. */ /* This bit specifies control */ -#define CTRL_BIT 0x20 +#define CTRL_BIT 0x40 /* XXX These belong in <termios.h> */ #define ILCASE (1 << 14) diff --git a/ufs-fsck/ChangeLog b/ufs-fsck/ChangeLog index 8fcde4b2..615e6458 100644 --- a/ufs-fsck/ChangeLog +++ b/ufs-fsck/ChangeLog @@ -1,3 +1,7 @@ +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 diff --git a/ufs-fsck/Makefile b/ufs-fsck/Makefile index f68fe52a..8725de8e 100644 --- a/ufs-fsck/Makefile +++ b/ufs-fsck/Makefile @@ -18,7 +18,7 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -dir := fsck +dir := ufs-fsck makemode := utility SRCS = dir.c main.c pass1.c pass1b.c pass2.c pass3.c pass4.c \ diff --git a/ufs/ChangeLog b/ufs/ChangeLog index c541523e..2b964cf9 100644 --- a/ufs/ChangeLog +++ b/ufs/ChangeLog @@ -1,5 +1,16 @@ +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 diff --git a/ufs/devio.c b/ufs/devio.c deleted file mode 100644 index 2e5cc332..00000000 --- a/ufs/devio.c +++ /dev/null @@ -1,70 +0,0 @@ -/* Device input and output - Copyright (C) 1992, 1993, 1994 Free Software Foundation - -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. */ - -/* Written by Michael I. Bushnell. */ - -#include "ufs.h" -#include <device/device.h> -#include <device/device_request.h> - -/* Write disk block ADDR with DATA of LEN bytes, waiting for completion. */ -error_t -dev_write_sync (daddr_t addr, - vm_address_t data, - long len) -{ - int foo; - assert (!diskfs_readonly); - if (device_write (ufs_device, 0, addr, (io_buf_ptr_t) data, len, &foo) - || foo != len) - return EIO; - return 0; -} - -/* Write diskblock ADDR with DATA of LEN bytes; don't bother waiting - for completion. */ -error_t -dev_write (daddr_t addr, - vm_address_t data, - long len) -{ - assert (!diskfs_readonly); - if (device_write_request (ufs_device, MACH_PORT_NULL, 0, addr, - (io_buf_ptr_t) data, len)) - return EIO; - return 0; -} - -static int deverr; - -/* Read disk block ADDR; put the address of the data in DATA; read LEN - bytes. Always *DATA should be a full page no matter what. */ -error_t -dev_read_sync (daddr_t addr, - vm_address_t *data, - long len) -{ - int foo; - deverr = device_read (ufs_device, 0, addr, len, (io_buf_ptr_t *)data, - (u_int *)&foo); - if (deverr || foo != len) - return EIO; - return 0; -} - diff --git a/ufs/hyper.c b/ufs/hyper.c index e4f58249..cb644797 100644 --- a/ufs/hyper.c +++ b/ufs/hyper.c @@ -276,7 +276,7 @@ get_hypermetadata (void) taken from ordinary data blocks and might not be an even number of pages; in that case writing it through the pager would nuke whatever pages came after it on the disk and were backed by file pagers. */ -void +error_t diskfs_set_hypermetadata (int wait, int clean) { vm_address_t buf; @@ -294,16 +294,22 @@ diskfs_set_hypermetadata (int wait, int clean) err = diskfs_device_read_sync (fsbtodb (sblock, sblock->fs_csaddr), &buf, bufsize); - if (!err) + if (err) + return err; + + bcopy (csum, (void *) buf, sblock->fs_cssize); + if (swab_disk) + swab_csums ((struct csum *)buf); + err = diskfs_device_write_sync (fsbtodb (sblock, sblock->fs_csaddr), + buf, bufsize); + vm_deallocate (mach_task_self (), buf, bufsize); + + if (err) { - bcopy (csum, (void *) buf, sblock->fs_cssize); - if (swab_disk) - swab_csums ((struct csum *)buf); - diskfs_device_write_sync (fsbtodb (sblock, sblock->fs_csaddr), - buf, bufsize); - csum_dirty = 0; - vm_deallocate (mach_task_self (), buf, bufsize); + spin_unlock (&alloclock); + return err; } + csum_dirty = 0; } if (clean && ufs_clean && !sblock->fs_clean) @@ -326,6 +332,7 @@ diskfs_set_hypermetadata (int wait, int clean) copy_sblock (); sync_disk (wait); + return 0; } /* Copy the sblock into the disk */ diff --git a/ufs/inode.c b/ufs/inode.c index 27f7c3bb..ae323a8c 100644 --- a/ufs/inode.c +++ b/ufs/inode.c @@ -498,8 +498,8 @@ error_t diskfs_set_statfs (struct statfs *st) { st->f_type = FSTYPE_UFS; - st->f_bsize = sblock->fs_bsize; - st->f_blocks = sblock->fs_dsize * sblock->fs_frag; + st->f_bsize = sblock->fs_fsize; + st->f_blocks = sblock->fs_dsize; st->f_bfree = (sblock->fs_cstotal.cs_nbfree * sblock->fs_frag + sblock->fs_cstotal.cs_nffree); st->f_bavail = ((sblock->fs_dsize * (100 - sblock->fs_minfree) / 100) |