Commit Graph

571 Commits

Author SHA1 Message Date
simonb 3395bf67b0 For the "update-sources" target, don't copy any src/lib/libz sources
that differ only in the first line (the NetBSD RCS header).
1999-04-15 02:28:36 +00:00
simonb 351120e29a Add uncompr.c to LIBZSRCS and zalloc.c to SRCS. 1999-04-15 00:52:58 +00:00
simonb 077cae2629 A simple implementation of zcalloc and zcfree in terms of the libsa
alloc and free.
1999-04-15 00:50:39 +00:00
simonb fe27047537 Add source file, copied from lib/libz/uncompr.c. 1999-04-15 00:48:03 +00:00
christos d15d073dcf add getopt prototype, and externs 1999-04-14 15:23:27 +00:00
drochner b7c510645f move "ls" utility from i386/stand/libsa here 1999-04-14 11:32:50 +00:00
drochner 2269d36c97 make libkern compile in userland - for testing purposes 1999-04-13 19:00:30 +00:00
drochner b6ab6f5dc1 This was an n_long, not u_long, so u_int32_t is correct. 1999-04-12 17:23:23 +00:00
ross 4634c0e3d4 libkern just got an inet_addr(), but it won't compile, no prototype. Cleanup...
* Add prototype to libkern.h.
* Remove the almost-identical-copy from libsa/net.[ch].
* Change its type back to the (wrong, but harmless) historical one. (u_long)
* Kill the XXX local prototype in nfs_bootparam.c
1999-04-12 01:05:01 +00:00
gwr c0300346be Add inet_addr.c (for nfs_bootparam.c) 1999-04-11 22:08:06 +00:00
simonb fa38a5236c The "found" label is not used if ALLOC_FIRST_FIT is defined. 1999-04-11 04:02:37 +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 8f8c1f41d9 It's no use having a memcmp() that calls bcmp() if there's no bcmp() in
the SA library.  Basically copied from ../libkern with a few less #if's
and #include's.
1999-04-01 05:12:20 +00:00
simonb e46b652af6 bestsize is unused if ALLOC_FIRST_FIT is defined. 1999-04-01 02:41:08 +00:00
simonb 6ce60662b5 Sync with src/lib/libc/string/bcmp.c 1999-04-01 00:30:39 +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
cgd e5ce91e0f3 replace memcpy() implementation (which just called bcopy()) with
a small implementation of memcpy().  libsa memcpy() wouldn't
do the right thing if LIBSA_USE_MEMCPY was defined, and the whole
point of that define is to get rid of either bcopy() or memcpy().
(cloned from the bcopy() code.)
1999-03-31 01:39:16 +00:00
cgd 8aa0c52d66 #undef bcopy, so that this will still compile if LIBSA_USE_MEMCPY is defined 1999-03-30 22:03:47 +00:00
cgd 9d06bcdcfe Add bzero.c, errno.c, and memset.c to SRCS 1999-03-30 22:02:39 +00:00
cgd 9ce004e069 add simple (small) implementations of memset and bzero. the versions
in libkern are fine for the kernel, but the versions here are smaller
and in libsa the point is size.
1999-03-30 22:01:15 +00:00
cgd 1611da0c3c move errno to its own file; if you just need errno, you don't need dev.c's fns 1999-03-30 21:59:58 +00:00
dbj 82347ce33e Changes to compile the next68k bootblocks with
egcs -Wpointer-arith -Wstrict-prototypes
This closes pr 6653
1999-03-26 15:41:38 +00:00
simonb 5d23f12467 Don't call f_dev->dv_close if it's a null pointer when an open() call
fails.
1999-03-26 03:16:15 +00:00
simonb 9913b7202b Revert SA_NOPUTCHAR - the pmax was the only port using it and the new
pmax bootblocks provide a putchar().
1999-03-23 22:25:31 +00:00
simonb 5e5bf63bc1 Don't add .abicalls if NO_ABICALLS is defined even if ABICALLS is defined. 1999-03-17 13:31:43 +00:00
jonathan 4c6134d7c8 Use merged memcpy()/memset() based on old bcopy rather than C-coded memmove.
TODO: change register usage so memcpy()/memmove() is default, put test
for back-copy before memcpy() and back-copy loop after memcpy().
1999-03-15 07:04:04 +00:00
jonathan e22fd3b59d Fix bug in construction of word-length version of 'c'.
Preserve input string and return it as per userlevel spec.
1999-03-15 06:34:10 +00:00
pk fabda9a224 Sync with libc 1999-03-05 09:18:32 +00:00
drochner 66f3455141 make the mipse[lb]->mips translation really work
(the S/// doesn't work as I'm now telling the 3rd time),
put the translation onto a separate line to make it more understandable
1999-03-04 19:46:09 +00:00
jonathan 3eeb52dee0 Makefile ${MACHINE_ARCH} changes for mips{eb,el}, as suggested by
Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
1999-03-03 12:00:18 +00:00
kim cc6ca72465 Made this compile:
- fifth arg to recvtftp should be size_t (not ssize_t)
- the path is passed tftp_makereq as a part of the handle structure
1999-02-28 00:57:07 +00:00
christos dd247aa44e Add missing prototypes for static functions. 1999-02-26 22:46:32 +00:00
ross 91d91ef1b2 XXX include libkern.h for strlen() XXX 1999-02-25 20:21:08 +00:00
drochner 0633616d7a build tftp filesystem, rearrange .ifdef slightly so that network stuff
is not built if ${SA_INCLUDE_NET} is not set
1999-02-24 19:31:03 +00:00
drochner 03497d6478 move TFTP filesystem from i386/stand/libsa here, it is mi 1999-02-24 19:24:56 +00:00
chs 5e59fee53a use RODATA(__ffstab) instead of ENTRY().
this makes profiling kernels work on the sparc.
1999-02-24 16:27:01 +00:00
chs b2546175a6 don't list any *.S files in SRCS multiple times, once is enough. 1999-02-24 16:25:43 +00:00
chs 5a0258140e no need to add ${OBJS} to POBJS here, bsd.lib.mk does it automatically. 1999-02-24 16:22:42 +00:00
simonb faca98eb71 Add memset.S instead of memset.c, and remove __main.c. 1999-02-23 11:06:38 +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
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
simonb f60844a657 Use printf() instead of putchar() if SA_NOPUTCHAR is defined (for the
pmax).
Also don't include stdarg.h/varargs.h - we don't use them here.
1999-02-22 07:53:52 +00:00
hubertf 56f2d188fc RCS ID police 1999-02-15 04:54:34 +00:00
pk bae33b3ad6 Split the printf variants into separate files. 1999-02-13 20:56:57 +00:00
lukem dcab0210a0 convert from NOxxx= to MKxxx=no.
include <bsd.own.mk> if testing a MKxxx variable.
1999-02-13 02:54:17 +00:00
drochner ccc6fbda81 Add some #ifdef SUPPORT_LINUX code which specifies a BOOTP tag to pass
a command line for that kernel.
Minor sizeof() sanity.
1999-02-12 10:56:18 +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
drochner ee57895586 That got broken in KNFifying. 1999-02-12 10:44:07 +00:00
pk 14b924800a Can't include libkern.h twice which is what happens if _KERNEL is on.
For now, protect here with _STANDALONE.
XXX - must probably fix sys/systm.h
1999-02-11 15:39:31 +00:00