aboutsummaryrefslogtreecommitdiffstats
path: root/sbin/fsck
diff options
context:
space:
mode:
authorBruce Evans <bde@FreeBSD.org>2003-12-27 13:29:49 +0000
committerBruce Evans <bde@FreeBSD.org>2003-12-27 13:29:49 +0000
commit894198ea563fd109298da7decf7702d89fff9bf9 (patch)
treea30f45aeccc4500ea4c6612d773ab357cbb001db /sbin/fsck
parent05a8df3c21e2a0ca1159fa885325389f4f627b60 (diff)
downloadsrc-894198ea563fd109298da7decf7702d89fff9bf9.tar.gz
src-894198ea563fd109298da7decf7702d89fff9bf9.zip
Garbage-collected hotroot, rawname() and unrawname() again. These
became garbage when block devices were axed and were removed a few months later, but they came back (with hotroot renamed to hot + hotroot()) when the NetBSD fsck was mismerged.
Notes
Notes: svn path=/head/; revision=123889
Diffstat (limited to 'sbin/fsck')
-rw-r--r--sbin/fsck/fsutil.c38
-rw-r--r--sbin/fsck/fsutil.h3
2 files changed, 0 insertions, 41 deletions
diff --git a/sbin/fsck/fsutil.c b/sbin/fsck/fsutil.c
index b77eeebf345c..8599b0f5c986 100644
--- a/sbin/fsck/fsutil.c
+++ b/sbin/fsck/fsutil.c
@@ -55,7 +55,6 @@ __FBSDID("$FreeBSD$");
#include "fsutil.h"
static const char *dev = NULL;
-static int hot = 0;
static int preen = 0;
static void vmsg(int, const char *, va_list) __printflike(2, 0);
@@ -73,12 +72,6 @@ cdevname(void)
return dev;
}
-int
-hotroot(void)
-{
- return hot;
-}
-
static void
vmsg(int fatal, const char *fmt, va_list ap)
{
@@ -138,37 +131,6 @@ panic(const char *fmt, ...)
}
const char *
-unrawname(const char *name)
-{
- static char unrawbuf[32];
- const char *dp;
- struct stat stb;
-
- if ((dp = strrchr(name, '/')) == 0)
- return (name);
- if (stat(name, &stb) < 0)
- return (name);
- if (!S_ISCHR(stb.st_mode))
- return (name);
- if (dp[1] != 'r')
- return (name);
- (void)snprintf(unrawbuf, 32, "%.*s/%s", (int)(dp - name), name, dp + 2);
- return (unrawbuf);
-}
-
-const char *
-rawname(const char *name)
-{
- static char rawbuf[32];
- const char *dp;
-
- if ((dp = strrchr(name, '/')) == 0)
- return (0);
- (void)snprintf(rawbuf, 32, "%.*s/r%s", (int)(dp - name), name, dp + 1);
- return (rawbuf);
-}
-
-const char *
devcheck(const char *origname)
{
struct stat stslash, stchar;
diff --git a/sbin/fsck/fsutil.h b/sbin/fsck/fsutil.h
index 877e3468312b..1e6db994be69 100644
--- a/sbin/fsck/fsutil.h
+++ b/sbin/fsck/fsutil.h
@@ -37,13 +37,10 @@ void pwarn(const char *, ...)
__attribute__((__format__(__printf__,1,2)));
void panic(const char *, ...)
__attribute__((__noreturn__,__format__(__printf__,1,2)));
-const char *rawname(const char *);
-const char *unrawname(const char *);
const char *devcheck(const char *);
const char *cdevname(void);
void setcdevname(const char *, int);
struct statfs *getmntpt(const char *);
-int hotroot(void);
void *emalloc(size_t);
void *erealloc(void *, size_t);
char *estrdup(const char *);