diff options
author | pancake <pancake@dazo> | 2008-12-14 03:05:19 +0100 |
---|---|---|
committer | pancake <pancake@dazo> | 2008-12-14 03:05:19 +0100 |
commit | 3a1053b29e5fb8109463259ee9dff3d8f4e4be5b (patch) | |
tree | 6814a8b3bb1e4e1c1cb585b48f2a530052e8a5da /src/fpid.c | |
parent | fc3a613276f147c73214f67839e362f08664c7b1 (diff) | |
download | 0xFFFF-3a1053b29e5fb8109463259ee9dff3d8f4e4be5b.tar.bz2 |
* Oops missing up0.4
* Added fixups for make install/deinstall
* HAVE_GUI is now enabled by default
* New 'stop' button for goxf GUI
* Fix lil bug in squeue.c
* Initial .desktop icon for freedesktop environments (GNOME)
Diffstat (limited to 'src/fpid.c')
-rw-r--r-- | src/fpid.c | 12 |
1 files changed, 8 insertions, 4 deletions
@@ -48,7 +48,6 @@ const char *fpid_file(const char *filename) FILE *fd; char buf[512]; unsigned char *b = (unsigned char *)&buf; - char *piece = NULL; long size; // 2nd : +0x34 = 2NDAPE @@ -80,10 +79,15 @@ const char *fpid_file(const char *filename) if (!memcmp(b+0x14, "X-LOADER", 8)) return pieces[PIECE_XLOADER]; else - if (!memcmp(b+0x0c, "NOLOXldr", 8)) // TODO: this is xloader800, not valid on 770? + if (!memcmp(b+0x0c, "NOLOXldr", 8)) return pieces[PIECE_XLOADER]; else - if (!memcmp(b+0x00, "\x00\x00\xa0\xe1\x00\x00\xa0\xe1", 8)) + if (!memcmp(b+4,"NOLOXldr",8)) + // TODO: this is xloader800, not valid on 770? + return pieces[PIECE_2ND]; + else + if (!memcmp(b+0x00, "\x00\x00\xa0\xe1\x00\x00\xa0\xe1", 8) + || (!memcmp(b, "\x21\x01\x01", 3))) return pieces[PIECE_KERNEL]; else // JFFS2 MAGIC @@ -94,5 +98,5 @@ const char *fpid_file(const char *filename) return pieces[PIECE_ROOTFS]; } - return piece; + return NULL; } |