summaryrefslogtreecommitdiffstats
path: root/sbin
diff options
context:
space:
mode:
authorstefanf <stefanf@FreeBSD.org>2004-05-24 16:24:26 +0000
committerstefanf <stefanf@FreeBSD.org>2004-05-24 16:24:26 +0000
commit5857c0ba2aca54349d8d4f44c70397b575a20bd9 (patch)
treef9361071f649486455d38ecf30af313aa65fe715 /sbin
parent2edc0418f935918c8454937b6fa4e05156aa5c3f (diff)
downloadFreeBSD-src-5857c0ba2aca54349d8d4f44c70397b575a20bd9.zip
FreeBSD-src-5857c0ba2aca54349d8d4f44c70397b575a20bd9.tar.gz
Use the correct types for the functions rst_opendir(), glob_readdir() and
rst_closedir() which are called by glob(). Reviewed by: md5 Approved by: das (mentor)
Diffstat (limited to 'sbin')
-rw-r--r--sbin/restore/dirs.c6
-rw-r--r--sbin/restore/extern.h4
-rw-r--r--sbin/restore/interactive.c10
3 files changed, 11 insertions, 9 deletions
diff --git a/sbin/restore/dirs.c b/sbin/restore/dirs.c
index 0d66ba5..327d3ed 100644
--- a/sbin/restore/dirs.c
+++ b/sbin/restore/dirs.c
@@ -489,7 +489,7 @@ rst_readdir(RST_DIR *dirp)
/*
* Simulate the opening of a directory
*/
-RST_DIR *
+void *
rst_opendir(const char *name)
{
struct inotab *itp;
@@ -509,9 +509,11 @@ rst_opendir(const char *name)
* In our case, there is nothing to do when closing a directory.
*/
void
-rst_closedir(RST_DIR *dirp)
+rst_closedir(void *arg)
{
+ RST_DIR *dirp;
+ dirp = arg;
(void)close(dirp->dd_fd);
free(dirp);
return;
diff --git a/sbin/restore/extern.h b/sbin/restore/extern.h
index 9edf6f9..603a561 100644
--- a/sbin/restore/extern.h
+++ b/sbin/restore/extern.h
@@ -81,9 +81,9 @@ void removeoldleaves(void);
void removeoldnodes(void);
void renameit(char *, char *);
int reply(char *);
-RST_DIR *rst_opendir(const char *);
+void *rst_opendir(const char *);
struct direct *rst_readdir(RST_DIR *);
-void rst_closedir(RST_DIR *dirp);
+void rst_closedir(void *);
void runcmdshell(void);
char *savename(char *);
void setdirmodes(int);
diff --git a/sbin/restore/interactive.c b/sbin/restore/interactive.c
index 2f3b231..209c5a5 100644
--- a/sbin/restore/interactive.c
+++ b/sbin/restore/interactive.c
@@ -83,7 +83,7 @@ static char *copynext(char *, char *);
static int fcmp(const void *, const void *);
static void formatf(struct afile *, int);
static void getcmd(char *, char *, char *, int, struct arglist *);
-struct dirent *glob_readdir(RST_DIR *dirp);
+struct dirent *glob_readdir(void *);
static int glob_stat(const char *, struct stat *);
static void mkentry(char *, struct direct *, struct afile *);
static void printlist(char *, char *);
@@ -104,9 +104,9 @@ runcmdshell(void)
arglist.freeglob = 0;
arglist.argcnt = 0;
arglist.glob.gl_flags = GLOB_ALTDIRFUNC;
- arglist.glob.gl_opendir = (void *)rst_opendir;
- arglist.glob.gl_readdir = (void *)glob_readdir;
- arglist.glob.gl_closedir = (void *)rst_closedir;
+ arglist.glob.gl_opendir = rst_opendir;
+ arglist.glob.gl_readdir = glob_readdir;
+ arglist.glob.gl_closedir = rst_closedir;
arglist.glob.gl_lstat = glob_stat;
arglist.glob.gl_stat = glob_stat;
canon("/", curdir, sizeof(curdir));
@@ -701,7 +701,7 @@ formatf(struct afile *list, int nentry)
#undef d_ino
struct dirent *
-glob_readdir(RST_DIR *dirp)
+glob_readdir(void *dirp)
{
struct direct *dp;
static struct dirent adirent;
OpenPOWER on IntegriCloud