patch-2.1.119 linux/fs/hfs/super.c
Next file: linux/fs/isofs/inode.c
Previous file: linux/drivers/scsi/hosts.c
Back to the patch index
Back to the overall index
- Lines: 40
- Date:
Wed Aug 26 13:25:21 1998
- Orig file:
v2.1.118/linux/fs/hfs/super.c
- Orig date:
Sun Jun 7 11:16:36 1998
diff -u --recursive --new-file v2.1.118/linux/fs/hfs/super.c linux/fs/hfs/super.c
@@ -396,9 +396,7 @@
struct hfs_mdb *mdb;
struct hfs_cat_key key;
kdev_t dev = s->s_dev;
-#ifndef CONFIG_MAC_PARTITION
hfs_s32 part_size, part_start;
-#endif
struct inode *root_inode;
int part;
@@ -415,16 +413,25 @@
/* set the device driver to 512-byte blocks */
set_blocksize(dev, HFS_SECTOR_SIZE);
- /* look for a partition table and find the correct partition */
-#ifndef CONFIG_MAC_PARTITION
+#ifdef CONFIG_MAC_PARTITION
+ /* check to see if we're in a partition */
+ mdb = hfs_mdb_get(s, s->s_flags & MS_RDONLY, 0);
+
+ /* erk. try parsing the partition table ourselves */
+ if (!mdb) {
+ if (hfs_part_find(s, part, silent, &part_size, &part_start)) {
+ goto bail2;
+ }
+ mdb = hfs_mdb_get(s, s->s_flags & MS_RDONLY, part_start);
+ }
+#else
if (hfs_part_find(s, part, silent, &part_size, &part_start)) {
goto bail2;
}
mdb = hfs_mdb_get(s, s->s_flags & MS_RDONLY, part_start);
-#else
- mdb = hfs_mdb_get(s, s->s_flags & MS_RDONLY, 0);
#endif
+
if (!mdb) {
if (!silent) {
printk("VFS: Can't find a HFS filesystem on dev %s.\n",
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov