Changeset 32033


Ignore:
Timestamp:
May 14, 2017, 12:39:23 PM (6 weeks ago)
Author:
brainslayer
Message:

f2fs detection

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/router/disktype/linux.c

    r32020 r32033  
    122122
    123123
     124
    124125void detect_f2fs(SECTION *section, int level)
    125126{
     
    127128  char s[258];
    128129
    129   if (get_buffer(section, 64 * 1024, 1024, (void **)&buf) < 1024)
    130     return;
    131 
    132    if (get_le_long(buf)==0xF2F52010)
    133         print_line(level, "F2FS file system");
     130  if (get_buffer(section, 0x400, 1024, (void **)&buf) < 1024)
     131    return;
     132
     133   if (get_le_long(buf)==0xF2F52010) {
     134        print_line(level, "F2FS file system v%d.%d",get_le_short(buf+4),get_le_short(buf+6));
     135
     136    format_utf16_le(buf + 108 + 16, 512, s);
     137
     138    if (s[0])
     139      print_line(level + 1, "Volume name \"%s\"", s);
     140
     141
     142   format_uuid(buf + 108, s);
     143   print_line(level + 1, "E2FS %s", s);
     144    }
     145
    134146}
    135147
Note: See TracChangeset for help on using the changeset viewer.