diff options
author | dwhite <dwhite@FreeBSD.org> | 1999-08-22 21:45:24 +0000 |
---|---|---|
committer | dwhite <dwhite@FreeBSD.org> | 1999-08-22 21:45:24 +0000 |
commit | 9cda01decb3256ad946657e0fc9a298213d4eaa8 (patch) | |
tree | 0de7c224091527fca4800e72ffaf6f9673980bfd /release/picobsd/tinyware | |
parent | 2bbfd73cc7441111e9e49645afb397eb04b1af45 (diff) | |
download | FreeBSD-src-9cda01decb3256ad946657e0fc9a298213d4eaa8.zip FreeBSD-src-9cda01decb3256ad946657e0fc9a298213d4eaa8.tar.gz |
Major PicoBSD update by luigi with some debugging help from myself.
. Now builds on -STABLE (-CURRENT is broken due to bugs)
. etc directory contents centralized instead of in each
type directory (can exclude & override as desired)
. Removed extraneous language files (lang files for rc really necessary?)
. dialog-based build tool with support for custom floppy builds
. MFS image loads as a mfs_root module instead of compiled into kernel
THIS IS BROKEN ON CURRENT. I'll MFC to -STABLE immediately following.
luigi tells me I have an OK from jkh on the MFC.
Submitted by: luigi
Diffstat (limited to 'release/picobsd/tinyware')
-rw-r--r-- | release/picobsd/tinyware/ns/ns.c | 20 | ||||
-rw-r--r-- | release/picobsd/tinyware/simple_httpd/Makefile | 2 | ||||
-rw-r--r-- | release/picobsd/tinyware/simple_httpd/README | 2 | ||||
-rw-r--r-- | release/picobsd/tinyware/simple_httpd/simple_httpd.c | 2 | ||||
-rw-r--r-- | release/picobsd/tinyware/vm/vm.c | 5 |
5 files changed, 13 insertions, 18 deletions
diff --git a/release/picobsd/tinyware/ns/ns.c b/release/picobsd/tinyware/ns/ns.c index 7f3db55..05c561e 100644 --- a/release/picobsd/tinyware/ns/ns.c +++ b/release/picobsd/tinyware/ns/ns.c @@ -135,15 +135,11 @@ sock_ntop(const struct sockaddr *sa, size_t salen) } case AF_LINK: { struct sockaddr_dl *sdl = (struct sockaddr_dl *) sa; - int l = sdl->sdl_nlen ; - if (l >= sizeof(str) ) - l = sizeof(str) - 1 ; - - if (l > 0) { - strncpy(str, &sdl->sdl_data[0], l); - str[l] = '\0'; - } else + if (sdl->sdl_nlen > 0) + snprintf(str, sizeof(str), "%*s", + sdl->sdl_nlen, &sdl->sdl_data[0]); + else snprintf(str, sizeof(str), "link#%d", sdl->sdl_index); return(str); } @@ -307,15 +303,16 @@ print_routing(char *proto) printf("----------------\n"); printf("Name Mtu Network Address " "Ipkts Ierrs Opkts Oerrs Coll\n"); - i=0; - for(next=if_buf;next<lim;next+=ifm->ifm_msglen) { + } + i=0; + for(next=if_buf;next<lim;next+=ifm->ifm_msglen) { ifm=(struct if_msghdr *)next; if_table[i]=(struct sockaddr *)(ifm+1); ifm_table[i]=ifm; sa = if_table[i]; - if (sa->sa_family == AF_LINK) { + if (iflag && sa->sa_family == AF_LINK) { struct sockaddr_dl *sdl = (struct sockaddr_dl *) sa; printf("%-4s %-5d <Link> ", @@ -336,7 +333,6 @@ print_routing(char *proto) ); } i++; - } } if (!rflag) { free(rt_buf); diff --git a/release/picobsd/tinyware/simple_httpd/Makefile b/release/picobsd/tinyware/simple_httpd/Makefile index 626f1c1..34864a5 100644 --- a/release/picobsd/tinyware/simple_httpd/Makefile +++ b/release/picobsd/tinyware/simple_httpd/Makefile @@ -1,4 +1,4 @@ -# $Id: Makefile,v 1.3 1999/02/12 20:36:13 abial Exp $ +# $Id: Makefile,v 1.2.2.2 1999/05/05 07:31:31 abial Exp $ # PROG=simple_httpd SRCS= simple_httpd.c diff --git a/release/picobsd/tinyware/simple_httpd/README b/release/picobsd/tinyware/simple_httpd/README index eafeb26..be4d7d9 100644 --- a/release/picobsd/tinyware/simple_httpd/README +++ b/release/picobsd/tinyware/simple_httpd/README @@ -164,4 +164,4 @@ This program was originally contributed by Marc Nicholas <marc@netstor.com> Major rewrite by William Lloyd <wlloyd@slap.net> -$Id:$ +$Id: README,v 1.2.2.2 1999/05/05 07:31:32 abial Exp $ diff --git a/release/picobsd/tinyware/simple_httpd/simple_httpd.c b/release/picobsd/tinyware/simple_httpd/simple_httpd.c index ddb593b..3886235 100644 --- a/release/picobsd/tinyware/simple_httpd/simple_httpd.c +++ b/release/picobsd/tinyware/simple_httpd/simple_httpd.c @@ -27,7 +27,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id:$ + * $Id: simple_httpd.c,v 1.2.2.2 1999/05/05 07:31:33 abial Exp $ */ #include <sys/stat.h> diff --git a/release/picobsd/tinyware/vm/vm.c b/release/picobsd/tinyware/vm/vm.c index 4babb24..8e089d8 100644 --- a/release/picobsd/tinyware/vm/vm.c +++ b/release/picobsd/tinyware/vm/vm.c @@ -26,14 +26,13 @@ * $Id: vm.c,v 1.2 1998/10/29 12:38:06 abial Exp $ */ +#include <stdio.h> #include <sys/types.h> -#include <sys/param.h> #include <sys/sysctl.h> #include <sys/vmmeter.h> - #include <vm/vm_param.h> -#include <stdio.h> +#define pgtok(a) ((a) * (u_int) DEFAULT_PAGE_SIZE >> 10) int main(int argc, char *argv[]) |