Changeset 32020


Ignore:
Timestamp:
May 12, 2017, 4:23:30 PM (12 days ago)
Author:
brainslayer
Message:

detect f2fs

Location:
src/router/disktype
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • src/router/disktype/HISTORY

    r11068 r32020  
    1 $Id: HISTORY,v 1.32 2006/06/05 07:57:51 chrisp Exp $   -*- text -*-
     1$Id$   -*- text -*-
    22
    33 disktype History
     
    105105
    106106
     107Version 10 was released on Xxx x, 2009. It features the following
     108improvements:
     109
     110Added file systems: ext4, btrfs.
     111Added other structures: NetBSD boot loader.
     112Improved file systems: -
     113Improved other structures: -
     114
     115
    107116EOF
  • src/router/disktype/README

    r11068 r32020  
    1 $Id: README,v 1.17 2006/06/05 07:57:51 chrisp Exp $   -*- text -*-
     1$Id$   -*- text -*-
    22
    3  disktype 9
    4 ============
     3 disktype 10
     4=============
    55
    66The purpose of disktype is to detect the content format of a disk or
     
    5757
    5858File systems: FAT12/FAT16/FAT32, NTFS, HPFS, MFS, HFS, HFS Plus,
    59   ISO9660, ext2/ext3, Minix, ReiserFS, Reiser4, Linux romfs, Linux
    60   cramfs, Linux squashfs, UFS (some variations), SysV FS (some
    61   variations), JFS, XFS, Amiga FS/FFS, Amiga SFS, Amiga PFS, BeOS BFS,
    62   QNX4 FS, UDF, 3DO CD-ROM file system, Veritas VxFS, Xbox DVD file
    63   system.
     59  ISO9660, ext2/ext3/ext4, btrfs, Minix, ReiserFS, Reiser4, Linux
     60  romfs, Linux cramfs, Linux squashfs, UFS (some variations), SysV FS
     61  (some variations), JFS, XFS, Amiga FS/FFS, Amiga SFS, Amiga PFS,
     62  BeOS BFS, QNX4 FS, UDF, 3DO CD-ROM file system, Veritas VxFS, Xbox
     63  DVD file system.
    6464
    6565Partitioning: DOS/PC style, EFI GPT, Apple, Amiga "Rigid Disk", ATARI
     
    7373  UDIF disk image (limited), Linux cloop (limited).
    7474
    75 Boot loaders: LILO, GRUB, SYSLINUX, ISOLINUX, Linux kernel, FreeBSD
    76   loader, Windows/MS-DOS loader, BeOS loader, Haiku loader, Sega
    77   Dreamcast.
     75Boot loaders: LILO, GRUB, SYSLINUX, ISOLINUX, Linux kernel, FreeBSD,
     76  OpenBSD, NetBSD, Windows/MS-DOS loader, BeOS loader, Haiku loader,
     77  Sega Dreamcast.
    7878
    7979Compression formats: gzip, compress, bzip2.
  • src/router/disktype/Seedfile

    r11068 r32020  
    11# Seedfile for disktype
    22
    3 package disktype 8;
     3package disktype 9;
    44
    55binary disktype {
  • src/router/disktype/TODO

    r11068 r32020  
    1 $Id: TODO,v 1.12 2006/06/03 16:16:36 chrisp Exp $   -*- text -*-
     1$Id$   -*- text -*-
    22
    33 disktype ToDo
    44===============
    55
     6ext4
     7btrfs
     8
    69Check NTFS, HPFS, FAT stuff
    710Check EVMS
    811Nero CD images (.nrg)
     12OCFS (Oracle Cluster FS) http://oss.oracle.com/projects/ocfs/
    913Other disklabels: SGI, OSF, Ultrix, Acorn, MS LDM, IBM, Minix,
    1014  Unixware
  • src/router/disktype/detect.c

    r29398 r32020  
    6363void detect_ext234(SECTION *section, int level);
    6464void detect_btrfs(SECTION *section, int level);
     65void detect_f2fs(SECTION *section, int level);
    6566void detect_reiser(SECTION *section, int level);
    6667void detect_reiser4(SECTION *section, int level);
     
    142143  detect_ext234,
    143144  detect_btrfs,
     145  detect_f2fs,
    144146  detect_reiser,
    145147  detect_reiser4,
  • src/router/disktype/linux.c

    r22198 r32020  
    5656      fslevel = 3;
    5757    /* Ext4 INCOMPAT features: EXTENTS, 64BIT, FLEX_BG */
    58     //if (get_le_long(buf + 96) & 0x02C0)
    59     //  fslevel = 4;
     58    if (get_le_long(buf + 96) & 0x02C0)
     59      fslevel = 4;
    6060    /* Ext4 RO_COMPAT features: HUGE_FILE, GDT_CSUM, DIR_NLINK, EXTRA_ISIZE */
    6161    if (get_le_long(buf + 100) & 0x0078)
    6262      fslevel = 4;
    6363    /* Ext4 sets min_extra_isize even on external journals */
    64     //if (get_le_short(buf + 348) >= 0x1c)
    65     //  fslevel = 4;
     64    if (get_le_short(buf + 348) >= 0x1c)
     65      fslevel = 4;
    6666    /* Ext4dev TEST_FILESYS flag */
    67     //if (get_le_long(buf + 352) & 0x0004)
    68     //  is_dev = 1;
     67    if (get_le_long(buf + 352) & 0x0004)
     68      is_dev = 1;
    6969
    7070    print_line(level, "Ext%d%s %s", fslevel, is_dev ? "dev" : "",
     
    119119    print_line(level + 1, "Volume size %s", s);
    120120  }
     121}
     122
     123
     124void detect_f2fs(SECTION *section, int level)
     125{
     126  unsigned char *buf;
     127  char s[258];
     128
     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");
    121134}
    122135
Note: See TracChangeset for help on using the changeset viewer.