diff options
author | Roland McGrath <roland@gnu.org> | 1998-10-24 07:52:50 +0000 |
---|---|---|
committer | Roland McGrath <roland@gnu.org> | 1998-10-24 07:52:50 +0000 |
commit | 85ad884eb2f48a2e3b259b15fe1d7cb675cb2270 (patch) | |
tree | 96efee233817b605966d09954a30961617332089 /libdiskfs | |
parent | 7493bdb9b7ab8f7f4f97e0a0b7dbf218a862e1bb (diff) |
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.
Diffstat (limited to 'libdiskfs')
-rw-r--r-- | libdiskfs/io-identity.c | 28 | ||||
-rw-r--r-- | libdiskfs/opts-append-std.c | 24 | ||||
-rw-r--r-- | libdiskfs/opts-std-runtime.c | 12 |
3 files changed, 35 insertions, 29 deletions
diff --git a/libdiskfs/io-identity.c b/libdiskfs/io-identity.c index 39ca3706..5717a7d2 100644 --- a/libdiskfs/io-identity.c +++ b/libdiskfs/io-identity.c @@ -1,5 +1,5 @@ /* libdiskfs implementation of io_identity RPC - Copyright (C) 1996, 1997 Free Software Foundation, Inc. + Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc. Written by Michael I. Bushnell, p/BSG. This file is part of the GNU Hurd. @@ -36,7 +36,7 @@ diskfs_S_io_identity (struct protid *cred, if (!cred) return EOPNOTSUPP; - + np = cred->po->np; mutex_lock (&np->lock); inum = np->dn_stat.st_ino; @@ -44,22 +44,24 @@ diskfs_S_io_identity (struct protid *cred, err = fshelp_get_identity (diskfs_port_bucket, inum, id); if (! err) - if (cred->po->shadow_root && cred->po->shadow_root != diskfs_root_node) - { - err = fshelp_get_identity (diskfs_port_bucket, - cred->po->shadow_root->dn_stat.st_ino, - fsys); - if (err) - mach_port_deallocate (mach_task_self (), *id); - } - else - *fsys = diskfs_fsys_identity; + { + if (cred->po->shadow_root && cred->po->shadow_root != diskfs_root_node) + { + err = fshelp_get_identity (diskfs_port_bucket, + cred->po->shadow_root->dn_stat.st_ino, + fsys); + if (err) + mach_port_deallocate (mach_task_self (), *id); + } + else + *fsys = diskfs_fsys_identity; + } if (! err) { *idtype = MACH_MSG_TYPE_MAKE_SEND; *fsystype = MACH_MSG_TYPE_MAKE_SEND; *fileno = np->dn_stat.st_ino; } - + return err; } diff --git a/libdiskfs/opts-append-std.c b/libdiskfs/opts-append-std.c index 7e846715..35a8ab80 100644 --- a/libdiskfs/opts-append-std.c +++ b/libdiskfs/opts-append-std.c @@ -1,6 +1,6 @@ /* Get standard diskfs run-time options - Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. + Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc. Written by Miles Bader <miles@gnu.ai.mit.edu> @@ -42,16 +42,18 @@ diskfs_append_std_options (char **argz, unsigned *argz_len) err = argz_add (argz, argz_len, "--no-exec"); if (! err) - if (diskfs_synchronous) - err = argz_add (argz, argz_len, "--sync"); - else if (diskfs_sync_interval == 0) - err = argz_add (argz, argz_len, "--no-sync"); - else - { - char buf[80]; - sprintf (buf, "--sync=%d", diskfs_sync_interval); - err = argz_add (argz, argz_len, buf); - } + { + if (diskfs_synchronous) + err = argz_add (argz, argz_len, "--sync"); + else if (diskfs_sync_interval == 0) + err = argz_add (argz, argz_len, "--no-sync"); + else + { + char buf[80]; + sprintf (buf, "--sync=%d", diskfs_sync_interval); + err = argz_add (argz, argz_len, buf); + } + } return err; } diff --git a/libdiskfs/opts-std-runtime.c b/libdiskfs/opts-std-runtime.c index dfa440cd..a59e95e0 100644 --- a/libdiskfs/opts-std-runtime.c +++ b/libdiskfs/opts-std-runtime.c @@ -1,6 +1,6 @@ /* Parse standard run-time options - Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. + Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc. This file is part of the GNU Hurd. @@ -58,10 +58,12 @@ set_opts (struct parse_hook *h) } if (h->readonly != diskfs_readonly) - if (err) - diskfs_set_readonly (h->readonly); /* keep the old error. */ - else - err = diskfs_set_readonly (h->readonly); + { + if (err) + diskfs_set_readonly (h->readonly); /* keep the old error. */ + else + err = diskfs_set_readonly (h->readonly); + } /* Change sync mode. */ if (h->sync) |