mirror of
https://github.com/brain-hackers/nkbin_maker
synced 2024-11-01 07:48:00 +09:00
commit
4a97a4e807
1
bsd-ce.c
1
bsd-ce.c
@ -1,3 +1,4 @@
|
|||||||
|
#include <err.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
@ -1,11 +1,12 @@
|
|||||||
|
#include <err.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <gelf.h>
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
#include <string.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
uint8_t magic[7] = "B000FF\n";
|
unsigned char magic[7] = "B000FF\n";
|
||||||
|
|
||||||
#define READ(buf, len) \
|
#define READ(buf, len) \
|
||||||
if (!fread(buf, len, 1, f)) \
|
if (!fread(buf, len, 1, f)) \
|
||||||
@ -13,8 +14,8 @@ uint8_t magic[7] = "B000FF\n";
|
|||||||
|
|
||||||
int main(int argc, char *argv[]) {
|
int main(int argc, char *argv[]) {
|
||||||
FILE *f;
|
FILE *f;
|
||||||
uint8_t marker[7];
|
unsigned char marker[7];
|
||||||
uint32_t i32, addr, cksum, len, i;
|
unsigned int i32, addr, cksum, len, i;
|
||||||
int n, ch, c;
|
int n, ch, c;
|
||||||
|
|
||||||
if (argc != 2) {
|
if (argc != 2) {
|
||||||
|
Loading…
Reference in New Issue
Block a user