summaryrefslogtreecommitdiffstats
path: root/sbin/fsdb
Commit message (Collapse)AuthorAgeFilesLines
* MFC r260068, r260069, r260076scottl2014-01-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | Add the -R option to allow fsck_ffs to restart itself when too many critical errors have been detected in a particular run. Clean up the global state variables so that a restart can happen correctly. Separate the global variables in fsck_ffs and fsdb to their own file. This fixes header sharing with fscd. Correctly initialize, static-ize, and remove global variables as needed in dir.c. This fixes a problem with lost+found directories that was causing a segfault. Correctly initialize, static-ize, and remove global variables as needed in suj.c. Initialize the suj globals before allocating the disk object, not after. Also ensure that 'preen' mode doesn't conflict with 'restart' mode Obtained from: Netflix
* Revert 248634 and 248643 (e.g., restoring 248625 and 248639).mckusick2013-03-231-3/+4
| | | | Build verified by: Glen Barber (gjb@)
* Revert r248639 to fix build failure on head/gjb2013-03-231-4/+3
|
* Fix the build after addition of cylinder group cacheing (r248625)mckusick2013-03-231-3/+4
| | | | | Reported by: Glen Barber (gjb@) Pointy hat to: Kirk McKusick (mckusick@)
* Catch up with internal API changes for initbarea() and getdatablk()pluknet2013-02-241-2/+2
| | | | | | of fsck_ffs introduced with r247212. Submitted by: David Wolfskill <david@catwhisker.org>
* Remove write only assignments and thus fix the build after struct bufareapluknet2013-02-151-1/+0
| | | | TAILQ conversion (r246812).
* Fix sbin/ build with a 64-bit ino_t.mdf2012-09-272-17/+22
| | | | Original code by: Gleb Kurtsou
* Partially undo r228693, by removing NO_WFORMAT.clang in fsdb's Makefile,dim2012-03-092-3/+1
| | | | | | | | | | | | and fixing the format string in sbin/fsdb/fsdbutil.c instead. Note the remark "Work around a problem with format string warnings and ntohs macros" was actually incorrect. The DIP(dp, di_nlink) macro invocation actually returned an int, due to its ternary expression, even though the di_nlink members of struct ufs1_dinode and struct ufs2_dinode are both defined as int16_t. MFC after: 2 weeks
* Define several extra macros in bsd.sys.mk and sys/conf/kern.pre.mk, todim2012-02-281-3/+1
| | | | | | | | | | | | | | | | | | | | | get rid of testing explicitly for clang (using ${CC:T:Mclang}) in individual Makefiles. Instead, use the following extra macros, for use with clang: - NO_WERROR.clang (disables -Werror) - NO_WCAST_ALIGN.clang (disables -Wcast-align) - NO_WFORMAT.clang (disables -Wformat and friends) - CLANG_NO_IAS (disables integrated assembler) - CLANG_OPT_SMALL (adds flags for extra small size optimizations) As a side effect, this enables setting CC/CXX/CPP in src.conf instead of make.conf! For clang, use the following: CC=clang CXX=clang++ CPP=clang-cpp MFC after: 2 weeks
* Improve sparse file handling when printing the block list for an inode bytruckman2012-02-061-7/+6
| | | | | | | | | | | not bailing out early when a hole is encountered in the direct block list. Print NULL block pointers in the direct block list. Simplify the code that prints the fragment count. Match the style of the existing code. Reviewed by: mckusick MFC after: 1 week
* Revert r228603, and add the workaround to sbin/fsdb/Makefile instead.dim2011-12-182-3/+6
| | | | MFC after: 1 week
* In sbin/fsdb/fsdbutil.c, work around a clang false positive with printfdim2011-12-161-2/+3
| | | | | | | format warnings and conditional operators. (See LLVM PR 11313 for more information.) MFC after: 1 week
* Get rid of major/minor number distinction.ed2011-09-281-4/+2
| | | | | | | | | | | | | | | | | | | | | | As of FreeBSD 6, devices can only be opened through devfs. These device nodes don't have major and minor numbers anymore. The st_rdev field in struct stat is simply based a copy of st_ino. Simply display device numbers as hexadecimal, using "%#jx". This is allowed by POSIX, since it explicitly states things like the following (example taken from ls(1)): "If the file is a character special or block special file, the size of the file may be replaced with implementation-defined information associated with the device in question." This makes the output of these commands more compact. For example, ls(1) now uses approximately four columns less. While there, simplify the column length calculation from ls(1) by calling snprintf() with a NULL buffer. Don't be afraid; if needed one can still obtain individual major/minor numbers using stat(1).
* The dump, fsck_ffs, fsdb, fsirand, newfs, makefs, and quot utilitiesmckusick2011-01-241-1/+1
| | | | | | | | | | | | | | include sys/time.h instead of time.h. This include is incorrect as per the manpages for the APIs and the POSIX definitions. This commit replaces sys/time.h where necessary with time.h. The commit also includes some minor style(9) header fixup in newfs. This commit is part of a larger effort by Garrett Cooper started in //depot/user/gcooper/posix-conformance-work/ -- to make FreeBSD more POSIX compliant. Submitted by: Garrett Cooper yanegomi at gmail dot com
* - Merge soft-updates journaling from projects/suj/head into head. Thisjeff2010-04-242-17/+20
| | | | | | | | brings in support for an optional intent log which eliminates the need for background fsck on unclean shutdown. Sponsored by: iXsystems, Yahoo!, and Juniper. With help from: McKusick and Peter Holm
* Update after function renames.pjd2006-10-312-4/+3
| | | | Sponsored by: home.pl
* Markup fixes.ru2006-09-181-1/+1
|
* Add a note that the btime command only works on UFS2.ceri2006-08-241-1/+4
| | | | Suggested by: maxim (who had also done the btime patch independently).
* Allow fsdb to manipulate the birthtime entries on UFS2.ceri2006-08-233-3/+29
| | | | | Approved by: jhb MFC after: 1 month
* o Implement findblk command: find the inode(s) owning the specifiedmaxim2006-06-022-1/+272
| | | | | | | disk block(s) number(s). Obtained from: NetBSD MFC after: 2 months
* o Do recrack(arguments) for commands which actually take NAME asmaxim2006-04-213-10/+12
| | | | | | | | | | | arguments so we do not coredump at "help foo", "back bar" and such. o Be consistent and print argc - 1 as a command arguments number in all cases. PR: bin/37096 Submitted by: Joshua Goodall MFC after: 1 month
* Use the new name H_SETSIZE instead of the old H_EVENT to set the historystefanf2005-10-191-1/+1
| | | | | | size. PR: 86355
* The libedit update made a const cast necessary.stefanf2005-08-071-1/+1
|
* Reword a sentence to conform with our mdoc(7) style.trhodes2005-02-121-3/+4
| | | | | | | Modify wording in a sentence to avoid a run on within (). Remove a contraction. Submitted by: Joel Dahl <joel@automatvapen.se> (original version)
* Sort sections.ru2005-01-181-9/+9
|
* Make fsck WARNS=2 clean.le2004-10-092-17/+17
|
* Downgrade WARNS level until GCC 3.4.2 warning are fixed.kan2004-07-281-0/+1
|
* Mechanically kill hard sentence breaks.ru2004-07-021-9/+18
|
* Fixed style of DPADD and LDADD assignments as per style.Makefile(5).ru2004-02-051-2/+2
|
* Make this WARNS=2 clean byjohan2003-11-133-8/+10
| | | | | | | | | | - #include <timeconv.h> for _time_to_time32 et al - use (uintmax_t) and %j - remove unused variable 'j' (from PR 39866) PR: 39866 Submitted by: Dan Lukes <dan@obluda.cz> Tested by: make universe
* Backout Rev. 1.24brueffer2003-08-301-1/+1
| | | | English lessons provided by: jhb
* Grammar fixbrueffer2003-08-291-1/+1
|
* I forgot fsdb was still sharing files with fsck.phk2002-09-161-1/+1
|
* s/filesystem/file system/g as discussed on -developerstrhodes2002-08-212-11/+11
|
* Warning cleanup.phk2002-07-302-3/+3
| | | | Format changes by peter
* The .Nm utilitycharnier2002-07-061-4/+6
|
* This commit adds basic support for the UFS2 filesystem. The UFS2mckusick2002-06-213-68/+117
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | filesystem expands the inode to 256 bytes to make space for 64-bit block pointers. It also adds a file-creation time field, an ability to use jumbo blocks per inode to allow extent like pointer density, and space for extended attributes (up to twice the filesystem block size worth of attributes, e.g., on a 16K filesystem, there is space for 32K of attributes). UFS2 fully supports and runs existing UFS1 filesystems. New filesystems built using newfs can be built in either UFS1 or UFS2 format using the -O option. In this commit UFS1 is the default format, so if you want to build UFS2 format filesystems, you must specify -O 2. This default will be changed to UFS2 when UFS2 proves itself to be stable. In this commit the boot code for reading UFS2 filesystems is not compiled (see /sys/boot/common/ufsread.c) as there is insufficient space in the boot block. Once the size of the boot block is increased, this code can be defined. Things to note: the definition of SBSIZE has changed to SBLOCKSIZE. The header file <ufs/ufs/dinode.h> must be included before <ufs/ffs/fs.h> so as to get the definitions of ufs2_daddr_t and ufs_lbn_t. Still TODO: Verify that the first level bootstraps work for all the architectures. Convert the utility ffsinfo to understand UFS2 and test growfs. Add support for the extended attribute storage. Update soft updates to ensure integrity of extended attribute storage. Switch the current extended attribute interfaces to use the extended attribute storage. Add the extent like functionality (framework is there, but is currently never used). Sponsored by: DARPA & NAI Labs. Reviewed by: Poul-Henning Kamp <phk@freebsd.org>
* more file system > filesystemtrhodes2002-05-162-9/+9
|
* Match prototypes to functions over in fsck_ffs.phk2002-05-141-3/+3
|
* o __P removal.imp2002-03-213-71/+41
| | | | | | o ansi function definitions. o main prototype removal o unifdef __STDC__
* Remove 'register' keyword.obrien2002-03-201-4/+4
| | | | | | It does not help modern compilers, and some may take some hit from it. (I also found several functions that listed *every* of its 10 local vars with "register" -- just how many free registers do people think machines have?)
* This sounds better.ru2002-03-151-1/+1
|
* Something i always wanted to see: add a function to print the list ofjoerg2002-01-264-19/+164
| | | | | | | | blocks allocated by some inode. Indirect blocks are printed recursively, so beware :), the list could become lengthy... (We should probably add some output pager to fsdb.) MFC after: 1 month
* Avoid pointless initialization of global variables to 0. This onlyjoerg2002-01-261-2/+2
| | | | | | | | bloats the resulting binary file by forcing them out of .bss into .data, while the C standard already guarantees them to become initialized to 0 at program startup. MFC after: 1 week
* Don't exit with -1 if the user typed "quit".joerg2002-01-261-1/+2
| | | | MFC after: 1 week
* Remove a not-very-useful printf(3).green2002-01-251-1/+0
|
* Allow fsdb the ability to work with entries named with whitespace embedded.green2002-01-253-3/+33
| | | | | | | | | | | This works by retokenizing a line with a split limit so that if the argument count for a command is greater than the number of arguments formed by splitting apart the line of user input, the last argument is instead all of the remainder of the input line. Yes, I needed this capability at one point to fix a filesystem manually, which happened to break with a problematic space-containing directory entry.
* Default to WARNS=2.obrien2001-12-041-0/+1
| | | | | | Binary builds that cannot handle this must explicitly set WARNS=0. Reviewed by: mike
* Check that the mode argument to fsdb's `chmod' command contains noiedowse2001-11-111-1/+1
| | | | | | | inode type bits set. Previously it would let you set IFMT bits (but not clear them). The `chtype' command should be be used instead for changing the inode type; having chmod half-work only causes confusion.
* *** empty log message ***obrien2001-10-011-3/+4
|
OpenPOWER on IntegriCloud