Strip out bogus difference from when this came from NetBSD: transliterating
upper-case alphabetical characters to lower-case ones, and spaces to dashes. The person who added this when bringing the code from NetBSD has no idea why he added it, and nobody on freebsd-fs came up with any cases where the icky part (the conversion of spaces to underscores) was needed. The removal of the upper-case conversion follows an even more obvious logic: it avoids any sort of namespace issues. People using StUdLy caps for filesystem names deserve everything they get. Otherwise, Efs and efs might be totally different things, but would use the same fsck. And we don't want that, right? That just provokes the sort of foot-shooting this would prevent. If you have problems with this, I'll walk you through using sed on your fstab, cause the only way you could have problems is if you spelled ufs as "UFS". Most likely, you haven't done that. MFC after: 1 month
This commit is contained in:
parent
c47633a392
commit
5d52e5efff
@ -278,7 +278,7 @@ isok(struct fstab *fs)
|
||||
|
||||
|
||||
static int
|
||||
checkfs(const char *pvfstype, const char *spec, const char *mntpt,
|
||||
checkfs(const char *vfstype, const char *spec, const char *mntpt,
|
||||
char *auxopt, pid_t *pidp)
|
||||
{
|
||||
/* List of directories containing fsck_xxx subcommands. */
|
||||
@ -291,7 +291,6 @@ checkfs(const char *pvfstype, const char *spec, const char *mntpt,
|
||||
pid_t pid;
|
||||
int argc, i, status, maxargc;
|
||||
char *optbuf, execname[MAXPATHLEN + 1], execbase[MAXPATHLEN];
|
||||
char *vfstype = NULL;
|
||||
const char *extra = NULL;
|
||||
|
||||
#ifdef __GNUC__
|
||||
@ -299,18 +298,6 @@ checkfs(const char *pvfstype, const char *spec, const char *mntpt,
|
||||
(void) &optbuf;
|
||||
(void) &vfstype;
|
||||
#endif
|
||||
/*
|
||||
* We convert the vfstype to lowercase and any spaces to underscores
|
||||
* to not confuse the issue
|
||||
*/
|
||||
vfstype = strdup(pvfstype);
|
||||
if (vfstype == NULL)
|
||||
perror("strdup(pvfstype)");
|
||||
for (i = 0; i < strlen(vfstype); i++) {
|
||||
vfstype[i] = tolower(vfstype[i]);
|
||||
if (vfstype[i] == ' ')
|
||||
vfstype[i] = '_';
|
||||
}
|
||||
|
||||
extra = getoptions(vfstype);
|
||||
optbuf = NULL;
|
||||
@ -347,7 +334,6 @@ checkfs(const char *pvfstype, const char *spec, const char *mntpt,
|
||||
warn("vfork");
|
||||
if (optbuf)
|
||||
free(optbuf);
|
||||
free(vfstype);
|
||||
return (1);
|
||||
|
||||
case 0: /* Child. */
|
||||
@ -381,8 +367,6 @@ checkfs(const char *pvfstype, const char *spec, const char *mntpt,
|
||||
if (optbuf)
|
||||
free(optbuf);
|
||||
|
||||
free(vfstype);
|
||||
|
||||
if (pidp) {
|
||||
*pidp = pid;
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user