mirror of
https://github.com/hsoft/collapseos.git
synced 2024-11-02 00:31:03 +11:00
Compare commits
2 Commits
a36db99651
...
48f371d380
Author | SHA1 | Date | |
---|---|---|---|
|
48f371d380 | ||
|
bcddfd461d |
@ -86,6 +86,13 @@ Machine* emul_init()
|
||||
fprintf(stderr, "Can't open\n");
|
||||
return NULL;
|
||||
}
|
||||
fseek(blkfp, 0, SEEK_END);
|
||||
if (ftell(blkfp) < 100 * 1024) {
|
||||
fclose(blkfp);
|
||||
fprintf(stderr, "emul/blkfs too small, something's wrong, aborting.\n");
|
||||
return NULL;
|
||||
}
|
||||
fseek(blkfp, 0, SEEK_SET);
|
||||
// initialize memory
|
||||
memset(m.mem, 0, 0x10000);
|
||||
FILE *bfp = fopen(FBIN_PATH, "r");
|
||||
|
@ -29,9 +29,6 @@ int main(int argc, char *argv[])
|
||||
if ((strcmp(ep->d_name, ".") == 0) || strcmp(ep->d_name, "..") == 0) {
|
||||
continue;
|
||||
}
|
||||
if (ep->d_type != DT_REG) {
|
||||
continue;
|
||||
}
|
||||
int blkid = atoi(ep->d_name);
|
||||
if (blkid >= blkcnt) {
|
||||
int newcnt = blkid+1;
|
||||
|
Loading…
Reference in New Issue
Block a user