aboutsummaryrefslogtreecommitdiff
path: root/sbin/quotacheck/preen.c
diff options
context:
space:
mode:
authorAdrian Chadd <adrian@FreeBSD.org>2000-10-09 08:26:35 +0000
committerAdrian Chadd <adrian@FreeBSD.org>2000-10-09 08:26:35 +0000
commit9ea6f4f0beddb78d2370ec6fe0b8e55330cbc73c (patch)
tree5270204bba61ce4d6b804c7ed51aaf671cf1bfa7 /sbin/quotacheck/preen.c
parentf6b5c74c35c0778c2f29087d65e2a5d7b75de6d6 (diff)
downloadsrc-9ea6f4f0beddb78d2370ec6fe0b8e55330cbc73c.tar.gz
src-9ea6f4f0beddb78d2370ec6fe0b8e55330cbc73c.zip
Reviewed by: rwatson, bp
Approved by: rwatson Obtained from: NetBSD-current source tree The beginnings of the fsck wrappers stuff from NetBSD. This particular commit brings a newly repo-copied sbin/fsck_ffs/ (from sbin/fsck/) into fsck wrappers mode. A quick overview (the code reflects this): * Documentation changed to reflect fsck_ffs instead of fsck * Simply acts on a single filesystem, doesn't try to do any multiple filesystem magic - this is done by the fsck wrappers now And then specific to fsck_ffs: * link to /sbin/fsck_4.2bsd and /sbin/fsck_ufs. This is because right now the filesystem is of type ufs not ffs, and that during autodetection the labeltype rather than the VFS type is used - this is because when doing an autodetection of filesystem type in the fsck wrapper program, it does not have any link between label type (4.2bsd, vinum, etc) and VFS string. Note that this shouldn't break a build since the required buildworld Makefile magic and import of the fsck wrapper code into src/sbin/fsck/ will happen in a seperate commit.
Notes
Notes: svn path=/head/; revision=66861
Diffstat (limited to 'sbin/quotacheck/preen.c')
-rw-r--r--sbin/quotacheck/preen.c42
1 files changed, 0 insertions, 42 deletions
diff --git a/sbin/quotacheck/preen.c b/sbin/quotacheck/preen.c
index e43aada8d10d..4ad426f9edb4 100644
--- a/sbin/quotacheck/preen.c
+++ b/sbin/quotacheck/preen.c
@@ -288,45 +288,3 @@ startdisk(dk, checkit)
return (0);
}
-char *
-blockcheck(origname)
- char *origname;
-{
- struct stat stslash, stblock, stchar;
- char *newname, *raw;
- struct fstab *fsinfo;
- int retried = 0, len;
-
- newname = origname;
-retry:
- if (stat(newname, &stblock) < 0) {
- printf("Can't stat %s: %s\n", newname, strerror(errno));
- return (origname);
- }
- switch(stblock.st_mode & S_IFMT) {
- case S_IFCHR:
- case S_IFBLK:
- return(newname);
- case S_IFDIR:
- if (retried)
- break;
-
- len = strlen(origname) - 1;
- if (len > 0 && origname[len] == '/')
- /* remove trailing slash */
- origname[len] = '\0';
- if ((fsinfo = getfsfile(origname)) == NULL) {
- printf("Can't resolve %s to character special device",
- origname);
- return (0);
- }
- newname = fsinfo->fs_spec;
- retried++;
- goto retry;
- }
- /*
- * Not a block or character device, just return name and
- * let the user decide whether to use it.
- */
- return (origname);
-}