Results 1 to 4 of 4

Thread: ext2_fs.h issues

  1. #1
    Join Date
    Nov 2009
    Beans
    3
    Distro
    Ubuntu 9.10 Karmic Koala

    ext2_fs.h issues

    Hi all,

    I am currently trying to include the ext2_fs header file and receiving several errors. Here's my program:

    Code:
    #include <stdio.h>
    #include <fcntl.h>
    #include <unistd.h>
    #include <linux/ext2_fs.h>
    
    int main (int argc, char * argv[])
    {
        return 0;
    }
    and the errors:
    In file included from showblock.c:4:
    /usr/include/linux/ext2_fs.h: In function ‘ext2_mask_flags’:
    /usr/include/linux/ext2_fs.h:182: error: ‘FS_DIRSYNC_FL’ undeclared (first use in this function)
    /usr/include/linux/ext2_fs.h:182: error: (Each undeclared identifier is reported only once
    /usr/include/linux/ext2_fs.h:182: error: for each function it appears in.)
    /usr/include/linux/ext2_fs.h:182: error: ‘FS_TOPDIR_FL’ undeclared (first use in this function)
    /usr/include/linux/ext2_fs.h:184: error: ‘FS_NODUMP_FL’ undeclared (first use in this function)
    /usr/include/linux/ext2_fs.h:184: error: ‘FS_NOATIME_FL’ undeclared (first use in this function)
    I have reinstalled the packages to no avail and am getting a bit flustered by this.

    Any advice/fixes?

  2. #2
    Join Date
    Jun 2007
    Location
    Maryland, US
    Beans
    6,274
    Distro
    Kubuntu

    Re: ext2_fs.h issues

    Yes; add an include for <linux/fs.h>

    Code:
    ...
    #include <linux/fs.h>
    #include <linux/ext2_fs.h>
    
    ...

  3. #3
    Join Date
    Nov 2009
    Beans
    3
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: ext2_fs.h issues

    Excellent. Thanks a lot.

  4. #4
    Join Date
    Feb 2010
    Beans
    1

    Re: ext2_fs.h issues

    U no use innernet to complete assignment!

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •