#include <sys/types.h>
#include <sys/utsname.h> /* for uname() */
#include <scsi/scsi.h>
+#include <assert.h>
#ifdef ENABLE_DEVICE_MAPPER
#include <libdevmapper.h>
#endif
return _dm_reread_part_table (disk);
#endif
if (disk->dev->type != PED_DEVICE_FILE) {
- /* The ioctl() command BLKPG_ADD_PARTITION does not notify
- * the devfs system; consequently, /proc/partitions will not
- * be up to date, and the proper links in /dev are not
- * created. Therefore, if using DevFS, we must get the kernel
- * to re-read and grok the partition table.
- */
- /* Work around kernel dasd problem so we really do BLKRRPART */
- int ok = 1;
- if (disk->dev->type != PED_DEVICE_DASD && _have_blkpg ()) {
- if (!_disk_sync_part_table (disk))
- ok = 0;
- }
- return ok;
+ /* We now require BLKPG support. If this assertion fails,
+ please write to the mailing list describing your system.
+ Assuming it's never triggered, ...
+ FIXME: remove this assertion in 2012. */
+ assert (_have_blkpg ());
+
+ if (!_disk_sync_part_table (disk))
+ return 0;
}
return 1;