Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Anders Blomdell
sha512toc
Commits
b270f76e
Commit
b270f76e
authored
Oct 04, 2018
by
Anders Blomdell
Browse files
Corrected --zero-terminated handling
parent
9d65ffb8
Changes
2
Hide whitespace changes
Inline
Side-by-side
sha512toc.c
View file @
b270f76e
...
...
@@ -38,15 +38,6 @@
#define XATTR_sha512SUM "trusted.sha512sum.control.lth.se"
/*
#define FLAGS_READ_XATTR 0x01
#define FLAGS_WRITE_XATTR 0x02
#define FLAGS_CLEAR_XATTR 0x04
#define FLAGS_MAX_AGE 0x08
#define FLAGS_VERBOSE 0x10
#define FLAGS_NUL_TERMINATED 0x20
*/
struct
options
{
int
flags
;
time_t
max_age
;
...
...
@@ -319,7 +310,7 @@ int main(int argc, char *argv[])
while
(
1
)
{
int
v
,
i
=
0
;
v
=
getopt_long
(
argc
,
argv
,
"hxrwcm:v"
,
long_options
,
&
i
);
v
=
getopt_long
(
argc
,
argv
,
"hxrwcm:v
z
"
,
long_options
,
&
i
);
if
(
v
==
-
1
)
break
;
switch
(
v
)
{
case
'h'
:
...
...
sha512toc.h
View file @
b270f76e
...
...
@@ -4,7 +4,7 @@ enum {
FLAGS_CLEAR_XATTR
=
0x0004
,
FLAGS_MAX_AGE
=
0x0008
,
FLAGS_NO_CALC_HASH
=
0x0010
,
FLAGS_NUL_TERMINATED
=
0x
0
0
,
FLAGS_NUL_TERMINATED
=
0x
2
0
,
FLAGS_VERBOSE_MASK
=
0xc000
,
FLAGS_VERBOSE0
=
0x0000
,
FLAGS_VERBOSE1
=
0x4000
,
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment