summaryrefslogtreecommitdiff
path: root/libdiskfs
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>1998-10-24 07:51:40 +0000
committerRoland McGrath <roland@gnu.org>1998-10-24 07:51:40 +0000
commit7493bdb9b7ab8f7f4f97e0a0b7dbf218a862e1bb (patch)
tree6f3d9bd428069827da31cd8d03851321fea433c4 /libdiskfs
parent6875a586d28418b4ed203dc00cc8db3061f9a003 (diff)
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.
Diffstat (limited to 'libdiskfs')
-rw-r--r--libdiskfs/dir-chg.c10
-rw-r--r--libdiskfs/dir-renamed.c38
-rw-r--r--libdiskfs/direnter.c9
-rw-r--r--libdiskfs/dirremove.c17
-rw-r--r--libdiskfs/dirrewrite.c13
-rw-r--r--libdiskfs/diskfs.h45
-rw-r--r--libdiskfs/lookup.c17
-rw-r--r--libdiskfs/name-cache.c30
-rw-r--r--libdiskfs/node-create.c10
-rw-r--r--libdiskfs/opts-set.c4
10 files changed, 97 insertions, 96 deletions
diff --git a/libdiskfs/dir-chg.c b/libdiskfs/dir-chg.c
index 12b169c6..16eb26f4 100644
--- a/libdiskfs/dir-chg.c
+++ b/libdiskfs/dir-chg.c
@@ -1,5 +1,5 @@
/* Notifications of directory changes.
- Copyright (C) 1994, 1995 Free Software Foundation, Inc.
+ Copyright (C) 1994, 1995, 1998 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
@@ -26,7 +26,7 @@ diskfs_S_dir_notice_changes (struct protid *cred,
error_t err;
struct modreq *req;
struct node *np;
-
+
if (!cred)
return EOPNOTSUPP;
@@ -53,11 +53,11 @@ diskfs_S_dir_notice_changes (struct protid *cred,
void
diskfs_notice_dirchange (struct node *dp, enum dir_changed_type type,
- char *name)
+ const char *name)
{
error_t err;
struct modreq **preq;
-
+
preq = &dp->dirmod_reqs;
while (*preq)
{
@@ -72,4 +72,4 @@ diskfs_notice_dirchange (struct node *dp, enum dir_changed_type type,
else
preq = &req->next;
}
-}
+}
diff --git a/libdiskfs/dir-renamed.c b/libdiskfs/dir-renamed.c
index 1847720f..d01b4f09 100644
--- a/libdiskfs/dir-renamed.c
+++ b/libdiskfs/dir-renamed.c
@@ -1,5 +1,5 @@
-/*
- Copyright (C) 1994, 1995, 1996, 1997 Free Software Foundation
+/*
+ Copyright (C) 1994, 95, 96, 97, 98 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
@@ -31,7 +31,7 @@ checkpath(struct node *source,
{
error_t err;
struct node *np;
-
+
np = target;
for (np = target, err = 0;
/* nothing */;
@@ -44,20 +44,20 @@ checkpath(struct node *source,
diskfs_nput (np);
return err;
}
-
+
if (np == source)
{
diskfs_nput (np);
return EINVAL;
}
-
+
if (np == diskfs_root_node)
{
diskfs_nput (np);
return 0;
}
}
-}
+}
/* Rename directory node FNP (whose parent is FDP, and which has name
FROMNAME in that directory) to have name TONAME inside directory
@@ -67,9 +67,9 @@ checkpath(struct node *source,
routine. FROMCRED and TOCRED are the users responsible for
FDP/FNP and TDP respectively. */
error_t
-diskfs_rename_dir (struct node *fdp, struct node *fnp, char *fromname,
- struct node *tdp, char *toname, struct protid *fromcred,
- struct protid *tocred)
+diskfs_rename_dir (struct node *fdp, struct node *fnp, const char *fromname,
+ struct node *tdp, const char *toname,
+ struct protid *fromcred, struct protid *tocred)
{
error_t err;
struct node *tnp, *tmpnp;
@@ -81,16 +81,16 @@ diskfs_rename_dir (struct node *fdp, struct node *fnp, char *fromname,
diskfs_nref (tdp); /* reference and lock will get consumed by
checkpath */
err = checkpath (fnp, tdp, tocred);
-
+
if (err)
return err;
-
+
/* Now, lock the parent directories. This is legal because tdp is not
a child of fnp (guaranteed by checkpath above). */
mutex_lock (&fdp->lock);
if (fdp != tdp)
mutex_lock (&tdp->lock);
-
+
/* 1: Lookup target; if it exists, make sure it's an empty directory. */
ds = buf;
err = diskfs_lookup (tdp, toname, RENAME, &tnp, ds, tocred);
@@ -105,7 +105,7 @@ diskfs_rename_dir (struct node *fdp, struct node *fnp, char *fromname,
mutex_unlock (&fdp->lock);
return 0;
}
-
+
/* Now we can safely lock fnp */
mutex_lock (&fnp->lock);
@@ -115,7 +115,7 @@ diskfs_rename_dir (struct node *fdp, struct node *fnp, char *fromname,
err = ENOTDIR;
else if (!diskfs_dirempty (tnp, tocred))
err = ENOTEMPTY;
- }
+ }
if (err && err != ENOENT)
goto out;
@@ -132,9 +132,9 @@ diskfs_rename_dir (struct node *fdp, struct node *fnp, char *fromname,
tdp->dn_set_ctime = 1;
if (diskfs_synchronous)
diskfs_node_update (tdp, 1);
-
+
tmpds = alloca (diskfs_dirstat_size);
- err = diskfs_lookup (fnp, "..", RENAME | SPEC_DOTDOT,
+ err = diskfs_lookup (fnp, "..", RENAME | SPEC_DOTDOT,
&tmpnp, tmpds, fromcred);
assert (err != ENOENT);
assert (tmpnp == fdp);
@@ -149,7 +149,7 @@ diskfs_rename_dir (struct node *fdp, struct node *fnp, char *fromname,
diskfs_file_update (fnp, 1);
if (err)
goto out;
-
+
fdp->dn_stat.st_nlink--;
fdp->dn_set_ctime = 1;
if (diskfs_synchronous)
@@ -171,7 +171,7 @@ diskfs_rename_dir (struct node *fdp, struct node *fnp, char *fromname,
fnp->dn_stat.st_nlink++;
fnp->dn_set_ctime = 1;
diskfs_node_update (fnp, 1);
-
+
if (tnp)
{
err = diskfs_dirrewrite (tdp, tnp, fnp, toname, ds);
@@ -203,7 +203,7 @@ diskfs_rename_dir (struct node *fdp, struct node *fnp, char *fromname,
diskfs_nrele (tmpnp);
if (err)
goto out;
-
+
diskfs_dirremove (fdp, fnp, fromname, ds);
ds = 0;
fnp->dn_stat.st_nlink--;
diff --git a/libdiskfs/direnter.c b/libdiskfs/direnter.c
index ca0006eb..cb9b76ca 100644
--- a/libdiskfs/direnter.c
+++ b/libdiskfs/direnter.c
@@ -1,5 +1,5 @@
/* Wrapper for diskfs_direnter_hard
- Copyright (C) 1996 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1998 Free Software Foundation, Inc.
Written by Michael I. Bushnell, p/BSG.
This file is part of the GNU Hurd.
@@ -29,13 +29,13 @@
growth). This function is a wrapper for diskfs_direnter_hard. */
error_t
diskfs_direnter (struct node *dp,
- char *name,
+ const char *name,
struct node *np,
struct dirstat *ds,
struct protid *cred)
{
error_t err;
-
+
err = diskfs_direnter_hard (dp, name, np, ds, cred);
if (err)
return err;
@@ -45,5 +45,4 @@ diskfs_direnter (struct node *dp,
diskfs_enter_lookup_cache (dp, np, name);
return 0;
-}
-
+}
diff --git a/libdiskfs/dirremove.c b/libdiskfs/dirremove.c
index 8970d19a..239daa72 100644
--- a/libdiskfs/dirremove.c
+++ b/libdiskfs/dirremove.c
@@ -1,5 +1,5 @@
/* Wrapper for diskfs_dirremove_hard
- Copyright (C) 1996 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1998 Free Software Foundation, Inc.
Written by Michael I. Bushnell, p/BSG.
This file is part of the GNU Hurd.
@@ -27,20 +27,19 @@
call diskfs_notice_dirchange if DP->dirmod_reqs is nonzero. This
function is a wrapper for diskfs_dirremove_hard. The entry being
removed has name NAME and refers to NP. */
-error_t
-diskfs_dirremove (struct node *dp,
- struct node *np,
- char *name,
+error_t
+diskfs_dirremove (struct node *dp,
+ struct node *np,
+ const char *name,
struct dirstat *ds)
{
error_t err;
-
+
diskfs_purge_lookup_cache (dp, np);
-
+
err = diskfs_dirremove_hard (dp, ds);
-
+
if (!err && dp->dirmod_reqs)
diskfs_notice_dirchange (dp, DIR_CHANGED_UNLINK, name);
return err;
}
-
diff --git a/libdiskfs/dirrewrite.c b/libdiskfs/dirrewrite.c
index b2e750f5..8f713960 100644
--- a/libdiskfs/dirrewrite.c
+++ b/libdiskfs/dirrewrite.c
@@ -1,5 +1,5 @@
/* Wrapper for diskfs_dirrewrite_hard
- Copyright (C) 1996 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1998 Free Software Foundation, Inc.
Written by Michael I. Bushnell, p/BSG.
This file is part of the GNU Hurd.
@@ -29,23 +29,22 @@
diskfs_notice_dirchange if DP->dirmod_reqs is nonzero. NAME is the
name of OLDNP inside DP; it is this reference which is being
rewritten. This function is a wrapper for diskfs_dirrewrite_hard. */
-error_t diskfs_dirrewrite (struct node *dp,
+error_t diskfs_dirrewrite (struct node *dp,
struct node *oldnp,
struct node *np,
- char *name,
+ const char *name,
struct dirstat *ds)
{
error_t err;
-
+
diskfs_purge_lookup_cache (dp, oldnp);
-
+
err = diskfs_dirrewrite_hard (dp, np, ds);
if (err)
return err;
-
+
if (dp->dirmod_reqs)
diskfs_notice_dirchange (dp, DIR_CHANGED_RENUMBER, name);
diskfs_enter_lookup_cache (dp, np, name);
return 0;
}
-
diff --git a/libdiskfs/diskfs.h b/libdiskfs/diskfs.h
index 33717f80..e99676ef 100644
--- a/libdiskfs/diskfs.h
+++ b/libdiskfs/diskfs.h
@@ -1,5 +1,5 @@
/* Definitions for fileserver helper functions
- Copyright (C) 1994, 1995, 1996, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1994, 95, 96, 97, 98 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
@@ -309,7 +309,8 @@ error_t diskfs_set_statfs (fsys_statfsbuf_t *statfsbuf);
Return EAGAIN if NAME refers to the `..' of this filesystem's root.
Return EIO if appropriate.
*/
-error_t diskfs_lookup_hard (struct node *dp, char *name, enum lookup_type type,
+error_t diskfs_lookup_hard (struct node *dp,
+ const char *name, enum lookup_type type,
struct node **np, struct dirstat *ds,
struct protid *cred);
@@ -319,7 +320,7 @@ error_t diskfs_lookup_hard (struct node *dp, char *name, enum lookup_type type,
has been locked continuously since that call and DS is as that call
set it, NP is locked. CRED identifies the user responsible
for the call (to be used only to validate directory growth). */
-error_t diskfs_direnter_hard (struct node *dp, char *name,
+error_t diskfs_direnter_hard (struct node *dp, const char *name,
struct node *np, struct dirstat *ds,
struct protid *cred);
@@ -370,7 +371,8 @@ error_t diskfs_get_translator (struct node *np, char **namep, u_int *namelen);
/* The user must define this function. For locked node NP, set
the name of the translating program to be NAME, length NAMELEN. CRED
identifies the user responsible for the call. */
-error_t diskfs_set_translator (struct node *np, char *name, u_int namelen,
+error_t diskfs_set_translator (struct node *np,
+ const char *name, u_int namelen,
struct protid *cred);
/* The user must define this function. Truncate locked node NP to be SIZE
@@ -529,7 +531,7 @@ error_t diskfs_node_reload (struct node *node);
is called to set a symlink. If it returns EINVAL or isn't set,
then the normal method (writing the contents into the file data) is
used. If it returns any other error, it is returned to the user. */
-error_t (*diskfs_create_symlink_hook)(struct node *np, char *target);
+error_t (*diskfs_create_symlink_hook)(struct node *np, const char *target);
/* If this function is nonzero (and diskfs_shortcut_symlink is set) it
is called to read the contents of a symlink. If it returns EINVAL or
@@ -748,7 +750,7 @@ diskfs_node_rdwr (struct node *np, char *data, off_t off,
fully completed. */
void
diskfs_notice_dirchange (struct node *dp, enum dir_changed_type type,
- char *name);
+ const char *name);
/* Send notifications to users who have requested them with
file_notice_changes for file NP. The type of modification is TYPE.
@@ -808,10 +810,11 @@ struct node *diskfs_make_node (struct disknode *dn);
Return ENOENT if NAME isn't in the directory.
Return EAGAIN if NAME refers to the `..' of this filesystem's root.
Return EIO if appropriate.
-
- This function is a wrapper for diskfs_lookup_hard.
+
+ This function is a wrapper for diskfs_lookup_hard.
*/
-error_t diskfs_lookup (struct node *dp, char *name, enum lookup_type type,
+error_t diskfs_lookup (struct node *dp,
+ const char *name, enum lookup_type type,
struct node **np, struct dirstat *ds,
struct protid *cred);
@@ -822,7 +825,7 @@ error_t diskfs_lookup (struct node *dp, char *name, enum lookup_type type,
responsible for the call (to be used only to validate directory
growth). This function is a wrapper for diskfs_direnter_hard. */
error_t
-diskfs_direnter (struct node *dp, char *name, struct node *np,
+diskfs_direnter (struct node *dp, const char *name, struct node *np,
struct dirstat *ds, struct protid *cred);
/* This will only be called after a successful call to diskfs_lookup
@@ -834,7 +837,8 @@ diskfs_direnter (struct node *dp, char *name, struct node *np,
name of OLDNP inside DP; it is this reference which is being
rewritten. This function is a wrapper for diskfs_dirrewrite_hard. */
error_t diskfs_dirrewrite (struct node *dp, struct node *oldnp,
- struct node *np, char *name, struct dirstat *ds);
+ struct node *np, const char *name,
+ struct dirstat *ds);
/* This will only be called after a successful call to diskfs_lookup
of type REMOVE; this call should remove the name found from the
@@ -844,7 +848,7 @@ error_t diskfs_dirrewrite (struct node *dp, struct node *oldnp,
function is a wrapper for diskfs_dirremove_hard. The entry being
removed has name NAME and refers to NP. */
error_t diskfs_dirremove (struct node *dp, struct node *np,
- char *name, struct dirstat *ds);
+ const char *name, struct dirstat *ds);
/* Return the node corresponding to CACHE_ID in *NPP. */
error_t diskfs_cached_lookup (int cache_id, struct node **npp);
@@ -857,7 +861,7 @@ error_t diskfs_cached_lookup (int cache_id, struct node **npp);
DIR must always be provided as at least a hint for disk allocation
strategies. */
error_t
-diskfs_create_node (struct node *dir, char *name, mode_t mode,
+diskfs_create_node (struct node *dir, const char *name, mode_t mode,
struct node **newnode, struct protid *cred,
struct dirstat *ds);
@@ -892,9 +896,10 @@ void diskfs_release_peropen (struct peropen *po);
/* Node NP has just been found in DIR with NAME. If NP is null, that
means that this name has been confirmed as absent in the directory. */
-void diskfs_enter_lookup_cache (struct node *dir, struct node *np, char *name);
+void diskfs_enter_lookup_cache (struct node *dir, struct node *np,
+ const char *name);
-/* Purge all references in the cache to NP as a node inside
+/* Purge all references in the cache to NP as a node inside
directory DP. */
void diskfs_purge_lookup_cache (struct node *dp, struct node *np);
@@ -902,7 +907,7 @@ void diskfs_purge_lookup_cache (struct node *dp, struct node *np);
anything entry at all, then return 0. If the entry is confirmed to
not exist, then return -1. Otherwise, return NP for the entry, with
a newly allocated reference. */
-struct node *diskfs_check_lookup_cache (struct node *dir, char *name);
+struct node *diskfs_check_lookup_cache (struct node *dir, const char *name);
/* Rename directory node FNP (whose parent is FDP, and which has name
FROMNAME in that directory) to have name TONAME inside directory
@@ -915,9 +920,9 @@ struct node *diskfs_check_lookup_cache (struct node *dir, char *name);
if that is not true for your format, you have to redefine this
function.*/
error_t
-diskfs_rename_dir (struct node *fdp, struct node *fnp, char *fromname,
- struct node *tdp, char *toname, struct protid *fromcred,
- struct protid *tocred);
+diskfs_rename_dir (struct node *fdp, struct node *fnp, const char *fromname,
+ struct node *tdp, const char *toname,
+ struct protid *fromcred, struct protid *tocred);
/* Clear the `.' and `..' entries from directory DP. Its parent is
PDP, and the user responsible for this is identified by CRED. Both
@@ -973,7 +978,7 @@ error_t diskfs_set_sync_interval (int interval);
/* Parse and execute the runtime options in ARGZ & ARGZ_LEN. EINVAL is
returned if some option is unrecognized. The default definition of this
routine will parse them using DISKFS_RUNTIME_ARGP, which see. */
-error_t diskfs_set_options (char *argz, size_t argz_len);
+error_t diskfs_set_options (const char *argz, size_t argz_len);
/* Append to the malloced string *ARGZ of length *ARGZ_LEN a NUL-separated
list of the arguments to this translator. The default definition of this
diff --git a/libdiskfs/lookup.c b/libdiskfs/lookup.c
index bc61f4ba..cd5ca8cb 100644
--- a/libdiskfs/lookup.c
+++ b/libdiskfs/lookup.c
@@ -73,11 +73,11 @@ static spin_lock_t cm_lock = SPIN_LOCK_INITIALIZER;
Return ENOENT if NAME isn't in the directory.
Return EAGAIN if NAME refers to the `..' of this filesystem's root.
Return EIO if appropriate.
-
- This function is a wrapper for diskfs_lookup_hard.
+
+ This function is a wrapper for diskfs_lookup_hard.
*/
-error_t
-diskfs_lookup (struct node *dp, char *name, enum lookup_type type,
+error_t
+diskfs_lookup (struct node *dp, const char *name, enum lookup_type type,
struct node **np, struct dirstat *ds, struct protid *cred)
{
error_t err;
@@ -146,7 +146,7 @@ diskfs_lookup (struct node *dp, char *name, enum lookup_type type,
diskfs_null_dirstat (ds);
}
else
- {
+ {
err = diskfs_lookup_hard (dp, name, type, np, ds, cred);
spin_lock (&cm_lock);
@@ -156,7 +156,7 @@ diskfs_lookup (struct node *dp, char *name, enum lookup_type type,
cache_misses.absent++;
else if (err)
cache_misses.errors++;
- else
+ else
cache_misses.present++;
if (name[0] == '.')
{
@@ -170,7 +170,7 @@ diskfs_lookup (struct node *dp, char *name, enum lookup_type type,
if (err && err != ENOENT)
return err;
-
+
if (type == RENAME
|| (type == CREATE && err == ENOENT)
|| (type == REMOVE && err != ENOENT))
@@ -190,8 +190,7 @@ diskfs_lookup (struct node *dp, char *name, enum lookup_type type,
diskfs_enter_lookup_cache (dp, *np, name);
else if (type == LOOKUP && err == ENOENT)
diskfs_enter_lookup_cache (dp, 0, name);
- }
+ }
return err;
}
-
diff --git a/libdiskfs/name-cache.c b/libdiskfs/name-cache.c
index 89265fbc..f31482d4 100644
--- a/libdiskfs/name-cache.c
+++ b/libdiskfs/name-cache.c
@@ -1,6 +1,6 @@
/* Directory name lookup caching
- Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
Written by Michael I. Bushnell, p/BSG, & Miles Bader.
This file is part of the GNU Hurd.
@@ -79,8 +79,8 @@ find_cache (struct node *dir, const char *name, size_t name_len)
/* Search the list. All unused entries are contiguous at the end of the
list, so we can stop searching when we see the first one. */
- for (i = 0, c = lookup_cache.mru;
- c && c->name_len;
+ for (i = 0, c = lookup_cache.mru;
+ c && c->name_len;
c = c->hdr.next, i++)
if (c->name_len == name_len
&& c->dir_cache_id == dir->cache_id
@@ -89,18 +89,18 @@ find_cache (struct node *dir, const char *name, size_t name_len)
c->stati = i / 100;
return c;
}
-
+
return 0;
}
/* Node NP has just been found in DIR with NAME. If NP is null, that
means that this name has been confirmed as absent in the directory. */
void
-diskfs_enter_lookup_cache (struct node *dir, struct node *np, char *name)
+diskfs_enter_lookup_cache (struct node *dir, struct node *np, const char *name)
{
struct lookup_cache *c;
size_t name_len = strlen (name);
-
+
if (name_len > CACHE_NAME_LEN - 1)
return;
@@ -127,13 +127,13 @@ diskfs_enter_lookup_cache (struct node *dir, struct node *np, char *name)
spin_unlock (&cache_lock);
}
-/* Purge all references in the cache to NP as a node inside
+/* Purge all references in the cache to NP as a node inside
directory DP. */
void
diskfs_purge_lookup_cache (struct node *dp, struct node *np)
{
struct lookup_cache *c, *next;
-
+
spin_lock (&cache_lock);
for (c = lookup_cache.mru; c; c = next)
{
@@ -179,13 +179,13 @@ register_pos_hit (int n)
for (; i < NPARTIALS; i++)
partial_stats[i].pos_hits++;
}
-
+
/* Register a miss */
void
register_miss ()
{
int i;
-
+
statistics.miss++;
for (i = 0; i < NPARTIALS; i++)
partial_stats[i].miss++;
@@ -198,10 +198,10 @@ register_miss ()
not exist, then return -1. Otherwise, return NP for the entry, with
a newly allocated reference. */
struct node *
-diskfs_check_lookup_cache (struct node *dir, char *name)
+diskfs_check_lookup_cache (struct node *dir, const char *name)
{
struct lookup_cache *c;
-
+
spin_lock (&cache_lock);
c = find_cache (dir, name, strlen (name));
@@ -231,10 +231,10 @@ diskfs_check_lookup_cache (struct node *dir, char *name)
{
struct node *np;
error_t err;
-
+
register_pos_hit (c->stati);
spin_unlock (&cache_lock);
-
+
if (name[0] == '.' && name[1] == '.' && name[2] == '\0')
{
mutex_unlock (&dir->lock);
@@ -257,7 +257,7 @@ diskfs_check_lookup_cache (struct node *dir, char *name)
return err ? 0 : np;
}
}
-
+
register_miss ();
spin_unlock (&cache_lock);
diff --git a/libdiskfs/node-create.c b/libdiskfs/node-create.c
index 06a484d8..09dc4a5a 100644
--- a/libdiskfs/node-create.c
+++ b/libdiskfs/node-create.c
@@ -1,5 +1,5 @@
/* Making new files
- Copyright (C) 1992, 1993, 1994, 1996 Free Software Foundation
+ Copyright (C) 1992, 1993, 1994, 1996, 1998 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
@@ -26,7 +26,7 @@
strategies. */
error_t
diskfs_create_node (struct node *dir,
- char *name,
+ const char *name,
mode_t mode,
struct node **newnode,
struct protid *cred,
@@ -36,7 +36,7 @@ diskfs_create_node (struct node *dir,
error_t err;
uid_t newuid;
gid_t newgid;
-
+
if (diskfs_check_readonly ())
return EROFS;
@@ -90,7 +90,7 @@ diskfs_create_node (struct node *dir,
if (S_ISDIR (mode))
err = diskfs_init_dir (np, dir, cred);
-
+
diskfs_node_update (np, 1);
if (err)
@@ -102,7 +102,7 @@ diskfs_create_node (struct node *dir,
diskfs_drop_dirstat (dir, ds);
return err;
}
-
+
if (name)
{
err = diskfs_direnter (dir, name, np, ds, cred);
diff --git a/libdiskfs/opts-set.c b/libdiskfs/opts-set.c
index 72af4ef1..3cfe3f6b 100644
--- a/libdiskfs/opts-set.c
+++ b/libdiskfs/opts-set.c
@@ -1,6 +1,6 @@
/* Set run-time options
- Copyright (C) 1996 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1998 Free Software Foundation, Inc.
Written by Miles Bader <miles@gnu.ai.mit.edu>
@@ -25,7 +25,7 @@
#include "priv.h"
error_t
-diskfs_set_options (char *argz, size_t argz_len)
+diskfs_set_options (const char *argz, size_t argz_len)
{
if (diskfs_runtime_argp)
return fshelp_set_options (diskfs_runtime_argp, 0, argz, argz_len, 0);