OpenBSD CVS

CVS log for src/sbin/fsck_ext2fs/setup.c


[BACK] Up to [local] / src / sbin / fsck_ext2fs

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.33 / (download) - annotate - [select for diffs], Mon Jul 1 07:13:44 2019 UTC (4 years, 11 months ago) by kevlo
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5, OPENBSD_7_4_BASE, OPENBSD_7_4, OPENBSD_7_3_BASE, OPENBSD_7_3, OPENBSD_7_2_BASE, OPENBSD_7_2, OPENBSD_7_1_BASE, OPENBSD_7_1, OPENBSD_7_0_BASE, OPENBSD_7_0, OPENBSD_6_9_BASE, OPENBSD_6_9, OPENBSD_6_8_BASE, OPENBSD_6_8, OPENBSD_6_7_BASE, OPENBSD_6_7, OPENBSD_6_6_BASE, OPENBSD_6_6, HEAD
Changes since 1.32: +4 -4 lines
Diff to previous 1.32 (colored)

Oops, forgot to commit this patch.

Revision 1.32 / (download) - annotate - [select for diffs], Fri Jun 28 13:32:43 2019 UTC (4 years, 11 months ago) by deraadt
Branch: MAIN
Changes since 1.31: +5 -5 lines
Diff to previous 1.31 (colored)

When system calls indicate an error they return -1, not some arbitrary
value < 0.  errno is only updated in this case.  Change all (most?)
callers of syscalls to follow this better, and let's see if this strictness
helps us in the future.

Revision 1.31 / (download) - annotate - [select for diffs], Sat Aug 26 06:32:06 2017 UTC (6 years, 9 months ago) by otto
Branch: MAIN
CVS Tags: OPENBSD_6_5_BASE, OPENBSD_6_5, OPENBSD_6_4_BASE, OPENBSD_6_4, OPENBSD_6_3_BASE, OPENBSD_6_3, OPENBSD_6_2_BASE, OPENBSD_6_2
Changes since 1.30: +2 -2 lines
Diff to previous 1.30 (colored)

Do not check the array but its length; based  on a netbsd commit by christos@;
also unsigned values cannot be < 0; ok millert@

Revision 1.30 / (download) - annotate - [select for diffs], Thu Apr 28 12:17:15 2016 UTC (8 years, 1 month ago) by krw
Branch: MAIN
CVS Tags: OPENBSD_6_1_BASE, OPENBSD_6_1, OPENBSD_6_0_BASE, OPENBSD_6_0
Changes since 1.29: +2 -2 lines
Diff to previous 1.29 (colored)

Fix fsck'ing. ext2fs_dinode grew extra bits to support ext4
and sizeof(struct ext2fs_dinode) had to be replaced with
EXT2_DINODE_SIZE() and such.

ok beck@

Revision 1.29 / (download) - annotate - [select for diffs], Thu Oct 15 15:11:10 2015 UTC (8 years, 7 months ago) by semarie
Branch: MAIN
CVS Tags: OPENBSD_5_9_BASE, OPENBSD_5_9
Changes since 1.28: +6 -1 lines
Diff to previous 1.28 (colored)

corrects pledge code for fsck_ffs and fsck_ext2fs

on filesystem error, fsck will try to display username of inode, resulting need
of "getpw" for not SMALL version.

add a missed (?) -DSMALL in distrib/special/ for fsck_ffs and fsck_ext2fs

found by hard way by ajacoutot@

OK millert@

Revision 1.28 / (download) - annotate - [select for diffs], Wed Oct 14 16:58:55 2015 UTC (8 years, 7 months ago) by deraadt
Branch: MAIN
Changes since 1.27: +28 -21 lines
Diff to previous 1.27 (colored)

Since the fsck_* programs now only handle one filesystem, this creates
a point where open() and disklabel reading have completed.  After that
point, pledge "stdio".

As a result, an fsck of a hostile partition (noone ever does that, or
do they? :) is done by a program with SUBSTANTIALLY less system call
exposure.
ok semarie

Revision 1.27 / (download) - annotate - [select for diffs], Thu Sep 10 15:21:40 2015 UTC (8 years, 8 months ago) by deraadt
Branch: MAIN
Changes since 1.26: +6 -2 lines
Diff to previous 1.26 (colored)

avoid divide by zero; from Michael McConville

Revision 1.26 / (download) - annotate - [select for diffs], Thu Aug 20 22:02:20 2015 UTC (8 years, 9 months ago) by deraadt
Branch: MAIN
Changes since 1.25: +4 -6 lines
Diff to previous 1.25 (colored)

<stdlib.h> is included, so do not need to cast result from
malloc, calloc, realloc*
ok krw millert

Revision 1.25 / (download) - annotate - [select for diffs], Fri Jan 16 06:39:57 2015 UTC (9 years, 4 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_5_8_BASE, OPENBSD_5_8, OPENBSD_5_7_BASE, OPENBSD_5_7
Changes since 1.24: +2 -2 lines
Diff to previous 1.24 (colored)

Replace <sys/param.h> with <limits.h> and other less dirty headers where
possible.  Annotate <sys/param.h> lines with their current reasons.  Switch
to PATH_MAX, NGROUPS_MAX, HOST_NAME_MAX+1, LOGIN_NAME_MAX, etc.  Change
MIN() and MAX() to local definitions of MINIMUM() and MAXIMUM() where
sensible to avoid pulling in the pollution.  These are the files confirmed
through binary verification.
ok guenther, millert, doug (helped with the verification protocol)

Revision 1.24 / (download) - annotate - [select for diffs], Thu Nov 20 15:22:39 2014 UTC (9 years, 6 months ago) by tedu
Branch: MAIN
Changes since 1.23: +1 -2 lines
Diff to previous 1.23 (colored)

remove sys/file.h includes in favor of fcntl.h where needed.
ok deraadt guenther

Revision 1.23 / (download) - annotate - [select for diffs], Sun Jul 13 16:08:53 2014 UTC (9 years, 10 months ago) by pelikan
Branch: MAIN
CVS Tags: OPENBSD_5_6_BASE, OPENBSD_5_6
Changes since 1.22: +28 -28 lines
Diff to previous 1.22 (colored)

kill fs2hXX/h2fsXX macros with letohXX/htoleXX

The reason being that ext2 structures are little-endian but JBD2 journal
is big-endian.  Don't confuse readers by talking about "file system endian".

ok guenther

Revision 1.22 / (download) - annotate - [select for diffs], Sun Jul 13 13:50:00 2014 UTC (9 years, 10 months ago) by pelikan
Branch: MAIN
Changes since 1.21: +2 -2 lines
Diff to previous 1.21 (colored)

new superblock header needs fixes

Revision 1.21 / (download) - annotate - [select for diffs], Fri Jul 11 15:54:52 2014 UTC (9 years, 10 months ago) by tobias
Branch: MAIN
Changes since 1.20: +4 -1 lines
Diff to previous 1.20 (colored)

Prevent division by zero on erroneous file systems.

ok pelikan@

Revision 1.20 / (download) - annotate - [select for diffs], Thu May 22 14:04:41 2014 UTC (10 years ago) by krw
Branch: MAIN
Changes since 1.19: +5 -7 lines
Diff to previous 1.19 (colored)

Nuke pointless dev_bsize variable which is always set to 512, and just
use DEV_BSIZE.

Write sizes need to be secsize and not DEV_BSIZE, just like reads.

Equivalent to changes made in fsck_ffs.

Revision 1.19 / (download) - annotate - [select for diffs], Fri Nov 22 04:38:02 2013 UTC (10 years, 6 months ago) by guenther
Branch: MAIN
CVS Tags: OPENBSD_5_5_BASE, OPENBSD_5_5
Changes since 1.18: +6 -4 lines
Diff to previous 1.18 (colored)

Kirk was being waaaay too chummy with the compiler when he trusted
it to not optimize away a comparison against NULL-1.
Add (unsigned char) casts for some ctype calls.
Teach fsck_ext2fs about MAXPARTITIONS, letting it operate on
partitions 'i' through 'p'.

ok deraadt@ millert@ otto@

Revision 1.18 / (download) - annotate - [select for diffs], Sat Mar 12 17:50:47 2011 UTC (13 years, 2 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_5_4_BASE, OPENBSD_5_4, OPENBSD_5_3_BASE, OPENBSD_5_3, OPENBSD_5_2_BASE, OPENBSD_5_2, OPENBSD_5_1_BASE, OPENBSD_5_1, OPENBSD_5_0_BASE, OPENBSD_5_0
Changes since 1.17: +3 -3 lines
Diff to previous 1.17 (colored)

These utilities can currently only operate with a 32-bit block number range,
so use daddr32_t
ok jasper

Revision 1.17 / (download) - annotate - [select for diffs], Tue May 18 04:41:14 2010 UTC (14 years ago) by dlg
Branch: MAIN
CVS Tags: OPENBSD_4_9_BASE, OPENBSD_4_9, OPENBSD_4_8_BASE, OPENBSD_4_8
Changes since 1.16: +2 -1 lines
Diff to previous 1.16 (colored)

dont let sys/ioctl.h imply that you get the ioctls in dkio.h. this
gets rid of #include <sys/dkio.h> in sys/ioctl.h and adds #include
<sys/dkio.h> to the places that actually want and use the disk
ioctls.

this became an issue when krw@'s X build failed when he was testing
a change to dkio.h.
tested by krw@
help from and ok miod@

Revision 1.16 / (download) - annotate - [select for diffs], Mon Mar 8 11:19:04 2010 UTC (14 years, 2 months ago) by otto
Branch: MAIN
CVS Tags: OPENBSD_4_7_BASE, OPENBSD_4_7
Changes since 1.15: +7 -1 lines
Diff to previous 1.15 (colored)

if ncg == 1, there's no alternate superblock; from NetBSD; ok deraadt@

Revision 1.15 / (download) - annotate - [select for diffs], Sun Sep 2 15:19:23 2007 UTC (16 years, 9 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_4_6_BASE, OPENBSD_4_6, OPENBSD_4_5_BASE, OPENBSD_4_5, OPENBSD_4_4_BASE, OPENBSD_4_4, OPENBSD_4_3_BASE, OPENBSD_4_3
Changes since 1.14: +2 -2 lines
Diff to previous 1.14 (colored)

use calloc() to avoid malloc(n * m) overflows; checked by djm canacar jsg

Revision 1.14 / (download) - annotate - [select for diffs], Tue May 29 06:28:15 2007 UTC (17 years ago) by otto
Branch: MAIN
CVS Tags: OPENBSD_4_2_BASE, OPENBSD_4_2
Changes since 1.13: +3 -3 lines
Diff to previous 1.13 (colored)

Updated disklabel format to support larger disks and partitions. We
free room in struct partition by packing fragment size and
fragments/block more tighlty and use the resulting space to make
offset and size 48 bits.  For the disk part we use spare fields in
struct disklabel.  Kernel converts in-mem copy of the on-disk
label if needed, disklabel(8) writes new version.
We are careful to only change fields not used by bootloaders.
Conception of basic scheme by deraadt.
ok deraadt@ krw@

Revision 1.13 / (download) - annotate - [select for diffs], Sat Apr 30 13:56:16 2005 UTC (19 years, 1 month ago) by niallo
Branch: MAIN
CVS Tags: OPENBSD_4_1_BASE, OPENBSD_4_1, OPENBSD_4_0_BASE, OPENBSD_4_0, OPENBSD_3_9_BASE, OPENBSD_3_9, OPENBSD_3_8_BASE, OPENBSD_3_8
Changes since 1.12: +4 -1 lines
Diff to previous 1.12 (colored)

Support checking filesystems which have or once had large files (>4 GB)
on them.

From NetBSD

Revision 1.12 / (download) - annotate - [select for diffs], Tue Jul 29 18:38:35 2003 UTC (20 years, 10 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_3_7_BASE, OPENBSD_3_7, OPENBSD_3_6_BASE, OPENBSD_3_6, OPENBSD_3_5_BASE, OPENBSD_3_5, OPENBSD_3_4_BASE, OPENBSD_3_4
Changes since 1.11: +2 -2 lines
Diff to previous 1.11 (colored)

spaces

Revision 1.11 / (download) - annotate - [select for diffs], Wed Jun 11 06:22:13 2003 UTC (20 years, 11 months ago) by deraadt
Branch: MAIN
Changes since 1.10: +8 -19 lines
Diff to previous 1.10 (colored)

ansification

Revision 1.10 / (download) - annotate - [select for diffs], Mon Jun 2 20:06:15 2003 UTC (21 years ago) by millert
Branch: MAIN
Changes since 1.9: +2 -6 lines
Diff to previous 1.9 (colored)

Remove the advertising clause in the UCB license which Berkeley
rescinded 22 July 1999.  Proofed by myself and Theo.

Revision 1.9 / (download) - annotate - [select for diffs], Sun Jun 9 08:13:05 2002 UTC (21 years, 11 months ago) by todd
Branch: MAIN
CVS Tags: OPENBSD_3_3_BASE, OPENBSD_3_3, OPENBSD_3_2_BASE, OPENBSD_3_2
Changes since 1.8: +4 -4 lines
Diff to previous 1.8 (colored)

rm trailing whitespace

Revision 1.8 / (download) - annotate - [select for diffs], Sat Feb 16 21:27:34 2002 UTC (22 years, 3 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_3_1_BASE, OPENBSD_3_1
Changes since 1.7: +5 -5 lines
Diff to previous 1.7 (colored)

Part one of userland __P removal.  Done with a simple regexp with some minor hand editing to make comments line up correctly.  Another pass is forthcoming that handles the cases that could not be done automatically.

Revision 1.7 / (download) - annotate - [select for diffs], Tue Sep 18 17:43:15 2001 UTC (22 years, 8 months ago) by art
Branch: MAIN
CVS Tags: OPENBSD_3_0_BASE, OPENBSD_3_0
Changes since 1.6: +5 -17 lines
Diff to previous 1.6 (colored)

cleanups and endianness fixes. Mostly from NetBSD

Revision 1.6 / (download) - annotate - [select for diffs], Wed Apr 26 23:26:06 2000 UTC (24 years, 1 month ago) by jasoni
Branch: MAIN
CVS Tags: OPENBSD_2_9_BASE, OPENBSD_2_9, OPENBSD_2_8_BASE, OPENBSD_2_8, OPENBSD_2_7_BASE, OPENBSD_2_7
Changes since 1.5: +121 -52 lines
Diff to previous 1.5 (colored)

Support for ext2fs rev. 1

Revision 1.5 / (download) - annotate - [select for diffs], Tue Aug 17 09:13:14 1999 UTC (24 years, 9 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_2_6_BASE, OPENBSD_2_6
Changes since 1.4: +3 -3 lines
Diff to previous 1.4 (colored)

More <sys/file.h> vs. <fcntl.h> and open() flags fixes.

Revision 1.4 / (download) - annotate - [select for diffs], Sat Jun 14 05:04:12 1997 UTC (26 years, 11 months ago) by downsj
Branch: MAIN
CVS Tags: OPENBSD_2_5_BASE, OPENBSD_2_5, OPENBSD_2_4_BASE, OPENBSD_2_4, OPENBSD_2_3_BASE, OPENBSD_2_3, OPENBSD_2_2_BASE, OPENBSD_2_2
Changes since 1.3: +4 -4 lines
Diff to previous 1.3 (colored)

s/malloc.h/stdlib.h in pass5.c, and actually malloc() enough memory in
setup() for the superblock!

Revision 1.3 / (download) - annotate - [select for diffs], Sat Jun 14 04:16:59 1997 UTC (26 years, 11 months ago) by downsj
Branch: MAIN
Changes since 1.2: +5 -0 lines
Diff to previous 1.2 (colored)

Add tags, fix man page.  Purely cosmetic.

Revision 1.2 / (download) - annotate - [select for diffs], Sat Jun 14 04:06:33 1997 UTC (26 years, 11 months ago) by downsj
Branch: MAIN
Changes since 1.1: +3 -4 lines
Diff to previous 1.1 (colored)

Sync with NetBSD.  Purely cosmetic.

Revision 1.1.1.1 / (download) - annotate - [select for diffs] (vendor branch), Fri May 30 04:33:55 1997 UTC (27 years ago) by downsj
Branch: BOUYER
CVS Tags: R19970424
Changes since 1.1: +0 -0 lines
Diff to previous 1.1 (colored)

Initial import of Manuel's fsck_ext2fs, unmodified.

Revision 1.1 / (download) - annotate - [select for diffs], Fri May 30 04:33:55 1997 UTC (27 years ago) by downsj
Branch: MAIN

Initial revision

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.