Date: Fri, 25 Oct 1996 02:18:25 -0700 (PDT) From: John-Mark Gurney <jmg@nike.efn.org> To: FreeBSD Current <freebsd-current@FreeBSD.org> Subject: fsck add to support specifing a mount point Message-ID: <Pine.NEB.3.95.961025021525.277A-100000@nike>
index | next in thread | raw e-mail
well... I say the pr about fsck not supporting mount points... so I
decided to take a look at it... and I think this is the proper fix...
I've tried it out... and is sucessfully did: "fsck /usr" properly...
hope the patch helps... I would of submitted a send-pr but I'm not sure
if I just submit it as a new one or if I can "add" it the the relevant
one... ttyl...
Index: preen.c
===================================================================
RCS file: /usr/cvs/src/sbin/fsck/preen.c,v
retrieving revision 1.3
diff -c -r1.3 preen.c
*** preen.c 1995/05/30 06:09:07 1.3
--- preen.c 1996/10/25 09:14:29
***************
*** 45,50 ****
--- 45,51 ----
#include <unistd.h>
#include <stdlib.h>
#include <ctype.h>
+ #include <fstab.h>
#include "fsck.h"
struct part {
***************
*** 323,328 ****
--- 324,338 ----
}
} else if ((stblock.st_mode & S_IFMT) == S_IFCHR && !retried) {
name = unrawname(name);
+ retried++;
+ goto retry;
+ } else if ((stblock.st_mode & S_IFMT) == S_IFDIR && !retried) {
+ struct fstab *fsinfo;
+ if(!(fsinfo=getfsfile(name))) {
+ printf("Can't resolve %s to character special device", name);
+ return (0);
+ }
+ name = fsinfo->fs_spec;
retried++;
goto retry;
}
John-Mark
gurney_j@efn.org
http://resnet.uoregon.edu/~gurney_j/
Modem/FAX: (541) 683-6954 (FreeBSD Box)
Live in Peace, destroy Micro$oft, support free software, run FreeBSD (unix)
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.NEB.3.95.961025021525.277A-100000>
