summaryrefslogtreecommitdiffstats
path: root/sys/kern/imgact_gzip.c
Commit message (Collapse)AuthorAgeFilesLines
* Remove trailing whitespace.rgrimes1995-05-301-2/+2
|
* Add and move declarations to fix all of the warnings from `gcc -Wimplicit'bde1995-03-161-3/+1
| | | | | | (except in netccitt, netiso and netns) and most of the warnings from `gcc -Wnested-externs'. Fix all the bugs found. There were no serious ones.
* Use of vm_allocate() and vm_deallocate() has been deprecated.dg1995-02-201-15/+17
|
* Actually access the right first page if the file.phk1995-02-131-2/+2
| | | | | | | Bruce finally caught this bogon for me, Thank you Bruce ! Due to some part of the VM/buffer/pmap magic doing clustering, this bogon managed to work better than 99.9% of the time. Amazing. If You ever again see a weird message from the gzip code, please tell me.
* Make the diagnostics a little more useful.phk1994-10-221-2/+3
| | | | | | | | | | | | | | | | | | | | A word of wisdom, don't do this: | cd /usr/bin | for i in * | do | cp $i /tmp/a | gzip -9 < /tmp/a > $i | done It will compress files with multiple links several times. do it this way: | cd /usr/bin | for i in * | do | gunzip -f < $i > /tmp/a | gzip -9 < /tmp/a > $i | done
* I belive imgact_gzip is finally reentrant. It is also a whole lot morephk1994-10-221-217/+298
| | | | | | | readable. inflate is now much more general, and is there if anybody feels like making a uncompressing filesystem or something like that (hint hint !)
* - remove unnecessary #includes (I think a couple of redundant ones remain)csgr1994-10-111-7/+9
| | | | | | | | - excise some unused code (#if 0'd out - don't want to nuke it yet) - fix problems with "make depend" - some macros were screwing it up - get rid of some static local variables There still seems to be a small reentrancy problem somewhere.
* First stage of getting imgact_gzip reentrant:csgr1994-10-071-1211/+9
| | | | | | | | | | | | | | | | | | | | | 1) cut this up into /sys/sys/inflate.h, sys/kern/inflate.c sys/kern/ingact_gzip.c 2) make a lot more things static 3) make a lot of globals const 4) make some args const 5) first stage of making globals into a struct (not used yet) The vm_allocate() call which was introduced between revisions 1.4 and 1.5 of imagact_gzip.c broke things. I have backed that out for the time being. (Davidg: help please) WARNING: if you have gzip enabled in your kernel, you must now run config again, as another source file has been added. Otherwise your kernel compile will fall over. This is all still WIP. More commits to come. Suggestions from: phk.
* Steven Wallace provided a program which broke this stuff. I guess there arephk1994-10-061-1/+8
| | | | | | | more weird kinds of a.out than anyone can argue for. This code failed to load the first 28K of the text-segment, in the case where the first page of the a.out contains only the a.out-header, and the text is still at 0x0. Thanks Steven !
* David Greenman told me to do this: (Thanks!) use vm_allocate to allocatephk1994-10-051-5/+5
| | | | | | the uncompression buffer. Now malloc(M_GZIP) is used for all the Huffman- tree stuff only. Numbers so far indicate < 15Kb Malloc use + 32 Kb for the abovementioned buffer while uncompressing.
* Added M_GZIP for the imgact_gzip code. The gzip-code is likely to be usedphk1994-10-041-6/+13
| | | | for other weird things in the future (hint, hint!)
* Based on the applause (in this case: not downright rejection :-) I havephk1994-10-041-53/+67
| | | | | | | | | | | | | | | | | cleaned up much of the cruft in this thing. No printf's in the case where things go well. Gzip-headers can contain filenames and comments (as long as they're shorter than the page-size.) I don't think we leak memory, in the "exec/aout" code. I'm not quite sure about the inflate code yet, but I don't think memory is lost. Q: Can I add a class M_GZIP to <sys/malloc.h> and bump M_LAST one up without any thing else needing tweaking ? Poul-Henning
* First bug-fix. This this depends on something odd. I am looking at it,phk1994-10-031-3/+9
| | | | but every now and then it will fail without an explanation :-(
* ***phk1994-10-031-0/+1456
WARNING: THIS MATERIAL MIGHT GO AWAY! This material needs the core-groups approval to stay here for the 2.0 release. If the core-group does not concent to this commit, it will be backed out. *** It is a non-gpl'ed "unzip" which will allow execution of a.out files which have been sent through "gzip -9". The idea being saved disk-space. Just now this code has quality rating: "working prototype". To compress a file to be used with this, do it exactly this way: gzip -9 -v < /bin/FOO > /tmp/FOO remember to chmod /tmp/FOO as needed. DON'T compress all of you binaries right away ! There are several things which you should consider first: 1. Using compressed binaries, you use >MUCH< more VM, and thus swap-space. 2. It is slow. 3. It might crash your machine. Apart from that, I welcome comments... NB: There is also a change to sys/conf/files, but cvs core-dumped on me, so it didn't get into the logs or emailed, but the commit seems to have happended OK.
OpenPOWER on IntegriCloud