projects
/
sdk
/
emulator
/
qemu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
945d3e6
)
monitor: Ignore "." and ".." when completing file name.
author
Kusanagi Kouichi
<slash@ac.auone-net.jp>
Wed, 20 Oct 2010 09:00:01 +0000
(18:00 +0900)
committer
Luiz Capitulino
<lcapitulino@redhat.com>
Fri, 22 Oct 2010 12:08:38 +0000
(10:08 -0200)
Signed-off-by: Kusanagi Kouichi <slash@ac.auone-net.jp>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
monitor.c
patch
|
blob
|
history
diff --git
a/monitor.c
b/monitor.c
index 260cc029633a7f13aac4fb4a96e3d168b7714181..61607c5bd6c5f9202c251300b12e29915380f594 100644
(file)
--- 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))