Cleaned up blocksize handling.

committer: mfx <mfx> 973826681 +0000
This commit is contained in:
Markus F.X.J. Oberhumer
2000-11-10 03:24:41 +00:00
parent 079d735c1d
commit 31c91fbc0e
3 changed files with 16 additions and 16 deletions
+4 -2
View File
@@ -153,7 +153,8 @@ bool PackLinuxI386sh::getShellName(char *buf)
char const *const basename = 1+strrchr(buf, '/');
static char const *const shname[] = { // known shells that accept "-c" arg
"sh", "ash", "bsh", "csh", "ksh", "bash", "tcsh", "pdksh",
0
//"python", // FIXME: does python work ???
NULL
};
for (int j=0; 0 != shname[j]; ++j) {
if (0==strcmp(shname[j], basename)) {
@@ -170,6 +171,7 @@ bool PackLinuxI386sh::canUnpackFormat(int format) const
return UPX_F_LINUX_SH_i386==format;
}
bool PackLinuxI386sh::canPack()
{
#if defined(__linux__) //{
@@ -195,7 +197,7 @@ bool PackLinuxI386sh::canPack()
void PackLinuxI386sh::pack(OutputFile *fo)
{
#define PAGE_MASK (~0<<12)
opt->unix.blocksize = file_size;
opt->unix.blocksize = blocksize = file_size;
PackUnix::pack(fo);
// update loader