projects
/
platform
/
upstream
/
cryptsetup.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a5aa91e
)
Better define comment lines for for dict example.
author
Milan Broz
<gmazyland@gmail.com>
Fri, 20 Jul 2012 13:36:16 +0000
(15:36 +0200)
committer
Milan Broz
<gmazyland@gmail.com>
Fri, 20 Jul 2012 13:36:16 +0000
(15:36 +0200)
misc/dict_search/luks_dict.c
patch
|
blob
|
history
diff --git
a/misc/dict_search/luks_dict.c
b/misc/dict_search/luks_dict.c
index
e9a34df
..
9b9ce81
100644
(file)
--- a/
misc/dict_search/luks_dict.c
+++ b/
misc/dict_search/luks_dict.c
@@
-52,9
+52,11
@@
static void check(struct crypt_device *cd, const char *pwd_file, unsigned my_id,
len = strlen(pwd);
- /* lines starting "#" are comments */
- if (pwd[0] == '#')
+ /* lines starting "#!comment" are comments */
+ if (len >= 9 && !strncmp(pwd, "#!comment", 9)) {
+ printf("skipping %s\n", pwd);
continue;
+ }
/* strip EOL - this is like a input from tty */
if (len && pwd[len - 1] == '\n') {