X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=cpmchmod.c;h=76b70a96011257fda2a518be45d0b0da7ad8d719;hb=edf600144998d1a1e09898548938cc11b95c10bc;hp=0ad1ce6f7af1b15dcf7b5e9bae36fd8e4a157646;hpb=da79766c5b4c4bae50ddc7bd81b610d3a45c5899;p=debian%2Fcpmtools diff --git a/cpmchmod.c b/cpmchmod.c index 0ad1ce6..76b70a9 100644 --- a/cpmchmod.c +++ b/cpmchmod.c @@ -22,7 +22,7 @@ int main(int argc, char *argv[]) /*{{{*/ /* variables */ /*{{{*/ const char *err; const char *image; - const char *format=FORMAT; + const char *format; const char *devopts=NULL; int c,i,usage=0,exitcode=0; struct cpmSuperBlock drive; @@ -33,6 +33,7 @@ int main(int argc, char *argv[]) /*{{{*/ /*}}}*/ /* parse options */ /*{{{*/ + if (!(format=getenv("CPMTOOLSFMT"))) format=FORMAT; while ((c=getopt(argc,argv,"T:f:h?"))!=EOF) switch(c) { case 'T': devopts=optarg; break; @@ -78,6 +79,7 @@ int main(int argc, char *argv[]) /*{{{*/ exitcode=1; } } + cpmUmount(&drive); exit(exitcode); } /*}}}*/