[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] better block device detection for linux 2.6
From: |
Andres Salomon |
Subject: |
[PATCH] better block device detection for linux 2.6 |
Date: |
Wed, 16 Nov 2005 23:50:00 -0500 |
Hi,
The root problem of my prior patch was due to the sketchy probing of
partitions in linux, using /proc/partitions and attempting to understand
the names. Linux 2.6 now includes /sys/block, which contains all block
devices on the system (and their partitions underneath that). The
attached patch makes parted attempt to probe devices via /sys/block, and
fall back to /proc/partitions if /sys isn't mounted.
This is against some cvs version of parted, but applies to 1.6.25.1.
There are probably additional entries that should be ignored (currently
I've got just dm-*, loop*, and ram*). Those can be added as necessary.
Partitions can also be probed via /sys/block as well, if it's desirable
to do that instead of reading the partition table from the block device;
I didn't bother to write any code to do it, since I didn't see the
necessity.
patch2.patch
Description: Text Data
- [PATCH] better block device detection for linux 2.6,
Andres Salomon <=