diff options
author | Sebastian Parschauer <sparschauer@suse.de> | 2017-03-14 16:40:00 +0100 |
---|---|---|
committer | Brian C. Lane <bcl@redhat.com> | 2017-05-01 15:04:24 -0700 |
commit | 21131f62c6f508a5d0c080e025cf7db5df43fc7d (patch) | |
tree | aa4ff99a76c8f70853b6db21d6af3d43ba0ed6a7 /parted | |
parent | 5a61f15b7003cba73e6517ac22204bafd9a3cb8e (diff) | |
download | parted-21131f62c6f508a5d0c080e025cf7db5df43fc7d.tar.gz |
Add support for RAM drives
Recognize RAM drives, so "parted -s /dev/ram0 p" now prints
"RAM Drive (brd)" instead of "Model: Unknown (unknown)".
In order for a device to be recognized as RAM drive, it has to
have major number 1. Also the BLKFLSBUF ioctl shouldn't be used
on RAM drives as it is used to zero the device.
* NEWS: Mention the change
* include/parted/device.h.in(PedDeviceType): Add PED_DEVICE_RAM.
* libparted/arch/linux.c(RAM_MAJOR): New define.
* libparted/arch/linux.c(_device_probe_type): Recognize RAM drives.
* libparted/arch/linux.c(linux_new): Handle RAM drives.
* libparted/arch/linux.c(_flush_cache): Skip RAM drives.
* parted/parted.c(do_print): Add "brd" to list of transports.
Signed-off-by: Sebastian Parschauer <sparschauer@suse.de>
Diffstat (limited to 'parted')
-rw-r--r-- | parted/parted.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/parted/parted.c b/parted/parted.c index 59ad59e..6722dc9 100644 --- a/parted/parted.c +++ b/parted/parted.c @@ -980,7 +980,7 @@ _print_disk_info (const PedDevice *dev, const PedDisk *diskp) "cpqarray", "file", "ataraid", "i2o", "ubd", "dasd", "viodasd", "sx8", "dm", "xvd", "sd/mmc", "virtblk", "aoe", - "md", "loopback", "nvme"}; + "md", "loopback", "nvme", "brd"}; char* start = ped_unit_format (dev, 0); PedUnit default_unit = ped_unit_get_default (); |