projects
/
pintos-anon
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Don't call bx_gdbstub_exception when we're not compiling the gdb stub.
[pintos-anon]
/
src
/
examples
/
hex-dump.c
diff --git
a/src/examples/hex-dump.c
b/src/examples/hex-dump.c
index 713d9737f209ee7d9ca6f6efa860d05cb830f07f..ee313f2e84d2790ce173653e4f786389346e4551 100644
(file)
--- a/
src/examples/hex-dump.c
+++ b/
src/examples/hex-dump.c
@@
-8,6
+8,7
@@
int
main (int argc, char *argv[])
{
int
main (int argc, char *argv[])
{
+ bool success = true;
int i;
for (i = 1; i < argc; i++)
int i;
for (i = 1; i < argc; i++)
@@
-16,6
+17,7
@@
main (int argc, char *argv[])
if (fd < 0)
{
printf ("%s: open failed\n", argv[i]);
if (fd < 0)
{
printf ("%s: open failed\n", argv[i]);
+ success = false;
continue;
}
for (;;)
continue;
}
for (;;)
@@
-29,5
+31,5
@@
main (int argc, char *argv[])
}
close (fd);
}
}
close (fd);
}
- return
0
;
+ return
success ? EXIT_SUCCESS : EXIT_FAILURE
;
}
}