X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=cpmchmod.c;h=76b70a96011257fda2a518be45d0b0da7ad8d719;hb=3303f874b0ec880b45e5551ec93d178fb8a6333c;hp=0ad1ce6f7af1b15dcf7b5e9bae36fd8e4a157646;hpb=d54e661a771b394610329fb0cd5e7b5002ae1708;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); } /*}}}*/