X-Git-Url: https://git.gag.com/?p=debian%2Fcpmtools;a=blobdiff_plain;f=cpmls.c;h=3721d2e0bb7c3d50e4169024032b0485e74768a5;hp=fa100e9d5e80fdfdf81cc29a11ad99c944680141;hb=b1e873c5b2f6376bb39ff0fda1464cbbacbae5f7;hpb=edf600144998d1a1e09898548938cc11b95c10bc diff --git a/cpmls.c b/cpmls.c index fa100e9..3721d2e 100644 --- a/cpmls.c +++ b/cpmls.c @@ -6,6 +6,7 @@ #include #include #include +#include #include "getopt_.h" #include "cpmfs.h" @@ -379,10 +380,14 @@ int main(int argc, char *argv[]) /* open image */ /*{{{*/ if ((err=Device_open(&drive.dev,image,O_RDONLY,devopts))) { - fprintf(stderr,"%s: can not open %s (%s)\n",cmd,image,err); + fprintf(stderr,"%s: cannot open %s (%s)\n",cmd,image,err); + exit(1); + } + if (cpmReadSuper(&drive,&root,format)==-1) + { + fprintf(stderr,"%s: cannot read superblock (%s)\n",cmd,boo); exit(1); } - cpmReadSuper(&drive,&root,format); /*}}}*/ if (optind