summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
d13b587)
use hfsplus driver to mount hfs+ partition marked as journalled,
read only mounting since partial support from the kernel for write
access (as stated in Documentatiom/filesystems/hfsplus.txt)
add new index 'LASTFS' to be used in case of support for another
driver
Signed-off-by: Olivier Hardouin <olivier.hardouin@gmail.com>
{
if(!journal)
ret = HFSPLUS;
{
if(!journal)
ret = HFSPLUS;
- // else
- // ret = HFSPLUSJOURNAL;
+ else
+ ret = HFSPLUSJOURNAL;
-#define NONE -1
-#define MBR 2
-#define EXT2 3
-#define EXT3 4
-#define FAT 5
-#define HFSPLUS 6
-#define EFI 7
-#define NTFS 8
-#define EXTENDED 9
-#define EXFAT 10
-#define EXT4 11
+#define NONE -1
+#define MBR 2
+#define EXT2 3
+#define EXT3 4
+#define FAT 5
+#define HFSPLUS 6
+#define EFI 7
+#define NTFS 8
+#define EXTENDED 9
+#define EXFAT 10
+#define EXT4 11
+#define HFSPLUSJOURNAL 12
+
+#define LASTFS HFSPLUSJOURNAL
int detect_fs(char *device);
int detect_fs(char *device);
+ "ext4",
+ "hfsplusjournal"
};
#define MAX_MOUNTED 32
};
#define MAX_MOUNTED 32
ucix_add_option(ctx, mountd, q->serial, "rev", q->rev);
snprintf(t, 64, "size%d", atoi(&q->dev[3]));
ucix_add_option(ctx, mountd, q->serial, t, q->size);
ucix_add_option(ctx, mountd, q->serial, "rev", q->rev);
snprintf(t, 64, "size%d", atoi(&q->dev[3]));
ucix_add_option(ctx, mountd, q->serial, t, q->size);
- if(q->fs > MBR && q->fs <= EXT4)
+ if(q->fs > MBR && q->fs <= LASTFS)
{
snprintf(t, 64, "fs%d", atoi(&q->dev[3]));
ucix_add_option(ctx, mountd, q->serial, t, fs_names[q->fs]);
{
snprintf(t, 64, "fs%d", atoi(&q->dev[3]));
ucix_add_option(ctx, mountd, q->serial, t, fs_names[q->fs]);
{
struct mount *mount;
char tmp[64], tmp2[64];
{
struct mount *mount;
char tmp[64], tmp2[64];
- if(fs <= MBR || fs > EXT4)
+ if(fs <= MBR || fs > LASTFS)
return;
mount = malloc(sizeof(struct mount));
INIT_LIST_HEAD(&mount->list);
return;
mount = malloc(sizeof(struct mount));
INIT_LIST_HEAD(&mount->list);
mount->mounted = 0;
mount->fs = fs;
list_add(&mount->list, &mounts);
mount->mounted = 0;
mount->fs = fs;
list_add(&mount->list, &mounts);
- if((!mount->ignore) && (mount->fs > MBR) && (mount->fs <= EXT4))
+ if((!mount->ignore) && (mount->fs > MBR) && (mount->fs <= LASTFS))
{
log_printf("new mount : %s -> %s (%s)\n", name, dev, fs_names[mount->fs]);
snprintf(tmp, 64, "%s%s", uci_path, name);
{
log_printf("new mount : %s -> %s (%s)\n", name, dev, fs_names[mount->fs]);
snprintf(tmp, 64, "%s%s", uci_path, name);
options = "rw,defaults,uid=1000,gid=1000";
fstype = "hfsplus";
}
options = "rw,defaults,uid=1000,gid=1000";
fstype = "hfsplus";
}
+ if(mount->fs == HFSPLUSJOURNAL)
+ {
+ options = "ro,defaults,uid=1000,gid=1000";
+ fstype = "hfsplus";
+ }
if(mount->fs == NTFS)
{
options = "force";
fstype = "ntfs-3g";
}
if(mount->fs == NTFS)
{
options = "force";
fstype = "ntfs-3g";
}
- if(mount->fs > MBR && mount->fs <= EXT4)
+ if(mount->fs > MBR && mount->fs <= LASTFS)
{
struct uci_context *ctx;
char *uci_options, *uci_fstype;
{
struct uci_context *ctx;
char *uci_options, *uci_fstype;