Commit Graph

32 Commits

Author SHA1 Message Date
christos d15d073dcf add getopt prototype, and externs 1999-04-14 15:23:27 +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 e7d831fa31 Define bzero()/bcopy() in terms of memset()/memcpy() if LIBSA_USE_MEMSET
or LIBSA_USE_MEMCPY is defined.  Most everything pulls in stand.h so
this should cover ports that only use memset/memcpy but still want to
pull in as much as possible from sys/lib/libsa.
1999-02-22 10:08:42 +00:00
drochner 836a315463 We can't prototype exit() publically because it might take an argument or
not, depending on the port-specific environment.
Separate panic() and exit() so that the mi/default panic() can be used
without conflicting with a local exit() definition, move exit(void)
prototype to the default exit() implementation.
Closes PR bin/6990 by Wolfgang Helbig <helbig@Informatik.BA-Stuttgart.DE>.
1999-02-12 10:51:28 +00:00
pk ac01ce3a75 sprintf() now produces a return value, like the standard counterpart does.
Also, implement vsprintf(), snprintf() and vsnprintf().
1999-02-11 14:32:00 +00:00
pk eee0165e87 Add missing prototypes. 1999-02-11 09:10:43 +00:00
ross aeccd73ce4 Remove memset() prototype. 1998-09-22 20:29:03 +00:00
ross 141a463d8f Prototype memset(). 1998-09-22 00:37:08 +00:00
is 4c3784857e back out last change 1998-07-27 15:10:05 +00:00
is aaa6d634aa write prototype: void * -> const void *.
[Else the Amiga bootblock can't be built.]
1998-07-27 06:17:49 +00:00
drochner a1d00666ac Allow to define the location of the heap at runtime #if HEAP_VARIABLE.
That helps to test libsa code in user space.
1997-06-26 19:17:40 +00:00
drochner a0c4d8cb61 Add prototype for strerror(). 1997-06-13 14:30:44 +00:00
cgd b581a80665 prototype lseek(). also, prototype oopen(), oclose(), oread(), and olseek()
if __INTERNAL_LIBSA_CREAD is defined.
1997-01-22 00:37:23 +00:00
cgd b1f42c3a13 add memcmp, implemented as a wrapper around bcmp() (like memcpy() is
implemented as a wrapper around bcopy()).
1997-01-16 04:06:15 +00:00
gwr 033eec34ec Oops... get the vprintf prototype right. 1996-11-30 04:35:51 +00:00
gwr ecfe88202c Add declaration for vprintf. 1996-11-30 04:20:14 +00:00
christos e44c1d1f33 backout previous kprintf changes 1996-10-13 02:28:58 +00:00
christos 60d201973e printf -> kprintf, sprintf -> ksprintf 1996-10-10 22:46:11 +00:00
pk b461ef1d17 Allow seeks on raw devices. A `f_offset' field is added to the file structure
which is maintained in lseek(), read() and write(), and passed along to
the device's strategy routine.
1996-06-21 20:09:03 +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
pk d9124da47f Another round of clean up, including fixes presented by Matthias Drochner
(PR#1404). Things to be noted:
	- all IP addresses are now `struct in_addr's.
	- the function rarp_getipaddress() no longer return `myip'; in stead
	  it returns -1 on failure (errno set), 0 on success. `myip' is set
	  as a size-effect.
1995-09-18 21:19:18 +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
pk 84c517c128 Clear up some size_t/ssize_t confusion. 1995-09-14 23:45:21 +00:00
cgd b835913465 first arg to open() is a 'const char *'. pointed out by David Brownlee
in pr 1004.
1995-04-30 03:57:54 +00:00
cgd 586427643d various attribute poisoning, don't be as quick to specify size of files[] 1995-04-22 13:57:03 +00:00
mycroft 248e7ebfb0 Update prototypes. 1995-02-21 07:16:24 +00:00
cgd 6ac2bbfc35 be more careful with types, also pull in headers where necessary. 1994-10-30 21:43:03 +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
brezak c2e9be0873 Make libsa compile again by not including sys/errno.h 1994-08-04 19:39:32 +00:00
brezak e03842d0c7 Standalone networking for network boot loaders. 1994-05-08 16:11:14 +00:00
brezak 36b52a824e CMU/4.4 stand-alone library 1994-01-26 02:03:32 +00:00