diff options
Diffstat (limited to 'sbin/quotacheck')
-rw-r--r-- | sbin/quotacheck/preen.c | 42 |
1 files changed, 0 insertions, 42 deletions
diff --git a/sbin/quotacheck/preen.c b/sbin/quotacheck/preen.c index e43aada..4ad426f 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); -} |