Commit Graph

27 Commits

Author SHA1 Message Date
cgd b43600a96e note that these files should be easily diffable (until they share common code 1999-08-18 21:33:50 +00:00
cgd cd10ee60f6 set f_seekp to 0 in ufs_open() before returning. It ended up being 0
in most situations, but not always: if the terminal path name component
being opened couldn't be found in the first fs block of the directory
that contained it, f_seekp would be non-zero (and Bad Things would result).
1999-08-17 02:26:32 +00:00
simonb 6db650781c Don't compile in sanity checks for old file systems if
LIBSA_NO_COMPAT_UFS is defined.
1999-04-01 05:27:54 +00:00
simonb ff2206f6df G/C UFS_NOSYMLINK, UFS_NOCLOSE and UFS_NOWRITE and use new LIBSA_NO_FS_*. 1999-03-31 07:43:39 +00:00
cgd 309213477a Make a bunch of backward-compatible changes to the boot blocks which allow
size to be reduced substantially.  (backward compatibility verified
by compiling one of the alpha boot blocks which uses all of the code
before and after, diffing the object files, and manually verifying that
the differences were 'correct'.  some differences were "unavoidable,"
it wanting to avoid a double-commit, because e.g. local variables which
were previously used were no longer used.)  a README which describes
supported options (or at least the ones mentioned below) is forthcoming.

add support for the preprocessor macro LIBSA_NO_TWIDDLE, which
  causes calls to twiddle() to be omitted if it's defined.
add support for the preprocessor macros:
	LIBSA_NO_FS_CLOSE
	LIBSA_NO_FS_WRITE
	LIBSA_NO_FS_SEEK
  which, if defined, cause the corresponding file system operations
  in the individual file system implementations to be omitted.  (note
  that all of those macros are not supported by all file systems at
  this point.  comments were added to individual file system files
  to indicate lack of support, and should be cleaned up later.  Backward
  compatibility options e.g. UFS_NOCLOSE, etc., are supported.)
add support for the preprocessor macro LIBSA_NO_FS_SYMLINK, which
  removes support for symbolic links from the file system support
  functions.  (same notes as for the macros above apply.)
add support for the preprocessor macro LIBSA_FS_SINGLECOMPONENT which
  removes all subdirectory and symlink support from the file system
  support functions.  (same notes as for the macros above apply.)
add support for the preprocessor macro LIBSA_NO_FD_CHECKING, which
  causes code relating to libsa file descriptor checks (e.g. range
  checking and checking that a file descriptor is valid) to be
  omitted if it's defined.
add support for the preprocessor macro LIBSA_NO_RAW_ACCESS, which
  causes code relating to raw device access to be omitted if it's
  defined.
change some structure copies to use bcopy() instead.  that way
  use of bcopy vs. memcpy() can easily be selected by
  LIBSA_USE_MEMCPY.  (without changes like these, you could end up
  having both bcopy() and memcpy() included.  eventually, all
  calls to bcopy should be changed to calls to memcpy() or memmove()
  as appropriate -- hopefully never the latter -- with an option to
  use bcopy instead.)
add support for the preprocessor macro LIBSA_NO_DISKLABEL_MSGS, which
  causes disklabel() to return '1' as msg rather than a string.  Can
  be used if the boot blocks don't care about the string, and need to
  save the space.
add support for the preprocessor macro LIBSA_SINGLE_FILESYSTEM, which
  if defined causes all of the file system switch code to be removed.
  Its value should be the name of the file system supported by the
  boot block, e.g. "ufs" for the FFS file system.  calls to the
  file system functions open, close, etc., which were previously
  done through a function switch are then done via direct invocation
  of <fs>_open, <fs>_close, etc. (e.g. ufs_open, ...).
add support for the preprocessor macro LIBSA_SINGLE_DEVICE, which
  does the equivalent of LIBSA_SINGLE_FILESYSTEM but for the device
  switch table.  Device entry pointes are expected to be named
  <dev>foo, e.g. the 'strategy' routine used when LIBSA_SINGLE_DEVICE
  is set to 'disk' is diskstrategy.
make ufs.c f_nindir array be unsigned ints.  the fact that it was signed
  caused ufs.c to require signed division routines (which were otherwise
  unnecessary for a small boot block).
1999-03-31 01:50:25 +00:00
simonb 99c7714a77 Drop support for symlinks of UFS_NOSYMLINK is defined.
Don't compile in ufs_close/ufs_write if UFS_NOCLOSE/UFS_NOWRITE is defined.
Remove trailing whitespace.
1999-02-22 07:59:09 +00:00
pk eee0165e87 Add missing prototypes. 1999-02-11 09:10:43 +00:00
ross 331fee623e Sweep up some miscellaneous leftover lite2 integration shrapnel. 1998-03-01 07:15:39 +00:00
drochner ed2ca9f1fa Avoid user space headers for standalone programs.
Don't use sys/lib/libkern or sys/lib/libz if not standalone
 (ie, user space test programs).
1997-06-26 19:11:30 +00:00
drochner bc7d1ebcfb Don't #include <string.h>, needed prototypes are in libkern.h. 1997-06-13 14:32:24 +00:00
cgd 493bd9e110 fix file system buffer leak that occurs if an error occurs (e.g. file not
found) during the file system open function after having read some data
from the disk.  From  Matthias Drochner (PR 3120).
1997-01-17 20:17:58 +00:00
ws fd225e6527 Add support for booting from cd9660 fs
Support directory traversal and symbolic links for nfs booting
Close device when file opening failed
Plug memory leak in ufs code
1996-09-30 16:01:18 +00:00
ragge 28061842a2 Fix include file order to confirm to KNF in master tree also. 1996-06-02 13:28:21 +00:00
leo b7b97847ce Some files containing more than one function are split. This reduces the
size of the resulting loader. The read_inode() function now returns the
result of the strategy function instead of success in all cases (ufs.c).
Fixes pr#1817
1996-01-13 22:25:32 +00:00
cgd e7290be2cd add prototypes for static functions. make ffs_oldfscompat static.
fix some arguments and structure members, in recognition of the fact
that (u_int == u_long == size_t) is not true on all systems.
1995-10-20 00:42:21 +00:00
pk 82e5cf06bc Revert fs_ops read/write declarations; these return error numbers.
Get rid of some more compiler warnings.
Set errno where appropriate.
1995-09-17 00:49:37 +00:00
mycroft 2d7464c4b9 Add a generic twiddler. 1995-02-21 06:33:22 +00:00
ws dcb3f5a8b8 Better fix for the last.
Worked this out together with Darren Reed.
This one fixes several bugs, plus it's closer to the original
1995-01-07 20:53:31 +00:00
pk 2f25eb5231 Update symbolic-link handling, from Darren Reed. 1995-01-06 00:22:58 +00:00
cgd 6668f51c96 new RCS ID format. 1994-10-26 05:44:32 +00:00
brezak 6f0b0cdc86 Cleanup to make more ANSI compliant; checkpoint 1994-08-22 21:55:58 +00:00
cgd d5bc01994f include libkern.h 1994-07-27 07:58:45 +00:00
cgd 4b0d7d9d90 get rid of someone else's bravery (stupidity) 1994-07-27 07:37:25 +00:00
pk b4a094da43 Include ffs_oldfscompat() from ffs_vfsops.c; enables booting from pre-44
filesystems (on big-endian machines).
1994-07-18 13:08:09 +00:00
pk c6a70c0ca9 Further adaptions to 4.4-lite header files. 1994-06-20 08:39:01 +00:00
glass d2ec31313f make it compile w/4.4-lite header file changes 1994-06-20 07:50:17 +00:00
brezak 36b52a824e CMU/4.4 stand-alone library 1994-01-26 02:03:32 +00:00