diff options
author | peter <peter@FreeBSD.org> | 1995-11-03 22:47:24 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 1995-11-03 22:47:24 +0000 |
commit | 05e7d17a3b9589ff8cf8cf90323b1c0de4bbbf1c (patch) | |
tree | 37aff758fbadcfa1e87d21cf2deeacaeab536cbe /sbin | |
parent | e86c709b2d2951e75d5ad929a561e69c9a769b17 (diff) | |
download | FreeBSD-src-05e7d17a3b9589ff8cf8cf90323b1c0de4bbbf1c.zip FreeBSD-src-05e7d17a3b9589ff8cf8cf90323b1c0de4bbbf1c.tar.gz |
Commit FreeBSD-specific changes. Mainly to do with structure layout
differences that we dont have.
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/fsdb/Makefile | 2 | ||||
-rw-r--r-- | sbin/fsdb/fsdb.8 | 6 | ||||
-rw-r--r-- | sbin/fsdb/fsdb.c | 16 | ||||
-rw-r--r-- | sbin/fsdb/fsdbutil.c | 12 |
4 files changed, 19 insertions, 17 deletions
diff --git a/sbin/fsdb/Makefile b/sbin/fsdb/Makefile index 381b817..fe8f048 100644 --- a/sbin/fsdb/Makefile +++ b/sbin/fsdb/Makefile @@ -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 diff --git a/sbin/fsdb/fsdb.8 b/sbin/fsdb/fsdb.8 index a44d191..92469f3 100644 --- a/sbin/fsdb/fsdb.8 +++ b/sbin/fsdb/fsdb.8 @@ -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 diff --git a/sbin/fsdb/fsdb.c b/sbin/fsdb/fsdb.c index 8a5ad7b..8a7bb7a 100644 --- a/sbin/fsdb/fsdb.c +++ b/sbin/fsdb/fsdb.c @@ -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 @@ badformat: 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(); diff --git a/sbin/fsdb/fsdbutil.c b/sbin/fsdb/fsdbutil.c index 1003b9d..262bc1a 100644 --- a/sbin/fsdb/fsdbutil.c +++ b/sbin/fsdb/fsdbutil.c @@ -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); |