9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] Q: checking CD vs. iso image
@ 2005-08-22 17:11 alexandr babic
  2005-08-22 15:16 ` Gorka guardiola
  2005-08-22 15:20 ` Anselm R. Garbe
  0 siblings, 2 replies; 8+ messages in thread
From: alexandr babic @ 2005-08-22 17:11 UTC (permalink / raw)
  To: 9fans

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 <u.h>
#include <libc.h> 

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);
}



^ permalink raw reply	[flat|nested] 8+ messages in thread
* [9fans] Q: checking CD vs. iso image
@ 2005-08-22 12:08 pac7
  2005-08-22 12:38 ` Russ Cox
  2005-08-22 12:46 ` Uriel
  0 siblings, 2 replies; 8+ messages in thread
From: pac7 @ 2005-08-22 12:08 UTC (permalink / raw)
  To: 9fans

hi,
how do i check content of a CD versus an iso image from which it
was burnt (using md5sum and cmp, perhaps)?

thanks, cheers,
++pac


-- 
Ziskejte trvale pripojeni k internetu VOLNY ADSL za nizky mesicni
pausalni poplatek 349,- Kc mesicne. Revoluce na internetu jiz
zacala! Vice informaci ziskate na http://adsl.volny.cz/



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2005-08-22 17:11 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-08-22 17:11 [9fans] Q: checking CD vs. iso image alexandr babic
2005-08-22 15:16 ` Gorka guardiola
2005-08-22 15:20 ` Anselm R. Garbe
  -- strict thread matches above, loose matches on Subject: below --
2005-08-22 12:08 pac7
2005-08-22 12:38 ` Russ Cox
2005-08-22 12:46 ` Uriel
2005-08-22 12:55   ` Russ Cox
2005-08-22 15:05     ` Gorka guardiola

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).