fiasco - remove dead code

This commit is contained in:
Pali Rohár committed 2012-06-23 21:26:30 +02:00
1 parent eac07b18d9
commit 2421b9f6c2
2 files changed
-44

No files matched your search

-43
View File
@@ -389,18 +389,6 @@ int fiasco_new(const char *filename, const char *swver)
return fd; return fd;
} }
int fiasco_add_eof(int fd)
{
#if 0
unsigned char buf[120];
if (fd == -1)
return -1;
memset(buf,'\xff', 120);
write(fd, buf, 120);
#endif
return 0;
}
int fiasco_add(int fd, const char *name, const char *file, const char *layout, const char *device, const char *hwrevs, const char *version) int fiasco_add(int fd, const char *name, const char *file, const char *layout, const char *device, const char *hwrevs, const char *version)
{ {
int i; int i;
@@ -643,38 +631,7 @@ int fiasco_pack(int optind, char *argv[])
return 1; return 1;
} }
} }
fiasco_add_eof(fd);
printf("Done!\n"); printf("Done!\n");
close(fd); close(fd);
return 0; return 0;
} }
/* local code */
#if 0
void my_callback(int fd, struct header_t *header)
{
fiasco_data_read(header);
//read(fd, buf, header->size);
printf("Dumping %s\n", header->name);
printf("DATA: %02x\n", header->data[0]);
fiasco_data_free(header);
}
int main(int argc, char **argv)
{
if (argc!=2) {
printf("Usage: unfiasco [file]\n");
return 1;
}
/*
fd = fiasco_new("myfiasco", "pancake-edition");
fiasco_add(fd, "kernel", "zImage", "2.6.22");
close(fd);
*/
// fiasco_callback = &my_callback;
return openfiasco(argv[1]);
}
#endif
-1
View File
@@ -122,7 +122,6 @@ extern char *root_devices[];
int openfiasco(const char *name, const char *type, const char *device, const char *hwrev, const char *version, int v); int openfiasco(const char *name, const char *type, const char *device, const char *hwrev, const char *version, int v);
int fiasco_new(const char *filename, const char *name); int fiasco_new(const char *filename, const char *name);
void fiasco_data_read(struct header_t *header); void fiasco_data_read(struct header_t *header);
int fiasco_add_eof(int fd);
extern int (*fiasco_callback)(struct header_t *header); extern int (*fiasco_callback)(struct header_t *header);
int fiasco_add(int fd, const char *name, const char *file, const char *layout, const char *device, const char *hwrevs, const char *version); int fiasco_add(int fd, const char *name, const char *file, const char *layout, const char *device, const char *hwrevs, const char *version);
int fiasco_pack(int optind, char *argv[]); int fiasco_pack(int optind, char *argv[]);