projects
/
my-code
/
pnx.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
67d2a6c
)
corrected build instr + mmap check
author
hackbard
<hackbard@tx2.hackdaworld.org>
Mon, 14 Mar 2011 22:36:35 +0000
(23:36 +0100)
committer
hackbard
<hackbard@tx2.hackdaworld.org>
Mon, 14 Mar 2011 22:36:35 +0000
(23:36 +0100)
efp_extract.c
patch
|
blob
|
history
diff --git
a/efp_extract.c
b/efp_extract.c
index 7198ef4bee4804dadabf938b87276aa7da0fd44e..bf660651453681de8c14ca16abe9b2213a97d4cb 100644
(file)
--- a/
efp_extract.c
+++ b/
efp_extract.c
@@
-3,7
+3,7
@@
*
* author: hackbard@hackdaworld.org
*
- * build: gcc -Wall efp_extract -o efp_extract
+ * build: gcc -Wall efp_extract
.c
-o efp_extract
* usage: ./efp_extract file.efp
* chmod 640 file_??
*
@@
-99,6
+99,10
@@
int main(int argc,char **argv) {
printf("mapping file into memory ...\n");
map=mmap(0,offset[nof-1]+len[nof-1],PROT_READ,MAP_SHARED,fd,0);
+ if(map==MAP_FAILED) {
+ perror("mmap");
+ return -1;
+ }
for(i=0;i<nof;i++) {