Ticket #558 (confirmed enhancement)
[PATCH] mountd does not recognize xfs file systems
| Reported by: | fon@… | Owned by: | |
|---|---|---|---|
| Priority: | low | Milestone: | |
| Component: | fon-base-firmware | Version: | 2.3.0.0 (Elan) |
| Severity: | |||
| Cc: | Hardware: | both |
Description
My external storage uses the xfs file system. Since the xfs.ko kernel module is not shipped with the base image, I installed this manually.
However, the xfs partition does not automount even though the xfs module is loaded at runtime.
I tracked down the problem being with mountd only recognizing ext2, ext3, vfat, hfsplus and ntfs filesystems.
I propose that mount.c be patched so that unknown filesystems also are mounted, and let the kernel detect the filesystem (i.e. do not pass the -t flag).
Patch: fonosfera_2.3.0.0_GPL/fon/mountd/src/lib/mount.c
--- mount.c.orig 2010-01-10 21:39:49.000000000 +0100 +++ mount.c 2010-01-10 21:32:42.000000000 +0100 @@ -545,26 +545,29 @@
log_printf("mount -t vfat -o rw,uid=1000,gid=1000 /dev/%s %s", mount->dev, tmp); ret = system_printf("mount -t vfat -o rw,uid=1000,gid=1000 /dev/%s %s", mount->dev, tmp);
}
- if(mount->fs == EXT3) + else if(mount->fs == EXT3)
{
log_printf("mount -t ext3 -o rw,defaults /dev/%s %s", mount->dev, tmp); ret = system_printf("mount -t ext3 -o rw,defaults /dev/%s %s", mount->dev, tmp);
}
- if(mount->fs == EXT2) + else if(mount->fs == EXT2)
{
log_printf("mount -t ext2 -o rw,defaults /dev/%s %s", mount->dev, tmp); ret = system_printf("mount -t ext2 -o rw,defaults /dev/%s %s", mount->dev, tmp);
}
- if(mount->fs == HFSPLUS) + else if(mount->fs == HFSPLUS)
{
log_printf("mount -t hfsplus -o rw,defaults,uid=1000,gid=1000 /dev/%s %s", mount->dev, tmp); ret = system_printf("mount -t hfsplus -o rw,defaults,uid=1000,gid=1000 /dev/%s %s", mount->dev, tmp);
}
- if(mount->fs == NTFS) + else if(mount->fs == NTFS)
{
log_printf("ntfs-3g /dev/%s %s -o force", mount->dev, tmp); ret = system_printf("ntfs-3g /dev/%s %s -o force", mount->dev, tmp);
- } + } else { /* fallback, let kernel decide. For example for xfs with externally loaded module */ + log_printf("mount -o rw,defaults /dev/%s %s", mount->dev, tmp); + ret = system_printf("mount -o rw,defaults /dev/%s %s", mount->dev, tmp); + }
exit(WEXITSTATUS(ret));
} pid = waitpid(pid, &ret, 0);
Thanks,
Stefan
