[Prev][Next][Index][Thread]

Re: Linux filesystems...



>When I try to compile the following code:
>--------------------------------------------------------------------- 
>------------
>
>#include <stdio.h>
>#include <oskit/fs/dir.h>
>#include <oskit/fs/linux.h>
>#include <oskit/io/blkio.h>
>
>#define DISK_PART  "hdas2"
>
>main()
>{
>oskit_blkio_t  *bio = DISK_PART;
>oskit_filesystem_t **out_fs;
>
>if((fs_linux_init())!=NULL) {
>printf("Error initializing the linux filesystem module!");
>}
>
>if ((fs_linux_mount(bio, OSKIT_FS_NOEXEC, out_fs))!=NULL) {
>printf("Error mounting the partition!");
>}
>}
>
>


To clear up the warnings:
1.  define main explicitly to return an int, and put a return 0 as 
the last line of main,
2.  You define DISK_PART to be a string, and then set a pointer to 
oskit_blkio_t to it.  I doubt that is what you want to do.

I expect the warning about out_fs will go away when combined with 
these corrections and the others already suggested.

Eric Zylstra
ericz@ccp.uchicago.edu


References: