X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=cpmchattr.c;h=cf337e21b496a66c94eba8c4271fb7df8216455b;hb=a18a3d3594fc1f0be34de9b8a225198dbc3d8f18;hp=42704e72c7cc1ff1dbf7c96122d7538d022ee9b1;hpb=0493acd9ceadbe13553c5b9eb254fbd3f2e46939;p=debian%2Fcpmtools diff --git a/cpmchattr.c b/cpmchattr.c index 42704e7..cf337e2 100644 --- a/cpmchattr.c +++ b/cpmchattr.c @@ -1,12 +1,17 @@ /* #includes */ /*{{{C}}}*//*{{{*/ +#include "config.h" + #include #include #include #include -#include "config.h" -#include "getopt.h" +#include "getopt_.h" #include "cpmfs.h" + +#ifdef USE_DMALLOC +#include +#endif /*}}}*/ const char cmd[]="cpmchattr"; @@ -38,8 +43,8 @@ int main(int argc, char *argv[]) /*{{{*/ if (optind>=(argc-2)) usage=1; else { - image=argv[optind]; - attrs = argv[optind+1]; + image=argv[optind++]; + attrs = argv[optind++]; } if (usage) @@ -101,6 +106,7 @@ int main(int argc, char *argv[]) /*{{{*/ exitcode=1; } } + cpmUmount(&drive); exit(exitcode); } /*}}}*/