From mboxrd@z Thu Jan 1 00:00:00 1970 From: alexandr babic To: 9fans@cse.psu.edu Content-Type: text/plain Date: Mon, 22 Aug 2005 19:11:59 +0200 Message-Id: <1124730719.3070.34.camel@localhost.localdomain> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [9fans] Q: checking CD vs. iso image Topicbox-Message-UUID: 7af4a148-ead0-11e9-9d60-3106f5b1d025 hi. and what about to compare one byte from cd with one byte from iso by following short program, but i haven't plan9 here so you have to try by yourself :-) alexandr. check.c ------------------------------ #include #include void main() { int cdfd,isofd,i,r; unsigned char C,I; cdfd=open("/dev/sdD0/data",OREAD); isofd=open("obraz.iso",OREAD); i=0; while(1) { r=read(cdfd,(void*)&C,1); if(r==0) break; r=read(isofd,(void*)&I,1); if(r==0) break; i++; if(C==I) print("byte position=%d, bytes are same!\n",i); else print("byte position=%d, bytes differ! cd is %d, iso is %d \n",i,C,I); } close(cdfd); close(isofd); exits(0); }