Skip to content

Commit

Permalink
Remove awful function and warning from squashfs
Browse files Browse the repository at this point in the history
  • Loading branch information
radare committed Dec 4, 2024
1 parent 9e4c708 commit b91c295
Showing 1 changed file with 1 addition and 27 deletions.
28 changes: 1 addition & 27 deletions libr/fs/squashfs/unsquashfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -1571,8 +1571,7 @@ int read_super(char *source) {
memcpy(&sBlk_3, &sblk, sizeof(squashfs_super_block_3));
swap = 1;
} else {
ERROR("Can't find a SQUASHFS superblock on %s\n",
source);
// ERROR("Can't find a SQUASHFS superblock on %s\n", source);
goto failed_mount;
}
}
Expand Down Expand Up @@ -1649,23 +1648,6 @@ int read_super(char *source) {
}


struct pathname *process_extract_files(struct pathname *path, char *filename)
{
FILE *fd;
char name[16384];

fd = fopen(filename, "r");
if(fd == NULL)
EXIT_UNSQUASH("Could not open %s, because %s\n", filename,
strerror(errno));

while(fscanf(fd, "%16384[^\n]\n", name) != EOF)
path = add_path(path, name, name);

fclose(fd);
return path;
}


/*
* reader thread. This thread processes read requests queued by the
Expand Down Expand Up @@ -2043,14 +2025,6 @@ int main(int argc, char *argv[])
strcmp(argv[i], "-li") == 0) {
info = TRUE;
short_ls = FALSE;
} else if(strcmp(argv[i], "-ef") == 0 ||
strcmp(argv[i], "-e") == 0) {
if(++i == argc) {
fprintf(stderr, "%s: -ef missing filename\n",
argv[0]);
exit(1);
}
path = process_extract_files(path, argv[i]);
} else if(strcmp(argv[i], "-regex") == 0 ||
strcmp(argv[i], "-r") == 0)
use_regex = TRUE;
Expand Down

0 comments on commit b91c295

Please sign in to comment.