1 diff -ruN mountd-0.1.orig/include/fs.h mountd-0.1/include/fs.h
2 --- mountd-0.1.orig/include/fs.h 2009-10-02 22:57:04.000000000 +0200
3 +++ mountd-0.1/include/fs.h 2012-07-08 18:42:32.000000000 +0200
10 int detect_fs(char *device);
11 diff -ruN mountd-0.1.orig/lib/fs.c mountd-0.1/lib/fs.c
12 --- mountd-0.1.orig/lib/fs.c 2009-10-02 23:26:22.000000000 +0200
13 +++ mountd-0.1/lib/fs.c 2012-07-08 19:28:08.000000000 +0200
16 if(get_le_short(buffer + 56) == 0xEF53)
18 - if((get_le_long(buffer + 96) & 0x0008)
19 - || (get_le_long(buffer + 92) & 0x0004))
21 + if(get_le_long(buffer + 92) & 0x0004)
23 + if ((get_le_long(buffer + 96) < 0x0000040)
24 + && (get_le_long(buffer + 100) < 0x0000008))
32 diff -ruN mountd-0.1.orig/lib/mount.c mountd-0.1/lib/mount.c
33 --- mountd-0.1.orig/lib/mount.c 2009-10-03 12:54:57.000000000 +0200
34 +++ mountd-0.1/lib/mount.c 2012-07-08 19:04:29.000000000 +0200
46 #define MAX_MOUNTED 32
48 ucix_add_option(ctx, mountd, q->serial, "rev", q->rev);
49 snprintf(t, 64, "size%d", atoi(&q->dev[3]));
50 ucix_add_option(ctx, mountd, q->serial, t, q->size);
51 - if(q->fs > MBR && q->fs <= NTFS)
52 + if(q->fs > MBR && q->fs <= EXT4)
54 snprintf(t, 64, "fs%d", atoi(&q->dev[3]));
55 ucix_add_option(ctx, mountd, q->serial, t, fs_names[q->fs]);
59 char tmp[64], tmp2[64];
60 - if(fs <= MBR || fs > NTFS)
61 + if(fs <= MBR || fs > EXT4)
63 mount = malloc(sizeof(struct mount));
64 INIT_LIST_HEAD(&mount->list);
68 list_add(&mount->list, &mounts);
69 - if((!mount->ignore) && (mount->fs > MBR) && (mount->fs <= NTFS))
70 + if((!mount->ignore) && (mount->fs > MBR) && (mount->fs <= EXT4))
72 log_printf("new mount : %s -> %s (%s)\n", name, dev, fs_names[mount->fs]);
73 snprintf(tmp, 64, "%s%s", uci_path, name);
75 log_printf("mount -t vfat -o rw,uid=1000,gid=1000 /dev/%s %s", mount->dev, tmp);
76 ret = system_printf("mount -t vfat -o rw,uid=1000,gid=1000 /dev/%s %s", mount->dev, tmp);
78 + if(mount->fs == EXT4)
80 + log_printf("mount -t ext4 -o rw,defaults /dev/%s %s", mount->dev, tmp);
81 + ret = system_printf("mount -t ext4 -o rw,defaults /dev/%s %s", mount->dev, tmp);
85 log_printf("mount -t ext3 -o rw,defaults /dev/%s %s", mount->dev, tmp);