Commit FreeBSD-specific changes. Mainly to do with structure layout

differences that we dont have.
This commit is contained in:
Peter Wemm 1995-11-03 22:47:24 +00:00
parent fd0348496b
commit d4d864ba62
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=12051
4 changed files with 19 additions and 17 deletions

View File

@ -2,7 +2,7 @@
# @(#)Makefile 8.1 (Berkeley) 6/5/93
PROG= fsdb
MAN= fsdb.8
MAN8= fsdb.8
SRCS= fsdb.c fsdbutil.c \
dir.c inode.c pass1.c pass1b.c pass2.c pass3.c pass4.c \
pass5.c preen.c setup.c utilities.c ffs_subr.c ffs_tables.c

View File

@ -28,7 +28,7 @@
.\"
.Dd September 14, 1995
.Dt FSDB 8
.Os NetBSD
.Os FreeBSD
.Sh NAME
.Nm fsdb
.Nd FFS debugging/editing tool
@ -220,7 +220,9 @@ uses the source code for
.Xr fsck 8
to implement most of the file system manipulation code. The remainder of
.Nm
first appeared in NetBSD.
first appeared in NetBSD, written by John T. Kohl.
.br
Peter Wemm ported it to FreeBSD.
.Sh WARNING
Use this tool with extreme caution--you can damage an FFS file system
beyond what

View File

@ -104,7 +104,7 @@ main(argc, argv)
rval = cmdloop();
sblock.fs_clean = 0; /* mark it dirty */
sbdirty();
ckfini(0);
ckfini();
printf("*** FILE SYSTEM MARKED DIRTY\n");
printf("*** BE SURE TO RUN FSCK TO CLEAN UP ANY DAMAGE\n");
printf("*** IF IT WAS MOUNTED, RE-MOUNT WITH -u -o reload\n");
@ -781,9 +781,9 @@ CMDFUNCSTART(chgroup)
}
int
dotime(name, rsec, rnsec)
dotime(name, rts)
char *name;
int32_t *rsec, *rnsec;
struct timespec *rts;
{
char *p, *val;
struct tm t;
@ -832,14 +832,14 @@ dotime(name, rsec, rnsec)
warnx("date/time out of range");
return 1;
}
*rsec = sec;
*rnsec = nsec;
rts->ts_sec = sec;
rts->ts_nsec = nsec;
return 0;
}
CMDFUNCSTART(chmtime)
{
if (dotime(argv[1], &curinode->di_ctime, &curinode->di_ctimensec))
if (dotime(argv[1], &curinode->di_ctime))
return 1;
inodirty();
printactive();
@ -848,7 +848,7 @@ CMDFUNCSTART(chmtime)
CMDFUNCSTART(chatime)
{
if (dotime(argv[1], &curinode->di_ctime, &curinode->di_ctimensec))
if (dotime(argv[1], &curinode->di_ctime))
return 1;
inodirty();
printactive();
@ -857,7 +857,7 @@ CMDFUNCSTART(chatime)
CMDFUNCSTART(chctime)
{
if (dotime(argv[1], &curinode->di_ctime, &curinode->di_ctimensec))
if (dotime(argv[1], &curinode->di_ctime))
return 1;
inodirty();
printactive();

View File

@ -130,15 +130,15 @@ printstat(cp, inum, dp)
break;
}
printf("I=%lu MODE=%o SIZE=%qu", inum, dp->di_mode, dp->di_size);
p = ctime(&dp->di_mtime);
p = ctime(&dp->di_mtime.ts_sec);
printf("\n\tMTIME=%15.15s %4.4s [%d nsec]", &p[4], &p[20],
dp->di_mtimensec);
p = ctime(&dp->di_ctime);
dp->di_mtime.ts_nsec);
p = ctime(&dp->di_ctime.ts_sec);
printf("\n\tCTIME=%15.15s %4.4s [%d nsec]", &p[4], &p[20],
dp->di_ctimensec);
p = ctime(&dp->di_atime);
dp->di_ctime.ts_nsec);
p = ctime(&dp->di_atime.ts_sec);
printf("\n\tATIME=%15.15s %4.4s [%d nsec]\n", &p[4], &p[20],
dp->di_atimensec);
dp->di_atime.ts_nsec);
if (pw = getpwuid(dp->di_uid))
printf("OWNER=%s ", pw->pw_name);