diff options
author | Jim Meyering <meyering@redhat.com> | 2007-12-18 16:17:06 +0100 |
---|---|---|
committer | Jim Meyering <meyering@redhat.com> | 2009-07-24 15:04:40 +0200 |
commit | fff559b4e987d9404a788a817630c394af89db48 (patch) | |
tree | 70d0b28bea8eca6e86eb1831aa5f1775eac29a3b /libparted/filesys.c | |
parent | 7603e404ee60f2f892be380a23c390f4638f451f (diff) | |
download | parted-fff559b4e987d9404a788a817630c394af89db48.tar.gz |
disable some file-system-related probe tests for sector size > 512
These changes keep us from recognizing most file systems
when the sector size is larger than 512. However, for now (while
concentrating on getting partition table support right) that's not
a problem. Besides, the code we're avoiding would inevitably make
parted smash its stack.
* libparted/fs/linux_swap/linux_swap.c (_generic_swap_probe): Fail
the swap-file-system-recognizing test when sector size is not 512.
* libparted/filesys.c (ped_file_system_probe_specific): Fail all
fs-specific probe-related tests when sector size is not 512.
* libparted/fs/jfs/jfs.c (jfs_probe): For now, don't even try to
deal with larger sector size.
* libparted/label.c: Skip tests of problematic file system types.
* tests/t0100-print.sh: Print with units of sectors, and adjust
expected output accordingly.
* tests/t1000-mkpartfs.sh: Use a smaller test file.
Diffstat (limited to 'libparted/filesys.c')
-rw-r--r-- | libparted/filesys.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/libparted/filesys.c b/libparted/filesys.c index d57c3cd..8bdffb5 100644 --- a/libparted/filesys.c +++ b/libparted/filesys.c @@ -1,6 +1,6 @@ /* libparted - a library for manipulating disk partitions - Copyright (C) 1999, 2000, 2001, 2007, 2009 Free Software Foundation, Inc. + Copyright (C) 1999-2001, 2007-2009 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -197,6 +197,11 @@ ped_file_system_probe_specific ( PED_ASSERT (fs_type->ops->probe != NULL, return NULL); PED_ASSERT (geom != NULL, return NULL); + /* Fail all fs-specific probe-related tests when sector size + is not the default. */ + if (geom->dev->sector_size != PED_SECTOR_SIZE_DEFAULT) + return 0; + if (!ped_device_open (geom->dev)) return 0; result = fs_type->ops->probe (geom); |