diff options
Diffstat (limited to 'commands/memtester')
-rw-r--r-- | commands/memtester/Makefile | 2 | ||||
-rw-r--r-- | commands/memtester/memtester.c | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/commands/memtester/Makefile b/commands/memtester/Makefile index 17a2429276..b410813af7 100644 --- a/commands/memtester/Makefile +++ b/commands/memtester/Makefile @@ -1 +1,3 @@ +# SPDX-License-Identifier: GPL-2.0-only + obj-y += tests.o memtester.o diff --git a/commands/memtester/memtester.c b/commands/memtester/memtester.c index 130dc97c83..f4adbfc855 100644 --- a/commands/memtester/memtester.c +++ b/commands/memtester/memtester.c @@ -113,7 +113,7 @@ static int do_memtester(int argc, char **argv) { strerror(errno)); return COMMAND_ERROR_USAGE; } else { - if (!S_ISCHR(statbuf.st_mode)) { + if (!S_ISCHR(statbuf.st_mode) && !S_ISBLK(statbuf.st_mode)) { printf("can not mmap non-char device %s\n", optarg); return COMMAND_ERROR_USAGE; |