diff options
author | bde <bde@FreeBSD.org> | 2003-12-27 13:29:49 +0000 |
---|---|---|
committer | bde <bde@FreeBSD.org> | 2003-12-27 13:29:49 +0000 |
commit | e73943dcf62db248f2c939919e842d98bbf1e305 (patch) | |
tree | a30f45aeccc4500ea4c6612d773ab357cbb001db /sbin/fsck | |
parent | ccf8fdfdee138f695e756c0143be5acec5debb93 (diff) | |
download | FreeBSD-src-e73943dcf62db248f2c939919e842d98bbf1e305.zip FreeBSD-src-e73943dcf62db248f2c939919e842d98bbf1e305.tar.gz |
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.
Diffstat (limited to 'sbin/fsck')
-rw-r--r-- | sbin/fsck/fsutil.c | 38 | ||||
-rw-r--r-- | sbin/fsck/fsutil.h | 3 |
2 files changed, 0 insertions, 41 deletions
diff --git a/sbin/fsck/fsutil.c b/sbin/fsck/fsutil.c index b77eeeb..8599b0f 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 877e346..1e6db99 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 *); |