Spaces to tabs

This commit is contained in:
Ciro Santilli
2017-06-08 06:26:20 +01:00
parent 41dbf46531
commit 4c1b0e7891
7 changed files with 85 additions and 85 deletions

View File

@@ -12,23 +12,23 @@
int main(int argc, char **argv) {
size_t image_size;
void *image;
int fd;
struct stat st;
int fd;
struct stat st;
if (argc != 2) {
puts("Usage ./prog mymodule.ko");
return EXIT_FAILURE;
}
fd = open(argv[1], O_RDONLY);
fstat(fd, &st);
image_size = st.st_size;
image = malloc(image_size);
read(fd, image, image_size);
close(fd);
if (init_module(image, image_size, "") != 0) {
perror("init_module");
return EXIT_FAILURE;
}
free(image);
return EXIT_SUCCESS;
fd = open(argv[1], O_RDONLY);
fstat(fd, &st);
image_size = st.st_size;
image = malloc(image_size);
read(fd, image, image_size);
close(fd);
if (init_module(image, image_size, "") != 0) {
perror("init_module");
return EXIT_FAILURE;
}
free(image);
return EXIT_SUCCESS;
}