Changeset 2151


Ignore:
Timestamp:
Aug 23, 2012, 3:30:31 PM (7 years ago)
Author:
matthijs
Message:

mountd: Don't try to mount ext4 partitions.

This allows mountd to recognize ext4 partitions, so it can skip trying
to mount them and instead report something sensible to the user. Since
our kernel does not support ext4 (ext4 suppport wasn't considered stable
until kernel 2.6.28), we shouldn't be trying to mount ext4 partitions as
ext3 (which was what previously happened).

References: #323

Location:
trunk/fon/mountd/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/fon/mountd/src/include/lib/fs.h

    r2149 r2151  
    1111#define EXTENDED        7
    1212#define MBR             8
     13#define EXT4            9
    1314
    1415int detect_fs(char *device);
  • trunk/fon/mountd/src/lib/fs.c

    r1027 r2151  
    9292        if(get_le_short(buffer + 56) == 0xEF53)
    9393        {
    94                 if((get_le_long(buffer + 96) & 0x0008)
     94                /* Extents are enabled */
     95                if(get_le_long(buffer + 96) & 0x0040)
     96                        ret = EXT4;
     97                /* Journal is enabled */
     98                else if((get_le_long(buffer + 96) & 0x0008)
    9599                        || (get_le_long(buffer + 92) & 0x0004))
    96100                        ret = EXT3;
  • trunk/fon/mountd/src/lib/mount.c

    r2150 r2151  
    144144        "EFI",
    145145        "EXTENDED",
    146         "MBR"
     146        "MBR",
     147        "EXT4"
    147148};
    148149
Note: See TracChangeset for help on using the changeset viewer.