summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/disk.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/disk.c b/src/disk.c
index de3d0a0..1a63ae1 100644
--- a/src/disk.c
+++ b/src/disk.c
@@ -55,6 +55,9 @@ int disk_open_dev(int maj, int min, int partition, int readonly) {
while ( ( dirent = readdir(dir) ) ) {
+ if ( strncmp(dirent->d_name, ".", sizeof(".")) == 0 || strncmp(dirent->d_name, "..", sizeof("..")) == 0 )
+ continue;
+
if ( snprintf(blkdev, sizeof(blkdev), "/dev/%s", dirent->d_name) <= 0 )
continue;