[Efsl-cvs] efsl-0.3/linuxutils cpa.c,1.1,1.2 cpi.c,1.9,1.10 cpo.c,1.5,1.6 list.c,1.2,1.3 mkdir.c,1.1
Brought to you by:
flecxie,
lennartyseboodt
From: Lennart <len...@us...> - 2005-09-22 13:51:29
|
Update of /cvsroot/efsl/efsl-0.3/linuxutils In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31295/linuxutils Modified Files: cpa.c cpi.c cpo.c list.c mkdir.c Log Message: Branch update II Index: cpo.c =================================================================== RCS file: /cvsroot/efsl/efsl-0.3/linuxutils/cpo.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** cpo.c 18 May 2005 14:41:09 -0000 1.5 --- cpo.c 22 Sep 2005 13:51:14 -0000 1.6 *************** *** 1,9 **** #include <stdio.h> #include "efs.h" int main(int argc, char** argv) { ! EmbeddedFileSystem efs; ! EmbeddedFile file; unsigned short e; unsigned short bufsize; --- 1,17 ---- #include <stdio.h> + #include <stdlib.h> + #include "interfaces/linuxfile.h" #include "efs.h" int main(int argc, char** argv) { ! linuxFileInterface *lfi=Malloc(sizeof(*lfi)); ! Interface *iface=Malloc(sizeof(*iface)); ! IOManager *ioman=Malloc(sizeof(*ioman)); ! Disc *disc=Malloc(sizeof(*disc)); ! Partition *part=Malloc(sizeof(*part)); ! FileSystem *fs=Malloc(sizeof(*fs)); ! File *file=Malloc(sizeof(*file)); ! unsigned short e; unsigned short bufsize; *************** *** 21,31 **** bufsize=4096; buf=malloc(bufsize); ! ! if(efs_init(&efs,argv[1])!=0){ ! printf("Could not open filesystem.\n"); ! return(-1); } ! ! if(file_fopen(&file,&efs.myFs,argv[2],'r')!=0){ printf("Could not open file.\n"); return(-2); --- 29,50 ---- bufsize=4096; buf=malloc(bufsize); ! ! lfi->fileName=argv[1]; ! if(if_init(iface,(void*)lfi,lf_init,lf_readBuf,lf_writeBuf)){ ! printf("Error initialising hwInterface\n"); ! exit(-1); } ! ioman_init(ioman,iface,0); ! disc_initDisc(disc,ioman); ! disc->partitions[0].type=0x0B; ! disc->partitions[0].LBA_begin=0; ! disc->partitions[0].numSectors=100*1024*2; /* FIXME */ ! part_initPartition(part,disc); ! if(fs_initFs(fs,part)){ ! printf("Unable to initialise filesystem\n"); ! exit(-1); ! } ! ! if(file_fopen(file,fs,argv[2],'r')!=0){ printf("Could not open file.\n"); return(-2); *************** *** 37,47 **** } ! while((e=file_read(&file,bufsize,buf))){ fwrite(buf,1,e,localfile); } ! file_fclose(&file); fclose(localfile); ! fs_umount(&(efs.myFs)); return(0); --- 56,66 ---- } ! while((e=file_read(file,bufsize,buf))){ fwrite(buf,1,e,localfile); } ! file_fclose(file); fclose(localfile); ! fs_umount(fs); return(0); Index: list.c =================================================================== RCS file: /cvsroot/efsl/efsl-0.3/linuxutils/list.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** list.c 5 Jun 2005 13:39:30 -0000 1.2 --- list.c 22 Sep 2005 13:51:14 -0000 1.3 *************** *** 1,3 **** --- 1,4 ---- #include <stdio.h> + #include <stdlib.h> #include "efs.h" #include "ls.h" Index: cpa.c =================================================================== RCS file: /cvsroot/efsl/efsl-0.3/linuxutils/cpa.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** cpa.c 24 May 2005 16:25:35 -0000 1.1 --- cpa.c 22 Sep 2005 13:51:14 -0000 1.2 *************** *** 1,3 **** --- 1,4 ---- #include <stdio.h> + #include <stdlib.h> #include "efs.h" Index: mkdir.c =================================================================== RCS file: /cvsroot/efsl/efsl-0.3/linuxutils/mkdir.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** mkdir.c 2 Jun 2005 19:09:03 -0000 1.1 --- mkdir.c 22 Sep 2005 13:51:14 -0000 1.2 *************** *** 1,3 **** --- 1,4 ---- #include <stdio.h> + #include <stdlib.h> #include "efs.h" #include "ui.h" Index: cpi.c =================================================================== RCS file: /cvsroot/efsl/efsl-0.3/linuxutils/cpi.c,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** cpi.c 24 May 2005 15:52:06 -0000 1.9 --- cpi.c 22 Sep 2005 13:51:14 -0000 1.10 *************** *** 1,3 **** --- 1,4 ---- #include <stdio.h> + #include <stdlib.h> #include "efs.h" |