Imported Upstream version 2.13
[debian/cpmtools] / cpmchattr.c
index cb9e53d4358493bf73b49d17fa802b8a5e4e5406..cf337e21b496a66c94eba8c4271fb7df8216455b 100644 (file)
@@ -6,7 +6,7 @@
 #include <string.h>
 #include <stdlib.h>
 
-#include "getopt.h"
+#include "getopt_.h"
 #include "cpmfs.h"
 
 #ifdef USE_DMALLOC
@@ -43,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)
@@ -106,6 +106,7 @@ int main(int argc, char *argv[]) /*{{{*/
       exitcode=1;
     }
   }
+  cpmUmount(&drive);
   exit(exitcode);
 }
 /*}}}*/