Main page I Packages I Help I Forum

SvarDOS community forum

a place to talk about SvarDOS and other DOS-related things

jump to end reply list of threads

SvarDOS fights <corruption>

078ac416e4811d4f ac7134fc6c34222e e676a6b143232a57 f638c349b414e0e6 b25cc1129ce8293c bc9a49b88c1ea9f5 a8d5c26e0797bc6f 2eba886e5c7e366b
Ever noticed that a program on your HDD won't run anymore, only to discover after painful investigations that one of its files is corrupted? There's plenty of reasons why this could happen: a virus, bad sector, loose IDE cable... you name it. Two years ago, Robert [bttr] suggested on the (now defunct) OSDN bug tracker that SvarDOS PKG could perform some health checks on packages to detect such situation. I finally implemented this two weeks ago. How does this work? SvarDOS packages are distributed as *.SVP files. These are basically ZIP archives with a few restrictions. The ZIP format includes a CRC32 for every file in the archive. PKG has always used this when installing a package to make sure it is not damaged. Since a couple of months, on top of verifying the CRC32 at install time, PKG has been also writing it into the list of files belonging to the package (ie. the LSM file in %DOSDIR%\APPINFO\). And finally, two weeks ago I added a PKG action that knows how to use this information: PKG CHECK [pkgname] PKG CHECK+ [pkgname] The "check" action reads the list of files belonging to PKGNAME, computes their CRC32 and matches it with the one stored in the LSM file. If it does not match, a warning is issued. If no package name is provided, then PKG performs this on ALL packages of the system. What's the difference between "CHECK" and "CHECK+"? CHECK cares only about executable files (or more generally - files susceptible to contain executable code), based on their extension. Only these files are analyzed: *.BAT, *.BIN, *.COM, *.DLL, *.DRV, *.EXE, *.OVL, *.SYS. This allows a system-wide check to be relatively fast, while protecting against most virus-related damages. CHECK+, on the other hand, performs the CRC32 verification on every file. It is much longer but detects all types of corruptions, be it in executable files or data files. It's worth noting that PKG can also be used as a standalone tool to perform a CRC32 computation of any file, regardless of the "CHECK" action: PKG CRC32 FILE.DAT

your name or nick

password (optional)


check the LAST box: