[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 4/4] monitor: Ignore "." and ".." when completing fi
From: |
Luiz Capitulino |
Subject: |
[Qemu-devel] [PATCH 4/4] monitor: Ignore "." and ".." when completing file name. |
Date: |
Fri, 22 Oct 2010 12:06:36 -0200 |
From: Kusanagi Kouichi <address@hidden>
Signed-off-by: Kusanagi Kouichi <address@hidden>
Signed-off-by: Luiz Capitulino <address@hidden>
---
monitor.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/monitor.c b/monitor.c
index 260cc02..61607c5 100644
--- a/monitor.c
+++ b/monitor.c
@@ -3976,6 +3976,11 @@ static void file_completion(const char *input)
d = readdir(ffs);
if (!d)
break;
+
+ if (strcmp(d->d_name, ".") == 0 || strcmp(d->d_name, "..") == 0) {
+ continue;
+ }
+
if (strstart(d->d_name, file_prefix, NULL)) {
memcpy(file, input, input_path_len);
if (input_path_len < sizeof(file))
--
1.7.3.1.127.g1bb28
[Qemu-devel] [PATCH 3/4] Fix test suite build with tracing enabled, Luiz Capitulino, 2010/10/22
[Qemu-devel] [PATCH 4/4] monitor: Ignore "." and ".." when completing file name.,
Luiz Capitulino <=