Browse Source

Properly check for devices in seqreader

Suren A. Chilingaryan 12 years ago
parent
commit
4341981737
1 changed files with 1 additions and 1 deletions
  1. 1 1
      seqreader.c

+ 1 - 1
seqreader.c

@@ -37,7 +37,7 @@ int main(int argc, char *argv[]) {
 	exit(0);
     }
     
-    if (!strstr(argv[0], "/dev/")) {
+    if (strstr(argv[1], "/dev/")) {
 	int fd = open(argv[1], O_RDONLY|O_NOATIME|O_LARGEFILE/*|O_DIRECT*/, 0);
 	if (fd < 0) {
 	    printf("Unable to open device %s\n", argv[1]);