From owner-freebsd-emulation Mon Mar 3 20:20:14 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id UAA21716 for emulation-outgoing; Mon, 3 Mar 1997 20:20:14 -0800 (PST) Received: from obiwan.aceonline.com.au (obiwan.aceonline.com.au [203.103.90.67]) by freefall.freebsd.org (8.8.5/8.8.5) with ESMTP id UAA21558; Mon, 3 Mar 1997 20:16:41 -0800 (PST) Received: from localhost (adrian@localhost) by obiwan.aceonline.com.au (8.8.5/8.8.5) with SMTP id SAA02177; Tue, 4 Mar 1997 18:19:38 +0800 (WST) Date: Tue, 4 Mar 1997 18:19:38 +0800 (WST) From: Adrian Chadd To: hackers@freebsd.org, emulation@freebsd.org Subject: Re : latest Java support source for FreeBSD.. Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-emulation@freebsd.org X-Loop: FreeBSD.org Precedence: bulk Ok here it is. If people like the idea of making it a lkm, then combine it with joerg's lkm patch and go from there. Test it, find bugs, and tell me asap so I can go forth and fix them.. this might be a good addition to the 2.2-rel *grin* Also - I'll finish the appletviewer support tonight. Adrian. -- Begin /usr/sys/sys/kern/imgact_jave.c /*- * Copyright (c) 1997 Adrian Chadd * All rights reserved. * * Based heavily on /sys/kern/imgact_shell.c which is: * Copyright (c) 1993, David Greenman * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer * in this position and unchanged. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software withough specific prior written permission * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ #include #include #include #include #include #include #include #include #include #include /* Lets set up reasonable defaults for the system variables ** kern.java.interpreter and kern.java.appletviewer */ static char interpreter[256] = "/usr/local/jdk/bin/i386/java"; static char appletviewer[256] = "/usr/local/jdk/bin/i386/appletviewer"; static char classpath[256] = "/usr/local/jdk/classes:/usr/local/jdk/lib/classes.zip"; SYSCTL_NODE(_kern, OID_AUTO, java, CTLFLAG_RW, 0, "Kernel Java support"); SYSCTL_STRING(_kern_java, OID_AUTO, interpreter, CTLFLAG_RW, interpreter, sizeof(interpreter), "Path to Java interpreter"); SYSCTL_STRING(_kern_java, OID_AUTO, appletviewer, CTLFLAG_RW, appletviewer, sizeof(appletviewer), "Path to Java appletviewer"); SYSCTL_STRING(_kern_java, OID_AUTO, classpath, CTLFLAG_RW, classpath, sizeof(classpath), "Path to Java classes"); extern int exec_java_imgact __P((struct image_params *iparams)); int dirname(const char *, char *, int); int basename(const char *, char *, int); char * strstr(const char *, const char *); /* Some utility crap */ int dirname(const char *string, char *newstring, int maxlen) { char *p; int ch; char str[256]; strncpy(str, string, 250); str[250] = '\0'; /* * (1) If string is //, skip steps (2) through (5). * (2) If string consists entirely of slash characters, string * shall be set to a single slash character. In this case, * skip steps (3) through (8). */ for (p = str;; ++p) { if (!*p) { if (p > str) (void)strcpy(newstring, "/"); else (void)strcpy(newstring, "."); return(0); } if (*p != '/') break; } /* * (3) If there are any trailing slash characters in string, they * shall be removed. */ for (; *p; ++p); while (*--p == '/') continue; *++p = '\0'; /* * (4) If there are no slash characters remaining in string, * string shall be set to a single period character. In this * case skip steps (5) through (8). * * (5) If there are any trailing nonslash characters in string, * they shall be removed. */ while (--p >= str) if (*p == '/') break; ++p; if (p == str) { (void)strcpy(newstring, "."); return(0); } /* * (6) If the remaining string is //, it is implementation defined * whether steps (7) and (8) are skipped or processed. * * This case has already been handled, as part of steps (1) and (2). */ /* * (7) If there are any trailing slash characters in string, they * shall be removed. */ while (--p >= str) if (*p != '/') break; ++p; /* * (8) If the remaining string is empty, string shall be set to * a single slash character. */ *p = '\0'; if (p == str) { strcpy(newstring, "/"); } else { strncpy(newstring, str, maxlen); newstring[maxlen] = '\0'; } return(0); } int basename(const char *string, char *newstring, int maxlen) { int ch; char *p; char str[256]; strncpy(str, string, 250); str[250] = '\0'; /* * (1) If string is // it is implementation defined whether steps (2) * through (5) are skipped or processed. * * (2) If string consists entirely of slash characters, string shall * be set to a single slash character. In this case, skip steps * (3) through (5). */ for (p = str;; ++p) { if (!*p) { if (p > str) (void)strcpy(newstring, "/"); else (void)strcpy(newstring, ""); return(0); } if (*p != '/') break; } /* * (3) If there are any trailing slash characters in string, they * shall be removed. */ for (; *p; ++p) continue; while (*--p == '/') continue; *++p = '\0'; /* * (4) If there are any slash characters remaining in string, the * prefix of string up to an including the last slash character * in string shall be removed. */ while (--p >= str) if (*p == '/') break; ++p; /* * (5) If the suffix operand is present, is not identical to the * characters remaining in string, and is identical to a suffix * of the characters remaining in string, the suffix suffix * shall be removed from string. */ if (++*str) { int suffixlen, stringlen, off; suffixlen = strlen(str); stringlen = strlen(p); if (suffixlen < stringlen) { off = stringlen - suffixlen; if (!strcmp(p + off, str)) p[off] = '\0'; } } (void)strncpy(newstring, p, maxlen); return(0); } /* * Find the first occurrence of find in s. */ char * strstr(s, find) register const char *s, *find; { register char c, sc; register size_t len; if ((c = *find++) != 0) { len = strlen(find); do { do { if ((sc = *s++) == 0) return (NULL); } while (sc != c); } while (strncmp(s, find, len) != 0); s--; } return ((char *)s); } /* The real thing */ int exec_java_imgact(imgp) struct image_params *imgp; { const char *image_header = imgp->image_header; const char *ihp, *line_endp; char *interp; static char javabin_name[256]; static char javabin_path[256]; static char cpathstr[256]; static char javatmp[256]; /* A java binary? */ if ((image_header[0] != '\xca') || (image_header[1] != '\xfe') || (image_header[2] != '\xba') || (image_header[3] != '\xbe')) { #ifdef DEBUG printf("Failed to run a java binary : invalid signature?\n"); return(-1); #endif } /* Ok, its a java binary, so lets tell the world */ /* Firstly split the path to the binary up into path and filename */ basename(imgp->uap->fname, javabin_name, sizeof(javabin_name)); dirname(imgp->uap->fname, javabin_path, sizeof(javabin_path)); /* Now we are going to take the filename, and if it doesn't contain ** a .class then return with a "non-executable" error */ if (strstr(javabin_name, ".class") == NULL) { return -1; } /* Ok so we'll assume (stupidly) that the .class is at the end of the ** filename, so lets copy the filename over minus the last 6 chars */ strncpy(javatmp, javabin_name, strlen(javabin_name) - 6); strcpy(javabin_name, javatmp); /* Since its interpreted we'll tag it as such. */ imgp->interpreted = 1; /* And we'll set the interpreter name here too (would help) */ strncpy(imgp->interpreter_name, interpreter, sizeof(imgp->interpreter_name)); /* now lets make up our -classpath arguement */ sprintf(cpathstr, "%s -classpath %s:%s", interpreter, classpath, javabin_path); /* Now lets write this into the strings space, just like in the ** _shell.c file... */ ihp = cpathstr; line_endp = cpathstr + strlen(cpathstr); while (ihp < line_endp) { while ((*ihp == ' ') || (*ihp == '\t')) ihp++; if (ihp < line_endp) { while ((ihp < line_endp) && (*ihp != ' ') && (*ihp != '\t')) { *imgp->stringp++ = *ihp++; imgp->stringspace--; } *imgp->stringp++ = 0; imgp->stringspace--; imgp->argc++; } } strcpy(imgp->uap->fname, javabin_name); suword(imgp->uap->argv, (int)imgp->uap->fname); return (0); } /* * Tell kern_execve.c about it, with a little help from the linker. * Since `const' objects end up in the text segment, TEXT_SET is the * correct directive to use. */ const struct execsw java_execsw = { exec_java_imgact, "\xca\xfe\xba\xbe" }; TEXT_SET(execsw_set, java_execsw); From owner-freebsd-emulation Mon Mar 3 22:32:02 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id WAA28738 for emulation-outgoing; Mon, 3 Mar 1997 22:32:02 -0800 (PST) Received: from alpo.whistle.com (alpo.whistle.com [207.76.204.38]) by freefall.freebsd.org (8.8.5/8.8.5) with ESMTP id WAA28718; Mon, 3 Mar 1997 22:31:56 -0800 (PST) Received: from current1.whistle.com (current1.whistle.com [207.76.205.22]) by alpo.whistle.com (8.8.5/8.8.4) with SMTP id WAA21380; Mon, 3 Mar 1997 22:24:53 -0800 (PST) Message-ID: <331BBFAB.59E2B600@whistle.com> Date: Mon, 03 Mar 1997 22:22:35 -0800 From: Julian Elischer Organization: Whistle Communications X-Mailer: Mozilla 3.0Gold (X11; I; FreeBSD 2.2-CURRENT i386) MIME-Version: 1.0 To: Adrian Chadd CC: hackers@FreeBSD.org, emulation@FreeBSD.org Subject: Re: Re : latest Java support source for FreeBSD.. References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-emulation@FreeBSD.org X-Loop: FreeBSD.org Precedence: bulk Adrian Chadd wrote: > > Ok here it is. > If people like the idea of making it a lkm, then combine it with joerg's > lkm patch and go from there. > > Test it, find bugs, and tell me asap so I can go forth and fix them.. this > might be a good addition to the 2.2-rel *grin* > not as such.. it's way too late in the game.., weeelllll I think so anyhow.. but it might be includable in the "experimental" directory of the cdrom if we still have one? jordan? Of course as it IS a totally new file and functionality, it MIGHT be safe to include it..... hmmmmmm joerg? what do you think? From owner-freebsd-emulation Tue Mar 4 01:03:39 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id BAA07870 for emulation-outgoing; Tue, 4 Mar 1997 01:03:39 -0800 (PST) Received: from genesis.atrad.adelaide.edu.au (genesis.atrad.adelaide.edu.au [129.127.96.120]) by freefall.freebsd.org (8.8.5/8.8.5) with ESMTP id BAA07856 for ; Tue, 4 Mar 1997 01:03:33 -0800 (PST) Received: (from msmith@localhost) by genesis.atrad.adelaide.edu.au (8.8.5/8.7.3) id TAA13019; Tue, 4 Mar 1997 19:33:15 +1030 (CST) From: Michael Smith Message-Id: <199703040903.TAA13019@genesis.atrad.adelaide.edu.au> Subject: Re: New vm86 patches In-Reply-To: <19970301152357.01799@right.PCS> from Jonathan Lemon at "Mar 1, 97 03:23:57 pm" To: jlemon@americantv.com (Jonathan Lemon) Date: Tue, 4 Mar 1997 19:33:15 +1030 (CST) Cc: sef@Kithrup.COM, emulation@freebsd.org X-Mailer: ELM [version 2.4ME+ PL28 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-emulation@freebsd.org X-Loop: FreeBSD.org Precedence: bulk Jonathan Lemon stands accused of saying: > On Feb 02, 1997 at 07:33:22PM -0800, Sean Eric Fagan wrote: > > I have placed the current patches that msmith and I are using (jlemon > > is a bit ahead of us ;)) on freefall.freebsd.org, in ~ftp/pub/sef. > > Urk. Yeah, these are older patches. I just grabbed 2.2-GAMMA and built > a kernel this morning, and the last set of patches that I sent out (for > -current) applies cleanly to -GAMMA as well. Just beating on these now. They look OK, and the lkm probably makes your life a lot easier. > Note that there some modifications are needed to doscmd as well; these > diffs are included in the patch set. They should also apply cleanly to > doscmd_fbsd-970228. They do, but the resulting kernel doesn't do the vm86 thing. I have the LKM loaded, and a doscmd built with the new kernel headers, but no soap. Is entry to vm86 mode still via sigreturn as per normal? > Please try these patches. I was able to run 'fdisk' from OpenDOS without > crashing my system; in fact, these are the same patches that I've been > running for the last few weeks, without any crashes at all. It would be > nice if we could get these into 2.2 before it is released, or is this > too "11th hour" for everybody? It's way too 11th hour, but I'll be asking Jordan to put whatever the most current 'stable' doscmd might be on the 2.2 CD. > Jonathan -- ]] Mike Smith, Software Engineer msmith@gsoft.com.au [[ ]] Genesis Software genesis@gsoft.com.au [[ ]] High-speed data acquisition and (GSM mobile) 0411-222-496 [[ ]] realtime instrument control. (ph) +61-8-8267-3493 [[ ]] Unix hardware collector. "Where are your PEZ?" The Tick [[ From owner-freebsd-emulation Tue Mar 4 07:44:18 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id HAA27151 for emulation-outgoing; Tue, 4 Mar 1997 07:44:18 -0800 (PST) Received: from nic.follonett.no (nic.follonett.no [194.198.43.10]) by freefall.freebsd.org (8.8.5/8.8.5) with ESMTP id HAA27141; Tue, 4 Mar 1997 07:44:08 -0800 (PST) Received: (from uucp@localhost) by nic.follonett.no (8.8.5/8.8.3) with UUCP id QAA29454; Tue, 4 Mar 1997 16:40:02 +0100 (MET) Received: from oo7 (oo7.dimaga.com [192.0.0.65]) by dimaga.com (8.7.5/8.7.2) with SMTP id QAA11856; Tue, 4 Mar 1997 16:41:56 +0100 (MET) Message-Id: <3.0.32.19970304164156.0092a2d0@dimaga.com> X-Sender: eivind@dimaga.com X-Mailer: Windows Eudora Pro Version 3.0 (32) Date: Tue, 04 Mar 1997 16:41:57 +0100 To: Adrian Chadd From: Eivind Eklund Subject: Re: Re : latest Java support source for FreeBSD.. Cc: hackers@freebsd.org, emulation@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Sender: owner-emulation@freebsd.org X-Loop: FreeBSD.org Precedence: bulk At 06:19 PM 3/4/97 +0800, Adrian Chadd wrote: > >Ok here it is. >If people like the idea of making it a lkm, then combine it with joerg's >lkm patch and go from there. > >Test it, find bugs, and tell me asap so I can go forth and fix them.. this >might be a good addition to the 2.2-rel *grin* > >Also - I'll finish the appletviewer support tonight. > >Adrian. > >-- Begin /usr/sys/sys/kern/imgact_jave.c >/*- > * Copyright (c) 1997 Adrian Chadd > * All rights reserved. It would be very nice if you deleted this line, as presently you're not even allowing me to read the code you're sending to the mailing list ;-) (If you deleted the line, I believe you would get the effect of having the BSD copyright for the entire file) > * > * Based heavily on /sys/kern/imgact_shell.c which is: > * Copyright (c) 1993, David Greenman > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer > * in this position and unchanged. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * 3. The name of the author may not be used to endorse or promote products > * derived from this software withough specific prior written permission > * > * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR > * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES > * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. > * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, > * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT > * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, > * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY > * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT > * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF > * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. > * > */ > >#include >#include >#include >#include >#include >#include >#include >#include >#include >#include > > > >/* Lets set up reasonable defaults for the system variables >** kern.java.interpreter and kern.java.appletviewer >*/ > > >static char interpreter[256] = "/usr/local/jdk/bin/i386/java"; >static char appletviewer[256] = "/usr/local/jdk/bin/i386/appletviewer"; >static char classpath[256] = "/usr/local/jdk/classes:/usr/local/jdk/lib/classes.zip"; > >SYSCTL_NODE(_kern, OID_AUTO, java, CTLFLAG_RW, 0, "Kernel Java support"); > >SYSCTL_STRING(_kern_java, OID_AUTO, interpreter, CTLFLAG_RW, interpreter, sizeof(interpreter), "Path to Java interpreter"); >SYSCTL_STRING(_kern_java, OID_AUTO, appletviewer, CTLFLAG_RW, appletviewer, sizeof(appletviewer), "Path to Java appletviewer"); >SYSCTL_STRING(_kern_java, OID_AUTO, classpath, CTLFLAG_RW, classpath, sizeof(classpath), "Path to Java classes"); > >extern int exec_java_imgact __P((struct image_params *iparams)); >int dirname(const char *, char *, int); >int basename(const char *, char *, int); >char * strstr(const char *, const char *); > > > >/* Some utility crap */ > > >int dirname(const char *string, char *newstring, int maxlen) > >{ > char *p; > int ch; > char str[256]; > > strncpy(str, string, 250); > str[250] = '\0'; > > > /* > * (1) If string is //, skip steps (2) through (5). > * (2) If string consists entirely of slash characters, string > * shall be set to a single slash character. In this case, > * skip steps (3) through (8). > */ > for (p = str;; ++p) { > if (!*p) { > if (p > str) > (void)strcpy(newstring, "/"); > else > (void)strcpy(newstring, "."); > return(0); > } > if (*p != '/') > break; > } > > /* > * (3) If there are any trailing slash characters in string, they > * shall be removed. > */ > for (; *p; ++p); > while (*--p == '/') > continue; > *++p = '\0'; > > /* > * (4) If there are no slash characters remaining in string, > * string shall be set to a single period character. In this > * case skip steps (5) through (8). > * > * (5) If there are any trailing nonslash characters in string, > * they shall be removed. > */ > while (--p >= str) > if (*p == '/') > break; > ++p; > if (p == str) { > (void)strcpy(newstring, "."); > return(0); > } > > /* > * (6) If the remaining string is //, it is implementation defined > * whether steps (7) and (8) are skipped or processed. > * > * This case has already been handled, as part of steps (1) and (2). > */ > > /* > * (7) If there are any trailing slash characters in string, they > * shall be removed. > */ > while (--p >= str) > if (*p != '/') > break; > ++p; > > /* > * (8) If the remaining string is empty, string shall be set to > * a single slash character. > */ > *p = '\0'; > > if (p == str) { > strcpy(newstring, "/"); > } else { > strncpy(newstring, str, maxlen); > newstring[maxlen] = '\0'; > } > return(0); >} > > > > >int basename(const char *string, char *newstring, int maxlen) >{ > > int ch; > char *p; > char str[256]; > > strncpy(str, string, 250); > str[250] = '\0'; > > > > /* > * (1) If string is // it is implementation defined whether steps (2) > * through (5) are skipped or processed. > * > * (2) If string consists entirely of slash characters, string shall > * be set to a single slash character. In this case, skip steps > * (3) through (5). > */ > for (p = str;; ++p) { > if (!*p) { > if (p > str) > (void)strcpy(newstring, "/"); > else > (void)strcpy(newstring, ""); > return(0); > } > if (*p != '/') > break; > } > > /* > * (3) If there are any trailing slash characters in string, they > * shall be removed. > */ > for (; *p; ++p) > continue; > while (*--p == '/') > continue; > *++p = '\0'; > > /* > * (4) If there are any slash characters remaining in string, the > * prefix of string up to an including the last slash character > * in string shall be removed. > */ > while (--p >= str) > if (*p == '/') > break; > ++p; > > /* > * (5) If the suffix operand is present, is not identical to the > * characters remaining in string, and is identical to a suffix > * of the characters remaining in string, the suffix suffix > * shall be removed from string. > */ > if (++*str) { > int suffixlen, stringlen, off; > > suffixlen = strlen(str); > stringlen = strlen(p); > > if (suffixlen < stringlen) { > off = stringlen - suffixlen; > if (!strcmp(p + off, str)) > p[off] = '\0'; > } > } > (void)strncpy(newstring, p, maxlen); > return(0); >} > > >/* > * Find the first occurrence of find in s. > */ >char * >strstr(s, find) > register const char *s, *find; >{ > register char c, sc; > register size_t len; > > if ((c = *find++) != 0) { > len = strlen(find); > do { > do { > if ((sc = *s++) == 0) > return (NULL); > } while (sc != c); > } while (strncmp(s, find, len) != 0); > s--; > } > return ((char *)s); >} > > >/* The real thing */ >int >exec_java_imgact(imgp) > struct image_params *imgp; >{ > > const char *image_header = imgp->image_header; > const char *ihp, *line_endp; > char *interp; > static char javabin_name[256]; > static char javabin_path[256]; > static char cpathstr[256]; > static char javatmp[256]; > > > /* A java binary? */ > > if ((image_header[0] != '\xca') || (image_header[1] != '\xfe') || > (image_header[2] != '\xba') || (image_header[3] != '\xbe')) { >#ifdef DEBUG > printf("Failed to run a java binary : invalid signature?\n"); > return(-1); >#endif > } > > /* Ok, its a java binary, so lets tell the world */ > > /* Firstly split the path to the binary up into path and filename */ > > basename(imgp->uap->fname, javabin_name, sizeof(javabin_name)); > dirname(imgp->uap->fname, javabin_path, sizeof(javabin_path)); > > /* Now we are going to take the filename, and if it doesn't contain > ** a .class then return with a "non-executable" error */ > if (strstr(javabin_name, ".class") == NULL) { > return -1; > } > > /* Ok so we'll assume (stupidly) that the .class is at the end of the > ** filename, so lets copy the filename over minus the last 6 chars */ > > strncpy(javatmp, javabin_name, strlen(javabin_name) - 6); > strcpy(javabin_name, javatmp); > > > /* Since its interpreted we'll tag it as such. */ > imgp->interpreted = 1; > > /* And we'll set the interpreter name here too (would help) */ > strncpy(imgp->interpreter_name, interpreter, sizeof(imgp->interpreter_name)); > > /* now lets make up our -classpath arguement */ > sprintf(cpathstr, "%s -classpath %s:%s", interpreter, classpath, javabin_path); > > /* Now lets write this into the strings space, just like in the > ** _shell.c file... */ > > ihp = cpathstr; > line_endp = cpathstr + strlen(cpathstr); > > while (ihp < line_endp) { > while ((*ihp == ' ') || (*ihp == '\t')) ihp++; > > if (ihp < line_endp) { > while ((ihp < line_endp) && (*ihp != ' ') && (*ihp != '\t')) { > *imgp->stringp++ = *ihp++; > imgp->stringspace--; > } > *imgp->stringp++ = 0; > imgp->stringspace--; > > imgp->argc++; > } > > } > > strcpy(imgp->uap->fname, javabin_name); > suword(imgp->uap->argv, (int)imgp->uap->fname); > > return (0); > >} > >/* > * Tell kern_execve.c about it, with a little help from the linker. > * Since `const' objects end up in the text segment, TEXT_SET is the > * correct directive to use. > */ >const struct execsw java_execsw = { exec_java_imgact, "\xca\xfe\xba\xbe" }; >TEXT_SET(execsw_set, java_execsw); > > > > > Eivind Eklund perhaps@yes.no http://maybe.yes.no/perhaps/ eivind@freebsd.org From owner-freebsd-emulation Tue Mar 4 12:56:04 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id MAA15348 for emulation-outgoing; Tue, 4 Mar 1997 12:56:04 -0800 (PST) Received: from phaeton.artisoft.com (phaeton.Artisoft.COM [198.17.250.50]) by freefall.freebsd.org (8.8.5/8.8.5) with SMTP id MAA15295; Tue, 4 Mar 1997 12:56:01 -0800 (PST) Received: (from terry@localhost) by phaeton.artisoft.com (8.6.11/8.6.9) id NAA10324; Tue, 4 Mar 1997 13:47:55 -0700 From: Terry Lambert Message-Id: <199703042047.NAA10324@phaeton.artisoft.com> Subject: Re: Re : latest Java support source for FreeBSD.. To: eivind@dimaga.com (Eivind Eklund) Date: Tue, 4 Mar 1997 13:47:55 -0700 (MST) Cc: adrian@obiwan.aceonline.com.au, hackers@FreeBSD.ORG, emulation@FreeBSD.ORG In-Reply-To: <3.0.32.19970304164156.0092a2d0@dimaga.com> from "Eivind Eklund" at Mar 4, 97 04:41:57 pm X-Mailer: ELM [version 2.4 PL24] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-emulation@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk > >/*- > > * Copyright (c) 1997 Adrian Chadd > > * All rights reserved. > > It would be very nice if you deleted this line, as presently you're not > even allowing me to read the code you're sending to the mailing list ;-) > (If you deleted the line, I believe you would get the effect of having the > BSD copyright for the entire file) He has reserved all rights, then granted license under the terms of the standard UCB license. There's a *lot* of code in the kernel with similar copyright notices. Look at the VM system for a lot of examples. In point of fact, there *must* be a copyright holder, unless he assigns the code (that's what people who "donated" to CSRG did, and The Regents became the copyright holder, and therefore able to grant the license). Regards, Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers. From owner-freebsd-emulation Thu Mar 6 15:47:02 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id PAA20422 for emulation-outgoing; Thu, 6 Mar 1997 15:47:02 -0800 (PST) Received: from fps.biblos.unal.edu.co ([168.176.37.11]) by freefall.freebsd.org (8.8.5/8.8.5) with SMTP id PAA20404; Thu, 6 Mar 1997 15:46:51 -0800 (PST) From: pgiffuni@fps.biblos.unal.edu.co Received: from localhost by fps.biblos.unal.edu.co (AIX 4.1/UCB 5.64/4.03) id AA22346; Thu, 6 Mar 1997 18:50:34 -0500 Date: Thu, 6 Mar 1997 18:50:32 -0500 (EST) Reply-To: pgiffuni@fps.biblos.unal.edu.co To: ports@freebsd.org Cc: emulation@freebsd.org Subject: Cross debuggers Message-Id: Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-emulation@freebsd.org X-Loop: FreeBSD.org Precedence: bulk Howdy, I'm building crosscompilers for DOS, SCO and Linux. The DOS crosscompiler is ready, but the emulated-UNIX counterparts may take some more time (No one with those boxes nearby):(. The UNIX cross compilers will probably be submitted *after* the ports freeze: Would it be useful to "port" the cross-debuggers? I don`t know what type of cores will be produced by our emulation (don`t have way of testing this either). Pedro. From owner-freebsd-emulation Sat Mar 8 05:34:16 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id FAA13101 for emulation-outgoing; Sat, 8 Mar 1997 05:34:16 -0800 (PST) Received: from lithuania.it.earthlink.net (lithuania-c.it.earthlink.net [204.250.46.58]) by freefall.freebsd.org (8.8.5/8.8.5) with ESMTP id FAA13096 for ; Sat, 8 Mar 1997 05:34:14 -0800 (PST) Received: from vagabond.earthlink.net (pa3dsp18.clt.infi.net [206.100.249.90]) by lithuania.it.earthlink.net (8.8.5/8.8.5) with SMTP id FAA01719 for ; Sat, 8 Mar 1997 05:32:17 -0800 (PST) Message-ID: <2B9B4B96.1C08@cryogen.com> Date: Mon, 08 Mar 1993 08:35:18 -0500 From: Sub-Zero Reply-To: Mr.Freeze@cryogen.com Organization: Earthlink X-Mailer: Mozilla 3.01Gold (Win95; I) MIME-Version: 1.0 To: freebsd-emulation@FreeBSD.ORG Subject: FreeBSD Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-emulation@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk To whomever it concerns, I tried installing FreeBSD into my computer, following your instructions. Well, after I did I lost my hard drive. Im not talking about the information, but the drive itself. My computer no longer acknowledges its existence anymore. I have to have it setup as a removable hard drive now. I was informed that its because of a motherboard problem, I just thought that you should know this. And I would like to offer my thanks for this oh so great product which has cost me a lot of valuable time, and eventually money because now I have to have it fixed. Thanks again. Ken From owner-freebsd-emulation Sat Mar 8 06:38:38 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id GAA15523 for emulation-outgoing; Sat, 8 Mar 1997 06:38:38 -0800 (PST) Received: from time.cdrom.com (root@time.cdrom.com [204.216.27.226]) by freefall.freebsd.org (8.8.5/8.8.5) with ESMTP id GAA15518 for ; Sat, 8 Mar 1997 06:38:36 -0800 (PST) Received: from time.cdrom.com (jkh@localhost [127.0.0.1]) by time.cdrom.com (8.8.5/8.6.9) with ESMTP id GAA04518; Sat, 8 Mar 1997 06:36:19 -0800 (PST) To: Mr.Freeze@cryogen.com cc: freebsd-emulation@freebsd.org Subject: Re: FreeBSD In-reply-to: Your message of "Mon, 08 Mar 1993 08:35:18 EST." <2B9B4B96.1C08@cryogen.com> Date: Sat, 08 Mar 1997 06:36:19 -0800 Message-ID: <4514.857831779@time.cdrom.com> From: "Jordan K. Hubbard" Sender: owner-emulation@freebsd.org X-Loop: FreeBSD.org Precedence: bulk > To whomever it concerns, Certainly not us.. :-) > I tried installing FreeBSD into my computer, following your > instructions. Well, after I did I lost my hard drive. Im not talking > about the information, but the drive itself. My computer no longer > acknowledges its existence anymore. I have to have it setup as a > removable hard drive now. I was informed that its because of a > motherboard problem, I just thought that you should know this. And I So you're blaming us for a motherboard problem. Does this not sound strange to your own ears? Unless you're about 100 times more deliberate and skillful about it than you'll ever see in a typical installation scenario, software cannot destroy your hardware and we are about as responsible for the failure of your system as is the ghost of Elvis. Perhaps you would have more satisfaction in blaming him - he at least is a bigger, more well-known target. Jordan From owner-freebsd-emulation Sat Mar 8 09:35:06 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id JAA23610 for emulation-outgoing; Sat, 8 Mar 1997 09:35:06 -0800 (PST) Received: from softronex.com (caribe1-24.caribe.net [199.0.180.24]) by freefall.freebsd.org (8.8.5/8.8.5) with ESMTP id JAA23591 for ; Sat, 8 Mar 1997 09:34:52 -0800 (PST) Received: (from karl@localhost) by softronex.com (8.8.3/8.7.3) id NAA04651; Sat, 8 Mar 1997 13:34:39 -0400 (AST) Date: Sat, 8 Mar 1997 13:34:35 -0400 (AST) From: "Karl A. Wagner" To: Sub-Zero cc: freebsd-emulation@FreeBSD.ORG Subject: Re: FreeBSD In-Reply-To: <2B9B4B96.1C08@cryogen.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-emulation@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk Maybe you should buy a better quality hard disk ( or motherboard ). Thank goodness it was only the hard drive. If you had installed Windoze 95 or NT, you might have even lost your mouse :). There is NO software in existance that can damage phisically any hard disk. Only a monitor might be blown for changing the sync rate, etc. But not a hard disk or a motherboard. FreeBDS is the best OS i have seen and i thank again and again the development team. PS: And we use it commercially without a glitch. Karl A. Wagner President Softronex Corporation --------------------- www.softronex.com karl@softronex.com --------------------- On Mon, 8 Mar 1993, Sub-Zero wrote: > To whomever it concerns, > > I tried installing FreeBSD into my computer, following your > instructions. Well, after I did I lost my hard drive. Im not talking > about the information, but the drive itself. My computer no longer > acknowledges its existence anymore. I have to have it setup as a > removable hard drive now. I was informed that its because of a > motherboard problem, I just thought that you should know this. And I > would like to offer my thanks for this oh so great product which has > cost me a lot of valuable time, and eventually money because now I have > to have it fixed. Thanks again. > > > Ken > From owner-freebsd-emulation Sat Mar 8 13:17:10 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id NAA03011 for emulation-outgoing; Sat, 8 Mar 1997 13:17:10 -0800 (PST) Received: from csla.csl.sri.com (csla.csl.sri.com [192.12.33.2]) by freefall.freebsd.org (8.8.5/8.8.5) with ESMTP id NAA03006 for ; Sat, 8 Mar 1997 13:17:07 -0800 (PST) Received: from japonica.csl.sri.com (japonica.csl.sri.com [130.107.15.17]) by csla.csl.sri.com (8.7.3/8.7.3) with ESMTP id NAA08006 for ; Sat, 8 Mar 1997 13:13:45 -0800 (PST) Received: from japonica.csl.sri.com (localhost.csl.sri.com [127.0.0.1]) by japonica.csl.sri.com (8.8.5/8.8.5) with ESMTP id NAA00463 for ; Sat, 8 Mar 1997 13:14:36 -0800 (PST) Message-Id: <199703082114.NAA00463@japonica.csl.sri.com> To: freebsd-emulation@freebsd.org Subject: FreeBSD slaughtering disks (was Re: FreeBSD) In-reply-to: Your message of "Sat, 08 Mar 1997 13:34:35 -0400." Date: Sat, 08 Mar 1997 13:14:36 -0800 From: Fred Gilham Sender: owner-emulation@freebsd.org X-Loop: FreeBSD.org Precedence: bulk Karl Wagner writes: ---------------------------------------- There is NO software in existance that can damage phisically any hard disk. Only a monitor might be blown for changing the sync rate, etc. But not a hard disk or a motherboard. ---------------------------------------- Well, not really contradicting this but it seems that there are certain hard drives that you can make unusable with FreeBSD. In particular, I have a bunch of Fujitsu 500 meg SCSI drives that are sitting in a pile, the victims of FreeBSD installations. I'm not sure exactly what FreeBSD did to them, but they worked before and didn't after trying to install FreeBSD. I suspect some of the software the drive uses to operate is actually on the drive itself and got wiped out, but I'm not sure about this. (The model of the drive is M1603SAU in case anyone is curious or has had other experiences with this drive and FreeBSD). Karl Wagner continues: ---------------------------------------- FreeBDS is the best OS i have seen and i thank again and again the development team. ---------------------------------------- In spite of the Fujitsu drive experiences, I'm in overall agreement with the above. I have a bunch of FreeBSD servers that I manage (along with Suns, PCs not running FreeBSD and a few rogue Macs) and FreeBSD is the most FUN. -Fred From owner-freebsd-emulation Sat Mar 8 17:59:00 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id RAA18349 for emulation-outgoing; Sat, 8 Mar 1997 17:59:00 -0800 (PST) Received: (from jmb@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id RAA18340; Sat, 8 Mar 1997 17:58:54 -0800 (PST) From: "Jonathan M. Bresler" Message-Id: <199703090158.RAA18340@freefall.freebsd.org> Subject: Re: FreeBSD slaughtering disks (was Re: FreeBSD) To: gilham@csl.sri.com (Fred Gilham) Date: Sat, 8 Mar 1997 17:58:53 -0800 (PST) Cc: emulation In-Reply-To: <199703082114.NAA00463@japonica.csl.sri.com> from "Fred Gilham" at Mar 8, 97 01:14:36 pm X-Mailer: ELM [version 2.4 PL24] Content-Type: text Sender: owner-emulation@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk Fred Gilham wrote: > Karl Wagner writes: > ---------------------------------------- > There is NO software in existance that can damage phisically any hard > disk. Only a monitor might be blown for changing the sync rate, > etc. But not a hard disk or a motherboard. > ---------------------------------------- > > Well, not really contradicting this but it seems that there are > certain hard drives that you can make unusable with FreeBSD. In > particular, I have a bunch of Fujitsu 500 meg SCSI drives that are > sitting in a pile, the victims of FreeBSD installations. I'm not sure > exactly what FreeBSD did to them, but they worked before and didn't > after trying to install FreeBSD. I suspect some of the software the > drive uses to operate is actually on the drive itself and got wiped > out, but I'm not sure about this. (The model of the drive is M1603SAU > in case anyone is curious or has had other experiences with this drive > and FreeBSD). i have 2 fujitsu M1606SAU drives that i use with FreeBSD. these drives are 1GB rather than 500MB. according the fujitsu documentation that i have the 1603 and hte 1606 are identical but for the number of heads (3 and 6 respectively). do you still have any of these that work? can you tell me the firmware revision? how about the jumper settings? its not that i dont believe you, but rather i am very surprised and wonder what "land mine" i side-stepped. i have both: two differeent firmware revisions. jmb From owner-freebsd-emulation Sat Mar 8 18:18:19 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id SAA19167 for emulation-outgoing; Sat, 8 Mar 1997 18:18:19 -0800 (PST) Received: from helmholtz.salk.edu (helmholtz.salk.edu [198.202.70.34]) by freefall.freebsd.org (8.8.5/8.8.5) with ESMTP id SAA19161 for ; Sat, 8 Mar 1997 18:18:15 -0800 (PST) Received: from helmholtz (helmholtz [198.202.70.34]) by helmholtz.salk.edu (8.7.5/8.7.3) with SMTP id SAA26248; Sat, 8 Mar 1997 18:18:11 -0800 (PST) Date: Sat, 8 Mar 1997 18:18:10 -0800 (PST) From: Tom Bartol X-Sender: bartol@helmholtz To: Fred Gilham cc: freebsd-emulation@freebsd.org Subject: Re: FreeBSD slaughtering disks (was Re: FreeBSD) In-Reply-To: <199703082114.NAA00463@japonica.csl.sri.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-emulation@freebsd.org X-Loop: FreeBSD.org Precedence: bulk On Sat, 8 Mar 1997, Fred Gilham wrote: > > Well, not really contradicting this but it seems that there are > certain hard drives that you can make unusable with FreeBSD. In > particular, I have a bunch of Fujitsu 500 meg SCSI drives that are > sitting in a pile, the victims of FreeBSD installations. I'm not sure > exactly what FreeBSD did to them, but they worked before and didn't > after trying to install FreeBSD. I suspect some of the software the > drive uses to operate is actually on the drive itself and got wiped > out, but I'm not sure about this. (The model of the drive is M1603SAU > in case anyone is curious or has had other experiences with this drive > and FreeBSD). > Hey, if you really think those drives are dead, PLEASE send them to me -- I'll even pay the shipping costs. This will free-up some of your shelf space and you'll have fewer nooks and crannies for unsightly dust collection. "Bring out your dead" but I'm quite sure your drives are "not dead yet" (spoken with a ridiculous english accent ala Monty Python). ;-) Tom