summaryrefslogtreecommitdiffstats
path: root/source/a/util-linux/util-linux.do.not.list.ram.devices.diff
blob: 33a743076cf6602ad037bf149dffba3450f03200 (about) (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
--- ./disk-utils/fdisk-list.c.orig	2018-09-20 07:38:55.845404951 -0500
+++ ./disk-utils/fdisk-list.c	2019-01-02 15:53:21.256868721 -0600
@@ -337,6 +337,10 @@
 		if (devno <= 0)
 			continue;
 
+		/* Don't list /dev/ram* devices */
+		if (strstr(line, "ram") && devno >= 256)
+			continue;
+
 		if (sysfs_devno_is_dm_private(devno, NULL) ||
 		    sysfs_devno_is_wholedisk(devno) <= 0)
 			continue;