Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 20 Feb 1997 17:29:47 -0500
From:      Dan Cross <tenser@spitfire.ecsel.psu.edu>
To:        current@freebsd.org
Subject:   fsdb(8) patch for -current...
Message-ID:  <19970220222947.7790.qmail@spitfire.ecsel.psu.edu>

next in thread | raw e-mail | index | archive | help
Hey all.
   I'm working on getting my PC ready to take home (argh, it's starting
to be ``Not Cool'' without a computer at home), but I want to get make
world to finish successfully beforehand (without -k!).  Thus, I'm try-
ing to make changes to enough of the userland stuff that this happens
(before the lite2 userland merge, after the CVS branching issues have
been resolved).  Consequently, I've made a few changes to some utils
so that make world will run to completion (eventually).  Today was
fsdb, which were some trivial tweaks to deal with the lite2 changes
in <ufs/ufs/dinode.h>.  This change was pretty minor, and I've included
two versions, one against the -lite fsck, and one against the -lite2
fsck.  Have fun!

	- Dan C.

(btw- I'm not so worried about this ``not working'' like I was with
fsck.  Therefore, I'm wondering: should I send-pr these patches?)

-----begin fsdb-lite.patch
*** fsdbutil.c	1997/02/20 21:57:05	1.1
--- fsdbutil.c	1997/02/20 21:57:58
***************
*** 130,144 ****
  	break;
      }
      printf("I=%lu MODE=%o SIZE=%qu", inum, dp->di_mode, dp->di_size);
!     p = ctime(&dp->di_mtime.tv_sec);
      printf("\n\tMTIME=%15.15s %4.4s [%d nsec]", &p[4], &p[20],
! 	   dp->di_mtime.tv_nsec);
!     p = ctime(&dp->di_ctime.tv_sec);
      printf("\n\tCTIME=%15.15s %4.4s [%d nsec]", &p[4], &p[20],
! 	   dp->di_ctime.tv_nsec);
!     p = ctime(&dp->di_atime.tv_sec);
      printf("\n\tATIME=%15.15s %4.4s [%d nsec]\n", &p[4], &p[20],
! 	   dp->di_atime.tv_nsec);
  
      if (pw = getpwuid(dp->di_uid))
  	printf("OWNER=%s ", pw->pw_name);
--- 130,144 ----
  	break;
      }
      printf("I=%lu MODE=%o SIZE=%qu", inum, dp->di_mode, dp->di_size);
!     p = ctime(&dp->di_mtime);
      printf("\n\tMTIME=%15.15s %4.4s [%d nsec]", &p[4], &p[20],
! 	   dp->di_mtimensec);
!     p = ctime(&dp->di_ctime);
      printf("\n\tCTIME=%15.15s %4.4s [%d nsec]", &p[4], &p[20],
! 	   dp->di_ctime);
!     p = ctime(&dp->di_atime);
      printf("\n\tATIME=%15.15s %4.4s [%d nsec]\n", &p[4], &p[20],
! 	   dp->di_atimensec);
  
      if (pw = getpwuid(dp->di_uid))
  	printf("OWNER=%s ", pw->pw_name);
-----end fsdb-lite.patch

-----being fsdb-lite2.patch
*** fsdb.c	1997/02/20 22:18:16	1.1
--- fsdb.c	1997/02/20 22:18:26
***************
*** 111,117 ****
  	rval = cmdloop();
  	sblock.fs_clean = 0;		/* mark it dirty */
  	sbdirty();
! 	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");
--- 111,117 ----
  	rval = cmdloop();
  	sblock.fs_clean = 0;		/* mark it dirty */
  	sbdirty();
! 	ckfini(0);
  	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");
*** fsdbutil.c	1997/02/20 21:57:05	1.1
--- fsdbutil.c	1997/02/20 21:57:58
***************
*** 130,144 ****
  	break;
      }
      printf("I=%lu MODE=%o SIZE=%qu", inum, dp->di_mode, dp->di_size);
!     p = ctime(&dp->di_mtime.tv_sec);
      printf("\n\tMTIME=%15.15s %4.4s [%d nsec]", &p[4], &p[20],
! 	   dp->di_mtime.tv_nsec);
!     p = ctime(&dp->di_ctime.tv_sec);
      printf("\n\tCTIME=%15.15s %4.4s [%d nsec]", &p[4], &p[20],
! 	   dp->di_ctime.tv_nsec);
!     p = ctime(&dp->di_atime.tv_sec);
      printf("\n\tATIME=%15.15s %4.4s [%d nsec]\n", &p[4], &p[20],
! 	   dp->di_atime.tv_nsec);
  
      if (pw = getpwuid(dp->di_uid))
  	printf("OWNER=%s ", pw->pw_name);
--- 130,144 ----
  	break;
      }
      printf("I=%lu MODE=%o SIZE=%qu", inum, dp->di_mode, dp->di_size);
!     p = ctime(&dp->di_mtime);
      printf("\n\tMTIME=%15.15s %4.4s [%d nsec]", &p[4], &p[20],
! 	   dp->di_mtimensec);
!     p = ctime(&dp->di_ctime);
      printf("\n\tCTIME=%15.15s %4.4s [%d nsec]", &p[4], &p[20],
! 	   dp->di_ctime);
!     p = ctime(&dp->di_atime);
      printf("\n\tATIME=%15.15s %4.4s [%d nsec]\n", &p[4], &p[20],
! 	   dp->di_atimensec);
  
      if (pw = getpwuid(dp->di_uid))
  	printf("OWNER=%s ", pw->pw_name);
----end fsdb-lite2.patch



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19970220222947.7790.qmail>